1.简介
Call Index Doc:
http://developer.ebay.com/DevZone/XML/docs/Reference/eBay/index.html
消息发送主要分为三类:
允许卖家回复关于在线item的问题。 |
|
见 eBay消息发送(2) |
|
见 eBay消息发送(3) |
2.AddMemberMessageRTQ
以MemberMessageType作为载体发送。
2.1输入字段
ItemID 提问所应对的Item唯一ID。
MemberMessage内容 Body 消息的主体,不支持原生的HTML,编码后的HTML也不会自动解码。最大长度为2000。 DisplayToPublic 表明这条消息是否在item listing中可见。 ParentMessageID 需要回复的消息ID。 RecipientID 收件人,填入eBay用户ID。 SendID 发件人ID |
2.2输出
ApiResponse内容 Ack CustomCode (out) Reserved for internal or future use. Failure (out) Request processing failed Success (out) Request processing succeeded Warning (out) Request processing completed with warning information being included in the response message Errors |
2.3沙箱测试
You can test this call in the Sandbox. To test AddMemberMessageRTQ, you must have at least two test users in the Sandbox environment.
- List an item in the Sandbox using AddItem.
- Have a different user send the seller a question about the item. You can use the Sandbox UI for this step.
- Using the seller as the authenticated user, call GetMemberMessages (this will be the user for AddMemberMessageRTQ).
- In the call to AddMemberMessageRTQ, set ParentMessageID to the value ofMemberMessage.MemberMessageExchange.Question.MessageID that was returned from the GetMemberMessages call.
- Set RecipientID to the user ID of the original sender.
- Type the response to the question in the Body field.
3.样例代码
- public
void SendMessagesRTQ(ApiContext context, string subject, string body, string recipientID, string parentMessageID, string senderID, string itemID) - {
- try
- {
- //回复客人消息
- var addCall = new AddMemberMessageRTQCall(context);
- var memberMessageType = new MemberMessageType()
- {
- Body = body,
- ParentMessageID = parentMessageID,
- RecipientID = new StringCollection { recipientID },
- SenderID = senderID,
- DisplayToPublic = false,
- DisplayToPublicSpecified = true
- };
- //用于回复买家Message的Call,不过只能用于回复买家关于在线商品的提问
- addCall.AddMemberMessageRTQ(itemID, memberMessageType);
- }
- catch (Exception ex)
- {
- throw
new EbayAPIExpcetion(ex.Message, ex.InnerException == null ? ex : ex.InnerException); - }
- }