Skip to content

List the shipping options of a cart's order

GET
/carts/{url_key}/orders/{order_id}/available-shipping-methods
curl --request GET \
--url https://acme.mykreezalid.com/front_api/v1/carts/k3v9q2m8x1c7z5b4n6t0p2r8s1d3f7/orders/4242/available-shipping-methods \
--header 'Authorization: Bearer <token>'

Returns the shipping options the buyer can choose for one order of the cart that is not checked out yet, with the amount each would cost for that order. When the order’s items belong to a logistic category, the options are the rates set for that category. Requires a token; a member’s cart only accepts that member’s token. When you send a token and the cart is a guest cart, the cart (and the guest’s other carts and orders) is attached to the signed-in member first.

url_key
required
string

The cart’s url_key, returned when the cart is created.

Example

k3v9q2m8x1c7z5b4n6t0p2r8s1d3f7
order_id
required
integer

Id of one of the cart’s orders (orders[].id in GET /carts/{url_key}).

Example

4242

The shipping options.

Media typeapplication/json
object
shipping_rates
Array<object>

A shipping option the buyer can choose for one order of a cart, with what it costs for that order. When a custom shipping amount was forced on the order, every amount is null: the order keeps the forced amount whatever option is chosen.

object
id

For ShippingRate and CustomShippingRate, the id of the shipping method: send it as shipping_method_id to PATCH /carts/{url_key}/orders/{order_id}/shipping-method. For LogisticCategoriesShippingRate and CustomLogisticCategoriesShippingRate, the id of the rate of the order’s logistic category for that shipping method, which is not a shipping method id.

integer
object

ShippingRate: the shipping method’s own price. LogisticCategoriesShippingRate: the price set for the order’s logistic category. The Custom variants are returned instead when a custom shipping amount was forced on the order.

string
Allowed values: ShippingRate CustomShippingRate LogisticCategoriesShippingRate CustomLogisticCategoriesShippingRate
title

Name of the shipping method.

string
description

Description of the shipping method.

string
nullable
shipping_amount

Shipping amount for this order: the initial price, plus the additional-item price for each unit after the first. 0 when the order reaches the free-shipping threshold. null when a custom shipping amount was forced on the order.

number format: float
nullable
currency

Currency of the marketplace (ISO 4217 code).

string
free_shipping

Whether the order ships for free with this option. Only set for logistic-category rates; null otherwise.

boolean
nullable
shipping_rate_attributes

How shipping_amount is computed. Every value is null when a custom shipping amount was forced on the order.

object
initial_price

Price for the first unit.

number format: float
nullable
additionnal_item_step_price

Price added for each unit after the first (the field name is spelled this way).

number format: float
nullable
free_shipping_threshold

Order amount from which shipping is free. Only set for logistic-category rates that have one; null otherwise.

number format: float
nullable

Example

{
"shipping_rates": [
{
"id": 12,
"object": "ShippingRate",
"title": "Standard delivery",
"description": "Delivered in 3 to 5 working days",
"shipping_amount": 6.9,
"currency": "EUR",
"free_shipping": false,
"shipping_rate_attributes": {
"initial_price": 4.9,
"additionnal_item_step_price": 1,
"free_shipping_threshold": 100
}
}
]
}

No token or an invalid one, the order is not a pending order of this cart, or no shipping method is available for it (with code, status and message); or the cart belongs to another member (with success and error).

Media typeapplication/json
One of:

Error body returned by the Front API when it refuses a request.

object
code

HTTP status code, repeated in the body.

integer
status
string
message

Human-readable reason.

string

Example

{
"code": 403,
"status": "error",
"message": "Token not found in request"
}

No open cart has this key: it does not exist or is closed.

Media typeapplication/json

Error body returned by several cart endpoints.

object
success

Error body of the cart endpoints that report success and error.

boolean
error

Human-readable reason.

string

Example

{
"success": false,
"error": "Cart not found"
}