AlayaCare Profile API

Profile attribute related endpoints.

OpenAPI Specification

alayacare-profile-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  version: 1.0.19-oas3
  title: AlayaCare Accounting Accounts Profile 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: Profile
  description: Profile attribute related endpoints.
paths:
  /profile/client:
    get:
      tags:
      - Profile
      summary: Get a list of client profile attributes
      operationId: listClientProfileAttributes
      description: Returns a paginated list of client profile attributes.
      parameters:
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/count'
      - $ref: '#/components/parameters/filter_partial_search'
      responses:
        '200':
          description: A list of profile attributes
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProfileAttributeList'
        '401':
          $ref: '#/components/responses/ErrorResponseAuthentication'
  /profile/client_contact:
    get:
      tags:
      - Profile
      parameters:
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/count'
      - $ref: '#/components/parameters/filter_partial_search'
      summary: Get a list of client contact profile attributes
      operationId: listClientContactProfileAttributes
      description: Returns a paginated list of client contact profile attributes.
      responses:
        '200':
          description: A list of profile attributes
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProfileAttributeList'
        '401':
          $ref: '#/components/responses/ErrorResponseAuthentication'
  /profile/employee:
    parameters:
    - $ref: '#/parameters/page'
    - $ref: '#/parameters/count'
    get:
      tags:
      - Profile
      summary: Get a list of employee profile attributes
      responses:
        '200':
          description: A list of profile attributes
          schema:
            $ref: '#/definitions/ProfileAttributeList'
        '401':
          $ref: '#/responses/ErrorResponseAuthentication'
  /profile/employee_contact:
    get:
      tags:
      - Profile
      parameters:
      - $ref: '#/parameters/page'
      - $ref: '#/parameters/count'
      summary: Get a list of employee contact profile attributes
      responses:
        '200':
          description: A list of profile attributes
          schema:
            $ref: '#/definitions/ProfileAttributeList'
        '401':
          $ref: '#/responses/ErrorResponseAuthentication'
  /profile/service:
    get:
      tags:
      - Profile
      summary: Get a list of service profile attributes
      parameters:
      - $ref: '#/parameters/page'
      - $ref: '#/parameters/count'
      - $ref: '#/parameters/filter_partial_search'
      responses:
        '200':
          description: A list of profile attributes
          schema:
            $ref: '#/definitions/ProfileAttributeList_2'
        '401':
          $ref: '#/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: 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
    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
    ProfileAttribute:
      type: object
      properties:
        tag:
          description: Attribute key in the demographics object
          type: string
          example: first_name
        description:
          description: Attribute description as it shows in the web application
          type: string
          example: First Name
    ProfileAttributeList:
      allOf:
      - $ref: '#/components/schemas/PaginatedList'
      - type: object
        description: Paginated list of profile attributes
        properties:
          items:
            type: array
            items:
              $ref: '#/components/schemas/ProfileAttribute'
  parameters:
    filter_partial_search:
      name: filter_partial_search
      description: 'Substring search on profile tag and description values.

        Ex: `name`

        '
      in: query
      required: false
      schema:
        type: string
    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
  responses:
    ErrorResponseAuthentication:
      description: Authorization required
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            response:
              value:
                code: 401
                message: Authorization required.
  securitySchemes:
    basic_auth:
      type: http
      description: Basic HTTP auth over https
      scheme: basic
definitions:
  PaginatedList_2:
    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
  ProfileAttributeList:
    allOf:
    - $ref: '#/definitions/PaginatedList'
    description: Paginated list of profile attributes
    type: object
    properties:
      items:
        type: array
        items:
          $ref: '#/definitions/ProfileAttribute'
  ProfileAttribute:
    type: object
    properties:
      tag:
        description: Attribute key in the demographics object
        type: string
        example: first_name
      description:
        description: Attribute description as it shows in the web application
        type: string
        example: First Name
  ProfileAttributeList_2:
    allOf:
    - $ref: '#/definitions/PaginatedList_2'
    description: Paginated list of profile attributes
    properties:
      items:
        type: array
        items:
          $ref: '#/definitions/ProfileAttribute'
  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 availbale
        example: 1
    required:
    - count
    - page
    - total_pages
    - items
  ErrorResponse:
    description: Error response
    type: object
    properties:
      code:
        type: integer
        description: Response code
      message:
        type: string
        description: Detailed error message
    required:
    - code
    - message
parameters:
  filter_partial_search:
    name: filter (partial search)
    description: 'Substring search on profile tag and description values.

      Ex: `name`

      '
    in: query
    type: string
    required: false
  count:
    description: Number of items per page.
    name: count
    default: 100
    in: query
    required: false
    type: integer
  page:
    description: Filter by page number.
    name: page
    default: 1
    in: query
    required: false
    type: integer
responses:
  ErrorResponseAuthentication:
    description: Authorization required
    schema:
      $ref: '#/definitions/ErrorResponse'
    examples:
      application/json:
        code: 401
        message: Authorization required.