Retrieve a list of delivery options
GET {{baseUrl}}/checkout/configurations/:configuration_id/delivery-options?weight=<integer>&value=<string>&from_country=SG&to_country=SG&checkout_identifier_type=method_id&to_postal_code=<string>&parcel_length=<number>&parcel_width=<number>&parcel_height=<number>&checkout_metadata=<string>
To use this API, you first need to create your own Dynamic Checkout configuration in the Sendcloud panel.
To get started, take the following steps:
- Login to your Sendcloud account and click the Dynamic Checkout tab.
- Select your API integration from the Shops menu to customize your delivery options.
- When you're done, click Publish to apply your configuration to your API integration.
This API allows you to let your customers pick delivery options. The options returned via this endpoint are based on the delivery methods they previously configured, in addition to cart/order information, for example — parcel weight, total order value, destination country, etc.
Then you can present the returned delivery options to your customer on your checkout page, where they can select their preferred one for their order.
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.
Only Service point delivery method currently allows selection of multiple carriers. Hence, multiple delivery options will be returned only for a delivery method of this type.
How can I create a parcel out of the selected delivery option?
You'll need to make an API call to the Create a parcel endpoint, passing request_label=true
and shipping_method_id=checkout_identifier.value
, where the checkout_identifier
field refers to the identifier of the selected delivery option.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
weight | string | (Required) Total order/cart weight in grams | |
value | string | (Required) Total order/cart price value | |
from_country | string | (Required) The sender country of the shipment, as an ISO 3166-1 alpha-2. | |
to_country | string | (Required) The receiver country of the shipment, as an ISO 3166-1 alpha-2. | |
checkout_identifier_type | string | Defines the way of getting the shipping label via Sendcloud. Currently, we only support the method_id type, therefore, in every delivery option you will find the checkout_identifier object. This contains the shipping method ID, which is used to <a href="https://api.sendcloud.dev/docs/sendcloud-public-api/parcels/operations/create-a-parcel">**Create a parcel**</a> and retrieve the shipping label. | |
to_postal_code | string | Postal code of the recipient. This field can be used in combination with Checkout Rules to show or hide delivery options in certain locations. | |
parcel_length | string | Parcel length in centimeters. Examples: “48” or “52.3” | |
parcel_width | string | Parcel width in centimeters. Examples: “48” or “52.3” | |
parcel_height | string | Parcel height in centimeters. Examples: “48” or “52.3” | |
checkout_metadata | string | Arbitrary text data that can be used in combination with Checkout Rules to show or hide delivery options based on the value provided. For example, it can be used to filter delivery options based on the product SKU |
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Accept | string |
RESPONSES
status: OK
{"configuration_id":"\u003cuuid\u003e","delivery_options":[{"id":"\u003cuuid\u003e","title":"\u003cstring\u003e","internal_title":"\u003cstring\u003e","description":"\u003cstring,null\u003e","delivery_method_type":"nominated_day_delivery","cut_off_time":"\u003cstring,null-date-time\u003e","checkout_identifier":{"type":"method_id","value":"\u003cinteger\u003e"},"shipping_rate":{"value":"\u003cstring,null\u003e","currency":"\u003cstring\u003e"},"carrier":{"code":"dp","name":"\u003cstring\u003e","logo_url":"\u003curi\u003e"},"delivery_dates":null},{"id":"\u003cuuid\u003e","title":"\u003cstring\u003e","internal_title":"\u003cstring\u003e","description":"\u003cstring,null\u003e","delivery_method_type":"nominated_day_delivery","cut_off_time":"\u003cstring,null-date-time\u003e","checkout_identifier":{"type":"method_id","value":"\u003cinteger\u003e"},"shipping_rate":{"value":"\u003cstring,null\u003e","currency":"\u003cstring\u003e"},"carrier":{"code":"correos_express","name":"\u003cstring\u003e","logo_url":"\u003curi\u003e"},"delivery_dates":null}]}