Customize the ISA and GS headers
You can customize an EDI file’s Interchange (ISA
) and Group (GS
) headers - also known as the envelope - using the Create Outbound Interchange endpoint.
If you don’t need to customize the envelope, we strongly recommend generating EDI files with the Create Outbound Transaction endpoint instead because it is simpler and easier to use.
Interchange overrides
You can customize the following elements in the ISA
header:
- Interchange Authorization values (
ISA-01
toISA-04
): Some trading partners require additional information in these elements to verify the transaction. - Interchange Version Control Number Code (
ISA-12
): Stedi defaults to using the X12 release number of the guide associated with the transaction. However, some partners require a different release for theISA
envelope. - Acknowledgment Requested Code (
ISA-14
): This code indicates whether you are requesting aTA1
Interchange Acknowledgments. - Interchange Usage Indicator Code (
ISA-15
): This code indicates whether data is test, production, or information. Stedi defaults toP
for production data, but you may need to set this toT
when sending test data.
Visit the Create Outbound Transaction documentation for more details.
Group overrides
By default, Stedi generates EDI files using the application IDs (GS-02
and GS-03
elements) configured for each profile within the partnership. However, some partners use multiple application IDs to route files to different locations.
To set custom application IDs, set the localApplicationId
and the partnerApplicationId
properties in the override
object. These values are optional; you should only send them when you need to override the application IDs configured within each profile.
You can include multiple overrides
objects to customize the application IDs for each transaction group in the file.
Call the Interchange API
The Create Outbound Interchange endpoint can generate fully-formed EDI files containing multiple transactions and even multiple transaction types.
Request data
The API uses the following data to generate and deliver an EDI file.
Data | Required | Description |
---|---|---|
partnershipId | Yes | Include this ID within the API route to identify the associated partnership. You can find this ID on the Trading partners page under Partnership identifier. |
transactionGroups | Yes | The Generate API accepts multiple arrays of transactions in a single API call, allowing you to send multiple transactions or even multiple functional groups in a single file. If you only plan to send a single type of transaction (such as a Purchase Order), then your API request should have one transaction group. |
transactionGroups.transactionSettingId | Yes | This ID specifies the outbound transaction setting Stedi should use to validate the transaction data and generate the file. To find this ID, go to the partnership, find the outbound transaction setting, and copy its Transaction Setting ID. |
transactionGroups.transactions | Yes | This object contains the transaction data. It must conform to the Guide JSON format for the specified transaction setting. |
filename | Specify the name of the generated EDI file. Stedi overwrites files with the same name, so we recommend making the filename unique by including a timestamp or other identifier. If you do not specify a filename, Stedi autogenerates a unique name using a UUID. | |
Envelope overrides | You can use several optional parameters to customize aspects of the EDI envelope - both the ISA header and GS header. |
Sample request and response
The following example shows a cURL request and response.
The API returns the full X12 EDI file in the response. The response also includes an artifactId
(equivalent to the file name) and a globally unique fileExecutionId
that you can use to locate the generated file.
Was this page helpful?