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

# Search clinics

> Returns active clinics owned by the API token’s tenant within `radiusMiles` of the given coordinates or address, nearest first. An address without `line1` matches clinics in its state and postal code instead, ordered by name. Filterable by service and location. Requires the `clinic.search` scope.



## OpenAPI

````yaml api-reference/openapi.json POST /api/v2/clinics/search
openapi: 3.1.0
info:
  title: Origin One API
  description: REST API for integrating with the Origin One platform.
  version: '2'
  contact:
    name: Origin One
    url: https://origin.one
    email: support@originone.ai
servers:
  - url: https://api.stage.origin.one
    description: Staging
  - url: https://api.origin.one
    description: Production
security: []
tags:
  - name: agencies
    description: >-
      Regulatory agencies and the job categories they publish; the same for
      every API token.
  - name: jobCategories
    description: >-
      Job categories an agency publishes; an order under FAA, FRA or FTA names
      one.
  - name: clinics
    description: Collection sites where participants are tested.
  - name: companies
    description: Companies linked to your API token.
  - name: locations
    description: Company locations.
  - name: orders
    description: >-
      Drug and alcohol test orders: create them and follow their services to a
      result.
  - name: packages
    description: Packages of services that can be ordered.
  - name: services
    description: Services available to your API token.
  - name: webhooks
    description: Events delivered to the callback URL given when an order was created.
paths:
  /api/v2/clinics/search:
    post:
      tags:
        - clinics
      summary: Search clinics
      description: >-
        Returns active clinics owned by the API token’s tenant within
        `radiusMiles` of the given coordinates or address, nearest first. An
        address without `line1` matches clinics in its state and postal code
        instead, ordered by name. Filterable by service and location. Requires
        the `clinic.search` scope.
      operationId: searchClinics
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClinicSearchRequest'
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClinicList'
        '400':
          description: The request failed validation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: The bearer token is missing, invalid, or expired.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: The API token lacks the required scope.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Unexpected error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearer: []
