Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Shipping Cost Per Line Item

Shipping Cost Per Line Item

RSEDev
Shopify Partner
1 0 1

Using the Admin Rest API how can we get the individual shipping costs from an Order with Multiple Line Items.

 

We have orders with 7+ line items using different rates / fulfilment locations but only ever see 1 shipping line with all of this aggregated. How can we get the individual costs

 

We've seen similar questions with no answers here:

 

Multiple shipping lines on order confirmation email
https://community.shopify.com/c/payments-shipping-and/multiple-shipping-lines-on-order-confirmation-...

 

Multiple Shipping Lines
https://community.shopify.com/c/fulfillment-and-inventory/multiple-shipping-lines/m-p/2277182

 

Hopefully this is possible, any help would be greatly appreciated.

 

Thanks

Replies 2 (2)

Liam
Community Manager
3108 344 899

Not with REST but with GraphQL, you could use the order query like this:

 

query GetOrderShippingCosts($orderId: ID!) {
  order(id: $orderId) {
    shippingLines {
      id
      title
      price {
        shopMoney {
          amount
          currencyCode
        }
      }
    }
  }
}

 

Liam | Developer Advocate @ 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

dave_shipperhq
Shopify Partner
80 3 8

Hi @RSEDev - I believe the new split shipping feature that is being rolled out may be helpful for you. Give it a try if it's available for you.