Delivery Promise API

Retrieve estimated delivery dates with Shipium's Delivery Promise API.

Get started

To use the Delivery Promise API, you must first configure your account. Guidance can be found in the Delivery Promise documentation. This document provides instructions for using the API.

Retrieve an estimated delivery date (EDD) with the Delivery Promise API

The Shipium Delivery Promise API is designed to be flexible to fit your organization’s business strategy and technical capabilities. All API calls assume you're using one of the authentication mechanisms detailed in our authentication documentation. The endpoint for all Delivery Promise API calls is included in the table below.

API typeAPI endpoint
POSThttps://api.shipium.com/api/v1/deliveryexperience/productview

📘

Authentication for API Calls

In the cURL example 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.

The following table provides all required and optional fields for calling the Delivery Promise API. You can find additional support in the Delivery Promise API Reference.

Request fieldRequired/OptionalField propertiesDescription
customerCountryCodeRequiredString enumeration
Limited to 2 characters and ISO 3166 standards
Shipment’s destination country
customerPostalCodeRequiredString
Limited to valid USPS postal ZIP codes
Shipment's destination postal code
requestDateOverrideOptionalString enumeration
Limited to the ISO-8601 standard
Ex: 2019-10-31T00:00:00Z
Dictate the base calculation of when the request happened. This field allows you to specify the request as though it had happened on a different date and/or time.
shippingOriginOptionalString enumeration
Limited to the Shipium-generated originID value for the particular origin
Dictate the origin that will fulfill the shipment by using the originID.
shipDateOverrideOptionalstring
Either the ISO-8601 standard date or a local date (yyyy-mm-dd)
Dictate the date that the origin will ship the item.
shipOptionOptionalString enumeration
Limited to available ship options:

- same_day
- next_day
- two_day
- three_day
Retrieve the estimate for a different ship option.
referenceIdentifiers.nameOptionalString
No character limitations
Optionally include your organization's own identifier to be associated with the shipment for internal tracking.
referenceIdentifiers.valueOptionalString
Limited to numeric characters
Optionally include your organization's own identifier to be associated with the shipment for internal tracking.

The Delivery Promise response attributes are defined in the following table.

Response attributeDescription
deliveryEstimateIdUnique Shipium-generated ID related to the response
shipEstimateDateUTCA valid date in ISO 8601 format with UTC timezone representing the estimated ship date to a customer configured in the call parameters (e.g., 2023-10-31T00:00:00Z)
deliveryEstimateDateShipium's estimated delivery date (EDD) in the local timezone of the delivery postal code (customerPostalCode)
deliveryEstimateDateUTCA valid date in ISO 8601 format with UTC timezone representing the estimated delivery date to a customer configured in the call parameters (e.g., 2023-10-31T00:00:00Z)
estimateSourceThe time in transit (TNT) calculation method that was used when calculating this EDD
estimatedTimeInTransitDaysAn integer value of the time in transit (TNT) in days

Shipium assumptions for the Delivery Promise API

  • Origin
    The shipment will ship from the closest origin to the customer based on distance.
  • Shipment date
    The shipment will ship based on the timestamp of the request plus the configured click-to-ship time and the configured schedule at the origin.
  • Ship method
    Standard Ground

Retrieve an EDD for a shipment (primary use case)

Example cURL call

curl --request POST   
  --url <<api_url>>/api/v1/deliveryexperience/productview 
  --header 'accept: application/json' 
  --header $AUTHSTRING  
  --header 'content-type: application/json'  
  --data 'INSERT REQUEST BODY FROM BELOW'

Example request body

{
  "customerCountryCode": "US",
  "customerPostalCode": "98101",
  "referenceIdentifiers": [
    {
      "name": "MY_KEY",
      "value": "MY_VALUE"
    }
  ]
}

Example response

{
    "deliveryEstimateId": "da2959d6-248f-4dac-a557-c6b06a3f826f",
    "requestDate": "2024-08-20T18:52:06.357Z",
    "shipEstimateDate": "2024-08-22T17:00:00-04:00",
    "shipEstimateDateUTC": "2024-08-22T21:00:00Z",
    "deliveryEstimateDate": "2024-08-30T20:00:00-07:00",
    "deliveryEstimateDateUTC": "2024-08-31T03:00:00Z",
    "estimateSource": "ShipiumCalculated",
    "estimatedTimeInTransitDays": 8,
    "customerCountryCode": "US",
    "customerPostalCode": "98101",
    "shippingOrigin": {
        "countryCode": "US",
        "postalCode": "43068",
        "shipiumOriginId": "b1c9d24e-86f1-4bd6-b6dc-661a6f16e824"
  },
  "referenceIdentifiers": [
    {
      "name": "MY_KEY",
      "value": "MY_VALUE"
    }
    ]
}

