# Plan an inbound delivery or allocate an expected quantity

[All field references](/en/developers/field-reference) · [Inbound deliveries](/en/developers/fields-group-inbound-deliveries)

`POST /v1/inbounds/commands`

Runs only the operations documented here. Quantity, current owner/operator access, revision and idempotency are checked together. After an unclear outcome, read the original receipt or retry with exactly the same idempotency key. No automatic refund or Shopify publication.

Required scopes: `"inbound:announce"`.

[How to read these tables](/en/developers/field-reference#reading-the-field-tables)

## Request body

Request body required.

Content type: `application/json`

| Field | Type | Presence | null | Meaning, limits and examples |
| --- | --- | --- | --- | --- |
| $ (whole value) | object | Whole value | Not allowed | Additional properties are not allowed. |
| idempotency_key | string | Required when parent is present | Not allowed | New client UUID per command; after unclear outcomes retry the same UUID and arguments. format: `"uuid"`. |
| operation | alternative (anyOf) | Required when parent is present | Not allowed | Action to perform. Select kind first; only that variant determines which fields are required. |
| operation | object | Conditional: anyOf 1/7 | Not allowed | anyOf 1/7: At least one alternative must match. Applies to kind = `"announce"`. Action to perform. Select kind first; only that variant determines which fields are required. Additional properties are not allowed. |
| operation.kind | string | Required when parent is present | Not allowed | anyOf 1/7: At least one alternative must match. Applies to kind = `"announce"`. Kind selects required fields. const: `"announce"`. |
| operation.inbound_id | string | Required when parent is present | Not allowed | anyOf 1/7: At least one alternative must match. Applies to kind = `"announce"`. Inbound UUID: new on announce; reuse for reads/changes/retries. format: `"uuid"`. |
| operation.operator_organization_id | string | Required when parent is present | Not allowed | anyOf 1/7: At least one alternative must match. Applies to kind = `"announce"`. Offered authorized warehouse operator; grants no access. format: `"uuid"`. |
| operation.warehouse_id | string | Required when parent is present | Not allowed | anyOf 1/7: At least one alternative must match. Applies to kind = `"announce"`. Warehouse identifier from authorized options. format: `"uuid"`. |
| operation.reference | string | Required when parent is present | Not allowed | anyOf 1/7: At least one alternative must match. Applies to kind = `"announce"`. Displayed source-system reference. minLength: `1`. maxLength: `200`. |
| operation.destination_id | alternative (anyOf) | Optional | Allowed by schema | anyOf 1/7: At least one alternative must match. Applies to kind = `"announce"`. Allowed shop or publication destination; null means none. Default: `null`. |
| operation.destination_id | string | Conditional: anyOf 1/2 | Not allowed | anyOf 1/7: At least one alternative must match. Applies to kind = `"announce"`.; anyOf 1/2: At least one alternative must match. Allowed shop or publication destination; null means none. format: `"uuid"`. |
| operation.destination_id | null | Conditional: anyOf 2/2 | Allowed by schema | anyOf 1/7: At least one alternative must match. Applies to kind = `"announce"`.; anyOf 2/2: At least one alternative must match. Allowed shop or publication destination; null means none. |
| operation.customer_eta | alternative (anyOf) | Optional | Allowed by schema | anyOf 1/7: At least one alternative must match. Applies to kind = `"announce"`. Owner's arrival day and time zone; null means unspecified. Default: `null`. |
| operation.customer_eta | object | Conditional: anyOf 1/2 | Not allowed | anyOf 1/7: At least one alternative must match. Applies to kind = `"announce"`.; anyOf 1/2: At least one alternative must match. A local calendar day in this time zone. Additional properties are not allowed. |
| operation.customer_eta.date | string | Required when parent is present | Not allowed | anyOf 1/7: At least one alternative must match. Applies to kind = `"announce"`.; anyOf 1/2: At least one alternative must match. Calendar date as YYYY-MM-DD; interpret it in the accompanying time_zone. format: `"date"`. |
| operation.customer_eta.time_zone | string | Required when parent is present | Not allowed | anyOf 1/7: At least one alternative must match. Applies to kind = `"announce"`.; anyOf 1/2: At least one alternative must match. IANA time-zone name, for example Europe/Berlin; determines the local calendar day. minLength: `1`. maxLength: `100`. |
| operation.customer_eta | null | Conditional: anyOf 2/2 | Allowed by schema | anyOf 1/7: At least one alternative must match. Applies to kind = `"announce"`.; anyOf 2/2: At least one alternative must match. Owner's arrival day and time zone; null means unspecified. |
| operation.rule | alternative (anyOf) | Required when parent is present | Not allowed | anyOf 1/7: At least one alternative must match. Applies to kind = `"announce"`. Advance-availability rule for announced goods. The selected mode determines whether days or start must be supplied. |
| operation.rule | object | Conditional: anyOf 1/5 | Not allowed | anyOf 1/7: At least one alternative must match. Applies to kind = `"announce"`.; anyOf 1/5: At least one alternative must match. Applies to mode = `"inherit"`. Advance-availability rule for announced goods. The selected mode determines whether days or start must be supplied. Additional properties are not allowed. |
| operation.rule.mode | string | Required when parent is present | Not allowed | anyOf 1/7: At least one alternative must match. Applies to kind = `"announce"`.; anyOf 1/5: At least one alternative must match. Applies to mode = `"inherit"`. Mode; follow its required fields. const: `"inherit"`. |
| operation.rule | object | Conditional: anyOf 2/5 | Not allowed | anyOf 1/7: At least one alternative must match. Applies to kind = `"announce"`.; anyOf 2/5: At least one alternative must match. Applies to mode = `"disabled"`. Advance-availability rule for announced goods. The selected mode determines whether days or start must be supplied. Additional properties are not allowed. |
| operation.rule.mode | string | Required when parent is present | Not allowed | anyOf 1/7: At least one alternative must match. Applies to kind = `"announce"`.; anyOf 2/5: At least one alternative must match. Applies to mode = `"disabled"`. Mode; follow its required fields. const: `"disabled"`. |
| operation.rule | object | Conditional: anyOf 3/5 | Not allowed | anyOf 1/7: At least one alternative must match. Applies to kind = `"announce"`.; anyOf 3/5: At least one alternative must match. Applies to mode = `"override"`. Advance-availability rule for announced goods. The selected mode determines whether days or start must be supplied. Additional properties are not allowed. |
| operation.rule.mode | string | Required when parent is present | Not allowed | anyOf 1/7: At least one alternative must match. Applies to kind = `"announce"`.; anyOf 3/5: At least one alternative must match. Applies to mode = `"override"`. Mode; follow its required fields. const: `"override"`. |
| operation.rule.days | integer | Required when parent is present | Not allowed | anyOf 1/7: At least one alternative must match. Applies to kind = `"announce"`.; anyOf 3/5: At least one alternative must match. Applies to mode = `"override"`. Number of calendar days before the owner's arrival day at which announced goods become eligible; null disables the configured advance window where allowed. minimum: `0`. maximum: `365`. |
| operation.rule | object | Conditional: anyOf 4/5 | Not allowed | anyOf 1/7: At least one alternative must match. Applies to kind = `"announce"`.; anyOf 4/5: At least one alternative must match. Applies to mode = `"immediate"`. Advance-availability rule for announced goods. The selected mode determines whether days or start must be supplied. Additional properties are not allowed. |
| operation.rule.mode | string | Required when parent is present | Not allowed | anyOf 1/7: At least one alternative must match. Applies to kind = `"announce"`.; anyOf 4/5: At least one alternative must match. Applies to mode = `"immediate"`. Mode; follow its required fields. const: `"immediate"`. |
| operation.rule | object | Conditional: anyOf 5/5 | Not allowed | anyOf 1/7: At least one alternative must match. Applies to kind = `"announce"`.; anyOf 5/5: At least one alternative must match. Applies to mode = `"from_date"`. Advance-availability rule for announced goods. The selected mode determines whether days or start must be supplied. Additional properties are not allowed. |
| operation.rule.mode | string | Required when parent is present | Not allowed | anyOf 1/7: At least one alternative must match. Applies to kind = `"announce"`.; anyOf 5/5: At least one alternative must match. Applies to mode = `"from_date"`. Mode; follow its required fields. const: `"from_date"`. |
| operation.rule.start | object | Required when parent is present | Not allowed | anyOf 1/7: At least one alternative must match. Applies to kind = `"announce"`.; anyOf 5/5: At least one alternative must match. Applies to mode = `"from_date"`. Local day and time zone from which advance availability starts. Additional properties are not allowed. |
| operation.rule.start.date | string | Required when parent is present | Not allowed | anyOf 1/7: At least one alternative must match. Applies to kind = `"announce"`.; anyOf 5/5: At least one alternative must match. Applies to mode = `"from_date"`. Calendar date as YYYY-MM-DD; interpret it in the accompanying time_zone. format: `"date"`. |
| operation.rule.start.time_zone | string | Required when parent is present | Not allowed | anyOf 1/7: At least one alternative must match. Applies to kind = `"announce"`.; anyOf 5/5: At least one alternative must match. Applies to mode = `"from_date"`. IANA time-zone name, for example Europe/Berlin; determines the local calendar day. minLength: `1`. maxLength: `100`. |
| operation.lines | array | Required when parent is present | Not allowed | anyOf 1/7: At least one alternative must match. Applies to kind = `"announce"`. All selected lines; each must satisfy this action’s quantity/identity rules. minItems: `1`. maxItems: `100`. |
| operation.lines[] | object | Every array item | Not allowed | anyOf 1/7: At least one alternative must match. Applies to kind = `"announce"`. Additional properties are not allowed. |
| operation.lines[].id | string | Required when parent is present | Not allowed | anyOf 1/7: At least one alternative must match. Applies to kind = `"announce"`. Stable entry identifier. format: `"uuid"`. |
| operation.lines[].stock_item_id | string | Required when parent is present | Not allowed | anyOf 1/7: At least one alternative must match. Applies to kind = `"announce"`. Offered stock item ID for this owner/warehouse; not a SKU. format: `"uuid"`. |
| operation.lines[].unit | string | Required when parent is present | Not allowed | anyOf 1/7: At least one alternative must match. Applies to kind = `"announce"`. Exact offered unit; no implicit carton, weight or dimension conversion. const: `"piece"`. |
| operation.lines[].quantity | string | Required when parent is present | Not allowed | anyOf 1/7: At least one alternative must match. Applies to kind = `"announce"`. Positive decimal string in the stated unit. pattern: `"^(?=.*[1-9])(0\|[1-9]\\d{0,8})(\\.\\d{1,6})?$"`. |
| operation | object | Conditional: anyOf 2/7 | Not allowed | anyOf 2/7: At least one alternative must match. Applies to kind = `"amend"`. Action to perform. Select kind first; only that variant determines which fields are required. Additional properties are not allowed. |
| operation.kind | string | Required when parent is present | Not allowed | anyOf 2/7: At least one alternative must match. Applies to kind = `"amend"`. Kind selects required fields. const: `"amend"`. |
| operation.inbound_id | string | Required when parent is present | Not allowed | anyOf 2/7: At least one alternative must match. Applies to kind = `"amend"`. Inbound UUID: new on announce; reuse for reads/changes/retries. format: `"uuid"`. |
| operation.expected_version | integer | Required when parent is present | Not allowed | anyOf 2/7: At least one alternative must match. Applies to kind = `"amend"`. Latest-read version; stale versions rejected. minimum: `1`. maximum: `2147483647`. |
| operation.reference | string | Required when parent is present | Not allowed | anyOf 2/7: At least one alternative must match. Applies to kind = `"amend"`. Displayed source-system reference. minLength: `1`. maxLength: `200`. |
| operation.customer_eta | alternative (anyOf) | Required when parent is present | Allowed by schema | anyOf 2/7: At least one alternative must match. Applies to kind = `"amend"`. Arrival day supplied by the goods owner, with its time zone; null means not specified. |
| operation.customer_eta | object | Conditional: anyOf 1/2 | Not allowed | anyOf 2/7: At least one alternative must match. Applies to kind = `"amend"`.; anyOf 1/2: At least one alternative must match. A local calendar day in this time zone. Additional properties are not allowed. |
| operation.customer_eta.date | string | Required when parent is present | Not allowed | anyOf 2/7: At least one alternative must match. Applies to kind = `"amend"`.; anyOf 1/2: At least one alternative must match. Calendar date as YYYY-MM-DD; interpret it in the accompanying time_zone. format: `"date"`. |
| operation.customer_eta.time_zone | string | Required when parent is present | Not allowed | anyOf 2/7: At least one alternative must match. Applies to kind = `"amend"`.; anyOf 1/2: At least one alternative must match. IANA time-zone name, for example Europe/Berlin; determines the local calendar day. minLength: `1`. maxLength: `100`. |
| operation.customer_eta | null | Conditional: anyOf 2/2 | Allowed by schema | anyOf 2/7: At least one alternative must match. Applies to kind = `"amend"`.; anyOf 2/2: At least one alternative must match. Arrival day supplied by the goods owner, with its time zone; null means not specified. |
| operation.rule | alternative (anyOf) | Required when parent is present | Not allowed | anyOf 2/7: At least one alternative must match. Applies to kind = `"amend"`. Advance-availability rule for announced goods. The selected mode determines whether days or start must be supplied. |
| operation.rule | object | Conditional: anyOf 1/5 | Not allowed | anyOf 2/7: At least one alternative must match. Applies to kind = `"amend"`.; anyOf 1/5: At least one alternative must match. Applies to mode = `"inherit"`. Advance-availability rule for announced goods. The selected mode determines whether days or start must be supplied. Additional properties are not allowed. |
| operation.rule.mode | string | Required when parent is present | Not allowed | anyOf 2/7: At least one alternative must match. Applies to kind = `"amend"`.; anyOf 1/5: At least one alternative must match. Applies to mode = `"inherit"`. Mode; follow its required fields. const: `"inherit"`. |
| operation.rule | object | Conditional: anyOf 2/5 | Not allowed | anyOf 2/7: At least one alternative must match. Applies to kind = `"amend"`.; anyOf 2/5: At least one alternative must match. Applies to mode = `"disabled"`. Advance-availability rule for announced goods. The selected mode determines whether days or start must be supplied. Additional properties are not allowed. |
| operation.rule.mode | string | Required when parent is present | Not allowed | anyOf 2/7: At least one alternative must match. Applies to kind = `"amend"`.; anyOf 2/5: At least one alternative must match. Applies to mode = `"disabled"`. Mode; follow its required fields. const: `"disabled"`. |
| operation.rule | object | Conditional: anyOf 3/5 | Not allowed | anyOf 2/7: At least one alternative must match. Applies to kind = `"amend"`.; anyOf 3/5: At least one alternative must match. Applies to mode = `"override"`. Advance-availability rule for announced goods. The selected mode determines whether days or start must be supplied. Additional properties are not allowed. |
| operation.rule.mode | string | Required when parent is present | Not allowed | anyOf 2/7: At least one alternative must match. Applies to kind = `"amend"`.; anyOf 3/5: At least one alternative must match. Applies to mode = `"override"`. Mode; follow its required fields. const: `"override"`. |
| operation.rule.days | integer | Required when parent is present | Not allowed | anyOf 2/7: At least one alternative must match. Applies to kind = `"amend"`.; anyOf 3/5: At least one alternative must match. Applies to mode = `"override"`. Number of calendar days before the owner's arrival day at which announced goods become eligible; null disables the configured advance window where allowed. minimum: `0`. maximum: `365`. |
| operation.rule | object | Conditional: anyOf 4/5 | Not allowed | anyOf 2/7: At least one alternative must match. Applies to kind = `"amend"`.; anyOf 4/5: At least one alternative must match. Applies to mode = `"immediate"`. Advance-availability rule for announced goods. The selected mode determines whether days or start must be supplied. Additional properties are not allowed. |
| operation.rule.mode | string | Required when parent is present | Not allowed | anyOf 2/7: At least one alternative must match. Applies to kind = `"amend"`.; anyOf 4/5: At least one alternative must match. Applies to mode = `"immediate"`. Mode; follow its required fields. const: `"immediate"`. |
| operation.rule | object | Conditional: anyOf 5/5 | Not allowed | anyOf 2/7: At least one alternative must match. Applies to kind = `"amend"`.; anyOf 5/5: At least one alternative must match. Applies to mode = `"from_date"`. Advance-availability rule for announced goods. The selected mode determines whether days or start must be supplied. Additional properties are not allowed. |
| operation.rule.mode | string | Required when parent is present | Not allowed | anyOf 2/7: At least one alternative must match. Applies to kind = `"amend"`.; anyOf 5/5: At least one alternative must match. Applies to mode = `"from_date"`. Mode; follow its required fields. const: `"from_date"`. |
| operation.rule.start | object | Required when parent is present | Not allowed | anyOf 2/7: At least one alternative must match. Applies to kind = `"amend"`.; anyOf 5/5: At least one alternative must match. Applies to mode = `"from_date"`. Local day and time zone from which advance availability starts. Additional properties are not allowed. |
| operation.rule.start.date | string | Required when parent is present | Not allowed | anyOf 2/7: At least one alternative must match. Applies to kind = `"amend"`.; anyOf 5/5: At least one alternative must match. Applies to mode = `"from_date"`. Calendar date as YYYY-MM-DD; interpret it in the accompanying time_zone. format: `"date"`. |
| operation.rule.start.time_zone | string | Required when parent is present | Not allowed | anyOf 2/7: At least one alternative must match. Applies to kind = `"amend"`.; anyOf 5/5: At least one alternative must match. Applies to mode = `"from_date"`. IANA time-zone name, for example Europe/Berlin; determines the local calendar day. minLength: `1`. maxLength: `100`. |
| operation | object | Conditional: anyOf 3/7 | Not allowed | anyOf 3/7: At least one alternative must match. Applies to kind = `"amend_line"`. Action to perform. Select kind first; only that variant determines which fields are required. Additional properties are not allowed. |
| operation.kind | string | Required when parent is present | Not allowed | anyOf 3/7: At least one alternative must match. Applies to kind = `"amend_line"`. Kind selects required fields. const: `"amend_line"`. |
| operation.inbound_id | string | Required when parent is present | Not allowed | anyOf 3/7: At least one alternative must match. Applies to kind = `"amend_line"`. Inbound UUID: new on announce; reuse for reads/changes/retries. format: `"uuid"`. |
| operation.expected_version | integer | Required when parent is present | Not allowed | anyOf 3/7: At least one alternative must match. Applies to kind = `"amend_line"`. Latest-read version; stale versions rejected. minimum: `1`. maximum: `2147483647`. |
| operation.line_id | string | Required when parent is present | Not allowed | anyOf 3/7: At least one alternative must match. Applies to kind = `"amend_line"`. Line identifier in this delivery/return/dispatch section. format: `"uuid"`. |
| operation.quantity | string | Required when parent is present | Not allowed | anyOf 3/7: At least one alternative must match. Applies to kind = `"amend_line"`. Positive decimal string in the stated unit. pattern: `"^(?=.*[1-9])(0\|[1-9]\\d{0,8})(\\.\\d{1,6})?$"`. |
| operation.reason | string | Required when parent is present | Not allowed | anyOf 3/7: At least one alternative must match. Applies to kind = `"amend_line"`. Recorded reason. minLength: `1`. maxLength: `500`. |
| operation | object | Conditional: anyOf 4/7 | Not allowed | anyOf 4/7: At least one alternative must match. Applies to kind = `"cancel"`. Action to perform. Select kind first; only that variant determines which fields are required. Additional properties are not allowed. |
| operation.kind | string | Required when parent is present | Not allowed | anyOf 4/7: At least one alternative must match. Applies to kind = `"cancel"`. Kind selects required fields. const: `"cancel"`. |
| operation.inbound_id | string | Required when parent is present | Not allowed | anyOf 4/7: At least one alternative must match. Applies to kind = `"cancel"`. Inbound UUID: new on announce; reuse for reads/changes/retries. format: `"uuid"`. |
| operation.expected_version | integer | Required when parent is present | Not allowed | anyOf 4/7: At least one alternative must match. Applies to kind = `"cancel"`. Latest-read version; stale versions rejected. minimum: `1`. maximum: `2147483647`. |
| operation.reason | string | Required when parent is present | Not allowed | anyOf 4/7: At least one alternative must match. Applies to kind = `"cancel"`. Recorded reason. minLength: `1`. maxLength: `500`. |
| operation | object | Conditional: anyOf 5/7 | Not allowed | anyOf 5/7: At least one alternative must match. Applies to kind = `"set_default"`. Action to perform. Select kind first; only that variant determines which fields are required. When `{"properties":{"immediate":{"const":true}},"required":["immediate"]}` matches, the then rules apply; otherwise the else rules apply. Additional properties are not allowed. |
| operation.kind | string | Required when parent is present | Not allowed | anyOf 5/7: At least one alternative must match. Applies to kind = `"set_default"`. Kind selects required fields. const: `"set_default"`. |
| operation.destination_id | string | Required when parent is present | Not allowed | anyOf 5/7: At least one alternative must match. Applies to kind = `"set_default"`. Selected shop or publication destination from the allowed options; null means no destination where supported. format: `"uuid"`. |
| operation.expected_version | integer | Required when parent is present | Not allowed | anyOf 5/7: At least one alternative must match. Applies to kind = `"set_default"`. Latest-read version; stale versions rejected. minimum: `0`. maximum: `2147483647`. |
| operation.days | alternative (anyOf) | Required when parent is present | Allowed by schema | anyOf 5/7: At least one alternative must match. Applies to kind = `"set_default"`. Number of calendar days before the owner's arrival day at which announced goods become eligible; null disables the configured advance window where allowed. |
| operation.days | integer | Conditional: anyOf 1/2 | Not allowed | anyOf 5/7: At least one alternative must match. Applies to kind = `"set_default"`.; anyOf 1/2: At least one alternative must match. Number of calendar days before the owner's arrival day at which announced goods become eligible; null disables the configured advance window where allowed. minimum: `0`. maximum: `365`. |
| operation.days | null | Conditional: anyOf 2/2 | Allowed by schema | anyOf 5/7: At least one alternative must match. Applies to kind = `"set_default"`.; anyOf 2/2: At least one alternative must match. Number of calendar days before the owner's arrival day at which announced goods become eligible; null disables the configured advance window where allowed. |
| operation.immediate | boolean | Optional | Not allowed | anyOf 5/7: At least one alternative must match. Applies to kind = `"set_default"`. true = announced goods for this shop count from saving; then days must be null. |
| operation | object | Conditional: then | Allowed by schema | anyOf 5/7: At least one alternative must match. Applies to kind = `"set_default"`. When `{"properties":{"immediate":{"const":true}},"required":["immediate"]}` matches. |
| operation.days | null | Optional | Allowed by schema | anyOf 5/7: At least one alternative must match. Applies to kind = `"set_default"`. When `{"properties":{"immediate":{"const":true}},"required":["immediate"]}` matches. |
| operation | object | Conditional: anyOf 6/7 | Not allowed | anyOf 6/7: At least one alternative must match. Applies to kind = `"allocate_expected"`. Action to perform. Select kind first; only that variant determines which fields are required. Additional properties are not allowed. |
| operation.kind | string | Required when parent is present | Not allowed | anyOf 6/7: At least one alternative must match. Applies to kind = `"allocate_expected"`. Kind selects required fields. const: `"allocate_expected"`. |
| operation.inbound_id | string | Required when parent is present | Not allowed | anyOf 6/7: At least one alternative must match. Applies to kind = `"allocate_expected"`. Inbound UUID: new on announce; reuse for reads/changes/retries. format: `"uuid"`. |
| operation.expected_version | integer | Required when parent is present | Not allowed | anyOf 6/7: At least one alternative must match. Applies to kind = `"allocate_expected"`. Latest-read version; stale versions rejected. minimum: `1`. maximum: `2147483647`. |
| operation.line_id | string | Required when parent is present | Not allowed | anyOf 6/7: At least one alternative must match. Applies to kind = `"allocate_expected"`. Line identifier in this delivery/return/dispatch section. format: `"uuid"`. |
| operation.allocation_id | string | Required when parent is present | Not allowed | anyOf 6/7: At least one alternative must match. Applies to kind = `"allocate_expected"`. Identifier of the expected-quantity allocation; preserve it through later release or receipt actions. format: `"uuid"`. |
| operation.order_item_id | string | Required when parent is present | Not allowed | anyOf 6/7: At least one alternative must match. Applies to kind = `"allocate_expected"`. Line identifier from the current order read. format: `"uuid"`. |
| operation.component_ref | string | Optional | Not allowed | anyOf 6/7: At least one alternative must match. Applies to kind = `"allocate_expected"`. Stable reference to the component of the order's saved product structure. format: `"uuid"`. |
| operation.quantity | string | Required when parent is present | Not allowed | anyOf 6/7: At least one alternative must match. Applies to kind = `"allocate_expected"`. Positive decimal string in the stated unit. pattern: `"^(?=.*[1-9])(0\|[1-9]\\d{0,8})(\\.\\d{1,6})?$"`. |
| operation | object | Conditional: anyOf 7/7 | Not allowed | anyOf 7/7: At least one alternative must match. Applies to kind = `"release_expected"`. Action to perform. Select kind first; only that variant determines which fields are required. Additional properties are not allowed. |
| operation.kind | string | Required when parent is present | Not allowed | anyOf 7/7: At least one alternative must match. Applies to kind = `"release_expected"`. Kind selects required fields. const: `"release_expected"`. |
| operation.inbound_id | string | Required when parent is present | Not allowed | anyOf 7/7: At least one alternative must match. Applies to kind = `"release_expected"`. Inbound UUID: new on announce; reuse for reads/changes/retries. format: `"uuid"`. |
| operation.expected_version | integer | Required when parent is present | Not allowed | anyOf 7/7: At least one alternative must match. Applies to kind = `"release_expected"`. Latest-read version; stale versions rejected. minimum: `1`. maximum: `2147483647`. |
| operation.allocation_id | string | Required when parent is present | Not allowed | anyOf 7/7: At least one alternative must match. Applies to kind = `"release_expected"`. Identifier of the expected-quantity allocation; preserve it through later release or receipt actions. format: `"uuid"`. |
| operation.reason | string | Required when parent is present | Not allowed | anyOf 7/7: At least one alternative must match. Applies to kind = `"release_expected"`. Recorded reason. minLength: `1`. maxLength: `500`. |

## Response 200

200: Success

Content type: `application/json`

| Field | Type | Presence | null | Meaning, limits and examples |
| --- | --- | --- | --- | --- |
| $ (whole value) | object | Whole value | Not allowed | Additional properties are not allowed. |
| data | object | Required when parent is present | Not allowed | Authorized response payload or documented event data. Additional properties are not allowed. |
| data.event_id | string | Required when parent is present | Not allowed | Identifier of the accepted business event returned by the command. format: `"uuid"`. |
| data.kind | string | Required when parent is present | Not allowed | Kind selects required fields. enum: `["announce","amend","amend_line","confirm","arrive","receive","reject","cancel","close","set_default","allocate_expected","release_expected","convert_expected","handoff_recovery"]`. |
| data.inbound_id | alternative (anyOf) | Required when parent is present | Allowed by schema | Inbound UUID: new on announce; reuse for reads/changes/retries. |
| data.inbound_id | string | Conditional: anyOf 1/2 | Not allowed | anyOf 1/2: At least one alternative must match. Inbound UUID: new on announce; reuse for reads/changes/retries. format: `"uuid"`. |
| data.inbound_id | null | Conditional: anyOf 2/2 | Allowed by schema | anyOf 2/2: At least one alternative must match. Inbound UUID: new on announce; reuse for reads/changes/retries. |
| data.version | integer | Required when parent is present | Not allowed | Current record version; use unchanged as expected_version. minimum: `1`. maximum: `2147483647`. |
| data.stock_event_id | alternative (anyOf) | Required when parent is present | Allowed by schema | Identifier of the resulting stock movement; null when this action created no stock movement. |
| data.stock_event_id | string | Conditional: anyOf 1/2 | Not allowed | anyOf 1/2: At least one alternative must match. Identifier of the resulting stock movement; null when this action created no stock movement. format: `"uuid"`. |
| data.stock_event_id | null | Conditional: anyOf 2/2 | Allowed by schema | anyOf 2/2: At least one alternative must match. Identifier of the resulting stock movement; null when this action created no stock movement. |
| data.recovery_movements | array | Optional | Not allowed | Stock movements recorded when goods are recovered after an interrupted handover. maxItems: `1000`. |
| data.recovery_movements[] | object | Every array item | Not allowed | Additional properties are not allowed. |
| data.recovery_movements[].stock_item_id | string | Required when parent is present | Not allowed | Offered stock item ID for this owner/warehouse; not a SKU. format: `"uuid"`. |
| data.recovery_movements[].quantity | string | Required when parent is present | Not allowed | Positive decimal string in the stated unit. pattern: `"^(?=.*[1-9])(0\|[1-9]\\d{0,8})(\\.\\d{1,6})?$"`. |
| data.recovery_movements[].source_balance_id | string | Required when parent is present | Not allowed | Exact stock balance from which goods are consumed or moved. format: `"uuid"`. |
| data.recovery_movements[].target_balance_id | string | Required when parent is present | Not allowed | Stock balance receiving the moved goods. format: `"uuid"`. |
| data.recovery_movements[].stock_event_id | alternative (anyOf) | Required when parent is present | Allowed by schema | Identifier of the resulting stock movement; null when this action created no stock movement. |
| data.recovery_movements[].stock_event_id | string | Conditional: anyOf 1/2 | Not allowed | anyOf 1/2: At least one alternative must match. Identifier of the resulting stock movement; null when this action created no stock movement. format: `"uuid"`. |
| data.recovery_movements[].stock_event_id | null | Conditional: anyOf 2/2 | Allowed by schema | anyOf 2/2: At least one alternative must match. Identifier of the resulting stock movement; null when this action created no stock movement. |

## Response 401, 403, 404, 409, 422, 429, 500, 503

401: The key is missing, unknown, revoked or expired. 403: The key lacks a required scope, or the operation requires a live key. 404: Not found. Also applies to IDs that belong to another organization — we deliberately do not distinguish between "does not exist" and "does not belong to you". 409: The same ID already exists with different content. It is never overwritten. 422: Content validation failed. The response lists all affected locations at once. 429: A rate limit was reached and the request did not run. Wait for Retry-After, then repeat it unchanged. X-RateLimit-Scope names the limit: key (120 requests per minute), organization (300 per minute across all keys), write (1,000 at once, refilling at 60 per minute) or list (300 unfiltered list pages at once, refilling at 10 per minute). 500: Unexpected error on our side. 503: Temporarily unavailable. Repeat the same request with the same business identity.

Content type: `application/json`

| Field | Type | Presence | null | Meaning, limits and examples |
| --- | --- | --- | --- | --- |
| $ (whole value) | object | Whole value | Not allowed | — |
| error | object | Required when parent is present | Not allowed | Machine-readable error code; use it to select the documented recovery path. |
| error.code | string | Required when parent is present | Not allowed | Machine-readable, permanently stable error code. Program against it, not against message. |
| error.message | string | Required when parent is present | Not allowed | Explanation for humans. May change at any time. |
| error.field | string | Optional | Not allowed | Affected location in the request, if it can be determined. |
| error.doc_url | string | Required when parent is present | Not allowed | Documentation link explaining this API error. format: `"uri"`. |
