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"
}'
Edifact outbound desadv
Wire-ready UN/EDIFACT DESADV interchange
POST
/
v1
/
edifact
/
outbound
/
desadv
/
{partner_id}
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"
}'
Path parameters
string
required
Partner ID
Headers
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
string,null
TDT+20 carrier identification, when present.
string,null
string
required
EdifactDespatchLine[]
required
Every despatch line once, with its despatched total, in order. A line split over several packages is one entry here.
Show EdifactDespatchLine
Show EdifactDespatchLine
string
required
string
required
string,null
SG16 RFF+ON under this LIN — the order this line ships against, for a consolidated despatch covering several orders.
string
required
QTY+12 despatched quantity. On a package’s line: the quantity in each SSCC of the package.
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.string,null
RFF+ON referenced purchase-order number, when present.
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.Show EdifactDespatchPackage
Show EdifactDespatchPackage
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].EdifactDespatchLine[]
required
What each SSCC of the group holds:
quantity is per SSCC.Show EdifactDespatchLine
Show EdifactDespatchLine
string
required
string
required
string,null
SG16 RFF+ON under this LIN — the order this line ships against, for a consolidated despatch covering several orders.
string
required
QTY+12 despatched quantity. On a package’s line: the quantity in each SSCC of the package.
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.string,null
PAC 7065 package type (e.g.
CT carton, 201 pallet).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.
string
required
GIN+BJ — the group’s (first) SSCC-18.
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 for declared schemas and alternatives. This page also includes documented corrections from the spec overlays. Example IDs and values are illustrative; replace them with records from your workspace.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"
}'
Last modified on October 20, 2026