Skip to main content

Sync process

caution

This process is required to enable the integration in production environment.

We periodically run a synchronization process to check if data is consistent across both platforms (Maple and Partner).

This process will compare data from both sides and raise alerts if something is inconsistent.

For example: Suppose the scheduler created a new shift on Maple. We will send you a webhook call, and the shift should be available on your system. Someone booked this record on your platform, but it failed to send it to Maple for some reason. Now, both systems are out of sync.

This process aims to catch this kind of scenario before our end users notice it or cause more issues, like double bookings.

In order to check the data, we require that you provide two endpoints:

  • List shifts: this endpoint must return all shifts that should be available in Maple
  • Get shift: this endpoint must return the requested record based on its ID from your system

List shifts

This API must return all shifts that should be available in Maple. It should return a list of shifts considering the following format:

{
"data": [
{
"attributes": {
"mapleShiftId": "string",
"externalFacilityId": "string",
"startTime": "2023-12-21T13:44:29.497Z", // UTC
"endTime": "2023-12-21T13:44:29.497Z", // UTC
"shiftLabel": "string",
"workerRequirements": "string",
"assignedTo": {
"externalUserId": "string",
"firstName": "string",
"lastName": "string",
"email": "string",
"phone": "string"
},
"version": "1"
},
"id": "string", // your id
"type": "shift"
}
],
"links": {
"prev": "previousPageLink",
"next": "nextPageLink"
}
}

We will call this endpoint with the following query parameters:

  • externalFacilityId: the facility ID on your side to filter the shifts
  • startDate: the start date to filter the shifts. It is in UTC timezone
  • endDate: the end date to filter the shifts. It is in UTC timezone

Also, as you can see, you can paginate the list of shifts. You just need to send the next property inside links. We will call the next pages sequentially.

Get shift

This API must return the requested record based on its ID from your system. It should return a shift considering the following format:

{
"data": {
"attributes": {
"mapleShiftId": "string",
"externalFacilityId": "string",
"startTime": "2023-12-21T13:44:29.497Z", // UTC
"endTime": "2023-12-21T13:44:29.497Z", // UTC
"shiftLabel": "string",
"workerRequirements": "string",
"assignedTo": {
"externalUserId": "string",
"firstName": "string",
"lastName": "string",
"email": "string",
"phone": "string"
},
"version": "1"
},
"id": "string", // your id
"type": "shift"
}
}

We will call this endpoint with the following path parameters (added to the end of the URL):

  • shiftId: the shift ID on your side

Authentication and headers

We also support configuring authentication and custom headers when we call these endpoints.

Both the endpoints and custom headers are set up using internal tools, so you don't need to manage that on Maple.