create_delivery_option

Updated August 7, 20262 min read

Create a delivery option via POST /delivery-options.

Parameters

NameTypeRequiredDescription
tenantIdstringYesThe tenant.
codestringYesTenant-unique delivery option code.
namestringYesDisplay name.
delivery_methodstringYesValues: DELIVERY, COLLECTION, DIGITAL.
merchantstringYesMerchant the option belongs to.
statusstringNoValues: ACTIVE, INACTIVE. Defaults to ACTIVE.
descriptionstringNo
image_urlstringNo
carrier_account_idstringNoCarrier account used to fulfil the option.
scheduleobjectNoworking_days, working_period, blackout_days, schedule_by (BOOKED_DATE | ORDER_DATE).
shipping_feeobjectNopricing_strategy (FREE_OF_COST | PAID | PASS_THROUGH), calculation_method (FIXED_PRICE | TIERED_ORDER_VALUE), default_currency, pricing[] (currency, amount, tiers[]).
delivery_estimationobjectNodynamic_estimation_enabled, service_level.
order_valueobjectNoCondition — min_value / max_value.
weightobjectNoCondition — min_value / max_value.
payment_typeobjectNoCondition — operator, value[].
customerobjectNoCondition — operator, value[] of country + state_cities.
product_categoriesobjectNoCondition — includes[] / excludes[].
fulfillment_locationsstring[]NoLocation IDs eligible to fulfil this option.
customer_collection_locationsstring[]NoCOLLECTION only — see the notes below.
customer_collection_max_distanceobjectNovalue + 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"
)

Notes

The backend normalises the payload server-side:

  • DIGITAL clears carrier_account_id.
  • Non-COLLECTION methods clear customer_collection_locations and customer_collection_max_distance.
  • A PASS_THROUGH shipping fee without carrier_account_id silently downgrades to FREE_OF_COST.
  • For COLLECTION, every listed collection location must already be enabled as a customer collection location, otherwise the request is rejected. An empty customer_collection_locations list means any eligible collection-enabled location.