GeneralLive

Edi Generate

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

$0.00207USDC per call · settled on Base · no subscription, no API key

Overview

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.

Endpoint

MethodEndpointPriceDescription
POST/v1/marketplace/api/edi-generate$0.00207Invoke Edi Generate (General) and return the upstream response.

How to call it

Requests are paid per call over the x402 protocol. Call the endpoint, receive a 402 Payment Required quote, then repeat the request with the signed payment header. The SDKs do both steps for you.

# 1. Ask for a quote
curl -i -X POST https://api.jarvisclaw.ai/v1/marketplace/api/edi-generate \
  -H 'Content-Type: application/json' \
  -d '{}'

# 2. Pay it (the SDK signs and retries for you)
curl -X POST https://api.jarvisclaw.ai/v1/marketplace/api/edi-generate \
  -H 'Content-Type: application/json' \
  -H 'X-PAYMENT: <signed-payload>' \
  -d '{}'
Open in the marketplace

Docs: Getting started · x402 payments · x402 discovery · All APIs