Create a Transaction
Pre-requisites
Before you can create a Transaction you must have:
- Set up your Organization
- Set up a Trading Partnership
Create a Transaction
In most instances, EDI transactions will be created by your System of Record (SOR) and then passed on to Orderful. However there are situations where you may want to enter a transaction directly into Orderful, for example for testing purposes.
The transaction must correspond to an existing, configured Relationship in Orderful. This means that, in order to send a test transaction, you must have at least one inbound Relationship configured.
Transactions must be:
- in EDIFACT, JSON, or X12 format
- 50MB or less for EDIFACT/X12 files
- 100MB or less for JSON files
To create a Transaction you can:
- Upload a file
- Make an API call
- Make an API using our API Explorer
- Send a file to your outbound Communication Channel
Upload a file
To upload a Transaction in a file:
- Go to the Transactions page
- Click on Create Transaction
- Select Upload transaction
- Choose the file you want to upload.
File extension requirements:
- Files in EDIFACT format can use
.txt
or.edi
- Files in X12 format can use
.txt
or.x12
extensions - Files in JSON format can use the
.json
extension.
For more information about how the file contents must be structured see format information below.
File format for EDIFACT
- Start with a UNB segment.
- Have at least one interchange envelope (UNB/UNZ segments).
- Have at least one transaction set (UNH/UNT segments).
- Respect the presence and order of loops, segments, and elements defined by the EDIFACT standards for each transaction type inside each transaction set.
File format for JSON
Files containing JSON must use the following structure. The contents of your transaction should be entered into the message
object.
To see the possible Transaction Type values, see Available Transaction Types.
{
"type": {
"name": "TRANSACTION_TYPE_NAME"
},
"stream": "test",
"message": {
[...] // Enter your data here
},
"sender": {
"isaId": "ISA_ID_SENDER"
},
"receiver": {
"isaId": "ISA_ID_RECEIVER"
}
}
File format for X12
Files in the X12 format must:
- Start with an ISA segment.
- Have at least one interchange envelope (ISA/IEA segments).
- Have at least one functional group inside each interchange envelope (GS/GE segments).
- Have at least one transaction set inside each functional group (ST/SE segments).
- Respect the presence and order of loops, segments, and elements defined by the X12 standards for each transaction type inside each transaction set.
Make an API call
You can create a Transaction by sending an HTTP POST to the Orderful API's /transactions
endpoint.
You can only create one Transaction at a time.
For help generating the content of the transaction, see Generating an example payload. For a full description of this endpoint, please see Create a Transaction.
curl --location --request POST 'https://api.orderful.com/v3/transactions' \
--header 'Content-Type: application/json' \
--header 'orderful-api-key: YOUR_API_KEY' \
--data-raw '{
}
'
Make an API call using our API Explorer
Orderful's API Explorer is integrated into our REST API reference.
Only one Transaction can be created at a time.
You can create a Transaction using our Create a Transaction API reference page.
- Go to the Get your organization details page
- Get your API key from your Org's API Credentials page and enter it into the "Authentication" at the top right of the page.
- You can test that you've inputted your API key correctly by retrieving your Org details.
- On the right side of the page, under the payload, click on "Try It!"
- You should receive an
HTTP 200
response with your Org details in it.
- Go to the Create a Transaction page.
- On the “Create a Transaction” page, make sure that the “Language” on the right side is “Shell” and in the “Request” section click on Examples > Request Example. This will create an example JSON payload with the correct structure and placeholder values.
- Get your (sender)
isaId
and the receiver’sisaId
. These can be found on your Org’s Relationship’s page - Get the contents of your document in JSON format. These contents must begin and end with curly braces:
{}
- Now you should fill out the “Body Params” section of the page:
- Add a
type
object with aname
. The value of thename
should be from our list of available Transaction types. For example:850_PURCHASE_ORDER
- Indicate which
stream
you’d like to create this Transaction in. This will probably betest
. - Next, copy the contents of your document into the
message
box. - Add a
sender
object, then yourisaId
. - Add a
receiver
object, then the receiver’sisaId
.
- Add a
- Once everything is filled out, click on Try It! You should receive a 201 response, with a Transaction
id
in the response.
Send a file to your outbound Communication Channel
If you are using an outbound Communication Channel like AS2, FTP, or VAN, you can send the file using this system. The details of how this is done will depend on your implementation.
Transaction validation
After you have sent your transaction, you can check its transaction status by going to your Transactions page.
If there are any issues, please refer to the Transaction Statuses Overview.
Updated 11 months ago