{ "openapi": "3.0.0", "info": { "version": "1.0.19-oas3", "title": "AlayaCare Accounting API", "description": "**AlayaCare IDs:**\nThe following terms are used to reference IDs that identify resources in AlayaCare:\n- id\n- visit_id\n- premium_id\n- visit_premium_id\n- employee_id\n- cost_centre_id\n- client_id\n\n**External IDs**\nThe following terms are used to reference IDs that identify resources systems external to AlayaCare:\n- employee_external_id\n- client_external_id\n\nExternal IDs are required to be unique.\nNo other assumptions are made regarding their format they are treated as strings.\n", "x-jentic-source-url": "https://api.swaggerhub.com/apis/AlayaCare/accounting-api-external/1.0.19-oas3/swagger.json" }, "servers": [ { "url": "https://example.alayacare.com/ext/api/v2/accounting" } ], "paths": { "/billcodes": { "get": { "tags": [ "Bill Codes" ], "summary": "Get all Bill Codes", "parameters": [ { "name": "funder_id", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1 } }, { "name": "ids", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "integer" } } }, { "name": "code", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "search", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "sort", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "code", "name", "id", "funder_id" ] } }, { "name": "asc", "in": "query", "required": false, "schema": { "type": "boolean" } }, { "$ref": "#/components/parameters/page" }, { "$ref": "#/components/parameters/count" } ], "responses": { "200": { "description": "Collection of Bill Codes", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/PaginatedList" } ], "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/BillCodeCollectionQuerySchema" } } } } } } }, "401": { "$ref": "#/components/responses/ErrorResponseAuthentication" } } }, "post": { "tags": [ "Bill Codes" ], "summary": "Create Bill Codes", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BillCodeCreateSchema" } } } }, "responses": { "201": { "description": "Collection create a Bill Code Rates", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BillCodeScalarQuerySchema" } } } }, "401": { "$ref": "#/components/responses/ErrorResponseAuthentication" } } } }, "/billcodes/{billcode_id}": { "parameters": [ { "name": "billcode_id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "get": { "tags": [ "Bill Codes" ], "summary": "Get a Billcode", "responses": { "200": { "description": "A Billcode", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BillCodeScalarQuerySchema" } } } }, "401": { "$ref": "#/components/responses/ErrorResponseAuthentication" }, "404": { "$ref": "#/components/responses/BillCodeNotFound" } } }, "put": { "tags": [ "Bill Codes" ], "summary": "Update a Billcode", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BillCodeUpdateSchema" } } } }, "responses": { "200": { "description": "A Billcode", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BillCodeScalarQuerySchema" } } } }, "401": { "$ref": "#/components/responses/ErrorResponseAuthentication" }, "404": { "$ref": "#/components/responses/BillCodeNotFound" } } } }, "/billcodes/{billcode_id}/rates": { "parameters": [ { "name": "billcode_id", "in": "path", "required": true, "schema": { "type": "integer" } }, { "$ref": "#/components/parameters/page" }, { "$ref": "#/components/parameters/count" }, { "name": "rate", "description": "Filter by rate", "in": "query", "required": false, "schema": { "type": "number" } }, { "name": "is_time_specific_rule_applicable", "description": "Filter by whether time specific rule is applicable", "in": "query", "required": false, "schema": { "type": "boolean" } }, { "name": "units", "description": "Filter by units", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "visits", "hours", "rate" ] } } ], "get": { "tags": [ "Bill Code Rates" ], "summary": "Get all Bill Code Rates", "parameters": [ { "name": "ids", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "integer" } } }, { "name": "billcode_id", "in": "query", "required": false, "schema": { "type": "integer" } }, { "name": "search", "in": "query", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Collection of Bill Code Rates", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/PaginatedList" } ], "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/BillCodeRateQuerySchema" } } } } } } }, "401": { "$ref": "#/components/responses/ErrorResponseAuthentication" }, "404": { "$ref": "#/components/responses/BillCodeNotFound" } } }, "post": { "tags": [ "Bill Code Rates" ], "summary": "Create Bill Code Rates", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BillCodeRateCreateSchema" } } } }, "responses": { "201": { "description": "Collection create a Bill Code Rates", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BillCodeRateQuerySchema" } } } }, "401": { "$ref": "#/components/responses/ErrorResponseAuthentication" }, "404": { "$ref": "#/components/responses/BillCodeNotFound" } } } }, "/billcodes/{billcode_id}/enable": { "parameters": [ { "$ref": "#/components/parameters/billcodeId" } ], "put": { "tags": [ "Bill Codes" ], "summary": "Enable a Billcode", "responses": { "200": { "description": "A Billcode", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BillCodeCollectionQuerySchema" } } } }, "401": { "$ref": "#/components/responses/ErrorResponseAuthentication" }, "404": { "$ref": "#/components/responses/BillCodeNotFound" } } } }, "/billcodes/{billcode_id}/disable": { "parameters": [ { "$ref": "#/components/parameters/billcodeId" } ], "put": { "tags": [ "Bill Codes" ], "summary": "Disable a Billcode", "responses": { "200": { "description": "A Billcode", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BillCodeCollectionQuerySchema" } } } }, "401": { "$ref": "#/components/responses/ErrorResponseAuthentication" }, "404": { "$ref": "#/components/responses/BillCodeNotFound" } } } }, "/billcodes/{billcode_id}/rates/{billcode_rate_id}": { "parameters": [ { "$ref": "#/components/parameters/billcodeId" }, { "$ref": "#/components/parameters/billcodeRateId" } ], "get": { "tags": [ "Bill Code Rates" ], "summary": "Get a Bill Code Rate", "responses": { "200": { "description": "A Bill Code Rate", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BillCodeRateQuerySchema" } } } }, "401": { "$ref": "#/components/responses/ErrorResponseAuthentication" }, "404": { "$ref": "#/components/responses/BillCodeRateNotFound" } } }, "put": { "tags": [ "Bill Code Rates" ], "summary": "Update a Bill Code Rate", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BillCodeRateUpdateSchema" } } } }, "responses": { "200": { "description": "A Bill Code Rate", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BillCodeRateQuerySchema" } } } }, "401": { "$ref": "#/components/responses/ErrorResponseAuthentication" }, "404": { "$ref": "#/components/responses/BillCodeRateNotFound" } } }, "delete": { "tags": [ "Bill Code Rates" ], "summary": "Delete a Bill Code Rate", "responses": { "204": { "description": "Bill Code Rate deleted successfully" }, "401": { "$ref": "#/components/responses/ErrorResponseAuthentication" }, "404": { "$ref": "#/components/responses/BillCodeRateNotFound" } } } }, "/billcodes/{billcode_id}/rates/{billcode_rate_id}/rrules": { "parameters": [ { "$ref": "#/components/parameters/billcodeId" }, { "$ref": "#/components/parameters/billcodeRateId" }, { "$ref": "#/components/parameters/page" }, { "$ref": "#/components/parameters/count" } ], "get": { "tags": [ "Bill Code Rate RRules" ], "summary": "Get all Bill Code Rate Recurrence Rules", "parameters": [ { "name": "ids", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "integer" } } }, { "name": "billcode_id", "in": "query", "required": false, "schema": { "type": "integer" } }, { "name": "billcode_rate_id", "in": "query", "required": false, "schema": { "type": "integer" } }, { "name": "search", "in": "query", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Collection of Bill Code Rate Rrules", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/PaginatedList" } ], "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/BillCodeRateRRuleQuerySchema" } } } } } } }, "404": { "$ref": "#/components/responses/BillCodeRateNotFound" } } }, "post": { "tags": [ "Bill Code Rate RRules" ], "summary": "Create a Recurrence Rule for a Bill Code Rate", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BillCodeRateRRuleCreateSchema" } } } }, "responses": { "201": { "description": "Collection create a Bill Code Rates", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BillCodeRateRRuleQuerySchema" } } } }, "401": { "$ref": "#/components/responses/ErrorResponseAuthentication" }, "404": { "$ref": "#/components/responses/BillCodeRateNotFound" } } } }, "/billcodes/{billcode_id}/rates/{billcode_rate_id}/rrules/{billcode_rate_rrule_id}": { "parameters": [ { "$ref": "#/components/parameters/billcodeId" }, { "$ref": "#/components/parameters/billcodeRateId" }, { "$ref": "#/components/parameters/billcodeRateRRuleId" } ], "get": { "parameters": [ { "name": "rate", "description": "Filter by rate", "in": "query", "required": false, "schema": { "type": "number" } }, { "name": "order", "description": "Filter by order", "in": "query", "required": false, "schema": { "type": "integer" } }, { "$ref": "#/components/parameters/page" }, { "$ref": "#/components/parameters/count" } ], "tags": [ "Bill Code Rate RRules" ], "summary": "Get a Bill Code Rate Recurrence Rule", "responses": { "200": { "description": "A Bill Code Rate Recurrence Rule", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BillCodeRateRRuleQuerySchema" } } } }, "404": { "$ref": "#/components/responses/BillCodeRateRRuleNotFound" } } }, "put": { "tags": [ "Bill Code Rate RRules" ], "summary": "Update a Bill Code Rate Recurrence Rule", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BillCodeRateRRuleUpdateSchema" } } } }, "responses": { "200": { "description": "A Bill Code Rate Recurrence Rule", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BillCodeRateRRuleQuerySchema" } } } }, "404": { "$ref": "#/components/responses/BillCodeRateRRuleNotFound" } } }, "delete": { "tags": [ "Bill Code Rate RRules" ], "summary": "Delete a Bill Code Rate Recurrence Rule", "responses": { "204": { "description": "Bill Code Rate Recurrence Rule deleted successfully" }, "401": { "$ref": "#/components/responses/ErrorResponseAuthentication" }, "404": { "$ref": "#/components/responses/BillCodeRateRRuleNotFound" } } } }, "/activity_codes": { "get": { "tags": [ "Activity Codes" ], "parameters": [ { "$ref": "#/components/parameters/page" }, { "$ref": "#/components/parameters/count" }, { "name": "filter", "in": "query", "description": "Filter by activity codes Code and Description fields.", "schema": { "type": "string" } } ], "summary": "Get a list of activity codes", "responses": { "200": { "description": "A list of activity codes", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ActivityCodeList" } } } }, "401": { "$ref": "#/components/responses/ErrorResponseAuthentication" } } } }, "/cost_centres": { "get": { "tags": [ "Cost Centres" ], "parameters": [ { "$ref": "#/components/parameters/page" }, { "$ref": "#/components/parameters/count" }, { "name": "status", "in": "query", "description": "Filter by `enabled` cost centres", "schema": { "type": "string", "enum": [ "enabled", "disabled" ] } } ], "summary": "Get a list of cost centres", "responses": { "200": { "description": "A list of cost centres", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CostCentreList" } } } }, "401": { "$ref": "#/components/responses/ErrorResponseAuthentication" } } } }, "/cost_centres/{cost_centre_id}/clients": { "parameters": [ { "in": "path", "name": "cost_centre_id", "description": "Cost centre ID", "required": true, "schema": { "type": "integer", "minimum": 1 } } ], "post": { "tags": [ "Client Cost Centres" ], "summary": "Add a cost centre to a client", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CostCentreClientCreate" } } }, "description": "`client_id` and `client_external_id` are mutually exclusive, specifying both is an invalid request.\n", "required": true }, "responses": { "200": { "description": "Cost centre added to client", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CostCentreClientResponse" } } } }, "400": { "$ref": "#/components/responses/ErrorResponseCostCentreDisabled" }, "401": { "$ref": "#/components/responses/ErrorResponseAuthentication" } } } }, "/cost_centres/{cost_centre_id}/clients/{client_id}": { "parameters": [ { "in": "path", "name": "cost_centre_id", "description": "Cost centre ID", "required": true, "schema": { "type": "integer" } }, { "in": "path", "name": "client_id", "description": "Client ID", "required": true, "schema": { "type": "integer", "minimum": 1 } } ], "delete": { "tags": [ "Client Cost Centres" ], "summary": "Delete a cost centre from a client", "responses": { "204": { "description": "Cost centre deleted from client" }, "400": { "$ref": "#/components/responses/ErrorResponseClientCostCentreNotFound" }, "401": { "$ref": "#/components/responses/ErrorResponseAuthentication" } } } }, "/cost_centres/{cost_centre_id}/clients/by_id/{client_external_id}": { "parameters": [ { "in": "path", "name": "cost_centre_id", "description": "Cost centre ID", "required": true, "schema": { "type": "integer", "minimum": 1 } }, { "in": "path", "name": "client_external_id", "description": "Client external ID", "required": true, "schema": { "type": "string" } } ], "delete": { "tags": [ "Client Cost Centres" ], "summary": "Delete a cost centre from a client using external ID", "responses": { "204": { "description": "Cost centre deleted from client" }, "400": { "$ref": "#/components/responses/ErrorResponseClientCostCentreNotFound" }, "401": { "$ref": "#/components/responses/ErrorResponseAuthentication" } } } }, "/cost_centres/{cost_centre_id}/employees": { "parameters": [ { "in": "path", "name": "cost_centre_id", "description": "Cost centre ID", "required": true, "schema": { "type": "integer", "minimum": 1 } } ], "post": { "tags": [ "Employee Cost Centres" ], "summary": "Add a cost centre to an employee", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CostCentreEmployeeCreateSchema" } } }, "description": "`employee_id` and `employee_external_id` are mutually exclusive, specifying both is an invalid request.\n", "required": true }, "responses": { "200": { "description": "Cost centre added to a employee", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CostCentreEmployeeResponse" } } } }, "400": { "$ref": "#/components/responses/ErrorResponseCostCentreDisabled" }, "401": { "$ref": "#/components/responses/ErrorResponseAuthentication" } } } }, "/cost_centres/{cost_centre_id}/employees/{employee_id}": { "parameters": [ { "in": "path", "name": "cost_centre_id", "description": "Cost centre ID", "required": true, "schema": { "type": "integer", "minimum": 1 } }, { "in": "path", "name": "employee_id", "description": "Employee ID", "required": true, "schema": { "type": "integer", "minimum": 1 } } ], "delete": { "tags": [ "Employee Cost Centres" ], "summary": "Delete a cost centre from an employee", "responses": { "204": { "description": "Cost centre deleted from emplouyee" }, "400": { "$ref": "#/components/responses/ErrorResponseEmployeeCostCentreNotFound" }, "401": { "$ref": "#/components/responses/ErrorResponseAuthentication" } } } }, "/cost_centres/{cost_centre_id}/employees/by_id/{employee_external_id}": { "parameters": [ { "in": "path", "name": "cost_centre_id", "description": "Cost centre ID", "required": true, "schema": { "type": "integer", "minimum": 1 } }, { "in": "path", "name": "employee_external_id", "description": "Employee external ID", "required": true, "schema": { "type": "string" } } ], "delete": { "tags": [ "Employee Cost Centres" ], "summary": "Delete a cost centre from an employee using external ID", "responses": { "204": { "description": "Cost centre deleted from emplouyee" }, "400": { "$ref": "#/components/responses/ErrorResponseEmployeeCostCentreNotFound" }, "401": { "$ref": "#/components/responses/ErrorResponseAuthentication" } } } }, "/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" } } } }, "/premiums": { "get": { "parameters": [ { "in": "query", "name": "name", "required": false, "description": "Partial match on code", "schema": { "type": "string" } }, { "in": "query", "name": "branch_id", "description": "Filter by branch ID.", "required": false, "schema": { "type": "integer", "minimum": 1 } }, { "in": "query", "name": "excluded_ids", "description": "List of IDs for premiums to exclude from the results.", "schema": { "items": { "type": "integer" }, "type": "array" } }, { "in": "query", "name": "page", "description": "Filter by page number", "required": false, "schema": { "type": "integer", "default": 1, "minimum": 1 } }, { "in": "query", "name": "count", "description": "Number of items per page", "required": false, "schema": { "type": "integer", "default": 10 } }, { "in": "query", "name": "sort_by", "required": false, "schema": { "type": "string", "enum": [ "id" ] } }, { "in": "query", "name": "order", "description": "Order to sort by", "required": false, "schema": { "type": "string", "enum": [ "asc", "desc" ] } } ], "tags": [ "Premiums" ], "summary": "Get a list of premiums", "responses": { "200": { "description": "A list of premiums", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PremiumsList" } } } }, "401": { "$ref": "#/components/responses/ErrorResponseAuthentication" }, "403": { "$ref": "#/components/responses/ErrorResponseAccessDenied" } } }, "post": { "summary": "Create a new Premium", "tags": [ "Premiums" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PremiumCreateSchema" } } } }, "responses": { "201": { "description": "Premium Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PremiumExtendedSchema" } } } }, "401": { "$ref": "#/components/responses/ErrorResponseAuthentication" }, "403": { "$ref": "#/components/responses/ErrorResponseAccessDenied" } } } }, "/premiums/{premium_id}": { "parameters": [ { "name": "premium_id", "description": "The selected premium id", "in": "path", "required": true, "schema": { "type": "integer", "minimum": 1 } } ], "get": { "summary": "Get a specific Premium", "tags": [ "Premiums" ], "responses": { "200": { "description": "Premium", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PremiumExtendedSchema" } } } }, "401": { "$ref": "#/components/responses/ErrorResponseAuthentication" }, "403": { "$ref": "#/components/responses/ErrorResponseAccessDenied" }, "404": { "$ref": "#/components/responses/ErrorPremiumNotFound" } } }, "put": { "summary": "Update a Premium", "tags": [ "Premiums" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PremiumUpdateSchema" } } } }, "responses": { "200": { "description": "GuidPremium", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PremiumExtendedSchema" } } } }, "401": { "$ref": "#/components/responses/ErrorResponseAuthentication" }, "403": { "$ref": "#/components/responses/ErrorResponseAccessDenied" }, "404": { "$ref": "#/components/responses/ErrorPremiumNotFound" } } } }, "/premiums/{premium_id}/bill_codes": { "parameters": [ { "name": "premium_id", "description": "The selected premium id", "in": "path", "required": true, "schema": { "type": "integer", "minimum": 1 } } ], "patch": { "summary": "Add or remove from set of Bill Codes linked to a Premium", "tags": [ "Premium Bill Codes" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "bill_codes_to_add": { "type": "array", "items": { "$ref": "#/components/schemas/BillCodeStub" } }, "bill_codes_to_remove": { "type": "array", "items": { "$ref": "#/components/schemas/BillCodeStub" } } } } } } }, "responses": { "200": { "description": "Premium", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Success" } } } }, "401": { "$ref": "#/components/responses/ErrorResponseAuthentication" }, "403": { "$ref": "#/components/responses/ErrorResponseAccessDenied" }, "404": { "$ref": "#/components/responses/ErrorPremiumNotFound" } } } }, "/time_off_types": { "get": { "tags": [ "Time Off Types" ], "parameters": [ { "$ref": "#/components/parameters/page" }, { "$ref": "#/components/parameters/count" }, { "$ref": "#/components/parameters/branchId" }, { "name": "pay_schedule_time", "description": "Filter by time off type usable payable scheduled hours for payroll configuration", "in": "query", "schema": { "type": "string", "enum": [ false, "Time_Off_Pay_Code", "Visit_Pay_Code" ] } }, { "name": "employee_role", "description": "Filter by employee role, one or more using **OR**\nSee resource `roles` in `employee-api-external` for a list of available employee roles\nRefer to https://app.swaggerhub.com/apis/AlayaCare/employee-api-external for more information\n", "in": "query", "explode": true, "schema": { "type": "array", "items": { "type": "string" } } }, { "name": "employee_id", "description": "Filter by AlayaCare Employee ID\n", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1 } }, { "name": "filter", "description": "Substring search on time off type `name` and `service_code_name`", "in": "query", "required": false, "schema": { "type": "string" } } ], "summary": "Get a list of time off types\n", "responses": { "200": { "description": "A list of time off types", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TimeOffList" } } } }, "401": { "$ref": "#/components/responses/ErrorAuthentication" } } } }, "/visits/{visit_id}/premiums": { "parameters": [ { "in": "path", "name": "visit_id", "description": "AlayaCare visit ID", "required": true, "schema": { "type": "integer", "minimum": 1 } } ], "get": { "tags": [ "Visit Premiums" ], "summary": "Get a list of premiums attached to a visit", "parameters": [ { "in": "query", "name": "page", "description": "Filter by page number", "required": false, "schema": { "type": "integer", "default": 1, "minimum": 1 } }, { "in": "query", "name": "count", "description": "Number of items per page", "required": false, "schema": { "type": "integer", "default": 10 } } ], "responses": { "200": { "description": "A list of premiums attached to the visit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VisitPremiumsList" } } } }, "404": { "$ref": "#/components/responses/ErrorVisitNotFound" } } }, "post": { "tags": [ "Visit Premiums" ], "summary": "Create a visit premium", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VisitPremiumCreateSchema" } } }, "description": "Premium data", "required": true }, "responses": { "201": { "description": "Visit premium created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VisitPremiumDetails" } } } }, "401": { "$ref": "#/components/responses/ErrorResponseAuthentication" }, "404": { "$ref": "#/components/responses/ErrorVisitNotFound" }, "409": { "$ref": "#/components/responses/ErrorResponseVisitPremiumConflict" } } } }, "/visits/{visit_id}/premiums/{visit_premium_id}": { "parameters": [ { "in": "path", "name": "visit_id", "description": "AlayaCare visit ID", "required": true, "schema": { "type": "integer", "minimum": 1 } }, { "in": "path", "name": "visit_premium_id", "description": "AlayaCare visit premium ID", "required": true, "schema": { "type": "integer", "minimum": 1 } } ], "get": { "tags": [ "Visit Premiums" ], "summary": "Get the details of a single visit premium", "responses": { "200": { "description": "A visit premium", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VisitPremiumDetails" } } } }, "401": { "$ref": "#/components/responses/ErrorResponseAuthentication" }, "404": { "$ref": "#/components/responses/ErrorVisitNotFound" } } }, "put": { "tags": [ "Visit Premiums" ], "summary": "Update a visit premium", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VisitPremiumUpdateSchema" } } }, "description": "Premium data", "required": true }, "responses": { "200": { "description": "Visit premium updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VisitPremiumDetails" } } } }, "401": { "$ref": "#/components/responses/ErrorResponseAuthentication" }, "404": { "$ref": "#/components/responses/ErrorVisitNotFound" }, "409": { "$ref": "#/components/responses/ErrorResponseVisitPremiumConflict" } } }, "delete": { "tags": [ "Visit Premiums" ], "summary": "Delete a visit premium from a visit", "responses": { "204": { "description": "Visit premium successfully deleted" }, "401": { "$ref": "#/components/responses/ErrorResponseAuthentication" }, "404": { "$ref": "#/components/responses/ErrorVisitNotFound" } } } }, "/funders": { "get": { "tags": [ "Funders" ], "summary": "Get list of funders", "description": "Get a list of funders\n", "parameters": [ { "name": "funder_id", "description": "Filter by external funder id", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "alayacare_funder_id", "description": "Alayacare funder id", "in": "query", "schema": { "type": "string" } }, { "name": "service_code", "description": "Filter by service code name", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "funder_name", "in": "query", "required": false, "description": "Substring search on funder name", "schema": { "type": "string" } }, { "name": "funder_code", "in": "query", "description": "Substring search on funder code", "required": false, "schema": { "type": "string" } }, { "name": "search", "required": false, "in": "query", "description": "Substring search on name and code", "schema": { "type": "string" } }, { "name": "invoicing_model", "required": false, "in": "query", "description": "Filter by Funder invoicing model", "schema": { "$ref": "#/components/schemas/InvoicingModelField" } }, { "$ref": "#/components/parameters/page" }, { "$ref": "#/components/parameters/count" }, { "$ref": "#/components/parameters/branchId" }, { "name": "status", "description": "Filter on the funder status. This parameter is deprecated, please use the `is_disabled` parameter instead.", "in": "query", "schema": { "type": "string", "enum": [ "enabled", "disabled" ] } }, { "name": "funder_type", "in": "query", "description": "This parameter is deprecated, please use `invoicing_model` instead", "deprecated": true, "schema": { "$ref": "#/components/schemas/FunderTypeField" } } ], "responses": { "200": { "description": "The list of Funders", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FunderList" } } } }, "400": { "$ref": "#/components/responses/ErrorResponseMutuallyExclusive" }, "401": { "$ref": "#/components/responses/ErrorResponseAuthentication" } } }, "post": { "tags": [ "Funders" ], "summary": "Create a Funder", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FunderCreateSchema" } } }, "description": "The details of the created Funder", "required": true }, "responses": { "201": { "description": "Funder created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FunderScalarSchema" } } } }, "401": { "$ref": "#/components/responses/ErrorResponseAuthentication" }, "404": { "$ref": "#/components/responses/ErrorVisitNotFound" }, "409": { "$ref": "#/components/responses/ErrorResponseVisitPremiumConflict" } } }, "put": { "tags": [ "Funders" ], "summary": "Update a Funder", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FunderUpdateSchema" } } }, "description": "Funder update data", "required": true }, "responses": { "200": { "description": "Funder updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FunderScalarSchema" } } } }, "401": { "$ref": "#/components/responses/ErrorResponseAuthentication" }, "404": { "$ref": "#/components/responses/ErrorFunderNotFound" } } } }, "/funders/{funder_id}": { "parameters": [ { "name": "funder_id", "in": "path", "description": "Filter by Funder ID", "schema": { "type": "integer", "minimum": 1 }, "required": true } ], "get": { "tags": [ "Funders" ], "summary": "Get a specific Funder", "responses": { "200": { "description": "The details of the funder", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FunderScalarSchema" } } } }, "401": { "$ref": "#/components/responses/ErrorResponseAuthentication" }, "404": { "$ref": "#/components/responses/ErrorFunderNotFound" } } } }, "/evv_exports": { "get": { "tags": [ "EVV Export" ], "summary": "Get a list of EVV exports created filter by `claim_destination_system`, `export_type` and `status_of_background_jobs`", "parameters": [ { "name": "claim_destination_system", "in": "query", "description": "Claim destination system associated with the EVV Export", "schema": { "type": "string" } }, { "name": "export_type", "in": "query", "description": "Type of EVV Export", "schema": { "type": "string" } }, { "name": "status_of_background_jobs[]", "in": "query", "description": "array of statuses ('FAILURE', 'STARTED', 'SUCCESS', 'NOT_SENT', 'PENDING')", "style": "form", "explode": false, "schema": { "type": "array", "items": { "type": "string" } } } ], "responses": { "200": { "description": "A list of EVV Exports", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EVVExportList" } } } }, "401": { "$ref": "#/components/responses/ErrorResponseAuthentication" }, "403": { "$ref": "#/components/responses/ErrorResponseAccessDenied" } } }, "post": { "tags": [ "EVV Export" ], "summary": "Create an initial EVV export record for the `claim_destination_system` and `export_type` selected for a specific `branch_id` or default branch if none specified. The returned schema's `created_at` date will be used as the end of the date range for visits retrieval.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "branch_id": { "type": "integer", "description": "Branch ID", "minimum": 1 }, "claim_destination_system": { "type": "string", "description": "Claim destination system", "enum": [ "HHAeXchange", "eMedNY", "Tellus Rendered Services", "Sandata" ] }, "export_type": { "type": "string", "description": "Export type", "enum": [ "SCHEDULED", "DELETED", "MISSED", "APPROVED", "BILLED" ] }, "state": { "type": "string", "description": "Export state", "example": "NY" }, "fetch_visits_until": { "type": "string", "description": "Export until when visits were processed in UTC", "example": "2020-01-01T00:00:00+00:00" } } } } }, "description": "Branch ID, claim destination system and export type required to create the initial EVV export record.", "required": true }, "responses": { "200": { "description": "Created EVV export record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EVVExport" } } } }, "400": { "$ref": "#/components/responses/ErrorResponseInvalidEVVExportParams" }, "401": { "$ref": "#/components/responses/ErrorResponseAuthentication" }, "403": { "$ref": "#/components/responses/ErrorResponseAccessDenied" } } } }, "/evv_exports/{evv_export_id}": { "parameters": [ { "in": "path", "name": "evv_export_id", "description": "EVV export ID", "required": true, "schema": { "type": "integer", "minimum": 1 } } ], "get": { "tags": [ "EVV Export" ], "summary": "Get full EVV export record. This can be called for a \"retry export\" event, in case of initial failure.", "responses": { "200": { "description": "Full EVV export record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EVVExport" } } } }, "401": { "$ref": "#/components/responses/ErrorResponseAuthentication" }, "403": { "$ref": "#/components/responses/ErrorResponseAccessDenied" }, "404": { "$ref": "#/components/responses/ErrorResponseEVVExportNotFound" } } }, "put": { "tags": [ "EVV Export" ], "summary": "Update EVV export record. This will only be called once, after the EVV export is complete (either as success or failure), and will contain all the information about the export.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "status_of_background_job" ], "properties": { "date_sent_at": { "type": "string", "description": "Date and time the export was sent to the destination system in UTC format", "example": "2020-01-01T00:00:00+00:00" }, "number_of_visits": { "type": "integer", "description": "Number of visits included in the export file", "example": 10 }, "status_of_background_job": { "type": "string", "description": "Status of the EVV Export job", "example": "SUCCESS", "enum": [ "STARTED", "SUCCESS", "FAILURE" ] }, "url_file_location": { "type": "string", "description": "URL of file location if the export was successful", "example": "https://" }, "error_details": { "type": "string", "description": "EVV export error details", "example": "File cannot be sent - connection issues" }, "fetch_visits_from": { "type": "string", "description": "Date and time used to search visits", "example": "2020-01-01T00:00:00+00:00" }, "on_demand_request_id": { "type": "integer", "description": "On-demand request_id created during POST /evv/exports/on_demand_export_request", "example": 4015 } } } } }, "description": "Object with fields to be updated" }, "responses": { "200": { "description": "Updated EVV export record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EVVExport" } } } }, "400": { "$ref": "#/components/responses/ErrorResponseInvalidEVVExportParams" }, "401": { "$ref": "#/components/responses/ErrorResponseAuthentication" }, "403": { "$ref": "#/components/responses/ErrorResponseAccessDenied" }, "404": { "$ref": "#/components/responses/ErrorResponseEVVExportNotFound" } } } }, "/evv_exports/latest_export_date": { "get": { "tags": [ "EVV Export" ], "summary": "Get the date and time of the latest EVV export for the `branch_id`, `claim_destination_system` and `export_type` selected, returned from the record of the most recent file that was exported, regardless of its status. If no record is found a default date is returned instead.", "parameters": [ { "in": "query", "name": "branch_id", "description": "Branch ID", "required": false, "schema": { "type": "integer", "minimum": 1 } }, { "in": "query", "name": "claim_destination_system", "description": "Claim destination system", "required": true, "schema": { "type": "string", "enum": [ "HHAeXchange", "eMedNY", "Tellus Rendered Services", "Sandata" ] } }, { "in": "query", "name": "export_type", "description": "Export type", "required": true, "schema": { "type": "string", "enum": [ "SCHEDULED", "DELETED", "MISSED", "APPROVED", "BILLED" ] } }, { "in": "query", "name": "evv_export_id", "description": "existing EVVExport record", "required": false, "schema": { "type": "integer", "minimum": 1 } }, { "in": "query", "name": "state", "description": "Export state", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Latest EVV export date in UTC format for the specified `branch_id`, `claim_destination_system` and `export_type` regardless of its state, or default date if no record is found. If `evv_export_id` is specified, the date returned will be the end date of the previous EVV export record (to be used on retry).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EVVExportLatestExportDate" } } } }, "400": { "$ref": "#/components/responses/ErrorResponseInvalidEVVExportParams" }, "401": { "$ref": "#/components/responses/ErrorResponseAuthentication" }, "403": { "$ref": "#/components/responses/ErrorResponseAccessDenied" }, "404": { "$ref": "#/components/responses/ErrorResponseEVVExportNotFound" } } } }, "/evv_exports/latest_export_date/{evv_export_id}": { "parameters": [ { "in": "path", "name": "evv_export_id", "description": "existing EVVexport record", "required": true, "schema": { "type": "integer", "minimum": 1 } } ], "get": { "tags": [ "EVV Export" ], "summary": "Get the date and time of the latest EVV export using the Export ID", "description": "Returns the date and time from the record of the most recent file that was exported prior to `evv_export_id`, regardless of its status. If no record is found the default date is returned.", "responses": { "200": { "description": "End date of the latest EVV export record prior to `evv_export_id` in UTC format regardless of its state, or default date if no record is found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EVVExportLatestExportDate" } } } }, "400": { "$ref": "#/components/responses/ErrorResponseInvalidEVVExportParams" }, "401": { "$ref": "#/components/responses/ErrorResponseAuthentication" }, "403": { "$ref": "#/components/responses/ErrorResponseAccessDenied" }, "404": { "$ref": "#/components/responses/ErrorResponseEVVExportNotFound" } } } }, "/billing/cycles/": { "get": { "tags": [ "Billing Cycles" ], "summary": "Get a collection of all legacy billing cycles", "parameters": [ { "$ref": "#/components/parameters/page" }, { "$ref": "#/components/parameters/count" }, { "$ref": "#/components/parameters/sortBy" }, { "$ref": "#/components/parameters/sortOrder" }, { "$ref": "#/components/parameters/frequency" }, { "$ref": "#/components/parameters/invoiceDateFrom" }, { "$ref": "#/components/parameters/invoiceDateTo" }, { "$ref": "#/components/parameters/billingPeriodFrom" }, { "$ref": "#/components/parameters/billingPeriodTo" }, { "$ref": "#/components/parameters/branchId" }, { "$ref": "#/components/parameters/searchId" } ], "responses": { "200": { "description": "the list of payor billing cycles", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BillingCycleCollection" } } } } } } }, "/billing/cycles/{billing_period_id}": { "parameters": [ { "in": "path", "name": "billing_period_id", "description": "Billing Period ID", "required": true, "schema": { "type": "integer", "minimum": 1 } } ], "get": { "tags": [ "Billing Cycles" ], "summary": "Get a legacy billing cycle", "responses": { "200": { "description": "the bililng cycle", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BillingCycle" } } } } } } }, "/billing/periods/{billing_period_id}": { "parameters": [ { "in": "path", "name": "billing_period_id", "description": "Billing Period ID", "required": true, "schema": { "type": "integer", "minimum": 1 } } ], "get": { "tags": [ "Billing Periods" ], "summary": "Get a payor invoicing billing period", "responses": { "200": { "description": "the payor invoicing billing period", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PayorInvoicingBillingPeriod" } } } } } } }, "/billing/periods/": { "get": { "tags": [ "Billing Periods" ], "summary": "Get a collection of all payor invoicing billing periods", "parameters": [ { "$ref": "#/components/parameters/page" }, { "$ref": "#/components/parameters/count" }, { "$ref": "#/components/parameters/sortBy" }, { "$ref": "#/components/parameters/sortOrder" }, { "$ref": "#/components/parameters/frequency" }, { "$ref": "#/components/parameters/invoiceDateFrom" }, { "$ref": "#/components/parameters/invoiceDateTo" }, { "$ref": "#/components/parameters/billingPeriodFrom" }, { "$ref": "#/components/parameters/billingPeriodTo" }, { "$ref": "#/components/parameters/branchId" }, { "$ref": "#/components/parameters/searchId" } ], "responses": { "200": { "description": "the list of payor invoicing billing periods", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PayorInvoicingBillingPeriodCollection" } } } } } } }, "/billing/periods/{billing_period_id}/invoices": { "get": { "tags": [ "Billing Periods", "Invoices" ], "summary": "Fetch multiple private pay invoices", "parameters": [ { "in": "path", "name": "billing_period_id", "description": "Billing Period ID", "required": true, "schema": { "type": "integer", "minimum": 1 } }, { "$ref": "#/components/parameters/count" }, { "$ref": "#/components/parameters/page" }, { "$ref": "#/components/parameters/clientSearch" }, { "$ref": "#/components/parameters/invoiceSearch" }, { "$ref": "#/components/parameters/status" }, { "$ref": "#/components/parameters/sortOrder" }, { "$ref": "#/components/parameters/billToParty" }, { "$ref": "#/components/parameters/balanceFrom" }, { "$ref": "#/components/parameters/balanceTo" }, { "$ref": "#/components/parameters/unpaidBalance" }, { "$ref": "#/components/parameters/clientTags" }, { "$ref": "#/components/parameters/clientTagMode" }, { "name": "program_type", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "program_name_search", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "master_invoice_id", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1 } }, { "name": "sort_by", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "id", "client_last_name", "client_first_name", "client_first_name_last_name", "client_last_name_first_name", "client_id,", "bill_to_party", "master_invoice_id", "invoice_number", "balance", "total", "program_type", "status" ] } } ], "responses": { "200": { "description": "Collection of invoices", "content": { "*/*": { "schema": { "type": "object", "properties": { "page": { "type": "integer", "example": 1, "description": "The current page number", "minimum": 1 }, "count": { "type": "integer", "example": 17, "description": "Number of items in the list (all pages)" }, "items_per_page": { "type": "integer", "example": 10, "description": "number of items per page" }, "total_pages": { "type": "integer", "example": 2, "description": "The total number of pages of that size in the collection" }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/PrivateInvoicesSchema" } } } } } } } } } }, "/billing/cycles/{billing_period_id}/invoices": { "get": { "tags": [ "Billing Cycles", "Invoices" ], "summary": "Fetch multiple private pay invoices", "parameters": [ { "in": "path", "name": "billing_period_id", "description": "Billing Period ID", "required": true, "schema": { "type": "integer", "minimum": 1 } }, { "$ref": "#/components/parameters/count" }, { "$ref": "#/components/parameters/page" }, { "$ref": "#/components/parameters/clientSearch" }, { "$ref": "#/components/parameters/invoiceSearch" }, { "$ref": "#/components/parameters/status" }, { "$ref": "#/components/parameters/sortOrder" }, { "$ref": "#/components/parameters/billToParty" }, { "$ref": "#/components/parameters/balanceFrom" }, { "$ref": "#/components/parameters/balanceTo" }, { "$ref": "#/components/parameters/unpaidBalance" }, { "$ref": "#/components/parameters/clientTags" }, { "$ref": "#/components/parameters/clientTagMode" }, { "name": "program_type", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "program_name_search", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "sort_by", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "id", "client_last_name", "client_first_name", "client_first_name_last_name", "client_last_name_first_name", "client_id,", "bill_to_party", "invoice_number", "balance", "total", "program_type", "status" ] } } ], "responses": { "200": { "description": "Collection of invoices", "content": { "*/*": { "schema": { "type": "object", "properties": { "page": { "type": "integer", "example": 1, "description": "The current page number", "minimum": 1 }, "count": { "type": "integer", "example": 17, "description": "Number of items in the list (all pages)" }, "items_per_page": { "type": "integer", "example": 10, "description": "number of items per page" }, "total_pages": { "type": "integer", "example": 2, "description": "The total number of pages of that size in the collection" }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/InvoiceQuerySchema" } } } } } } } } } }, "/billing/cycles/{billing_period_id}/invoices/{invoice_id}": { "get": { "tags": [ "Billing Cycles", "Invoices" ], "summary": "Fetch a specific invoice", "parameters": [ { "in": "path", "name": "billing_period_id", "description": "Billing Period ID", "required": true, "schema": { "type": "integer", "minimum": 1 } }, { "in": "path", "name": "invoice_id", "description": "Invoice ID", "required": true, "schema": { "type": "integer", "minimum": 1 } } ], "responses": { "200": { "description": "the invoice", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvoiceQuerySchema" } } } } } } }, "/billing/cycles/invoice/{invoice_id}/details": { "get": { "tags": [ "Billing Cycles", "Invoices", "Invoice Items" ], "summary": "Fetch a specific invoice's invoice items", "parameters": [ { "in": "path", "name": "invoice_id", "description": "Invoice ID", "required": true, "schema": { "type": "integer", "minimum": 1 } } ], "responses": { "200": { "description": "the invoice", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvoiceQuerySchema" } } } } } } }, "/billing/periods/invoice/{invoice_id}/details": { "get": { "tags": [ "Billing Periods", "Invoices", "Invoice Items" ], "summary": "Fetch multiple private pay invoices", "parameters": [ { "$ref": "#/components/parameters/sortOrder" }, { "name": "invoice_id", "in": "path", "required": true, "schema": { "type": "integer", "minimum": 1 } }, { "name": "sort_by", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "id", "policy_rank" ] } } ], "responses": { "200": { "description": "the invoice", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvoiceQuerySchema" } } } } } } }, "/service_codes": { "get": { "tags": [ "Service Codes" ], "summary": "Get a list of service codes", "description": "Get a list of service codes\n", "parameters": [ { "name": "query", "description": "A query string to filter service codes. The query string can be used to filter by service code name, or description.\n", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "strict", "description": "If true, return only those service codes with bill codes related to the specified funders. If false, the search will find service codes not specifically related to the funders provided if any.\n", "in": "query", "required": false, "schema": { "type": "boolean" } }, { "name": "funder", "description": "A comma separated list of funder IDs to filter service codes by. If `strict` is true, only service codes with bill codes related to the specified funders will be returned. If `strict` is false, the search will find service codes not specifically related to the funders provided if any.\n", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "client_id", "description": "A client ID to filter service codes by.\n", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1 } }, { "name": "branch_id", "description": "A branch ID to filter service codes by.\n", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1 } }, { "name": "department_id", "description": "A department ID to filter service codes by.\n", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1 } }, { "name": "is_disabled", "description": "A boolean to filter service codes by.\n", "in": "query", "required": false, "schema": { "type": "boolean" } }, { "name": "sort_by", "description": "A field to sort service codes by.\n", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "name", "description", "branch_id" ] } }, { "name": "sort_order", "description": "A field to order service codes by.\n", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "asc", "desc" ] } }, { "name": "related_branches", "description": "A boolean to filter service codes by.\n", "in": "query", "required": false, "schema": { "type": "boolean" } }, { "name": "ancestor_branches_only", "description": "A boolean to filter service codes by.\n", "in": "query", "required": false, "schema": { "type": "boolean" } } ], "responses": { "200": { "description": "The list of service codes", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceCodeListSchema" } } } }, "400": { "$ref": "#/components/responses/ErrorResponseMutuallyExclusive" }, "401": { "$ref": "#/components/responses/ErrorResponseAuthentication" } } }, "post": { "tags": [ "Service Codes" ], "summary": "Create a service code", "description": "Create a service code\n", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceCodeCreateSchema" } } } }, "responses": { "200": { "description": "The created service code", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceCodeSchema" } } } }, "400": { "$ref": "#/components/responses/ErrorResponseInvalidServiceCodeParams" }, "401": { "$ref": "#/components/responses/ErrorResponseAuthentication" }, "403": { "$ref": "#/components/responses/ErrorResponseAccessDenied" }, "404": { "$ref": "#/components/responses/ErrorResponseServiceCodeNotFound" } } } }, "/service_codes/{service_code_id}": { "get": { "tags": [ "Service Codes" ], "summary": "Get a service code", "description": "Get a service code\n", "parameters": [ { "name": "service_code_id", "description": "Service code id", "in": "path", "required": true, "schema": { "type": "integer", "minimum": 1 } } ], "responses": { "200": { "description": "The service code", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceCodeScalarSchema" } } } }, "401": { "$ref": "#/components/responses/ErrorResponseAuthentication" }, "403": { "$ref": "#/components/responses/ErrorResponseAccessDenied" }, "404": { "$ref": "#/components/responses/ErrorResponseServiceCodeNotFound" } } }, "put": { "tags": [ "Service Codes" ], "summary": "Update a service code", "description": "Update a service code\n", "parameters": [ { "name": "service_code_id", "description": "Service code id", "in": "path", "required": true, "schema": { "type": "integer", "minimum": 1 } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceCodeEditSchema" } } } }, "responses": { "200": { "description": "The updated service code", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceCodeSchema" } } } }, "400": { "$ref": "#/components/responses/ErrorResponseInvalidServiceCodeParams" }, "401": { "$ref": "#/components/responses/ErrorResponseAuthentication" }, "403": { "$ref": "#/components/responses/ErrorResponseAccessDenied" }, "404": { "$ref": "#/components/responses/ErrorResponseServiceCodeNotFound" } } } }, "/accounts": { "get": { "tags": [ "Accounts" ], "summary": "Get a list of accounts", "parameters": [ { "name": "id", "description": "Filter by account id", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1 } }, { "name": "search", "description": "Filter by account name", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "types", "description": "Filter by account type", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "bank", "expense", "receivables", "liability", "revenue" ] } }, { "name": "is_disabled", "description": "Filter by account status", "in": "query", "required": false, "schema": { "type": "boolean" } }, { "name": "branch_ids", "description": "Filter by branch id", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "integer", "minimum": 1 } } }, { "name": "sort_by", "description": "Field to sort by", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "name", "gl_number", "type" ] } }, { "name": "sort_order", "description": "Order to sort by", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "ASC", "DESC" ] } } ], "responses": { "200": { "description": "A list of accounts", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AccountList" } } } }, "401": { "$ref": "#/components/responses/ErrorResponseAuthentication" } } }, "post": { "tags": [ "Accounts" ], "summary": "Create an account", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "Account name", "example": "Account Name" }, "gl_number": { "type": "string", "description": "Account GL number", "example": "123456" }, "type": { "type": "string", "enum": [ "bank", "expense", "receivables", "liability", "revenue" ], "description": "Account type", "example": "bank" } } } } }, "description": "Object with fields to be updated" }, "responses": { "200": { "description": "Created account", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Account" } } } }, "400": { "$ref": "#/components/responses/ErrorResponseInvalidAccountParams" }, "401": { "$ref": "#/components/responses/ErrorResponseAuthentication" }, "403": { "$ref": "#/components/responses/ErrorResponseAccessDenied" } } } }, "/accounts/{id}": { "get": { "tags": [ "Accounts" ], "summary": "Get an account", "parameters": [ { "name": "id", "description": "Account ID", "in": "path", "required": true, "schema": { "type": "integer", "minimum": 1 } } ], "responses": { "200": { "description": "An account", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Account" } } } }, "401": { "$ref": "#/components/responses/ErrorResponseAuthentication" }, "403": { "$ref": "#/components/responses/ErrorResponseAccessDenied" } } }, "put": { "tags": [ "Accounts" ], "summary": "Update an account", "parameters": [ { "name": "id", "description": "Account ID", "in": "path", "required": true, "schema": { "type": "integer", "minimum": 1 } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "Account name", "example": "Account Name" }, "gl_number": { "type": "string", "description": "Account GL number", "example": "123456" } } } } }, "description": "Object with fields to be updated" }, "responses": { "200": { "description": "Updated account", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Account" } } } }, "400": { "$ref": "#/components/responses/ErrorResponseInvalidAccountParams" }, "401": { "$ref": "#/components/responses/ErrorResponseAuthentication" }, "403": { "$ref": "#/components/responses/ErrorResponseAccessDenied" } } } }, "/transactions": { "get": { "tags": [ "Transactions" ], "summary": "Returns a collection of transactions", "parameters": [ { "name": "transaction_ids", "description": "A list of transaction IDs to filter by", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "integer", "minimum": 1 } } }, { "name": "exclude_ids", "description": "A list of transaction IDs to exclude from the results", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "integer", "minimum": 1 } } }, { "name": "reference_id", "description": "The Reference ID of the transaction to find", "in": "query", "schema": { "type": "integer" } }, { "name": "type", "description": "The type of transactions to list", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "reversed", "description": "Whether to include reversed transactions or not", "in": "query", "required": false, "schema": { "type": "boolean", "default": false } }, { "name": "ar_entry_type", "in": "query", "description": "The transaction's entry type to filter by.", "schema": { "type": "string", "enum": [ "credit", "debit" ] } }, { "name": "ar_description", "in": "query", "description": "The transaction's description to filter by.", "required": false, "schema": { "type": "string" } }, { "name": "invoice_number", "in": "query", "description": "The invoice number to filter the transactions by", "schema": { "type": "string" } }, { "name": "search", "description": "The Reference ID of the transaction or the Invoice Number to find", "in": "query", "allowEmptyValue": true, "required": false, "schema": { "type": "string" } }, { "name": "invoice_id", "description": "The invoice ID to filter the transactions by", "in": "query", "allowEmptyValue": true, "required": false, "schema": { "type": "integer", "minimum": 1 } }, { "name": "invoice_item_ids", "description": "The invoice item IDs to filter the transactions by", "in": "query", "allowEmptyValue": true, "required": false, "schema": { "type": "array", "items": { "type": "integer", "minimum": 1 } } }, { "name": "client_id", "description": "The client ID to filter by", "in": "query", "allowEmptyValue": true, "required": false, "schema": { "type": "integer", "minimum": 1 } }, { "name": "funder_id", "description": "The funder ID to filter by", "in": "query", "allowEmptyValue": true, "required": false, "schema": { "type": "integer", "minimum": 1 } }, { "name": "billing_contact_id", "description": "The billing contact ID to filter by", "in": "query", "allowEmptyValue": true, "required": false, "schema": { "type": "integer", "minimum": 1 } }, { "name": "transaction_date_from", "description": "The date after which transactions should be filtered (inclusive) - ex. 2024-01-31", "in": "query", "allowEmptyValue": true, "required": false, "schema": { "type": "string", "format": "date" } }, { "name": "transaction_date_to", "description": "The date before which transactions should be filtered (exclusive) - ex. 2024-01-31", "in": "query", "allowEmptyValue": true, "required": false, "schema": { "type": "string", "format": "date" } }, { "name": "memo", "description": "String for which to search (partial) in the transaction memo", "in": "query", "required": false, "allowEmptyValue": false, "schema": { "type": "string" } }, { "name": "client_search", "description": "The name or the id of the client (partial)", "in": "query", "allowEmptyValue": true, "required": false, "schema": { "type": "string" } }, { "name": "date_from", "description": "The posting date after which transactions should be filtered (inclusive) - ex. 2024-01-31", "in": "query", "allowEmptyValue": true, "required": false, "schema": { "type": "string", "format": "date" } }, { "name": "date_to", "description": "The posting date before which transactions should be filtered (inclusive) - ex. 2024-01-31", "in": "query", "allowEmptyValue": true, "required": false, "schema": { "type": "string", "format": "date" } }, { "name": "account_name", "description": "The name of the account to filter by", "in": "query", "allowEmptyValue": true, "required": false, "schema": { "type": "string" } }, { "name": "account_number", "description": "The number of the account to filter by", "in": "query", "allowEmptyValue": true, "required": false, "schema": { "type": "string" } }, { "name": "account_ids", "description": "The account IDs to filter by", "in": "query", "allowEmptyValue": true, "required": false, "schema": { "type": "array", "items": { "type": "integer", "minimum": 1 } } }, { "name": "adjusted", "description": "Whether or not the transaction has an adjustment allocated to it.", "in": "query", "required": false, "allowEmptyValue": false, "schema": { "type": "boolean" } }, { "name": "include_medicaid", "description": "Whether or not to include medicaid funders. Defaults to True", "in": "query", "required": false, "schema": { "type": "boolean" } }, { "name": "include_ccac", "description": "Whether or not to include CCAC funders. Defaults to True", "in": "query", "required": false, "schema": { "type": "boolean" } }, { "name": "include_allocated", "in": "query", "description": "Whether to include allocated transactions or not", "schema": { "type": "boolean", "default": true } }, { "name": "include_voided_sales", "in": "query", "description": "True to included voided sales; False to exclude them. Defaults to true", "schema": { "type": "boolean" } }, { "name": "only_without_allocations", "in": "query", "description": "True to select only the transactions that do not have allocations (in this case, note that reverted allocations are considered as non-existent); False to select the transactions no matter their number of allocations. Defaults to False.", "schema": { "type": "boolean", "default": false } }, { "name": "include_canceled_payments", "in": "query", "description": "True to include canceled payments; False to exclude them. Defaults to true", "schema": { "type": "boolean", "default": true } }, { "name": "order", "description": "Field on which to sort the results", "in": "query", "schema": { "type": "string", "enum": [ "posting_date", "unallocated_amount", "client_name", "id" ] } }, { "name": "include_account", "description": "Whether to include the account information in the response", "in": "query", "schema": { "type": "boolean", "default": false } }, { "name": "asc", "description": "Whether to sort ascendingly, defaults to false", "in": "query", "schema": { "type": "boolean", "default": false } }, { "name": "page", "description": "Page to retrieve", "in": "query", "required": false, "schema": { "type": "integer" } }, { "name": "count", "description": "Number of items per page", "in": "query", "required": false, "schema": { "type": "integer", "default": 10 } } ], "responses": { "200": { "description": "List of transactions", "content": { "application/json": { "schema": { "type": "object", "properties": { "page": { "type": "integer", "example": 1, "description": "The current page number" }, "count": { "type": "integer", "example": 10, "description": "Number of items in the list" }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/TransactionSchema" } } } } } } } } } }, "/transactions/{id}": { "get": { "tags": [ "Transactions" ], "summary": "Find transaction by ID", "description": "Returns a single transaction", "parameters": [ { "name": "id", "in": "path", "description": "Reference ID of transaction to return", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "200": { "description": "The transaction retrieved", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionExtendedSchema" } } } }, "404": { "$ref": "#/components/responses/TransactionNotFound" } } } } }, "components": { "parameters": { "id": { "in": "path", "name": "id", "description": "The program billing period id", "required": true, "schema": { "type": "integer", "minimum": 1 } }, "page": { "description": "Filter by page number.", "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "default": 1, "minimum": 1 } }, "count": { "description": "Number of items per page.", "name": "count", "in": "query", "required": false, "schema": { "type": "integer", "default": 100 } }, "branchId": { "description": "Filter by branch ID", "name": "branch_id", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1 } }, "sortBy": { "in": "query", "name": "sort_by", "description": "Field to sort by", "required": false, "schema": { "type": "string", "enum": [ "start_date", "end_date", "invoice_date" ], "default": "start_date" } }, "sortOrder": { "in": "query", "name": "sort_order", "description": "Order to sort by", "required": false, "schema": { "type": "string", "enum": [ "ASC", "DESC" ], "default": "ASC" } }, "frequency": { "in": "query", "name": "frequency", "description": "Returns all billing periods with that frequency.", "required": false, "schema": { "type": "integer", "enum": [ 1, 2, 3 ] } }, "invoiceDateFrom": { "in": "query", "name": "invoice_date_from", "description": "Returns all billing periods using that Invoice Date within the date range.", "required": false, "schema": { "type": "string", "format": "date" } }, "invoiceDateTo": { "in": "query", "name": "invoice_date_to", "description": "Returns all billing periods using that Invoice Date within the date range.", "required": false, "schema": { "type": "string", "format": "date" } }, "billingPeriodFrom": { "in": "query", "name": "billing_period_from", "description": "Returns all billing periods that overlap with the entered date range.", "required": false, "schema": { "type": "string", "format": "date" } }, "billingPeriodTo": { "in": "query", "name": "billing_period_to", "description": "Returns all billing periods that overlap with the entered date range.", "required": false, "schema": { "type": "string" } }, "searchId": { "in": "query", "name": "search_id", "description": "Partial search on the id field.", "required": false, "schema": { "type": "integer" } }, "clientSearch": { "name": "client_search", "in": "query", "required": false, "schema": { "type": "string" } }, "invoiceSearch": { "name": "invoice_search", "in": "query", "required": false, "schema": { "type": "string" } }, "billToParty": { "name": "bill_to_party", "in": "query", "required": false, "schema": { "type": "string" } }, "balanceFrom": { "name": "balance_from", "in": "query", "required": false, "schema": { "type": "number" } }, "balanceTo": { "name": "balance_to", "in": "query", "required": false, "schema": { "type": "number" } }, "unpaidBalance": { "name": "unpaid_balance", "in": "query", "required": false, "schema": { "type": "boolean" } }, "clientTags": { "name": "client_tags", "in": "query", "required": false, "style": "form", "explode": false, "schema": { "type": "array", "items": { "type": "string" } } }, "clientTagMode": { "name": "client_tag_mode", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "all", "any" ] } }, "status": { "name": "status", "in": "query", "required": false, "style": "form", "explode": false, "schema": { "type": "array", "items": { "type": "string", "enum": [ "draft", "revised", "sent", "void", "deleted", "copy", "paid", "written_off", "suspended", "rejected" ] } } }, "invoiceNumber": { "name": "invoice_number", "in": "query", "required": false, "schema": { "type": "string" } }, "billingPeriodId": { "name": "billing_period_id", "in": "query", "required": true, "schema": { "type": "integer", "minimum": 1 } }, "billcodeId": { "name": "billcode_id", "in": "path", "required": true, "schema": { "type": "integer" } }, "billcodeRateId": { "name": "billcode_rate_id", "in": "path", "required": true, "schema": { "type": "integer" } }, "billcodeRateRRuleId": { "name": "billcode_rate_rrule_id", "in": "path", "required": true, "schema": { "type": "integer" } } }, "responses": { "BillCodeNotFound": { "description": "The Billcode referenced by id was not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFound" } } } }, "BillCodeRateNotFound": { "description": "The Bill Code Rate Recurrence Rule referenced by id was not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFound" } } } }, "BillCodeRateRRuleNotFound": { "description": "The Bill Code Rate Recurrence Rule referenced by id was not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFound" } } } }, "ErrorFunderNotFound": { "description": "The funder referenced by id was not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "examples": { "response": { "value": { "code": "404", "message": "Funder not found" } } } } } }, "ErrorResponseAuthentication": { "description": "Authorization required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "examples": { "response": { "value": { "code": "401", "message": "Authorization required." } } } } } }, "ErrorAuthentication": { "description": "Authorization required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "examples": { "response": { "value": { "code": "401", "message": "Authorization required" } } } } } }, "ErrorResponseAccessDenied": { "description": "Access denied", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "examples": { "response": { "value": { "code": "403", "message": "You do not have the required permissions to perform this action" } } } } } }, "ErrorVisitNotFound": { "description": "The visit referenced by visit_id was not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "examples": { "response": { "value": { "code": "404", "message": "Visit not found" } } } } } }, "ErrorPremiumNotFound": { "description": "The premium referenced by visit_id was not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "examples": { "response": { "value": { "code": "404", "message": "Premium not found" } } } } } }, "ErrorResponseVisitPremiumConflict": { "description": "Conflict", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "examples": { "response": { "value": { "code": "409", "message": "The funding configuration of this premium does not match that of the visit" } } } } } }, "ErrorResponseCostCentreDisabled": { "description": "The cost centre referenced by cost_centre_id is disabled", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "examples": { "response": { "value": { "code": "400", "message": "Cost centre is disabled" } } } } } }, "ErrorResponseClientCostCentreNotFound": { "description": "The client with the referenced cost_centre_id was not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "examples": { "response": { "value": { "code": "400", "message": "Client with ID 1010 and Cost Centre ID 10 not found" } } } } } }, "ErrorResponseEmployeeCostCentreNotFound": { "description": "The employee with the referenced cost_centre_id was not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "examples": { "response": { "value": { "code": "400", "message": "Employee with ID 1010 and Cost Centre ID 10 not found" } } } } } }, "ErrorResponseMutuallyExclusive": { "description": "Mutually exclusive", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "examples": { "response": { "value": { "code": 400, "message": "funder_id and alayacare_funder_id are mutually exclusive" } } } } } }, "ErrorResponseInvalidEVVExportParams": { "description": "Invalid Claim destination system or Export type parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "examples": { "response": { "value": { "code": "400", "message": "Invalid request" } } } } } }, "ErrorResponseEVVExportNotFound": { "description": "The EVV export record for the referenced `evv_export_id` param was not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "examples": { "response": { "value": { "code": "404", "message": "EVVExport record not found" } } } } } }, "ErrorResponseInvalidAccountParams": { "description": "Invalid account parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "ErrorResponseServiceCodeNotFound": { "description": "The service code referenced by id was not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "ErrorResponseInvalidServiceCodeParams": { "description": "Invalid service code parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "TransactionNotFound": { "description": "Transaction not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFound" } } } } }, "securitySchemes": { "basic_auth": { "type": "http", "description": "Basic HTTP auth over https", "scheme": "basic" } }, "schemas": { "InvoicingModelField": { "type": "string", "description": "Invoicing Model used by the Funder\n\n* batched -> All Client Visits roll up to 1 Invoice for the Payor\n* funder_individual -> One Invoice per Client is sent to the Payor\n* individual_invoices -> One Invoice per Client is sent to the Client or Billing Contact\n* hcp -> invoicing_model specific for Australian Home Care Packages program\n* mecicaid -> Each Date of Service or Visit creates 1 Invoice\n* ccac -> CHRIS/HPG/LHIN invoicing model - Each Visit creates 1 Invoice.\n All Invoices for 1 payor are batched into 1 submission to the payor\n", "enum": [ "batched", "funder_individual", "individual_invoices", "ccac", "medicaid", "hcp", "ndis" ] }, "FunderTypeField": { "type": "string", "description": "Provided for backwards compatibility, equivalent to `invoicing_model`\nbut mapping different values\n\nThe following three mappings are different:\n* client_individual -> individual_invoices\n* electronic_billing -> medicaid\n* funder_batched -> batched\n\nThe following mappings remain the same:\n* funder_individual\n* ccac\n* hcp\n", "enum": [ "funder_individual", "client_individual", "electronic_billing", "funder_batched", "ccac", "hcp" ] }, "FunderCreateSchema": { "anyOf": [ { "$ref": "#/components/schemas/FunderCommonCreateSchema" }, { "$ref": "#/components/schemas/FunderElectronicBillingCreateSchema" }, { "$ref": "#/components/schemas/FunderHcpCreateSchema" }, { "$ref": "#/components/schemas/FunderCcacCreateSchema" } ] }, "FunderUpdateSchema": { "anyOf": [ { "$ref": "#/components/schemas/FunderCommonUpdateSchema" }, { "$ref": "#/components/schemas/FunderElectronicBillingUpdateSchema" }, { "$ref": "#/components/schemas/FunderHcpUpdateSchema" }, { "$ref": "#/components/schemas/FunderCcacUpdateSchema" } ] }, "FunderBaseCreateSchema": { "allOf": [ { "$ref": "#/components/schemas/FunderBaseUpdateSchema" }, { "type": "object", "properties": { "branch_id": { "type": "integer", "description": "The ID of the branch to which this funder belongs", "example": 1, "minimum": 1 } } } ] }, "FunderBaseUpdateSchema": { "type": "object", "description": "Fields shared by create requests for all invoicing_model types", "properties": { "code": { "type": "string", "example": "Code" }, "description": { "type": "string", "example": "Description" }, "gl_asset": { "$ref": "#/components/schemas/LinkedEntitySchema" }, "gl_bank": { "$ref": "#/components/schemas/LinkedEntitySchema" }, "holiday_multiplier": { "type": "number", "example": "1.00" }, "invoicing_model": { "$ref": "#/components/schemas/InvoicingModelField" }, "name": { "type": "string", "example": "Name" }, "profile": { "$ref": "#/components/schemas/ProfileSchema" }, "taxes": { "type": "array", "items": { "$ref": "#/components/schemas/FunderTaxesItemSchema" } }, "gl_receivables_cost_centre": { "$ref": "#/components/schemas/CostCentreSchema" }, "gl_bank_cost_centre": { "$ref": "#/components/schemas/CostCentreSchema" }, "line_item_limit": { "type": "number", "example": 76 } } }, "FunderCommonUpdateFieldsSchema": { "type": "object", "properties": { "allow_paypal_payment": { "type": "boolean", "example": false }, "agency_profile": { "type": "string", "example": "Agency profile" }, "billing_contact": { "type": "string", "example": "Billing contact" }, "billing_adjustment_period": { "type": "integer", "example": 30 }, "organization_name": { "type": "string", "example": "Organization name" }, "organization_code": { "type": "string", "example": "Organization code" }, "billing_frequency": { "type": "string", "example": "weekly", "enum": [ "no_frequency", "weekly", "calendar_month" ] } } }, "FunderCommonCreateSchema": { "description": "Update requests for 'batched', 'funder_individual' and 'individual_invoices' invoicing model types", "allOf": [ { "$ref": "#/components/schemas/FunderBaseCreateSchema" }, { "$ref": "#/components/schemas/FunderCommonUpdateFieldsSchema" } ] }, "FunderCommonUpdateSchema": { "description": "Update requests for 'batched', 'funder_individual' and 'individual_invoices' invoicing model types", "allOf": [ { "$ref": "#/components/schemas/FunderBaseUpdateSchema" }, { "$ref": "#/components/schemas/FunderCommonUpdateFieldsSchema" } ] }, "FunderCcacUpdateFieldsSchema": { "type": "object", "properties": { "ccac_code": { "type": "string", "example": "GT" }, "ccac_name": { "type": "string", "example": "Central CCAC" }, "organization_code": { "type": "string", "example": "org_code" }, "organization_name": { "type": "string", "example": "Green Cross Inc." }, "billing_frequency": { "type": "string", "example": "weekly", "enum": [ "none", "weekly", "calendar_month" ] }, "file_name_prefix": { "type": "string", "example": "GT" } } }, "FunderCcacCreateSchema": { "description": "Create requests for Funders with 'ccac' invoicing_model type", "allOf": [ { "$ref": "#/components/schemas/FunderBaseCreateSchema" }, { "$ref": "#/components/schemas/FunderCcacUpdateFieldsSchema" } ] }, "FunderCcacUpdateSchema": { "description": "Create requests for Funders with 'ccac' invoicing_model type", "allOf": [ { "$ref": "#/components/schemas/FunderBaseUpdateSchema" }, { "$ref": "#/components/schemas/FunderCcacUpdateFieldsSchema" } ] }, "FunderElectronicBillingCreateSchema": { "description": "Create request for Funder with 'medicaid' invoicing_model type", "allOf": [ { "$ref": "#/components/schemas/FunderBaseCreateSchema" }, { "$ref": "#/components/schemas/FunderElectronicBillingUpdateFieldsSchema" } ] }, "FunderElectronicBillingUpdateSchema": { "description": "Create request for Funder with 'medicaid' invoicing_model type", "allOf": [ { "$ref": "#/components/schemas/FunderBaseUpdateSchema" }, { "$ref": "#/components/schemas/FunderElectronicBillingUpdateFieldsSchema" } ] }, "FunderElectronicBillingUpdateFieldsSchema": { "type": "object", "required": [ "payer_code", "payer_name", "provider_name", "payer_electronic_transmitter_id", "provider_electronic_transmitter_id", "provider_tax_id" ], "properties": { "organization_code": { "type": "string", "example": 23678 }, "organization_name": { "type": "string", "example": "Green Cross Inc." }, "payer_code": { "type": "string", "example": "PYRCD" }, "payer_name": { "type": "string", "example": "Senior Whole Health" }, "provider_code": { "type": "string", "example": 1425636511 }, "provider_code_api": { "type": "string", "example": 123456789 }, "send_provider_code_as": { "type": "string", "example": "npi", "enum": [ "npi", "api" ] }, "provider_name": { "type": "string", "example": "Care provider" }, "payer_electronic_transmitter_id": { "type": "string", "example": 238561 }, "provider_electronic_transmitter_id": { "type": "string", "example": 841263 }, "provider_tax_id": { "type": "string", "example": 231424221 }, "provider_taxonomy_code": { "type": "string", "example": "251E00000X" }, "business_entity_id": { "type": "string", "example": "211312312LL" }, "uses_bank": { "type": "boolean", "example": true }, "send_bill_code_description": { "type": "string", "example": "bill_code_description", "enum": [ "bill_code_description", "visit_start_and_end_time", "do_not_send" ] }, "supervising_provider_secondary": { "type": "boolean", "example": true }, "claim_type": { "type": "string", "example": "institutional", "enum": [ "institutional", "professional" ] }, "claim_breakdown_frequency": { "type": "string", "example": "weekly", "enum": [ "lifetime", "daily", "weekly", "calendar_month" ] }, "end_of_week": { "type": "string", "example": "Monday", "enum": [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ] }, "clearing_house": { "description": "Claim destination system for initial billing", "type": "string", "example": "waystar", "enum": [ "waystar", "tellus", "hhax", "tellus_rs" ] }, "rebill_clearing_house": { "description": "Claim destination system for re-billing", "type": "string", "example": "waystar", "enum": [ "waystar", "tellus", "hhax", "tellus_rs" ] }, "evv_destination_system": { "description": "EVV destination system", "type": "string", "example": "sandata", "enum": [ "None", "sandata", "emed_ny", "vesta", "tellus_rs", "hhax" ] }, "export_type": { "description": "Export type for initial billing", "type": "string", "example": "manual", "enum": [ "manual", "electronic", "claim_pdf" ] }, "rebill_export_type": { "description": "Export type for re-billing", "type": "string", "example": "manual", "enum": [ "manual", "electronic", "claim_pdf" ] }, "export_template": { "description": "Export template for initial billing", "type": "string", "example": "cms_1500_no_background", "enum": [ "cms_1500_no_background", "cms_1500_with_background" ] }, "rebill_export_template": { "description": "Export template for re-billing", "type": "string", "example": "cms_1500_no_background", "enum": [ "cms_1500_no_background", "cms_1500_with_background" ] }, "referring_provider": { "type": "string", "example": "agency_at_claim_level", "enum": [ "agency_at_claim_level", "agency_at_service_line_level", "contact_at_claim_level", "contact_at_service_line_level", "do_not_send" ] }, "rendering_provider": { "type": "string", "example": "agency_at_service_line_level", "enum": [ "agency_at_claim_level", "agency_at_service_line_level", "contact_at_claim_level", "contact_at_service_line_level", "employee_at_service_line_level", "do_not_send" ] }, "supervising_provider": { "type": "string", "example": "agency_at_claim_level", "enum": [ "agency_at_claim_level", "contact_at_claim_level", "contact_at_service_line_level", "do_not_send" ] }, "operating_provider": { "type": "string", "example": "do_not_send", "enum": [ "agency_at_claim_level", "agency_at_service_line_level", "contact_at_claim_level", "contact_at_service_line_level", "do_not_send" ] }, "ordering_provider": { "type": "string", "example": "contact_at_service_line_level", "enum": [ "agency_at_service_line_level", "contact_at_service_line_level", "do_not_send" ] }, "attending_provider": { "type": "string", "example": "contact_at_claim_level", "enum": [ "agency_at_claim_level", "contact_at_claim_level", "do_not_send" ] }, "service_facility": { "type": "string", "example": "agency_at_claim_level", "enum": [ "agency_at_claim_level", "agency_at_service_line_level", "client_at_claim_level", "client_at_service_line_level", "do_not_send" ] }, "ambulance_location": { "type": "boolean", "example": true }, "attach_claim_documentation": { "type": "boolean", "example": true }, "attachment_report_type": { "type": "string", "enum": [ "IR", "LA", "M1", "MT", "NN", "OB", "OC", "OD", "OE", "OX", "OZ", "P4", "P5", "PE", "PN", "PO", "PQ", "PY", "PZ", "RB", "RR", "RT", "RX", "SG", "V5", "XP" ], "example": "IR" }, "transmission_method": { "type": "string", "enum": [ "AA", "BM", "EL", "EM", "FT", "FX" ], "example": "FX" }, "send_patient_injury_info": { "type": "boolean", "example": true }, "plan_id": { "type": "string", "enum": [ "10", "18", "19", "1A", "1E", "1P", "2Q", "31", "33", "34", "36", "37", "3G", "3H", "40", "42", "43", "44", "45", "46", "47", "4F", "4G", "4H", "50", "52", "53", "5A", "5B", "63", "66", "67", "69", "6C", "6F", "6G", "71", "72", "79", "7G", "7H", "7P", "7Q", "7R", "7S", "7V", "7Z", "82", "83", "85", "86", "8G", "8H", "8J", "8K", "8L", "8R", "8S", "8T", "90", "93", "95", "9F", "9H", "9J", "9K", "C1", "C2", "C3", "C4", "C5", "CCCP", "FMSP", "H1", "H2", "H3", "H4", "H5", "H6", "H7", "H8", "H9", "HA", "K1", "K2", "K3", "K4", "K5", "K6", "K7", "K8", "K9", "KA", "KB", "KC", "KD", "KE", "KF", "KG", "KH", "KJ", "KL", "KM", "KN", "KP", "KQ", "KR", "KS", "KT", "KU", "KV", "MEDA", "MEDF", "N1", "N2", "N3", "N4", "NONE", "SLTC", "SMMA", "W2", "W3", "W4", "W5", "W6" ], "example": "MEDA" }, "program_id": { "type": "string", "enum": [ "590-CCSP", "660-ICWP", "680-NOW", "681-COMP", "930-SOURCE", "971-GAPP", "AD", "CDD", "DDAD", "DDAID", "F", "FLCF", "FLFD", "FLIB", "FLLC", "FLLT", "FLME", "FLMF", "FLMM", "FLMW", "FLPA", "FLTB", "I", "J", "L", "M", "N", "PA67", "PAAA", "PAAC", "PAAG", "PAAI", "PACE", "PACH", "PACL", "PACO", "PACW", "PAFD", "PAIN", "PAMC", "PAOB", "PASS", "PAWI" ], "example": "PACL" }, "delivery_system": { "type": "string", "enum": [ "FFFS", "MCOR" ], "example": "FFFS" }, "timely_filing_window": { "type": "string", "enum": [ "10", "30", "60", "90", "120", "180", "365", "none" ], "example": "30" }, "tenant_qualifier": { "type": "string", "example": "ZZ" }, "tenant_id": { "type": "string", "example": 702765200 }, "clearing_house_qualifier": { "type": "string", "example": "ZZ" }, "rebill_clearing_house_qualifier": { "type": "string", "example": "ZZ" }, "clearing_house_id": { "type": "string", "example": "ZIRMED" }, "rebill_clearing_house_id": { "type": "string", "example": "ZIRMED" }, "claim_grouping_methodology": { "type": "string", "example": "details_with_modifier", "enum": [ "details_no_modifier", "details_with_modifier", "group_by_date" ] }, "referring_provider_code": { "type": "string", "example": 123456789 }, "referring_provider_qualifier": { "type": "string", "example": "XX" }, "ordering_provider_code": { "type": "string", "example": 123456789 }, "ordering_provider_qualifier": { "type": "string", "example": "XX" }, "rendering_provider_code": { "type": "string", "example": 123456789 }, "rendering_provider_qualifier": { "type": "string", "example": "XX" }, "operating_provider_code": { "type": "string", "example": 123456789 }, "operating_provider_qualifier": { "type": "string", "example": "XX" }, "attending_provider_code": { "type": "string", "example": 123456789 }, "attending_provider_qualifier": { "type": "string", "example": "XX" }, "relase_of_information_code": { "type": "string", "enum": [ "Y", "I" ] } } }, "FunderHcpCreateSchema": { "description": "Create request for Funder with 'hcp' invoicing_model type", "allOf": [ { "$ref": "#/components/schemas/FunderBaseCreateSchema" }, { "$ref": "#/components/schemas/FunderHcpUpdateFieldsSchema" } ] }, "FunderHcpUpdateSchema": { "description": "Create request for Funder with 'hcp' invoicing_model type", "allOf": [ { "$ref": "#/components/schemas/FunderBaseUpdateSchema" }, { "$ref": "#/components/schemas/FunderHcpUpdateFieldsSchema" } ] }, "FunderHcpUpdateFieldsSchema": { "type": "object", "required": [ "organization_code", "organization_name", "unearned_revenue_account_id" ], "properties": { "organization_code": { "type": "integer", "example": 1 }, "organization_name": { "type": "integer", "example": 1 }, "recognized_revenue_account_id": { "type": "integer", "example": 1 }, "unearned_revenue_account_id": { "type": "integer", "example": 1 } } }, "CostCentre": { "description": "Details of a cost centre", "type": "object", "properties": { "description": { "type": "string", "description": "Cost centre description", "example": "Montreal" }, "id": { "type": "integer", "description": "Cost centre ID", "example": 2, "minimum": 1 }, "number": { "type": "string", "description": "Cost centre number for display in-app", "example": "5555" }, "status": { "type": "string", "description": "Cost centre status", "example": "enabled" } }, "nullable": true }, "ActivityCode": { "description": "Details of a cost centre", "type": "object", "properties": { "description": { "type": "string", "description": "Activity Code description", "example": "Some description" }, "id": { "type": "integer", "description": "Activity Code ID", "example": 2 }, "code": { "type": "string", "description": "Activity Code code field", "example": "5555" }, "branch": { "$ref": "#/components/schemas/BranchSummary" } }, "nullable": true }, "ActivityCodeList": { "allOf": [ { "$ref": "#/components/schemas/PaginatedList" } ], "description": "Paginated list of activity codes", "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/ActivityCode" } } } }, "CostCentreList": { "allOf": [ { "$ref": "#/components/schemas/PaginatedList" } ], "description": "Paginated list of cost centres", "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/CostCentre" } } } }, "CostCentreClientCreate": { "type": "object", "properties": { "client_id": { "type": "integer", "description": "client ID", "example": 1010, "minimum": 1 }, "client_external_id": { "type": "string", "description": "client external ID", "example": "john.1010" } } }, "CostCentreClientResponse": { "description": "Client to cost centre link", "type": "object", "properties": { "client_id": { "type": "integer", "description": "client ID", "example": 1010, "minimum": 1 }, "cost_centre_id": { "type": "integer", "description": "Cost centre ID", "example": 10, "minimum": 1 } } }, "CostCentreEmployeeCreateSchema": { "type": "object", "properties": { "employee_id": { "type": "integer", "description": "Employee ID", "example": 1010, "minimum": 1 }, "employee_external_id": { "type": "string", "description": "Employee external ID", "example": "john.1010" } } }, "CostCentreEmployeeResponse": { "description": "Employee to cost centre link", "type": "object", "properties": { "employee_id": { "type": "integer", "description": "Employee ID", "example": 1010, "minimum": 1 }, "cost_centre_id": { "type": "integer", "description": "Cost centre ID", "example": 10, "minimum": 1 } } }, "StatusReasonsList": { "allOf": [ { "$ref": "#/components/schemas/PaginatedList" } ], "description": "Paginated list of status reasons", "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/StatusReasonDetail" } } } }, "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" } } } } }, "Premium": { "description": "A premium configured in AlayaCare Accounting Settings", "type": "object", "properties": { "code": { "type": "string", "description": "AlayaCare premium code name", "example": "MILEAGE" }, "premium_id": { "type": "integer", "description": "AlayaCare premium ID", "example": 643, "minimum": 1 }, "pay_code": { "$ref": "#/components/schemas/PayCode" }, "bill_codes": { "type": "array", "items": { "$ref": "#/components/schemas/BillCode" } }, "rule": { "type": "string", "description": "AlayaCare premium rule name", "example": "Weekends" }, "branch": { "$ref": "#/components/schemas/Branch" } }, "required": [ "code", "premium_id" ] }, "VisitPremiumDetails": { "description": "A visit premium", "type": "object", "properties": { "visit_premium_id": { "type": "integer", "description": "AlayaCare visit premium ID", "example": 345, "minimum": 1 }, "description": { "type": "string", "description": "Description of the visit premium", "example": "Reported travel KMs" }, "quantity": { "type": "integer", "description": "Quantity of premiums applied to the visit", "example": 2 }, "premium": { "$ref": "#/components/schemas/Premium" } }, "required": [ "visit_premium_id", "quantity", "premium" ] }, "VisitPremiumsList": { "allOf": [ { "$ref": "#/components/schemas/PaginatedList" } ], "type": "object", "description": "Paginated list of premiums", "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/VisitPremiumDetails" } } } }, "PremiumsList": { "allOf": [ { "$ref": "#/components/schemas/PaginatedList" } ], "type": "object", "description": "Paginated list of premiums", "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/Premium" } } } }, "Branch": { "description": "AlayaCare branch", "type": "object", "properties": { "id": { "type": "integer", "description": "Branch ID", "example": 1000, "minimum": 1 }, "name": { "type": "string", "description": "Branch name", "example": "AlayaCare Health" } } }, "BillCode": { "description": "AlayaCare bill code", "type": "object", "properties": { "id": { "type": "integer", "description": "AlayCare bill code ID", "example": 783, "minimum": 1 }, "code": { "type": "string", "description": "AlayCare bill code name", "example": "MEDIBILL" } }, "required": [ "id", "code" ] }, "PayCode": { "description": "AlayaCare pay code", "type": "object", "properties": { "id": { "type": "integer", "description": "AlayCare pay code ID", "example": 3, "minimum": 1 }, "code": { "type": "string", "description": "AlayCare pay code name", "example": 783 } } }, "PremiumCreateSchema": { "type": "object", "required": [ "code" ], "properties": { "code": { "type": "string", "example": "TESTCODE" }, "pay_code_id": { "type": "integer", "example": 1, "minimum": 1 }, "branch_id": { "type": "integer", "example": 1, "minimum": 1 }, "bill_codes": { "type": "array", "items": { "$ref": "#/components/schemas/BillCodeStub" } } } }, "PremiumUpdateSchema": { "type": "object", "properties": { "code": { "type": "string", "example": "TESTCODE" }, "pay_code_id": { "type": "integer", "example": 1, "minimum": 1 }, "bill_codes": { "type": "array", "items": { "$ref": "#/components/schemas/BillCodeStub" } } } }, "PremiumExtendedSchema": { "type": "object", "properties": { "id": { "type": "integer", "example": 453 }, "guid": { "type": "integer", "example": 356689 }, "code": { "type": "string", "example": "TESTCODE" }, "pay_code": { "$ref": "#/components/schemas/PayCodeSchema" }, "rule": { "type": "string", "example": "Evening" }, "rule_data": { "description": "Not really supported but returned as is, the rule data is stored as a json", "type": "string", "example": null }, "bill_codes": { "type": "array", "items": { "$ref": "#/components/schemas/BillCodeQuerySchema" } } } }, "BillCodeStub": { "type": "object", "description": "Only one of id or guid should be present", "properties": { "id": { "type": "integer", "example": 3 }, "guid": { "type": "integer", "example": 3 } } }, "BillCodeQuerySchema": { "properties": { "branch": { "$ref": "#/components/schemas/Branch" }, "code": { "type": "string" }, "excluded_from_billing": { "type": "boolean" }, "guid": { "type": "integer" }, "id": { "type": "integer" }, "is_disabled": { "type": "boolean" }, "name": { "type": "string" }, "units": { "type": "string" } }, "required": [ "id", "code", "name", "excluded_from_billing", "is_disabled", "units" ], "type": "object" }, "VisitPremiumCreateSchema": { "type": "object", "required": [ "premium_id", "quantity" ], "properties": { "premium_id": { "type": "integer", "description": "AlayaCare premium ID", "minimum": 1 }, "quantity": { "type": "number", "example": 1.01 }, "description": { "type": "string", "example": "Mileage KMs" }, "override_locked_visit": { "type": "boolean", "example": false, "description": "Flag to override a locked visit. A visit is considered \"locked\" in AlayaCare when it is included in a billing or payroll run.\n\nOnly users with the correct permissions enabled may edit a \"locked\" visit.\n\nNote that if a visit is locked and this flag is sent as `true`, your organization may need to re-run billing or payroll in the AlayaCare web application to properly reflect the changes.\n" } } }, "VisitPremiumUpdateSchema": { "type": "object", "properties": { "premium_id": { "type": "integer", "description": "AlayaCare premium ID", "minimum": 1 }, "quantity": { "type": "number", "example": 1.01 }, "description": { "type": "string", "example": "Mileage KMs" } } }, "TimeOffList": { "allOf": [ { "$ref": "#/components/schemas/PaginatedList" } ], "description": "List of time off types", "type": "object", "properties": { "items": { "type": "array", "items": { "allOf": [ { "$ref": "#/components/schemas/TimeOff" } ] } } } }, "TimeOff": { "description": "Time off type details", "type": "object", "properties": { "id": { "type": "integer", "description": "ID of the time off type", "example": 1 }, "name": { "type": "string", "description": "Name of the time off type", "example": "Sick Paid" }, "pay_schedule_time": { "type": "string", "description": "Time off type usable payable scheduled hours for payroll configuration", "example": false, "enum": [ false, "Time_Off_Pay_Code", "Visit_Pay_Code" ] }, "all_day_duration": { "type": "integer", "description": "All day duration in minutes.", "example": 480 }, "service": { "$ref": "#/components/schemas/ServiceCodeDetails" }, "branch": { "$ref": "#/components/schemas/BranchSummary" } } }, "BranchSummary": { "description": "Branch summary", "type": "object", "properties": { "id": { "type": "integer", "description": "ID of the branch", "example": 1, "minimum": 1 }, "name": { "type": "string", "description": "Name of the branch", "example": "Headquarters" } } }, "ServiceCodeDetails": { "description": "Service details", "type": "object", "properties": { "id": { "type": "integer", "description": "ID of the service code", "example": 1, "minimum": 1 }, "service_code_name": { "type": "string", "description": "Name of the service code", "example": "SICKPAID" } } }, "FunderList": { "allOf": [ { "$ref": "#/components/schemas/PaginatedList" } ], "description": "Paginated list of funders", "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/FunderDetails" } } } }, "FunderDetails": { "type": "object", "properties": { "id": { "description": "AlayaCare funder ID", "type": "integer", "example": 1, "minimum": 1 }, "external_id": { "description": "External funder ID", "type": "string", "example": "sor_funder_id_1", "nullable": true }, "name": { "description": "Funder name", "type": "string", "example": "Insurance Company" }, "code": { "description": "Funder code", "type": "string", "example": "IC-1" }, "type": { "description": "Funder type", "type": "string", "enum": [ "funder_individual", "client_individual", "electronic_billing", "funder_batched", "ccac", "hcp" ] }, "status": { "description": "Funder status", "type": "string", "enum": [ "enabled", "disabled" ] }, "organization": { "description": "Organization", "type": "string", "example": "Home Healthcare Agency" }, "organization_code": { "description": "Organization code", "type": "string", "example": "HHC-0101" }, "branch": { "$ref": "#/components/schemas/BranchSummary" } }, "required": [ "id", "name" ] }, "FunderScalarSchema": { "anyOf": [ { "$ref": "#/components/schemas/FunderCommonScalarSchema" }, { "$ref": "#/components/schemas/FunderCcacScalarSchema" }, { "$ref": "#/components/schemas/FunderHcpScalarSchema" } ] }, "FunderBaseScalarSchema": { "allOf": [ { "type": "object", "properties": { "code": { "description": "Funder Code", "type": "string", "example": "Code" }, "created_at": { "description": "Date and time of creation", "type": "string", "example": "2015-09-22T12:48:21+00:00" }, "create_user_id": { "description": "ID of User who created the funder", "type": "integer", "example": 100, "minimum": 1 }, "description": { "description": "The description of the Funder", "type": "string", "example": "Description" }, "gl_asset": { "description": "General Ledger Asset Account", "allOf": [ { "$ref": "#/components/schemas/LinkedEntitySchema" } ] }, "gl_bank": { "description": "General Ledger Bank Account", "allOf": [ { "$ref": "#/components/schemas/LinkedEntitySchema" } ] }, "guid": { "type": "integer", "example": 12, "description": "Globally Unique Identifier" }, "holiday_multiplier": { "description": "Multiplier applied to Funder for holiday periods", "type": "number", "example": "1.00" }, "id": { "description": "Funder ID", "type": "integer", "example": 1, "minimum": 1 }, "import_id": { "type": "integer", "example": 1 }, "invoicing_model": { "description": "The type of invoicing model used by the Funder", "type": "string", "example": "batched" }, "is_disabled": { "type": "boolean", "example": false }, "is_read_only": { "type": "boolean", "example": false }, "label": { "type": "string", "example": "Name", "description": "Always the same as `name`" }, "name": { "type": "string", "example": "Name" }, "profile": { "$ref": "#/components/schemas/ProfileSchema" }, "taxes": { "type": "array", "items": { "$ref": "#/components/schemas/FunderTaxesItemSchema" } }, "updated_at": { "type": "string", "example": "2017-09-27T00:01:00-04:00" }, "update_user_id": { "type": "integer", "example": 2, "minimum": 1 }, "gl_receivables_cost_centre": { "$ref": "#/components/schemas/CostCentreSchema" }, "gl_bank_cost_centre": { "$ref": "#/components/schemas/CostCentreSchema" }, "gl_receivables_cost_centre_id": { "type": "integer", "example": 2 }, "gl_bank_cost_centre_id": { "type": "integer", "example": 2 }, "branch_id": { "type": "integer", "example": 100, "minimum": 1 }, "line_item_limit": { "type": "number", "example": 76 } } } ] }, "FunderCommonScalarSchema": { "allOf": [ { "$ref": "#/components/schemas/FunderBaseScalarSchema" } ], "properties": { "allow_paypal_payment": { "type": "boolean", "description": "Funder can use paypal", "example": false }, "agency_profile": { "$ref": "#/components/schemas/LinkedEntitySchema" }, "billing_contact": { "$ref": "#/components/schemas/LinkedEntitySchema" }, "organization_code": { "type": "string", "example": "HHC-0101" }, "organization_name": { "type": "string", "example": "Home Healthcare Agency" }, "billing_frequency": { "type": "string", "enum": [ "no_frequency", "weekly", "calendar_month" ] } } }, "FunderCcacScalarSchema": { "allOf": [ { "$ref": "#/components/schemas/FunderBaseScalarSchema" } ], "properties": { "ccac_code": { "type": "string", "description": "CCAC code" }, "ccac_name": { "type": "string", "description": "CCAC name" }, "organization_code": { "type": "string", "example": "HHC-0101" }, "organization_name": { "type": "string", "example": "Home Healthcare Agency" }, "billing_adjustment_period": { "type": "integer", "example": 1 }, "file_name_prefix": { "type": "string" }, "billing_frequency": { "type": "string", "enum": [ "no_frequency", "weekly", "calendar_month" ] } } }, "FunderHcpScalarSchema": { "allOf": [ { "$ref": "#/components/schemas/FunderBaseScalarSchema" } ], "properties": { "organization_code": { "type": "string", "example": "HHC-0101" }, "organization_name": { "type": "string", "example": "Home Healthcare Agency" }, "recognized_revenue_account_id": { "type": "integer", "example": 1 }, "unearned_revenue_account_id": { "type": "integer", "example": 1 } } }, "EVVExportList": { "allOf": [ { "$ref": "#/components/schemas/PaginatedList" } ], "description": "Paginated list of EVV Export", "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/EVVExport" } } } }, "EVVExport": { "description": "EVV Export", "type": "object", "properties": { "evv_export_id": { "type": "integer", "description": "ID of the EVV export record", "example": 1 }, "export_key": { "type": "string", "description": "Combined export record key; currently branch id, claim destination system and export type.", "example": "1000.HHAeXCchange.SCHEDULED" }, "branch_id": { "type": "integer", "description": "Branch ID", "example": 1000, "minimum": 1 }, "claim_destination_system": { "type": "string", "description": "Claim destination system", "example": "Tellus Rendered Services", "enum": [ "HHAeXchange", "eMedNY", "Tellus Rendered Services", "Sandata" ] }, "state": { "type": "string", "description": "Export state", "example": "NY" }, "export_type": { "type": "string", "description": "Export type", "example": "BILLED", "enum": [ "SCHEDULED", "DELETED", "MISSED", "APPROVED", "BILLED" ] }, "fetch_visits_from": { "type": "string", "description": "Start date and time of when visits were processed in UTC", "example": "2020-01-01T00:00:00+00:00" }, "fetch_visits_until": { "type": "string", "description": "End date and time of when visits were processed in UTC", "example": "2020-01-01T00:00:00+00:00" }, "date_sent_at": { "type": "string", "description": "Date and time the export was sent to the destination system in UTC format", "example": "2020-01-01T00:00:00+00:00" }, "number_of_visits": { "type": "integer", "description": "Number of visits included", "example": 10 }, "status_of_background_job": { "type": "string", "description": "Status of the EVV Export job", "example": "SUCCESS", "enum": [ "STARTED", "SUCCESS", "FAILURE", "NOT_SENT" ] }, "url_file_location": { "type": "string", "description": "URL of file location if the export was successful", "example": "https://" }, "error_details": { "type": "string", "description": "EVV export error details", "example": "File cannot be sent - connection issues" }, "created_at": { "type": "string", "description": "Date and time in UTC format when the export record was created", "example": "2020-01-01T00:00:00+00:00" }, "is_custom": { "type": "boolean", "description": "indicates if it's a custom export or a regular One", "example": false }, "on_demand_request_id": { "type": "integer", "description": "request_id associated with a custom export. Used for reprocessing and having a control about visits that should be inside", "example": 998 }, "is_activation": { "type": "boolean", "description": "if export is related to an is_activation", "example": true } } }, "EVVExportLatestExportDate": { "description": "Latest EVV export date in UTC format for the specified branch ID, claim destination and export type regardless of its state or default date if no record is found", "type": "object", "properties": { "latest_export_date": { "type": "string", "description": "Date and time in UTC format of the last export", "example": "2020-01-01T00:00:00+00:00" } } }, "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" ] }, "NotFound": { "type": "object", "properties": { "code": { "type": "string", "example": 404 }, "message": { "type": "string", "example": "Entity not found" } }, "required": [ "code", "message" ] }, "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" ] }, "BillingCycle": { "type": "object", "properties": { "id": { "type": "integer", "minimum": 1 }, "branch": { "$ref": "#/components/schemas/Branch" }, "create_user": { "$ref": "#/components/schemas/User" }, "update_user": { "$ref": "#/components/schemas/User" }, "close_user": { "$ref": "#/components/schemas/User" }, "create_time": { "type": "string", "format": "date-time" }, "update_time": { "type": "string", "format": "date-time" }, "closed_at": { "type": "string", "format": "date-time" }, "guid": { "type": "integer" }, "start_date": { "type": "string", "format": "date" }, "end_date": { "type": "string", "format": "date" }, "back_billing_date": { "type": "string", "format": "date", "nullable": true, "example": null }, "invoice_date": { "type": "string", "format": "date" }, "idstatus": { "type": "integer", "example": null }, "overtime_check": { "type": "boolean", "example": null }, "allow_shift_creation": { "type": "boolean", "example": true }, "type": { "type": "string", "enum": [ "legacy", "payor_invoicing" ], "example": "payor_invoicing" }, "job_id": { "type": "integer" }, "invoice_count": { "type": "integer", "description": "Count of invoices in any status" }, "draft_invoice_count": { "type": "integer", "description": "Count of invoices in Draft status" }, "sent_invoice_count": { "type": "integer", "description": "Count of invoices in Sent status = Sent, Paid, Write-Off" }, "deleted_invoice_count": { "type": "integer", "description": "Count of invoices in Deleted status" }, "is_first": { "type": "boolean", "description": "Boolean indicating if the program billing period is the first for that Branch - Frequency" }, "is_latest": { "type": "boolean", "description": "Boolean indicating if the program billing period is the latest for that Branch - Frequency" } } }, "BillingCycleCollection": { "type": "object", "properties": { "count": { "type": "integer" }, "page": { "type": "integer", "minimum": 1 }, "items_per_page": { "type": "integer" }, "total_pages": { "type": "integer" }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/BillingCycle" } } } }, "PayorInvoicingBillingPeriod": { "type": "object", "properties": { "id": { "type": "integer", "minimum": 1 }, "branch": { "$ref": "#/components/schemas/Branch" }, "create_user": { "$ref": "#/components/schemas/User" }, "update_user": { "$ref": "#/components/schemas/User" }, "close_user": { "$ref": "#/components/schemas/User" }, "create_time": { "type": "string", "format": "date-time" }, "update_time": { "type": "string", "format": "date-time" }, "closed_at": { "type": "string", "format": "date-time" }, "guid": { "type": "integer" }, "start_date": { "type": "string", "format": "date" }, "end_date": { "type": "string", "format": "date" }, "back_billing_date": { "type": "string", "format": "date", "nullable": true, "example": null }, "invoice_date": { "type": "string", "format": "date" }, "idstatus": { "type": "integer", "example": null }, "overtime_check": { "type": "boolean", "example": null }, "is_closed": { "type": "boolean", "example": false }, "allow_shift_creation": { "type": "boolean", "example": true }, "type": { "type": "string", "enum": [ "legacy", "payor_invoicing" ], "example": "payor_invoicing" }, "frequency": { "type": "integer", "description": "Displays the Billing Frequency selected" }, "job_id": { "type": "integer" }, "invoice_count": { "type": "integer", "description": "Count of invoices in any status" }, "draft_invoice_count": { "type": "integer", "description": "Count of invoices in Draft status" }, "sent_invoice_count": { "type": "integer", "description": "Count of invoices in Sent status = Sent, Paid, Write-Off" }, "deleted_invoice_count": { "type": "integer", "description": "Count of invoices in Deleted status" }, "is_first": { "type": "boolean", "description": "Boolean indicating if the program billing period is the first for that Branch - Frequency" }, "is_latest": { "type": "boolean", "description": "Boolean indicating if the program billing period is the latest for that Branch - Frequency" }, "funder_filters": { "type": "array", "items": { "$ref": "#/components/schemas/FunderWithGuidSchema" } }, "payor_type_filters": { "type": "array", "items": { "type": "string", "example": "individual_invoices" } } } }, "User": { "type": "object", "properties": { "id": { "type": "integer" }, "first_name": { "type": "string" }, "last_name": { "type": "string" } } }, "FunderStub": { "type": "object", "properties": { "id": { "type": "integer", "example": 8, "minimum": 1 }, "code": { "type": "string", "example": "Some Funder" }, "name": { "type": "string", "example": "Some Funder" }, "description": { "type": "string", "example": "Some Funder" }, "invoicing_model": { "type": "string", "example": "funder_individual" } } }, "FunderWithGuidSchema": { "allOf": [ { "$ref": "#/components/schemas/FunderStub" }, { "type": "object", "properties": { "guid": { "type": "integer", "example": 9 } } } ] }, "PayorInvoicingBillingPeriodCollection": { "type": "object", "properties": { "count": { "type": "integer" }, "page": { "type": "integer", "minimum": 1 }, "items_per_page": { "type": "integer" }, "total_pages": { "type": "integer" }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/PayorInvoicingBillingPeriod" } } } }, "PrivateInvoicesSchema": { "type": "object", "properties": { "invoice_number": { "type": "integer", "example": 2348 }, "invoice_version": { "type": "integer", "example": 0 }, "master_invoice_id": { "type": "integer", "example": 12345, "minimum": 1 }, "status": { "type": "string", "example": "draft" }, "balance": { "type": "string", "example": "5.00" }, "payments": { "type": "string", "example": "2.00" }, "adjustments": { "type": "string", "example": "3.00" }, "total": { "type": "string", "example": "10.00" }, "pdf_url": { "type": "string", "example": "https://alayacare.com/invoice5283_20190625.pdf" }, "pdf_url_create_time": { "type": "string", "format": "date-time", "example": "2018-01-16T14:17:05-0500" }, "id": { "type": "integer", "example": 12, "minimum": 1 }, "emailed": { "type": "boolean", "example": true }, "client": { "$ref": "#/components/schemas/ClientSchema" }, "program": { "$ref": "#/components/schemas/ProgramSchema" }, "payor": { "$ref": "#/components/schemas/PayorSchema" } } }, "ClientSchema": { "type": "object", "properties": { "id": { "type": "integer", "example": 16, "minimum": 1 }, "first_name": { "type": "string", "example": "Jane" }, "last_name": { "type": "string", "example": "Jones" } } }, "ProgramSchema": { "type": "object", "properties": { "id": { "type": "integer", "example": 12345, "minimum": 1 }, "client": { "$ref": "#/components/schemas/ClientSchema" }, "program_type": { "type": "string", "example": "LTCI" }, "name": { "type": "string", "example": "Long Term Care Insurance" }, "guarantor_funder": { "type": "object", "properties": { "id": { "type": "integer", "example": 111 }, "code": { "type": "string", "example": "GF1" }, "name": { "type": "string", "example": "Some Funder" } } }, "guarantor_billing_contact": { "type": "object", "properties": { "id": { "type": "integer", "example": 111 }, "first_name": { "type": "string", "example": "Bruce" }, "last_name": { "type": "string", "example": "Lee" } } }, "client_billing_cycle": { "type": "integer", "example": 999, "minimum": 1 } } }, "PayorSchema": { "type": "object", "properties": { "id": { "type": "integer", "example": 1, "minimum": 1 }, "checksum": { "type": "integer", "example": 7 }, "client": { "$ref": "#/components/schemas/ClientSchema" }, "funder": { "$ref": "#/components/schemas/FunderStub" }, "billing_contact": { "$ref": "#/components/schemas/BillingContactSchema" } } }, "BillingContactSchema": { "type": "object", "properties": { "id": { "type": "integer", "example": 16 }, "first_name": { "type": "string", "example": "Jane" }, "last_name": { "type": "string", "example": "Jones" }, "address": { "type": "string", "example": "12 crescent street" }, "address_suite": { "type": "string", "example": "app. 1B" }, "city": { "type": "string", "example": "Cityville" }, "state": { "type": "string", "example": "Quebec" }, "zip": { "type": "string", "example": "H1H1H1" }, "country": { "type": "string", "example": "Canada" }, "phone_main": { "type": "string", "example": "5141234567" } } }, "InvoiceItemSchema": { "type": "object", "properties": { "id": { "type": "integer", "example": 12, "minimum": 1 }, "invoice_id": { "type": "integer", "example": 12, "minimum": 1 }, "source_id": { "type": "integer", "example": 12 }, "subtotal": { "type": "number", "format": "double", "example": 10 }, "total_cost": { "type": "number", "format": "double", "example": 3 }, "total_taxes": { "type": "number", "format": "double", "example": 3 }, "total": { "type": "number", "format": "double", "example": 13 }, "ajdustment_type": { "type": "string", "example": "adjustment" }, "create_user_id": { "type": "integer", "example": 2, "minimum": 1 }, "created_at": { "type": "string", "format": "date-time", "example": "2018-01-16T14:17:05-0500" }, "gl_asset_acc_account_id": { "type": "integer", "example": 2, "minimum": 1 }, "gl_revenue_acc_account_id": { "type": "integer", "example": 2, "minimum": 1 }, "item_end_at": { "type": "string", "format": "date", "example": "2018-01-16T14:17:05-0500" }, "item_start_at": { "type": "string", "format": "date", "example": "2018-01-16T14:16:05-0500" }, "memo": { "type": "string", "example": "memo" }, "policy_version_id": { "type": "integer", "example": 2, "minimum": 1 }, "quantity": { "type": "number", "format": "double", "example": 2 }, "quantity_units": { "type": "string", "example": "hours" }, "receivables_cost_centre_id": { "type": "integer", "example": 2, "minimum": 1 }, "taxable": { "type": "boolean", "example": true }, "type": { "type": "string", "example": "visit" }, "unitprice": { "type": "number", "format": "double", "example": 2 }, "updated_at": { "type": "string", "format": "date-time", "example": "2018-01-16T14:17:05-0500" }, "update_user_id": { "type": "integer", "example": 2, "minimum": 1 }, "voided_by_id": { "type": "integer", "example": 2, "minimum": 1 }, "payor": { "$ref": "#/components/schemas/PayorSchema" } } }, "InvoiceQuerySchema": { "type": "object", "properties": { "id": { "type": "integer", "example": 12, "minimum": 1 }, "status": { "type": "string", "example": "draft" }, "invoice_number": { "type": "integer", "example": 2348 }, "invoice_version": { "type": "integer", "example": 0 }, "invoice_date": { "type": "string", "format": "date", "example": "2018-01-16" }, "updated_at": { "type": "string", "format": "date-time", "example": "2018-01-16T14:17:05-0500" }, "balance": { "type": "number", "example": 5 }, "total": { "type": "number", "example": 10 }, "can_be_written_off": { "type": "boolean", "example": false }, "can_be_voided": { "type": "boolean", "example": false }, "can_be_regenerated": { "type": "boolean", "example": false }, "can_be_paid": { "type": "boolean", "example": false }, "can_be_deleted": { "type": "boolean", "example": false }, "can_add_transaction": { "type": "boolean", "example": false }, "is_ccac_funder": { "type": "boolean", "example": false }, "is_funder_batched_funder": { "type": "boolean", "example": false }, "total_visits": { "type": "integer", "example": 2 }, "total_premiums": { "type": "integer", "example": 3 }, "total_supplies": { "type": "integer", "example": 4 }, "total_client_premiums": { "type": "integer", "example": 5 }, "total_income_items": { "type": "integer", "example": 6 }, "visits_and_premiums_subtotal": { "type": "number", "example": 10 }, "supplies_subtotal": { "type": "number", "example": 0 }, "client_premiums_subtotal": { "type": "number", "example": 5 }, "income_items_subtotal": { "type": "number", "example": 6 }, "client_id": { "type": "integer", "example": 2, "minimum": 1 }, "crn": { "type": "string", "example": "10009", "description": "Has value only if BPAY FF is ON and is already generated" }, "taxes": { "$ref": "#/components/schemas/TaxesSchema" }, "bill_to": { "$ref": "#/components/schemas/BillToSchema" }, "pdf_url": { "type": "string", "example": "/path/to/file.pdf" }, "invoice_items": { "type": "array", "items": { "$ref": "#/components/schemas/InvoiceItemSchema" } } } }, "TaxesSchema": { "type": "object", "properties": { "taxtotal": { "type": "number", "example": 2 }, "types": { "$ref": "#/components/schemas/TaxTypesSchema" } } }, "TaxTypesSchema": { "type": "object", "properties": { "name": { "type": "string", "example": "HST" }, "total": { "type": "number", "example": 2 } } }, "BillToSchema": { "type": "object", "properties": { "id": { "type": "integer", "example": 12 }, "name": { "type": "string", "example": "Funder" }, "guid": { "type": "string", "example": "27990" }, "guid_to": { "type": "string", "example": "27991" }, "is_active": { "type": "boolean", "example": true }, "import_id": { "type": "integer", "example": 123 }, "remarks": { "type": "string", "example": "falls prevention program" }, "contact_type": { "type": "string", "example": "Referral Contact" }, "lang": { "type": "string", "example": "english" }, "list": { "type": "string", "example": "Funder List (System)" } } }, "AccountStub": { "type": "object", "properties": { "id": { "type": "integer", "example": 1 }, "name": { "type": "string", "example": "AlayaCare" }, "is_disabled": { "type": "boolean", "example": false } }, "required": [ "id", "name", "is_disabled" ] }, "Account": { "description": "Account details", "type": "object", "properties": { "id": { "type": "integer", "description": "Account ID", "example": 1, "minimum": 1 }, "branch": { "$ref": "#/components/schemas/BranchSummary" }, "gl_number": { "type": "string", "description": "Account GL number", "example": 1000 }, "is_default": { "type": "boolean", "description": "Flag indicating if the account is the default account for the branch", "example": true }, "is_disabled": { "type": "boolean", "description": "Flag indicating if the account is disabled", "example": false }, "is_read_only": { "type": "boolean", "description": "Flag indicating if the account is read only", "example": false }, "name": { "type": "string", "description": "Account name", "example": "AlayaCare" }, "type": { "type": "string", "description": "Account type", "example": "asset", "enum": [ "asset", "liability", "equity", "revenue", "expense" ] } } }, "AccountList": { "allOf": [ { "$ref": "#/components/schemas/PaginatedList" } ], "description": "Paginated list of accounts", "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/Account" } } } }, "ServiceCodeListSchema": { "allOf": [ { "$ref": "#/components/schemas/PaginatedList" } ], "type": "object", "description": "Paginated list of service codes", "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/ServiceCodeSchema" } } } }, "ServiceCodeSchema": { "type": "object", "properties": { "id": { "type": "integer", "example": 1, "minimum": 1 }, "description": { "type": "string", "example": "Sick Paid" }, "name": { "type": "string", "example": "Sick Paid" }, "label": { "type": "string", "example": "Sick Paid" }, "is_disabled": { "type": "boolean", "example": false }, "rating_methodology_type": { "type": "string", "example": "funder_driven" }, "branch": { "$ref": "#/components/schemas/BranchSchema" }, "department": { "$ref": "#/components/schemas/DepartmentSchema" }, "pay_code_regular": { "$ref": "#/components/schemas/PayCodeSchema" }, "pay_code_overtime": { "$ref": "#/components/schemas/PayCodeSchema" }, "pay_code_holiday": { "$ref": "#/components/schemas/PayCodeSchema" }, "expense_code": { "$ref": "#/components/schemas/PayCodeSchema" }, "billcodes": { "type": "array", "items": { "$ref": "#/components/schemas/BillCodeSchema" } } } }, "BranchSchema": { "description": "The branch associated with the Billcode", "type": "object", "properties": { "id": { "type": "integer", "example": 1, "minimum": 1 }, "name": { "type": "string", "example": "AlayaCare Health" } } }, "DepartmentSchema": { "type": "object", "properties": { "id": { "type": "integer", "example": 1, "minimum": 1 }, "name": { "type": "string", "example": "AlayaCare Health" } } }, "PayCodeSchema": { "type": "object", "properties": { "id": { "type": "integer", "example": 1, "minimum": 1 }, "code": { "type": "string", "example": "SP" } } }, "BillCodeSchema": { "type": "object", "properties": { "id": { "type": "integer", "example": 1, "minimum": 1 }, "code": { "type": "string", "example": "SP" }, "name": { "type": "string", "example": "Sick Paid" }, "funder": { "$ref": "#/components/schemas/FunderStub" }, "is_disabled": { "type": "boolean", "example": false } } }, "ServiceCodeScalarSchema": { "allOf": [ { "$ref": "#/components/schemas/ServiceCodeSchema" }, { "type": "object", "properties": { "guid": { "type": "integer", "example": 1 }, "branch_id": { "type": "integer", "example": 1, "minimum": 1 }, "pay_code_id": { "type": "integer", "example": 1, "minimum": 1 }, "paycoderegular_id": { "type": "integer", "example": 1 }, "paycodeovertime_id": { "type": "integer", "example": 1 }, "paycodeholiday_id": { "type": "integer", "example": 1 }, "expense_code_id": { "type": "integer", "example": 1 }, "visits_can_overlap": { "type": "boolean", "example": true }, "is_cancelled": { "type": "boolean", "example": false }, "allow_virtual_care": { "type": "boolean", "example": true }, "duration": { "type": "integer", "example": 10 }, "care_duration": { "type": "integer", "example": 10 }, "department_id": { "type": "integer", "example": 1, "minimum": 1 }, "disregard_employee_capacity": { "type": "boolean", "example": true }, "matching_shift_late_start": { "type": "integer", "example": 10 }, "matching_shift_coverage": { "type": "number", "example": 10 }, "disregard_start_time": { "type": "boolean", "example": true }, "disregard_shift_coverage": { "type": "boolean", "example": true }, "ot_exempt": { "type": "boolean", "example": true }, "bill_codes": { "type": "array", "items": { "$ref": "#/components/schemas/BillCodeSchema" } } } } ] }, "ServiceCodeEditSchema": { "type": "object", "properties": { "name": { "type": "string", "example": "Sick Paid" }, "description": { "type": "string", "example": "Sick Paid" }, "paycoderegular_id": { "type": "integer", "example": 1 }, "paycodeovertime_id": { "type": "integer", "example": 1 }, "paycodeholiday_id": { "type": "integer", "example": 1 }, "expense_code_id": { "type": "integer", "example": 1 }, "department_id": { "type": "integer", "example": 1, "minimum": 1 }, "duration": { "type": "integer", "example": 10 }, "care_duration": { "type": "integer", "example": 10 }, "visits_can_overlap": { "type": "boolean", "example": true }, "disregard_employee_capacity": { "type": "boolean", "example": true }, "allow_virtual_care": { "type": "boolean", "example": true }, "matching_shift_late_start": { "type": "integer", "example": 10 }, "matching_shift_coverage": { "type": "number", "example": 10 }, "disregard_start_time": { "type": "boolean", "example": true }, "disregard_shift_coverage": { "type": "boolean", "example": true }, "ot_exempt": { "type": "boolean", "example": true } } }, "ServiceCodeCreateSchema": { "allOf": [ { "$ref": "#/components/schemas/ServiceCodeEditSchema" }, { "type": "object", "properties": { "rating_methodology_type": { "type": "string", "enum": [ "funder_driven", "non_billable" ], "example": "funder_driven" }, "branch_id": { "type": "integer", "description": "Branch ID", "minimum": 1 }, "rating_methodology_data": { "$ref": "#/components/schemas/ServiceCodeRatingMethodologyData" } } } ] }, "ServiceCodeRatingMethodologyData": { "type": "object", "properties": { "bill_code_ids": { "type": "array", "items": { "type": "integer", "example": 1 } } } }, "Success": { "type": "object", "properties": { "message": { "type": "string", "example": "Success" } } }, "LinkedEntitySchema": { "type": "object", "properties": { "id": { "type": "integer", "example": 12 } } }, "ProfileSchema": { "type": "object", "properties": { "first_name": { "type": "string", "example": "First name" }, "last_name": { "type": "string", "example": "Last name" } } }, "FunderTaxesItemSchema": { "type": "object", "properties": { "id": { "type": "integer", "example": 1 }, "name": { "type": "string", "example": "TPS" }, "percentage": { "type": "number", "example": 15.001 } } }, "CostCentreSchema": { "type": "object", "properties": { "id": { "type": "integer", "example": 1, "minimum": 1 }, "number": { "type": "string", "example": "123" }, "description": { "type": "string", "example": "123" } } }, "RRuleSchema": { "type": "object", "description": "A recurrence rule for a Bill Code Rate", "properties": { "duration": { "type": "integer" }, "rrule": { "type": "string", "pattern": "^(\\w+=\\w+)?(;\\w+=\\w+)*;?$", "example": "FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR;INTERVAL=1", "description": "A recurrence rule string following RFC-5545" }, "start_at": { "type": "string", "format": "date-time", "example": "2019-01-01T00:00:00+00:00", "description": "Date the Rate begins to apply" }, "end_at": { "type": "string", "format": "date-time", "example": "2019-01-01T00:00:00+00:00", "description": "Date the Rate begins to apply" } } }, "BillCodeRateRRuleBaseSchema": { "type": "object", "properties": { "rate": { "type": "number", "example": 12.5 }, "external_id": { "type": "string", "pattern": "(^$|^[0-9a-zA-Z\\\\-_]+$)", "example": "123" }, "order": { "type": "integer", "example": 1 }, "override_holiday_multiplicator": { "type": "integer", "description": "effectively a boolean", "enum": [ 0, 1 ], "example": 1 }, "duration": { "type": "integer", "example": 10 }, "rrule": { "$ref": "#/components/schemas/RRuleSchema" } } }, "BillCodeRateRRuleCreateSchema": { "allOf": [ { "$ref": "#/components/schemas/BillCodeRateRRuleBaseSchema" }, { "type": "object", "required": [ "rate", "order", "override_holiday_multiplicator" ] } ] }, "BillCodeRateRRuleQuerySchema": { "allOf": [ { "$ref": "#/components/schemas/BillCodeRateRRuleBaseSchema" }, { "type": "object", "properties": { "id": { "type": "integer", "example": 12 } }, "required": [ "id", "rate", "external_id", "duration", "order", "override_holiday_multiplicator" ] } ] }, "BillCodeRateRRuleUpdateSchema": { "allOf": [ { "$ref": "#/components/schemas/BillCodeRateRRuleBaseSchema" } ] }, "BillCodeRateTierQuerySchema": { "allOf": [ { "$ref": "#/components/schemas/BillCodeRateTierCreateSchema" } ] }, "BillCodeRateTierCreateSchema": { "type": "object", "properties": { "rate": { "description": "The rate to apply to the time period", "type": "number", "example": 12.5 }, "start_minute": { "description": "The minute the unit of time starts", "type": "integer", "example": 1, "minimum": 1 }, "end_minute": { "description": "The minute the unit of time ends", "type": "integer", "example": 59, "minimum": 2 }, "unit": { "description": "An integer representing the unit of time, this field should ascend in the same order as start_at\n", "type": "integer", "minimum": 1, "example": 1 } }, "required": [ "rate", "start_at", "unit" ] }, "BillCodeRateCreateSchema": { "type": "object", "properties": { "rate": { "type": "number", "example": 12.5 }, "external_id": { "type": "string", "example": "123" }, "start_at": { "type": "string", "format": "date-time", "example": "2019-01-01T00:00:00+00:00", "description": "Date the Rate begins to apply" }, "units": { "type": "string", "enum": [ "hours", "visits", "rate" ] }, "is_time_specific_rule_applicable": { "type": "boolean", "example": true }, "rrules": { "$ref": "#/components/schemas/BillCodeRateRRuleCreateSchema" }, "tiered_rates": { "$ref": "#/components/schemas/BillCodeRateTierCreateSchema" } }, "required": [ "rate", "units", "start_at" ] }, "BillCodeRateUpdateSchema": { "allOf": [ { "$ref": "#/components/schemas/BillCodeRateCreateSchema" }, { "type": "object", "properties": { "tiered_rates": { "$ref": "#/components/schemas/BillCodeRateTierCreateSchema" } } } ] }, "BillCodeRateQuerySchema": { "allOf": [ { "$ref": "#/components/schemas/BillCodeRateCreateSchema" }, { "type": "object", "properties": { "id": { "type": "integer", "example": 12 }, "rrules": { "$ref": "#/components/schemas/BillCodeRateRRuleQuerySchema" }, "tiered_rates": { "$ref": "#/components/schemas/BillCodeRateTierQuerySchema" } } } ], "required": [ "id" ] }, "BillCodeTaxSchema": { "type": "object", "properties": { "id": { "type": "integer", "example": 12 }, "name": { "type": "string", "example": "TPS" }, "percent": { "type": "number", "example": 12.5 } }, "required": [ "id", "name", "percent" ] }, "BillCodeScalarQuerySchema": { "allOf": [ { "$ref": "#/components/schemas/BillCodeCollectionQuerySchema" }, { "type": "object", "properties": { "rates": { "type": "array", "items": { "type": "string", "example": "123" } }, "taxes": { "type": "array", "items": { "$ref": "#/components/schemas/BillCodeTaxSchema" } }, "rounding_rule": { "$ref": "#/components/schemas/RoundingRuleSchema" }, "modifier_rules": { "type": "array", "items": { "$ref": "#/components/schemas/ModifierRuleSetQuerySchema" } } } } ] }, "RoundingRuleSchema": { "description": "The rounding rule that the Bill Code applies to a Visit's approved time", "type": "object", "properties": { "rounding_method": { "type": "string", "enum": [ "DONT_ROUND", "UP", "DOWN", "NEAREST", "THRESHOLD" ] }, "rounding_increment": { "type": "number" }, "rounding_threshold": { "type": "integer", "minimum": 1, "maximum": 59 }, "rounding_rule": { "type": "integer", "enum": [ 1, 2, 3 ], "x-enum-varnames": [ "SCHEDULED", "CLOCKED", "START_END" ] }, "is_breaks_included": { "type": "boolean" }, "auto_update": { "type": "boolean" } } }, "BillCodeUpdateBaseSchema": { "type": "object", "properties": { "gl_revenue_id": { "type": "integer", "example": 1 }, "rates": { "description": "Rates associated with the Billcode", "type": "array", "items": { "$ref": "#/components/schemas/BillCodeRateCreateSchema" } }, "funder_id": { "type": "integer", "example": 1 }, "taxes": { "description": "Taxes associated with the Billcode", "type": "array", "items": { "$ref": "#/components/schemas/LinkedEntitySchema" } }, "rounding_rule": { "$ref": "#/components/schemas/RoundingRuleSchema" }, "modifier_rules": { "type": "array", "items": { "$ref": "#/components/schemas/LinkedEntitySchema" } } } }, "BillCodeUpdateSchema": { "allOf": [ { "$ref": "#/components/schemas/BillCodeBaseSchema" }, { "$ref": "#/components/schemas/BillCodeUpdateBaseSchema" }, { "type": "object", "properties": { "rates": { "description": "Rates can be provided here for validation only", "type": "array", "items": { "$ref": "#/components/schemas/BillCodeRateCreateSchema" } } } } ] }, "BillCodeCreateSchema": { "allOf": [ { "$ref": "#/components/schemas/BillCodeBaseSchema" }, { "$ref": "#/components/schemas/BillCodeUpdateBaseSchema" }, { "type": "object", "properties": { "branch_id": { "type": "integer", "description": "ID of the branch the Billcode belongs to" } } } ], "required": [ "code", "name", "units", "bill_clocked_time", "send_decimal_units", "rates" ] }, "BillCodeBaseSchema": { "type": "object", "properties": { "code": { "description": "Billing code", "type": "string", "example": "Code" }, "name": { "description": "Billcode name", "type": "string", "example": "Name" }, "excluded_from_billing": { "description": "Flag indicating if the Billcode is excluded from billing", "type": "boolean", "example": true }, "is_midnight_rule_applicable": { "description": "Flag indicating if the midnight rule applies to this Billcode", "type": "boolean", "example": true }, "billing_increment": { "type": "integer", "example": 15 }, "location_indicator": { "type": "string", "example": "12" }, "revenue_code": { "type": "string", "example": "12345" }, "revenue_code_description": { "type": "string", "example": "Lorem Ipsum" }, "value_code": { "type": "string", "example": "D5" }, "value_code_amount": { "type": "string", "example": 22.5 }, "bill_using": { "type": "string", "enum": [ "scheduled_start_time_of_visit", "scheduled_end_time_of_visit", "scheduled_calculated_end_time_of_visit" ] }, "units": { "type": "string", "enum": [ "hours", "visits", "rate" ] }, "evv_service_group": { "type": "string", "example": "1234" }, "evv_rate_code": { "description": "Electronic Visit Verification Rate Code", "type": "string", "example": 23 }, "evv_payor_program_code": { "description": "Electronic Visit Verification Payor Program Code", "type": "string", "example": 23 }, "evv_category": { "description": "Electronic Visit Verification Category", "type": "string", "example": "Lorem Ipsum" }, "bill_clocked_time": { "description": "Bill Code bills against clocked time", "type": "boolean", "example": true }, "send_decimal_units": { "description": "Determines whether quantity for service lines are determined during claim generation\nor during bank calculation\n", "type": "boolean", "example": true } } }, "BillCodeCollectionQuerySchema": { "allOf": [ { "$ref": "#/components/schemas/BillCodeBaseSchema" }, { "type": "object", "properties": { "id": { "description": "Bill Code ID", "type": "integer", "example": 12 }, "is_disabled": { "description": "Flag indicating if the Billcode is disabled", "type": "boolean", "example": false }, "funder": { "$ref": "#/components/schemas/FunderStubSchema" }, "is_read_only": { "description": "Flag indicating if the Billcode is read only", "type": "boolean", "example": false }, "guid": { "description": "Globally Unique Identifier", "type": "integer", "example": 12 }, "gl_revenue": { "$ref": "#/components/schemas/AccountStub" }, "branch": { "$ref": "#/components/schemas/BranchSchema" } } } ], "required": [ "id", "code", "name", "excluded_from_billing", "is_midnight_rule_applicable", "is_disabled" ] }, "ModifierRuleSchema": { "type": "object", "properties": { "id": { "type": "integer", "example": 12, "minimum": 1 }, "code": { "type": "string", "example": "code" }, "rule_type": { "type": "integer", "example": 1 } } }, "ModifierRuleSetQuerySchema": { "type": "object", "properties": { "id": { "type": "integer", "example": 12, "minimum": 1 }, "name": { "type": "string", "example": "modifer_rule_name" }, "description": { "type": "string", "example": "A rule that modifies" }, "branch_id": { "type": "integer", "example": 1 }, "type": { "type": "integer", "example": 1 }, "rules": { "type": "array", "items": { "$ref": "#/components/schemas/ModifierRuleSchema" } } } }, "FunderStubSchema": { "description": "Funder associated with the Billcode", "type": "object", "properties": { "id": { "type": "integer", "example": 12, "minimum": 1 }, "name": { "type": "string", "example": "Funder" } } }, "TransactionSchema": { "type": "object", "description": "A representation of an accounting transaction", "readOnly": true, "properties": { "id": { "type": "integer", "format": "int64", "description": "Reference ID" }, "posting_date": { "type": "string", "format": "date", "description": "Posting date in the `YYYY-MM-DD` format" }, "type": { "$ref": "#/components/schemas/TransactionType" }, "amount": { "type": "number", "format": "float", "description": "The amout of the transaction." }, "unallocated_amount": { "type": "number", "format": "float", "description": "The unallocated amount of the transaction." }, "allocations_count": { "type": "integer", "format": "int64", "description": "The number of allocations that this transaction has" }, "invoice_id": { "type": "integer", "format": "int64", "description": "The id of the invoice associated to the transaction; Applicable for transactions of type sale, void and credit/debit notes." }, "invoice_number": { "type": "integer", "format": "int64", "description": "The invoice item id of the invoice item associated to the transaction; Applicable for transactions of type sale, void and credit/debit notes." }, "invoice_item_id": { "type": "integer", "format": "int64", "description": "The invoice number of the invoice associated to the transaction; Applicable for transactions of type sale, void and credit/debit notes." }, "budget_id": { "type": "integer", "format": "int64", "description": "The budget id of the budget associated to the transaction" }, "memo": { "type": "string", "description": "A note about the transaction." }, "payment_is_canceled": { "type": "boolean", "description": "whether or not the payment is canceled (currently always false)", "example": true }, "is_adjustable": { "type": "boolean", "description": "whether or not adjustment transaction types exist for this transaction", "example": true }, "created_at": { "type": "string", "format": "date-time" }, "client": { "$ref": "#/components/schemas/ClientShortSchema" }, "funder": { "$ref": "#/components/schemas/FunderShortSchema" }, "billing_contact": { "$ref": "#/components/schemas/BillingContactShortSchema" }, "create_user": { "$ref": "#/components/schemas/UserShortSchema" }, "adjustments": { "$ref": "#/components/schemas/TransactionAdjustmentSchema" }, "billing_period_id": { "type": "integer", "minimum": 1, "description": "The id of the billing period associated to the transaction" } } }, "TransactionExtendedSchema": { "allOf": [ { "$ref": "#/components/schemas/TransactionSchema" }, { "type": "object", "properties": { "entries": { "type": "array", "items": { "$ref": "#/components/schemas/TransactionEntrySchema" } }, "visits": { "type": "array", "items": { "$ref": "#/components/schemas/VisitSchema" } } } } ] }, "VisitSchema": { "type": "object", "properties": { "id": { "type": "integer", "minimum": 1 }, "start_time": { "type": "string", "format": "date-time" } } }, "TransactionType": { "description": "Transaction type", "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "description": "The id of the transaction type" }, "name": { "type": "string", "description": "The name of transaction type" }, "AR_entry": { "type": "string", "description": "The entry type", "enum": [ "credit", "debit" ] }, "is_disabled": { "type": "boolean", "description": "True if no transaction of that type can be created by the user; False if not" }, "is_custom": { "type": "boolean", "description": "True if this type is custom (was created by the user); False if not" } } }, "ClientShortSchema": { "type": "object", "description": "A client", "properties": { "id": { "type": "integer", "format": "int64", "description": "The ID of the client" }, "name": { "type": "string", "description": "The name of the client" }, "alayacare_id": { "type": "string", "description": "The AlayaCare ID of the client" } }, "example": { "id": 1, "name": "Peter Tosh", "alayacare_id": "AC000000123" } }, "FunderShortSchema": { "type": "object", "description": "A funder", "properties": { "id": { "type": "integer", "format": "int64", "description": "The ID of the funder" }, "code": { "type": "string", "description": "The code of the funder" }, "name": { "type": "string", "description": "The name of the funder" }, "invoicing_model": { "type": "string", "description": "The invoicing model of the funder" } } }, "BillingContactShortSchema": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "description": "The ID of the billing contact" }, "full_name": { "type": "string", "description": "The full name of the billing contact" } } }, "UserShortSchema": { "type": "object", "description": "A user", "properties": { "id": { "type": "integer", "format": "int64", "description": "The ID of the user" }, "name": { "type": "string", "description": "The name of the user" } } }, "TransactionAdjustmentSchema": { "type": "object", "properties": { "total_credit": { "type": "number", "format": "float", "description": "description" }, "total_debit": { "type": "number", "format": "float", "description": "description" } } }, "TransactionEntrySchema": { "type": "object", "properties": { "account": { "type": "object", "properties": { "id": { "type": "integer" }, "account": { "$ref": "#/components/schemas/AccountSchema" }, "debit": { "type": "number", "format": "float" }, "credit": { "type": "number", "format": "float" }, "cost_centre": { "$ref": "#/components/schemas/CostCentreScalarSchema" } } } } }, "CostCentreScalarSchema": { "description": "A cost centre", "type": "object", "properties": { "id": { "type": "integer", "example": 1 }, "number": { "type": "string", "example": "MTL-032" }, "description": { "type": "string", "example": "A cost centre" } } }, "AccountSchema": { "type": "object", "description": "A representation of a General Ledger account", "properties": { "id": { "type": "integer", "description": "The ID the GL account" }, "name": { "type": "string", "description": "The name of the GL account" }, "type": { "type": "string", "description": "The type of the GL account" }, "is_disabled": { "type": "boolean", "description": "Whether this GL account is disabled." }, "gl_number": { "type": "integer", "description": "The account number on the General Ledger." } }, "example": { "id": 2, "name": "Revenue - Product A", "type": "Revenue", "is_disabled": false, "gl_number": 4002 } } } }, "security": [ { "basic_auth": [] } ], "tags": [ { "name": "Accounts" }, { "name": "Activity Codes" }, { "name": "Bill Code Rate RRules" }, { "name": "Bill Code Rates" }, { "name": "Bill Codes" }, { "name": "Billing Cycles" }, { "name": "Billing Periods" }, { "name": "Client Cost Centres" }, { "name": "Cost Centres" }, { "name": "Employee Cost Centres" }, { "name": "EVV Export" }, { "name": "Funders" }, { "name": "Invoice Items" }, { "name": "Invoices" }, { "name": "Premium Bill Codes" }, { "name": "Premiums" }, { "name": "Service Codes" }, { "name": "Status Reasons" }, { "name": "Transactions" }, { "name": "Time Off Types" }, { "name": "Visit Premiums" } ] }