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

# List Tests

> Returns every test offered by the given branch. Use the `_id` of a test as the `test` field when creating a lead or booking.

The `cost` returned reflects the pricing for the party you pass (`corporateUser` or `organization`); without a party it is the branch's standard cost. Party-scoped accounts must pass a party.



## OpenAPI

````yaml GET /client/crm/tests
openapi: 3.0.3
info:
  title: Flabs CRM API
  version: 1.0.0
  description: Branches, tests, packages, and lead/booking ingestion for the Flabs CRM.
servers:
  - url: https://v2.flabs.in
    description: Production
security: []
paths:
  /client/crm/tests:
    get:
      summary: List tests in a branch
      description: >-
        Returns every test offered by the given branch. Use the `_id` of a test
        as the `test` field when creating a lead or booking.


        The `cost` returned reflects the pricing for the party you pass
        (`corporateUser` or `organization`); without a party it is the branch's
        standard cost. Party-scoped accounts must pass a party.
      parameters:
        - in: query
          name: branchID
          required: true
          schema:
            type: string
          description: Branch identifier returned by `GET /client/labs`.
        - in: query
          name: corporateUser
          required: false
          schema:
            type: string
          description: >-
            Party-scoped accounts only. Corporate identifier — returns that
            corporate's negotiated pricing. Pass either `corporateUser` or
            `organization`, not both.
        - in: query
          name: organization
          required: false
          schema:
            type: string
          description: >-
            Party-scoped accounts only. Doctor/hospital identifier — returns
            that organization's negotiated pricing. Pass either `corporateUser`
            or `organization`, not both.
      responses:
        '200':
          description: Tests returned
          content:
            application/json:
              schema:
                type: object
                properties:
                  tests:
                    type: array
                    items:
                      type: object
                      properties:
                        _id:
                          type: string
                          description: >-
                            Test identifier — pass this as `tests[].test` when
                            creating a lead.
                        name:
                          type: string
                          description: Test name.
                        code:
                          type: string
                          description: Internal test code (if configured).
                        cost:
                          type: number
                          description: Default cost for this test in the branch.
              example:
                tests:
                  - _id: 6530a4a6f1d2c8b7e9aabcde
                    name: Complete Blood Count (CBC)
                    code: CBC001
                    cost: 350
        4XX:
          $ref: '#/components/responses/ClientError'
        5XX:
          $ref: '#/components/responses/ServerError'
      security:
        - bearerAuth: []
components:
  responses:
    ClientError:
      description: Validation or auth error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorBody'
          example:
            success: false
            status: 400
            message: Bad Request
            error:
              details: first_name is required
    ServerError:
      description: Unexpected server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorBody'
          example:
            success: false
            status: 500
            message: Internal Server Error
            error:
              details: An unexpected error occurred
  schemas:
    ErrorBody:
      type: object
      properties:
        success:
          type: boolean
          example: false
        status:
          type: integer
        message:
          type: string
        error:
          type: object
          properties:
            details:
              type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT obtained from `POST /client/auth/token`.

````