The Provider Rates and Availability API allows applications to retrieve and evaluate service rates, availability, and estimated delivery times from logistics providers while leveraging orchestration capabilities to prioritize options, apply business rules, and determine service feasibility between shipping and delivery locations.
Dynamic Rate Retrieval: - Retrieve service rates, availability, and estimated delivery times from multiple logistics providers, empowering businesses to make informed decisions tailored to specific delivery needs.
Orchestration Integration: - Apply customizable business rules to prioritize rate options based on organizational objectives, ensuring the selection of optimal service providers.
Scalability and Flexibility: - Support up to 10 shipping locations per rate request, enabling efficient handling of multiple store locations with minimal latency.
Enhanced Accuracy: - Leverage package dimensions, weight, and item details for precise rate calculations, ensuring competitive and accurate service estimates.
Once set up as a user, you can submit relevant order details, including the pickup location and delivery address, to retrieve rates and estimated delivery times from multiple providers. By integrating this API into your platform, you gain dynamic rate calculation and orchestration capabilities. This allows for seamless optimization of delivery costs and services while maintaining operational efficiency.
What are the minimum required parameters?
- Configured shipping provider within the portal.
- zipcode in deliveryAddress.
- storeExternalIds to identify the shipping locations.
What does the rates response include?
The response includes service rates and estimated pickup/delivery times from multiple providers, along with errors and validation messages if a provider cannot fulfill the request.
What is the role of packages and itemList?
These provide dimensions, weight, and item details to calculate accurate rates and optimize post-purchase experiences.
How does orchestration affect rate selection?
If orchestration rules are applied, the selected rates are flagged (ruleApplied: true) in the response. To filter only the winning rates, set the displayWinningRates parameter to true.
When the system is unable to respond to a request, be it from a malformed request, an illegal or invalid value, or other issues, the API generates an error response.
Successful response may or may not include warnings.
- Without warnings - Indicates the request has been processed as anticipated.
- With warnings - Indicates the request has been processed with potentially unanticipated results. The warning contains information in the response that should be passed to the end user.
The severity of an error may be transient or hard.
- Transient error - Indicates an error that is temporary in nature. Such errors may be caused by response timeouts due to high server loads or scheduled maintenance in progress. The request may be issued successfully at a later time.
- Hard error - Indicates the request has a problem that the system is not able to resolve. These errors are critical and prevent requests from processing.
POST
| Type | HTTP Code | Severity | Description |
|---|---|---|---|
| UNAUTHORIZED | 401 | Hard | Unauthorized: Invalid or missing authentication token |
| INTERNAL_SERVER_ERROR | 500 | Transient | Internal Server Error: An unexpected error occurred while processing the request |
| INVALID_DATA | 422 | Hard | Invalid data: No such locationExternalId exists in our system or other invalid values in the request |
| INVALID_DATA | 400 | Hard | Invalid data: Missing required fields (e.g., deliveryAddress) or other invalid values in the request |
| VALIDATION_ERROR | 400 | Hard | Field validation failed as per the expected input. |
| NO_PROVIDER_ASSIGNED | 422 | Hard | No Provider has been assigned to the mentioned location. |
| NO_PROVIDER_MATCHED | 422 | Hard | No Provider matched the criteria for the requested delivery. |
| GEOCODING_FAILED | 422 | Hard | Geocoding Service for the given address failed. |
| TOO_MANY_REQUESTS | 429 | Transient | Too many requests received per second. |
| UNMAPPED_ERROR | 422 | Transient | Request received unidentifiable error response. |
Retrieve Rates, Estimated Times, and Service Availability
When placing an order with any Provider, the estimated pickup and delivery times along with the rate provided by each service offered by the Provider are crucial information that can help in deciding the Provider and the services offered by it. The Get Rates API helps achieve this for all the Providers assigned to the locations.
The minimum required parameters for the Rate API are postalCode in the deliveryAddress and the locationExternalIds. This provides the rates for all the Providers assigned to the locations for delivery to a location in that postalCode.
The Rate API comes with the ability to use Orchestration. If the orchestration module is used, then the ruleApplied is set to true on the rates which are selected by the orchestration module. By default, all the rates processed by the orchestration module are sent in the response. The API can be configured to send only those rates that are selected by the orchestration module and filter the rest by setting the displayWinningRates parameter to true.
The default options for the get rates can also be configured at the business level. Please contact Delivery Solutions Support if you wish to configure the default options for the Rates Request API. The configured default options can be overridden while using the API.
The rate response provides an array of rates - each rate consisting of the estimated pick up and delivery time offered by different services of the Providers along with the amounts that it shall charge for the service. The response also includes errors sent by the Provider if the provider is unable to provide a rate for the given parameters as well as any validation messages.
Request Body schema: application/json
Request was successful
Bad Request
Unauthorized
Processing failed as request contains invalid data
Internal server error
- Payload
- curl
- Node.js
- JavaScript
- PHP
- Python
- C#
- Java
{- "type": "delivery",
- "locationExternalIds": [
- "0001"
], - "deliveryAddress": {
- "postalCode": "75206"
}
}- 200
- 400
- 401
- 422
- 500
{- "rates": [
- {
- "type": "delivery",
- "provider": {
- "id": "DoorDash",
- "name": "DoorDash",
- "displayName": "DoorDash",
- "serviceType": "Delivery",
- "serviceId": "delivery"
}, - "deliveryWindowId": "1",
- "deliveryWindows": null,
- "requestedPickupTime": {
- "startsAt": 1655830800000,
- "endsAt": null
}, - "requestedDeliveryTime": {
- "startsAt": null,
- "endsAt": 1655841600000
}, - "estimatedDeliveryTime": {
- "startsAt": null,
- "endsAt": 1655832987000
}, - "estimatedPickupTime": {
- "startsAt": 1655830800000,
- "endsAt": null
}, - "expires": null,
- "currencyCode": "USD",
- "amount": 20.76,
- "fee": 20.76,
- "chargeDetails": [ ],
- "ruleApplied": true,
- "hasEstimate": false,
- "orderType": null,
- "supportsAlternateLocation": false,
- "code": null,
- "tags": [ ],
- "locationExternalId": "0001"
}, - {
- "type": null,
- "provider": {
- "name": "UPS Shipping",
- "serviceType": "Ground",
- "serviceId": null,
- "displayName": "UPS",
- "id": null
}, - "deliveryWindowId": null,
- "deliveryWindows": null,
- "requestedPickupTime": {
- "startsAt": 1655830800000,
- "endsAt": null
}, - "requestedDeliveryTime": {
- "startsAt": null,
- "endsAt": 1655841600000
}, - "estimatedDeliveryTime": {
- "startsAt": null,
- "endsAt": null
}, - "estimatedPickupTime": {
- "startsAt": null,
- "endsAt": null
}, - "expires": null,
- "currencyCode": "USD",
- "amount": 18.98,
- "fee": null,
- "chargeDetails": [ ],
- "ruleApplied": false,
- "hasEstimate": false,
- "orderType": null,
- "supportsAlternateLocation": false,
- "code": null,
- "tags": [ ],
- "locationExternalId": "0001"
}, - {
- "type": "delivery",
- "provider": {
- "name": "Roadie",
- "serviceType": "Delivery",
- "serviceId": "delivery",
- "id": null,
- "displayName": null
}, - "deliveryWindowId": null,
- "deliveryWindows": null,
- "requestedPickupTime": {
- "startsAt": 1655830800000,
- "endsAt": null
}, - "requestedDeliveryTime": {
- "startsAt": null,
- "endsAt": 1655841600000
}, - "estimatedDeliveryTime": {
- "startsAt": null,
- "endsAt": 1655832004000
}, - "estimatedPickupTime": {
- "startsAt": 1655824804000,
- "endsAt": null
}, - "expires": null,
- "currencyCode": "USD",
- "amount": 1462,
- "fee": null,
- "chargeDetails": [ ],
- "ruleApplied": false,
- "hasEstimate": false,
- "orderType": null,
- "supportsAlternateLocation": false,
- "code": null,
- "tags": [ ],
- "locationExternalId": "0001"
}
], - "errors": [ ],
- "rateId": "62b1e1682810e724d36595ab"
}