> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cairhealth.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a Transaction

> Fetch the full Stedi Core `TransactionSummary` for a single transaction, matching the Stedi SDK's `getTransaction`. Returns `404` if the transaction does not exist or is not owned by your organization.

## Overview

Returns the full `TransactionSummary` for a single transaction. This mirrors the Stedi SDK's `getTransaction` and is convenient when you already hold a `transactionId` (for example from a poll) and want to refresh its details or fetch its artifact URLs without re-listing.

## Authentication

JWT Bearer token from [`POST /api/token`](/api-reference/endpoint/token), with the `api-access` feature.

## Path parameters

<ParamField path="transactionId" type="string" required>
  The `transactionId` returned by [List Transactions](/api-reference/endpoint/stedi/list-transactions) or [Poll Transactions](/api-reference/endpoint/stedi/poll-transactions).
</ParamField>

## Example

```bash theme={null}
curl "https://forecaster.cairhealth.com/api/stedi/2023-08-01/transactions/c1f2e3d4a5b6c7d8e9f0a1b2c3d4e5f6" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
```

```ts theme={null}
const response = await fetch(
  `https://forecaster.cairhealth.com/api/stedi/2023-08-01/transactions/${transactionId}`,
  { headers: { Authorization: `Bearer ${process.env.CAIR_ACCESS_TOKEN}` } },
);
const transaction = await response.json();
```

## Response

```json theme={null}
{
  "transactionId": "c1f2e3d4a5b6c7d8e9f0a1b2c3d4e5f6",
  "fileExecutionId": "b0a1c2d3e4f5a6b7c8d9e0f1a2b3c4d5",
  "status": "succeeded",
  "direction": "INBOUND",
  "mode": "production",
  "processedAt": "2026-10-05T14:12:00.000Z",
  "artifacts": [
    {
      "artifactType": "application/edi-x12",
      "usage": "input",
      "sizeBytes": 2048,
      "url": "https://forecaster.cairhealth.com/api/stedi/2023-08-01/transactions/c1f2e3d4a5b6c7d8e9f0a1b2c3d4e5f6/input",
      "model": "transaction"
    },
    {
      "artifactType": "application/json",
      "usage": "output",
      "sizeBytes": 8192,
      "url": "https://forecaster.cairhealth.com/api/stedi/2023-08-01/transactions/c1f2e3d4a5b6c7d8e9f0a1b2c3d4e5f6/output",
      "model": "transaction"
    }
  ],
  "partnership": {
    "partnershipId": "local-clearinghouse",
    "partnershipType": "x12",
    "sender": { "profileId": "local" },
    "receiver": { "profileId": "clearinghouse" }
  },
  "x12": {
    "metadata": {
      "interchange": { "acknowledgmentRequestedCode": "0", "controlNumber": 42 },
      "functionalGroup": {
        "controlNumber": 1,
        "release": "005010X221A1",
        "date": "2026-10-05",
        "time": "14:12:00",
        "functionalIdentifierCode": "HP"
      },
      "transaction": { "controlNumber": "0001", "transactionSetIdentifier": "835" },
      "sender": { "applicationCode": "ZZ", "isa": { "qualifier": "ZZ", "id": "SUBMITTER" } },
      "receiver": { "applicationCode": "ZZ", "isa": { "qualifier": "ZZ", "id": "RECEIVER" } }
    }
  }
}
```

## Errors

Returns `404 ResourceNotFoundException` when the transaction does not exist **or** is not owned by your organization. See the [Transaction Stream Overview](/api-reference/endpoint/stedi/overview) for the full error model.


## OpenAPI

````yaml GET /api/stedi/2023-08-01/transactions/{transactionId}
openapi: 3.1.0
info:
  title: Cair Health APIs
  description: APIs for the Cair Health platform
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://forecaster.cairhealth.com
security:
  - bearerAuth: []
paths:
  /api/stedi/2023-08-01/transactions/{transactionId}:
    get:
      summary: Get a transaction
      description: >-
        Fetch the full Stedi Core `TransactionSummary` for a single transaction,
        matching the Stedi SDK's `getTransaction`. Returns `404` if the
        transaction does not exist or is not owned by your organization.
      operationId: stediGetTransaction
      parameters:
        - name: transactionId
          in: path
          required: true
          description: >-
            Unique identifier of the processed transaction (the `transactionId`
            returned by the list/poll endpoints).
          schema:
            type: string
      responses:
        '200':
          description: The transaction summary.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StediTransactionSummary'
        '401':
          description: Missing or invalid Cair access token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StediError'
        '404':
          description: Transaction not found, or not owned by your organization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StediError'
        '500':
          description: Unexpected server error while reading the transaction.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StediError'
      security:
        - bearerAuth: []
components:
  schemas:
    StediTransactionSummary:
      type: object
      description: A processed transaction, matching Stedi Core `TransactionSummary`.
      required:
        - transactionId
        - fileExecutionId
        - status
        - direction
        - mode
        - processedAt
        - artifacts
        - partnership
      properties:
        transactionId:
          type: string
          description: Unique transaction identifier.
        fileExecutionId:
          type: string
          description: Identifier of the file execution the transaction belongs to.
        status:
          type: string
          enum:
            - succeeded
            - failed
        direction:
          type: string
          enum:
            - INBOUND
            - OUTBOUND
            - UNKNOWN
        mode:
          type: string
          enum:
            - test
            - production
            - other
        processedAt:
          type: string
          format: date-time
          description: >-
            When the transaction was processed, ISO 8601. For uploaded /
            EOB-converted X12 this is the historical check date from the X12
            `GS04` header.
        artifacts:
          type: array
          description: >-
            Downloadable artifacts. Only `input` and `output` artifacts are
            returned; URLs point back at Cair.
          items:
            $ref: '#/components/schemas/StediArtifact'
        partnership:
          $ref: '#/components/schemas/StediPartnership'
        x12:
          type: object
          required:
            - metadata
          properties:
            metadata:
              $ref: '#/components/schemas/StediX12Metadata'
            transactionSetting:
              type: object
              properties:
                guideId:
                  type: string
                transactionSettingId:
                  type: string
        fragments:
          type: object
          properties:
            keyName:
              type: string
            fragmentCount:
              type: integer
            batchSize:
              type: integer
        translationErrors:
          type: array
          description: >-
            Details about errors that prevented Cair from processing the
            transaction.
          items:
            $ref: '#/components/schemas/StediTranslationError'
        businessIdentifiers:
          type: array
          description: Business identifiers extracted from the transaction.
          items:
            $ref: '#/components/schemas/StediBusinessIdentifier'
    StediError:
      type: object
      description: Stedi-compatible error envelope.
      required:
        - message
      properties:
        message:
          type: string
          description: Human-readable error message.
        code:
          type: string
          description: Stedi error code.
          enum:
            - BadRequestException
            - UnauthorizedException
            - AccessDeniedException
            - ResourceNotFoundException
            - UnprocessableEntityException
            - ServiceException
    StediArtifact:
      type: object
      description: A downloadable artifact associated with a transaction.
      required:
        - artifactType
        - usage
        - sizeBytes
        - url
        - model
      properties:
        artifactType:
          type: string
          description: The MIME type of the artifact.
          enum:
            - text/csv
            - application/edifact
            - application/filepart
            - application/json
            - application/pdf
            - text/psv
            - text/tsv
            - application/edi-x12
            - application/xml
            - application/zip
            - image/jpeg
            - image/png
            - image/tiff
            - text/plain
            - unknown
        usage:
          type: string
          description: The role the artifact plays in the transaction.
          enum:
            - attachment
            - input
            - metadata
            - output
        sizeBytes:
          type: integer
          description: Artifact size in bytes.
          minimum: 0
        url:
          type: string
          description: >-
            Cair-hosted download URL. Following it returns a `302` to a
            presigned artifact URL.
        model:
          type: string
          description: The artifact model.
          enum:
            - execution
            - fragment
            - transaction
            - fault
    StediPartnership:
      type: object
      description: The EDI partnership the transaction was exchanged on.
      required:
        - partnershipId
        - partnershipType
        - sender
        - receiver
      properties:
        partnershipId:
          type: string
          description: Partnership identifier, e.g. `local-clearinghouse`.
        partnershipType:
          type: string
          enum:
            - x12
            - edifact
        sender:
          type: object
          required:
            - profileId
          properties:
            profileId:
              type: string
        receiver:
          type: object
          required:
            - profileId
          properties:
            profileId:
              type: string
    StediX12Metadata:
      type: object
      description: >-
        Metadata parsed from the X12 interchange, functional group, and
        transaction headers.
      required:
        - interchange
        - functionalGroup
        - transaction
        - sender
        - receiver
      properties:
        interchange:
          type: object
          required:
            - acknowledgmentRequestedCode
            - controlNumber
          properties:
            acknowledgmentRequestedCode:
              type: string
              description: X12 `ISA14`.
            controlNumber:
              type: integer
              minimum: 0
              maximum: 999999999
        functionalGroup:
          type: object
          required:
            - controlNumber
            - release
            - date
            - time
            - functionalIdentifierCode
          properties:
            controlNumber:
              type: integer
              minimum: 0
              maximum: 999999999
            release:
              type: string
              description: Implementation guide version, e.g. `005010X221A1`.
            date:
              type: string
              description: '`YYYY-MM-DD`.'
            time:
              type: string
              description: '`HH:MM:SS`.'
            functionalIdentifierCode:
              type: string
              description: X12 `GS01`, e.g. `HC`, `HP`.
        transaction:
          type: object
          required:
            - controlNumber
            - transactionSetIdentifier
          properties:
            controlNumber:
              type: string
            transactionSetIdentifier:
              type: string
              description: 3-digit X12 transaction set ID, e.g. `835`.
        sender:
          $ref: '#/components/schemas/StediX12Profile'
        receiver:
          $ref: '#/components/schemas/StediX12Profile'
    StediTranslationError:
      type: object
      required:
        - message
      properties:
        message:
          type: string
        context:
          type: object
          properties:
            code:
              type: string
            schemaPath:
              type: string
        mark:
          type: object
          properties:
            start:
              type: object
              required:
                - line
                - column
              properties:
                line:
                  type: integer
                column:
                  type: integer
            end:
              type: object
              required:
                - line
                - column
              properties:
                line:
                  type: integer
                column:
                  type: integer
    StediBusinessIdentifier:
      type: object
      description: A business identifier extracted from the transaction.
      required:
        - elementId
        - element
        - name
        - value
      properties:
        elementId:
          type: string
          description: X12 element ID, e.g. `1028` or `127`.
        element:
          type: string
          description: The element where the value was found, e.g. `CLP-01`.
        name:
          type: string
          description: Human-readable name of the identifier.
        value:
          type: string
          description: The identifier value.
    StediX12Profile:
      type: object
      required:
        - applicationCode
        - isa
      properties:
        applicationCode:
          type: string
        isa:
          type: object
          required:
            - qualifier
            - id
          properties:
            qualifier:
              type: string
            id:
              type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.