Delivery Solutions

Check Delivery Assurance

The Delivery Assurance service offers five key checks—Store Boundary, DSP, Store Boundary + DSP, Confidence Score, and Return Confidence Score—to verify delivery coverage and reliability based on store boundaries, provider availability, and confidence metrics, with specific requirements such as providing pickup and dropoff times for time-window checks, restrictions on provider configurations, caching options to reduce latency, and current availability of confidence scores only in the U.S., while excluding business rules and orchestration engine usage.

There are 5 services available within Delivery Assurance:

  1. 1.Store Boundary: Checks if the delivery address is within the coverage boundary of any store and returns a list of stores that can service the delivery address. It is recommended to pass either the zip code or latitude and longitude in the request to avoid geo-coding costs. Boundaries need to be defined around each store for this feature to work.
  2. 2.DSP: Checks if at least one of the providers associated with the store has delivery coverage.
  3. 3.Store Boundary + DSP: Combines both the store boundary and DSP checks. It verifies if the drop-off address is within the coverage boundary and if at least one provider associated with the store can service the drop-off address.
  4. 4.Confidence Score: Provides a confidence score for a specified drop-off address.
  5. 5.Return Confidence Score: Provides a confidence score of return from a specified drop-off address.

Notes

  • Both pickupTime and dropoffTime must be provided to check for delivery within a specific time window.
  • The dsp and store-boundary-dsp Delivery Assurance checks are restricted to the providers configured for the pickup location. The first positive response from a provider is considered assurance of delivery.
  • When nearestPickup value is passed, showTags and showBoundaries tags will not be available in the response.
  • Confidence Scores are currently available only for locations in the United States.
  • Caching can be enabled through configuration to reduce latency, especially when used on a PDP page. Caching works only if parameters that affect assurance (pickupTime and dropoffTime) are not provided.
  • Delivery Assurance does not utilize business rules and the orchestration engine.

Store-boundary Service Response

  • store-boundary: Name of the selected service (Object)
  • value: List of storeExternalIds that can deliver to the delivery address (Array of Strings, required)
  • errors: List of base errors (Array of BaseError Objects, optional)
  • fulfillments: List of provider fulfillment options (Array of Fulfillment Objects, conditional, sent when showFulfillmentOptions is true)
  • boundaries: List of boundaries associated with a pickup location (Array of Boundary Details, conditional, sent when showBoundaries is true)
  • distances: List of storeExternalIds sorted by distance (Array of Distance Details, conditional, sent when sortByDistance is true)

DSP Service Response

  • dsp: Name of the selected service (Object)
  • value: List of providers that can deliver to the delivery address (Array of Strings, required)
  • errors: List of Base and Provider Errors (Array of Errors, optional)

Store-boundary-dsp Service Response

This service is a combination of both store-boundary and dsp service. All sub-properties of both services are shown.

  • store-boundary-dsp: Name of the selected service (Object)
  • value: List of providers that can deliver to the delivery address (Array of Strings, required)
  • errors: List of Base and Provider Errors and storeExternalId (Array of Errors, optional)

Confidence-score Service Response

  • confidence-score: Name of the selected service (Object)
  • value: addressScore for the delivery address (Array of Strings, required)
  • score: List of scores for the delivery address (Object, required)
  • errors: List of Base Errors (Array of Errors, optional)

Return-confidence-score Service Response

  • return-confidence-score: Name of the selected service (Object)
  • value: addressScore for the delivery address (Array of Strings, required)
  • score: List of scores for the delivery address (Object, required)
  • errors: List of base errors (Array of Errors, optional)
  • isResidential: Flag indicating whether the delivery address is residential (Boolean, required)
  • scoredAddress: Delivery address that has been scored (Object, required)

Request Parameters

  • storeExternalId (string): Required when utilizing dsp service. If provided for store-boundary service, the location boundary check will be limited to that location.
  • deliveryAddress (object, required): Zipcode is mandatory in Address. If full address is provided, it will be geocoded if latitude and longitude are not provided for store boundary service and if a delivery service provider requires it. Full address is required when utilizing confidence-score and return-confidence-score services.
  • services (array of strings, required): An array of service keys to determine which service is being invoked. Available services are: dsp, store-boundary, store-boundary-dsp, confidence-score, return-confidence-score.
  • matchBoundaryTags (array of strings): Match stores whose boundaries have at least one of the tags passed in an array and cover the dropoff address.
  • matchProviderTags (array of strings): All the providers matching at least one tag are returned. Only available for the dsp and store-boundary-dsp services.
  • pickupTime (object): Check provider availability based on pickup time. If not provided, the system will use the appropriate time window. If pickupTime is null, the package needs to be picked as soon as possible.
  • dropoffTime (object): Check provider availability based on drop-off time. If not provided, the system will use the appropriate time window. If dropoff time is null, the package needs to be dropped off as soon as possible after the pickup.
  • sortByDistance (boolean): When true, returns all the pickup locations that cover the deliveryAddress sorted in ascending order by distance.
  • nearestPickup (object): Fetches the nearest pickup locations that serve the deliveryAddress for a given radius. When this field is provided, the coverage boundaries associated with the pickup locations are ignored. Only available for the store-boundary and store-boundary-dsp services.
  • showFulfillmentOptions (boolean): When true, returns the order type and provider services supported by the pickup location.
  • bypassCache (boolean): If caching is enabled in corporate profile to reduce latency, a customer can disable cache for this API by sending bypassCache as true.
  • matchLocationTags (array of strings): All the locations matching at least one tag are returned. Only available for the store-boundary and store-boundary-dsp services.

Example Request

curl --request POST \
     --url https://sandbox.api.deliverysolutions.co/api/v2/deliveryAssurance \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'tenantId: YOUR_TENANT_ID' \
     --header 'x-api-key: YOUR_API_KEY' \
     --header 'x-compression: true'