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

# List All Orders



## OpenAPI

````yaml get /lab/orders
openapi: 3.1.0
info:
  title: Decoda API
  description: External API documentation for the Decoda Health platform.
  version: '1.0'
servers: []
security: []
paths:
  /lab/orders:
    get:
      tags:
        - Labs
      summary: List All Orders
      operationId: list_all_orders_lab_orders_get
      parameters:
        - name: TENANT
          in: header
          required: true
          schema:
            type: string
            title: Tenant
          description: The tenant you are making this request on behalf of
        - name: API-KEY
          in: header
          required: true
          schema:
            type: string
            title: Api-Key
          description: Your api key
        - name: page
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Page
        - name: per_page
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Per Page
        - name: sort_by
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Sort By
        - name: sort_direction
          in: query
          required: false
          schema:
            anyOf:
              - enum:
                  - asc
                  - desc
                type: string
              - type: 'null'
            title: Sort Direction
        - name: location_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Location Id
        - name: order_ids
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                type: array
              - type: 'null'
            title: Order Ids
        - name: patient_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Patient Id
        - name: patient_name
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Patient Name
        - name: status
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  $ref: '#/components/schemas/LabStatusCategory'
              - type: 'null'
            title: Status
        - name: vendor
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  $ref: '#/components/schemas/LabVendor'
              - type: 'null'
            title: Vendor
        - name: physician_ids
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                type: array
              - type: 'null'
            title: Physician Ids
        - name: creator_ids
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                type: array
              - type: 'null'
            title: Creator Ids
        - name: location_ids
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                type: array
              - type: 'null'
            title: Location Ids
        - name: include_unassigned
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Include Unassigned
        - name: collection_method
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  $ref: '#/components/schemas/LabCollectionMethod'
              - type: 'null'
            title: Collection Method
        - name: lab_slug
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                type: array
              - type: 'null'
            title: Lab Slug
        - name: created_date
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  anyOf:
                    - type: string
                      format: date-time
                    - type: 'null'
              - type: 'null'
            title: Created Date
        - name: test_name
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Test Name
        - name: tz
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Tz
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Page_LabOrderTableItem_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    LabStatusCategory:
      type: string
      enum:
        - draft
        - awaiting_purchase
        - in_progress
        - results_ready
        - completed
        - closed
      title: LabStatusCategory
      description: >-
        The six-way partition over every order, used for filtering and the list
        badge.


        Mirrors ``console/src/lib/lab-status.ts`` exactly — derivation lives in

        ``decoda/services/lab_status.py``, which is the Python side of that
        shared contract.
    LabVendor:
      type: string
      enum:
        - junction
        - fullscript
      title: LabVendor
      description: >-
        Which integration a lab order came from.


        Junction (Vital) orders are authored in Decoda's own wizard; Fullscript

        orders are authored in Fullscript's embed and synced back. Stored flat
        on

        lab_order so both live in one chronological list per patient.
    LabCollectionMethod:
      type: string
      enum:
        - walk_in_test
        - at_home_phlebotomy
        - testkit
        - on_site_collection
      title: LabCollectionMethod
    Page_LabOrderTableItem_:
      properties:
        data:
          items:
            $ref: '#/components/schemas/LabOrderTableItem'
          type: array
          title: Data
        total:
          type: integer
          title: Total
      type: object
      required:
        - data
        - total
      title: Page[LabOrderTableItem]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    LabOrderTableItem:
      properties:
        id:
          type: string
          title: Id
        vendor:
          $ref: '#/components/schemas/LabVendor'
        vendorOrderId:
          anyOf:
            - type: string
            - type: 'null'
          title: Vendororderid
        internalStatus:
          type: string
          title: Internalstatus
        vendorStatus:
          anyOf:
            - type: string
            - type: 'null'
          title: Vendorstatus
        collectionMethod:
          anyOf:
            - $ref: '#/components/schemas/LabCollectionMethod'
            - type: 'null'
        labSlug:
          anyOf:
            - type: string
            - type: 'null'
          title: Labslug
        labName:
          anyOf:
            - type: string
            - type: 'null'
          title: Labname
        labOrderSessionId:
          anyOf:
            - type: string
            - type: 'null'
          title: Labordersessionid
        fullscriptTreatmentPlanId:
          anyOf:
            - type: string
            - type: 'null'
          title: Fullscripttreatmentplanid
        createdDate:
          anyOf:
            - type: string
            - type: 'null'
          title: Createddate
        resultsViewedAt:
          anyOf:
            - type: string
            - type: 'null'
          title: Resultsviewedat
        items:
          items:
            $ref: '#/components/schemas/LabOrderItemDetail'
          type: array
          title: Items
          default: []
        patientId:
          type: string
          title: Patientid
        patientFirstName:
          anyOf:
            - type: string
            - type: 'null'
          title: Patientfirstname
        patientLastName:
          anyOf:
            - type: string
            - type: 'null'
          title: Patientlastname
        statusCategory:
          $ref: '#/components/schemas/LabStatusCategory'
        physicianId:
          anyOf:
            - type: string
            - type: 'null'
          title: Physicianid
        physicianName:
          anyOf:
            - type: string
            - type: 'null'
          title: Physicianname
        creatorId:
          anyOf:
            - type: string
            - type: 'null'
          title: Creatorid
        creatorName:
          anyOf:
            - type: string
            - type: 'null'
          title: Creatorname
        locationId:
          anyOf:
            - type: string
            - type: 'null'
          title: Locationid
        locationName:
          anyOf:
            - type: string
            - type: 'null'
          title: Locationname
      type: object
      required:
        - id
        - vendor
        - internalStatus
        - patientId
        - statusCategory
      title: LabOrderTableItem
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    LabOrderItemDetail:
      properties:
        id:
          type: string
          title: Id
        itemType:
          $ref: '#/components/schemas/LabOrderItemType'
        vendorCatalogId:
          type: string
          title: Vendorcatalogid
        displayName:
          anyOf:
            - type: string
            - type: 'null'
          title: Displayname
        isStripped:
          type: boolean
          title: Isstripped
          default: false
        sourcePresetId:
          anyOf:
            - type: string
            - type: 'null'
          title: Sourcepresetid
      type: object
      required:
        - id
        - itemType
        - vendorCatalogId
      title: LabOrderItemDetail
    LabOrderItemType:
      type: string
      enum:
        - lab_test
        - marker
      title: LabOrderItemType

````