Cart Checkout Delivery Promise API

Retrieve estimated delivery dates at cart checkout with Shipium's Cart Checkout Delivery Promise API.

Get started

To use the Cart Checkout 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) for your cart checkout pages with the Cart Checkout Delivery Promise API

The Shipium Cart Checkout 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 Cart Checkout Delivery Promise API calls is included in the table below.

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

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.

Request and response fields for API calls

The following tables provide required, conditional, and optional fields for calling the Cart Checkout Delivery Promise API. You can find additional support in the Cart Delivery Date Estimate API Reference.

Required request fields

Request field

Details

partnerCartId

Type: String
Description: A unique identifier for this request

customerCountryCode

Type: String (enumeration)
Format: Limited to 2 characters and ISO 3166 standards
Description: Shipment's destination country

customerPostalCode

Type: String
Description: Shipment's destination country appropriate postal code

Conditional request fields

Request field

Details

cartShippingOptions .shippingLocationOptions .fromCountryCode

Type: String
Format: Limited to 2 characters and ISO 3166 standards Condition: Either the fromCountryCode and fromPostalCode or the originId must be provided.
Description: Shipment's origin country

cartShippingOptions .shippingLocationOptions .fromPostalCode

Type: String
Condition: Either the fromCountryCode and fromPostalCode or the originId must be provided.
Description: Shipment's origin country appropriate postal code

cartShippingOptions .shippingLocationOptions .originId

Type: String
Example: origin-id-123
Condition: Either the fromCountryCode and fromPostalCode or the originId must be provided.
Description: A unique identifier for the origin, whether one your organization assigned (partnerProvided) or a Shipium ID

Optional request fields

Request field

Details

requestDateOverride

Type: String (enumeration)
Format: Limited to the ISO-8601 standard Example: 2019-10-31T00:00:00Z
Description: 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.

shipDateOverride

Type: String
Format: Either the ISO-8601 standard date or a local date (yyyy-mm-dd)
Description: Dictate the date that the origin will ship the item.

productViewDeliveryEstimateIds

Type: Array of Strings
Example: 0b3d140a-525b-43a7-896c-cdc381580d61
Description: An array of identifiers that were returned in the response from a call to the Product View API

cartShippingOptions.shippingLocationOptions

Type: Array
Description: An array of possible shipping locations with available inventory; either the fromCountryCode and fromPostalCode or the originId can be provided.

cartShippingOptions.shippingLocationOptions .shipOption

Type: String (enumeration)
Values: standard, same_day, next_day, two_day, three_day
Description: Retrieve the estimate for a different ship option; the default value is standard.

cartShippingOptions.shippingLocationOptions .estimateSource

Type: String (enumeration)
Values: ShipiumCalculated, PartnerProvided, CarrierProvided, Unknown
Description: The source used to generate the estimate

referenceIdentifiers.name

Type: String
Description: Optionally include your organization's own unique identifier to be associated with the shipment for internal tracking.

referenceIdentifiers.value

Type: String
Description: Optionally include your organization's own unique identifier to be associated with the shipment for internal tracking.

Response attributes

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

Response attributeDescription
shipiumCartIdUnique Shipium-generated ID related to the request and response
deliveryEstimateIdUnique Shipium-generated ID related to the response
shipEstimateDateA valid date in ISO 8601 format representing the estimated ship date to a customer configured in the call parameters (e.g., 2023-10-31T00:00:00Z)
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 Cart Checkout 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 at cart checkout (primary use case)

Example cURL call

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

Example request body

{
  "partnerCartId": "74b6e652-8db2-4441-9cf6-85a18a15ca88",
  "customerCountryCode": "US",
  "customerPostalCode": "98101",
  "productViewDeliveryEstimateIds": ["0b3d140a-525b-43a7-896c-cdc381580d61"],
  "cartShippingOptions": {
    "shippingLocationOptions": [
      {
        "fromCountryCode": "US",
        "fromPostalCode": "98101",
        "estimateSource": "ShipiumGenerated"
      }
      ]
    },
  "referenceIdentifiers": [
    {
      "name": "MY_KEY",
      "value": "MY_VALUE"
    }
  ]
}

Example response

