I am building a sales channel, which users can install. Using Shopify REST API, I can get product details… but I am not sure how to get the shipping cost of a product?
I am building a sales channel, which users can install. Using Shopify REST API, I can get product details… but I am not sure how to get the shipping cost of a product?
2
Answers
Using Shopify REST API you can try to access
/shipping_zones.json
endpoint and calculate the shipping cost based on cart items details and customer’s address.More details can be found here: ShippingZone API.
There’s no direct link to this resource on the Shopify REST API reference docs (thanks Hooman Bahreini for finding that), so it looks like Shopify wants you to use GraphQL delivery profiles now.
In recent shopify api version update you can get more control over shipping rules. You can create per product shipping rules with new Delivery Profiles API. Please go through Delivery Api.