Frequently Asked Questions

Amazon Shipping API FAQs to address some of the pre and post-integration related queries

If your integration query isn't answered in the FAQs, please send us an email at [email protected]. We will either update our FAQs or answer your question via email.
Please include the following details in the email: 1) Your Name, 2) Company Name, 3) Company Website (if any) and, 4) Is the question pertaining to a New OR Existing integration.

Integration Related FAQ

Recommended tool for integration?

  • We recommend Postman for testing APIs since it has the support to make the calls with AWS signature/ OAuth 2.0 which is not available in other tools. Postman Collections and Environments file is available in JSON format - Postman Collection and Environment.

Is channelDetails required for both Amazon and off-Amazon orders?

  • Yes, channelDetails is required for both Amazon and off-Amazon orders since it contains channelType which is a mandatory field. channelType value should be set as “AMAZON” for all on-Amazon orders and as “EXTERNAL” for off-amazon orders. Additionally, Amazon Order ID field value is mandatory for all On-Amazon orders. For additional details please refer "Get Rates for a Shipment".

Is itemValue field mandatory?

  • While generating Shipping labels, passing a value in the itemValue field is mandatory. Off-Amazon shippers should send a price to generate labels and if no value is available, then it is recommended to default the value to $1 for generating the label.

What if I provide no values for returnTo Address or shipDate while calling the getRates Operation/API?

  • shipFrom value will be considered for returnTo and currentDate and time will be considered for shipDate.

What is the recommended label format for the shippers?

  • We recommend that the shippers use .zpl format (supported by the Amazon shipping APIs) since it has a lower latency. The other supported formats are “PDF” and “PNG”. Refer the API Swagger model for the complete list.
    Please note that you will need a Zebra printer to print this label type.

What are some of the key things to consider during integration?

  • Provide the details related to serviceID for both On-Amazon & Off-Amazon orders. ServiceID can be found in the GetRates API response for each of the returned rates.
  • shipDate parameter is OPTIONAL, don't pass it if you are unsure of how to use it. shipDate should ONLY be used for future shipments.
  • If you are a multi-warehouse shipper and have more than 1 warehouse address registered with Amazon, then please make sure that the “shipFrom” address should have the address of the registered warehouse from where the pickups are expected to take place.

Can Amazon Shipping API be integrated through EDI?

  • No, Amazon Shipping API is built on the Selling Partner API (SP-API) and the registration process and integration is described in the Selling Partner Developer Guide.

How do I get an access token for the API requests?

  • A Login with Amazon (LWA) access token authorizes your application to take certain actions on behalf of a selling partner. An access token expires one hour after it is issued, and must be included with every request to the Selling Partner API. (For more information, see the Connecting to the Selling Partner API within the Selling Partner Developer Guide.)

When does the Access Token and Refresh Token expire?

  • Access Token: It expires 1 hour after it is generated. New Access Token should be generated once it is expired.
  • Refresh Token: It doesn't expire. Refresh Token should be exchanged to get a new Access Token.

Sandbox and Production endpoints for Amazon Shipping v2 API?

I am getting "Access to requested resource is denied." when making an API call to "GetTrackingV2" OR "GetShipmentDocuments"?

  • "GetTrackingV2" OR "GetShipmentDocuments" are GET operations. The code: Unauthorized is displayed if POST operation is used for these APIs.

Can I send multiple "packages" elements in the getRates request? So for example if a customer wanted to ship multiple parcels with different weights/dimensions?

  • No, Amazon Shipping currently supports a single getRates request per package. If there are more than 1 packages being shipped to the same address, please make the getRates request for each package and subsequent purchaseShipment calls to generate the label.
  • In future, we plan to expand the getRates capabilities to handle multiple packages.

Can I send a hard coded dimensions OR weight in getRates request?

  • No, Amazon Shipping API calculates the rates/ delivery options based on accurate dimensions and weight. Please ensure to send accurate dimensions and weight in the getRates request.

Is there a list of FAQs I can refer to when I have questions regarding how to create the developer profile?

  • Yes. Please refer to this link Developer Profile FAQ. If you have still any questions, please reach out to your account team for assistance.

Is there a list of FAQs that will help me get a better understanding of AWS account, including how to create/setup a new account?

Additional Resources - See these additional resources for more information

How can I generate the Refresh Token after creating the App in Developer Central ?

Step by step detail is captured below for Self authorization.

10451045

Select the app which you intend to Authorize.

