Shipping Options API Routes
A shipping option is a way of shipping an item to or from the customer.
During the checkout flow, the customer selects their preferred shipping option to receive their order.
These API routes allow customers to retrieve available shipping options for their context.
GET /store/shipping-options#
List Shipping Options for Cart
Retrieve a list of shipping options for a cart. The cart's ID is set in the required cart_id query parameter.
The shipping options also be sorted or paginated.
For a shipping option whose price_type is calculated, the returned amount isn't reliable, as its price is computed on the fly by the fulfillment provider. To retrieve its price, use the Calculate Shipping Option Price API route.
Authentication: none.
Header parameters
x-publishable-api-keystringx-medusa-localestringOptionalen-USQuery parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.offsetnumberOptionallimitnumberOptionalorderstringOptional-.cart_idstring$andobject[]Optional$orobject[]Optionalis_returnbooleanOptionallocalestringOptionalen-USRequest examples
Responses
200 OK
shipping_optionsobject[]The list of shipping options.
shipping_optionsobject[]400, 401, 404, 409, 422, 500: an error response is returned.
POST /store/shipping-options/{id}/calculate#
Calculate Shipping Option Price
Calculate the price of a shipping option in a cart. Use this API route for shipping options whose price_type is calculated, as their price isn't stored but computed on the fly by the associated fulfillment provider against the cart.
If the fulfillment provider fails to calculate the price, this route returns an error.
Authentication: none.
Path parameters
idstringHeader parameters
x-publishable-api-keystringx-medusa-localestringOptionalen-USQuery parameters
localestringOptionalen-USfieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. Without prefix it will replace the entire default fields.Request body (application/json)
cart_idstringdataobjectOptionalRequest examples
Responses
200 OK
shipping_optionobjectThe shipping option's details.
shipping_optionobject400, 401, 404, 409, 422, 500: an error response is returned.