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

> Wire-ready UN/EDIFACT DESADV 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

`EdifactDespatchAdvice`

**carrier** `string,null`

TDT+20 carrier identification, when present.

**despatch\_date** `string,null`

**despatch\_number** `string` *required*

**lines** `EdifactDespatchLine[]` *required*

Every despatch line once, with its despatched total, in order. A line split over several packages is one entry here.

**EdifactDespatchLine**

**item** `string` *required*

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

**order\_number** `string,null`

SG16 RFF+ON under this LIN — the order this line ships against, for a consolidated despatch covering several orders.

**quantity** `string` *required*

QTY+12 despatched quantity. On a package's line: the quantity in each SSCC of the package.

**quantity\_unknown** `boolean`

Only on a package's line: the message does not say how much of the line is in this package (a line in several SSCCs without SG20 QTY, or a package-level quantity that does not divide evenly over the level's SSCCs). `quantity` is then zero, so package contents never exceed what was despatched; the despatched total stays on the line in \[`DespatchAdvice::lines`]. On a \[`DespatchAdvice::lines`] entry: the message states no quantity for the line at all (no LIN QTY and no SG20 QTY, in any repeat); `quantity` is then zero and the builder writes no QTY for it.

**order\_number** `string,null`

RFF+ON referenced purchase-order number, when present.

**packages** `EdifactDespatchPackage[]`

The SSCC-labelled packages and what each holds — see the module documentation for how both D.96A packaging forms map onto this and the one form the builder writes. Every package has at least one SSCC; lines in no package are only in `lines`.

**EdifactDespatchPackage**

**additional\_ssccs** `string[]`

Further SSCCs of the group, in order — e.g. three identical cartons (`PAC+3++CT'…GIN+BJ+S1+S2+S3'`). Each holds `lines`. Empty for a single package. See \[`DespatchPackage::ssccs`].

**lines** `EdifactDespatchLine[]` *required*

What each SSCC of the group holds: `quantity` is per SSCC.

**EdifactDespatchLine**

**item** `string` *required*

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

**order\_number** `string,null`

SG16 RFF+ON under this LIN — the order this line ships against, for a consolidated despatch covering several orders.

**quantity** `string` *required*

QTY+12 despatched quantity. On a package's line: the quantity in each SSCC of the package.

**quantity\_unknown** `boolean`

Only on a package's line: the message does not say how much of the line is in this package (a line in several SSCCs without SG20 QTY, or a package-level quantity that does not divide evenly over the level's SSCCs). `quantity` is then zero, so package contents never exceed what was despatched; the despatched total stays on the line in \[`DespatchAdvice::lines`]. On a \[`DespatchAdvice::lines`] entry: the message states no quantity for the line at all (no LIN QTY and no SG20 QTY, in any repeat); `quantity` is then zero and the builder writes no QTY for it.

**package\_type** `string,null`

PAC 7065 package type (e.g. `CT` carton, `201` pallet).

**parent\_sscc** `string,null`

The SSCC of the package this group is packed in — e.g. a carton's pallet — from the CPS 7166 parent packing level. Every SSCC of the group is in it. See the module documentation.

**sscc** `string` *required*

GIN+BJ — the group's (first) SSCC-18.

**ship\_to** `string,null`

Header-level NAD+DP (delivery party — EANCOM's ship-to) or, when no DP is sent, NAD+ST party id. The builder emits NAD+DP.

### Response

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

### Status codes

| Code | Meaning |
| - | - |
| `200` | Wire-ready UN/EDIFACT DESADV 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](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/edifact/outbound/desadv/{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": "UPS",
  "despatch_date": "2026-08-31T14:22:05Z",
  "despatch_number": "string",
  "lines": [
    {
      "item": "string",
      "line_number": "string",
      "order_number": "ORD-10042",
      "quantity": "2",
      "quantity_unknown": true
    }
  ],
  "order_number": "ORD-10042",
  "packages": [
    {
      "additional_ssccs": [
        "string"
      ],
      "lines": [
        {
          "item": "string",
          "line_number": "string",
          "order_number": "ORD-10042",
          "quantity": "2",
          "quantity_unknown": true
        }
      ],
      "package_type": "string",
      "parent_sscc": "string",
      "sscc": "string"
    }
  ],
  "ship_to": "string"
}'
```


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