Augmentations to the EDD request (additional use cases)

Your organization may choose to augment your EDD request by including any of the following optional fields, which will generally enhance the accuracy of our EDD calculation.

Request date override

requestDateOverride

Dictate the base calculation of when the request happened. This field allows you to specify the request as though it had happened on a different date and/or time.

Example cURL call

curl --request POST   
  --url <<api_url>>/api/v1/deliveryexperience/productview 
  --header 'accept: application/json' 
  --header $AUTHSTRING  
  --header 'content-type: application/json'  
  --data 'INSERT REQUEST BODY FROM BELOW'

Example request body

{
  "customerCountryCode": "US",
  "customerPostalCode": "98101",
  "requestDateOverride": "2024-08-19T18:52:06.357Z",
  "referenceIdentifiers": [
    {
      "name": "MY_KEY",
      "value": "MY_VALUE"
    }
    ]
}

Example response

{
    "deliveryEstimateId": "da2959d6-248f-4dac-a557-c6b06a3f826f",
    "requestDate": "2024-08-20T18:52:06.357Z",
    "shipEstimateDate": "2024-08-22T17:00:00-04:00",
    "shipEstimateDateUTC": "2024-08-22T21:00:00Z",
    "deliveryEstimateDate": "2024-08-30T20:00:00-07:00",
    "deliveryEstimateDateUTC": "2024-08-31T03:00:00Z",
    "estimateSource": "ShipiumCalculated",
    "estimatedTimeInTransitDays": 8,
    "customerCountryCode": "US",
    "customerPostalCode": "98101",
    "shippingOrigin": {
        "countryCode": "US",
        "postalCode": "43068",
        "shipiumOriginId": "b1c9d24e-86f1-4bd6-b6dc-661a6f16e824"
  },
  "requestDateOverride": "2024-08-19T18:52:06.357Z",
  "referenceIdentifiers": [
    {
      "name": "MY_KEY",
      "value": "MY_VALUE"
    }
    ]
}

Shipping origin override

shippingOrigin

Dictate the origin that will fulfill the shipment by using the originID. You can retrieve the originID value from the Shipium platform, following these steps (your Implementation team member will assist you):

  1. Access your organization's account by logging in to the Shipium Console.
  2. Navigate to Configure in the lefthand menu, and then select Fulfillment Configuration.
  1. Within Fulfillment Center Configuration, select Origins.
  1. From your list of origins, locate the one for which you wish to retrieve the originID. Then choose Detail from the Actions dropdown menu for that origin.
  1. Copy the value listed for the URN in the Audit Properties section of the Detail view. This is your originID value. You may choose to use the Copy icon, but should note that this action copies the "urn:origin:" text preceding the originID.

Example cURL call

curl --request POST   
  --url <<api_url>>/api/v1/deliveryexperience/productview 
  --header 'accept: application/json' 
  --header $AUTHSTRING  
  --header 'content-type: application/json'  
  --data 'INSERT REQUEST BODY FROM BELOW'

Example request body by origin ID

{
  "customerCountryCode": "US",
  "customerPostalCode": "98101",
  "options": {
        "shippingOptions": {
            "originId": "194d28d5-53b3-4c80-badc-0793ba220932"
        }
  },
  "referenceIdentifiers": [
    {
      "name": "MY_KEY",
      "value": "MY_VALUE"
    }
    ]
}

Example response by origin ID

