AlayaCare · Schema
AlayaCare Scheduler API Schemas
Home CareCommunity CareHealthcareSchedulingClinicalBillingClient ManagementCare ManagementAged CareWorkforce Management
JSON Schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "AlayaCare Scheduler API Schemas",
"definitions": {
"Branch": {
"description": "AlayaCare branch",
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Branch ID",
"example": 1000
},
"name": {
"type": "string",
"description": "Branch name",
"example": "Toronto branch"
}
}
},
"PayCode": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Pay Code ID",
"example": 1
},
"code": {
"type": "string",
"description": "Pay Code Code",
"example": "1"
},
"description": {
"type": "string",
"description": "Pay Code Description",
"example": "1"
},
"rate": {
"type": "number",
"description": "Rate",
"example": 23.345
},
"unit": {
"type": "string",
"description": "Unit",
"example": "hours | visits | amount"
}
}
},
"VisitAccounting": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Visit ID",
"example": 1
},
"hours_approved": {
"type": "number",
"description": "Hours Approved",
"example": 1.0
},
"pay_code_regular": {
"$ref": "#/definitions/PayCode"
},
"pay_code_overtime": {
"$ref": "#/definitions/PayCode"
}
}
},
"FacilityList": {
"type": "object",
"allOf": [
{
"$ref": "#/definitions/PaginatedList"
}
],
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/Facility"
}
}
}
},
"Facility": {
"description": "AlayaCare facility",
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "AlayaCare facility ID",
"example": 1
},
"name": {
"type": "string",
"description": "AlayaCare facility name",
"example": "Toronto Facility"
},
"profile": {
"$ref": "#/definitions/FacilityProfile"
},
"branch": {
"$ref": "#/definitions/Branch"
}
},
"required": [
"id",
"name"
]
},
"FacilityProfile": {
"description": "Collection of key/value pairs where keys are existing attributes in the agency profile, defined through\nthe AlayaCare web application.\nOn the example below default profile keys for the facility profile are used.\nExample profile attributes:\n+ `name`: string\n+ `city`: string\n+ `title`: string\n+ `state`: string\n+ `contact_type`: string\n+ `fax`: string\n+ `company`: string\n+ `phone_other`: string\n+ `phone_main`: string\n+ `address`: string\n+ `country`: string\n+ `zip`: string\n+ `address_suite`: string\n+ `remarks`: string\n",
"type": "object",
"properties": {
"name": {
"description": "Facility name",
"type": "string",
"example": "Alayacare"
}
}
},
"ClientDetails": {
"description": "Visit client details",
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "AlayaCare client ID",
"example": 1001
},
"external_id": {
"type": "string",
"description": "External client ID",
"example": "sor_client_id_1",
"x-nullable": true
},
"profile_id": {
"type": "integer",
"description": "AlayaCare client profile ID",
"example": 7890
},
"full_name": {
"type": "string",
"description": "Client full name",
"example": "John Smith"
},
"timezone": {
"type": "string",
"description": "Time Zone name in IANA format (iana.org/time-zones)",
"example": "America/Toronto"
}
},
"required": [
"id",
"full_name"
]
},
"ClientBranchDetails": {
"description": "Visit client details",
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "AlayaCare client ID",
"example": 1001
},
"external_id": {
"type": "string",
"description": "External client ID",
"example": "sor_client_id_1",
"x-nullable": true
},
"profile_id": {
"type": "integer",
"description": "AlayaCare client profile ID",
"example": 7890
},
"full_name": {
"type": "string",
"description": "Client full name",
"example": "John Smith"
},
"timezone": {
"type": "string",
"description": "Time Zone name in IANA format (iana.org/time-zones)",
"example": "America/Toronto"
},
"branch_id": {
"type": "integer",
"description": "AlayaCare branch ID",
"example": 1000
}
},
"required": [
"id",
"full_name"
]
},
"EmployeeDetails": {
"description": "Visit employee details",
"type": "object",
"x-nullable": true,
"properties": {
"id": {
"type": "integer",
"description": "AlayaCare employee ID",
"example": 1001
},
"external_id": {
"type": "string",
"description": "External employee ID",
"example": "sor_employee_id_1",
"x-nullable": true
},
"profile_id": {
"type": "integer",
"description": "AlayaCare client profile ID",
"example": 7891
},
"full_name": {
"type": "string",
"description": "Employee full name",
"example": "Jane Smith"
},
"email": {
"type": "string",
"description": "Employee email",
"example": "[email protected]"
},
"timezone": {
"type": "string",
"description": "Time Zone name in IANA format (iana.org/time-zones)",
"example": "America/Toronto"
}
},
"required": [
"id",
"full_name"
]
},
"SuccessResponse": {
"description": "Success response.",
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "AlayaCare ID",
"example": 1001
},
"external_id": {
"type": "string",
"description": "External ID",
"example": "entity_external_id"
}
},
"required": [
"id",
"external_id"
]
},
"VisitUpdatePartialSuccessResponse": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"example": 207,
"description": "Response code"
},
"message": {
"type": "string",
"example": "Partial success when locking visits. Visits are not approved or could not be found",
"description": "Detailed error message"
},
"alayacare_visit_ids": {
"type": "array",
"description": "List of Alayacare visit IDs",
"items": {
"type": "integer",
"description": "Alayacare visit ID.",
"example": 1245
}
},
"visit_ids": {
"type": "array",
"description": "List of Alayacare external visit IDs",
"items": {
"type": "string",
"description": "Alayacare external visit ID.",
"example": "ext_visit_1245"
}
}
}
},
"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"
]
},
"BaseVisit": {
"type": "object",
"properties": {
"alayacare_employee_id": {
"type": "integer",
"description": "AlayaCare employee ID",
"example": 101,
"x-nullable": true
},
"alayacare_service_id": {
"type": "integer",
"description": "AlayaCare service ID",
"example": 1
},
"alayacare_visit_id": {
"type": "integer",
"description": "AlayaCare visit ID",
"example": 10001
},
"employee_id": {
"type": "string",
"description": "External employee ID",
"example": "sor_employee_id_1",
"x-nullable": true
},
"service_id": {
"type": "string",
"description": "External service ID",
"example": "sor_service_id_1",
"x-nullable": true
},
"visit_id": {
"type": "string",
"description": "External visit ID",
"example": "sor_visit_id_1",
"x-nullable": true
},
"status": {
"type": "string",
"description": "Status of the visit based on status hierarchy from AlayaCare web application.",
"example": "scheduled",
"enum": [
"scheduled",
"vacant",
"on_hold",
"cancelled",
"offered",
"clocked",
"late",
"completed",
"missed",
"approved"
]
},
"start_at": {
"type": "string",
"format": "date-time",
"description": "Visit start time (ISO 8601)",
"example": "2017-07-08T13:30:00+00:00"
},
"end_at": {
"type": "string",
"format": "date-time",
"description": "Visit end time (ISO 8601)",
"example": "2017-07-08T14:00:00+00:00"
},
"notes": {
"type": "array",
"items": {
"$ref": "#/definitions/VisitNote"
}
},
"tags": {
"type": "array",
"items": {
"$ref": "#/definitions/VisitTag"
}
},
"cancelled": {
"type": "boolean",
"description": "Indicates if visit is cancelled"
},
"cancel_code": {
"$ref": "#/definitions/VisitCancelCode"
}
},
"required": [
"alayacare_service_id",
"alayacare_visit_id",
"start_at",
"end_at",
"cancelled",
"cancel_code"
]
},
"VisitListDetails": {
"allOf": [
{
"$ref": "#/definitions/BaseVisit"
}
],
"properties": {
"alayacare_client_id": {
"type": "integer",
"description": "AlayaCare client ID",
"example": 1001
},
"client_id": {
"type": "string",
"description": "External client ID",
"example": "sor_client_id_1",
"x-nullable": true
},
"break_minutes": {
"type": "integer",
"description": "Break minutes for the visit",
"example": 10,
"x-nullable": true
}
},
"required": [
"alayacare_client_id"
]
},
"Visit": {
"allOf": [
{
"$ref": "#/definitions/BaseVisit"
}
],
"properties": {
"alayacare_client_id": {
"type": "integer",
"description": "AlayaCare client ID",
"example": 1001
},
"client_id": {
"type": "string",
"description": "External client ID",
"example": "sor_client_id_1",
"x-nullable": true
}
},
"required": [
"alayacare_client_id"
]
},
"VisitIDList": {
"type": "object",
"properties": {
"alayacare_visit_ids": {
"type": "array",
"description": "List of Alayacare visit IDs (visit IDs should be listed separated by a coma)",
"example": [
1245,
1246
],
"items": {
"type": "integer",
"description": "Alayacare visit ID.",
"required": [
"alayacare_visit_ids"
]
}
},
"visit_ids": {
"type": "array",
"description": "List of Alayacare external visit IDs",
"example": [
"ext_visit_1245",
"ext_visit_1246"
],
"items": {
"type": "string",
"description": "Alayacare external visit ID (External visit IDs should be listed separated by a coma).",
"required": [
"visit_ids"
]
}
}
}
},
"FacilityVisit": {
"allOf": [
{
"$ref": "#/definitions/BaseVisit"
}
],
"properties": {
"alayacare_facility_id": {
"type": "integer",
"description": "AlayaCare facility ID",
"example": 1001
},
"facility_id": {
"type": "string",
"description": "External facility ID",
"example": "sor_facility_id_1",
"x-nullable": true
},
"break_minutes": {
"type": "integer",
"description": "Break minutes for the visit",
"example": 10,
"x-nullable": true
}
},
"required": [
"alayacare_facility_id"
]
},
"VisitList": {
"allOf": [
{
"$ref": "#/definitions/PaginatedList"
}
],
"description": "Paginated list of visits",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/VisitListDetails"
}
}
}
},
"FacilityVisitList": {
"allOf": [
{
"$ref": "#/definitions/PaginatedList"
}
],
"description": "Paginated list of visits",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/FacilityVisit"
}
}
}
},
"VisitServiceDetails": {
"description": "Visit service details",
"type": "object",
"properties": {
"id": {
"description": "AlayaCare service ID",
"type": "integer",
"example": 1
},
"external_id": {
"description": "External service ID",
"type": "string",
"example": "sor_service_record_1",
"x-nullable": true
},
"name": {
"description": "Service name",
"type": "string",
"example": "Wound Care"
},
"service_code_id": {
"description": "AlayaCare service code id",
"type": "integer",
"example": 1
},
"service_code_name": {
"description": "AlayaCare service code name",
"type": "string",
"example": "WOUND-CARE"
}
},
"required": [
"id",
"name",
"service_code_id",
"service_code_name"
]
},
"VisitFunderDetails": {
"description": "Visit funder details",
"type": "object",
"properties": {
"id": {
"description": "AlayaCare funder ID",
"type": "integer",
"example": 1
},
"external_id": {
"description": "External funder ID",
"type": "string",
"example": "sor_funder_id_1",
"x-nullable": true
},
"name": {
"description": "Funder name",
"type": "string",
"example": "Insurance Company"
},
"code": {
"description": "Funder code",
"type": "string",
"example": "IC-1"
},
"organization": {
"description": "Organization",
"type": "string",
"example": "Home Healthcare Agency"
},
"organization_code": {
"description": "Organization code",
"type": "string",
"example": "HHC-0101"
},
"percentage": {
"type": "integer",
"example": 100
}
},
"required": [
"id",
"name"
]
},
"VisitTimekeeping": {
"description": "The state of the verified start and end times",
"type": "object",
"properties": {
"verified_start_time": {
"description": "Datetime string referring to the time the first clock in happened, or one manually overwritten",
"type": "string",
"format": "date-time",
"example": "2017-07-08T13:30:00+00:00"
},
"verified_end_time": {
"description": "Datetime string referring to the time the last clock out happened, or one manually overwritten",
"type": "string",
"format": "date-time",
"example": "2017-07-08T13:40:00+00:00"
},
"is_verified_start_time_overwritten": {
"description": "This is true in case the verified_start_time was overwritten by the user and false if is the default from the work-sessions",
"type": "boolean",
"example": false
},
"is_verified_end_time_overwritten": {
"description": "This is true in case the verified_end_time was overwritten by the user and false if is the default from the work-sessions",
"type": "boolean",
"example": false
}
}
},
"Location": {
"description": "User location information",
"type": "object",
"x-nullable": true,
"properties": {
"lat": {
"type": "number",
"description": "latitude",
"example": 45.518
},
"lng": {
"type": "number",
"description": "longitude",
"example": -73.582
}
}
},
"VisitWorkSession": {
"type": "object",
"description": "Visit work session",
"properties": {
"clock_in": {
"description": "Work session start time",
"type": "string",
"format": "date-time",
"example": "2017-07-08T13:30:00+00:00"
},
"clock_out": {
"description": "Work session end time",
"type": "string",
"format": "date-time",
"example": "2017-07-08T14:30:00+00:00",
"x-nullable": true
},
"employee_id": {
"description": "Work session employee id",
"type": "integer",
"example": 101
},
"clock_in_location": {
"$ref": "#/definitions/Location"
},
"clock_out_location": {
"$ref": "#/definitions/Location"
}
}
},
"VisitDailyActivity": {
"type": "object",
"description": "Activity of daily living",
"properties": {
"name": {
"type": "string",
"description": "ADL description",
"example": "Take out the trash"
},
"completed": {
"type": "boolean",
"description": "Indicates if the ADL was completed during the visit",
"example": false
},
"reason": {
"type": "string",
"description": "Reason why the ADL was not completed, in case it wasn't",
"example": "Not a garbage day",
"x-nullable": true
}
}
},
"VisitTagList": {
"allOf": [
{
"$ref": "#/definitions/PaginatedList"
}
],
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/VisitTag"
}
}
}
},
"VisitTagCreate": {
"type": "array",
"description": "An array of visit tags.",
"items": {
"$ref": "#/definitions/VisitTag"
}
},
"VisitTag": {
"type": "string",
"description": "Name of tag.",
"example": "First visit"
},
"VisitNoteCreate": {
"description": "Visit note",
"type": "object",
"properties": {
"text": {
"type": "string",
"description": "Content of the visit note",
"maxLength": 1000,
"example": "A sample visit note."
}
},
"required": [
"text"
]
},
"VisitInterventionsUpdate": {
"description": "Interventions",
"type": "object",
"properties": {
"interventions": {
"type": "string",
"description": "list of visit intervention ids",
"example": "[1, 2, 3, 4]"
}
}
},
"VisitNote": {
"allOf": [
{
"$ref": "#/definitions/VisitNoteCreate"
}
],
"properties": {
"created_at": {
"type": "string",
"format": "date-time",
"description": "Creation time of the note",
"example": "2017-07-08T13:30:00+00:00"
}
},
"required": [
"created_at"
]
},
"VisitFacilityDetails": {
"description": "Visit facility",
"type": "object",
"x-nullable": true,
"properties": {
"id": {
"type": "integer",
"description": "AlayaCare facility ID",
"example": 1
},
"name": {
"type": "string",
"description": "Facility name",
"example": "Clinic name"
},
"external_id": {
"type": "string",
"description": "External facility ID",
"example": "sor_clinic_id_1",
"x-nullable": true
},
"timezone": {
"type": "string",
"description": "Time Zone name in IANA format (iana.org/time-zones)",
"example": "America/Toronto"
}
},
"required": [
"id",
"name"
]
},
"VisitCancelCode": {
"description": "Visit cancellation code",
"type": "object",
"x-nullable": true,
"properties": {
"id": {
"type": "integer",
"description": "AlayaCare cancel code ID",
"example": 1
},
"code": {
"type": "string",
"description": "Cancel code",
"example": "CLNT_REQ_RESCHEDULE"
},
"description": {
"type": "string",
"description": "Cancel code description",
"example": "Client requested reschedule",
"x-nullable": true
}
},
"required": [
"id",
"code"
]
},
"VisitCancelCodeList": {
"allOf": [
{
"$ref": "#/definitions/PaginatedList"
}
],
"description": "Paginated list of cancel codes",
"properties": {
"items": {
"type": "array",
"items": {
"allOf": [
{
"$ref": "#/definitions/VisitCancelCode"
}
],
"properties": {
"branch": {
"$ref": "#/definitions/Branch"
}
}
}
}
}
},
"VisitActivityCode": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "AlayaCare activity code ID",
"example": 1
},
"code": {
"type": "string",
"description": "Activity code",
"example": "01- Assessment"
},
"description": {
"type": "string",
"description": "Activity code description",
"example": "New client assessment"
}
},
"required": [
"id",
"code"
]
},
"VisitSkill": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "AlayaCare activity code ID",
"example": 1
},
"description": {
"type": "string",
"description": "Skill description",
"example": "Driver License"
}
},
"required": [
"id"
]
},
"Address": {
"type": "object",
"properties": {
"order": {
"type": "integer",
"description": "Order of location in route",
"example": 1
},
"is_home_address": {
"type": "boolean",
"description": "If address defined matches the client address from the client profile, this value is true. Otherwise, the value is false.",
"example": true
},
"latitude": {
"type": "number",
"description": "Latitude of the address",
"example": 45.5017
},
"longitude": {
"type": "number",
"description": "Longitude of the address",
"example": 73.5673
},
"address_1": {
"type": "string",
"description": "First line of the address",
"example": "4200 St Laurent Blvd"
},
"address_2": {
"type": "string",
"description": "Second line of the address",
"example": "800"
},
"city": {
"type": "string",
"description": "City",
"example": "Montreal"
},
"state": {
"type": "string",
"description": "State or province",
"example": "QC"
},
"zip_code": {
"type": "string",
"description": "ZIP or postal code",
"example": "H2W 2R2"
},
"country": {
"type": "string",
"description": "Country",
"example": "Canada"
}
}
},
"BaseVisitDetails": {
"type": "object",
"properties": {
"alayacare_employee_id": {
"type": "integer",
"format": "int64",
"description": "AlayaCare employee ID",
"example": 101,
"x-nullable": true
},
"alayacare_service_id": {
"type": "integer",
"format": "int64",
"description": "AlayaCare service ID",
"example": 1
},
"alayacare_visit_id": {
"type": "integer",
"format": "int64",
"description": "AlayaCare visit ID",
"example": 10001
},
"employee_id": {
"type": "string",
"description": "External employee ID",
"example": "sor_employee_id_1",
"x-nullable": true
},
"service_id": {
"type": "string",
"description": "External service ID",
"example": "sor_service_id_1",
"x-nullable": true
},
"visit_id": {
"type": "string",
"description": "External visit ID",
"example": "sor_visit_id_1",
"x-nullable": true
},
"status": {
"type": "string",
"description": "Status of the visit based on status hierarchy from AlayaCare web application.",
"example": "scheduled",
"enum": [
"scheduled",
"vacant",
"on_hold",
"cancelled",
"offered",
"clocked",
"late",
"completed",
"missed",
"approved"
]
},
"start_at": {
"type": "string",
"format": "date-time",
"description": "Visit start time (ISO 8601)",
"example": "2017-07-08T13:30:00+00:00"
},
"end_at": {
"type": "string",
"format": "date-time",
"description": "Visit end time (ISO 8601)",
"example": "2017-07-08T14:00:00+00:00"
},
"cancelled": {
"type": "boolean",
"description": "Indicates if visit is cancelled"
},
"employee": {
"$ref": "#/definitions/EmployeeDetails"
},
"service": {
"$ref": "#/definitions/VisitServiceDetails"
},
"funders": {
"description": "Visit funders",
"type": "array",
"items": {
"$ref": "#/definitions/VisitFunderDetails"
}
},
"work_sessions": {
"type": "array",
"items": {
"$ref": "#/definitions/VisitWorkSession"
}
},
"adls": {
"type": "array",
"items": {
"$ref": "#/definitions/VisitDailyActivity"
}
},
"notes": {
"type": "array",
"items": {
"$ref": "#/definitions/VisitNote"
}
},
"cancel_code": {
"$ref": "#/definitions/VisitCancelCode"
},
"activity_codes": {
"type": "array",
"items": {
"$ref": "#/definitions/VisitActivityCode"
}
},
"skills": {
"type": "array",
"items": {
"$ref": "#/definitions/VisitSkill"
}
},
"tags": {
"type": "array",
"items": {
"$ref": "#/definitions/VisitTag"
}
},
"service_instructions": {
"description": "Service instructions",
"type": "string",
"example": "Call in the morning to confirm each visit",
"x-nullable": true
},
"service_code_id": {
"description": "Visit override service code id.",
"type": "integer",
"example": 1,
"x-nullable": true
},
"service_code_name": {
"description": "Visit override service code name.",
"type": "string",
"example": "Default Appointment",
"x-nullable": true
},
"route": {
"type": "array",
"items": {
"$ref": "#/definitions/Address"
}
}
},
"required": [
"alayacare_service_id",
"alayacare_visit_id",
"start_at",
"end_at",
"cancelled",
"employee",
"service",
"work_sessions",
"adls",
"notes",
"cancel_code",
"activity_codes",
"tags",
"service_instructions"
]
},
"VisitDetails": {
"allOf": [
{
"$ref": "#/definitions/BaseVisitDetails"
}
],
"properties": {
"alayacare_visit_guid": {
"type": "integer",
"format": "int64",
"description": "AlayaCare visit GUID",
"example": 10002
},
"alayacare_client_id": {
"type": "integer",
"format": "int64",
"description": "AlayaCare client ID",
"example": 1001
},
"client_id": {
"type": "string",
"description": "External client ID",
"example": "sor_client_id_1",
"x-nullable": true
},
"client": {
"$ref": "#/definitions/ClientBranchDetails"
},
"facility": {
"$ref": "#/definitions/VisitFacilityDetails"
},
"timekeeping": {
"$ref": "#/definitions/VisitTimekeeping"
}
},
"required": [
"alayacare_client_id",
"client"
]
},
"FacilityVisitDetails": {
"allOf": [
{
"$ref": "#/definitions/BaseVisitDetails"
}
],
"properties": {
"alayacare_facility_id": {
"format": "int64",
"description": "AlayaCare ID of the facility",
"example": 1001
},
"facility_id": {
"type": "string",
"description": "External ID of the facility",
"example": "facility_ext_id",
"x-nullable": true
},
"facility": {
"$ref": "#/definitions/ClientDetails"
}
},
"required": [
"alayacare_facility_id",
"facility_id"
]
},
"BaseVisitUpdate": {
"description": "AlayaCare visit entity data for updates",
"type": "object",
"properties": {
"visit_id": {
# --- truncated at 32 KB (76 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/api-evangelist-alayacare/refs/heads/main/json-schema/alayacare-scheduler-schema.json