When to use it
- A custom or headless webshop with its own checkout
- An app that needs shipping prices before it creates a shipment
- A checkout where one flat rate is not enough
Request
Send the cart and destination toPOST /orgs/{orgId}/shipping-quote:
price is the unit price in the smallest currency unit (øre for DKK, cents for EUR), and grams is the unit weight. Add totalPriceCents with the cart total after discounts if your shipping rules look at the order value.
Response
destination.country. Every rule whose Shipping conditions match the cart becomes one rate, named after the rule and priced by its matching condition (the lowest price, if several match). totalPrice is in the smallest currency unit, as a string. When no rule matches, you get { "rates": [] }, so show a fallback at checkout in that case.
The full field list is in Shipping quotes and the API reference.
Requirements
- At least one connected carrier
- At least one shipping rule for the countries you ship to. The rules decide which rates appear and what they cost.
- An API token with the
read:shipping_rulespermission. See the REST API quickstart.
Next steps
Shipping rules
Choose which carrier products are offered by weight, value and country.
API reference
Full request and response details, with a playground.