Retrieve File Execution Input
Fetch a file execution's input document before any translation and mappings.
/executions/{executionId}/inputThis endpoint retrieves a file execution's input document before it passes through any translation or mappings. You can use it to retrieve 277CA claim acknowledgments or 835 Electronic Remittance Advice (ERAs) in X12 EDI format.
-
Call this endpoint with the file execution ID for the transaction you want to retrieve. This is returned as the
items[].fileExecutionIdin the List Transactions and Poll Transactions endpoint responses. -
The endpoint returns a
302temporary redirect to the document download URL. Many HTTP clients will automatically follow this redirect, or have a simple follow redirects configuration to set. For example, the-Lor--locationflags in cURL requests will automatically follow the redirect. In this case, the response contains the full input document.If your implementation doesn't automatically follow the redirect, the response body contains a pre-signed URL in the
documentDownloadUrlproperty. This URL is available for 60 minutes. -
If required, make a
GETrequest to download the input document from thedocumentDownloadUrl.curl --request GET \ --url "<documentDownloadUrl>" \ --output /path/to/file.txt
There are no size restrictions on documents when fetching from this endpoint.
Input document format
The input document can be in either X12 EDI or JSON format, depending on the source. For example:
- If you send an 837 claim to one of Stedi's JSON endpoints, the input document will be in JSON format.
- If a payer sends you a 277CA claim acknowledgment or an 835 Electronic Remittance Advice (ERA), the input document will be in the original X12 EDI format, including the envelope.
A Stedi API Key for authentication.
Path Parameters
A unique identifier for the file execution within Stedi. This ID is included in the file processed event, or you can retrieve it manually from the file's details page within the Stedi portal.
Response
A URL to download the document. This URL is available for 60 minutes.
curl --request GET \ --url "https://core.us.stedi.com/2023-08-01/executions/{executionId}/input" \ --header "Authorization: <api_key>"{
"documentDownloadUrl": "https://stedi-default-core-artifacts.s3.us-east-1.amazonaws.com/write/input/06bdccdc-4aaa-4aaa..."
}