AlayaCare Facilities API

The Facilities API from AlayaCare — 4 operation(s) for facilities.

Operations 7

GET /facilities Get a list of facilities
GET /facility_visits Get a list of facility visits
POST /facility_visits Create a new facility visit
GET /facility_visits/{alayacare_visit_id} Get facility visit details
PUT /facility_visits/{alayacare_visit_id} Update facility visit details
GET /facility_visits/by_id/{visit_id} Get facility visit details
PUT /facility_visits/by_id/{visit_id} Update facility visit details

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/alayacare-facilities-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

alayacare-facilities-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: 1.0.17
  title: AlayaCare Scheduler Facilities API
  description: '**External IDs:**

    The following terms are used to reference ids that identify resources in systems external to AlayaCare:

    - client_id

    - employee_id

    - service_id

    - funder_id

    - visit_id

    - facility_id


    External IDs are required to be unique. No other assumptions are made regarding their format; they are treated as strings.


    **AlayaCare IDs:**

    The following terms are used to reference ids that identify resources in AlayaCare:

    - alayacare_client_id

    - alayacare_employee_id

    - alayacare_service_id

    - alayacare_funder_id

    - alayacare_visit_id

    - alayacare_facility_id


    **Remarks**

    All dates must be in ISO 8601 format with timezone data

    '
  contact:
    name: AlayaCare
