Customer-facing integration endpoints for ModernEDI tenants. Use this API when your ERP, WMS, integration service, or internal automation needs to receive mapped inbound documents, send AS2 replies, send standalone outbound AS2 documents, or inspect transaction evidence.
ModernEDI is designed around a simple operating model: receive partner AS2/X12 traffic, map inbound documents into the ERP, WMS, accounting, XML, JSON, or custom format your operation uses, then treat that mapped document as your source of truth. Replies such as invoices and ASNs are sent from that business record with /as2/reply.
A typical inbound 850 to outbound 810 loop is:
GET /mapped-outputs for mapped inbound documents.payload in your system.POST /mapped-outputs/{id}/ack after your system has accepted the mapped output.POST /as2/reply./integration/transactions to confirm the inbound document, mapped output, AS2 receipts, 997s, and reply stay linked.If you prefer push delivery, configure a per-partner mapped-output webhook in the ModernEDI workspace. ModernEDI sends the same mapped-output message shape to your HTTPS endpoint and automatically acknowledges the queue item only when your endpoint returns a 2xx response. Failed webhook attempts leave the message available through the pull API.
Push webhook requests include X-ModernEDI-Event, X-ModernEDI-Delivery-Id, X-ModernEDI-Timestamp, and X-ModernEDI-Signature. The signature is sha256=<hex hmac> over <timestamp>.<raw request body> using the partner webhook signing secret.
/as2/send is also available when your system needs to send a standalone outbound X12 interchange that is not replying to a received document.
Key fields in the mapped-output loop:
id: mapped output id used in the /mapped-outputs/{id}/ack path.receiptHandle: token from the latest poll, required when marking mapped output as received.messageId: original inbound AS2 message id; use it as originalMessageId for /as2/reply.transactionKey: transaction identifier within the AS2 message, usually GS06#ST02.mappedOutputKey: unique mapped-output key inside the transaction.payload: mapped document body; parse it according to contentType.replyToMessageId: present on outbound replies and points back to the inbound message.For transaction evidence, start with the inbound transaction detail and show the original X12 document, mapped output records, MDN and 997 details, outbound replies from relatedTransactions, and the reply transaction's own MDN and 997 details.
Common failures to handle include missing or invalid API keys, unknown partner names, invalid X12 payloads, originalMessageId not found, partner AS2 delivery failure, and mapped output returned again because it was not marked received before the visibility timeout.
Send reply documents and standalone outbound AS2 messages through an existing ModernEDI partner connection.
Sends a fully formed outbound X12 interchange as-is to the configured trading partner. The x12 field must be Base64-encoded and should contain a complete outbound interchange, not just an ST/SE segment pair. This is usually the simplest endpoint for direct system-to-system integrations.
| test | boolean Default: false When |
| customer required | string Exact configured partner name for the outbound message destination. |
| x12 required | string <byte> Base64-encoded X12 payload. For |
| transactionGroupType required | integer X12 transaction set identifier code. |
{- "customer": "Customer One",
- "x12": "SVNBKjAwKiAgICAgICAgICAqMDAqICAgICAgICAgICpaWipTRU5ERVJJRCAgICAgICAqWloqUkVDRUlWRVJJRCAgICAgKjI2MDQyNyoyMTAwKlUqMDA0MDEqMDAwMDAwMDAxKjAqVCo+fkdTKlBPKlNFTkRFUipSRUNFSVZFUioyMDI2MDQyNyoyMTAwKjEqWCowMDQwMTB+U1QqODUwKjAwMDF+U0UqMiowMDAxfkdFKjEqMX5JRUEqMSowMDAwMDAwMDF+",
- "transactionGroupType": 850
}{- "success": true,
- "messageId": "<generated-message-id@your-tenant-hostname>",
- "x12": "ISA*00* *00* *ZZ*SENDERID *ZZ*RECEIVERID *260427*2100*U*00401*000000001*0*T*>~GS*PO*SENDER*RECEIVER*20260427*2100*1*X*004010~ST*850*0001~SE*2*0001~GE*1*1~IEA*1*000000001~"
}Sends a follow-up document such as an ASN or invoice in response to a previously received inbound message. The runtime looks up the original message by originalMessageId and derives envelope information from that message and the configured partner connection. The x12 field is Base64-encoded. It is typically an ST/SE transaction payload, but a GS block is also accepted.
| test | boolean Default: false When |
| customer required | string Exact configured partner name for the original inbound message. |
| originalMessageId required | string Message-Id of the original inbound AS2 message being replied to. For the common mapped-output flow, this is the |
| x12 required | string <byte> Base64-encoded X12 payload. This is typically a single |
| functionalGroupType | string Optional X12 functional group type. If omitted, the runtime tries to infer it from |
| transactionGroupType required | integer X12 transaction set identifier code. |
object (X12SenderConfig) Optional override for outbound X12 sender identifiers. |
{- "customer": "Customer One",
- "originalMessageId": "msg-850-api",
- "x12": "U1QqODU2KjAwMDF+U0UqMiowMDAxfg==",
- "functionalGroupType": "SH",
- "transactionGroupType": 856
}{- "success": true,
- "messageId": "<generated-message-id@your-tenant-hostname>",
- "x12": "ISA*00* *00* *ZZ*SENDERID *ZZ*RECEIVERID *260427*2100*U*00401*000000001*0*T*>~GS*SH*SENDER*RECEIVER*20260427*2100*1*X*004010~ST*856*0001~SE*2*0001~GE*1*1~IEA*1*000000001~"
}Sends a supplied transaction to a second partner while deriving envelope details from a previously received inbound message. The customer field identifies the source/original partner, and copyToCustomer identifies the destination partner. The x12 field is Base64-encoded and should typically contain a single ST/SE transaction payload.
| test | boolean Default: false When |
| customer required | string Exact configured partner name for the original inbound message. |
| copyToCustomer required | string Exact configured partner name that should receive the carbon copy. |
| originalMessageId required | string Message-Id of the original inbound AS2 message being referenced. For the common mapped-output flow, this is the |
| x12 required | string <byte> Base64-encoded X12 payload. This is typically a single |
| functionalGroupType required | string X12 functional group type for the outbound carbon-copy message. |
| transactionGroupType required | integer X12 transaction set identifier code. |
object (X12SenderConfig) Optional override for outbound X12 sender identifiers. |
{- "customer": "Customer One",
- "copyToCustomer": "Customer Two",
- "originalMessageId": "msg-850-api",
- "x12": "U1QqODEwKjAwMDF+U0UqMiowMDAxfg==",
- "functionalGroupType": "IN",
- "transactionGroupType": 810
}{- "success": true,
- "messageId": "<generated-message-id@your-tenant-hostname>",
- "x12": "ISA*00* *00* *ZZ*SENDERID *ZZ*RECEIVERID *260427*2100*U*00401*000000001*0*T*>~GS*IN*SENDER*RECEIVER*20260427*2100*1*X*004010~ST*810*0001~SE*2*0001~GE*1*1~IEA*1*000000001~"
}Receive mapped inbound documents by polling, or configure per-partner HTTPS push delivery in the workspace.
Returns mapped inbound documents for this tenant and temporarily marks them in progress. If a returned message is not acknowledged before the visibility timeout expires, ModernEDI may return it again on a later poll. Push delivery uses the same queue state: a successful 2xx webhook response acknowledges the message, while a failed push leaves it available through this endpoint. This endpoint runs on the shared ModernEDI API host, not on the tenant AS2 hostname.
| startDate | string <date> Optional inclusive transaction window start date. |
| endDate | string <date> Optional inclusive transaction window end date. |
| limit | integer [ 1 .. 100 ] Default: 10 Maximum number of mapped output messages to return. |
| visibilityTimeoutSeconds | integer [ 5 .. 43200 ] Default: 120 Seconds ModernEDI keeps returned messages hidden from later polls while your system processes them. |
{- "success": true,
- "messages": [
- {
- "id": "7e8276c1d55988a4bf7fbf9f8c2d87187a24bd316dfed84bbf64397b8d5b6e4a",
- "receiptHandle": "0af7dd1d-b6a1-4ff9-8ad1-d395de0b97f2",
- "deliveryCount": 1,
- "leasedUntil": "2026-04-29T15:35:00Z",
- "messageId": "msg-850-api",
- "transactionKey": "17#0001",
- "partnerName": "Customer One",
- "transactionTimestamp": "2026-04-29T15:33:00Z",
- "transactionSet": {
- "code": "850",
- "description": "Purchase Order"
}, - "controlNumbers": {
- "transaction": "0001",
- "functionalGroup": "17"
}, - "edi": {
- "x12Version": "4010",
- "functionalIdentifierCode": "PO",
- "transactionGroupType": "PO",
- "segmentTerminator": "~"
}, - "mapping": {
- "id": 44,
- "type": "ManagedQueueMapping",
- "file": "customer-one-850.jslt",
- "fileSha256Hash": "e6f1b9d537ce2c4a3d60dd1648c7f46e3fb1ce5baad94a6d4e6e1f9554a8f041"
}, - "mappedOutputKey": "17#0001#00001",
- "sequenceNumber": 1,
- "contentType": "application/json",
- "createdAt": "2026-04-29T15:33:04Z",
- "businessKey": {
- "name": "purchaseOrderNumber",
- "value": "PO-100045"
}, - "extraFields": {
- "destination": "managedQueue"
}, - "payload": "{\"purchaseOrderNumber\":\"PO-100045\",\"shipTo\":{\"name\":\"Main DC\"}}"
}
], - "limit": 10,
- "visibilityTimeoutSeconds": 120,
- "hasMore": false
}Confirms that your system has accepted a previously returned mapped output message. Call this after the mapped output has been stored, processed, or queued in your system. The receipt handle must match the latest poll response for this mapped output id.
| id required | string Mapped output id returned by |
| receiptHandle required | string Token from the latest poll response for this mapped output id. |
{- "receiptHandle": "0af7dd1d-b6a1-4ff9-8ad1-d395de0b97f2"
}{- "success": true,
- "id": "7e8276c1d55988a4bf7fbf9f8c2d87187a24bd316dfed84bbf64397b8d5b6e4a",
- "messageId": "msg-850-api",
- "mappedOutputKey": "17#0001#00001",
- "ackedAt": "2026-04-29T15:34:10Z"
}Read-only transaction history, documents, events, acknowledgements, and linked replies.
Returns a pageable transaction history for custom transaction viewers, dashboards, and reconciliation workflows. Outbound replies include replyToMessageId so they can be shown underneath the inbound document they answer.
| startDate | string Example: startDate=2026-03-01T00:00:00.000000000 Optional inclusive window start using ISO local date-time with nanoseconds. |
| endDate | string Example: endDate=2026-03-31T23:59:59.999999999 Optional inclusive window end using ISO local date-time with nanoseconds. |
| cursor | string Cursor from the previous response. |
| limit | integer [ 1 .. 250 ] Default: 50 Maximum number of transactions to return. |
| direction | string Enum: "inbound" "outbound" |
| partnerName | string Exact configured partner name. |
| transactionSet | string Example: transactionSet=850 X12 transaction set code. |
| businessKey | string Example: businessKey=PO-100045 Exact inbound business key value. This filter does not match outbound reply transactions. |
| messageId | string Exact AS2 message id. |
| replyToMessageId | string Original inbound AS2 message id for outbound replies. |
| transactionControlNumber | string ST02 transaction control number. |
| functionalGroupControlNumber | string GS06 functional group control number. |
{- "success": true,
- "transactions": [
- {
- "id": "msg-850-api/17#0001",
- "messageId": "msg-850-api",
- "transactionKey": "17#0001",
- "replyToMessageId": null,
- "direction": "inbound",
- "partnerName": "Customer One",
- "timestamp": "2026-03-25T18:15:00.000000000",
- "transactionSet": {
- "code": "850",
- "description": "Purchase Order"
}, - "controlNumbers": {
- "transaction": "0001",
- "functionalGroup": "17"
}, - "edi": {
- "x12Version": "4010",
- "functionalIdentifierCode": "PO",
- "transactionGroupType": "PO",
- "segmentTerminator": "~"
}, - "businessKey": {
- "name": "purchaseOrderNumber",
- "value": "PO-100045"
}
}
], - "nextCursor": null,
- "hasMore": false,
- "window": {
- "startDate": "2026-03-01T00:00:00.000000000",
- "endDate": "2026-03-31T23:59:59.999999999"
}
}Returns the transaction summary, downloadable document payloads, mapped inbound outputs, timeline events, and linked outbound reply transactions.
| messageId required | string AS2 message id. |
| transactionKey required | string Transaction key, usually |
{- "success": true,
- "transaction": {
- "summary": {
- "id": "msg-850-api/17#0001",
- "messageId": "msg-850-api",
- "transactionKey": "17#0001",
- "replyToMessageId": "string",
- "direction": "inbound",
- "partnerName": "Customer One",
- "timestamp": "2026-03-25T18:15:00.000000000",
- "transactionSet": {
- "code": "850",
- "description": "Purchase Order"
}, - "controlNumbers": {
- "transaction": "0001",
- "functionalGroup": "17"
}, - "edi": {
- "x12Version": "4010",
- "functionalIdentifierCode": "PO",
- "transactionGroupType": "PO",
- "segmentTerminator": "~"
}, - "businessKey": {
- "name": "purchaseOrderNumber",
- "value": "PO-100045"
}
}, - "mappedOutputs": [
- {
- "id": "mapped-output-1",
- "sequenceNumber": 1,
- "contentType": "application/json",
- "createdAt": "2026-03-25T18:15:01.000000000",
- "businessKey": {
- "name": "purchaseOrderNumber",
- "value": "PO-100045"
}, - "mapping": {
- "id": 44,
- "type": "ManagedQueueMapping",
- "file": "customer-one-850.jslt",
- "fileSha256Hash": "string",
- "currentFileSha256Hash": "string",
- "versionStatus": "current"
}, - "extraFields": {
- "property1": "string",
- "property2": "string"
}, - "payload": "string"
}
], - "x12": "string",
- "mdn": {
- "messageId": "mdn-850-api",
- "disposition": "processed",
- "report": "string"
}, - "functionalAck": {
- "messageId": "fa-850-api",
- "sent": true,
- "x12": "string",
- "mdn": {
- "messageId": "mdn-850-api",
- "disposition": "processed",
- "report": "string"
}
}, - "technicalAck": {
- "sent": true,
- "x12": "string",
- "timestamp": "2026-03-25T18:15:02.000000000",
- "responseStatusCode": 200,
- "responseBody": "string"
}, - "documents": [
- {
- "id": "raw-x12",
- "type": "x12",
- "label": "Inbound X12",
- "contentType": "application/edi-x12",
- "encoding": "text",
- "timestamp": "2026-03-25T18:15:00.000000000",
- "contentLength": 256,
- "content": "string",
- "metadata": { }
}
], - "events": [
- {
- "id": "transaction",
- "type": "transaction.received",
- "label": "Transaction received",
- "timestamp": "2026-03-25T18:15:00.000000000",
- "details": { }
}
], - "relatedTransactions": [
- { }
]
}
}Returns raw X12, mapped inbound outputs, MDN reports, acknowledgements, and HTTP response bodies recorded for the transaction.
| messageId required | string AS2 message id. |
| transactionKey required | string Transaction key, usually |
{- "success": true,
- "documents": [
- {
- "id": "raw-x12",
- "type": "x12",
- "label": "Inbound X12",
- "contentType": "application/edi-x12",
- "encoding": "text",
- "timestamp": "2026-03-25T18:15:00.000000000",
- "contentLength": 256,
- "content": "string",
- "metadata": { }
}
]
}Returns a normalized timeline for the transaction, including receipt or send events, mapping events, MDNs, acknowledgements, and linked replies.
| messageId required | string AS2 message id. |
| transactionKey required | string Transaction key, usually |
{- "success": true,
- "events": [
- {
- "id": "transaction",
- "type": "transaction.received",
- "label": "Transaction received",
- "timestamp": "2026-03-25T18:15:00.000000000",
- "details": { }
}
]
}Returns outbound reply transactions linked to an inbound transaction by replyToMessageId. Use this to render replies underneath the inbound document in a custom viewer.
| messageId required | string AS2 message id. |
| transactionKey required | string Transaction key, usually |
{- "success": true,
- "transaction": {
- "id": "msg-850-api/17#0001",
- "messageId": "msg-850-api",
- "transactionKey": "17#0001",
- "replyToMessageId": "string",
- "direction": "inbound",
- "partnerName": "Customer One",
- "timestamp": "2026-03-25T18:15:00.000000000",
- "transactionSet": {
- "code": "850",
- "description": "Purchase Order"
}, - "controlNumbers": {
- "transaction": "0001",
- "functionalGroup": "17"
}, - "edi": {
- "x12Version": "4010",
- "functionalIdentifierCode": "PO",
- "transactionGroupType": "PO",
- "segmentTerminator": "~"
}, - "businessKey": {
- "name": "purchaseOrderNumber",
- "value": "PO-100045"
}
}, - "relatedTransactions": [
- {
- "summary": {
- "id": "msg-850-api/17#0001",
- "messageId": "msg-850-api",
- "transactionKey": "17#0001",
- "replyToMessageId": "string",
- "direction": "inbound",
- "partnerName": "Customer One",
- "timestamp": "2026-03-25T18:15:00.000000000",
- "transactionSet": {
- "code": "850",
- "description": "Purchase Order"
}, - "controlNumbers": {
- "transaction": "0001",
- "functionalGroup": "17"
}, - "edi": {
- "x12Version": "4010",
- "functionalIdentifierCode": "PO",
- "transactionGroupType": "PO",
- "segmentTerminator": "~"
}, - "businessKey": {
- "name": "purchaseOrderNumber",
- "value": "PO-100045"
}
}, - "mappedOutputs": [
- {
- "id": "mapped-output-1",
- "sequenceNumber": 1,
- "contentType": "application/json",
- "createdAt": "2026-03-25T18:15:01.000000000",
- "businessKey": {
- "name": "purchaseOrderNumber",
- "value": "PO-100045"
}, - "mapping": {
- "id": 44,
- "type": "ManagedQueueMapping",
- "file": "customer-one-850.jslt",
- "fileSha256Hash": "string",
- "currentFileSha256Hash": "string",
- "versionStatus": "current"
}, - "extraFields": {
- "property1": "string",
- "property2": "string"
}, - "payload": "string"
}
], - "x12": "string",
- "mdn": {
- "messageId": "mdn-850-api",
- "disposition": "processed",
- "report": "string"
}, - "functionalAck": {
- "messageId": "fa-850-api",
- "sent": true,
- "x12": "string",
- "mdn": {
- "messageId": "mdn-850-api",
- "disposition": "processed",
- "report": "string"
}
}, - "technicalAck": {
- "sent": true,
- "x12": "string",
- "timestamp": "2026-03-25T18:15:02.000000000",
- "responseStatusCode": 200,
- "responseBody": "string"
}, - "documents": [
- {
- "id": "raw-x12",
- "type": "x12",
- "label": "Inbound X12",
- "contentType": "application/edi-x12",
- "encoding": "text",
- "timestamp": "2026-03-25T18:15:00.000000000",
- "contentLength": 256,
- "content": "string",
- "metadata": { }
}
], - "events": [
- {
- "id": "transaction",
- "type": "transaction.received",
- "label": "Transaction received",
- "timestamp": "2026-03-25T18:15:00.000000000",
- "details": { }
}
], - "relatedTransactions": [
- { }
]
}
]
}