{
    "deliveryEstimateId": "da2959d6-248f-4dac-a557-c6b06a3f826f",
    "requestDate": "2024-08-20T18:52:06.357Z",
    "shipEstimateDate": "2024-08-22T17:00:00-04:00",
    "shipEstimateDateUTC": "2024-08-22T21:00:00Z",
    "deliveryEstimateDate": "2024-08-30T20:00:00-07:00",
    "deliveryEstimateDateUTC": "2024-08-31T03:00:00Z",
    "estimateSource": "ShipiumCalculated",
    "estimatedTimeInTransitDays": 8,
    "customerCountryCode": "US",
    "customerPostalCode": "98101",
    "shippingOrigin": {
        "countryCode": "US",
        "postalCode": "43068",
        "shipiumOriginId": "b1c9d24e-86f1-4bd6-b6dc-661a6f16e824"
    },
    "options": {
        "shippingOptions": {
            "originId": "194d28d5-53b3-4c80-badc-0793ba220932"
        }
    },
    "referenceIdentifiers": [
      {
        "name": "MY_KEY",
        "value": "MY_VALUE"
      }
      ]
}

Ship date override

shipDateOverride

Dictate the date that the origin will ship the item.

Example cURL call

curl --request POST   
  --url <<api_url>>/api/v1/deliveryexperience/productview 
  --header 'accept: application/json' 
  --header $AUTHSTRING  
  --header 'content-type: application/json'  
  --data 'INSERT REQUEST BODY FROM BELOW'

Example request body

{
  "customerCountryCode": "US",
  "customerPostalCode": "98101",
  "shipDateOverride": "2024-08-19T18:52:06.357Z",
  "referenceIdentifiers": [
    {
      "name": "MY_KEY",
      "value": "MY_VALUE"
    }
    ]
}

Example response

{
    "deliveryEstimateId": "da2959d6-248f-4dac-a557-c6b06a3f826f",
    "requestDate": "2024-08-20T18:52:06.357Z",
    "shipEstimateDate": "2024-08-22T17:00:00-04:00",
    "shipEstimateDateUTC": "2024-08-22T21:00:00Z",
    "deliveryEstimateDate": "2024-08-30T20:00:00-07:00",
    "deliveryEstimateDateUTC": "2024-08-31T03:00:00Z",
    "estimateSource": "ShipiumCalculated",
    "estimatedTimeInTransitDays": 8,
    "customerCountryCode": "US",
    "customerPostalCode": "98101",
    "shippingOrigin": {
        "countryCode": "US",
        "postalCode": "43068",
        "shipiumOriginId": "b1c9d24e-86f1-4bd6-b6dc-661a6f16e824"
    },
    "shipDateOverride": "2024-08-19T18:52:06.357Z",
    "referenceIdentifiers": [
      {
        "name": "MY_KEY",
        "value": "MY_VALUE"
      }
      ]
}

Ship option override

shipOption

Retrieve the estimate for a different ship option.

Available ship options for the API call request:

  • Standard
  • SameDay
  • NextDay
  • TwoDay
  • ThreeDay

Example cURL call

curl --request POST   
  --url <<api_url>>/api/v1/deliveryexperience/productview 
  --header 'accept: application/json' 
  --header $AUTHSTRING  
  --header 'content-type: application/json'  
  --data 'INSERT REQUEST BODY FROM BELOW'

Example request body

{
  "customerCountryCode": "US",
  "customerPostalCode": "98101",
  "options": {
        "shippingOptions": {
            "shipOption": "TwoDay"
        }
  },
  "referenceIdentifiers": [
    {
      "name": "MY_KEY",
      "value": "MY_VALUE"
    }
    ]
}

Example response

{
    "deliveryEstimateId": "da2959d6-248f-4dac-a557-c6b06a3f826f",
    "requestDate": "2024-08-20T18:52:06.357Z",
    "shipEstimateDate": "2024-08-22T17:00:00-04:00",
    "shipEstimateDateUTC": "2024-08-22T21:00:00Z",
    "deliveryEstimateDate": "2024-08-30T20:00:00-07:00",
    "deliveryEstimateDateUTC": "2024-08-31T03:00:00Z",
    "estimateSource": "ShipiumCalculated",
    "estimatedTimeInTransitDays": 8,
    "customerCountryCode": "US",
    "customerPostalCode": "98101",
    "shippingOrigin": {
        "countryCode": "US",
        "postalCode": "43068",
        "shipiumOriginId": "b1c9d24e-86f1-4bd6-b6dc-661a6f16e824"
    },
    "options": {
        "shippingOptions": {
            "shipOption": "TwoDay"
        }
    },
    "referenceIdentifiers": [
      {
        "name": "MY_KEY",
      "value": "MY_VALUE"
      }
      ]
}

Resources

Your Shipium team member is available to help along the way. However, you might find these resources helpful: