Retrieve the Contact History for a Support Case
Learn how to retrieve the email, phone, and chat contacts associated with a support case.
Learn how to retrieve the contact history associated with a selling partner's support case. Contacts represent the individual communications between the selling partner and Amazon support, and can be delivered over email, phone, or chat channels.
The Selling Partner Support API supports the SP-API sandbox, so you can test these calls against static sandbox responses before making live requests.
Prerequisites
To complete this tutorial, you need:
- Authorization from the selling partner for whom you are making calls. Refer to Authorizing Selling Partner API applications for more information.
- The Support role assigned to your developer profile.
- The Support role selected in the app registration page for your application.
Step 1: Identify the support case
Call the listCases operation to retrieve the selling partner's support cases. Identify the case whose contacts you want to review, and record the case's id value to use as the caseId in the next step.
Step 2: Retrieve the contacts for the case
Call the listContacts operation with the caseId path parameter set to the case id from Step 1.
A successful response contains a contacts array. Each contact includes an ID, a channel (EMAIL, PHONE, or CHAT), a status (VALID or EXPIRED), and a creation date.
Step 3: Review the content of each contact
Read the channel-specific content field for each contact based on its channel value:
EMAIL: ReademailContent, which contains the sender (displayNameandroleofAMAZONorSELLING_PARTNER), the email message, and any attachments.PHONE: ReadphoneContent, which contains the call notes that summarize the phone call.CHAT: ReadchatContent, which contains a list of events and a full transcript. Ifeventsis empty, use thetranscriptfield.
For any attachments from an email, download the file from the downloadUrl. The downloadUrl is only included when it is available and expires after 15 minutes, so check for its presence before attempting a download and use the URL before it expires.
NoteA contact with a
statusofEXPIREDhas no content available, so its channel-specific content fields are not included in the response. Only contacts with astatusofVALIDinclude their full content.
Updated 40 minutes ago