10431043

Click on "sign into that account".

528528

Enter the Shipper Central login credentials.

17321732

Click on Authorize app to generate the Refresh Token.

Post Integration FAQ

I am seeing the error message "Access to requested resource is denied"

  • Access denied error messages are returned due to Unauthorized errors or MissingAuthenticationToken errors.

Unauthorized

An Unauthorized with status code 403 error is returned for the following scenarios:

  1. Shipper Account: Check that shipper account is in active status, valid rate card should be enabled for the shipper account. For additional information, please check with your Launch manager.
  2. AWS Region: Check the Shipper Central account that you are making request to is in the same region as the endpoint you are using in the request. Example, for UK shippers the AWS Region should be "eu-west-1".
  3. API access: Check the API operation you are making a request to and verify that your application has access to that API. Amazon Shipping access is available via the following roles: 1) Direct-to-Consumer Shipping and 2) Amazon Logistics. To verify role permissions, in Seller Central, navigate to Partner Network > Develop Apps. Choose Edit App and review the roles selected for your application. In Developer Central, navigate to Developer Central page. Choose Edit App and review the roles selected for your application.
  4. Missing SP-API Role: If you are missing the role you need for the API access, check your Developer Profile to verify you requested access to that role. If you are missing access to a restricted role, you may need to re-submit your Developer Profile for access to that restricted role. Once the role is added, re-authorize your application (that is, generate a new LWA Refresh token to make valid API calls).
  5. Missing IAM ARN: If you have verified that you have all of the correct roles and permissions, check that your IAM ARN is added to the application. The IAM ARN you add should be the same IAM ARN to which the IAM policy was attached during registration process.
  6. If IAM ARN is associated with an IAM user, make sure that the IAM policy is attached to the IAM user and not to the IAM role. For more information, see Creating and configuring IAM policies and entities.

What should be the input for the requestedDocumentSpecification object in the purchaseShipment request call?

  • As part of the getRates response, each rate will have the supported formats mentioned in the supportedDocumentSpecifications object and it is base 64 encoded. To avoid errors, the same dimensions & format for the selected rate should be used in the PurchaseShipment call
  • requestedDocumentSpecification is a mandatory field while making the PurchaseShipment API call and it is expected that it should match exactly with one of the specifications that was returned in the GetRates response for that rate.

Which carrierID to use while calling Tracking API?

  • It is advised to use the same carrierID that was returned in the getRates API response. Integrators might have to consider storing this information and reuse it while calling TrackingAPIs.

What are the Amazon Shipping Service Ids in Production environments ?

Production Environment

  • Marketplace UK (ON Amazon Labels) - United Kingdom

Service Id

Service Name

Carrier ID

Carrier Name

prime-premium-uk-mfn

Amazon Shipping One-Day Tracked

AMZN_UK

Amazon Shipping

std-uk-mfn

Amazon Shipping Two-Day Tracked

AMZN_UK

Amazon Shipping

econ-uk-mfn

Amazon Shipping Standard Tracked

AMZN_UK

Amazon Shipping

  • Marketplace UK (OFF Amazon Labels/ Own Website) - United Kingdom

Service Id

Service Name

Carrier ID

Carrier Name

SWA-UK-PREM

Amazon Shipping One Day

AMZN_UK

Amazon Shipping

SWA-UK-2D

Amazon Shipping Two Day

AMZN_UK

Amazon Shipping

  • Marketplace IT (ON Amazon Labels) - Italy

Service Id

Service Name

Carrier ID

Carrier Name

prime-premium-it-mfn

Spedizione nazionale expressa

AMZN_IT

Amazon Shipping

  • Marketplace IT (OFF Amazon Labels/ Own Website) - Italy

Service Id

Service Name

Carrier ID

Carrier Name

SWA-IT-PRIME-PREM

Spedizione nazionale express

AMZN_IT

Amazon Shipping

  • Marketplace FR (ON Amazon Labels) - France

Service Id

Service Name

Carrier ID

Carrier Name

prime-premium-fr-mfn

Amazon Shipping One-Day Tracked

AMZN_FR

Amazon Shipping

  • Marketplace IN (OFF Amazon Labels/ Own Website)

Service Id

Service Name

Carrier ID

Carrier Name

SWA-IN-OA

Amazon Shipping Standard

ATS

Amazon Shipping

