Service
Click here for a complete list of operations.
SendTemplateEmail2
Send email by Template, return email id.
Arguments:
loginEmail: Login Email of Spread.
APIKey: Login Password of Spread or API Key which you can retrieve from your Spread account (My account=> Settings).
MemberId. If there is no member id, please set 0.
Email: The email address of recipient.
TemplateId: The TemplateId(CampaignID) of email.
SubstitutionVars: It is a custom value of Json type. If there is a tag named [CUSTOM] in campaign, then you can send : {"[CUSTOM]":"Value"} .
CreativeLanguage: language, such as : en,en-us,zh-tw,zh-cn.
Cc: The email address of CC recipients
Return email id.
Remarks: If you want to send the template, it should be approved.
Test
The test form is only available for methods with primitive types as parameters.SOAP 1.1
The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.
POST /service.asmx HTTP/1.1 Host: service.rspread.com Content-Type: text/xml; charset=utf-8 Content-Length: length SOAPAction: "http://service.reasonablespread.com/SendTemplateEmail2" <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <SendTemplateEmail2 xmlns="http://service.reasonablespread.com/"> <LoginEmail>string</LoginEmail> <APIKey>string</APIKey> <MemberId>string</MemberId> <Email>string</Email> <TemplateId>string</TemplateId> <SubstitutionVars>string</SubstitutionVars> <CreativeLanguage>string</CreativeLanguage> <Cc> <string>string</string> <string>string</string> </Cc> </SendTemplateEmail2> </soap:Body> </soap:Envelope>
HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <SendTemplateEmail2Response xmlns="http://service.reasonablespread.com/"> <SendTemplateEmail2Result>string</SendTemplateEmail2Result> </SendTemplateEmail2Response> </soap:Body> </soap:Envelope>
SOAP 1.2
The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values.
POST /service.asmx HTTP/1.1 Host: service.rspread.com Content-Type: application/soap+xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"> <soap12:Body> <SendTemplateEmail2 xmlns="http://service.reasonablespread.com/"> <LoginEmail>string</LoginEmail> <APIKey>string</APIKey> <MemberId>string</MemberId> <Email>string</Email> <TemplateId>string</TemplateId> <SubstitutionVars>string</SubstitutionVars> <CreativeLanguage>string</CreativeLanguage> <Cc> <string>string</string> <string>string</string> </Cc> </SendTemplateEmail2> </soap12:Body> </soap12:Envelope>
HTTP/1.1 200 OK Content-Type: application/soap+xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"> <soap12:Body> <SendTemplateEmail2Response xmlns="http://service.reasonablespread.com/"> <SendTemplateEmail2Result>string</SendTemplateEmail2Result> </SendTemplateEmail2Response> </soap12:Body> </soap12:Envelope>
HTTP GET
The following is a sample HTTP GET request and response. The placeholders shown need to be replaced with actual values.
GET /service.asmx/SendTemplateEmail2?LoginEmail=string&APIKey=string&MemberId=string&Email=string&TemplateId=string&SubstitutionVars=string&CreativeLanguage=string&Cc=string&Cc=string HTTP/1.1 Host: service.rspread.com
HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <string xmlns="http://service.reasonablespread.com/">string</string>
HTTP POST
The following is a sample HTTP POST request and response. The placeholders shown need to be replaced with actual values.
POST /service.asmx/SendTemplateEmail2 HTTP/1.1 Host: service.rspread.com Content-Type: application/x-www-form-urlencoded Content-Length: length LoginEmail=string&APIKey=string&MemberId=string&Email=string&TemplateId=string&SubstitutionVars=string&CreativeLanguage=string&Cc=string&Cc=string
HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <string xmlns="http://service.reasonablespread.com/">string</string>