Shipments

The basic JSON order structure is shown below

{
     "shipmentIndex" : 0,
     "sourceOrderId" : "...",
     "items" : [ ],
     "shipTo": { },
     "returnAddress": { },
     "carrier": { }
}

Shipments are created by the API during the initial order submission.

The key objects in the order data structure include:

Object Description
shipmentIndex The index of the shipment within the submitted order
sourceOrderId Contains the source order reference ID
items An array of the items objects contained within the shipment.
shipTo The address to send the shipment to
returnAddress The address to return the shipment to if delivery failed
carrier The carrier service and code to use for the delivery

Update

This endpoint allows you to amend the shipTo address on a shipment.

HTTP Request

PUT /api/shipment/<sourceOrderId>/<shipmentIndex>/shipping

Request Body

{
     "shipTo": {
          "name":           "Peter Pan",
          "companyName":    "Disney Corporation",
          "address1":       "17 Disney Way",
          "address2":       "",
          "address3":       "",
          "town":           "Los Angeles",
          "postcode":       "34757",
          "state":          "California",
          "isoCountry":     "US",
          "email":          "peter@disney.com",
          "phone":          "+12345678910"
     },
     "carrier": {
          "code": "",
          "service": ""
     },
     "trackingNumber": "12345678"
}

HTTP Response

If the update was successful, the updated shipment will be returned.

URL Parameters

Parameter Description
sourceOrderId The source order ID, specified when the order was submitted
shipmentIndex The index of the shipment, as specified when submitting the order