edit_delivery_option

Updated September 9, 20262 min read

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 null to clear a field.
  • Arrays replace wholesale — no element merging.

Parameters

NameTypeRequiredDescription
delivery_option_idstringYesDelivery option ID.
tenantIdstringYes
carrier_account_idstringNo
codestringNoTenant-unique delivery option code.
customerobjectNo
customer_collection_locationsarrayNoCOLLECTION 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_distanceobjectNo
delivery_estimationobjectNo
delivery_methodstringNoDIGITAL clears carrier_account_id; non-COLLECTION methods clear customer_collection_locations and customer_collection_max_distance (server-side normalisation). Values: DELIVERY, COLLECTION, DIGITAL.
descriptionstringNo
fulfillment_locationsarrayNoLocation IDs eligible to fulfil this delivery option.
image_urlstringNo
item_product_categoriesobjectNoItem-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.
merchantstringNo
namestringNo
order_valueobjectNo
payment_typeobjectNo
product_categoriesobjectNoOrder-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.
scheduleobjectNo
shipping_feeobjectNoShipping fee configuration. PASS_THROUGH without a carrier_account_id on the delivery option is silently downgraded to FREE_OF_COST by the backend.
statusstringNoDefaults to ACTIVE. Values: ACTIVE, INACTIVE.
weightobjectNo

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
)

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.