This quickstart uses Postman to consume the EDI API, get Postman here.
In this tutorial we'll show how to generate an EDIFACT interchange, UNB/UNZ block.
Set the Headers
If you'd like to send XML-encoded requests, set Content-Type to application/xml.
Set the API key to the key that you generated in the developer portal (the one above is for evaluation purposes only).
Set the Body
The generate request model (API Reference) can be encoded either as JSON or XML (set the Content-Type header):
The GenerateEdifactInterchange object consists of:
- The settings object (it is optional and can be passed as null). Use it if you need to generate EDI with custom separators, apply postfix such as \r\n at the end of each segment, or preserve white space
- The unb object which represents the UNB segment
- The groups (How to generate EDIFACT functional group) object array which represents the functional groups
- The unzTrailers object array which requires a single UNZ segment
- The errors object - can be ignored for this operation
UNA segment is automatically inserted when custom separator set is used.
TIP: Copy a transaction from the Translate response like this:
TIP: Use one of the sample generation requests we have included in the API portal:
Set the body in Postman:
Hit the Send button
Use the following URL:
Inspect the response
The response is encoded as an application/octet-stream and contains the raw EDI interchange ready to be saved to a file or processed otherwise