Admin Rest api get the shipping for an order

Hi everyone,

I’m currently developing an app for a client to integrate Shopify with their Drupal Commerce site. Drupal Commerce requires retrieving shipping options for the cart before creating an order.

I’ve found the shipping_zones.json call, but when I filter the zones according to the specifics of my cart items, I get 64 shipping options. My client mentioned that their Shopify site only shows 2 shipping options for the same cart.

Is there a more effective way to determine which shipping options should be displayed to the end user?

I appreciate any assistance you can provide.

Thank you!

Best regards,

Ben

Hi Ben,

It may be easier to achieve this with the GraphQL API using the availableCarrierServices query. You could test this with the GraphiQL app to see if it works for your use case. You could also look into using the Delivery Customization API too.

1 Like