> ## 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.

# Get facility by ID

> Returns a single facility by ID. Requires read:facilities scope.



## OpenAPI

````yaml /openapi-v2.json get /facilities/{id}
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:
  /facilities/{id}:
    get:
      tags:
        - Facilities
      summary: Get facility by ID
      description: Returns a single facility by ID. Requires read:facilities scope.
      operationId: FacilitiesPublicController_getFacility
      parameters:
        - name: id
          required: true
          in: path
          description: Facility ID
          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/GetFacilitySuccessResponseV2'
        '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'
      security:
        - api-key: []
components:
  schemas:
    GetFacilitySuccessResponseV2:
      type: object
      properties:
        code:
          type: string
          description: Response code
          example: success
        data:
          $ref: '#/components/schemas/ExternalFacilityResponseV2'
      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
    ExternalFacilityResponseV2:
      type: object
      properties:
        id:
          type: string
          description: Facility unique identifier
          example: b2c3d4e5-f6a7-4b8c-9d0e-1f2a3b4c5d6e
        name:
          type: string
          description: Facility name
          example: West LA Dermatology
        timezone:
          type: string
          description: Timezone
          nullable: true
          example: America/Los_Angeles
        address:
          description: Facility address
          allOf:
            - $ref: '#/components/schemas/FacilityAddress'
        specialty:
          type: string
          description: Specialty
          nullable: true
          example: Dermatology
        organizationNpi:
          type: string
          description: Organization NPI number
          nullable: true
          example: '1234567890'
        createdAt:
          type: string
          description: Created timestamp
          example: '2024-05-01T10:00:00.000Z'
        updatedAt:
          type: string
          description: Last updated timestamp
          example: '2025-01-15T12:30:00.000Z'
      required:
        - id
        - name
        - timezone
        - address
        - specialty
        - organizationNpi
        - createdAt
        - updatedAt
    FacilityAddress:
      type: object
      properties:
        line1:
          type: string
          description: Address line 1
          nullable: true
          example: 123 Medical Center Dr
        line2:
          type: string
          description: Address line 2
          nullable: true
          example: Suite 200
        city:
          type: string
          description: City
          nullable: true
          example: Los Angeles
        state:
          type: string
          description: State
          nullable: true
          example: CA
        zipcode:
          type: string
          description: ZIP code
          nullable: true
          example: '90025'
      required:
        - line1
        - line2
        - city
        - state
        - zipcode
  securitySchemes:
    api-key:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: Marketplace API key

````