Download OpenAPI specification:
RESTful API for EDI document processing and workflow automation. Trigger asynchronous workflows to parse, transform, and route EDI transactions between trading partners and your ERP system.
Obtain a JWT access token using the OAuth 2.0 Client Credentials Flow.
IMPORTANT: This endpoint is designed for server-to-server authentication only. Never expose your client_secret in frontend applications (browsers, mobile apps).
Your credentials (client_id and client_secret) are issued by Surpass and tied to your integration account. Contact Surpass support to obtain credentials.
| grant_type required | string Value: "client_credentials" Must be 'client_credentials' |
| client_id required | string Your Surpass-issued client ID |
| client_secret required | string Your Surpass-issued client secret |
| audience required | string Must be 'https://edi-api.surpass.biz' |
{- "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IjJJTzFm...",
- "token_type": "Bearer",
- "expires_in": 86400
}Verify that your access token is valid and inspect its contents. This is a simple health check endpoint to confirm your authentication is working correctly.
Empty object or any valid JSON
{ }{- "status": "ok",
- "message": "Token is valid",
- "clientId": "JWwtFLcgEyD1Gxq2rZehcwzDPn81zV2a@clients",
- "issuedAt": "2026-02-13T15:31:52.000Z",
- "expiresAt": "2026-02-14T15:31:52.000Z"
}Starts a new Surpass workflow to process an inbound or outbound EDI document.
This endpoint queues a workflow for asynchronous processing and returns immediately with a 202 Accepted status.
The workflow executes in the background - use GET /workflow/{id} to check status and results.
Supported EDI Types: 850 (Purchase Order), 855 (PO Acknowledgement), 856 (Advance Ship Notice), 810 (Invoice), 997 (Functional Acknowledgement), or use docType "edi" to auto-detect from raw EDI.
Each request must include:
platform, client, and partner identifiersdocType and directionpayload containing either Surpass JSON (payload.json) or raw EDI (payload.edi)š Linking Related Workflows
Optionally pass a workflowId to group related workflows together.
Example: When processing a purchase order lifecycle:
workflowId: "wf_123"workflowId: "wf_123"workflowId: "wf_123"workflowId: "wf_123"Then GET /workflow/wf_123 returns a unified view of all linked workflows.
This enables full transaction lifecycle visibility including retries, ACKs, and chained outputs.
If omitted, a new workflowId is generated automatically.
š¤ Payload Formats
payload.json: For outbound documents where you provide data in Surpass JSON format.
Requires a specific docType (810, 850, etc.).
payload.edi: For inbound or outbound documents where you provide raw EDI (X12 format).
Can use docType: "edi" to auto-detect the document type from the EDI.
š Authentication is required via OAuth 2.0 Client Credentials.
| workflowId | string Optional. Provide an existing workflowId to link this workflow with related workflows. If omitted, a new workflowId is generated automatically. |
| platform required | string Platform identifier (provided by Surpass) |
| client required | string Your client identifier (provided by Surpass) |
| partner required | string Trading partner identifier (e.g., walmart, target, costco) |
| docType required | string EDI document type. Use specific types (810, 850, 855, 856, 997) when known, or "edi" to auto-detect from raw EDI payload. |
| direction required | string Enum: "inbound" "outbound" Workflow direction. - inbound: Processing EDI received from partner - outbound: Generating EDI to send to partner |
| select | Array of strings Optional. Array of JMESPath queries to filter the response payload. Use this to extract specific data from workflow results. If omitted, the full workflow result is returned. |
required | object The EDI document to be processed. Must contain either
|
{- "platform": "surpass-edi",
- "client": "your-client",
- "partner": "walmart",
- "docType": "810",
- "direction": "outbound",
- "test": true,
- "payload": {
- "json": {
- "invoiceNumber": "INV-12345",
- "invoiceDate": "2024-01-15",
- "totalAmount": 1500
}
}
}{- "workflowId": "wf_1770997534718_0f16d641",
- "platform": "surpass-edi",
- "client": "your-client",
- "partner": "target",
- "docType": "850",
- "direction": "inbound",
- "result": {
- "$metadata": {
- "httpStatusCode": 200,
- "requestId": "9587bc76-d47b-5b7f-9d78-de7f9d2530ba"
}, - "MessageId": "048f7cf9-659c-409d-8e2a-59e641800b11"
}
}{- "workflowId": "string",
- "event": "workflowStarted",
- "timestamp": "2019-08-24T14:15:22Z",
- "data": { }
}Returns the current status, metadata, and step history for all workflows associated with the given workflowId.
This endpoint provides a unified view of multi-step or related workflows initiated with the same workflowId.
Response Format: Always returns an array of workflow objects (even if only one workflow exists).
Linked Workflows: A single workflowId may include multiple document types and directions for a complete transaction lifecycle.
Example: Order-to-cash flow using the same workflowId:
For each workflow, the response includes:
workflowId, timestamp, platform, client, partner, docType, and directioncontext object with metadata, original payload (JSON/EDI), transformation results, and ERP responsessteps array showing execution order, status, duration, and output for each workflow stepšÆ Selective Responses
Use the select query parameter to extract specific data instead of the full workflow response.
This is useful when you only need certain outputs like EDI strings, JSON payloads, or ACK statuses.
Available select values:
query850Json - Returns Surpass JSON representation of 850 documentsquery855Edi - Returns raw EDI string of 855 documentsquery856Edi - Returns raw EDI string of 856 documentsquery810Edi - Returns raw EDI string of 810 documentsquery997Edi - Returns raw EDI string of 997 documentsquery997AckStatus - Returns acknowledgment status of documentsqueryLabelUrl - Returns shipping label URLsMultiple selections: You can specify multiple values by repeating the parameter:
?select=query850Json&select=query997AckStatus
š” Pro Tip: Use a shared workflowId across related document types to retrieve the entire transaction history in a single call.
š Authentication is required via OAuth 2.0 Client Credentials.
| workflowId required | string Example: wf_1770986683729_9e18b2ac Unique workflow identifier |
| select | string Enum: "query850Json" "query855Edi" "query856Edi" "query810Edi" "query997Edi" "query997AckStatus" "queryLabelUrl" Examples:
Filter response to specific workflow outputs. Can be specified multiple times. Supported values:
|
[- {
- "workflowId": "wf_1770986683729_9e18b2ac",
- "timestamp": "2026-02-13T12:44:56.559Z",
- "platform": "surpass-edi",
- "client": "black-dog-foods",
- "partner": "target",
- "docType": "850",
- "direction": "inbound",
- "context": {
- "json": {
- "heading": {
- "transaction_set_header_st": {
- "transaction_set_identifier_code_01": "850"
}
}
}
}, - "steps": [
- {
- "stepName": "workflowStart",
- "status": "info",
- "stepResult": "Starting workflow"
}, - {
- "stepName": "transformToJson",
- "status": "success",
- "stepResult": "Step transformToJson completed"
}
]
}
]Accepts structured EDI input and returns a parsed JSON representation based on document type and version.
| edi required | string Raw EDI string to be parsed. |
| hasEnvelope required | boolean Indicates if the EDI input includes envelope segments (ISA, GS, ST). |
object | |
| documentType | string Optional fallback document type if envelope is missing. |
| version | string Optional fallback version if envelope is missing. |
{- "edi": "ISA*00* *00* *ZZ*ABCDEFGHIJKLMNO*ZZ*123456789012345*210101*1253*U*00401*000000001*0*T*>~GS*PO*...~",
- "hasEnvelope": true,
- "metadata": {
- "segmentTerminator": "~",
- "elementTerminator": "*",
- "componentDelimiter": ":"
}, - "documentType": "string",
- "version": "string"
}{ }Converts Surpass JSON into a normalized EDI string for supported document types and versions.
| json required | object Surpass JSON representation of the EDI document to convert. |
| documentType required | string Enum: 990 210 846 810 850 940 945 EDI transaction set to generate. |
| version required | string Enum: "004010" "005010" EDI version number. |
required | object |
{- "json": { },
- "documentType": "850",
- "version": "004010",
- "metadata": {
- "segmentTerminator": "~",
- "elementTerminator": "*",
- "componentDelimiter": ":"
}
}{- "edi": "string"
}