Tutorial: Cancel a Shipment

How to cancel a previously created shipment.

API Version: v2

This tutorial shows how to cancel a previously created shipment. The cancelShipment operation cancels a shipment that has not been picked up for delivery. If the shipment has already been picked up, you cannot cancel it.

Note: Carrier cancellation windows vary. Please refer to Seller Central help for carrier-specific cancellation/refund windows.

Note: The cancelShipment operation is not available for Direct Fulfillment shipments.

Prerequisites

To complete this tutorial, you will need:

  • Enrollment in an eligible program.
  • A selling-partner account if you are an Amazon seller or are working with an Amazon seller to create and manage shipments.
  • Authorization from the selling-partner for whom you are making calls. Refer to Authorizing Selling Partner API applications for more information.

Step 1. Cancel a shipment

To cancel a previously created shipment, call the cancelShipment operation for a shipment, passing the following parameter:

Request path parameters

Name Description Required
shipmentID The shipment identifier originally returned by the purchaseShipment operation.

Type: string

Yes

Request header parameters

Name Description Required
x-amzn-shipping-business-id Amazon shipping business to assume for this request. The default is AmazonShipping_UK.

Type: enum (X-amzn-shipping-business-id)

Yes
x-amzn-access-token Amazon shipping request token Yes

Response

A successful response includes an empty 200 payload object.

Sample API Request

PUT https://sellingpartnerapi-eu.amazon.com/shipping/v2/shipments/amzn1.sid.87906797587784.100/cancel
x-amzn-shipping-business-id: [x-amzn-shipping-business-id](https://developer-docs.amazon.com/amazon-shipping/docs/frequently-asked-questions#which-x-amzn-shipping-business-id-to-use-as-request-header-while-calling-shipping-v2-api)
x-amz-access-token: Atza|IwEBIGorlXXX

API Response example

{
  "payload": {}
}