Amazon Services
Amazon Marketplace Web Service (Amazon MWS) Documentation
Amazon MWS Documentation

CreateShipment

Description

The CreateShipment operation purchases shipping and returns PDF, PNG, or ZPL document data for a shipping label, depending on the carrier. Amazon compresses the document data before returning it as a Base64-encoded string. For information about extracting document data from a compressed file, see How to extract a shipping label file. The CreateShipment operation also returns a Base64-encoded MD5 hash to validate the document data. For definitions, see Terminology. For more information, see How to fulfill Seller Fulfilled Prime orders.

Important:
  • The CreateShipment operation returns a ShipmentId value. Be sure to store this value for future use, as it is a required request parameter for the GetShipment and CancelShipment operations.
  • Do not resize or edit the contents of the shipping labels returned by this operation. Carriers might not be able to successfully scan a modified label.

Availability

This operation is only available in the Mexico, US, Germany, and UK 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
ShipmentRequestDetails Shipment information required for creating a shipment. Yes Type: ShipmentRequestDetails
ShippingServiceId An Amazon-defined shipping service identifier. For definitions, see Terminology.

Get the ShippingServiceId value from a previous call to the GetEligibleShippingServices operation.

Yes Type: xs:string
ShippingServiceOfferId An Amazon-defined shipping service offer identifier. For definitions, see Terminology.

Get the ShippingServiceOfferId value from a previous call to the GetEligibleShippingServices operation.

No Type: xs:string
HazmatType Hazardous materials options for a package.

Consult the terms and conditions for each carrier for more information about hazardous materials.

No Type: HazmatType

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=CreateShipment
  &SellerId=A09087172RPFTMV0PGAN2
  &SignatureVersion=2
  &Timestamp=2015-09-23T20%3A10%3A56Z
  &Version=2015-06-01
  &Signature=9jIwZLpoKQWja2BlY8TVWHN17UN2x7VIA%2FHib4U4QLA%3D
  &SignatureMethod=HmacSHA256
  &HazmatType=None
  &ShippingServiceId=FEDEX_PTP_PRIORITY_OVERNIGHT
  &ShipmentRequestDetails.AmazonOrderId=903-1713775-3598252
  &ShipmentRequestDetails.LabelCustomization.CustomTextForLabel=ABC123
  &ShipmentRequestDetails.LabelCustomization.StandardIdForLabel=AmazonOrderId
  &ShipmentRequestDetails.MustArriveByDate=2015-09-25T07%3A00%3A00Z
  &ShipmentRequestDetails.PackageDimensions.Length=5
  &ShipmentRequestDetails.PackageDimensions.Width=5
  &ShipmentRequestDetails.PackageDimensions.Height=5
  &ShipmentRequestDetails.PackageDimensions.Unit=inches
  &ShipmentRequestDetails.Weight.Value=10
  &ShipmentRequestDetails.Weight.Unit=ounces
  &ShipmentRequestDetails.ShipDate=2015-09-23T20%3A10%3A56.829Z
  &ShipmentRequestDetails.ShipFromAddress.Name=John%20Doe
  &ShipmentRequestDetails.ShipFromAddress.AddressLine1=1234%20Westlake%20Ave
  &ShipmentRequestDetails.ShipFromAddress.City=Seattle
  &ShipmentRequestDetails.ShipFromAddress.StateOrProvinceCode=WA
  &ShipmentRequestDetails.ShipFromAddress.PostalCode=98121
  &ShipmentRequestDetails.ShipFromAddress.CountryCode=US
  &ShipmentRequestDetails.ShipFromAddress.Email=example%40example.com
  &ShipmentRequestDetails.ShipFromAddress.Phone=2061234567
  &ShipmentRequestDetails.ShippingServiceOptions.DeliveryExperience=DeliveryConfirmationWithoutSignature
  &ShipmentRequestDetails.ShippingServiceOptions.CarrierWillPickUp=false
  &ShipmentRequestDetails.ShippingServiceOptions.DeclaredValue.CurrencyCode=USD
  &ShipmentRequestDetails.ShippingServiceOptions.DeclaredValue.Amount=10.00
  &ShipmentRequestDetails.ShippingServiceOptions.LabelFormat=ZPL203
  &ShipmentRequestDetails.ItemList.Item.1.OrderItemId=40525960574974
  &ShipmentRequestDetails.ItemList.Item.1.Quantity=2
  &ShipmentRequestDetails.ItemList.Item.1.TransparencyCodeList.TransparencyCode.1=AZ:QFUL6MXBXE3A2EBC0
  &ShipmentRequestDetails.ItemList.Item.1.TransparencyCodeList.TransparencyCode.2=ZA:QFUL6MXBXE3A2EBC0

↑ Top

Example response

For information about standard response formatting, see Response format.

Show example code Hide example code

<?xml version="1.0"?>
<CreateShipmentResponse xmlns="https://mws.amazonservices.com
    /MerchantFulfillment/2015-06-01">
    <CreateShipmentResult>
        <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>
                <CustomTextForLabel>ABC123</CustomTextForLabel>
                <LabelFormat>ZPL203</LabelFormat>
                <FileContents>
                    <Checksum>DmsWbJpdMPALN3jV4wHOrg==</Checksum>
                    <Contents>H4sIAAAAAAAAAK16WbeqyrLmO2Pc/zBVRLG...
                        ...kI0Ycv76w378UfL6O6ev7UsAwmkWBfL6nycD/Bd+Zx3S8LwAA</Contents>
                    <FileType>application/zpl</FileType>
                    <LabelFormat>ZPL203</LabelFormat>
                </FileContents>
                <Dimensions>
                    <Width>8.50000</Width>
                    <Length>11.00000</Length>
                    <Unit>inches</Unit>
                </Dimensions>
                <StandardIdForLabel>AmazonOrderId</StandardIdForLabel>
            </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>
    </CreateShipmentResult>
    <ResponseMetadata>
        <RequestId>adb18f0d-2076-48d4-99ef-fb4b9f892a4e</RequestId>
    </ResponseMetadata>
</CreateShipmentResponse>

↑ Top