servers:
- url: https://homecare.alayacare.ca/ext/api/v2/scheduler
tags:
- name: Facilities
paths:
  /facilities:
    get:
      tags:
      - Facilities
      summary: Get a list of facilities
      description: Get a list of facilities
      parameters:
      - name: name
        description: Filter by facility name
        in: query
        required: false
        schema:
          type: string
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/count'
      - $ref: '#/components/parameters/branch_id'
      responses:
        '200':
          description: The list of facilities
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FacilityList'
        '401':
          $ref: '#/components/responses/ErrorResponseAuthentication'
  /facility_visits:
    get:
      tags:
      - Facilities
      summary: Get a list of facility visits
      description: 'Returns visits where the client is a facility. For patient/client visits, use the `/visits` endpoint instead.

        '
      parameters:
      - name: tags
        in: query
        required: false
        description: 'Filter on a list of tags and return values for at least one matching tag. Filter by multiple tags using **OR**.

          '
        schema:
          type: array
          items:
            type: string
      - name: start_at
        in: query
        required: false
        description: 'Filter by visit start time greater or equal than specified value.

          If not specified will default to now.

          Expected format is ISO 8601.

          Ex: `2018-02-03T08:00:00-05:00`

          '
        schema:
          type: string
          format: date-time
      - name: end_at
        in: query
        required: false
        description: 'Filter by visit start time less than or equal than specified value.

          If not specified will default to 7 days from now.

          Ex: `2018-02-18T08:00:00-05:00`

          '
        schema:
          type: string
          format: date-time
      - name: status
        in: query
        required: false
        description: Status of the visit based on status hierarchy from AlayaCare web application, one or more using **OR**.
        schema:
          type: string
          enum:
          - scheduled
          - vacant
          - on_hold
          - cancelled
          - offered
          - clocked
          - late
          - completed
          - missed
          - approved
      - $ref: '#/components/parameters/facility_id'
      - $ref: '#/components/parameters/alayacare_facility_id'
      - $ref: '#/components/parameters/employee_id'
      - $ref: '#/components/parameters/alayacare_employee_id'
      - $ref: '#/components/parameters/service_id'
      - $ref: '#/components/parameters/alayacare_service_id'
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/count'
      responses:
        '200':
          description: the list of facilities
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FacilityVisitList'
        '401':
          $ref: '#/components/responses/ErrorResponseAuthentication'
    post:
      tags:
      - Facilities
      summary: Create a new facility visit
      description: '- `facility_id` or `alayacare_facility_id` is required, not specifying one is an invalid request.

        - `facility_id` and `alayacare_facility_id` are mutually exclusive, specifying both is an invalid request.

        - `employee_id` and `alayacare_employee_id` are mutually exclusive, specifying both is an invalid request.

        - `service_id` and `alayacare_service_id` are mutually exclusive, specifying both is an invalid request.

        **Remarks**

        A visit can be created without specifying the service if the facility has a single **active** service.

        If no employee is specified a vacant visit will be created.

        A cancelled visit (`cancelled`= `true`) must include a cancel code ID.

        '
      responses:
        '201':
          description: Visit successfully created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FacilityVisit'
        '400':
          $ref: '#/components/responses/ErrorResponseVisitCreateInvalidRequest'
        '401':
          $ref: '#/components/responses/ErrorResponseAuthentication'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FacilityVisitCreate'
        description: Visit data in JSON format.
        required: true
  /facility_visits/{alayacare_visit_id}:
    parameters:
    - name: alayacare_visit_id
      description: AlayaCare visit ID
      in: path
      required: true
      schema:
        type: integer
    get:
      tags:
      - Facilities
      summary: Get facility visit details
      description: 'Returns details of a visit where the client is a facility. For patient/client visits, use `GET /visits/{alayacare_visit_id}` instead.

        '
      responses:
        '200':
          description: Facility visit details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FacilityVisitDetails'
        '401':
          $ref: '#/components/responses/ErrorResponseAuthentication'
        '404':
          $ref: '#/components/responses/ErrorResponseVisitNotFound'
    put:
      tags:
      - Facilities
      summary: Update facility visit details
      description: 'Updates a visit where the client is a facility. For patient/client visits, use `PUT /visits/{alayacare_visit_id}` instead.


        A cancelled visit (`cancelled` = `true`) must include a cancel code ID.

        '
      responses:
        '200':
          description: Visit successfully updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FacilityVisit'
        '400':
          $ref: '#/components/responses/ErrorResponseVisitUpdateInvalidRequest'
        '401':
          $ref: '#/components/responses/ErrorResponseAuthentication'
        '404':
          $ref: '#/components/responses/ErrorResponseVisitNotFound'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FacilityVisitUpdate'
        description: Visit data in JSON format
        required: true
  /facility_visits/by_id/{visit_id}:
    parameters:
    - name: visit_id
      description: External visit ID
      in: path
      required: true
      schema:
        type: string
    get:
      tags:
      - Facilities
      summary: Get facility visit details
      responses:
        '200':
          description: Facility visit details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FacilityVisitDetails'
        '401':
          $ref: '#/components/responses/ErrorResponseAuthentication'
        '404':
          $ref: '#/components/responses/ErrorResponseVisitNotFound'
    put:
      tags:
      - Facilities
      summary: Update facility visit details
      description: A cancelled visit (`cancelled` = `true`) must include a cancel code ID.
      responses:
        '200':
          description: Visit successfully updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FacilityVisit'
        '400':
          $ref: '#/components/responses/ErrorResponseVisitUpdateInvalidRequest'
        '401':
          $ref: '#/components/responses/ErrorResponseAuthentication'
        '404':
          $ref: '#/components/responses/ErrorResponseVisitNotFound'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FacilityVisitUpdate'
        description: Visit data in JSON format
        required: true
