edi

Generate a ready-to-send ANSI ASC X12 EDI document from...

Generate a ready-to-send ANSI ASC X12 EDI document from structured JSON. POST type ('850' Purchase Order, '810' Invoice, or '856' Ship Notice/ASN) plus senderId, receiverId, documentNumber (PO#/invoice#/shipment id), optional date, parties (N1 loops — role like ST/BT/VN + name), and items (quantity, uom, price, productId). For an 810 you can pass poNumber and total; for an 856 pass poNumber (the PO shipped). Returns the full X12 interchange in meta.edi — correct ISA/GS/ST…SE/GE/IEA envelope, party loops, PO1/IT1 line items (or the 856 HL Shipment→Order→Item hierarchy with LIN/SN1), and CTT/TDS totals (implied 2-decimal). Deterministic, no external calls. The outbound complement to edi.parse and edi.ack: assemble valid EDI envelopes instead of hand-rolling segment terminators and control numbers.

post/api/edi/generate

Request

  • Base URL: https://2s.io
  • URL: https://2s.io/api/edi/generate
  • Auth: API key in header PAYMENT-SIGNATURE

Query parameters

trial1

Try before you buy. Set to 1 for one free real call per endpoint per hour — no wallet or payment needed — to verify the endpoint before paying. Equivalent to sending the "X-2s-Trial: 1" request header. Listed only on operations that offer a trial; the others always answer 402.

Request body

type'850' | '810' | '856' required

Filter results by type.

senderIdstring required

Sender ID.

receiverIdstring required

Receiver ID.

senderQualifierstring

Sender qualifier.

receiverQualifierstring

Receiver qualifier.

documentNumberstring required

Document number.

poNumberstring

Po number.

datestring

Date in YYYY-MM-DD format.

totalnumber

810 invoice total in USD.

controlNumberstring

Control number.

usage'P' | 'T'

Usage.

Response

(unresolved $ref)

Changes

No recorded changes to this operation across all 1 revision of this API.