Generate and send EDI with Stedi Core
Configure Core to generate EDI
To generate EDI, you must set up the following configuration in Core:
Profiles
Partnership
- Connection: Create a connection that describes where the resulting EDI file should be delivered.
- Transaction Settings: Define an outbound transaction setting for each transaction set you plan to send to your trading partner.
Core uses these settings across all instances of a given EDI transaction set within a partnership. For example, if you configure settings for an 810 Invoice inside a partnership from your business to Walmart, Core will apply those settings every time it generates an 810 for Walmart.
Runtime data required to generate EDI
Note: The Generate API groups transactions into the correct Functional Group automatically, based on Functional Identifier Code.
Generate EDI
file.delivered
event and one or more transaction.processed
events, with the Direction SENT
within the body of the event. Visit Events for details.Stedi SDK
transactions
array is abbreviated for readability.import core from "@stedi/sdk-client-partners";
export const handler = async (event) => {
const client = new core.PartnersClient({
region: "us",
apiKey: "YOUR_STEDI_API_KEY_HERE",
});
const { edi } = await client.send(
new core.GenerateEdiCommand({
transactionGroups: [
{
transactionSettingId: "005010-850",
transactions: [
{
heading: {...},
detail: {...},
summary: {...}
},
}
],
})
);
return { edi };
};
Stedi HTTP API
transactions
array abbreviated for readability.curl --location 'https://partners.us.stedi.com/2022-01-01/x12/partnerships/this-is-me_another-merchant/generate-edi' \
--header 'Content-Type: application/json' --header 'Authorization: Key YOUR_STEDI_API_KEY_HERE' \
--data-raw '{
"transactionGroups": [
{
"transactionSettingId": "005010-850",
"transactions": [
{
"heading": { }, "detail": {}, "summary": {}
}
]
}
]
}'
View generated EDI
artifactId
that you can use to locate the generated document in Core’s File Executions page.{
artifactId: '341d7a6a-252f-4c5e-baf9-e0bdb32dbaae.x12',
edi: 'ISA*00* *00* *ZZ*THISISME *14*ANOTHERMERCH ... IEA*1*000000009~'
}
Feedback
Have an idea for something we could improve? Page not clear? We love feedback - send us a message.