Delivery Solutions

Get Rates

The "Get Rates" API allows fetching delivery or pickup rates for up to 10 stores by providing required parameters such as delivery address and store IDs, with optional parameters including fulfillment type, order value, pickup and dropoff times, package details, and alcohol indicators, returning a response containing a rate ID, an array of rate objects, and any errors encountered.

Note: This API supports fetching rates for multiple stores (up to 10 stores are supported when doing a rate call). There may be increased latency in response times when a rate call is made with multiple stores.

Rates Service Response

  • rateId (String, required): DS Rate Id created in the system.
  • rates (Array of Objects, required): Array of Rate objects.
  • errors (Array, conditional): Array of Errors.

Request Body Parameters

deliveryAddress (object, required)

Address where the package will be delivered.

storeExternalIds (array of strings, required)

Array of unique IDs for the pickup locations.

type (string, optional)

Indicates preferred fulfillment type. Allowed values:

  • delivery
  • shipping
  • in-store-pickup
  • curbside

If not specified, all available fulfillment options will be considered for rates.

orderValue (float, optional)

Value of the order in dollars and cents (e.g., 10.00, 116.50).

pickupTime (object, optional)

Check provider availability based on pickup time. If not provided, the system uses the appropriate time window. If pickupTime is null, the package needs to be picked up as soon as possible.

dropoffTime (object, optional)

Check provider availability based on drop-off time. If not provided, the system uses the appropriate time window. If dropoffTime is null, the package needs to be dropped off as soon as possible after pickup.

options (object, optional)

Override default configured rate options set for the business.

packages (array of objects, optional)

Package dimensions, weight, and quantity details for accurate estimates. For shipping type orders, packages are converted to shipments with applicable providers.

isSpirit (boolean, optional)

Indicates if the order contains spirits.

isBeerOrWine (boolean, optional)

Indicates if the order contains beer or wine.

isTobacco (boolean, optional)

Indicates if the order contains tobacco.

isFragile (boolean, optional)

Indicates if the order contains fragile items.

isRx (boolean, optional)

Indicates if the order contains medical prescription (Rx) items.

hasRefrigeratedItems (boolean, optional)

Indicates if the order contains refrigerated items.

hasPerishableItems (boolean, optional)

Indicates if the order contains perishable items.

itemList (array of objects, optional)

List of items in the order. Improves post-purchase experiences. If packages is absent, cubic dimensions and weight will be derived from this list.

matchProviderTags (array of strings, optional)

Rates for providers matching at least one tag from the requested tags are returned.

orderAttributes (json, optional)

Configurable key-value pairs of custom order attributes.

matchLocationTags (array of strings, optional)

Rates for locations matching at least one tag from the requested location tags are returned.

proposedProviders (array, optional)

Override orchestration and get rates with the specified Provider and Service.

Example Request (Shell)

curl --request POST \
     --url https://sandbox.api.deliverysolutions.co/api/v2/rates \
     --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'

Example Scenarios

  • 200 - Rate call with bare minimum fields
  • 200 - Provider does not provide estimates
  • 200 - Delivery Rate Call with delivery address and pick up and drop off times
  • 200 - Rate call with multiple stores
  • 200 - Display winning rates
  • 200 - Rate call with no orchestration
  • 200 - Using provider tags
  • 200 - No Provider available to deliver the order
  • 200 - Using location tags
  • 200 - Rate Call with ASAP pickup and dropoff times
  • 200 - Rate Call Response With Zone Information & Surcharge Details
  • 400 - Result