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

# Providers and facilities that take an appointment type

> The provider/facility pairs the EHR's appointment finder considers eligible for `appointmentTypeId` (eligible, not necessarily open). Limited to the facilities the API key may see. Returns 501 `capability_unsupported` on EHRs without an appointment finder (see `appointmentFinder` on `GET /schedule/capabilities`).



## OpenAPI

````yaml /openapi-v2.json get /schedule/finder/provider-locations
openapi: 3.0.0
info:
  title: Max AI Public API
  description: API for third-party marketplace apps
  version: '2.0'
  contact: {}
servers:
  - url: https://api.maxcare.ai/v2
security: []
tags: []
paths:
  /schedule/finder/provider-locations:
    get:
      tags:
        - Schedule
      summary: Providers and facilities that take an appointment type
      description: >-
        The provider/facility pairs the EHR's appointment finder considers
        eligible for `appointmentTypeId` (eligible, not necessarily open).
        Limited to the facilities the API key may see. Returns 501
        `capability_unsupported` on EHRs without an appointment finder (see
        `appointmentFinder` on `GET /schedule/capabilities`).
      operationId: SchedulePublicController_listFinderProviderLocations
      parameters:
        - name: appointmentTypeId
          required: true
          in: query
          description: Appointment type ID (atp_…)
          schema:
            type: string
        - name: facilityId
          required: false
          in: query
          description: >-
            Facility ID (fac_…) to narrow to. Repeat or comma-separate for
            several.
          schema:
            type: string
        - name: x-session-token
          required: false
          in: header
          description: >-
            The App Bridge token of the logged-in user (`maxcare.appToken()`),
            verified for this app and organization. With it the EHR is read
            through that user's own EHR login when they have a usable one on
            this EHR instance, else through the organization's system connector;
            without it, always the system connector. `meta.actingAs` says which.
            A token that does not verify is `401 authorizer_unverified`. Sent as
            a header so GET requests keep it out of URLs.
          schema:
            type: string
        - name: X-Organization-Id
          in: header
          required: true
          schema:
            type: string
          description: Target clinic organization ID
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FinderProviderLocationsSuccessResponse'
        '400':
          description: Missing or invalid request parameter
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiBadRequestResponse'
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiUnauthorizedResponse'
        '403':
          description: Insufficient scope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiForbiddenResponse'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiNotFoundResponse'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiRateLimitResponse'
        '501':
          description: >-
            This organization's EHR does not support the capability
            (`capability_unsupported`)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiNotImplementedResponse'
        '502':
          description: EHR sync failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiBadGatewayResponse'
        '503':
          description: EHR integration unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiServiceUnavailableResponse'
      security:
        - api-key: []
components:
  schemas:
    FinderProviderLocationsSuccessResponse:
      type: object
      properties:
        code:
          type: string
          description: Response code
          example: success
        data:
          $ref: '#/components/schemas/FinderProviderLocationsData'
      required:
        - code
        - data
    PublicApiBadRequestResponse:
      type: object
      properties:
        code:
          type: string
          description: Error code
          example: bad_request
        message:
          type: string
          description: Human-readable error message
          example: '''id'' must be a valid UUID'
        trace_id:
          type: string
          description: Trace ID for debugging
          example: 550e8400-e29b-41d4-a716-446655440000
      required:
        - code
        - message
        - trace_id
    PublicApiUnauthorizedResponse:
      type: object
      properties:
        code:
          type: string
          description: Error code
          example: unauthorized
        message:
          type: string
          description: Human-readable error message
          example: Invalid or missing API key
        trace_id:
          type: string
          description: Trace ID for debugging
          example: 550e8400-e29b-41d4-a716-446655440000
      required:
        - code
        - message
        - trace_id
    PublicApiForbiddenResponse:
      type: object
      properties:
        code:
          type: string
          description: Error code
          example: forbidden
        message:
          type: string
          description: Human-readable error message
          example: Insufficient scope
        trace_id:
          type: string
          description: Trace ID for debugging
          example: 550e8400-e29b-41d4-a716-446655440000
      required:
        - code
        - message
        - trace_id
    PublicApiNotFoundResponse:
      type: object
      properties:
        code:
          type: string
          description: Error code
          example: not_found
        message:
          type: string
          description: Human-readable error message
          example: Resource not found
        trace_id:
          type: string
          description: Trace ID for debugging
          example: 550e8400-e29b-41d4-a716-446655440000
      required:
        - code
        - message
        - trace_id
    PublicApiRateLimitResponse:
      type: object
      properties:
        code:
          type: string
          description: Error code
          example: rate_limit_exceeded
        message:
          type: string
          description: Human-readable error message
          example: Rate limit exceeded. Maximum 1000 requests per 60 seconds.
        trace_id:
          type: string
          description: Trace ID for debugging
          example: 550e8400-e29b-41d4-a716-446655440000
      required:
        - code
        - message
        - trace_id
    PublicApiNotImplementedResponse:
      type: object
      properties:
        code:
          type: string
          description: Error code
          example: capability_unsupported
        message:
          type: string
          description: Human-readable error message
          example: This organization's EHR has no appointment finder.
        trace_id:
          type: string
          description: Trace ID for debugging
          example: 550e8400-e29b-41d4-a716-446655440000
      required:
        - code
        - message
        - trace_id
    PublicApiBadGatewayResponse:
      type: object
      properties:
        code:
          type: string
          description: Error code
          example: unexpected_integration_error
        message:
          type: string
          description: Human-readable error message
          example: EHR sync failed
        trace_id:
          type: string
          description: Trace ID for debugging
          example: 550e8400-e29b-41d4-a716-446655440000
      required:
        - code
        - message
        - trace_id
    PublicApiServiceUnavailableResponse:
      type: object
      properties:
        code:
          type: string
          description: Error code
          example: server_unresponsive
        message:
          type: string
          description: Human-readable error message
          example: EHR integration is not available for this note
        trace_id:
          type: string
          description: Trace ID for debugging
          example: 550e8400-e29b-41d4-a716-446655440000
      required:
        - code
        - message
        - trace_id
    FinderProviderLocationsData:
      type: object
      properties:
        pairs:
          type: array
          items:
            $ref: '#/components/schemas/FinderProviderLocationResponse'
        ehrSearchThreshold:
          type: number
          nullable: true
          description: >-
            The EHR's own search threshold for this type, passed through. Its
            meaning is unknown.
          example: 300
        meta:
          $ref: '#/components/schemas/FinderProviderLocationsMetaResponse'
      required:
        - pairs
        - ehrSearchThreshold
        - meta
    FinderProviderLocationResponse:
      type: object
      properties:
        providerId:
          type: string
          example: prv_35103413aaaa4bbbccccddddeeeeffff
        facilityId:
          type: string
          example: fac_2706aaaa4bbbccccddddeeeeffff1111
      required:
        - providerId
        - facilityId
    FinderProviderLocationsMetaResponse:
      type: object
      properties:
        actingAs:
          type: string
          description: >-
            `user`: the EHR was read through the `X-Session-Token` user's own
            EHR login. `system`: through the organization's system connector (no
            token, or the user has no usable personal login on this EHR
            instance).
          enum:
            - user
            - system
          example: user
        resolvedBy:
          type: string
          description: Which rule picked the EHR login, for support.
          enum:
            - personal_connector
            - facility_system_connector
            - org_system_connector
          example: personal_connector
        unmappedPairCount:
          type: number
          description: >-
            Pairs dropped because Max AI has not mirrored the provider or
            facility
          example: 0
      required:
        - actingAs
        - resolvedBy
        - unmappedPairCount
  securitySchemes:
    api-key:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: Marketplace API key

````

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