Replying member messages with AddMemberMessageRTQ Trading API
Find the answer to your question
Advanced Search
Products
Question
What API should I use to reply eBay member messages?
Answer
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 Sender, ExternalMessageID, MessageID, ResponseEnabled and ItemID
| <?xml version="1.0" encoding="utf-8"?> <GetMyMessagesRequest xmlns="urn:ebay:apis:eBLBaseComponents"> <Version>1267</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>1267</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"?> <Version>1267</Version> <ItemID>{GetMyMessagesResponse.Messages.Message.ItemID}</ItemID> <--- only if it is returned in the step 1 !!!! --> |