This quickstart uses Postman to consume the EDI API, get Postman here.
In this tutorial we'll show how to translate an EDIFACT file containing one or more interchanges (UNB/UNZ blocks).
Set the Params
Version 1 of the API is limited to files with size up to 3 MB, hence read_mode can only be set to read_small. Version 2 will cater for files of any size.
If you'd prefer to translate and validate the file as part of the same operation, set validate to True.
Set the Headers
If you'd like to receive XML-encoded responses, set Accept 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
Select the form-data option, then add a a key with file value and select an EDI file:
You can add additional parameters as defined in the API Reference but they must appear before the file otherwise they will be ignored.
Hit the Send button
Use the following URL:
Inspect the response
The response is an array of EdifactInterchange objects, one for each UNB\UNZ block in the file.
You can inspect the ReaderErrorContext object to determine if there were any errors during translation.