components:
  schemas:
    ClinicSearchRequest:
      type: object
      properties:
        limit:
          anyOf:
            - type: integer
              minimum: 1
              maximum: 20
            - type: string
              pattern: ^\d+$
          description: Number of items per page (max 20).
          example: 10
        page:
          anyOf:
            - type: integer
              minimum: 1
              maximum: 10000
            - type: string
              pattern: ^\d+$
          description: Page of results to return (1-based).
          example: 1
        address:
          type: object
          properties:
            line1:
              type: string
              minLength: 1
              maxLength: 200
              description: >-
                Street address. When present, the address is geocoded and
                results are ranked by distance.
              example: 123 Congress Ave
            postalCode:
              type: string
              minLength: 3
              maxLength: 12
              description: Postal or ZIP code.
              example: '78701'
            state:
              type: string
              minLength: 2
              maxLength: 3
              description: State or region code.
              example: TX
          required:
            - postalCode
            - state
          description: >-
            Search origin as a postal address; send this or `coordinates`, not
            both. Without `line1`, matches clinics in the same state and postal
            code, ordered by name, and `radiusMiles` does not apply.
        coordinates:
          type: object
          properties:
            lat:
              anyOf:
                - type: number
                  minimum: -90
                  maximum: 90
                - type: string
                  pattern: ^-?\d+(\.\d+)?$
              description: Latitude in decimal degrees.
              example: 30.2672
            long:
              anyOf:
                - type: number
                  minimum: -180
                  maximum: 180
                - type: string
                  pattern: ^-?\d+(\.\d+)?$
              description: Longitude in decimal degrees.
              example: -97.7431
          required:
            - lat
            - long
          description: Search origin as a point; send this or `address`, not both.
        locationId:
          example: '123'
          description: >-
            Only clinics assigned to this location. A location outside the API
            token’s access returns an empty page.
          type: string
        radiusMiles:
          anyOf:
            - type: number
              minimum: 1
              maximum: 150
            - type: string
              pattern: ^\d+(\.\d+)?$
          description: Search radius from the origin, in miles (max 150).
          example: 25
        serviceIds:
          minItems: 1
          type: array
          items:
            type: string
            example: a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11
            description: Unique identifier of a service.
          description: Only clinics that offer every one of these services.
    ClinicList:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Clinic'
          description: Items on this page.
        limit:
          type: integer
          description: Number of items per page.
          example: 10
        page:
          type: integer
          description: Current page number (1-based).
          example: 1
        total:
          type: integer
          description: Number of matching items across all pages.
          example: 1
      required:
        - data
        - limit
        - page
        - total
    Error:
      type: object
      properties:
        error:
          type: string
          description: HTTP status reason phrase.
          example: Bad Request
        errors:
          type: array
          items:
            type: object
            properties:
              code:
                anyOf:
                  - type: string
                    enum:
                      - backgroundCheckIntegrationNotConfigured
                      - badRequest
                      - conflict
                      - insufficientScope
                      - internalError
                      - invalidElement
                      - invalidFormat
                      - invalidKey
                      - invalidScheduleStrategy
                      - invalidState
                      - invalidType
                      - invalidUnion
                      - invalidValue
                      - linkRequiredBackground
                      - notFound
                      - notMultipleOf
                      - required
                      - scheduleClinicExcludedByFeeCap
                      - scheduleConfiguredClinicUnavailable
                      - tooBig
                      - tooManyRequests
                      - tooSmall
                      - unauthenticated
                      - unrecognizedKeys
                  - type: string
                description: >-
                  Machine-readable error code. New codes may be added; treat
                  unknown codes by `statusCode`.
                example: tooSmall
              detail:
                type: string
                description: Human-readable explanation.
                example: 'Too small: expected number to be >=1'
              meta:
                description: Additional machine-readable context.
                type: object
                propertyNames:
                  type: string
                additionalProperties: {}
              source:
                description: Present only when a request field is at fault.
                type: object
                properties:
                  pointer:
                    type: string
                    description: JSON pointer to the request field at fault.
                    example: /page
                required:
                  - pointer
            required:
              - code
              - detail
          description: One entry per problem found.
        statusCode:
          type: integer
          description: HTTP status code.
          example: 400
      required:
        - error
        - errors
        - statusCode
    Clinic:
      type: object
      properties:
        address:
          anyOf:
            - $ref: '#/components/schemas/Address'
            - type: 'null'
          description: Postal address; null when the clinic has none.
        id:
          type: string
          description: Unique identifier of the clinic.
          example: '42'
        name:
          type: string
          description: Clinic name.
          example: Austin Downtown Clinic
        object:
          type: string
          description: Object type; always `clinic`.
          example: clinic
          enum:
            - clinic
        phone:
          description: Primary phone number.
          example: +1-512-555-0100
          type:
            - string
            - 'null'
        coordinates:
          anyOf:
            - $ref: '#/components/schemas/ClinicCoordinates'
            - type: 'null'
          description: Geographic position; null when the clinic has none on file.
        distance:
          $ref: '#/components/schemas/ClinicDistance'
          description: >-
            Distance from the search origin. Present only in search results
            ranked by distance.
        isActive:
          type: boolean
          description: Whether the clinic is currently active.
          example: true
        services:
          type: array
          items:
            $ref: '#/components/schemas/ServiceReference'
          description: >-
            Services the clinic offers that your API token can order, from the
            catalog of its linked companies. Empty when none of them match,
            which does not mean the clinic offers no services.
        url:
          type: string
          description: Canonical path of this resource, relative to the API origin.
          example: /api/v2/clinics/42
          format: uri-reference
      required:
        - address
        - id
        - name
        - object
        - phone
        - coordinates
        - isActive
        - services
        - url
    Address:
      type: object
      properties:
        city:
          description: City or town.
          example: Seattle
          type:
            - string
            - 'null'
        country:
          description: Country code.
          example: US
          type:
            - string
            - 'null'
        line1:
          description: First line of the street address.
          example: 123 Main St
          type:
            - string
            - 'null'
        line2:
          description: Second line of the street address.
          example: Suite 400
          type:
            - string
            - 'null'
        object:
          type: string
          description: Object type; always `address`.
          example: address
          enum:
            - address
        postalCode:
          description: Postal or ZIP code.
          example: '98101'
          type:
            - string
            - 'null'
        state:
          description: State or region code.
          example: WA
          type:
            - string
            - 'null'
      required:
        - city
        - country
        - line1
        - line2
        - object
        - postalCode
        - state
    ClinicCoordinates:
      type: object
      properties:
        lat:
          type: number
          description: Latitude in decimal degrees.
          example: 30.2672
        long:
          type: number
          description: Longitude in decimal degrees.
          example: -97.7431
      required:
        - lat
        - long
    ClinicDistance:
      type: object
      properties:
        miles:
          type: number
          description: Distance from the search origin, in miles.
          example: 1.8
      required:
        - miles
    ServiceReference:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the service.
          example: a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11
        name:
          type: string
          description: Service name.
          example: 5 Panel Urine Drug Screen
        object:
          type: string
          description: Object type; always `service`.
          example: service
          enum:
            - service
        type:
          anyOf:
            - type: string
              enum:
                - additionalService
                - backgroundCheckService
                - breathAlcoholTest
                - clinical
                - confirmationTest
                - injuryCareService
                - instantDrugTest
                - labBasedToxicology
                - occupationalHealthService
                - safetyTraining
                - vaccination
                - mroService
                - unknown
            - type: string
          description: Service type. New values may be added.
          example: labBasedToxicology
        url:
          type: string
          description: Canonical path of this resource, relative to the API origin.
          example: /api/v2/services/a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11
          format: uri-reference
      required:
        - id
        - name
        - object
        - type
        - url
  securitySchemes:
    bearer:
      description: >-
        Origin One API token. Pass it in the Authorization header:
        `Authorization: Bearer <token>`.
      scheme: bearer
      type: http

````

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