Getting Shipping Charges of Order Item

Getting Shipping Charges of Order Item

deepaksamria
Tourist
13 0 3

Hi All,

 

We are integrating Shopify with one of our stores, but we are facing one issue. It would be great if someone helped me out there.

 

The issue is, if there is more than one order item in an order, then how to find the shipping charges applied to each order item? We are getting a cumulative amount only.

 

Is there any API for that...I tried but I didn't any API which provide me with this information.

 

Regards

Deepak

Replies 3 (3)

ShopifyDevSup
Shopify Staff
1451 238 497

Hi @deepaksamria can you please provide us with more information on what charges you are referring to? or some details of an example. The shipping charges aren't normally allocated per line item, unless you are referring to Multi Location Fulfillment? But we need an example to understand the request better thank you. 

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us 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

deepaksamria
Tourist
13 0 3

Hi @ShopifyDevSup , thanks for the response. 

 

So the example is like we have two products:

Product 1 - Cost 100  & Shipping 50

Product 2 - Cost 200 & Shipping 80

Now, if a customer places one order with two line items Product 1  & Product 2, then the order total will be 430. Now our requirement is we need to fetch shipping charges as 50 for line item Product 1 and 80 for line item Product 2. Is there any API to do so? As of now, we are getting 130 in the shipping_lines JSON of the order.

 

ShopifyDevSup
Shopify Staff
1451 238 497

At this time, shipping charges are not allocated by line item on the orders resource. One option would be to use the ShippingZone resource to estimate the shipping rate for each item, however this will not necessarily reconcile with the shipping charge actually paid on the order. 

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us 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