Our Sandbox environment is undergoing updates, Service Ids in sandbox environment may be different e.g. SWA-UK-PRIME-PREM and SWA-UK-ECON.

What is API throttling and how is it assigned to me?

  • Amazon Shipping limits the rate of API requests that a shipper/integrator can make to the API every second to keep the service stable for all the customers. This process is defined as API throttling. At the time of on-boarding, every client will be allocated 5 TPS (Transactions per second) as an initial limit. If the allocated rate limit is exceeded, then the API will temporarily respond to all requests with a HTTP 429 status code. Client’s access will automatically be reinstated in a few seconds after which they can retry any failed requests and continue to use the API as before.

How do I need to manage Transaction per Second (TPS) limit?

  • Post integration development, integrators have to provide the TPS details with which they need to call the API & they have to stick to this TPS limit. If these limits are exceeded, then it can result an error message saying "You exceeded your quota for the requested resource". In this case, shippers/integrators will have to limit their request rate or reach out to their account manager for updating/increasing limits.
    For additional details and best practices please check the Blog: Strategies to optimize rate limits for your application workloads

What are the list of of tracking status codes and eventCodes?

Tracking Statuses (Summary status)

  • PreTransit: package has been created but has not been picked up.
  • InTransit: package has been picked up and is in transit.
  • Delivered: package has been delivered successfully.
  • Lost: package is lost.
  • OutForDelivery: package is out for delivery.
  • Rejected: package has been rejected by the recipient.
  • Undeliverable: package was undeliverable.
  • DeliveryAttempted: delivery was attempted to the recipient location, but was not delivered.
  • PickupCancelled: indicate that pickup was canceled for the package.

Tracking Event Codes

  • ReadyForReceive: package has been created and is ready for pickup the shippers location. This is a pre-transit status event code.
  • PickupDone: package has been picked up by the carrier and is in transit within the carrier network.
  • Delivered: package has been delivered.
  • Departed: package has departed from a particular location in carrier network.
  • DeliveryAttempted: delivery was attempted but unsuccessful.
  • Lost: package is lost.
  • OutForDelivery: package is out for delivery.
  • ArrivedAtCarrierFacility: package is in transit and has been received at a carrier location.
  • Rejected: package was rejected by the recipient.
  • Undeliverable: package is undeliverable.
  • PickupCancelled: pickup scheduled for the package was canceled.

What should be the shipDate in the getRates request ?

  • Amazon Shipping calculates the Package pick-up and delivery dates based on two parameters: 1) Pick-up window configured within Amazon Shipping, 2) ShipDate parameter sent in API getRate request (considered in UTC).
    The shipDate is optional, if not passed the system calculate the pick-up/ delivery windows based on timestamp of the API request, else, if a parameter is passed in shipDate it overrides the API request timestamp and considers the Date and Timestamp from the API request.
    Note - Timestamp in ShipDate is considered in UTC.

Example: Pick-up window: 6:00PM - 7:00PM
Scenario 1- If shipDate: 2022-03-10T10:00:00Z is passed in API getRate request, Amazon will consider the next available pick-up window for planning. In this case for 1 day delivery: Pick-up date: 10th March and Delivery date: 11th March
Scenario 2- If shipDate: 2022-03-10T18:30:00Z is passed in API getRate request, Amazon will consider the next available pick-up window for planning. In this case the next available window will be on the 11th of March. For 1 day delivery: Pick-up date: 11th March and Delivery date: 12th March

If you are unsure, we recommend to not pass the shipDate in API request and let Amazon plan the pick-up and delivery promises accordingly. In case of future parcel pick-up, please use the shipDate parameter as it helps Amazon Shipping plan better.

