Delivery (Estimate-Based)

Overview: the Shipment Update call

Use the Shipment Update API - /deliveryexperience/shipment - to report when a Partner's ship carrier has delivered a given product, referencing a prior shipment, either using the shipiumShipmentId or partnerShipmentId (if previously provided).

This is stage 4 in the Product View - Order - Shipment - Deliver sequence for Estimate-Based Delivery.

Note: All information remains unchanged other than the addition of a delivery update, so this is a PUT to add a deliveredDateTime to your existing Shipment document.

API call and response examples are shown below.

πŸ“˜

Authentication for API calls

In the cURL examples on this page, the environment variable AUTHSTRING is used to handle authorization. The recipe below shows how to set it correctly for both API Key and OAuth users.

Shipment Update API

This example shows a Shipment Update cURL request:

curl --request PATCH \
  --url <<api_url>>/api/v1/deliveryexperience/shipment/88637117-f0c5-45b8-8c11-c75dfa22a4cc \
  --header 'accept: application/json' \
  --header $AUTHSTRING \
  --header 'content-type: application/json' \
  --data '{"deliveredDateTime":"2020-03-30T05:03+0000"}'

This example shows the response:

{
  "carrierName": "ups",
  "carrierTrackingId": "1ZMXAT47SV89519814",
  "customerCountryCode":"US",
  "customerPostalCode":"98101",
  "orderedDateTime": "2020-03-27T22:14+0000",
  "orderItemQuantities": [
    {
      "productId": "9780345028853",
      "deliveryEstimateId": "1d02bca8-2008-4f79-9203-48acaf3cad54",
      "quantity": 1
    },
    {
      "productId": "9780374533557",
      "deliveryEstimateId": "a6aae036-c7c2-40d7-b15d-f50c7d7e7950",
      "quantity": 1
    }
  ],
  "shipiumShipmentId": "101f74dd-5aa9-4a9b-9f2e-a2cd9c0fc360",
  "partnerShipmentId": "88637117-f0c5-45b8-8c11-c75dfa22a4cc"
  "shippedDateTime": "2020-03-29T22:59+0000",
  "deliveredDateTime":"2020-03-30T05:03+0000",
  "shipFromAddress": {
      "addressType": "commercial",
      "city": "Albuquerque",
      "company": "ACME",
      "countryCode": "US",
      "name": "L. Merfudd",
      "postalCode": "87121",
      "state": "NM",
      "street1": "123 Main St.",
      "street2": "Suite 42"
  }
}

Reading shipment delivery information

This is actually identical to the read for Shipment (Delivery Estimate-Based). If a shipment has had a delivery PUT for it, then it will have been updated with the latest tracking information available when you GET the latest version of the object.

curl --request GET \
  --url <<api_url>>/api/v1/deliveryexperience/shipment/PSID-12345 \
  --header 'accept: application/json' \
  --header $AUTHSTRING

πŸ“˜

More information on the API responses

As with all Shipium API responses, this API follows the API Response Codes standards unless otherwise specified.