POST /2024-09/channels/amazon/{channel}/connection-data

Create or update the Amazon-specific connection data for a channel.

Path parameters

  • channel string Required

    The UUID of the channel.

application/json

Body Required

  • marketplace_id string

    The Amazon marketplace ID

  • access_token string

    An access token allowing access to the API

  • access_token_expires_at string(date-time)

    The date and time the provided access token expires

  • refresh_token string

    The refresh token of the Amazon channel.

Responses

  • 200 application/json

    A successful response returning the connection data.

    Hide response attribute Show response attribute object
    • data object
      Hide data attributes Show data attributes object
      • channel_id string(uuid) Required
      • marketplace_id string Required

        The Amazon marketplace ID

      • has_access_token boolean Required

        Whether an access token is stored

      • has_refresh_token boolean Required

        Whether a refresh token is stored

      • access_token_expires_at string(date-time)

        The date and time the access token expires

      • created_at string(date-time) Required
      • updated_at string(date-time) Required
  • 401 application/json

    The request requires user authentication or the user is not authorized to access this resource.

    Hide response attribute Show response attribute object
    • message string
  • 403 application/json

    Forbidden - The user does not have permission to access this resource.

    Hide response attribute Show response attribute object
    • message string Required
  • 404 application/json

    The specified resource was not found

    Hide response attribute Show response attribute object
    • message string
  • 422

    Validation error - channel is not an Amazon channel

POST /2024-09/channels/amazon/{channel}/connection-data
curl \
 --request POST 'https://app.merchanthq.com/api/2024-09/channels/amazon/1e7f0a0f-b5a9-4d1a-a2d5-d0e0c2b1c3d4/connection-data' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"marketplace_id":"ATVPDKIKX0DER","access_token":"Atza|IwExxxxxxx","access_token_expires_at":"2024-10-10T14:59:16Z","refresh_token":"Atzr|IwExxxxxxx"}'
Request examples
{
  "marketplace_id": "ATVPDKIKX0DER",
  "access_token": "Atza|IwExxxxxxx",
  "access_token_expires_at": "2024-10-10T14:59:16Z",
  "refresh_token": "Atzr|IwExxxxxxx"
}
Response examples (200)
{
  "data": {
    "channel_id": "string",
    "marketplace_id": "ATVPDKIKX0DER",
    "has_access_token": true,
    "has_refresh_token": true,
    "access_token_expires_at": "2025-05-04T09:42:00Z",
    "created_at": "2025-05-04T09:42:00Z",
    "updated_at": "2025-05-04T09:42:00Z"
  }
}
Response examples (401)
{
  "message": "Unauthorized"
}
Response examples (403)
{
  "message": "This action is unauthorized."
}
Response examples (404)
{
  "message": "Not found"
}