How to get delivery_range and estimated_time_in_transit values n shipping_rates api response

sumit_israni
New Member
12 0 0

In my app I am using shipping rates api for get the rates from the checkout. In the response , I am seeing the delivery_range and estimated_time_in_transit but both the fields values coming null. currently, I am using test shopify payment. so on the store admin there is a setting so that I can get the values of delivery_range and estimated_time_in_transit or it is currently in testing mode thats why the values coming on api is null. Please let me know, how can I get the values of delivery_range and estimated_time_in_transit in the api response?

See the below API and its response

GET https://the-great-gambler.myshopify.com/admin/api/2020-04/checkouts/ceb755a580917b8967e485f0f79e372c...

Response:

{
"shipping_rates":
{
"id": "shopify-Standard-4.90"
"price": "4.90"
"title": "Standard"
"checkout": {
"total_tax": "0.00"
"total_price": "44.80"
"subtotal_price": "39.90"
}

"phone_required": false
"delivery_range": null
"estimated_time_in_transit": null
"handle": "shopify-Standard-4.90"
}

{
"id": "shopify-Expedited-9.90"
"price": "9.90"
"title": "Expedited"
"checkout": {
"total_tax": "0.00"
"total_price": "49.80"
"subtotal_price": "39.90"
}

"phone_required": false
"delivery_range": null
"estimated_time_in_transit": null
"handle": "shopify-Expedited-9.90"
}


}

Reply 1 (1)
csam
Shopify Staff
Shopify Staff
267 40 43

Hi @sumit_israni 

Those fields will be populated by some carriers while using Shopify Shipping, however not all carriers provide this information.

CS | API Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog