Translating resources with the HTTP POST Method
In order to translate from EDI or translate to EDI use the following resources with the POST method:
Read EDI file into JSON
You can read two resources, X12 files and EDIFACT files/streams. To do so, execute HTTP POST to the resource URL, with the request body being the file to translate included as form-data content.
- URL: https://api.edination.com/v2/x12/read
- Request: X12 file as form-data
- Response: Array of X12Interchange
- URL: https://api.edination.com/v2/edifact/read
- Request: EDIFACT file as form-data
- Response: Array of EdifactInterchange
The response will contain an array of EDI interchanges, encoded in application/json format.
Write JSON to EDI file
Again, you can write out two resources, X12 and EDIFACT. Execute HTTP POST to the resource URL, the request body must contain a single EDI interchange, included as application/json content.
- URL: https://api.edination.com/v2/x12/write
- Request: X12Interchange
- Response: X12 file as application/octet-stream
- URL: https://api.edination.com/v2/edifact/write
- Request: EdifactInterchange
- Response: EDIFACT file as application/octet-stream
The response will contain an EDI interchange, encoded in application/octet-stream format.