Retrieve a list of delivery options
The options returned by this endpoint are based on the delivery methods previously configured in addition to cart or order information, such as parcel weight, total order value, destination country, and more.
Why is this endpoint deprecated?
We’ve introduced a simpler, more flexible way to fetch delivery options, and we’re focusing future Dynamic Checkout improvements there. With the Generate a list of delivery options endpoint, you no longer need to keep track of a configuration ID or pass it in the URL. It automatically picks up the Dynamic Checkout configuration you’ve published for your API integration, so there’s nothing to hardcode and your checkout always reflects your latest published setup. It also accepts your cart and order details in a request body instead of as query parameters. This makes room for richer, nested information today and lets us keep adding new Dynamic Checkout features over time.- Log in to your Sendcloud account and navigate to the Dynamic Checkout tab.
- Select your API integration from the Shops section to customize your delivery options.
- When you’re done, click Publish to connect your configuration to the selected API integration.
How do delivery options correspond to configured delivery methods?
This API returns one delivery option per carrier configured in Dynamic Checkout. If a delivery method is configured with multiple carriers, then multiple delivery options will be returned - one per carrier. In cases when delivery options correspond to the same delivery method, delivery options’ ids will refer to the same delivery method id, leaving API users with a flexibility to perform grouping based on a delivery method id, if desired.How can I create a shipment out of the selected delivery option?
Use thecheckout_identifier_type=shipping_option_code parameter when requesting delivery options.
This makes the checkout_identifier field of the selected delivery option contain the shipping option code required for creating a shipment.
To proceed, call the Create and announce a shipment asynchronously endpoint,
setting ship_with.type to "shipping_option_code" and ship_with.properties.shipping_option_code to the value of the checkout_identifier field.Authorizations
Basic Authentication using API key and secrets is currently the main authentication mechanism.
Path Parameters
The unique ID of the checkout configuration used to retrieve delivery options
"465e2fe8-4589-4ae2-b49c-0c64153e5169"
Query Parameters
The total weight of the cart or order, specified in grams by default. This parameter is used to select the most suitable shipping option.
x >= 12500
The total price of the cart or order, specified in the currency of the checkout configuration. This parameter is used to calculate the shipping rate if rates are configured for the delivery method. It can also be used to determine if free shipping is applicable based on the configured pricing rules.
1"45.90"
The sender's country code for the shipment, formatted as an ISO 3166-1 alpha-2 code A country represented by its ISO 3166-1 alpha-2 code
"NL"
The recipient's country code for the shipment, formatted as an ISO 3166-1 alpha-2 code A country represented by its ISO 3166-1 alpha-2 code
"NL"
Specifies how to retrieve the shipping label. Currently, only the shipping_option_code type is supported. When this type is used, the checkout_identifier field in each delivery option contains the shipping option code, which is required to create and announce a shipment asynchronously.
shipping_option_code The recipient's postal code. Use this in combination with Checkout Rules to show or hide delivery options for specific locations.
15"5611EM"
The parcel's length in centimeters (e.g., "48" or "52.3")
48
The parcel's width in centimeters (e.g., "48" or "52.3")
48
The parcel's height in centimeters (e.g., "48" or "52.3")
48
An arbitrary text field that can be used with Checkout Rules to control which delivery options are displayed during checkout. For example, you might use it to pass a product SKU, goods category, or any other custom property to show or hide specific delivery options during checkout
128"demo_sku_12345"
Response
Successful Response
Delivery options response
The unique ID of the checkout configuration used to generate the delivery options in the response
"bae462c1-d659-48d0-aacd-fb7e3550de14"
A list of delivery options available for the given cart or order details. Each delivery option corresponds to a configured delivery method and includes detailed information, such as shipping rates, delivery dates, and carrier information.
[
{
"id": "ec9ce3b9-7d3f-4298-bc1c-8f3aaa8d27e9",
"title": "Same day delivery",
"internal_title": "same_day_delivery_trunkrs",
"description": "Order now and get your delivery today!",
"delivery_method_type": "same_day_delivery",
"cut_off_time": "2024-11-27T15:00:00+01:00",
"checkout_identifier": {
"type": "shipping_option_code",
"value": "trunkrs:same_day"
},
"shipping_rate": { "value": "5.00", "currency": "EUR" },
"carrier": {
"code": "trunkrs",
"name": "Trunkrs",
"logo_url": "https://sendcloud-prod-scp-static-files.s3.amazonaws.com/trunkrs/img/logo.svg"
},
"delivery_dates": [
{
"delivery_date": "2024-11-27T15:00:00+01:00",
"parcel_handover_date": "2024-11-27T15:00:00+01:00"
}
],
"lead_time_hours": {
"p10": 0,
"p20": 0,
"p30": 0,
"p40": 0,
"p50": 0,
"p60": 0,
"p70": 0,
"p80": 24,
"p90": 24,
"p95": 24
},
"sustainability_rating": "low"
}
]