ModernEDI Integration API (1.2.0)

License: Proprietary

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:

  1. Poll GET /mapped-outputs for mapped inbound documents.
  2. Store or process the returned payload in your system.
  3. Call POST /mapped-outputs/{id}/ack after your system has accepted the mapped output.
  4. Build the reply document from your system of record and call POST /as2/reply.
  5. Use /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.

Outbound AS2

Send reply documents and standalone outbound AS2 messages through an existing ModernEDI partner connection.

Send a fully formed outbound X12 interchange

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.

Authorizations:
IntegrationApiKeyHeaderIntegrationApiKeyBearer
query Parameters
test
boolean
Default: false

When true, use the test identifiers and test endpoint configured for the partner connection.

Request Body schema: application/json
required
customer
required
string

Exact configured partner name for the outbound message destination.

x12
required
string <byte>

Base64-encoded X12 payload. For /send, this should be a complete outbound interchange.

transactionGroupType
required
integer

X12 transaction set identifier code.

Responses

Request samples

Content type
application/json
{
  • "customer": "Customer One",
  • "x12": "SVNBKjAwKiAgICAgICAgICAqMDAqICAgICAgICAgICpaWipTRU5ERVJJRCAgICAgICAqWloqUkVDRUlWRVJJRCAgICAgKjI2MDQyNyoyMTAwKlUqMDA0MDEqMDAwMDAwMDAxKjAqVCo+fkdTKlBPKlNFTkRFUipSRUNFSVZFUioyMDI2MDQyNyoyMTAwKjEqWCowMDQwMTB+U1QqODUwKjAwMDF+U0UqMiowMDAxfkdFKjEqMX5JRUEqMSowMDAwMDAwMDF+",
  • "transactionGroupType": 850
}

Response samples

Content type
application/json
{
  • "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~"
}

Send a follow-up document tied to an inbound message

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.

Authorizations:
IntegrationApiKeyHeaderIntegrationApiKeyBearer
query Parameters
test
boolean
Default: false

When true, use the test identifiers and test endpoint configured for the partner connection.

Request Body schema: application/json
required
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 messageId returned by GET /mapped-outputs.

x12
required
string <byte>

Base64-encoded X12 payload. This is typically a single ST/SE transaction body.

functionalGroupType
string

Optional X12 functional group type. If omitted, the runtime tries to infer it from transactionGroupType.

transactionGroupType
required
integer

X12 transaction set identifier code.

object (X12SenderConfig)

Optional override for outbound X12 sender identifiers.

Responses

Request samples

Content type
application/json
{
  • "customer": "Customer One",
  • "originalMessageId": "msg-850-api",
  • "x12": "U1QqODU2KjAwMDF+U0UqMiowMDAxfg==",
  • "functionalGroupType": "SH",
  • "transactionGroupType": 856
}

Response samples

Content type
application/json
{
  • "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~"
}

Send a carbon copy of an inbound message flow to another partner

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.

Authorizations:
IntegrationApiKeyHeaderIntegrationApiKeyBearer
query Parameters
test
boolean
Default: false

When true, use the test identifiers and test endpoint configured for the partner connection.

Request Body schema: application/json
required
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 messageId returned by GET /mapped-outputs.

x12
required
string <byte>

Base64-encoded X12 payload. This is typically a single ST/SE transaction body.

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.

Responses

Request samples

Content type
application/json
{
  • "customer": "Customer One",
  • "copyToCustomer": "Customer Two",
  • "originalMessageId": "msg-850-api",
  • "x12": "U1QqODEwKjAwMDF+U0UqMiowMDAxfg==",
  • "functionalGroupType": "IN",
  • "transactionGroupType": 810
}

Response samples

Content type
application/json
{
  • "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~"
}

Mapped Output Queue

Receive mapped inbound documents by polling, or configure per-partner HTTPS push delivery in the workspace.

Poll mapped inbound output

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.

Authorizations:
IntegrationApiKeyHeaderIntegrationApiKeyBearer
query Parameters
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.

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "messages": [
    ],
  • "limit": 10,
  • "visibilityTimeoutSeconds": 120,
  • "hasMore": false
}

Mark mapped output as received

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.

Authorizations:
IntegrationApiKeyHeaderIntegrationApiKeyBearer
path Parameters
id
required
string

Mapped output id returned by GET /mapped-outputs.

Request Body schema: application/json
required
receiptHandle
required
string

Token from the latest poll response for this mapped output id.

Responses

Request samples

Content type
application/json
{
  • "receiptHandle": "0af7dd1d-b6a1-4ff9-8ad1-d395de0b97f2"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "id": "7e8276c1d55988a4bf7fbf9f8c2d87187a24bd316dfed84bbf64397b8d5b6e4a",
  • "messageId": "msg-850-api",
  • "mappedOutputKey": "17#0001#00001",
  • "ackedAt": "2026-04-29T15:34:10Z"
}

Transaction Viewer

Read-only transaction history, documents, events, acknowledgements, and linked replies.

List transactions

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.

Authorizations:
IntegrationApiKeyHeaderIntegrationApiKeyBearer
query Parameters
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.

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "transactions": [
    ],
  • "nextCursor": null,
  • "hasMore": false,
  • "window": {
    }
}

Get transaction detail

Returns the transaction summary, downloadable document payloads, mapped inbound outputs, timeline events, and linked outbound reply transactions.

Authorizations:
IntegrationApiKeyHeaderIntegrationApiKeyBearer
path Parameters
messageId
required
string

AS2 message id.

transactionKey
required
string

Transaction key, usually <functional-group-control-number>#<transaction-control-number>.

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "transaction": {
    }
}

Get transaction documents

Returns raw X12, mapped inbound outputs, MDN reports, acknowledgements, and HTTP response bodies recorded for the transaction.

Authorizations:
IntegrationApiKeyHeaderIntegrationApiKeyBearer
path Parameters
messageId
required
string

AS2 message id.

transactionKey
required
string

Transaction key, usually <functional-group-control-number>#<transaction-control-number>.

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "documents": [
    ]
}

Get transaction events

Returns a normalized timeline for the transaction, including receipt or send events, mapping events, MDNs, acknowledgements, and linked replies.

Authorizations:
IntegrationApiKeyHeaderIntegrationApiKeyBearer
path Parameters
messageId
required
string

AS2 message id.

transactionKey
required
string

Transaction key, usually <functional-group-control-number>#<transaction-control-number>.

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "events": [
    ]
}

Get linked reply transactions

Returns outbound reply transactions linked to an inbound transaction by replyToMessageId. Use this to render replies underneath the inbound document in a custom viewer.

Authorizations:
IntegrationApiKeyHeaderIntegrationApiKeyBearer
path Parameters
messageId
required
string

AS2 message id.

transactionKey
required
string

Transaction key, usually <functional-group-control-number>#<transaction-control-number>.

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "transaction": {
    },
  • "relatedTransactions": [
    ]
}