Carrier Service API - Product and package dimentions

Highlighted
New Member
1 0 1

Hi there,

I'm creating a Carrier Service Integration to calculate my Shipping Rate.

So, When my service endpoint receives the Shopify Shipping Rate request, it does not send my package and product dimensions, like width, height, and length.

I would like to know how can I get this information sent by Shopify request to can calculate my shipping rate correctly.

Thank you

 

1 Like
Highlighted
Shopify Staff (Retired)
Shopify Staff (Retired)
624 103 124

Hi @icastilho ,

 

Shopify natively does not keep track of a line item's height, width, and length, so that information by default is not included in the shipping rates POST request that Shopify makes to your Carrier Service app.

 

In order to get this information, as the merchant you need to update the "properties" field of each line item in the cart to have this information. So it would look something like this:

 

$.post('/cart/add.js', {
  quantity: 1,
  id: 12345,
  properties: {
    'Dimensions': '10x20x30'
  }
});

 

Once you populate the "properties" field of the line items in your cart, you will see that information be passed in the shipping rates POST request Shopify will send to your Carrier Service app, and now your app can use that information to calculate shipping rates more effectively

 

Hassain | Developer Support Specialist @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes