For full functionality of this site it is necessary to enable JavaScript.
Here are the instructions how to enable JavaScript in your web browser.

Knowledge base

Find the answer to your question

Advanced Search PView

Search terms
Search Type
Product
Category
Language
Format
SDK
Sort by
Direction

Replying member messages with AddMemberMessageRTQ Trading API

  • Answer ID 1368
  • Published 02/24/2009 11:19 AM
  • Updated 10/20/2013 06:41 AM
  • Permalink https://ebaydts.com/eBayKBDetails?KBid=1368
What API should I use to reply eBay member messages?

 Summary

   By going to one of the URLs as below, an eBay member can send a message to another eBay user. 

Contact Member for communicating with any eBay member:   http://contact.ebay.com/ws/eBayISAPI.dll?ContactUserNextGen&recipient=={MemberUserID}

Ask Seller a Question for an active listing:   http://contact.ebay.com/ws/eBayISAPI.dll?ShowCoreAskSellerQuestion&Mode=1&redirect=0&iid={ItemID}&requested={SellerUserID}

Trading API AddMemberMessageRTQ call enables a seller to reply to an Ask Seller a Question type message or Contact Member message. 


Detailed Description

 

To anwser such messages,  one needs to:

  • call GetMyMessages API as below to retrieve SenderExternalMessageID, MessageID, ResponseEnabled and ItemID
 <?xml version="1.0" encoding="utf-8"?>
<GetMyMessagesRequest xmlns="urn:ebay:apis:eBLBaseComponents">
  <Version>825</Version>
  <DetailLevel>ReturnHeaders</DetailLevel>
  <RequesterCredentials> 
   xxx  </RequesterCredentials>
</GetMyMessagesRequest>

 

 

  • Exam each Message container, if Message.ResponseDetails.ResponseEnabled flag is true and  Message.Replied is false ,  then make another GetMyMessage call with the Message.MessageID  and <DetailLevel>ReturnMessages</DetailLevel to obtain the complete message for the Message.MessageID in question.
 <?xml version="1.0" encoding="utf-8"?>
<GetMyMessagesRequest xmlns="urn:ebay:apis:eBLBaseComponents">
  <Version>825</Version>
    <DetailLevel>ReturnMessages</DetailLevel>
   <RequesterCredentials>
    <eBayAuthToken>AgAAAA** ....</eBayAuthToken>
  </RequesterCredentials>
  <MessageIDs>
    <MessageID>2908767529</MessageID>
  </MessageIDs>
</GetMyMessagesRequest>

 

 

  • Pass the data obtained in the step1 and your answer into AddMemberMessageRTQ  as below:

 <?xml version="1.0" encoding="utf-8"?>
<AddMemberMessageRTQRequest xmlns="urn:ebay:apis:eBLBaseComponents">

     <Version>825</Version>
    <MemberMessage>
    <Body>YOUR ANSWER</Body>

 <ItemID>{GetMyMessagesResponse.Messages.Message.ItemID}</ItemID>  <--- only if it is returned in the step 1 !!!! -->
    <ParentMessageID>{GetMyMessagesResponse.Messages.Message.ExternalMessageID}</ParentMessageID>
    <RecipientID>{GetMyMessagesResponse.Messages.Message.Sender}</RecipientID>
  </MemberMessage>
  <RequesterCredentials>
    xxxx  </RequesterCredentials>
</AddMemberMessageRTQRequest>

How well did this answer your question?

Answers others found helpful

Print Email This Page Delicious Digg Facebook Reddit StumbleUpon Twitter