元素/属性 | 类型 | 描述 |
---|---|---|
GoalId | integer | 转化目标标识ID. 必填. |
GoalValue | integer | 已达到的转化目标值. 这可能是价格, 点数等. 如果希望用非整数值, 请先行转换 (取整, 乘以100等). 默认值为0,选填. |
MessageGuid | guid (string) | 所发送单封邮件的标识ID. MessageGuid 可以清晰分辨收件人, 邮件, 列表等 .
此值源于 ExpertSender 系统,产生于发送邮件过程中. 你可以在邮件中利用 |
Channel | string | 被用来发送给单一收件人的通道. 选填. 可用的取值为: All 全部, Email 电邮, SmsMms 短信/彩信. |
请求:
POST https://api.esv2.com/v2/Api/Goals HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: application/xml
Content-Length: 298
Host: api.esv2.com
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
<ApiRequest xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns:xs=”http://www.w3.org/2001/XMLSchema”>
<ApiKey>test_api_key1</ApiKey>
<Data>
<GoalId>2</GoalId>
<GoalValue>123</GoalValue>
<MessageGuid>C7015756-95F3-4509-8C6C-759FEEC48F91</MessageGuid>
</Data>
</ApiRequest>
|
HTTP/1.1 201 Created Cache-Control: private Server: Microsoft-IIS/7.5 X-AspNetMvc-Version: 3.0 X-AspNet-Version: 4.0.30319 X-Powered-By: ASP.NET Date: Wed, 17 Apr 2013 11:27:02 GMT Content-Length: 0 |
HTTP/1.1 400 Bad Request Cache-Control: private Content-Type: text/xml; charset=utf-8 Server: Microsoft-IIS/7.5 X-AspNetMvc-Version: 3.0 X-AspNet-Version: 4.0.30319 X-Powered-By: ASP.NET Date: Wed, 24 Apr 2013 11:14:46 GMT Content-Length: 239<ApiResponse xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=”http://www.w3.org/2001/XMLSchema”> <ErrorMessage> <Code>400</Code> <Message>Message GUID was not recognized.</Message> </ErrorMessage> </ApiResponse> |