Generate a list of delivery options
Generates a list of delivery options based on the provided cart or order details.
Documentation Index
Fetch the complete documentation index at: https://sendcloud.dev/llms.txt
Use this file to discover all available pages before exploring further.
- 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.Which Dynamic Checkout configuration is used?
This endpoint uses the currently active Dynamic Checkout configuration for the authenticated API integration. Unlike previous Dynamic Checkout endpoints, you do not need to provide aconfiguration_id in the URL. Instead, the configuration is determined by the API integration used to authenticate the request. When you publish a Dynamic Checkout configuration in the Sendcloud platform, it becomes the active configuration for the selected API integration.
An API integration can have only one published Dynamic Checkout configuration at a time. If the authenticated API integration does not have a published configuration, this endpoint returns a 400 response.
How can I create a shipment out of the selected delivery option?
Thecheckout_identifier field of the selected delivery option contains the shipping option code required to create a shipment.
To create and announce the shipment, 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.
Body
Request body for searching delivery options based on cart or order details
The total weight of the cart or order. Used to select the most suitable shipping option.
The total price of the cart or order, specified in the currency of the checkout configuration. Used to calculate the shipping rate and determine free shipping eligibility.
The sender address for the shipment. You can either provide a sender_address_id to reference a pre-configured sender address, or provide address fields directly with at least country_code.
- Address Object
- Sender Address ID
The recipient's address. Must include at least country_code. Providing postal_code enables more precise delivery options via Checkout Rules.
The dimensions of the parcel. All properties are optional. Can be used with Checkout Rules to control which delivery options are displayed during checkout.
A free-form object for passing key-value pairs related to the cart or order (maximum 5 keys, each value up to 128 characters).
To use metadata with existing Checkout Rules, pass the value under the checkout_metadata key. This maps to the existing checkout_metadata rule condition.
Support for arbitrary metadata keys in Checkout Rules will be added separately.
{ "checkout_metadata": "electronics" }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"
}
]