create_delivery_option
Updated August 7, 20262 min read
Create a delivery option via POST /delivery-options.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
tenantId | string | Yes | The tenant. |
code | string | Yes | Tenant-unique delivery option code. |
name | string | Yes | Display name. |
delivery_method | string | Yes | Values: DELIVERY, COLLECTION, DIGITAL. |
merchant | string | Yes | Merchant the option belongs to. |
status | string | No | Values: ACTIVE, INACTIVE. Defaults to ACTIVE. |
description | string | No | — |
image_url | string | No | — |
carrier_account_id | string | No | Carrier account used to fulfil the option. |
schedule | object | No | working_days, working_period, blackout_days, schedule_by (BOOKED_DATE | ORDER_DATE). |
shipping_fee | object | No | pricing_strategy (FREE_OF_COST | PAID | PASS_THROUGH), calculation_method (FIXED_PRICE | TIERED_ORDER_VALUE), default_currency, pricing[] (currency, amount, tiers[]). |
delivery_estimation | object | No | dynamic_estimation_enabled, service_level. |
order_value | object | No | Condition — min_value / max_value. |
weight | object | No | Condition — min_value / max_value. |
payment_type | object | No | Condition — operator, value[]. |
customer | object | No | Condition — operator, value[] of country + state_cities. |
product_categories | object | No | Condition — includes[] / excludes[]. |
fulfillment_locations | string[] | No | Location IDs eligible to fulfil this option. |
customer_collection_locations | string[] | No | COLLECTION only — see the notes below. |
customer_collection_max_distance | object | No | value + unit (km | mi). |
Returns
The created delivery option record, including its generated id.
Example agent prompt
"Set up a click & collect delivery option for ACME."
create_delivery_option(
tenantId="…",
merchant="ACME",
code="click-collect",
name="Click & Collect",
delivery_method="COLLECTION"
)
Related tools
list_delivery_optionsget_delivery_optionedit_delivery_optionget_locations— use thecollection_locationfilter to find eligible collection locations.
Notes
The backend normalises the payload server-side:
DIGITALclearscarrier_account_id.- Non-
COLLECTIONmethods clearcustomer_collection_locationsandcustomer_collection_max_distance. - A
PASS_THROUGHshipping fee withoutcarrier_account_idsilently downgrades toFREE_OF_COST. - For
COLLECTION, every listed collection location must already be enabled as a customer collection location, otherwise the request is rejected. An emptycustomer_collection_locationslist means any eligible collection-enabled location.