Amazon Shipping API (v2)

Download OpenAPI specification:Download

Amazon Shipping API Support: swa-api-core@amazon.com

The Amazon Shipping API is designed to support outbound shipping use cases both for orders originating on Amazon-owned marketplaces as well as external channels/marketplaces. With these APIs, you can request shipping rates, create shipments, cancel shipments, and track shipments.

shipping

getRates

Returns the available shipping service offerings.

Usage Plan:

Rate (requests per second) Burst
80 100

The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see Usage Plans and Rate Limits in the Selling Partner API.

header Parameters
x-amzn-shipping-business-id
string
Enum: "AmazonShipping_US" "AmazonShipping_IN" "AmazonShipping_UK" "AmazonShipping_UAE" "AmazonShipping_SA" "AmazonShipping_EG" "AmazonShipping_IT"

Amazon shipping business to assume for this request. The default is AmazonShipping_UK.

Request Body schema: application/json
object (Address)

The address.

required
object (Address)

The address.

object (Address)

The address.

shipDate
string <date-time>

The ship date and time (the requested pickup). This defaults to the current date and time.

required
Array of objects (Package)

A list of packages to be shipped through a shipping service offering.

object (ValueAddedServiceDetails)

A collection of supported value-added services.

Array of objects (TaxDetail)

A list of tax detail information.

required
object (ChannelDetails)

Shipment source channel related information.

Responses

Request samples

Content type
application/json
{
  • "shipTo": {
    },
  • "shipFrom": {
    },
  • "returnTo": {
    },
  • "shipDate": "2019-08-24T14:15:22Z",
  • "packages": [
    ],
  • "valueAddedServices": {
    },
  • "taxDetails": [
    ],
  • "channelDetails": {
    }
}

Response samples

Content type
application/json
{
  • "requestToken": "6DCCEDD3FF961C15FEB94F342D41C",
  • "rates": [
    ],
  • "ineligibleRates": [
    ]
}

directPurchaseShipment

Purchases the shipping service for a shipment using the best fit service offering. Returns purchase related details and documents.

Usage Plan:

Rate (requests per second) Burst
80 100

The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see Usage Plans and Rate Limits in the Selling Partner API.

header Parameters
x-amzn-IdempotencyKey
string

A unique value which the server uses to recognize subsequent retries of the same request.

locale
string

The IETF Language Tag. Note that this only supports the primary language subtag with one secondary language subtag (i.e. en-US, fr-CA). The secondary language subtag is almost always a regional designation. This does not support additional subtags beyond the primary and secondary language subtags.

x-amzn-shipping-business-id
string
Enum: "AmazonShipping_US" "AmazonShipping_IN" "AmazonShipping_UK" "AmazonShipping_UAE" "AmazonShipping_SA" "AmazonShipping_EG" "AmazonShipping_IT"

Amazon shipping business to assume for this request. The default is AmazonShipping_UK.

Request Body schema: application/json
object (Address)

The address.

object (Address)

The address.

object (Address)

The address.

Array of objects (Package)

A list of packages to be shipped through a shipping service offering.

required
object (ChannelDetails)

Shipment source channel related information.

object (RequestedDocumentSpecification)

The document specifications requested. For calls to the purchaseShipment operation, the shipment purchase fails if the specified document specifications are not among those returned in the response to the getRates operation.

Responses

Request samples

Content type
application/json
{
  • "shipTo": {
    },
  • "shipFrom": {
    },
  • "returnTo": {
    },
  • "packages": [
    ],
  • "channelDetails": {
    },
  • "labelSpecifications": {
    }
}

Response samples

Content type
application/json
{
  • "shipmentId": "445454-3232-3232",
  • "packageDocumentDetailList": [
    ]
}

purchaseShipment

Purchases a shipping service and returns purchase related details and documents.

Note: You must complete the purchase within 10 minutes of rate creation by the shipping service provider. If you make the request after the 10 minutes have expired, you will receive an error response with the error code equal to "TOKEN_EXPIRED". If you receive this error response, you must get the rates for the shipment again.

Usage Plan:

Rate (requests per second) Burst
80 100

The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see Usage Plans and Rate Limits in the Selling Partner API.

header Parameters
x-amzn-IdempotencyKey
string

A unique value which the server uses to recognize subsequent retries of the same request.

x-amzn-shipping-business-id
string
Enum: "AmazonShipping_US" "AmazonShipping_IN" "AmazonShipping_UK" "AmazonShipping_UAE" "AmazonShipping_SA" "AmazonShipping_EG" "AmazonShipping_IT"

Amazon shipping business to assume for this request. The default is AmazonShipping_UK.

Request Body schema: application/json
requestToken
required
string

A unique token generated to identify a getRates operation.

rateId
required
string

An identifier for the rate (shipment offering) provided by a shipping service provider.

required
object (RequestedDocumentSpecification)

