edit_delivery_option
Edit a delivery option: fetches the current delivery option, merges your changes, and saves via PUT /delivery-options/{id} (the backend PUT is a full replace). Merge contract: top-level fields you pass replace the stored values; pass an explicit null to clear a field; arrays replace wholesale (no element merging). The same server-side normalisations as create_delivery_option apply (DIGITAL clears carrier_account_id; non-COLLECTION clears collection fields; PASS_THROUGH without carrier_account_id downgrades to FREE_OF_COST; empty customer_collection_locations means any eligible collection location).
Merge contract:
- Top-level fields you pass replace the stored values.
- Pass an explicit
nullto clear a field. - Arrays replace wholesale — no element merging.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
delivery_option_id | string | Yes | Delivery option ID. |
tenantId | string | Yes | — |
carrier_account_id | string | No | — |
code | string | No | Tenant-unique delivery option code. |
customer | object | No | — |
customer_collection_locations | array | No | COLLECTION only. Every listed location must already be enabled as a customer collection location (collection_location: true), otherwise the backend rejects it. An empty list means any eligible collection-enabled location. |
customer_collection_max_distance | object | No | — |
delivery_estimation | object | No | — |
delivery_method | string | No | DIGITAL clears carrier_account_id; non-COLLECTION methods clear customer_collection_locations and customer_collection_max_distance (server-side normalisation). Values: DELIVERY, COLLECTION, DIGITAL. |
description | string | No | — |
fulfillment_locations | array | No | Location IDs eligible to fulfil this delivery option. |
image_url | string | No | — |
item_product_categories | object | No | Item-level category condition, evaluated per cart item rather than for the whole cart. includes = the option applies only to items in these categories; excludes = items in these categories cannot use it. Non-matching items are returned with availability NONE, and the option is omitted entirely when no item matches. |
merchant | string | No | — |
name | string | No | — |
order_value | object | No | — |
payment_type | object | No | — |
product_categories | object | No | Order-level category condition: the option applies to the whole cart only when the cart matches. includes = the cart must contain at least one item in these categories; excludes = the option is skipped when any item is in these categories. |
schedule | object | No | — |
shipping_fee | object | No | Shipping fee configuration. PASS_THROUGH without a carrier_account_id on the delivery option is silently downgraded to FREE_OF_COST by the backend. |
status | string | No | Defaults to ACTIVE. Values: ACTIVE, INACTIVE. |
weight | object | No | — |
Returns
The updated delivery option record.
Example agent prompt
"Rename the express option to 'Express (next day)' and remove its weight condition."
edit_delivery_option(
tenantId="…",
delivery_option_id="a1b2c3",
name="Express (next day)",
weight=null
)
Related tools
Notes
The same server-side normalizations as
create_delivery_option
apply. Switching delivery_method away from COLLECTION clears the
customer collection fields, and switching to DIGITAL clears
carrier_account_id.