{
   "shipiumCartId": "66401470-aedc-4a03-9509-a8383e650a4d",    
   "partnerCartId": "74b6e652-8db2-4441-9cf6-85a18a15ca88",   
   "customerCountryCode": "US",                               
   "customerPostalCode": "98101",                                    
   "productViewDeliveryEstimateIds": ["0b3d140a-525b-43a7-896c-cdc381580d61"],     
   "originDeliveryEstimates":[
      {
         "deliveryEstimateId": "0b3d140a-525b-43a7-896c-cdc381580d61",
         "deliveryEstimateDate": "2019-10-31T00:00:00Z",     
         "deliveryEstimateDateUTC": "2019-10-31T00:00:00Z",    
         "estimateSource": "ShipiumGenerated",                 
         "estimatedTimeInTransitDays": 3,                     
         "shippingOrigin": {                                   
            "countryCode": "US",
            "postalCode": "98101",
            "shipiumOriginId": "0b3d140a-525b-43a7-896c-cdc381580d62",
            "originProcessingDays": 2.5
         },
         "cartShippingOptions":{
            "shippingLocation": {
               "fromCountryCode": "US",
               "fromPostalCode": "98101",
               "estimateSource": "ShipiumGenerated"
            }
         }
      }
   ],
   "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/cartDeliveryEstimate 
  --header 'accept: application/json' 
  --header $AUTHSTRING  
  --header 'content-type: application/json'  
  --data 'INSERT REQUEST BODY FROM BELOW'

Example request body

{
  "partnerCartId": "74b6e652-8db2-4441-9cf6-85a18a15ca88",
  "customerCountryCode": "US",
  "customerPostalCode": "98101",
  "requestDateOverride": "2019-10-31T00:00:00Z",
  "productViewDeliveryEstimateIds": ["0b3d140a-525b-43a7-896c-cdc381580d61"],
  "cartShippingOptions": {
    "shippingLocationOptions": [
      {
        "fromCountryCode": "US",
        "fromPostalCode": "98101",
        "estimateSource": "ShipiumGenerated"
      }
      ]
    },
  "referenceIdentifiers": [
    {
      "name": "MY_KEY",
      "value": "MY_VALUE"
    }
  ]
}

Example response

{
   "shipiumCartId": "66401470-aedc-4a03-9509-a8383e650a4d",    
   "partnerCartId": "74b6e652-8db2-4441-9cf6-85a18a15ca88",   
   "customerCountryCode": "US",                               
   "customerPostalCode": "98101", 
   "requestDateOverride": "2019-10-31T00:00:00Z",
   "productViewDeliveryEstimateIds": ["0b3d140a-525b-43a7-896c-cdc381580d61"],     
   "originDeliveryEstimates":[
      {
         "deliveryEstimateId": "0b3d140a-525b-43a7-896c-cdc381580d61",
         "deliveryEstimateDate": "2019-10-31T00:00:00Z",     
         "deliveryEstimateDateUTC": "2019-10-31T00:00:00Z",    
         "estimateSource": "ShipiumGenerated",                 
         "estimatedTimeInTransitDays": 3,                     
         "shippingOrigin": {                                   
            "countryCode": "US",
            "postalCode": "98101",
            "shipiumOriginId": "0b3d140a-525b-43a7-896c-cdc381580d62",
            "originProcessingDays": 2.5
         },
         "cartShippingOptions":{
            "shippingLocation": {      
               "fromCountryCode": "US",
               "fromPostalCode": "98101",
               "estimateSource": "ShipiumGenerated"
            }
         }
      }
   ],
   "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.

  2. Copy the value listed for the Origin ID in the detailed card view. This is your originID value.

Example cURL call

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

Example request body by origin ID

{
  "partnerCartId": "74b6e652-8db2-4441-9cf6-85a18a15ca88",
  "customerCountryCode": "US",
  "customerPostalCode": "98101",
  "productViewDeliveryEstimateIds": ["0b3d140a-525b-43a7-896c-cdc381580d61"],
  "cartShippingOptions": {
    "shippingLocationOptions": [
      {
        "fromCountryCode": "US",
        "fromPostalCode": "98101",
        "originId": "origin-id-123",
        "estimateSource": "ShipiumGenerated"
      }
      ]
    },
  "referenceIdentifiers": [
    {
      "name": "MY_KEY",
      "value": "MY_VALUE"
    }
  ]
}

Example response by origin ID

{
   "shipiumCartId": "66401470-aedc-4a03-9509-a8383e650a4d",    
   "partnerCartId": "74b6e652-8db2-4441-9cf6-85a18a15ca88",   
   "customerCountryCode": "US",                               
   "customerPostalCode": "98101",                                    
   "productViewDeliveryEstimateIds": ["0b3d140a-525b-43a7-896c-cdc381580d61"],     
   "originDeliveryEstimates":[
      {
         "deliveryEstimateId": "0b3d140a-525b-43a7-896c-cdc381580d61",
         "deliveryEstimateDate": "2019-10-31T00:00:00Z",     
         "deliveryEstimateDateUTC": "2019-10-31T00:00:00Z",    
         "estimateSource": "ShipiumGenerated",                 
         "estimatedTimeInTransitDays": 3,                     
         "shippingOrigin": {                                   
            "countryCode": "US",
            "postalCode": "98101",
            "shipiumOriginId": "0b3d140a-525b-43a7-896c-cdc381580d62",
            "originProcessingDays": 2.5
         },
         "cartShippingOptions":{
            "shippingLocation": {
               "fromCountryCode": "US",
               "fromPostalCode": "98101",
               "originId": "origin-id-123",
               "estimateSource": "ShipiumGenerated"
            }
         }
      }
   ],
   "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/cartDeliveryEstimate 
  --header 'accept: application/json' 
  --header $AUTHSTRING  
  --header 'content-type: application/json'  
  --data 'INSERT REQUEST BODY FROM BELOW'

Example request body

{
  "partnerCartId": "74b6e652-8db2-4441-9cf6-85a18a15ca88",
  "customerCountryCode": "US",
  "customerPostalCode": "98101",
  "shipDateOverride": "2019-10-31T00:00:00.000000Z",
  "productViewDeliveryEstimateIds": ["0b3d140a-525b-43a7-896c-cdc381580d61"],
  "cartShippingOptions": {
    "shippingLocationOptions": [
      {
        "fromCountryCode": "US",
        "fromPostalCode": "98101",
        "estimateSource": "ShipiumGenerated"
      }
      ]
    },
  "referenceIdentifiers": [
    {
      "name": "MY_KEY",
      "value": "MY_VALUE"
    }
  ]
}

Example response

{
   "shipiumCartId": "66401470-aedc-4a03-9509-a8383e650a4d",    
   "partnerCartId": "74b6e652-8db2-4441-9cf6-85a18a15ca88",   
   "customerCountryCode": "US",                               
   "customerPostalCode": "98101", 
   "shipDateOverride": "2019-10-31T00:00:00.000000Z",
   "productViewDeliveryEstimateIds": ["0b3d140a-525b-43a7-896c-cdc381580d61"],     
   "originDeliveryEstimates":[
      {
         "deliveryEstimateId": "0b3d140a-525b-43a7-896c-cdc381580d61",
         "deliveryEstimateDate": "2019-10-31T00:00:00Z",     
         "deliveryEstimateDateUTC": "2019-10-31T00:00:00Z",    
         "estimateSource": "ShipiumGenerated",                 
         "estimatedTimeInTransitDays": 3,                     
         "shippingOrigin": {                                   
            "countryCode": "US",
            "postalCode": "98101",
            "shipiumOriginId": "0b3d140a-525b-43a7-896c-cdc381580d62",
            "originProcessingDays": 2.5
         },
         "cartShippingOptions":{
            "shippingLocation": {
               "fromCountryCode": "US",
               "fromPostalCode": "98101",
               "estimateSource": "ShipiumGenerated"
            }
         }
      }
   ],
   "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/cartDeliveryEstimate 
  --header 'accept: application/json' 
  --header $AUTHSTRING  
  --header 'content-type: application/json'  
  --data 'INSERT REQUEST BODY FROM BELOW'

Example request body

{
  "partnerCartId": "74b6e652-8db2-4441-9cf6-85a18a15ca88",
  "customerCountryCode": "US",
  "customerPostalCode": "98101",
  "productViewDeliveryEstimateIds": ["0b3d140a-525b-43a7-896c-cdc381580d61"],
  "cartShippingOptions": {
    "shippingLocationOptions": [
      {
        "shipOption": "SameDay",
        "fromCountryCode": "US",
        "fromPostalCode": "98101",
        "estimateSource": "ShipiumGenerated"
      }
      ]
    },
  "referenceIdentifiers": [
    {
      "name": "MY_KEY",
      "value": "MY_VALUE"
    }
  ]
}

Example response

{
   "shipiumCartId": "66401470-aedc-4a03-9509-a8383e650a4d",    
   "partnerCartId": "74b6e652-8db2-4441-9cf6-85a18a15ca88",   
   "customerCountryCode": "US",                               
   "customerPostalCode": "98101",                                    
   "productViewDeliveryEstimateIds": ["0b3d140a-525b-43a7-896c-cdc381580d61"],     
   "originDeliveryEstimates":[
      {
         "deliveryEstimateId": "0b3d140a-525b-43a7-896c-cdc381580d61",
         "deliveryEstimateDate": "2019-10-31T00:00:00Z",     
         "deliveryEstimateDateUTC": "2019-10-31T00:00:00Z",    
         "estimateSource": "ShipiumGenerated",                 
         "estimatedTimeInTransitDays": 3,                     
         "shippingOrigin": {                                   
            "countryCode": "US",
            "postalCode": "98101",
            "shipiumOriginId": "0b3d140a-525b-43a7-896c-cdc381580d62",
            "originProcessingDays": 2.5
         },
         "cartShippingOptions":{
            "shippingLocation": {
              "shipOption": "SameDay", 
              "fromCountryCode": "US",
              "fromPostalCode": "98101",
              "estimateSource": "ShipiumGenerated"
            }
         }
      }
   ],
   "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: