Introduction
The Hayylo Inbound API allows customers send data to their Hayylo account in bulk. It is limited to customers who have purchased the API module as part of their overall Hayylo license.
Access
All licensed customers will receive their credentials from their account manager or the Hayylo support team. The API credentials consist of keys which must be provided as HTTP headers in all API requests.
Usage
All customer API accounts are limited in usage. Limits apply to requests per second and overall requests per month. For more information about these limits please speak to your Hayylo account manager or contact Hayylo support.
Request types
The Inbound API lets customers send the following data types to their account:
Request details
- All requests use JSON via HTTP POST
- All requests require API credentials to be provided via HTTP headers (see the Swagger documentation)
- All requests accept an array of objects of a single data type (listed above)
- All requests will use the same wrapper object that includes data pertaining to the company account. This data must match the company associated with the authorization credentials provided.
- In the wrapper object, the the schema field will specify the type of data that will be provided in the dataSet array
Example request: Clients
{
"companyCode": "hayylocare",
"instanceId": "100",
"schemaType": "client",
"dataSet": [
{
"id": "CLIENT_ID_001",
"firstName": "Betty",
"lastName": "Smith",
"phone": "0280008000", /* home phone */
"phone2": "0404000000", /* mobile */
"email": "bettysmith@email.com",
"address": "1 George St",
"suburb": "Sydney",
"postCode": "2000",
"state": "NSW",
"gender": "female",
"dob": "1950-01-01",
"team": "Central Sydney Region",
"importStatus": "NEW"
}
]
}
Example request: Clients Contacts
{
"companyCode": "hayylocare",
"instanceId": "100",
"schemaType": "family",
"dataSet": [
{
"id": "FAMILY_ID_001",
"linkedClientId": "CLIENT_ID_001",
"faFName": "Andrew Smith", /* note first and last name included in field */
"mobile": "0404000001",
"phone1": "", /* deprecated - leave blank */
"phone2": "0243900900", /* home phone */
"email": "andrewsmith@email.com",
"importStatus": "NEW"
}
]
}
Example request: Workers
{
"companyCode": "hayylocare",
"instanceId": "100",
"schemaType": "worker",
"dataSet": [
{
"id": "WORKER_ID_001",
"firstName": "May",
"lastName": "Simpson"
"phone": "0404000003",
"email": "maysimpson@email.com",
"gender": "female",
"dob": "1960-01-01",
"team": "Care Workers",
"importStatus": "NEW"
}
]
}
Example request: Schedule
{
"companyCode": "hayylocare",
"instanceId": "100",
"schemaType": "schedule",
"dataSet": [
{
"id": "VISIT_ID_001",
"clientId": "CLIENT_ID_001",
"workerId": "WORKER_ID_001",
"duration": "60",
"startDate": "2024-01-05",
"startTime": "08:00",
"preferredStartDate": null,
"preferredStartTime": null,
"preferredEndTime": null,
"serviceType": "Personal Care",
"importStatus": "NEW"
},
{
"id": "VISIT_ID_002",
"clientId": "CLIENT_ID_001",
"workerId": "WORKER_ID_002",
"duration": "30",
"startDate": "2024-01-05",
"startTime": "13:00",
"preferredStartDate": null,
"preferredStartTime": null,
"preferredEndTime": null,
"serviceType": "Transport",
"importStatus": "CHANGED"
},
{
"id": "VISIT_ID_003",
"clientId": "CLIENT_ID_001",
"workerId": "WORKER_ID_003",
"duration": "45",
"startDate": "2024-01-05",
"startTime": "15:30",
"preferredStartDate": null,
"preferredStartTime": null,
"preferredEndTime": null,
"serviceType": "Domestic Assistance",
"importStatus": "CANCELLED"
}
]
}
Example request: Documents
{
"companyCode": "hayylocare",
"instanceId": "100",
"schemaType": "clientDocument",
"dataSet": [
{
"id":"ABC_DOC_001",
"clientId":"ABC_CL_001",
"fileType":"Care Plan",
"fileTitle":"BettyJones-CarePlan-2023",
"fileExtension": "pdf",
"clientVisible": true,
"workerVisible": true,
"importStatus": "new",
"data": "sskdsksdjaksjaksjak8uXrp/Og0MTGCjMgMCBvYmoKPDwgL0ZpbHRlciA="
}
]
}
Response
The Inbound API is an asynchronous API that only acts a data receiver, therefore it only validates that the format of the API request wrapper is correct. It does not validate whether the format of the request objects are valid or whether the request object data is then successfully imported into the Hayylo account. To check import status for the new or updated data, please check directly in your Hayylo account for the updated data. If changes do not appear after a reasonable amount of time (eg, 5-10 minutes) please check with Hayylo support who can help to identify any import errors that may have occurred.
Size restrictions
The inbound API can only receive requests of up to 6MB in size. This limit applies to all data import types however should specifically be considered when using the API to send client documents as the contents of the uploaded files are contained in the request as base64-encoded strings. Therefore, the caller must ensure that the total size of all of the include encoded files, plus the additional content required for the API request, does not exceed 6MB. Given that documents are typically made available to clients through the Hayylo app on their mobile phone, Hayylo strongly recommends that file sizes are kept as small as possible. Typically a size of 200k-500k should suffice.
Documentation
Swagger documentation can be found here.