Hi,
I'm developing a custom app and I'm trying to create a draft order with the calculation of shipping via API.
The problem is that I don't have the shipping rates options.
How can I get the shipping rates of a specific draft order?
like there is in checkout api?
Solved! Go to the solution
Hey @zivmiz,
Just wanted to let you know we're looking in to this. The documentation definitely makes it seem like you can calculate shipping rates using this endpoint, but to be honest I don't remember ever seeing that and I'm not seeing a way to do it now. I'll post back here when I have an update for you.
JB | Developer 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
I'm also facing this issue. I need to get the shipping rates for a draft order to be able to set the shipping_line of the draft order. Any updates on this?
Hey guys,
Just want to throw my two cents in here! I've also been trying to get this to work based on what I read in the docs, but I can't figure it out. Seems like I'm not alone! Any word on a possible fix?
This is an accepted solution.
I did find a way to get this working. Take a look at the Checkouts API. There is an endpoint to shipping_rates.json that returns the shipping rates. All you need is the checkout token. I was able to get this from the draft order's invoice URL. For example, draft order invoice URL: https://apple.myshopify.com/690933842/invoices/d64d93d528cfc75c0876183d58f4a has checkout token: d64d93d528cfc75c0876183d58f4a.
https://shopify.dev/docs/admin-api/rest/reference/sales-channels/checkout?api[version]=2020-04
Thanks for that follow up! I'm going to give it a try now. Out of curiosity, are you a "Sales Channel"?
User | Count |
---|---|
13 | |
12 | |
10 | |
8 | |
7 |