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

# Get order transaction

> Retrieve order transaction via the Junction API. Requires authentication with your team API key.

<RequestExample>
  ```python Python theme={null}
  from junction import Junction
  from junction.environment import JunctionEnvironment

  client = Junction(
      api_key="YOUR_API_KEY",
      environment=JunctionEnvironment.SANDBOX,
  )

  data = client.order_transaction.get_transaction("<transaction_id>")
  ```

  ```typescript TypeScript theme={null}
  import { JunctionClient, JunctionEnvironment } from "@junction-api/sdk";

  const client = new JunctionClient({
      apiKey: "YOUR_API_KEY",
      environment: JunctionEnvironment.Sandbox,
  });

  const data = await client.orderTransaction.getTransaction({ transactionId: "<transaction_id>" });
  ```

  ```java Java theme={null}
  import com.junction.api.Junction;
  import com.junction.api.core.Environment;

  Junction client = Junction.builder()
      .apiKey("YOUR_API_KEY")
      .environment(Environment.SANDBOX)
      .build();

  var data = client.orderTransaction().getTransaction("<transaction_id>");
  ```

  ```go Go theme={null}
  import (
      "context"

      junction "github.com/junction-api/junction-go"
      "github.com/junction-api/junction-go/client"
      "github.com/junction-api/junction-go/option"
  )

  c := client.NewClient(
      option.WithApiKey("YOUR_API_KEY"),
      option.WithBaseURL(junction.Environments.Sandbox),
  )

  response, err := c.OrderTransaction.GetTransaction(context.TODO(), &junction.GetTransactionOrderTransactionRequest{
      TransactionId: "<transaction_id>",
  })
  if err != nil {
      return err
  }
  fmt.Printf("Received data %s\n", response)
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "id": "0ee312e2-6773-4a21-a6e1-506882cd98ed",
    "team_id": "cbb64555-af07-46c1-be09-ef89308e9b60",
    "status": "active",
    "orders": [
      {
        "id": "0ee312e2-6773-4a21-a6e1-506882cd98ed",
        "created_at": "2020-01-01T00:00:00Z",
        "updated_at": "2020-01-01T00:00:00Z",
        "low_level_status": "transit_customer",
        "low_level_status_created_at": "2022-01-03T00:00:00Z",
        "origin": "initial"
      }
    ]
  }
  ```
</ResponseExample>


## OpenAPI

````yaml GET /v3/order_transaction/{transaction_id}
openapi: 3.1.0
info:
  title: Junction API
  description: https://docs.junction.com/
  version: 0.4.495
servers:
  - url: https://api.us.junction.com
    x-fern-server-name: Production
  - url: https://api.eu.junction.com
    x-fern-server-name: ProductionEU
  - url: https://api.sandbox.us.junction.com
    x-fern-server-name: Sandbox
  - url: https://api.sandbox.eu.junction.com
    x-fern-server-name: SandboxEU
security:
  - apiKeyAuth: []
paths:
  /v3/order_transaction/{transaction_id}:
    get:
      tags:
        - order_transaction
      summary: Get Order Transaction
      operationId: get_order_transaction_v3_order_transaction__transaction_id__get
      parameters:
        - name: transaction_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Transaction Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetOrderTransactionResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    GetOrderTransactionResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        team_id:
          type: string
          format: uuid
          title: Team Id
        status:
          $ref: '#/components/schemas/OrderTransactionStatus'
          description: ℹ️ This enum is non-exhaustive.
        orders:
          items:
            $ref: '#/components/schemas/OrderSummary'
          type: array
          title: Orders
      type: object
      required:
        - id
        - team_id
        - status
      title: GetOrderTransactionResponse
    HTTPValidationError:
      properties:
        detail:
          title: Detail
      type: object
      title: HTTPValidationError
    OrderTransactionStatus:
      type: string
      enum:
        - active
        - completed
        - cancelled
      title: OrderTransactionStatus
      description: ℹ️ This enum is non-exhaustive.
    OrderSummary:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        origin:
          anyOf:
            - $ref: '#/components/schemas/OrderOrigin'
            - type: 'null'
          description: ℹ️ This enum is non-exhaustive.
        parent_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Parent Id
        last_status:
          $ref: '#/components/schemas/OrderLowLevelStatus'
          description: ℹ️ This enum is non-exhaustive.
        last_status_created_at:
          type: string
          format: date-time
          title: Last Status Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - id
        - last_status
        - last_status_created_at
        - updated_at
        - created_at
      title: OrderSummary
      description: Lightweight order summary.
    OrderOrigin:
      type: string
      enum:
        - initial
        - redraw
        - recreation
      title: OrderOrigin
      description: ℹ️ This enum is non-exhaustive.
    OrderLowLevelStatus:
      type: string
      enum:
        - ordered
        - requisition_created
        - requisition_bypassed
        - transit_customer
        - out_for_delivery
        - with_customer
        - transit_lab
        - delivered_to_lab
        - completed
        - failure_to_deliver_to_lab
        - failure_to_deliver_to_customer
        - problem_in_transit_lab
        - problem_in_transit_customer
        - sample_error
        - appointment_scheduled
        - appointment_cancelled
        - appointment_pending
        - draw_completed
        - cancelled
        - lost
        - do_not_process
        - partial_results
        - awaiting_registration
        - registered
        - redraw_available
        - corrected
        - lab_processing_blocked
      title: OrderLowLevelStatus
      description: ℹ️ This enum is non-exhaustive.
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-vital-api-key
      description: Vital Team API Key

````