AlayaCare Services API

The Services API from AlayaCare — 3 operation(s) for services.

Operations 6

GET /services Get list of services
POST /services Create a service
GET /services/{alayacare_service_id} Get service details using AlayaCare ID
PUT /services/{alayacare_service_id} Update service details using AlayaCare ID
GET /services/by_id/{service_id} Get service details using external ID
PUT /services/by_id/{service_id} Update service details using external ID

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-services-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-services-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: 1.1.0
  title: AlayaCare Services 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

    '
servers:
- url: https://homecare.alayacare.ca/ext/api/v2/scheduler
- url: https://homecare.uat.alayacare.ca/ext/api/v2/scheduler
- url: https://homecare.staging.alayacare.ca/ext/api/v2/scheduler
security:
- basicAuth: []
tags:
- name: Services
paths:
  /services:
    get:
      tags:
      - Services
      summary: Get list of services
      description: '**Remarks**

        - `client_id` and `alayacare_client_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.

        - `funder_id` and `external_funder_id` are mutually exclusive, specifying both is an invalid request.

        '
      parameters:
      - $ref: '#/components/parameters/client_id'
      - $ref: '#/components/parameters/alayacare_client_id'
      - $ref: '#/components/parameters/employee_id'
      - $ref: '#/components/parameters/alayacare_employee_id'
      - $ref: '#/components/parameters/external_ids'
      - name: funder_id
        in: query
        description: Filter by external funder ID
        required: false
        schema:
          type: string
      - name: alayacare_funder_id
        in: query
        description: Filter AlayaCare funder ID
        required: false
        schema:
          type: integer
          minimum: 1
      - name: status
        in: query
        description: Filter by service status
        required: false
        style: form
        explode: true
        schema:
          type: string
          enum:
          - active
          - on_hold
          - waiting_list
          - discharged
          default: active
      - name: alayacare_cost_centre_id
        in: query
        description: Filter by AlayaCare cost centre id
        required: false
        schema:
          type: integer
          minimum: 1
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/count'
      responses:
        '200':
          description: A list of services
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceList'
        '400':
          $ref: '#/components/responses/ErrorResponseServiceInvalidRequest'
        '401':
          $ref: '#/components/responses/ErrorResponseAuthentication'
    post:
      tags:
      - Services
      summary: Create a service
      requestBody:
        description: "- A new service can be created using a valid program type and/or funding methodology.\n\n- Program types are limited to:\n  - Cluster Billing\n  - COB (Coordination of benefits)\n  - Co-Contribution\n  - Co-Pay\n  - LTCI\n  - Medicaid\n  - Single Payor\n  - Split Percentage\n- Funder types are limited to:\n  - LHIN\n  - HCP\n  - Funder individual\n  - Client individual\n- Mutually Exclusive fields (specifying both of the following fields\nwill create an invalid request):\n  - `client_id` and `alayacare_client_id`\n  - `employee_id` and `alayacare_employee_id`\n  - `service_code_id` and `service_code_name`\n- At least one field of the following tuples is required (Not specifying\none will create an invalid request)\n  - `client_id` or `alayacare_client_id`\n  - `service_code_id` or `service_code_name`\n\n\n**Medicaid Services**\n\nWhen creating a medicaid service, you must set the `patient_id` property.\n\nThe `funding_methodology` property must be set to `medicaid`.\n\nYou must also provide at least one valid `guid_funder_breakdown` object with a valid `funder_id` set.\n\n**Important**: Only the first `guid_funder_breakdowns` object will be used.\n\nAlso, when creating medicaid services, you can provide a `program_creation_data` property with the `office_identification_set_id` property set to the ID of the office identification set that you wish to use.\n\n\n**Single Payor Services**\n\nWhen creating a single payor service, you must set the `patient_id` property.\n\nThe `funding_methodology` property must be set to `single_payor`.\n\nYou must also provide at least one valid `guid_funder_breakdowns` object with a valid `funder_id` set. If the `guid_funder_breakdowns` object has a `contact_id` set, that will set the billing contact for the service.\n\n**Important**: Only the first `guid_funder_breakdown` object will be used.\n\nA `program_creation_data` property `must` be included when creating single payor services. It `must` contain a valid `billing_cycle` property and `is_guarantor_taxable` property.\n\nAlso, when creating single payor services, you can set an `office_identification_set_id` property within the `program_creation_data` property the the office identification set that you wish to use.\n\n**Service Accounting**\n\nA `service accounting` property is required when creating a v2 service. A simple single payor program will require a minimal one. For example, `billable_using` is set to `null` and `is_taxable` is used to determine if the service is taxable:\n\n```\n{\n  ...\n  \"funding_methodology\": \"single_payor\",\n  ...\n  \"service_accounting\": {\n    \"billable_using\": null,\n    \"is_taxable\": false,\n    \"non_covered_amt\": null,\n    \"rating_rule_type\": null,\n    \"rating_rules\": null\n  }\n  ...\n}\n```\n\nThere are more complicated configurations that can be created. Here are some examples\n\nCreating a typical `multiple bill code` service with a `time increment` configuration.\n\nYou need to provide a `service_accounting` property the following minimal properties:\n- A `billable_using` property that is set to `multiple_bill_codes`\n- A `rating_rule_type` property that is set to `time_increment`\n- A `rating_rules` property that contains an object with bill code, funder, and taxable information\n- One rating rule object must have an `is_default` property set to `true` all others must be set to `false`\n- Every rating rule object must have a unique `rank` property starting with `1`, the next ones increasing by `1` and without skipping any intermediary numbers\n- Every rating rule object must have a `minutes` property that is an integer.\n\nHere's an example with two bill codes:\n\n```\n{\n  ...\n  \"funding_methodology\": \"single_payor\",\n  ...\n  \"service_accounting\": {\n    \"billable_using\": \"multiple_bill_codes\",\n    \"is_taxable\": null,\n    \"non_covered_amt\": null,\n    \"rating_rule_type\": \"time_increment\",\n    \"rating_rules\": [\n      {\n        \"bill_code_id\": 58,\n        \"cost_centre_id\": null,\n        \"funder_id\": null,\n        \"id\": 1,\n        \"is_default\": true,\n        \"is_taxable\": true,\n        \"minutes\": 60,\n        \"payor\": null,\n        \"program_id\": null,\n        \"rank\": 1\n      },\n      {\n        \"bill_code_id\": 59,\n        \"cost_centre_id\": null,\n        \"funder_id\": null,\n        \"id\": 2,\n        \"is_default\": false,\n        \"is_taxable\": true,\n        \"minutes\": 60,\n        \"payor\": null,\n        \"program_id\": null,\n        \"rank\": 2\n      }\n    ]\n  }\n  ...\n}\n```\n\nCreating a typical `multiple bill code` service with a `percentage` configuration.\n\nYou need to provide a `service_accounting` property the following minimal properties:\n- A `billable_using` property that is set to `multiple_bill_codes`\n- A `rating_rule_type` property that is set to `percentage`\n- A `rating_rules` property that contains an object with bill code, funder, and taxable information\n- One rating rule object must have an `is_default` property set to `true` all others must be set to `false`\n- Every rating rule object must have a unique `rank` property starting with `1`, the next ones increasing by `1` and without skipping any intermediary numbers\n- Every rating rule object must have a `percent` property that is an integer. All of the `percent` properties on bill codes\n  must sum to `100`.\n\nHere's an example with two bill codes:\n\n```\n{\n  ...\n  \"funding_methodology\": \"single_payor\",\n  ...\n  \"service_accounting\": {\n    \"billable_using\": \"multiple_bill_codes\",\n    \"is_taxable\": null,\n    \"non_covered_amt\": null,\n    \"rating_rule_type\": \"percentage\",\n    \"rating_rules\": [\n      {\n        \"bill_code_id\": 58,\n        \"cost_centre_id\": null,\n        \"funder_id\": null,\n        \"id\": 1,\n        \"is_default\": true,\n        \"is_taxable\": true,\n        \"minutes\": null,\n        \"percent\": 76,\n        \"program_id\": null,\n        \"rank\": 1\n      },\n      {\n        \"bill_code_id\": 103,\n        \"cost_centre_id\": null,\n        \"funder_id\": null,\n        \"id\": 2,\n        \"is_default\": false,\n        \"is_taxable\": true,\n        \"minutes\": null,\n        \"percent\": 24,\n        \"program_id\": null,\n        \"rank\": 2\n      }\n    ]\n  }\n  ...\n}\n```\n\nCreating a typical `multiple program` service with a `time increment` configuration.\n\nYou need to provide a `service_accounting` property the following minimal properties:\n- A `billable_using` property that is set to `multiple_bill_codes`\n- A `rating_rule_type` property that is set to `time_increment`\n- A `rating_rules` property that contains an object with bill code, funder, and taxable information\n- One rating rule object must have an `is_default` property set to `true` all others must be set to `false`\n- Every rating rule object must have a unique `rank` property starting with `1`, the next ones increasing by `1` and without skipping any intermediary numbers\n- Every rating rule object must have a `minutes` property that is an integer.\n- Every rating rule object must have a `payor` object.\n- Every rating rule object must have a `program_id` set to a valid program ID.\n- **Important**: the funding methodology must be set to `payor_invoicing` in this case.\n\nHere's an example with two bill codes:\n\n```\n{\n  ...\n  \"funding_methodology\": \"payor_invoicing\",\n  ...\n  \"service_accounting\": {\n    \"billable_using\": \"multiple_programs\",\n    \"is_taxable\": null,\n    \"non_covered_amt\": null,\n    \"rating_rule_type\": \"time_increment\",\n    \"rating_rules\": [\n      {\n        \"bill_code_id\": null,\n        \"cost_centre_id\": null,\n        \"funder_id\": 1,\n        \"id\": 1,\n        \"is_default\": false,\n        \"is_taxable\": true,\n        \"minutes\": 60,\n        \"program_id\": 2538,\n        \"rank\": 1\n      },\n      {\n        \"bill_code_id\": null,\n        \"cost_centre_id\": null,\n        \"funder_id\": 65,\n        \"id\": 2,\n        \"is_default\": true,\n        \"is_taxable\": true,\n        \"minutes\": 60,\n        \"program_id\": 2539,\n        \"rank\": 2\n      }\n    ]\n  }\n  ...\n}\n```\n"
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ServiceCreateSchema'
            examples:
              Single Program Single Payor Service:
                value:
                  activity_codes:
                  - id: '1'
                  add_to_associated_employees: true
                  client:
                    id: '1861'
                  cost_centre_id: null
                  funding_methodology: single_payor
                  guid_funder_breakdowns:
                  - contact_id: 3153
                    funder_id: 1
                    is_primary: 1
                    percentage: 100
                  import_id: ''
                  instructions: ''
                  is_address_overridden: false
                  name: Single Program Single Payor Service
                  notes: ''
                  primary_employee:
                    id: '100'
                  program_creation_data:
                    billing_cycle: 5
                    is_guarantor_taxable: true
                    office_identification_set_id: null
                  program_id: null
                  projected_end_date: '2025-04-30'
                  reports:
                  - id: 1
                    is_required: 1
                  - id: 2
                    is_required: 0
                  service_accounting:
                    billable_using: null
                    is_taxable: true
                    non_covered_amt: null
                    rating_rule_type: null
                    rating_rules: null
                  service_code:
                    id: 159
                  skills: []
                  start_date: '2025-04-01'
                  profile:
                    form_context_fields:
                    - name1: value 1
                      name2: value 2
                      name3: value 3
              Multiple Programs Single Payor Service:
                value:
                  activity_codes: []
                  add_to_associated_employees: true
                  client:
                    id: '1861'
                  cost_centre_id: null
                  funding_methodology: payor_invoicing
                  guid_funder_breakdowns:
                  - funder_id: 1
                    is_primary: 1
                    percentage: 100
                  import_id: ''
                  instructions: ''
                  is_address_overridden: false
                  name: Multiple Programs Single Payor Service
                  notes: ''
                  primary_employee:
                    id: '100'
                  program_creation_data: null
                  program_id: null
                  projected_end_date: '2025-04-30'
                  reports: []
                  service_accounting:
                    billable_using: multiple_programs
                    is_taxable: null
                    non_covered_amt: null
                    rating_rule_type: time_increment
                    rating_rules:
                    - bill_code_id: null
                      cost_centre_id: 1
                      funder_id: 1
                      id: 1
                      is_default: true
                      is_taxable: true
                      minutes: 720
                      payor:
                        client_billing_cycle: null
                        cost_centre:
                          label: 1 - cc-1
                          value: 1
                        cost_centre_id: 1
                        funder_methodology: co-pay
                        guarantor_billing_contact_id: null
                        guarantor_funder:
                          code: funder_1
                          frequency: null
                          guid: 50
                          id: 1
                          invoicingModel: individual_invoices
                          label: Funder 1
                          name: CI
                          value: 1
                        guarantor_funder_id: 1
                        is_guarantor_taxable: true
                        non_covered_amt: null
                        office_identification_set_id: null
                        program_id: 1583
                      program_id: 1583
                      rank: 1
                    - bill_code_id: null
                      cost_centre_id: 2
                      funder_id: 1
                      id: 2
                      is_default: false
                      is_taxable: true
                      minutes: 840
                      payor:
                        client_billing_cycle: 5
                        cost_centre:
                          label: 2 - cost centre -2
                          value: 2
                        cost_centre_id: 2
                        funder_methodology: single_payor
                        guarantor_billing_contact_id: 3153
                        guarantor_funder:
                          code: funder_1
                          frequency: null
                          guid: 50
                          id: 1
                          invoicingModel: individual_invoices
                          label: Funder 1
                          name: CI
                          value: 1
                        guarantor_funder_id: 1
                        is_guarantor_taxable: true
                        non_covered_amt: null
                        office_identification_set_id: null
                        program_id: 2587
                      program_id: 2587
                      rank: 2
                  service_code:
                    id: 1
                  skills:
                  - id: '1'
                  start_date: '2025-04-01'
              Medicaid Service:
                value:
                  activity_codes: []
                  client:
                    id: '1861'
                  cost_centre_id: null
                  funding_methodology: medicaid
                  guid_funder_breakdowns:
                  - contact_id: null
                    funder_id: 24
                    is_primary: 1
                    percentage: 100
                  import_id: ''
                  instructions: ''
                  is_address_overridden: false
                  name: Medicaid Service
                  notes: ''
                  primary_employee: {}
                  program_creation_data:
                    billing_cycle: 1
                    is_guarantor_taxable: false
                    office_identification_set_id: null
                  program_id: null
                  projected_end_date: '2025-04-30'
                  reports: []
                  service_accounting:
                    billable_using: null
                    is_taxable: true
                    non_covered_amt: null
                    rating_rule_type: null
                    rating_rules: null
                  service_code:
                    id: 34
                  skills: []
                  start_date: '2025-04-01'
      responses:
        '200':
          $ref: '#/components/responses/SuccessResponseCreationService'
        '400':
          $ref: '#/components/responses/ErrorResponseServiceUpdateInvalidRequest'
        '401':
          $ref: '#/components/responses/ErrorResponseAuthentication'
        '409':
          $ref: '#/components/responses/ErrorResponseServiceUpdateInvalidEmployeeIds'
  /services/{alayacare_service_id}:
    parameters:
    - $ref: '#/components/parameters/alayacare_service_id'
    - name: with_upcoming_statuses
      description: The upcoming status and status dates of the service. If there is no upcoming status for the service, `[]` will be returned.
      in: query
      required: false
      schema:
        type: boolean
    get:
      tags:
      - Services
      summary: Get service details using AlayaCare ID
      responses:
        '200':
          description: Service details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceDetails'
        '401':
          $ref: '#/components/responses/ErrorResponseServiceInvalidRequest'
        '404':
          $ref: '#/components/responses/ErrorResponseServiceNotFound'
    put:
      tags:
      - Services
      summary: Update service details using AlayaCare ID
      description: '**Remarks**

        - Service status can''t be updated.

        - `primary_employee_id` and `primary_employee_external_id` are mutually exclusive, specifying both is an invalid request.

        - The branch of the employee must match the branch of the client, incompatible branches are an invalid request.

        - Reports and forms can be updated through the `reports` field.

        '
      requestBody:
        description: Service data in JSON format
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ServiceUpdate'
      responses:
        '200':
          $ref: '#/components/responses/SuccessResponseUpdateService'
        '400':
          $ref: '#/components/responses/ErrorResponseServiceUpdateInvalidRequest'
        '401':
          $ref: '#/components/responses/ErrorResponseAuthentication'
        '404':
          $ref: '#/components/responses/ErrorResponseServiceNotFound'
        '409':
          $ref: '#/components/responses/ErrorResponseServiceUpdateInvalidEmployeeIds'
  /services/by_id/{service_id}:
    parameters:
    - $ref: '#/components/parameters/service_id'
    - name: with_upcoming_statuses
      description: The upcoming status and status dates of the service. If there is no upcoming status for the service, `[]` will be returned.
      in: query
      required: false
      schema:
        type: boolean
    get:
      tags:
      - Services
      summary: Get service details using external ID
      responses:
        '200':
          description: Service details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceDetails'
        '401':
          $ref: '#/components/responses/ErrorResponseServiceInvalidRequest'
        '404':
          $ref: '#/components/responses/ErrorResponseServiceNotFound'
    put:
      tags:
      - Services
      summary: Update service details using external ID
      description: '**Remarks**

        - Service status can''t be updated.

        - primary_employee_id and primary_employee_external_id are mutually exclusive, specifying both is an invalid request.

        - The branch of the employee must match the branch of the client, incompatible branches are an invalid request.

        - Reports and forms can be updated through the `reports` field.

        '
      requestBody:
        description: Service data in JSON format
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ServiceUpdate'
      responses:
        '200':
          $ref: '#/components/responses/SuccessResponseUpdateService'
        '400':
          $ref: '#/components/responses/ErrorResponseServiceUpdateInvalidRequest'
        '401':
          $ref: '#/components/responses/ErrorResponseAuthentication'
        '404':
          $ref: '#/components/responses/ErrorResponseServiceNotFound'
        '409':
          $ref: '#/components/responses/ErrorResponseServiceUpdateInvalidEmployeeIds'
components:
  schemas:
    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
    ServiceStatus:
      type: string
      description: Current service status.
      enum:
      - active
      - on_hold
      - waiting_list
      - discharged
    CostCentre:
      description: Details of a cost centre
      type: object
      x-nullable: true
      properties:
        description:
          type: string
          description: Cost centre description
          example: Montreal
        id:
          type: integer
          minimum: 1
          description: Cost centre ID
          example: 2
        number:
          type: string
          description: Cost centre number for display in-app
          example: '5555'
        status:
          type: string
          description: Cost centre status
          example: enabled
    ServiceSchema:
      type: object
      properties:
        billable_rate:
          type: number
          description: The billable rate for a Service
          example: 25
        service_id:
          type: string
          description: The external id of this Service
          example: ext_id_44
        name:
          type: string
          description: The name of the Service
          example: Personal Care
        client:
          type: object
          properties:
            alayacare_client_id:
              type: integer
              minimum: 1
              description: The AlayaCare Client Id
              example: 1001
            client_id:
              type: string
              description: The external Client Id
              example: sor_external_client_id
        start_date:
          type: string
          description: The start date of the Service (ISO8601)
          example: '2020-01-01'
        projected_end_date:
          type: string
          description: The projected end date of the Service (ISO8601)
          example: '2021-01-31'
        notes:
          type: string
          description: Notes associated with the Service
          example: Be kind
        service_instructions:
          type: string
          description: Instructions associated with the Service
          example: Please use buzz code 203
        use_client_address:
          type: boolean
          description: Whether or not the client address is used
          example: false
        funder_details:
          type: object
          description: Funder details accepted as a dictionary. All values must be strings.
        guid_funder_breakdowns:
          type: array
          items:
            $ref: '#/components/schemas/GuidFunderBreakdownsSchema'
          description: The Guid Funder Breakdowns for this Service
        funding_methodology:
          type: string
          description: The funding methodology / program type for this Service
          enum:
          - cluster_billing
          - cob
          - co_contribution
          - co-pay
          - ltci
          - medicaid
          - payor_invoicing
          - single_funder
          - single_payor
          - split_funders
          - split_percentage
        service_code_name:
          type: string
          description: The unique name of the Service's Service Code
          example: CODE
        service_code_id:
          type: integer
          minimum: 1
          description: The ID of the Service's Service Code
          example: 1
        employee:
          type: object
          description: 'The fields ''employee_id'' and ''alayacare_employee_id'' are mutually exclusive, specifying both is an invalid request.

            '
          properties:
            alayacare_employee_id:
              type: integer
              minimum: 1
              description: The id of the Service's primary employee
              example: 101
            employee_id:
              type: string
              description: The external id of the service's primary employee
              example: ext_employee_id_123
        profile:
          $ref: '#/components/schemas/ServiceProfile'
        import_id:
          type: string
          description: The import id for this Service
          example: IMPORT_ID_A
        add_to_associated_employees:
          type: boolean
          description: Whether or not to add the primary employee to the list of associated employees
          example: true
        reports:
          type: array
          description: List of Report IDs to be attached in the service. This field is mutually exclusive with the field `report_ids`.
          items:
            type: object
            properties:
              id:
                type: integer
                minimum: 1
                description: Report ID
                example: 1
              is_required:
                type: boolean
                description: Whether or not the report is required
                example: true
        report_ids:
          type: array
          description: List of Report IDs to be attached in the service. This field is only accepted if the feature flag Forms 2.0 is deactivated.
          example:
          - 1
          - 2
          - 3
          items:
            type: integer
            minimum: 1
            description: Report ID
        form_ids:
          type: array
          description: List of Form IDs to be attached in the service. This field is only accepted if the feature flag Forms 2.0 is activated.
          example:
          - 4
          - 5
          - 6
          items:
            type: integer
            minimum: 1
            description: Form ID
        activity_code_ids:
          type: array
          description: List of activity code IDs to be attached to the service.
          example:
          - 10
          - 11
          - 12
          items:
            type: integer
            minimum: 1
            description: Activity codes IDs
        service_tags:
          type: array
          description: List of service tags to be attached to the service.
          example:
          - Diabetes service
          - Hospice care
          items:
            type: string
            description: Service tags
        cost_centre_id:
          type: integer
          minimum: 1
          description: The ID of the cost centre of the service.
          example: 10
    ServiceRelationSchema:
      type: object
      properties:
        skills:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
                minimum: 1
                description: The id of a skill
                example: 5
            required:
            - id
    ServiceCreateSchema:
      allOf:
      - $ref: '#/components/schemas/ServiceSchema'
      - $ref: '#/components/schemas/ServiceRelationSchema'
      properties:
        service_accounting:
          $ref: '#/components/schemas/ServiceAccountingSchema'
        program_creation_data:
          $ref: '#/components/schemas/ProgramCreationDataSchema'
      required:
      - name
      - client
      - funding_methodology
      - funder
      - service_code_id
    ServiceUpdate:
      description: AlayaCare service entity data for updating
      type: object
      properties:
        profile:
          $ref: '#/components/schemas/ServiceProfile'
        provider_details:
          $ref: '#/components/schemas/ServiceProviderDetails'
        service_id:
          type: string
          description: External service id
          example: sor_external_service_id_1
        service_instructions:
          description: Service instructions
          type: string
          example: Call in the morning to confirm each visit
          x-nullable: true
        primary_employee_id:
          description: The ID of the primary employee assigned to the service
          type: integer
          minimum: 1
          example: 100
          x-nullable: true
        primary_employee_external_id:
          description: The external ID of the primary employee assigned to the service
          type: string
          example: sor_employee_id_1
          x-nullable: true
        reports:
          type: array
          description: List of Report or Form IDs to be attached in the service.
          items:
            type: object
            properties:
              id:
                type: integer
                minimum: 1
                description: Report ID
                example: 1
              is_required:
                type: boolean
                description: Whether or not the report or form is required
                example: true
        service_accounting:
          $ref: '#/components/schemas/ServiceAccountingSchema'
    SuccessResponse:
      description: Success response.
      type: object
      properties:
        id:
          type: integer
          minimum: 1
          description: AlayaCare ID
          example: 1001
        external_id:
          type: string
          description: External ID
          example: entity_external_id
      required:
      - id
      - external_id
    ServiceList:
      allOf:
      - $ref: '#/components/schemas/PaginatedList'
      description: Paginated list of services
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/Service'
    GuidFunderBreakdownsSchema:
      type: object
     

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