> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Send inventory advice (846)

> Build and dispatch an X12 846 inventory advice. Save the payload validated for your trading partner as inventory-advice.json and use that partner’s identifier…

Build and dispatch an X12 846 inventory advice. Save the payload validated for your trading partner as inventory-advice.json and use that partner’s identifier. The successful response is wire-ready X12, not JSON; dispatch and partner acceptance require separate verification.

### Path parameters

**partner\_id** `string` *required*

Partner ID

### Headers

**Idempotency-Key** `string,null`

Stable unique request key (1–128 ASCII letters/digits or -\_.:). Requires Postgres. Retries return the original EDI bytes; changed JSON payload returns 409.

### Request body

`InventoryAdvice846`

**date** `string,null (date)`

BIA04.

**items** `InventoryItem[]` *required*

**InventoryItem**

**description** `string,null`

PID05 of the F-format description, when present.

**ids** `ProductId[]` *required*

LIN02+ qualifier/value identifier pairs (UP UPC, SK seller SKU, ...).

**ProductId**

**qualifier** `string` *required*

**value** `string` *required*

**line\_number** `string,null`

LIN01 — assigned line number (optional in the spec).

**quantities** `InventoryQuantity[]` *required*

QTY segments for this item, one per reported quantity kind.

**InventoryQuantity**

**qualifier** `string` *required*

QTY01 quantity qualifier: `33` available, `17` on-hand/quantity received, `20` damaged, `83` backorder, `99` quantity remaining, ...

**quantity** `string` *required*

QTY02.

**uom** `string,null`

QTY03 — composite unit of measure (first component is the UOM code).

**parties** `Party[]`

**Party**

**address\_lines** `string[]`

**city** `string,null`

**country** `string,null`

**id** `string,null`

**id\_qualifier** `string,null`

N103/N104 — identification qualifier and code (e.g. `92` + store #).

**name** `string` *required*

**postal\_code** `string,null`

**role** `string` *required*

N101 entity identifier code: ST ship-to, BT bill-to, SF ship-from, VN vendor, BY buyer, ...

**state** `string,null`

**purpose** `string` *required*

BIA01 — transaction set purpose (00 original, 05 replace, ...).

**reference\_id** `string` *required*

BIA03 — the sender's reference identification for this report.

**report\_type** `string` *required*

BIA02 — report type code (e.g. `PQ` product activity, `SI` current summary inventory).

### Response

Returns `application/edi-x12` — Wire-ready X12 846 interchange.

### Status codes

| Code | Meaning |
| - | - |
| `200` | Wire-ready X12 846 interchange |
| `403` | Not this credential's partner |
| `409` | Idempotency-Key reused with a different payload |
| `422` | Invalid payload or delimiter collision |

### Using this contract

Read the [source OpenAPI document](https://docs.stateset.com/spec/edi.json) for declared schemas and alternatives.
This page also includes documented corrections from the [spec overlays](https://github.com/stateset/docs/tree/main/spec/overlays).
Example IDs and values are illustrative; replace them with records from your workspace.

```bash cURL theme={null}
curl --silent --show-error --fail-with-body --request POST \
  --url 'https://api.edi.stateset.com/v1/edi/outbound/846/{partner_id}' \
  --header "Authorization: Bearer $EDI_API_TOKEN" \
  --header "Idempotency-Key: ${IDEMPOTENCY_KEY:?Set a unique key for this operation; preserve it on retries}" \
  --header 'Content-Type: application/json' \
  --data @inventory-advice.json
```

```json 200 theme={null}
"string"
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.