AlayaCare Status Reasons API

The Status Reasons API from AlayaCare — 1 operation(s) for status reasons.

OpenAPI Specification

alayacare-status-reasons-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  version: 1.0.19-oas3
  title: AlayaCare Accounting Accounts Status Reasons API
  description: '**AlayaCare IDs:**

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

    - id

    - visit_id

    - premium_id

    - visit_premium_id

    - employee_id

    - cost_centre_id

    - client_id


    **External IDs**

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

    - employee_external_id

    - client_external_id


    External IDs are required to be unique.

    No other assumptions are made regarding their format they are treated as strings.

    '
servers:
- url: https://example.alayacare.com/ext/api/v2/accounting
security:
- basic_auth: []
tags:
- name: Status Reasons
paths:
  /status_reasons:
    get:
      tags:
      - Status Reasons
      summary: Get a list of client status reasons
      parameters:
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/count'
      - $ref: '#/components/parameters/branchId'
      - name: status
        in: query
        description: Filter by client status
        explode: true
        schema:
          type: array
          items:
            type: string
            enum:
            - on_hold
            - discharged
      responses:
        '200':
          description: A list of status reasons
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatusReasonsList'
        '401':
          $ref: '#/components/responses/ErrorResponseAuthentication'
components:
  schemas:
    PaginatedList:
      description: Base model of all paginated lists
      type: object
      properties:
        count:
          type: integer
          description: Number of items in the response
          example: 10
        page:
          type: integer
          description: Current page number
          example: 1
          minimum: 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
    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
    StatusReasonDetail:
      description: Client status reason.
      type: object
      properties:
        id:
          type: integer
          description: AlayaCare status reason ID.
          example: 1
        status:
          type: string
          description: Alayacare client status
          example: on_hold
          enum:
          - on_hold
          - discharged
        name:
          type: string
          description: AlayaCare status reason name.
          example: Vacation
        description:
          type: string
          description: AlayaCare status reason description
          example: Yearly summer vacation.
        branch:
          type: object
          description: AlayaCare branch
          properties:
            id:
              type: integer
              description: Branch ID
              example: 1000
              minimum: 1
            name:
              type: string
              description: Branch name
              example: Toronto branch
    StatusReasonsList:
      allOf:
      - $ref: '#/components/schemas/PaginatedList'
      description: Paginated list of status reasons
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/StatusReasonDetail'
  responses:
    ErrorResponseAuthentication:
      description: Authorization required
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            response:
              value:
                code: '401'
                message: Authorization required.
  parameters:
    branchId:
      description: Filter by branch ID
      name: branch_id
      in: query
      required: false
      schema:
        type: integer
        minimum: 1
    count:
      description: Number of items per page.
      name: count
      in: query
      required: false
      schema:
        type: integer
        default: 100
    page:
      description: Filter by page number.
      name: page
      in: query
      required: false
      schema:
        type: integer
        default: 1
        minimum: 1
  securitySchemes:
    basic_auth:
      type: http
      description: Basic HTTP auth over https
      scheme: basic