This quickstart uses Postman to consume the EDI API, get Postman here.
In this tutorial we'll show how to generate an EDIFACT functional group, UNG/UNE 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 GenerateEdifactGroup 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 ung object which represents the UNG segment
- The uneTrailers object array which requires a single UNE segment
- The transactions object which holds an array of transactions so you can validate one or more transactions in the same request
Each transaction derives from the base EdiMessage model and must be replaced with a concrete JSON/XML transaction (for example a purchase order or an invoice).
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 functional group ready to be saved to a file or processed otherwise