Amazon Services
Amazon Marketplace Web Service (Amazon MWS) Documentation

Deprecation Notice:

Amazon Marketplace Web Service (MWS) will no longer be available after March 31, 2024. All MWS developers must migrate to Selling Partner API (SP-API) to avoid service disruptions. Refer to the Migration Hub for more information.

Amazon MWS Documentation

CancelShipment

Cancels an existing shipment.

Description

The CancelShipment operation cancels an existing shipment and requests a refund for the ShipmentId value that you specify. Get the ShipmentId value from a previous call to the CreateShipment operation.

Canceling a shipment only succeeds if the cancellation window has not expired and if the shipment has not previously been canceled. Cancellation policies vary by carrier. For more information about carrier cancellation policies, see the Seller Central Help. For more information, see How to fulfill Seller Fulfilled Prime orders.

Creating new shipments after canceling

These are conditions where you can create new shipments after canceling existing shipments:
  • If only a single shipment was created to fulfill an order, you can cancel the shipment and then create a new shipment for that order using the CancelShipment operation.
  • If multiple shipments were created to fulfill an order, you can cancel the shipments, but cannot create new shipments using the Merchant Fulfillment service. You will need to either create new shipments in Seller Central or arrange for shipping by contacting a carrier directly.

Availability

This operation is only available in the Canada, US, Mexico, Spain, UK, France, Germany, Italy, and India marketplaces.

Throttling

This operation has a maximum request quota of 10 and a restore rate of five requests every second. For definitions of throttling terminology and for a complete explanation of throttling, see Throttling: Limits to how often you can submit requests in the Amazon MWS Developer Guide.

Request parameters

Name Description Required Values
ShipmentId An Amazon-defined shipment identifier.

Get the ShipmentId value from a previous call to the CreateShipment operation.

Yes Type: xs:string

Response elements

Name Description
Shipment The details of a shipment, including the shipment status.
Note: Calls to the CreateShipment, GetShipment, and CancelShipment operations return empty Phone and Email elements in the ShipToAddress response element.
Type: Shipment

Examples

Example query request

For information about standard request requirements, see Required request parameters.

Show example code Hide example code

https://mws.amazonservices.com/MerchantFulfillment/2015-06-01
  &Action=CancelShipment
  &SellerId=A09087172RPFTMV0PGAN2
  &SignatureVersion=2
  &Timestamp=2015-09-23T20%3A35%3A05Z
  &Version=2015-06-01
  &Signature=HHLRMvGAu0ANINFbjPE7nvEH6IGK%2FxPsLGayAg2WekE%3D
  &SignatureMethod=HmacSHA256
  &ShipmentId=6f77095e-9f75-47eb-aaab-a42d5428fa1a

↑ Top

Example response

For information about standard response formatting, see Response format.

Show example code Hide example code

<?xml version="1.0"?>
<CancelShipmentResponse xmlns="https://mws.amazonservices.com
/MerchantFulfillment/2015-06-01">
  <CancelShipmentResult>
    <Shipment>
      <Insurance>
        <CurrencyCode>USD</CurrencyCode>
        <Amount>10.00</Amount>
      </Insurance>
      <ShipToAddress>
        <City>Seattle</City>
        <Phone/>
        <CountryCode>US</CountryCode>
        <PostalCode>98121-2778</PostalCode>
        <Name>Jane Smith</Name>
        <AddressLine1>321 Main St</AddressLine1>
        <StateOrProvinceCode>WA</StateOrProvinceCode>
        <Email/>
      </ShipToAddress>
      <AmazonOrderId>903-1713775-3598252</AmazonOrderId>
      <Weight>
        <Value>10</Value>
        <Unit>oz</Unit>
      </Weight>
      <Label>
        <FileContents>
          <Checksum>DmsWbJpdMPALN3jV4wHOrg==</Checksum>
          <Contents>H4sIAAAAAAAAAK16WbeqyrLmO2Pc/zBVRLG...
...kI0Ycv76w378UfL6O6ev7UsAwmkWBfL6nycD/Bd+Zx3S8LwAA</Contents>
          <FileType>application/pdf</FileType>
        </FileContents>
        <Dimensions>
          <Width>8.50000</Width>
          <Length>11.00000</Length>
          <Unit>inches</Unit>
        </Dimensions>
      </Label>
      <ShippingService>
        <CarrierName>FEDEX</CarrierName>
        <ShippingServiceOptions>
          <CarrierWillPickUp>false</CarrierWillPickUp>
          <DeclaredValue>
            <CurrencyCode>USD</CurrencyCode>
            <Amount>10.00</Amount>
          </DeclaredValue>
          <DeliveryExperience>DELIVERY_CONFIRMATION
          </DeliveryExperience>
        </ShippingServiceOptions>
        <ShippingServiceId>FEDEX_PTP_PRIORITY_OVERNIGHT
        </ShippingServiceId>
        <Rate>
          <CurrencyCode>USD</CurrencyCode>
          <Amount>27.81</Amount>
        </Rate>
        <LatestEstimatedDeliveryDate>2015-09-24T10:30:00Z
        </LatestEstimatedDeliveryDate>
        <EarliestEstimatedDeliveryDate>2015-09-24T10:30:00Z
        </EarliestEstimatedDeliveryDate>
        <ShippingServiceOfferId>HDDUKqtQVFetpBZAqx5c1yaCZ9vuFfND0kudyw3lLWCa
3mN2+zUOsRCAZS2oYt0ey6fXKdOAucmYVXR9LAkU9O9eys9V3FJCgvQ+vAqm4bSAzHVH04vD8oLy
oUPKqxa8Otbek97Z85LFUSsfcUf8frNRMEfNLP8t5RyLXa4ZOjc=</ShippingServiceOfferId>
        <ShipDate>2015-09-23T20:10:56.829Z</ShipDate>
        <ShippingServiceName>FedEx Priority Overnight®</ShippingServiceName>
      </ShippingService>
      <PackageDimensions>
        <Width>5</Width>
        <Length>5</Length>
        <Unit>inches</Unit>
        <Height>5</Height>
      </PackageDimensions>
      <CreatedDate>2015-09-23T20:11:12.908Z</CreatedDate>
      <ShipFromAddress>
        <City>Seattle</City>
        <Phone>2061234567</Phone>
        <CountryCode>US</CountryCode>
        <PostalCode>98121</PostalCode>
        <Name>John Doe</Name>
        <AddressLine1>1234 Westlake Ave</AddressLine1>
        <StateOrProvinceCode>WA</StateOrProvinceCode>
      </ShipFromAddress>
      <ShipmentId>6f77095e-9f75-47eb-aaab-a42d5428fa1a</ShipmentId>
      <ItemList>
        <Item>
          <OrderItemId>40525960574974</OrderItemId>
          <Quantity>1</Quantity>
        </Item>
      </ItemList>
      <Status>Purchased</Status>
      <TrackingId>794657111237</TrackingId>
    </Shipment>
  </CancelShipmentResult>
  <ResponseMetadata>
    <RequestId>adb18f0d-2076-48d4-99ef-fb4b9f892a4e</RequestId>
  </ResponseMetadata>
</CancelShipmentResponse>

↑ Top