How does the sample request and response look like for a 2DD request?

  • Below is an example of the sample request:
{
  "shipTo": {
    "name": "TEST",
    "addressLine1": "Stamford Bridge",
    "addressLine2": "SWA Test Account",
    "stateOrRegion": "London",
    "city": "London",
    "countryCode": "GB",
    "postalCode": "BB3 2EN",
    "email": "[email protected]",
    "phoneNumber": "0123456789"
  },
  "shipFrom": {
    "name": "2DD test",
    "addressLine1": "68 Mansel Rd",
    "addressLine2": "SWA Test Account",
    "stateOrRegion": "Birmingham",
    "city": "Birmingham",
    "countryCode": "GB",
    "email": "[email protected]",
    "postalCode": "B10 9LZ"
  },
  "packages": [
    {
      "dimensions": {
        "length": 131.00,
        "width": 33.00,
        "height": 21.50,
        "unit": "CENTIMETER"
      },
      "weight": {
        "unit": "KILOGRAM",
        "value": 13.00
      },
      "items": [
        {
          "quantity": 1,
          "itemIdentifier": "A91-062-1/1",
          "description": "Item Description",
          "isHazmat": false,
          "weight": {
            "unit": "KILOGRAM",
            "value": 13.00
          }
        }
      ],
      "insuredValue": {
        "unit": "GBP",
        "value": 100.00
      },
      "packageClientReferenceId": "REF12345"
    }
  ],
  "channelDetails": {
    "channelType": "EXTERNAL"
  }
}
  • Sample 2DD Response:
{
  "payload": {
    "requestToken": "amzn1.1db70dcc-d563-47cb-833b-4a874b12e01e",
    "rates": [
      {
        "rateId": "e1b7cf2d1516d8c5343a087e10a5a2261ff36b83bdb5a91c6ce51b19586ed9861507200580943",
        "carrierId": "AMZN_UK",
        "carrierName": "Amazon Shipping",
        "serviceId": "SWA-UK-PRIME-PREM",
        "serviceName": "Amazon Shipping One Day",
        "promise": {
          "pickupWindow": {
            "start": "2022-04-08T18:00:00Z",
            "end": "2022-04-08T19:00:00Z"
          },
          "deliveryWindow": {
            "start": "2022-04-09T20:00:00Z",
            "end": "2022-04-09T20:00:00Z"
          }
        },
        "supportedDocumentSpecifications": [
          {
            "format": "PNG",
            "size": {
              "width": 4.0,
              "length": 6.0,
              "unit": "INCH"
            },
            "printOptions": [
              {
                "supportedDPIs": [
                  300,
                  203
                ],
                "supportedPageLayouts": [
                  "DEFAULT"
                ],
                "supportedFileJoiningOptions": [
                  false
                ],
                "supportedDocumentDetails": [
                  {
                    "name": "LABEL",
                    "isMandatory": true
                  }
                ]
              }
            ]
          },
          {
            "format": "ZPL",
            "size": {
              "width": 4.0,
              "length": 6.0,
              "unit": "INCH"
            },
            "printOptions": [
              {
                "supportedDPIs": [
                  300,
                  203
                ],
                "supportedPageLayouts": [
                  "DEFAULT"
                ],
                "supportedFileJoiningOptions": [
                  false
                ],
                "supportedDocumentDetails": [
                  {
                    "name": "LABEL",
                    "isMandatory": true
                  }
                ]
              }
            ]
          },
          {
            "format": "PDF",
            "size": {
              "width": 4.0,
              "length": 6.0,
              "unit": "INCH"
            },
            "printOptions": [
              {
                "supportedDPIs": [
                  300,
                  203
                ],
                "supportedPageLayouts": [
                  "DEFAULT"
                ],
                "supportedFileJoiningOptions": [
                  false
                ],
                "supportedDocumentDetails": [
                  {
                    "name": "LABEL",
                    "isMandatory": true
                  }
                ]
              }
            ]
          }
        ],
        "availableValueAddedServiceGroups": [
          
        ],
        "totalCharge": {
          "unit": "GBP",
          "value": 4.76
        },
        "billedWeight": {
          "value": 1.0,
          "unit": "KILOGRAM"
        },
        "requiresAdditionalInputs": false
      },
      {
        "rateId": "dcaad3aa31791b900cdb3d32c5b4e37d13dd4e3a30e2a784977cc7fdedb717e41647870923840",
        "carrierId": "AMZN_UK",
        "carrierName": "Amazon Shipping",
        "serviceId": "SWA-UK-2D",
        "serviceName": "Amazon Shipping Two Day",
        "promise": {
          "pickupWindow": {
            "start": "2022-04-08T18:00:00Z",
            "end": "2022-04-08T19:00:00Z"
          },
          "deliveryWindow": {
            "start": "2022-04-10T20:00:00Z",
            "end": "2022-04-10T20:00:00Z"
          }
        },
        "supportedDocumentSpecifications": [
          {
            "format": "PNG",
            "size": {
              "width": 4.0,
              "length": 6.0,
              "unit": "INCH"
            },
            "printOptions": [
              {
                "supportedDPIs": [
                  300,
                  203
                ],
                "supportedPageLayouts": [
                  "DEFAULT"
                ],
                "supportedFileJoiningOptions": [
                  false
                ],
                "supportedDocumentDetails": [
                  {
                    "name": "LABEL",
                    "isMandatory": true
                  }
                ]
              }
            ]
          },
          {
            "format": "ZPL",
            "size": {
              "width": 4.0,
              "length": 6.0,
              "unit": "INCH"
            },
            "printOptions": [
              {
                "supportedDPIs": [
                  300,
                  203
                ],
                "supportedPageLayouts": [
                  "DEFAULT"
                ],
                "supportedFileJoiningOptions": [
                  false
                ],
                "supportedDocumentDetails": [
                  {
                    "name": "LABEL",
                    "isMandatory": true
                  }
                ]
              }
            ]
          },
          {
            "format": "PDF",
            "size": {
              "width": 4.0,
              "length": 6.0,
              "unit": "INCH"
            },
            "printOptions": [
              {
                "supportedDPIs": [
                  300,
                  203
                ],
                "supportedPageLayouts": [
                  "DEFAULT"
                ],
                "supportedFileJoiningOptions": [
                  false
                ],
                "supportedDocumentDetails": [
                  {
                    "name": "LABEL",
                    "isMandatory": true
                  }
                ]
              }
            ]
          }
        ],
        "availableValueAddedServiceGroups": [
          
        ],
        "totalCharge": {
          "unit": "GBP",
          "value": 3.72
        },
        "billedWeight": {
          "value": 1.0,
          "unit": "KILOGRAM"
        },
        "requiresAdditionalInputs": false
      }
    ],
    "ineligibleRates": null
  }
}

