Process a Shipment
Learn how to process a shipment
Learn how to process a shipment.
Important
Before you process the shipment, you must retrieve the shipment using the
getShipmentsorgetShipmentoperation.
Prerequisites
To complete this tutorial, you need:
- Authorization from the selling partner for whom you are making calls. For more information, refer to Authorizing Selling Partner API applications.
- The shipment ID of the shipment you want to process.
- Approval for the Direct-to-Consumer Shipping (Restricted) role in your developer profile.
- The Direct-to-Consumer Shipping (Restricted) role selected in the App registration page for your application.
Overview
The workflow for processing a shipment is as follows:
processShipment to acknowledge or cancel the shipmentcreatePackages to create packages for the shipmentretrieveShippingOptions to get shipping optionsupdatePackage ↩ Step 3generateInvoice to generate and retrieve the shipment's invoice. Not applicable to Easy Ship, except in the India marketplaceupdatePackage ↩ Step 3generateShipLabels to generate shipping labelsretrieveInvoiceupdatePackage ↩ Step 3updatePackageStatus to mark the shipment as SHIPPED (optional for Seller Flex and Easy Ship), OUT_FOR_DELIVERY, or DELIVERED (for the Self Delivery program)Step 1. Acknowledge the shipment
Call the processShipment operation with the shipmentId of the shipment you want to process. Set the operation query parameter to CONFIRM to confirm the shipment.
Step 2. Create packages for the shipment
Call the createPackages operation with the shipmentId of the shipment you want to process and the list of packages in the shipment.
Step 3. Get shipping options for the shipment
Call the retrieveShippingOptions operation with the shipmentId of the shipment and packageId of the package to receive a list of shipping options for the package for the seller to choose. The response to this operation is null for the Seller Flex channel.
Step 4. Generate the shipment's invoice
Call the generateInvoice operation to generate the invoice for the shipment. This operation returns as encoded Base64 text that you can decode and convert to PDF to print.
This operation is not supported for the Easy Ship channel, except in the India marketplace.
Step 5. Generate shipping labels
Call the generateShipLabels operation with the operation query parameter set to GENERATE to generate shipping labels for the shipment. To retrieve the same shipping labels again, call generateShipLabels again and set operation to GENERATE.
The following are the supported label formats:
- Seller Flex: Either PNG/ZPL (Single Piece Shipments) or Only ZPL (Multi Piece Shipments)
- Easy Ship: Only PNG
- Self Ship: Only PNG
Note
Ensure that you URL-encode
shippingOptionsIdbefore you pass it to thegenerateShipLabelsoperation.
Optionally, call retrieveInvoice. This optional step is not applicable to Easy Ship, except in the India marketplace.
Update the package [optional]
If you need to update package information after you call createPackages, call the updatePackage operation with the shipmentId and packageId of the package, and supply updated package information in the body of the request.
Step 6. Update the package status (not required for Seller Flex and Easy Ship programs World Wide)
Call the updatePackageStatus operation and set the status, subStatus, and reason values to the appropriate value in the following table.
| S. No. | status | subStatus | reason | State |
|---|---|---|---|---|
| 1 | SHIPPED | OUT_FOR_DELIVERY | OutForDelivery | Non terminal |
| 2 | DELIVERED | DELIVERED | DeliveredToCustomer | Terminal |
| 3 | DELIVERED | DELIVERED | DeliveredToHouseholdMember | Terminal |
| 4 | DELIVERED | DELIVERED | DeliveredToReception | Terminal |
| 5 | DELIVERED | DELIVERED | DeliveredToSecurityGuard | Terminal |
| 6 | SHIPPED | NOT_DELIVERED | CustomerNotAvailable | Non terminal |
| 7 | SHIPPED | NOT_DELIVERED | MissedDelivery | Non terminal |
| 8 | SHIPPED | NOT_DELIVERED | CustomerContactIssue | Non terminal |
| 9 | SHIPPED | UNDELIVERABLE | RejectedByCustomer | Terminal |
| 10 | SHIPPED | UNDELIVERABLE | RejectedOrderDamaged | Terminal |
Note
This step is not required for the Seller Flex and Easy Ship programs worldwide. Amazon automatically updates the status to
SHIPPEDandDELIVEREDbased on the logistics updates during pickup and delivery. If the selling partner also marks the order as shipped, they receive a duplicate request exception if the order was already scanned by the delivery associate.For the Self Delivery Program, you must mark the order as
OUT_FOR_DELIVERYandDELIVEREDon the same calendar day. If the delivery is attempted on any other day, mark it asOUT_FOR_DELIVERYagain.
Updated about 2 hours ago