components:
  schemas:
    Address:
      type: object
      properties:
        order:
          type: integer
          description: Order of location in route
          example: 1
        is_home_address:
          type: boolean
          description: If address defined matches the client address from the client profile, this value is true. Otherwise, the value is false.
          example: true
        latitude:
          type: number
          description: Latitude of the address
          example: 45.5017
        longitude:
          type: number
          description: Longitude of the address
          example: 73.5673
        address_1:
          type: string
          description: First line of the address
          example: 4200 St Laurent Blvd
        address_2:
          type: string
          description: Second line of the address
          example: '800'
        city:
          type: string
          description: City
          example: Montreal
        state:
          type: string
          description: State or province
          example: QC
        zip_code:
          type: string
          description: ZIP or postal code
          example: H2W 2R2
        country:
          type: string
          description: Country
          example: Canada
    ErrorResponse:
      description: Error response
      type: object
      properties:
        code:
          type: integer
          example: 400
          description: Response code
        message:
          type: string
          example: Invalid request
          description: Detailed error message
      required:
      - code
      - message
    VisitTag:
      type: string
      description: Name of tag.
      example: First visit
    VisitCancelCode:
      description: Visit cancellation code
      type:
      - object
      - 'null'
      properties:
        id:
          type: integer
          description: AlayaCare cancel code ID
          example: 1
        code:
          type: string
          description: Cancel code
          example: CLNT_REQ_RESCHEDULE
        description:
          type:
          - string
          - 'null'
          description: Cancel code description
          example: Client requested reschedule
      required:
      - id
      - code
    FacilityList:
      type: object
      allOf:
      - $ref: '#/components/schemas/PaginatedList'
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/Facility'
    BaseVisitDetails:
      type: object
      properties:
        alayacare_employee_id:
          type:
          - integer
          - 'null'
          format: int64
          description: AlayaCare employee ID
          example: 101
        alayacare_service_id:
          type: integer
          format: int64
          description: AlayaCare service ID
          example: 1
        alayacare_visit_id:
          type: integer
          format: int64
          description: AlayaCare visit ID
          example: 10001
        employee_id:
          type:
          - string
          - 'null'
          description: External employee ID
          example: sor_employee_id_1
        service_id:
          type:
          - string
          - 'null'
          description: External service ID
          example: sor_service_id_1
        visit_id:
          type:
          - string
          - 'null'
          description: External visit ID
          example: sor_visit_id_1
        status:
          type: string
          description: Status of the visit based on status hierarchy from AlayaCare web application.
          example: scheduled
          enum:
          - scheduled
          - vacant
          - on_hold
          - cancelled
          - offered
          - clocked
          - late
          - completed
          - missed
          - approved
        start_at:
          type: string
          format: date-time
          description: Visit start time (ISO 8601)
          example: '2017-07-08T13:30:00+00:00'
        end_at:
          type: string
          format: date-time
          description: Visit end time (ISO 8601)
          example: '2017-07-08T14:00:00+00:00'
        cancelled:
          type: boolean
          description: Indicates if visit is cancelled
        employee:
          $ref: '#/components/schemas/EmployeeDetails'
        service:
          $ref: '#/components/schemas/VisitServiceDetails'
        funders:
          description: Visit funders
          type: array
          items:
            $ref: '#/components/schemas/VisitFunderDetails'
        work_sessions:
          type: array
          items:
            $ref: '#/components/schemas/VisitWorkSession'
        adls:
          type: array
          items:
            $ref: '#/components/schemas/VisitDailyActivity'
        notes:
          type: array
          items:
            $ref: '#/components/schemas/VisitNote'
        cancel_code:
          $ref: '#/components/schemas/VisitCancelCode'
        activity_codes:
          type: array
          items:
            $ref: '#/components/schemas/VisitActivityCode'
        skills:
          type: array
          items:
            $ref: '#/components/schemas/VisitSkill'
        tags:
          type: array
          items:
            $ref: '#/components/schemas/VisitTag'
        service_instructions:
          description: Service instructions
          type:
          - string
          - 'null'
          example: Call in the morning to confirm each visit
        service_code_id:
          description: Visit override service code id.
          type:
          - integer
          - 'null'
          example: 1
        service_code_name:
          description: Visit override service code name.
          type:
          - string
          - 'null'
          example: Default Appointment
        route:
          type: array
          items:
            $ref: '#/components/schemas/Address'
      required:
      - alayacare_service_id
      - alayacare_visit_id
      - start_at
      - end_at
      - cancelled
      - employee
      - service
      - work_sessions
      - adls
      - notes
      - cancel_code
      - activity_codes
      - tags
      - service_instructions
    FacilityVisit:
      allOf:
      - $ref: '#/components/schemas/BaseVisit'
      properties:
        alayacare_facility_id:
          type: integer
          description: AlayaCare facility ID
          example: 1001
        facility_id:
          type:
          - string
          - 'null'
          description: External facility ID
          example: sor_facility_id_1
        break_minutes:
          type:
          - integer
          - 'null'
          description: Break minutes for the visit
          example: 10
      required:
      - alayacare_facility_id
    VisitWorkSession:
      type: object
      description: Visit work session
      properties:
        clock_in:
          description: Work session start time
          type: string
          format: date-time
          example: '2017-07-08T13:30:00+00:00'
        clock_out:
          description: Work session end time
          type:
          - string
          - 'null'
          format: date-time
          example: '2017-07-08T14:30:00+00:00'
        employee_id:
          description: Work session employee id
          type: integer
          example: 101
        clock_in_location:
          $ref: '#/components/schemas/Location'
        clock_out_location:
          $ref: '#/components/schemas/Location'
    FacilityProfile:
      description: 'Collection of key/value pairs where keys are existing attributes in the agency profile, defined through

        the AlayaCare web application.

        On the example below default profile keys for the facility profile are used.

        Example profile attributes:

        + `name`: string

        + `city`: string

        + `title`: string

        + `state`: string

        + `contact_type`: string

        + `fax`: string

        + `company`: string

        + `phone_other`: string

        + `phone_main`: string

        + `address`: string

        + `country`: string

        + `zip`: string

        + `address_suite`: string

        + `remarks`: string

        '
      type: object
      properties:
        name:
          description: Facility name
          type: string
          example: Alayacare
    VisitDailyActivity:
      type: object
      description: Activity of daily living
      properties:
        name:
          type: string
          description: ADL description
          example: Take out the trash
        completed:
          type: boolean
          description: Indicates if the ADL was completed during the visit
          example: false
        reason:
          type:
          - string
          - 'null'
          description: Reason why the ADL was not completed, in case it wasn't
          example: Not a garbage day
    Location:
      description: User location information
      type:
      - object
      - 'null'
      properties:
        lat:
          type: number
          description: latitude
          example: 45.518
        lng:
          type: number
          description: longitude
          example: -73.582
    VisitActivityCode:
      type: object
      properties:
        id:
          type: integer
          description: AlayaCare activity code ID
          example: 1
        code:
          type: string
          description: Activity code
          example: 01- Assessment
        description:
          type: string
          description: Activity code description
          example: New client assessment
      required:
      - id
      - code
    FacilityVisitCreate:
      allOf:
      - $ref: '#/components/schemas/FacilityVisitUpdate'
      description: date for creating a facility visit
      properties:
        alayacare_facility_id:
          format: int64
          description: AlayaCare ID of the facility
          example: 1001
        facility_id:
          type:
          - string
          - 'null'
          description: External ID of the facility
          example: facility_ext_id
      required:
      - start_at
      - end_at
    FacilityVisitList:
      allOf:
      - $ref: '#/components/schemas/PaginatedList'
      description: Paginated list of visits
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/FacilityVisit'
    Facility:
      description: AlayaCare facility
      type: object
      properties:
        id:
          type: integer
          description: AlayaCare facility ID
          example: 1
        name:
          type: string
          description: AlayaCare facility name
          example: Toronto Facility
        profile:
          $ref: '#/components/schemas/FacilityProfile'
        branch:
          $ref: '#/components/schemas/Branch'
      required:
      - id
      - name
    EmployeeDetails:
      description: Visit employee details
      type:
      - object
      - 'null'
      properties:
        id:
          type: integer
          description: AlayaCare employee ID
          example: 1001
        external_id:
          type:
          - string
          - 'null'
          description: External employee ID
          example: sor_employee_id_1
        profile_id:
          type: integer
          description: AlayaCare client profile ID
          example: 7891
        full_name:
          type: string
          description: Employee full name
          example: Jane Smith
        email:
          type: string
          description: Employee email
          example: employee_1@workplace.com
        timezone:
          type: string
          description: Time Zone name in IANA format (iana.org/time-zones)
          example: America/Toronto
      required:
      - id
      - full_name
    VisitSkill:
      type: object
      properties:
        id:
          type: integer
          description: AlayaCare activity code ID
          example: 1
        description:
          type: string
          description: Skill description
          example: Driver License
      required:
      - id
    FacilityVisitDetails:
      allOf:
      - $ref: '#/components/schemas/BaseVisitDetails'
      properties:
        alayacare_facility_id:
          format: int64
          description: AlayaCare ID of the facility
          example: 1001
        facility_id:
          type:
          - string
          - 'null'
          description: External ID of the facility
          example: facility_ext_id
        facility:
          $ref: '#/components/schemas/ClientDetails'
      required:
      - alayacare_facility_id
      - facility_id
    PaginatedList:
      description: Base model of all paginated lists
      type: object
      properties:
        count:
          type: integer
          description: Number of items in the response
          example: 1
        page:
          type: integer
          description: Current page number
          example: 1
        total_pages:
          type: integer
          description: Total number of pages available
          example: 1
        items:
          type: array
          items:
            type: object
      required:
      - count
      - page
      - total_pages
      - items
    ClientDetails:
      description: Visit client details
      type: object
      properties:
        id:
          type: integer
          description: AlayaCare client ID
          example: 1001
        external_id:
          type:
          - string
          - 'null'
          description: External client ID
          example: sor_client_id_1
        profile_id:
          type: integer
          description: AlayaCare client profile ID
          example: 7890
        full_name:
          type: string
          description: Client full name
          example: John Smith
        timezone:
          type: string
          description: Time Zone name in IANA format (iana.org/time-zones)
          example: America/Toronto
      required:
      - id
      - full_name
    BaseVisitUpdate:
      description: AlayaCare visit entity data for updates
      type: object
      properties:
        visit_id:
          description: 'External visit ID

            Allows correlating the visit in AlayaCare to visit data on an external system.

            If not specified AlayaCare visit ID would be used as default value.

            '
          type:
          - string
          - 'null'
          example: sor_visit_id_1
        employee_id:
          description: 'External employee ID

            If no employee is specified a vacant visit will be created.

            '
          type:
          - string
          - 'null'
          example: sor_employee_id_1
        alayacare_employee_id:
          description: 'AlayaCare employee ID

            If no employee is specified a vacant visit will be created.

            '
          type: integer
          example: 101
        service_id:
          description: 'External service ID

            Can be omitted if the client has a single active service.

            '
          type:
          - string
          - 'null'
          example: sor_service_record_1
        alayacare_service_id:
          description: 'AlayaCare service ID

            Can be omitted if the client has a single active service.

            '
          type: integer
          example: 1
        start_at:
          type: string
          format: date-time
          description: Visit start time (ISO 8601)
          example: '2017-07-08T13:30:00+00:00'
        end_at:
          type: string
          format: date-time
          description: Visit end time (ISO 8601)
          example: '2017-07-08T14:00:00+00:00'
        cancelled:
          type: boolean
          description: Indicates if visit is cancelled
          default: false
        cancel_code_id:
          type:
          - integer
          - 'null'
          description: 'AlayaCare ID of the cancel code.

            Value must be `null` if visit is not cancelled.

            '
          example: 101
        service_instructions:
          description: Service instructions
          type:
          - string
          - 'null'
          example: Call in the morning to confirm each visit
    FacilityVisitUpdate:
      allOf:
      - $ref: '#/components/schemas/BaseVisitUpdate'
    VisitFunderDetails:
      description: Visit funder details
      type: object
      properties:
        id:
          description: AlayaCare funder ID
          type: integer
          example: 1
        external_id:
          description: External funder ID
          type:
          - string
          - 'null'
          example: sor_funder_id_1
        name:
          description: Funder name
          type: string
          example: Insurance Company
        code:
          description: Funder code
          type: string
          example: IC-1
        organization:
          description: Organization
          type: string
          example: Home Healthcare Agency
        organization_code:
          description: Organization code
          type: string
          example: HHC-0101
        percentage:
          type: integer
          example: 100
      required:
      - id
      - name
    VisitServiceDetails:
      description: Visit service details
      type: object
      properties:
        id:
          description: AlayaCare service ID
          type: integer
          example: 1
        external_id:
          description: External service ID
          type:
          - string
          - 'null'
          example: sor_service_record_1
        name:
          description: Service name
          type: string
          example: Wound Care
        service_code_id:
          description: AlayaCare service code id
          type: integer
          example: 1
        service_code_name:
          description: AlayaCare service code name
          type: string
          example: WOUND-CARE
      required:
      - id
      - name
      - service_code_id
      - service_code_name
    VisitNoteCreate:
      description: Visit note
      type: object
      properties:
        text:
          type: string
          description: Content of the visit note
          maxLength: 1000
          example: A sample visit note.
      required:
      - text
    Branch:
      description: AlayaCare branch
      type: object
      properties:
        id:
          type: integer
          description: Branch ID
          example: 1000
        name:
          type: string
          description: Branch name
          example: Toronto branch
    BaseVisit:
      type: object
      properties:
        alayacare_employee_id:
          type:
          - integer
          - 'null'
          description: AlayaCare employee ID
          example: 101
        alayacare_service_id:
          type: integer
          description: AlayaCare service ID
          example: 1
        alayacare_visit_id:
          type: integer
          description: AlayaCare visit ID
          example: 10001
        employee_id:
          type:
          - string
          - 'null'
          description: External employee ID
          example: sor_employee_id_1
        service_id:
          type:
          - string
          - 'null'
          description: External service ID
          example: sor_service_id_1
        visit_id:
          type:
          - string
          - 'null'
          description: External visit ID
          example: sor_visit_id_1
        status:
          type: string
          description: Status of the visit based on status hierarchy from AlayaCare web application.
          example: scheduled
          enum:
          - scheduled
          - vacant
          - on_hold
          - cancelled
          - offered
          - clocked
          - late
          - completed
          - missed
          - approved
        start_at:
          type: string
          format: date-time
          description: Visit start time (ISO 8601)
          example: '2017-07-08T13:30:00+00:00'
        end_at:
          type: string
          format: date-time
          description: Visit end time (ISO 8601)
          example: '2017-07-08T14:00:00+00:00'
        notes:
          type: array
          items:
            $ref: '#/components/schemas/VisitNote'
        tags:
          type: array
          items:
            $ref: '#/components/schemas/VisitTag'
        cancelled:
          type: boolean
          description: Indicates if visit is cancelled
        cancel_code:
          $ref: '#/components/schemas/VisitCancelCode'
      required:
      - alayacare_service_id
      - alayacare_visit_id
      - start_at
      - end_at
      - cancelled
      - cancel_code
    VisitNote:
      allOf:
      - $ref: '#/components/schemas/VisitNoteCreate'
      properties:
        created_at:
          type: string
          format: date-time
          description: Creation time of the note
          example: '2017-07-08T13:30:00+00:00'
      required:
      - created_at
  responses:
    ErrorResponseVisitUpdateInvalidRequest:
      description: Invalid data submitted for visit creation
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: 400
            message: client_id and alayacare_client_id are mutually exclusive
    ErrorResponseAuthentication:
      description: Authorization required
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: 401
            message: Authorization required.
    ErrorResponseVisitNotFound:
      description: Visit not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: 404
            message: Visit not found
    ErrorResponseVisitCreateInvalidRequest:
      description: Invalid data submitted for visit creation
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: 400
            message: client_id and alayacare_client_id are mutually exclusive
  parameters:
    page:
      description: Filter by page number.
      name: page
      in: query
      required: false
      schema:
        type: integer
        default: 1
    facility_id:
      name: facility_id
      in: query
      required: false
      description: 'Filter by external facility ID

        External facility ID is the facility ID in the system of record.

        Ex. CRM facility identifier

        '
      schema:
        type: string
    count:
      description: Number of items per page.
      name: count
      in: query
      required: false
      schema:
        type: integer
        default: 100
    alayacare_facility_id:
      name: alayacare_facility_id
      in: query
      required: false
      description: Filter by AlayaCare facility ID
      schema:
        type: string
    alayacare_employee_id:
      name: alayacare_employee_id
      in: query
      required: false
      description: Filter by AlayaCare employee ID
      schema:
        type: integer
    branch_id:
      description: 'Filter by branch ID `(default: current user branch)`

        '
      name: branch_id
      in: query
      required: false
      schema:
        type: integer
    alayacare_service_id:
      name: alayacare_service_id
      in: query
      required: false
      description: Filter by AlayaCare service ID
      schema:
        type: integer
    service_id:
      name: service_id
      in: query
      required: false
 

# --- truncated at 32 KB (32 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/alayacare/refs/heads/main/openapi/alayacare-facilities-api-openapi.yml