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

# 940

> Wire-ready X12 940 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

`Ship940`

**carrier\_scac** `string,null`

W6603 — carrier SCAC for routing.

**items** `ShipItem[]` *required*

**ShipItem**

**description** `string,null`

G69 free-form description line.

**quantity** `string` *required*

**sku** `string` *required*

**sku\_qualifier** `string`

W0104 qualifier for the identifier, e.g. SK / VN / UP.

**uom** `string`

**order\_number** `string` *required*

W0502 — depositor (our) order number.

**po\_number** `string,null`

W0503 — the customer PO this order fulfills, when there is one.

**requested\_ship\_date** `string,null (date)`

G62\*10 — requested ship date.

**ship\_to** `Party,null`

An N1 party loop (N1/N2/N3/N4).

**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`

### Response

No response body. Wire-ready X12 940 interchange.

### Status codes

| Code | Meaning |
| - | - |
| `200` | Wire-ready X12 940 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/940/{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 '{
  "carrier_scac": "string",
  "items": [
    {
      "description": "Two-person tent, green — replacement for damaged pole set.",
      "quantity": "2",
      "sku": "SKU-TENT-2P-GRN",
      "sku_qualifier": "string",
      "uom": "string"
    }
  ],
  "order_number": "ORD-10042",
  "po_number": "ORD-10042",
  "requested_ship_date": "2026-08-31",
  "ship_to": {
    "address_lines": [
      "548 Market St"
    ],
    "city": "San Francisco",
    "country": "US",
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "id_qualifier": "string",
    "name": "Two-Person Tent",
    "postal_code": "94107",
    "role": "string",
    "state": "CA"
  }
}'
```


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