- Path: /edifact/write
- HTTP Verb: POST
- Required API Key: Ocp-Apim-Subscription-Key (Get API Key)
- Request Content-Type: application/json
- Request limit: 28.6 MB
- Response Content-Type: application/octet-stream
Description
Translates an EdifactInterchange object to a raw EDIFACT interchange and returns it as a stream.
Errors
- 200: Success
- 400: When the EdifactInterchange has an invalid JSON structure.
- 500: Something went wrong on our end. Please report at support@edination.com
Parameters
preserveWhitespace boolean
Whether to preserve blank data elements so the output contains multiple delimiters instead of omitting any excess delimiters. The default is false.
charSet string
The encoding of the resulting stream. The default is utf-8.
The available values are:
Value | Description |
---|---|
utf-16 | Unicode |
unicodeFFFE | Unicode (Big endian) |
utf-32 | Unicode (UTF-32) |
utf-32BE | Unicode (UTF-32 Big endian) |
us-ascii | US-ASCII |
iso-8859-1 | Western European (ISO) |
utf-7 | Unicode (UTF-7) |
utf-8 | Unicode (UTF-8) |
postfix string
The postfix to be applied at the end of each segment, just after the segment separator. This is usually a carriage return (CR), line feed (LF) or both. By default, there is no postfix.
NOTE:
If you need to generate an EDIFACT with non-default separators or change the decimal notation to comma, add a UNA object as part of the EdifactInterchange payload:
- Segment separator: EdifactInterchange.UNA.Segment
- Data element separator: EdifactInterchange.UNA.DataElement
- Escape indicator: EdifactInterchange.UNA.ReleaseIndicator
- Component data element separator: EdifactInterchange.UNA.ComponentDataElement
- Decimal notation: EdifactInterchange.UNA.DecimalNotation
sameRepetionAndDataElement boolean
Sometimes the same delimiter is used to denote data element separator and repetition separator as in IATA transactions. By default, this is false.
eancomS3 boolean
The default syntax for EANCOM transactions. By default, all EANCOM transactions will be constructed according to the rules of Syntax 4. Set this flag to true if you need Syntax 3 to be used.
Example