Connections

Update order policy

Turns the order policy on or off, or changes its warehouse.

PATCH
/v1/connections/{id}/order-policy

Send inventory.enabled, inventory.warehouseId or both. A body with neither is 400.

  • enabled: false stops moving stock per order. Reservations that already exist finish normally (write-off on shipment, release on cancellation): turning it off only affects new reservations.
  • enabled going from false to true moves enabledSince to now: the past is not reprocessed.
  • warehouseId: null goes back to the seller's default warehouse. Without the field, the current warehouse stays.

Errors: 404 if the warehouse does not exist or belongs to another seller; 409 with details.reason = "warehouse_archived" if it is archived. It works on a Connection in any status, revoked included: that is how you free a warehouse to archive it.

The change fires the connection.updated webhook. See the effect of each state in Stock. Part of the order lifecycle.

Authorization

api_key
headerAuthorizationBearer <token>

API key (mk_...)

Path Parameters

id*string

Identifier of the resource, as returned by the API.

Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid

Request Body

application/json
  1. body

Changes the order policy of this connection.

inventory*

The inventory settings to change. Send at least one field.

Response Body

The policy after the change. Emits connection.updated. Works in any connection status, so a revoked connection can release its warehouse.

application/json
  1. response

What the orders of this connection do beyond being stored.

inventory*

How orders move the stock of linked variants.

curl -X PATCH "https://example.com/v1/connections/3d1c8a52-7f0e-4b0a-8a65-9c1b2f6d7e01/order-policy" \  -H "Content-Type: application/json" \  -d '{    "inventory": {      "enabled": true,      "warehouseId": "5b6c7d8e-9f0a-4b1c-8d2e-3f4a5b6c7d8e"    }  }'
{  "inventory": {    "enabled": true,    "warehouseId": "5b6c7d8e-9f0a-4b1c-8d2e-3f4a5b6c7d8e",    "enabledSince": "2026-11-14T12:00:00.000Z"  }}