Delivery (Order-Based)

Overview

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 3 in the Order - Shipment - Deliver sequence for Order-Based Delivery.

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 given 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/PSID-12345 \
  --header 'accept: application/json' \
  --header $AUTHSTRING \
  --header 'content-type: application/json' \
  --data '{"deliveredDateTime":"2020-03-30T05:03+0000"}'

This example shows the delivery response:

{
  "carrierName": "ups",
  "carrierTrackingId": "1ZHHDHKAHB01271929",
  "customerCountryCode":"US",
  "customerPostalCode":"98101",
  "orderedDateTime": "2020-03-27T22:14+0000",
  "orderItemQuantities": [
    { "productId": "9780345028853",
      "deliveryEstimateId": "1d02bca8-2008-4f79-9203-48acaf3cad54",
      "shipiumOrderId": "4dc43fff-c3af-4d7b-8a18-e01f2b4cb312",
      "quantity": 1
    },
    { "productId": "9780374533557",
      "deliveryEstimateId": "a6aae036-c7c2-40d7-b15d-f50c7d7e7950",
      "shipiumOrderId": "4dc43fff-c3af-4d7b-8a18-e01f2b4cb312",
      "quantity": 1
    }
  ],
  "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.


Did this page help you?