Skip to main content
GET
Get a transaction's input document

Overview

Downloads the transaction’s input document — the raw artifact Cair originally received, which is the X12 EDI file for stedi, upload, and eob-conversion transactions. This is a 1:1 drop-in for Stedi’s Retrieve Transaction Input operation and the Stedi SDK’s getTransactionInput.

Authentication

The initial request is authenticated with your JWT Bearer token from POST /api/token, with the api-access feature. The download request that follows the redirect is authenticated by the presigned token in the URL and does not require the Authorization header.

Path parameters

string
required
The transactionId whose input artifact you want to download.

Two-step download flow

Media downloads on Stedi are a redirect to a short-lived, presigned URL, and Cair reproduces that exactly:
  1. Authenticated request. Call the endpoint with your Bearer token. Cair responds 302 Found with:
    • Location header pointing at a presigned URL.
    • Body { "documentDownloadUrl": "<presigned URL>" }.
  2. Follow the redirect. Fetch the presigned URL — with or without the Authorization header — and Cair streams the raw artifact bytes with a Content-Type matching the artifact (for input documents this is usually application/edi-x12).
Most HTTP clients follow the 302 automatically, so a Stedi SDK or a fetch with the default redirect: 'follow' gets the bytes in one call. The presigned URL is valid for 60 minutes and is bound to your organization, the transaction, and the input usage, so it cannot be replayed for another transaction or artifact kind.
The presigned URL is https://forecaster.cairhealth.com/api/stedi/2023-08-01/transactions/{transactionId}/input?token=.... Requests to it do not need (and ignore) the Authorization header; the token query parameter is what authorizes the download.

Example

Follow the redirect automatically with curl -L:
Handle the two steps explicitly:
With the Stedi SDK, getTransactionInput follows the redirect for you and returns the bytes:

Response

302 Found — body:
200 OK (after following the redirect) — the raw artifact, e.g.:

Errors

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

transactionId
string
required

Unique identifier of the processed transaction (the transactionId returned by the list/poll endpoints).

Response

Raw input artifact bytes, returned when the presigned URL is followed. Content-Type matches the artifact (e.g. application/edi-x12).

The response is of type file.