Add AmazonOrderID To Shipping Labels
We need the AmazonOrderID to print on shipping labels. Below is how to do it. This is for use when the shipping label is created using the Amazon Buy Shipping API.
If you’re using Amazon Buy Shipping via the Merchant Fulfillment API (SP-API) you can ask Amazon to print the Amazon order ID on the label by using the LabelCustomization object and setting StandardIdForLabel to "AmazonOrderId". It only shows up on ZPL203 labels and not all carriers honor it.
How to do it
-
When you call
createShipment(Merchant Fulfillment v0), include aLabelCustomizationblock. -
Request ZPL203 as your label format.
-
(Optional) You can also set
CustomTextForLabelfor a short extra string, but this is ZPL-only and some carriers ignore it.
Example request body fragment
{
"ShipmentRequestDetails": {
"AmazonOrderId": "XXX-XXXXXXX-XXXXXXX",
"ItemList": [ /* … */ ],
"ShipFromAddress": { /* … */ },
"PackageDimensions": { /* … */ },
"Weight": { /* … */ },
"ShippingServiceOptions": { /* … */ },
"LabelCustomization": {
"StandardIdForLabel": "AmazonOrderId",
"CustomTextForLabel": "BIN A3" // optional, ZPL only
}
},
"ShippingServiceId": "…",
"ShippingServiceOfferId": "…"
}Please sign in to leave a comment.
Comments
0 comments