How does the sample request and response look like for ON Amazon request?

  • Below is the example of Sample getRatesV2 request for ON Amazon label
{
    "shipTo": {
        "name": "Chris",
        "addressLine1": "Redacted",
        "addressLine2": "Redacted",
        "addressLine3": "Redacted",
        "companyName": "",
        "stateOrRegion": "Redacted",
        "city": "Redacted",
        "countryCode": "GB",
        "postalCode": "Redacted"
    },
    "shipFrom": {
        "name": "Gary",
        "addressLine1": "Redacted",
        "addressLine2": "Redacted",
        "stateOrRegion": "Redacted",
        "city": "Redacted",
        "countryCode": "GB",
        "postalCode": "Redacted",
        "email": "[email protected]",
        "phoneNumber": "Redacted"
    },
    "packages": [
        {
            "dimensions": {
                "unit": "CENTIMETER",
                "length": 29.3,
                "width": 32.0,
                "height": 39.0
            },
            "weight": {
                "unit": "GRAM",
                "value": 3386.0
            },
            "insuredValue": {
                "value": 10.0,
                "unit": "GBP"
            },
            "isHazmat": false,
            "packageClientReferenceId": "432626-0", /*This can be Amazon Order ID or Shipper internal Order ID*/
            "items": [
                {
                    "itemValue": {
                        "value": 26.99,
                        "unit": "GBP"
                    },
                    "description": "Border Biscuits 100 Luxury Mini Packs with 5 Varieties",
                    "itemIdentifier": "60334228527867",     /*This is OrderItemID*/
                    "quantity": 1,
                    "weight": {
                        "unit": "GRAM",
                        "value": 3086.0
                    },
                    "isHazmat": false
                }
            ]
        }
    ],
    "channelDetails": {
        "channelType": "AMAZON",    /*Channel Type = AMAZON for ON AMAZON label request*/
        "amazonOrderDetails": {
            "orderId": "202-7179886-3817928"        /*orderID is the Amazon Order number*/
        }
    }
}
  • Below is the example of getRatesV2 response for ON Amazon label
{
    "payload": {
        "ineligibleRates": [
            {
                "carrierId": "HERMES_UK",
                "carrierName": "Hermes UK",
                "ineligibilityReasons": [
                    {
                        "code": "UNKNOWN",
                        "message": "It is not a premium offering"
                    },
                    {
                        "code": "UNKNOWN",
                        "message": "The ship method you selected for this order is not available because you have not accepted the carrier’s terms and conditions. To accept the carrier’s terms and conditions, please visit the Seller Central MWS API registration page at: https://sellercentral.amazon.com/orders-st/terms-and-conditions"
                    }
                ],
                "serviceId": "HERMES_UK_MFN_TWODAY_DROPOFF",
                "serviceName": "Hermes Two Day - Drop Off"
            },
            {
                "carrierId": "ROYAL_MAIL",
                "carrierName": "Royal Mail",
                "ineligibilityReasons": [
                    {
                        "code": "UNKNOWN",
                        "message": "It is not a premium offering"
                    }
                ],
                "serviceId": "ROYAL_MFN_TRACKED_48",
                "serviceName": "Royal Mail Tracked 48"
            },
            {
                "carrierId": "AMZN_UK",
                "carrierName": "Amazon Shipping",
                "ineligibilityReasons": [
                    {
                        "code": "UNKNOWN",
                        "message": "It is not a premium offering"
                    }
                ],
                "serviceId": "econ3-uk-mfn",
                "serviceName": "Amazon Shipping Standard Tracked"
            },
            {
                "carrierId": "DPD_UK",
                "carrierName": "DPD UK",
                "ineligibilityReasons": [
                    {
                        "code": "UNKNOWN",
                        "message": "Does Not Meet Promised Delivery Date"
                    },
                    {
                        "code": "UNKNOWN",
                        "message": "The ship method you selected for this order is not available because you have not accepted the carrier’s terms and conditions. To accept the carrier’s terms and conditions, please visit the Seller Central MWS API registration page at: https://sellercentral.amazon.com/orders-st/terms-and-conditions"
                    }
                ],
                "serviceId": "DPD_UK_MFN_PARCEL_SAT",
                "serviceName": "Parcel Saturday"
            },
            {
                "carrierId": "HERMES_UK",
                "carrierName": "Hermes UK",
                "ineligibilityReasons": [
                    {
                        "code": "UNKNOWN",
                        "message": "Does Not Meet Promised Delivery Date"
                    },
                    {
                        "code": "UNKNOWN",
                        "message": "The ship method you selected for this order is not available because you have not accepted the carrier’s terms and conditions. To accept the carrier’s terms and conditions, please visit the Seller Central MWS API registration page at: https://sellercentral.amazon.com/orders-st/terms-and-conditions"
                    }
                ],
                "serviceId": "HERMES_UK_MFN_STANDARD_DROPOFF",
                "serviceName": "Hermes Standard - Drop Off"
            },
            {
                "carrierId": "AMZN_UK",
                "carrierName": "Amazon Shipping",
                "ineligibilityReasons": [
                    {
                        "code": "UNKNOWN",
                        "message": "Does Not Meet Promised Delivery Date"
                    }
                ],
                "serviceId": "std-uk-mfn",
                "serviceName": null
            },
            {
                "carrierId": "DPD_UK",
                "carrierName": "DPD UK",
                "ineligibilityReasons": [
                    {
                        "code": "UNKNOWN",
                        "message": "The ship method you selected for this order is not available because you have not accepted the carrier’s terms and conditions. To accept the carrier’s terms and conditions, please visit the Seller Central MWS API registration page at: https://sellercentral.amazon.com/orders-st/terms-and-conditions"
                    }
                ],
                "serviceId": "DPD_UK_MFN_PARCEL",
                "serviceName": "Parcel Next Day"
            }
        ],
        "rates": [
            {
                "availableValueAddedServiceGroups": [
                    {
                        "groupDescription": "Confirmation",
                        "groupId": "VAS_GROUP_ID_CONFIRMATION",
                        "isRequired": true,
                        "valueAddedServices": [
                            {
                                "cost": {
                                    "unit": "GBP",
                                    "value": 0.3
                                },
                                "id": "SIGNATURE_CONFIRMATION",
                                "name": "Signature confirmation"
                            },
                            {
                                "cost": {
                                    "unit": "GBP",
                                    "value": 0.0
                                },
                                "id": "DELIVERY_CONFIRMATION",
                                "name": "Delivery confirmation"
                            }
                        ]
                    },
                    {
                        "groupDescription": "Pickup",
                        "groupId": "VAS_GROUP_ID_PICKUP",
                        "isRequired": true,
                        "valueAddedServices": [
                            {
                                "cost": {
                                    "unit": "GBP",
                                    "value": 0.0
                                },
                                "id": "CARRIER_PICKUP_CHARGE",
                                "name": "Carrier Pickup"
                            }
                        ]
                    }
                ],
                "billedWeight": null,
                "carrierId": "ROYAL_MAIL",
                "carrierName": "Royal Mail",
                "promise": {
                    "deliveryWindow": {
                        "end": "2022-04-28T22:59:59Z",
                        "start": "2022-04-28T22:59:59Z"
                    },
                    "pickupWindow": {
                        "end": null,
                        "start": null
                    }
                },
                "rateId": "70aeaea6-d904-43ab-b9b6-2520097a64a2",
                "requiresAdditionalInputs": false,
                "serviceId": "ROYAL_MFN_TRACKED_24",
                "serviceName": "Royal Mail Tracked 24",
                "supportedDocumentSpecifications": [
                    {
                        "format": "ZPL",
                        "printOptions": [
                            {
                                "supportedDPIs": [
                                    300
                                ],
                                "supportedDocumentDetails": [
                                    {
                                        "isMandatory": true,
                                        "name": "LABEL"
                                    }
                                ],
                                "supportedFileJoiningOptions": [
                                    true
                                ],
                                "supportedPageLayouts": [
                                    "LEFT"
                                ]
                            }
                        ],
                        "size": {
                            "length": 6.0,
                            "unit": "INCH",
                            "width": 4.0
                        }
                    },
                    {
                        "format": "PNG",
                        "printOptions": [
                            {
                                "supportedDPIs": [],
                                "supportedDocumentDetails": [
                                    {
                                        "isMandatory": true,
                                        "name": "LABEL"
                                    }
                                ],
                                "supportedFileJoiningOptions": [
                                    true
                                ],
                                "supportedPageLayouts": [
                                    "LEFT"
                                ]
                            }
                        ],
                        "size": {
                            "length": 6.0,
                            "unit": "INCH",
                            "width": 4.0
                        }
                    }
                ],
                "totalCharge": {
                    "unit": "GBP",
                    "value": 10.77
                }
            },
            {
                "availableValueAddedServiceGroups": [
                    {
                        "groupDescription": "Pickup",
                        "groupId": "VAS_GROUP_ID_PICKUP",
                        "isRequired": true,
                        "valueAddedServices": [
                            {
                                "cost": {
                                    "unit": "GBP",
                                    "value": 0.0
                                },
                                "id": "CARRIER_PICKUP_CHARGE",
                                "name": "Carrier Pickup"
                            }
                        ]
                    }
                ],
                "billedWeight": null,
                "carrierId": "AMZN_UK",
                "carrierName": "Amazon Shipping",
                "promise": {
                    "deliveryWindow": {
                        "end": "2022-04-28T19:00:00Z",
                        "start": "2022-04-28T19:00:00Z"
                    },
                    "pickupWindow": {
                        "end": "2022-04-27T16:00:00Z",
                        "start": "2022-04-27T15:00:00Z"
                    }
                },
                "rateId": "708ac4e1-0d43-4b12-82af-75fdb5205dc8",
                "requiresAdditionalInputs": false,
                "serviceId": "prime-premium-uk-mfn",
                "serviceName": "Amazon Shipping One-Day Tracked",
                "supportedDocumentSpecifications": [
                    {
                        "format": "ZPL",
                        "printOptions": [
                            {
                                "supportedDPIs": [
                                    300
                                ],
                                "supportedDocumentDetails": [
                                    {
                                        "isMandatory": true,
                                        "name": "LABEL"
                                    }
                                ],
                                "supportedFileJoiningOptions": [
                                    true
                                ],
                                "supportedPageLayouts": [
                                    "LEFT"
                                ]
                            }
                        ],
                        "size": {
                            "length": 6.0,
                            "unit": "INCH",
                            "width": 4.0
                        }
                    },
                    {
                        "format": "PNG",
                        "printOptions": [
                            {
                                "supportedDPIs": [],
                                "supportedDocumentDetails": [
                                    {
                                        "isMandatory": true,
                                        "name": "LABEL"
                                    }
                                ],
                                "supportedFileJoiningOptions": [
                                    true
                                ],
                                "supportedPageLayouts": [
                                    "LEFT"
                                ]
                            }
                        ],
                        "size": {
                            "length": 6.0,
                            "unit": "INCH",
                            "width": 4.0
                        }
                    }
                ],
                "totalCharge": {
                    "unit": "GBP",
                    "value": 3.34
                }
            }
        ],
        "requestToken": "amzn1.rq.c7xxxx28-a634-45da-80d7-73e5xxx440e0.101"
    }
}

How should the purchaseShipment request be created from getRates response for ON Amazon request?

  • Below you can find a snippet of getRates response and example of building the purchaseShipment request.
11241124

Did this page help you?