Stage transactions

This endpoint stages a transaction for outbound delivery.

POST/partnerships/{partnershipId}/transaction-groups/{transactionGroupId}/transactions/{transactionSettingId}

Stedi stores the transaction in the transaction group specified by the transactionGroupId. If a group with that ID does not exist, Stedi creates one.

When you're ready to send all of the transactions in the group, call the Deliver Transaction Group endpoint with the transactionGroupId to generate and deliver a fully-formed EDI file to your trading partner.

Transaction data

You provide transaction data in Guide JSON format. The transaction data must be < 5MB.

All of the transactions you stage in a transaction group must use the same transaction settings. If you attempt to stage a transaction with different settings, Stedi returns an error.

Authorization
RequiredHeader

A Stedi API Key for authentication.

Path Parameters

partnershipId
StringRegex pattern: ^([a-zA-Z0-9._-]+)$Length: 1 - 81

A unique ID for this partnership within Stedi. You can find this ID on the Trading partners page under Partnership identifier.

A unique ID for the outbound transaction setting Stedi should use to determine the correct guide for validation and generation. It must be attached to the partnership associated with the partnershipId. To find the transactionSettingsId, go to the partnership and use the Transaction Setting ID field for the outbound transaction setting.

A unique ID for a group of transactions on Stedi. Stedi creates a new transaction group if one does not exist with the specified ID.

Headers

A unique string to identify this request to the server. The key can be up to 255 characters. You can safely retry requests with the same idempotency key within 24 hours of making the first request. This prevents sending duplicate data to your trading partners in case of network errors or other intermittent failures. Required if providing async: true Learn more.

Body

application/json

The data for an EDI transaction. If you are not using a mapping, this transaction data must be < 5MB and the shape should match the Guide JSON format for the specified outbound transaction setting. If you are using a mapping, this transaction data must be < 4MB and the shape must match the source schema for the specified mapping. Either transaction or async: true is required.

mappingId
String

Specify a mapping id to transform the transaction to Stedi's Guide JSON format. Can not be used with async: true.

Customize the Application IDs for you or your trading partner.

Show attributes
localApplicationId
groupOverrides.localApplicationId
StringLength: 2 - 15

Set the GS-02 element to a custom value. If not set, Stedi uses the Application ID for the local profile associated with the partnership.

partnerApplicationId
groupOverrides.partnerApplicationId
StringLength: 2 - 15

Set the GS-03 element to a custom value. If not set, Stedi uses the Application ID for the partner profile associated with the partnership.

async
Boolean

Determines if the transaction should be uploaded asynchronously through a presigned url. Either transaction or async: true is required. Idempotency-Key header is required when using async: true.

Response

application/json

CreateTransactionGroup 201 response

transactionGroupId
StringRequired

The transaction group ID where you created and added the transaction.

createdAt
StringRequiredFormat: date-time

The time Stedi staged the transaction.

transactionId
StringRequired

A unique ID for the staged transaction Stedi created within the group.

uploadUrl
String

A pre-signed URL to upload the file using a PUT request.