Translation
Map JSON to X12 (and back)
Quick answer
Do I need to write X12 segment strings?
The translation model
Your application sends JSON that maps through partner-specific profiles to X12. Inbound X12 is stored as exact bytes; lifecycle webhooks carry metadata and a links.payload pull link, and the payload endpoint returns raw, structured, typed (where the registry proves it), or mapped JSON views.
- Partner profile = mandatory segments + code lists
- Mappings version with your deploy pipeline
Outbound example
documentTypeCode selects the transaction set; partnerId selects the implementation guide.
curl -X POST https://api.signaledi.com/v1/documents/outbound \
-H "Authorization: Bearer $SIGNALEDI_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"partnerId": "your-partner-id",
"environment": "LAB",
"documentTypeCode": "850",
"payload": {
"purchaseOrderNumber": "PO-1042",
"shipTo": {
"id": "DC-01",
"name": "RetailMart DC 01"
},
"lines": [
{
"lineNumber": 1,
"sku": "SKU-100",
"quantity": 24,
"unitPrice": 12.5
}
]
}
}'Partner-specific rules
Retailers differ on ship-to qualifiers, allowance segments, and UOM codes. Configure rules in the partner profile instead of hard-coding segment strings.
Validate before send
Use /tools/edi-validator for ad-hoc samples, then API validation on every outbound POST. Errors reference business fields instead of opaque AK segments.
FAQ
Common questions
No for most integrations — JSON plus partner profiles is the default path. Raw X12 intake remains available when you already have generated files.
Inbound webhooks carry lifecycle metadata only (ids, lane, document type codes, states, links). Fetch links.payload with view=document for registry-typed JSON, or view=raw for the exact bytes. See the 856 ASN guide for shipment examples.