openapi: 3.0.0 info: version: 1.0.19-oas3 title: AlayaCare Accounting Accounts Groups 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: Groups description: Client group related endpoints. paths: /groups: get: tags: - Groups summary: Get a list of client groups operationId: listGroups description: Returns a paginated list of client groups. parameters: - $ref: '#/components/parameters/page' - $ref: '#/components/parameters/count' - $ref: '#/components/parameters/branch_id' responses: '200': description: A list of groups content: application/json: schema: $ref: '#/components/schemas/GroupsList' '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: 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 GroupDetail: description: Patient group. type: object properties: branch: type: object description: AlayaCare branch properties: id: type: integer description: Branch ID example: 1000 name: type: string description: Branch name example: Toronto branch description: type: string description: description of the group example: saint-michel's hospital group id: type: integer description: AlayaCare group ID. example: 1 is_disabled: type: boolean description: flag indicating if the group is disabled example: false name: type: string description: AlayaCare group name example: Group A 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 GroupsList: allOf: - $ref: '#/components/schemas/PaginatedList' - type: object description: Paginated list of groups properties: items: type: array items: $ref: '#/components/schemas/GroupDetail' responses: ErrorResponseAuthentication: description: Authorization required content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: response: value: code: 401 message: Authorization required. parameters: branch_id: description: Filter by branch id. name: branch_id in: query required: false schema: type: integer 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 securitySchemes: basic_auth: type: http description: Basic HTTP auth over https scheme: basic