> ## 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 Available Tests

> Retrieve lab tests via the Junction API. Requires authentication with your team API key.

> **Deprecated:** This endpoint is deprecated. Please use the paginated version `/v3/lab_test` instead.

<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.lab_tests.get()
  ```

  ```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.labTests.get();
  ```

  ```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.labTests().get();
  ```

  ```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.LabTests.Get(context.TODO(), &junction.GetLabTestsRequest{})
  if err != nil {
      return err
  }
  fmt.Printf("Received data %s\n", response)
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  [
    {
      "lab_test": {
        "name": "Lipids Panel",
        "description": "Cholesterol test",
        "sample_type": "dried blood spot",
        "method": "testkit",
        "price": 10,
        "is_active": true,
        "lab": {
          "slug": "USSL",
          "name": "US Specialty Lab",
          "first_line_address": "123 Main St",
          "city": "New York",
          "zipcode": "10001"
        },
        "markers": [
          {
            "name": "Thyroid Stimulating Hormone",
            "slug": "tsh",
            "description": ""
          }
        ]
      }
    }
  ]
  ```
</ResponseExample>


## OpenAPI

````yaml GET /v3/lab_tests
openapi: 3.1.0
info:
  title: Junction API
  description: https://docs.junction.com/
  version: 0.4.483
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/lab_tests:
    get:
      tags:
        - lab_tests
      summary: Get Lab Tests For Team
      description: GET all the lab tests the team has access to.
      operationId: get_lab_tests_for_team_v3_lab_tests_get
      parameters:
        - name: generation_method
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/LabTestGenerationMethodFilter'
            description: >-
              Filter on whether auto-generated lab tests created by Vital,
              manually created lab tests, or all lab tests should be returned.
            default: manual
          description: >-
            Filter on whether auto-generated lab tests created by Vital,
            manually created lab tests, or all lab tests should be returned.
        - name: lab_slug
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter by the slug of the lab for these lab tests.
            title: Lab Slug
          description: Filter by the slug of the lab for these lab tests.
        - name: collection_method
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/LabTestCollectionMethod'
              - type: 'null'
            description: Filter by the collection method for these lab tests.
            title: Collection Method
          description: Filter by the collection method for these lab tests.
        - name: status
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/LabTestStatus'
              - type: 'null'
            description: Filter by the status of these lab tests.
            title: Status
          description: Filter by the status of these lab tests.
        - name: marker_ids
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: integer
                type: array
              - type: 'null'
            description: Filter to only include lab tests containing these marker IDs.
            title: Marker Ids
          description: Filter to only include lab tests containing these marker IDs.
        - name: provider_ids
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                type: array
              - type: 'null'
            description: Filter to only include lab tests containing these provider IDs.
            title: Provider Ids
          description: Filter to only include lab tests containing these provider IDs.
        - name: name
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Filter by the name of the lab test (a case-insensitive substring
              search).
            title: Name
          description: >-
            Filter by the name of the lab test (a case-insensitive substring
            search).
        - name: order_key
          in: query
          required: false
          schema:
            anyOf:
              - enum:
                  - price
                  - created_at
                  - updated_at
                type: string
              - type: 'null'
            title: Order Key
        - name: order_direction
          in: query
          required: false
          schema:
            enum:
              - asc
              - desc
            type: string
            default: asc
            title: Order Direction
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ClientFacingLabTest'
                title: Response Get Lab Tests For Team V3 Lab Tests Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      deprecated: true
components:
  schemas:
    LabTestGenerationMethodFilter:
      type: string
      enum:
        - auto
        - manual
        - all
      title: LabTestGenerationMethodFilter
      description: ℹ️ This enum is non-exhaustive.
    LabTestCollectionMethod:
      type: string
      enum:
        - testkit
        - walk_in_test
        - at_home_phlebotomy
        - on_site_collection
      title: LabTestCollectionMethod
      description: The method used to perform a lab test. ℹ️ This enum is non-exhaustive.
    LabTestStatus:
      type: string
      enum:
        - active
        - pending_approval
        - inactive
      title: LabTestStatus
      description: ℹ️ This enum is non-exhaustive.
    ClientFacingLabTest:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: ''
        slug:
          type: string
          title: Slug
          description: ''
        name:
          type: string
          title: Name
          description: ''
        sample_type:
          $ref: '#/components/schemas/LabTestSampleType'
          description: ℹ️ This enum is non-exhaustive.
        method:
          $ref: '#/components/schemas/LabTestCollectionMethod'
          description: ℹ️ This enum is non-exhaustive.
        price:
          type: number
          title: Price
          description: ''
        is_active:
          type: boolean
          title: Is Active
          description: Deprecated. Use status instead.
        status:
          $ref: '#/components/schemas/LabTestStatus'
          description: ℹ️ This enum is non-exhaustive.
        fasting:
          type: boolean
          title: Fasting
          description: Defines whether a lab test requires fasting.
          default: false
        lab:
          anyOf:
            - $ref: '#/components/schemas/ClientFacingLab'
            - type: 'null'
          description: ''
        markers:
          anyOf:
            - items:
                $ref: '#/components/schemas/ClientFacingMarker'
              type: array
            - type: 'null'
          title: Markers
          description: ''
        is_delegated:
          type: boolean
          title: Is Delegated
          description: >-
            Deprecated and always false. Delegation is now at the lab account
            level. Used to denote whether a lab test requires using non-Vital
            physician networks.
          default: false
          deprecated: true
        auto_generated:
          type: boolean
          title: Auto Generated
          description: Whether the lab test was auto-generated by Vital
          default: false
        has_collection_instructions:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Has Collection Instructions
          description: Whether or not the lab test has collection instructions.
        common_tat_days:
          anyOf:
            - type: integer
            - type: 'null'
          title: Common Tat Days
          description: >-
            The common turnaround time in days for the lab test. This is the
            expected time for the lab to process the test and return results.
        worst_case_tat_days:
          anyOf:
            - type: integer
            - type: 'null'
          title: Worst Case Tat Days
          description: >-
            The worst-case turnaround time in days for the lab test. This is the
            maximum time the lab may take to process the test and return
            results.
      type: object
      required:
        - id
        - slug
        - name
        - sample_type
        - method
        - price
        - is_active
        - status
        - lab
        - markers
      title: ClientFacingLabTest
      example:
        lab_test:
          description: Cholesterol test
          fasting: false
          has_collection_instructions: false
          is_delegated: false
          lab:
            city: New York
            first_line_address: 123 Main St
            name: US Specialty Lab
            slug: USSL
            zipcode: '10001'
          markers:
            - description: >-
                Hemoglobin A1c is a form of hemoglobin that is measured identify
                your average blood sugar levels over the past 3 months.
              id: 1
              lab_id: 1
              name: Hemoglobin A1c
              price: '10.00'
              provider_id: '1234'
              slug: hemoglobin-a1c
              type: biomarker
              unit: '%'
          method: testkit
          name: Lipids Panel
          price: 10
          sample_type: dried blood spot
          status: active
    HTTPValidationError:
      properties:
        detail:
          title: Detail
      type: object
      title: HTTPValidationError
    LabTestSampleType:
      type: string
      enum:
        - dried_blood_spot
        - arm_collector
        - serum
        - saliva
        - urine
        - stool
      title: LabTestSampleType
      description: >-
        The type of sample used to perform a lab test. ℹ️ This enum is
        non-exhaustive.
    ClientFacingLab:
      properties:
        id:
          type: integer
          title: Id
        slug:
          type: string
          title: Slug
        name:
          type: string
          title: Name
        first_line_address:
          type: string
          title: First Line Address
        city:
          type: string
          title: City
        zipcode:
          type: string
          title: Zipcode
        collection_methods:
          items:
            $ref: '#/components/schemas/LabTestCollectionMethod'
          type: array
          title: Collection Methods
        sample_types:
          items:
            $ref: '#/components/schemas/LabTestSampleType'
          type: array
          title: Sample Types
      type: object
      required:
        - id
        - slug
        - name
        - first_line_address
        - city
        - zipcode
        - collection_methods
        - sample_types
      title: ClientFacingLab
      example:
        city: San Francisco
        collection_methods:
          - testkit
        first_line_address: 123 Main St
        id: 1
        name: LabCorp
        sample_types:
          - saliva
        slug: labcorp
        zipcode: '91789'
    ClientFacingMarker:
      properties:
        id:
          type: integer
          title: Id
        name:
          type: string
          title: Name
        slug:
          type: string
          title: Slug
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        lab_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Lab Id
        provider_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Provider Id
        type:
          anyOf:
            - $ref: '#/components/schemas/MarkerType'
            - type: 'null'
          description: ℹ️ This enum is non-exhaustive.
        unit:
          anyOf:
            - type: string
            - type: 'null'
          title: Unit
        price:
          anyOf:
            - type: string
            - type: 'null'
          title: Price
        aoe:
          anyOf:
            - $ref: '#/components/schemas/AoE'
            - type: 'null'
        a_la_carte_enabled:
          type: boolean
          title: A La Carte Enabled
          default: false
        common_tat_days:
          anyOf:
            - type: integer
            - type: 'null'
          title: Common Tat Days
        worst_case_tat_days:
          anyOf:
            - type: integer
            - type: 'null'
          title: Worst Case Tat Days
        is_orderable:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Orderable
          default: true
      type: object
      required:
        - id
        - name
        - slug
      title: ClientFacingMarker
      example:
        aoe:
          questions:
            - answers:
                - code: answer_code
                  id: 1
                  value: answer_value
              code: question_code
              id: 1
              value: question_value
        common_tat_days: 3
        description: >-
          Hemoglobin A1c is a form of hemoglobin that is measured identify your
          average blood sugar levels over the past 3 months.
        id: 1
        is_orderable: true
        lab_id: 1
        name: Hemoglobin A1c
        price: '10.00'
        provider_id: '1234'
        slug: hemoglobin-a1c
        type: biomarker
        unit: '%'
        worst_case_tat_days: 5
    MarkerType:
      type: string
      enum:
        - biomarker
        - panel
      title: MarkerType
      description: ℹ️ This enum is non-exhaustive.
    AoE:
      properties:
        questions:
          items:
            $ref: '#/components/schemas/Question'
          type: array
          title: Questions
      type: object
      required:
        - questions
      title: AoE
    Question:
      properties:
        id:
          type: integer
          format: int64
          title: Id
        required:
          type: boolean
          title: Required
        code:
          type: string
          title: Code
        value:
          type: string
          title: Value
        type:
          $ref: '#/components/schemas/QuestionType'
          description: ℹ️ This enum is non-exhaustive.
        sequence:
          type: integer
          title: Sequence
        answers:
          items:
            $ref: '#/components/schemas/Answer'
          type: array
          title: Answers
        constraint:
          anyOf:
            - type: string
            - type: 'null'
          title: Constraint
        default:
          anyOf:
            - type: string
            - type: 'null'
          title: Default
      type: object
      required:
        - id
        - required
        - code
        - value
        - type
        - sequence
        - answers
      title: Question
    QuestionType:
      type: string
      enum:
        - choice
        - text
        - numeric
        - multi_choice
      title: QuestionType
      description: ℹ️ This enum is non-exhaustive.
    Answer:
      properties:
        id:
          type: integer
          title: Id
        code:
          type: string
          title: Code
        value:
          type: string
          title: Value
      type: object
      required:
        - id
        - code
        - value
      title: Answer
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-vital-api-key
      description: Vital Team API Key

````