eBay 消息发送(1)

摘要:
1.CallIndexDoc简介:http://developer.ebay.com/DevZone/XML/docs/Reference/eBay/index.html消息发送主要分为三类:AddMemberMessageRTQ允许卖家回复有关在线项目的问题。查看发送AddMemberMessageAAQToPartner的易趣邮件(2)AddMemberMessagesAAQToBit

 

1.简介

Call Index Doc:

http://developer.ebay.com/DevZone/XML/docs/Reference/eBay/index.html

 

消息发送主要分为三类:

AddMemberMessageRTQ

允许卖家回复关于在线item的问题。

AddMemberMessageAAQToPartner

见 eBay消息发送(2)

AddMemberMessagesAAQToBidder

见 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.

  1. List an item in the Sandbox using AddItem.
  2. Have a different user send the seller a question about the item. You can use the Sandbox UI for this step.
  3. Using the seller as the authenticated user, call GetMemberMessages (this will be the user for AddMemberMessageRTQ).
  4. In the call to AddMemberMessageRTQ, set ParentMessageID to the value ofMemberMessage.MemberMessageExchange.Question.MessageID that was returned from the GetMemberMessages call.
  5. Set RecipientID to the user ID of the original sender.
  6. Type the response to the question in the Body field.

 

3.样例代码

 

  1. publicvoid SendMessagesRTQ(ApiContext context, string subject, string body, string recipientID, string parentMessageID, string senderID, string itemID)
  2. {
  3.     try
  4.     {
  5.         //回复客人消息
  6.         var addCall = new AddMemberMessageRTQCall(context);
  7.         var memberMessageType = new MemberMessageType()
  8.         {
  9.             Body = body,
  10.             ParentMessageID = parentMessageID,
  11.             RecipientID = new StringCollection { recipientID },
  12.             SenderID = senderID,
  13.             DisplayToPublic = false,
  14.             DisplayToPublicSpecified = true
  15.         };
  16.  
  17.         //用于回复买家Message的Call,不过只能用于回复买家关于在线商品的提问
  18.         addCall.AddMemberMessageRTQ(itemID, memberMessageType);
  19.     }
  20.     catch (Exception ex)
  21.     {
  22.         thrownew EbayAPIExpcetion(ex.Message, ex.InnerException == null ? ex : ex.InnerException);
  23.     }
  24. }

免责声明:文章转载自《eBay 消息发送(1)》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇百度开源上传组件webuploader 可上传多文件并带有进度条Python实战---制作专属有声小说(调用百度语音合成接口)下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章