The document specifications requested. For calls to the purchaseShipment operation, the shipment purchase fails if the specified document specifications are not among those returned in the response to the getRates operation.

Array of objects (RequestedValueAddedService)

The value-added services to be added to a shipping service purchase.

object

The additional inputs required to purchase a shipping offering, in JSON format. The JSON provided here must adhere to the JSON schema that is returned in the response to the getAdditionalInputs operation.

Additional inputs are only required when indicated by the requiresAdditionalInputs property in the response to the getRates operation.

Responses

Request samples

Content type
application/json
{
  • "requestToken": "string",
  • "rateId": "string",
  • "requestedDocumentSpecification": {
    },
  • "requestedValueAddedServices": [
    ],
  • "additionalInputs": {
    }
}

Response samples

Content type
application/json
{
  • "shipmentId": "87852211788104",
  • "packageDocumentDetails": [
    ],
  • "promise": {
    }
}

getTracking

Returns tracking information for a purchased shipment.

Usage Plan:

Rate (requests per second) Burst
80 100

The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see Usage Plans and Rate Limits in the Selling Partner API.

query Parameters
trackingId
required
string

A carrier-generated tracking identifier originally returned by the purchaseShipment operation.

carrierId
required
string

A carrier identifier originally returned by the getRates operation for the selected rate.

header Parameters
x-amzn-shipping-business-id
string
Enum: "AmazonShipping_US" "AmazonShipping_IN" "AmazonShipping_UK" "AmazonShipping_UAE" "AmazonShipping_SA" "AmazonShipping_EG" "AmazonShipping_IT"

Amazon shipping business to assume for this request. The default is AmazonShipping_UK.

Responses

Response samples

Content type
application/json
{
  • "trackingId": "23AA47DE2B3B6",
  • "alternateLegTrackingId": "null",
  • "eventHistory": [
    ],
  • "promisedDeliveryDate": "2019-12-12T13:09:05.513Z",
  • "summary": {
    }
}

getShipmentDocuments

Returns the shipping documents associated with a package in a shipment.

Usage Plan:

Rate (requests per second) Burst
80 100

The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see Usage Plans and Rate Limits in the Selling Partner API.

path Parameters
shipmentId
required
string

The shipment identifier originally returned by the purchaseShipment operation.

query Parameters
packageClientReferenceId
required
string

The package client reference identifier originally provided in the request body parameter for the getRates operation.

format
string

The file format of the document. Must be one of the supported formats returned by the getRates operation.

dpi
number <double>

The resolution of the document (for example, 300 means 300 dots per inch). Must be one of the supported resolutions returned in the response to the getRates operation.

header Parameters
x-amzn-shipping-business-id
string
Enum: "AmazonShipping_US" "AmazonShipping_IN" "AmazonShipping_UK" "AmazonShipping_UAE" "AmazonShipping_SA" "AmazonShipping_EG" "AmazonShipping_IT"

Amazon shipping business to assume for this request. The default is AmazonShipping_UK.

Responses

Response samples

Content type
application/json
{
  • "shipmentId": "445454-3232-3232",
  • "packageDocumentDetail": {
    }
}

cancelShipment

Cancels a purchased shipment. Returns an empty object if the shipment is successfully cancelled.

Usage Plan:

Rate (requests per second) Burst
80 100

The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see Usage Plans and Rate Limits in the Selling Partner API.

path Parameters
shipmentId
required
string

The shipment identifier originally returned by the purchaseShipment operation.

header Parameters
x-amzn-shipping-business-id
string
Enum: "AmazonShipping_US" "AmazonShipping_IN" "AmazonShipping_UK" "AmazonShipping_UAE" "AmazonShipping_SA" "AmazonShipping_EG" "AmazonShipping_IT"

Amazon shipping business to assume for this request. The default is AmazonShipping_UK.

Responses

Response samples

Content type
application/json
{ }

getAdditionalInputs

Returns the JSON schema to use for providing additional inputs when needed to purchase a shipping offering. Call the getAdditionalInputs operation when the response to a previous call to the getRates operation indicates that additional inputs are required for the rate (shipping offering) that you want to purchase.

Usage Plan:

Rate (requests per second) Burst
80 100

The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see Usage Plans and Rate Limits in the Selling Partner API.

query Parameters
requestToken
required
string

The request token returned in the response to the getRates operation.

rateId
required
string

The rate identifier for the shipping offering (rate) returned in the response to the getRates operation.

header Parameters
x-amzn-shipping-business-id
string
Enum: "AmazonShipping_US" "AmazonShipping_IN" "AmazonShipping_UK" "AmazonShipping_UAE" "AmazonShipping_SA" "AmazonShipping_EG" "AmazonShipping_IT"

Amazon shipping business to assume for this request. The default is AmazonShipping_UK.

Responses

Response samples

Content type
application/json
{
  • "payload": {
    }
}