openapi: 3.0.0 info: version: 1.0.19-oas3 title: AlayaCare Accounting Accounts Care Plan Interventions 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: Care Plan Interventions paths: /interventions/client/{client_id}: parameters: - name: client_id in: path required: true type: integer description: AlayaCare client ID get: tags: - Care Plan Interventions summary: Get a list of a client's care plan interventions using AlayaCare client ID description: '- `service_id` and `external_service_id` are mutually exclusive, specifying both is an invalid request. ' parameters: - $ref: '#/parameters/service_id' - $ref: '#/parameters/external_service_id' - name: status description: Filter by status of the intervention in: query type: string enum: - active - completed - archived required: false responses: 200: description: A list of interventions for a client schema: $ref: '#/definitions/InterventionList' 400: $ref: '#/responses/ErrorResponseAdlsInvalidRequest' 401: $ref: '#/responses/AuthChallenge' 403: $ref: '#/responses/ErrorResponseCareplanFeatureFlagState' 404: $ref: '#/responses/ClientNotFound' /interventions/client/by_id/{external_client_id}: parameters: - name: external_client_id in: path required: true type: string description: External client ID get: tags: - Care Plan Interventions summary: Get a list of a client's interventions using external client ID description: '- `service_id` and `external_service_id` are mutually exclusive, specifying both is an invalid request. ' parameters: - $ref: '#/parameters/service_id' - $ref: '#/parameters/external_service_id' - name: status description: Filter by status of the intervention in: query type: string enum: - active - completed - archived required: false responses: 200: description: A list of interventions for a client schema: $ref: '#/definitions/InterventionList' 400: $ref: '#/responses/ErrorResponseAdlsInvalidRequest' 401: $ref: '#/responses/AuthChallenge' 403: $ref: '#/responses/ErrorResponseCareplanFeatureFlagState' 404: $ref: '#/responses/ClientNotFound' components: securitySchemes: basic_auth: type: http description: Basic HTTP auth over https scheme: basic definitions: Intervention: type: object description: Care plan intervention properties: name: type: string description: Intervention name example: brush teeth description: type: string description: Intervention description example: brush teeth status: type: string description: Status of the intervention enum: - draft - active - completed - archived type: type: string description: One of the types defined in the setting "Care Documentation > Care Plan Intervention Types" example: Nursing start_date: type: string description: Intervention start date example: '2018-01-01' end_date: type: string description: Intervention end date example: '2018-01-01' services: type: array items: $ref: '#/definitions/InterventionService' InterventionList: allOf: - $ref: '#/definitions/PaginatedList' description: Paginated list of interventions properties: items: type: array items: $ref: '#/definitions/Intervention' InterventionService: description: Intervention service type: object properties: id: type: integer description: AlayaCare service ID example: 1 external_id: type: string description: External service ID example: sor_service_external_id_1 x-nullable: true 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 items: type: array items: type: object 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: external_service_id: name: external_service_id in: query required: false type: string description: Filter by external service ID service_id: name: service_id in: query required: false type: integer description: Filter by alayacare service ID responses: ErrorResponseCareplanFeatureFlagState: description: Authorization required schema: $ref: '#/definitions/ErrorResponse' examples: application/json: code: 403 message: You do not have the required permissions to perform this action. ErrorResponseAdlsInvalidRequest: description: Invalid request schema: $ref: '#/definitions/ErrorResponse' examples: application/json: code: 400 message: service_id and external_service_id are mutually exclusive AuthChallenge: description: Authentication required. schema: $ref: '#/definitions/ErrorResponse' examples: application/json: code: 401 message: Please verify your access level for this url. ClientNotFound: description: Not found. schema: $ref: '#/definitions/ErrorResponse' examples: application/json: code: 404 message: Client not found.