> ## 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.

# Edifact outbound invrpt

> Wire-ready UN/EDIFACT INVRPT interchange

### 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

`EdifactInventoryReport`

**document\_code** `string,null`

BGM C002 1001 (`35` inventory report, `78` inventory movement advice, `79` inventory status advice).

**inventory\_date** `string,null`

Header DTM+366 — the date the inventory was reported for.

**lines** `EdifactInventoryLine[]` *required*

**EdifactInventoryLine**

**item** `string` *required*

Item identifier from LIN C212 7140, else a PIA (5 outranks 1).

**line\_number** `string` *required*

LIN 1082 (n..6).

**location** `string,null`

SG9 LOC C517 3225 (an..25) — the item's location, when the line states one before its quantities.

**quantities** `EdifactInventoryQuantity[]` *required*

SG11 quantities, in order.

**EdifactInventoryQuantity**

**location** `string,null`

SG11 LOC C517 3225 (an..25) — where this quantity is held.

**qualifier** `string` *required*

QTY C186 6063 quantity qualifier (`145` actual stock, `17` on hand, `198` in transit, …).

**quantity** `string` *required*

QTY C186 6060.

**uom** `string,null`

QTY C186 6411 measure unit (e.g. `PCE`).

**location** `string,null`

SG2 LOC C517 3225 (an..25) under the reporting party — the reported location (written as LOC+18, warehouse).

**message\_function** `string,null`

BGM 1225 message function (`9` original, `5` replace, …).

**report\_date** `string,null`

Header DTM+137 — the report's date.

**report\_number** `string` *required*

BGM C106 1004 — the report's number.

**reporting\_party** `string,null`

SG2 NAD+GY — the inventory reporting party.

### Response

No response body. Wire-ready UN/EDIFACT INVRPT interchange.

### Status codes

| Code | Meaning |
| - | - |
| `200` | Wire-ready UN/EDIFACT INVRPT interchange |
| `403` | Not this credential's partner |
| `409` | Idempotency-Key reused with a different payload |
| `422` | Invalid payload |

### Using this contract

Read the [source OpenAPI document](/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/edifact/outbound/invrpt/{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 '{
  "document_code": "string",
  "inventory_date": "2026-08-31T14:22:05Z",
  "lines": [
    {
      "item": "string",
      "line_number": "string",
      "location": "string",
      "quantities": [
        {
          "location": "string",
          "qualifier": "string",
          "quantity": "2",
          "uom": "string"
        }
      ]
    }
  ],
  "location": "string",
  "message_function": "string",
  "report_date": "2026-08-31T14:22:05Z",
  "report_number": "string",
  "reporting_party": "string"
}'
```


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