The RotaCloud API is organized around REST. Our API has predictable, resource-oriented URLs, and uses HTTP response codes to indicate API errors.
Authentication to the API is performed via HTTP Bearer Auth. You must provide an Authorization header in the format Bearer your-api-key-here. You can generate API keys from within your RotaCloud account. By default you will be authenticated as an anonymous user with administrative permissions. You can make calls on behalf of a specific user by providing a User header containing the ID of an active user within the account.
We use conventional HTTP response codes to indicate the success or failure of an API request. In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error. Codes in the 5xx range indicate an error with our servers (these are rare).
Calls which fail will generally be accompanied by a human readable description of what went wrong. This will be included in an error property on the response.
In order to keep our servers happy, requests which return multiple items may be paginated. Paginated requests will include two extra response headers; X-Total-Count (the total number of results), and Link (containing one or more hypermedia link relations).
The possible values for the link relations are; next (the link relation for the immediate next page of results), last (the link relation for the last page of results), first (the link relation for the first page of results), and prev (the link relation for the immediate previous page of results).
You can optionally specify a limit URL parameter to change how many results are served per page (hard limits will apply), and you can navigate through paginated results using the offset URL parameter which lets you specify which result should be returned first, e.g. ?limit=10&offset=30 (this would return 10 results starting with record 30).
Calls to our API are limited on a per API key basis. The specific limit may vary. If you make too many calls in a given period the API will return a 429 response code.
A number of webhooks are available to configure for events that occur inside RotaCloud. Webhooks must be sent to a secure URL, and you can only have 1 webhook per event.
You can verify that the webhook has come from us by checking its signature which you will find in the RotaCloud-Signature request header. We generate signatures using a hash-based message authentication code (HMAC) with SHA-256. The process for verifying a request is as follows...
Split the header, using the , character as the separator, to get a list of elements. Then split each element, using the = character as the separator, to get a prefix and value pair.
The value for the prefix ts corresponds to the timestamp, and v1 corresponds to the signature. You can discard all other elements.
The payload to sign is created by concatenating the timestamp (as a string), the character ., and the JSON request body. E.g. 123456789.[{"example":"event"}].
Compute an HMAC with the SHA256 hash function. Use the RotaCloud secret (found in your account) as the key, and use the payload you generated above as the message.
Compare the signature in the header to the expected signature. For an equality match, compute the difference between the current timestamp and the received timestamp, then decide if the difference is within your tolerance.
| start required | number Example: start=1455875832 Start timestamp of the date range to get attendance records for |
| end required | number Example: end=1464685882 End timestamp of the date range to get attendance records for |
| users | Array of any User IDs to get attendance records for |
| locations | Array of any Location IDs to get attendance records for |
| roles | Array of any Role IDs to get attendance records for |
| approved | boolean Example: approved=true Return approved or unapproved records |
| include_deleted | boolean Example: include_deleted=false Include deleted attendance records |
[- {
- "id": 1,
- "deleted": false,
- "approved": true,
- "in_time": 1401789600,
- "out_time": 1401816600,
- "minutes_break": 30,
- "user": 1,
- "location": 1,
- "role": 1,
- "minutes_late": 0,
- "hours": 7,
- "hours_auto": 8,
- "hours_is_auto": false,
- "notes": "Arrived slightly late due to reasons out of their control",
- "shift": 1,
- "in_method": "mobile",
- "out_method": "mobile",
- "in_location": {
- "lat": 53.5947442,
- "lng": -1.0458364,
- "accuracy": 50
}, - "out_location": {
- "lat": 53.5947442,
- "lng": -1.0458364,
- "accuracy": 50
}, - "in_device": 1,
- "out_device": 1,
- "in_terminal": null,
- "out_terminal": null
}
]| user | number |
| in_time | number |
| out_time | number |
| minutes_break | number |
| in_photo | string |
| out_photo | string |
| in_time_clocked | number |
| out_time_clocked | number |
Array of objects |
{- "user": 1,
- "in_time": 1401789600,
- "out_time": 1401816600,
- "minutes_break": 30,
- "in_time_clocked": 1401789600,
- "out_time_clocked": 1401816600,
- "breaks_clocked": [
- {
- "start_time": 1401790500,
- "start_location": {
- "lat": 65.48965,
- "lng": -21.28902,
- "accuracy": 5
}, - "end_time": 1401812600,
- "end_location": {
- "lat": 65.48965,
- "lng": -21.28902,
- "accuracy": 5
},
}
]
}{- "id": 1,
- "deleted": false,
- "approved": true,
- "in_time": 1401789600,
- "out_time": 1401816600,
- "minutes_break": 30,
- "user": 1,
- "location": 1,
- "role": 1,
- "minutes_late": 0,
- "hours": 7,
- "hours_auto": 8,
- "hours_is_auto": false,
- "notes": null,
- "shift": null,
- "in_time_clocked": 1401789600,
- "out_time_clocked": 1401816600,
- "breaks_clocked": [
- {
- "start_time": 1401790500,
- "start_location": {
- "lat": 65.48965,
- "lng": -21.28902,
- "accuracy": 50
}, - "end_time": 1401812600,
- "end_location": {
- "lat": 65.48965,
- "lng": -21.28902,
- "accuracy": 50
},
}
]
}| id required | number Example: 1 ID of the attendance record |
{- "id": 1,
- "deleted": false,
- "approved": true,
- "in_time": 1401789600,
- "out_time": 1401816600,
- "minutes_break": 30,
- "user": 1,
- "location": 1,
- "role": 1,
- "minutes_late": 0,
- "hours": 7,
- "hours_auto": 8,
- "hours_is_auto": false,
- "notes": "Arrived slightly late due to reasons out of their control",
- "shift": 1,
- "in_method": "mobile",
- "out_method": "mobile",
- "in_location": {
- "lat": 53.5947442,
- "lng": -1.0458364,
- "accuracy": 50
}, - "out_location": {
- "lat": 53.5947442,
- "lng": -1.0458364,
- "accuracy": 50
}, - "in_device": 1,
- "out_device": 1,
- "in_terminal": null,
- "out_terminal": null,
- "in_time_clocked": 1401789600,
- "out_time_clocked": 1401816600,
- "breaks_clocked": [
- {
- "start_time": 1401790500,
- "start_location": {
- "lat": 65.48965,
- "lng": -21.28902,
- "accuracy": 50
}, - "end_time": 1401812600,
- "end_location": {
- "lat": 65.48965,
- "lng": -21.28902,
- "accuracy": 50
},
}
]
}| id required | number Example: 1 ID of the attendance record |
| hours | number |
| hours_is_auto | boolean |
{- "hours": 7,
- "hours_is_auto": false
}{- "id": 1,
- "deleted": false,
- "approved": true,
- "in_time": 1401789600,
- "out_time": 1401816600,
- "minutes_break": 30,
- "user": 1,
- "location": 1,
- "role": 1,
- "minutes_late": 0,
- "hours": 7,
- "hours_auto": 8,
- "hours_is_auto": false,
- "notes": null,
- "shift": null,
- "in_time_clocked": 1401789600,
- "out_time_clocked": 1401816600,
- "breaks_clocked": [
- {
- "start_time": 1401790500,
- "start_location": {
- "lat": 65.48965,
- "lng": -21.28902,
- "accuracy": 50
}, - "end_time": 1401812600,
- "end_location": {
- "lat": 65.48965,
- "lng": -21.28902,
- "accuracy": 50
},
}
]
}| start required | string Example: start=2016-01-01 Start of the date range to get availability for |
| end required | string Example: end=2016-01-31 End of the date range to get availability for |
| users | Array of any User IDs to get availability for |
[- {
- "user": 1,
- "dates": [
- {
- "date": "2017-04-01",
- "available": [ ],
- "unavailable": [
- {
- "start_time": "00:00",
- "end_time": "00:00"
}
]
}, - {
- "date": "2017-04-02",
- "available": [ ],
- "unavailable": [ ]
}, - {
- "date": "2017-04-03",
- "available": [
- {
- "start_time": "03:15",
- "end_time": "09:15"
}
], - "unavailable": [ ]
}
]
}
]{- "user": 1,
- "dates": [
- {
- "date": "2016-01-02",
- "available": [ ],
- "unavailable": [
- {
- "status": "unavailable",
- "start_time": "04:20",
- "end_time": "05:50"
}, - {
- "status": "unavailable",
- "start_time": "15:10",
- "end_time": "17:15"
}
]
}, - {
- "date": "2016-01-03",
- "available": [
- {
- "status": "available",
- "start_time": "10:35",
- "end_time": "11:20"
}, - {
- "status": "available",
- "start_time": "22:30",
- "end_time": "23:25"
}
], - "unavailable": [ ]
}
]
}true| start | string Example: start=2016-01-01 Start of the date range to get day notes for |
| end | string Example: end=2016-01-31 End of the date range to get day notes for |
| location | number Location ID to get day notes for |
[- {
- "id": 1,
- "start_date": "2016-04-27",
- "end_date": "2016-04-29",
- "locations": [
- 1,
- 3,
- 5
], - "title": "Important Information",
- "message": "Local charity event this weekend.",
- "visible_employees": false
}, - {
- "id": 1,
- "start_date": "2016-02-20",
- "end_date": "2016-02-20",
- "locations": [
- 1
], - "title": "Important",
- "message": "Please remember about recycling collection today.",
- "visible_employees": true
}, - {
- "id": 1,
- "start_date": "2016-08-01",
- "end_date": "2016-08-01",
- "locations": [
- 1,
- 2,
- 3,
- 4,
- 5
], - "title": "Info",
- "message": "Early finish and clean-down.",
- "visible_employees": true
}
]| start_date | string |
| end_date | string |
| locations | Array of numbers |
| title | string |
| message | string |
| visible_employees | boolean |
{- "start_date": "2016-04-27",
- "end_date": "2016-04-29",
- "locations": [
- 1,
- 3,
- 5
], - "title": "Important Information",
- "message": "Local charity event this weekend.",
- "visible_employees": false
}{- "id": 1,
- "start_date": "2016-04-27",
- "end_date": "2016-04-29",
- "locations": [
- 1,
- 3,
- 5
], - "title": "Important Information",
- "message": "Local charity event this weekend.",
- "visible_employees": false
}{- "id": 1,
- "start_date": "2016-04-27",
- "end_date": "2016-04-29",
- "locations": [
- 1,
- 3,
- 5
], - "title": "Important Information",
- "message": "Local charity event this weekend.",
- "visible_employees": false
}| id required | number Example: 1 ID of the day note |
| start_date | string |
| end_date | string |
| locations | Array of numbers |
| title | string |
| message | string |
| visible_employees | boolean |
{- "start_date": "2016-04-27",
- "end_date": "2016-04-29",
- "locations": [
- 1,
- 3,
- 5
], - "title": "Important Information",
- "message": "Local charity event this weekend.",
- "visible_employees": true
}{- "id": 1,
- "start_date": "2016-04-27",
- "end_date": "2016-04-29",
- "locations": [
- 1,
- 3,
- 5
], - "title": "Important Information",
- "message": "Local charity event this weekend.",
- "visible_employees": true
}| start required | string Example: start=2016-01-01 Start of the date range to get days off for |
| end required | string Example: end=2016-01-31 End of the date range to get days off for |
| users | Array of any User IDs to get days off for |
[- {
- "user": 1,
- "dates": [
- {
- "date": "2016-01-01",
- "day_off": true
}, - {
- "date": "2016-01-02",
- "day_off": true
}, - {
- "date": "2016-01-03",
- "day_off": false
}, - {
- "date": "2016-01-04",
- "day_off": false
}, - {
- "date": "2016-01-05",
- "day_off": false
}, - {
- "date": "2016-01-06",
- "day_off": false
}, - {
- "date": "2016-01-07",
- "day_off": false
}
]
}, - {
- "user": 2,
- "dates": [
- {
- "date": "2016-01-01",
- "day_off": true
}, - {
- "date": "2016-01-02",
- "day_off": false
}, - {
- "date": "2016-01-03",
- "day_off": false
}, - {
- "date": "2016-01-04",
- "day_off": false
}, - {
- "date": "2016-01-05",
- "day_off": false
}, - {
- "date": "2016-01-06",
- "day_off": true
}, - {
- "date": "2016-01-07",
- "day_off": true
}
]
}
]| start | string Example: start=2016-01-01 Start of the date range to get days off patterns for |
| end | string Example: end=2016-01-31 End of the date range to get days off patterns for |
| users | Array of any User IDs to get days off patterns for |
[- {
- "id": 1,
- "user": 1,
- "start_date": "2016-01-01",
- "end_date": "2016-01-31",
- "mon_day_off": false,
- "tue_day_off": false,
- "wed_day_off": false,
- "thu_day_off": false,
- "fri_day_off": false,
- "sat_day_off": true,
- "sun_day_off": true
}, - {
- "id": 2,
- "user": 1,
- "start_date": "2016-02-31",
- "end_date": null,
- "mon_day_off": true,
- "tue_day_off": false,
- "wed_day_off": false,
- "thu_day_off": false,
- "fri_day_off": false,
- "sat_day_off": true,
- "sun_day_off": true
}, - {
- "id": 3,
- "user": 2,
- "start_date": "2016-01-01",
- "end_date": null,
- "mon_day_off": true,
- "tue_day_off": false,
- "wed_day_off": false,
- "thu_day_off": false,
- "fri_day_off": false,
- "sat_day_off": true,
- "sun_day_off": true
}
]| user | number |
| start_date | string |
| mon_day_off | boolean |
| tue_day_off | boolean |
| wed_day_off | boolean |
| thu_day_off | boolean |
| fri_day_off | boolean |
| sat_day_off | boolean |
| sun_day_off | boolean |
{- "user": 1,
- "start_date": "2016-02-01",
- "mon_day_off": false,
- "tue_day_off": false,
- "wed_day_off": false,
- "thu_day_off": false,
- "fri_day_off": false,
- "sat_day_off": true,
- "sun_day_off": true
}{- "id": 1,
- "user": 1,
- "start_date": "2016-02-01",
- "end_date": null,
- "mon_day_off": false,
- "tue_day_off": false,
- "wed_day_off": false,
- "thu_day_off": false,
- "fri_day_off": false,
- "sat_day_off": true,
- "sun_day_off": true
}| id required | number Example: 1 ID of the days off pattern |
{- "id": 1,
- "user": 1,
- "start_date": "2016-02-01",
- "end_date": null,
- "mon_day_off": false,
- "tue_day_off": false,
- "wed_day_off": false,
- "thu_day_off": false,
- "fri_day_off": false,
- "sat_day_off": true,
- "sun_day_off": true
}| id required | number Example: 1 ID of the days off pattern |
| mon_day_off | boolean |
| tue_day_off | boolean |
| wed_day_off | boolean |
| thu_day_off | boolean |
| fri_day_off | boolean |
| sat_day_off | boolean |
| sun_day_off | boolean |
{- "mon_day_off": false,
- "tue_day_off": false,
- "wed_day_off": false,
- "thu_day_off": false,
- "fri_day_off": false,
- "sat_day_off": true,
- "sun_day_off": true
}{- "id": 1,
- "user": 1,
- "start_date": "2016-02-01",
- "end_date": null,
- "mon_day_off": false,
- "tue_day_off": false,
- "wed_day_off": false,
- "thu_day_off": false,
- "fri_day_off": false,
- "sat_day_off": true,
- "sun_day_off": true
}[- {
- "bucket": null,
- "key": null,
- "user": null,
- "folder_id": null,
- "expires": "1653473811",
- "public": false,
- "created_by": null,
- "created_at": 0,
- "deleted": false,
- "deleted_by": null,
- "sizeKb": null,
- "name": null,
- "extension": null,
- "type": null,
- "users": [ ],
- "acknowledgements": [
- {
- "user": 0,
- "acknowledged_at": ""
}
], - "signature": null
}
]| bucket | string |
| name | string |
| key | string |
| users | Array of numbers |
| public | boolean |
| requires_acknowledgement | boolean |
{- "bucket": "an-s3-bucket",
- "name": "test.jpg",
- "key": "files/1000/10000/a-random-string-of-characters",
- "users": [
- 1,
- 2,
- 3
], - "public": false,
- "requires_acknowledgement": true
}| id required | number |
| name | string |
| public | boolean |
| user | number |
| users | Array of any |
| requires_acknowledgement | boolean |
| requires_signing | boolean |
| shared | boolean |
{- "users": [ ]
}{- "id": 0,
- "user": null,
- "folder_id": null,
- "expires": null,
- "public": false,
- "created_by": null,
- "created_at": 0,
- "deleted": false,
- "deleted_by": null,
- "sizeKb": null,
- "name": null,
- "extension": null,
- "type": null,
- "requires_acknowledgement": false,
- "requires_signing": false,
- "users": [ ],
- "acknowledgements": [
- {
- "user": 0,
- "acknowledged_at": ""
}
], - "signature": null
}| id required | number Example: 1 ID of the group |
| name | string |
{- "name": "Management"
}{- "id": 1,
- "name": "Management",
- "users": [
- 1,
- 2,
- 3
]
}| year required | number Example: 2016 The year to get the allowance for |
[- {
- "user": 1,
- "default_holiday_allowance": 30,
- "default_holiday_allowance_unit": "days",
- "custom_holiday_allowance": null,
- "custom_holiday_allowance_unit": null,
- "adjusted_start_date": false,
- "adjusted_final_working_date": false,
- "holiday_allowance": 30,
- "holiday_allowance_unit": "days"
}, - {
- "user": 2,
- "default_holiday_allowance": 22,
- "default_holiday_allowance_unit": "days",
- "custom_holiday_allowance": null,
- "custom_holiday_allowance_unit": null,
- "adjusted_start_date": false,
- "adjusted_final_working_date": false,
- "holiday_allowance": 22,
- "holiday_allowance_unit": "days"
}
]| year required | number Example: 2016 The year to get the allowance for |
| id required | number Example: 1 ID of the user |
{- "user": 1,
- "default_holiday_allowance": 30,
- "default_holiday_allowance_unit": "days",
- "custom_holiday_allowance": null,
- "custom_holiday_allowance_unit": null,
- "adjusted_start_date": false,
- "adjusted_final_working_date": false,
- "holiday_allowance": 30,
- "holiday_allowance_unit": "days"
}| year required | number Example: 2016 The year to add the allowance to |
| user | number |
| holiday_allowance | number |
| holiday_allowance_unit | string |
{- "user": 1,
- "holiday_allowance": 30,
- "holiday_allowance_unit": "days"
}{- "user": 1,
- "holiday_allowance": 30,
- "holiday_allowance_unit": "days"
}| year required | number Example: 2016 The year to add the allowance to |
| id required | number Example: 1 ID of the user |
| holiday_allowance | number |
| holiday_allowance_unit | string |
{- "holiday_allowance": 30,
- "holiday_allowance_unit": "days"
}{- "user": 1,
- "holiday_allowance": 30,
- "holiday_allowance_unit": "days"
}| start | string Example: start=2016-01-01 Start of the date range to get leave for |
| end | string Example: end=2016-01-31 End of the date range to get leave for |
| year | number Example: year=2016 Leave year to get leave for |
| users | Array of any User IDs to get leave for |
| types | Array of any Type IDs to get leave for |
| include_deleted | boolean Example: include_deleted=true Include deleted leave |
| include_denied | boolean Example: include_denied=true Include denied leave requests |
Include pending leave requests
true[- {
- "id": 1,
- "deleted": false,
- "type": 1,
- "user": 1,
- "admin": 2,
- "status": "approved",
- "requested": true,
- "user_message": "It's my birthday, could I book these days holiday?",
- "admin_message": "Yes, no problem at all. Happy birthday!",
- "start_date": "2016-04-27",
- "start_am_pm": "am",
- "end_date": "2016-04-29",
- "end_am_pm": "pm",
- "hours": {
- "2016": null
}, - "hours_method": "yearly",
- "hours_set": false,
- "dates": [
- {
- "date": "2016-04-27",
- "year": "2016",
- "days": 1,
- "hours": null,
- "day_off": true
}, - {
- "date": "2016-04-28",
- "year": "2016",
- "days": 1,
- "hours": null,
- "day_off": false
}, - {
- "date": "2016-04-29",
- "year": "2016",
- "days": 1,
- "hours": null,
- "day_off": false
}
]
}, - {
- "id": 2,
- "deleted": false,
- "type": 1,
- "user": 1,
- "admin": 2,
- "status": "approved",
- "requested": false,
- "user_message": null,
- "admin_message": "Jacob, I have added your leave to the calendar.",
- "start_date": "2016-12-29",
- "start_am_pm": "pm",
- "end_date": "2017-01-03",
- "end_am_pm": "pm",
- "hours": {
- "2016": 25,
- "2017": 30
}, - "hours_method": "daily",
- "hours_set": true,
- "dates": [
- {
- "date": "2016-12-29",
- "year": "2016",
- "days": 0.5,
- "hours": 5,
- "day_off": true
}, - {
- "date": "2016-12-30",
- "year": "2016",
- "days": 1,
- "hours": 10,
- "day_off": false
}, - {
- "date": "2016-12-31",
- "year": "2016",
- "days": 1,
- "hours": 10,
- "day_off": false
}, - {
- "date": "2017-01-01",
- "year": "2017",
- "days": 1,
- "hours": 10,
- "day_off": false
}, - {
- "date": "2017-01-02",
- "year": "2017",
- "days": 1,
- "hours": 10,
- "day_off": false
}, - {
- "date": "2017-01-03",
- "year": "2017",
- "days": 1,
- "hours": 10,
- "day_off": false
}
]
}
]| users | Array of numbers |
| type | number |
| start_date | string |
| start_am_pm | string |
| end_date | string |
| end_am_pm | string |
object | |
| admin_message | string |
{- "users": [
- 1
], - "type": 1,
- "start_date": "2016-12-29",
- "start_am_pm": "pm",
- "end_date": "2017-01-03",
- "end_am_pm": "pm",
- "hours": {
- "2016": 25,
- "2017": 30
}, - "admin_message": "Jacob, I have added your February leave to the calendar."
}[- {
- "id": 1,
- "deleted": false,
- "type": 1,
- "user": 1,
- "admin": 2,
- "status": "approved",
- "requested": false,
- "user_message": null,
- "admin_message": "Jacob, I have added your leave to the calendar.",
- "start_date": "2016-12-29",
- "start_am_pm": "pm",
- "end_date": "2017-01-03",
- "end_am_pm": "pm",
- "hours": {
- "2016": 25,
- "2017": 30
}, - "hours_method": "daily",
- "hours_set": true,
- "dates": [
- {
- "date": "2016-12-29",
- "year": "2016",
- "days": 0.5,
- "hours": 5,
- "day_off": true
}, - {
- "date": "2016-12-30",
- "year": "2016",
- "days": 1,
- "hours": 10,
- "day_off": false
}, - {
- "date": "2016-12-31",
- "year": "2016",
- "days": 1,
- "hours": 10,
- "day_off": false
}, - {
- "date": "2017-01-01",
- "year": "2017",
- "days": 1,
- "hours": 10,
- "day_off": false
}, - {
- "date": "2017-01-02",
- "year": "2017",
- "days": 1,
- "hours": 10,
- "day_off": false
}, - {
- "date": "2017-01-03",
- "year": "2017",
- "days": 1,
- "hours": 10,
- "day_off": false
}
]
}
]{- "id": 1,
- "deleted": false,
- "type": 1,
- "user": 1,
- "admin": 2,
- "status": "approved",
- "requested": true,
- "user_message": "It's my birthday, could I book these days holiday?",
- "admin_message": "Yes, no problem at all. Happy birthday!",
- "start_date": "2016-04-27",
- "start_am_pm": "am",
- "end_date": "2016-04-29",
- "end_am_pm": "pm",
- "hours": {
- "2016": null
}, - "hours_method": "yearly",
- "hours_set": false,
- "dates": [
- {
- "date": "2016-04-27",
- "year": "2016",
- "days": 1,
- "hours": null,
- "day_off": true
}, - {
- "date": "2016-04-28",
- "year": "2016",
- "days": 1,
- "hours": null,
- "day_off": false
}, - {
- "date": "2016-04-29",
- "year": "2016",
- "days": 1,
- "hours": null,
- "day_off": false
}
]
}| id required | number Example: 1 ID of the leave record |
| start_date | string |
| start_am_pm | string |
| end_date | string |
| end_am_pm | string |
{- "start_date": "2016-04-27",
- "start_am_pm": "am",
- "end_date": "2016-04-29",
- "end_am_pm": "pm"
}{- "id": 1,
- "deleted": false,
- "type": 1,
- "user": 1,
- "admin": 2,
- "status": "approved",
- "requested": true,
- "user_message": "It's my birthday, could I book these days holiday?",
- "admin_message": "Yes, no problem at all. Happy birthday!",
- "start_date": "2016-04-27",
- "start_am_pm": "am",
- "end_date": "2016-04-29",
- "end_am_pm": "pm",
- "hours": {
- "2016": null
}, - "hours_method": "yearly",
- "hours_set": false,
- "dates": [
- {
- "date": "2016-04-27",
- "year": "2016",
- "days": 1,
- "hours": null,
- "day_off": true
}, - {
- "date": "2016-04-28",
- "year": "2016",
- "days": 1,
- "hours": null,
- "day_off": false
}, - {
- "date": "2016-04-29",
- "year": "2016",
- "days": 1,
- "hours": null,
- "day_off": false
}
]
}| start required | string Example: start=2016-01-01 Start of the date range to get leave embargoes for |
| end required | string Example: end=2016-01-31 End of the date range to get leave embargoes for |
| users | Array of any User IDs to get leave embargoes for |
[- {
- "id": 1,
- "start_date": "2016-04-27",
- "start_am_pm": "am",
- "end_date": "2016-04-29",
- "end_am_pm": "pm",
- "everyone": true,
- "users": [ ],
- "message": "Busy period, no leave requests."
}, - {
- "id": 2,
- "start_date": "2015-12-25",
- "start_am_pm": "am",
- "end_date": "2016-01-03",
- "end_am_pm": "pm",
- "everyone": true,
- "users": [ ],
- "message": "Xmax, no requests please."
}, - {
- "id": 3,
- "start_date": "2016-02-01",
- "start_am_pm": "am",
- "end_date": "2016-02-01",
- "end_am_pm": "am",
- "everyone": false,
- "users": [
- 1,
- 2,
- 3,
- 5,
- 7
], - "message": "Leave requests are not possible over the specified date."
}
]| start_date | string |
| start_am_pm | string |
| end_date | string |
| end_am_pm | string |
| everyone | boolean |
| message | string |
{- "start_date": "2016-04-27",
- "start_am_pm": "am",
- "end_date": "2016-04-29",
- "end_am_pm": "pm",
- "everyone": true,
- "message": "Busy period, no leave requests."
}{- "id": 1,
- "start_date": "2016-04-27",
- "start_am_pm": "am",
- "end_date": "2016-04-29",
- "end_am_pm": "pm",
- "everyone": true,
- "users": [ ],
- "message": "Busy period, no leave requests."
}| id required | number Example: 1 ID of the leave embargo |
{- "id": 1,
- "start_date": "2016-04-27",
- "start_am_pm": "am",
- "end_date": "2016-04-29",
- "end_am_pm": "pm",
- "everyone": true,
- "users": [ ],
- "message": "Busy period, no leave requests."
}| id required | number Example: 1 ID of the leave embargo |
| start_date | string |
| start_am_pm | string |
| end_date | string |
| end_am_pm | string |
| everyone | boolean |
| message | string |
{- "start_date": "2016-04-27",
- "start_am_pm": "am",
- "end_date": "2016-04-29",
- "end_am_pm": "pm",
- "everyone": true,
- "message": "Busy period, no leave requests."
}{- "id": 1,
- "start_date": "2016-04-27",
- "start_am_pm": "am",
- "end_date": "2016-04-29",
- "end_am_pm": "pm",
- "everyone": true,
- "users": [ ],
- "message": "Busy period, no leave requests."
}| include_deleted | boolean Example: include_deleted=true Include deleted leave |
[- {
- "id": 1,
- "deleted": false,
- "type": 1,
- "user": 1,
- "user_message": "It's my birthday, could I book these days holiday?",
- "start_date": "2016-04-27",
- "start_am_pm": "am",
- "end_date": "2016-04-29",
- "end_am_pm": "pm",
- "dates": [
- {
- "date": "2016-04-27",
- "year": "2016",
- "days": 1,
- "day_off": true
}, - {
- "date": "2016-04-28",
- "year": "2016",
- "days": 1,
- "hours": null
}, - {
- "date": "2016-04-29",
- "year": "2016",
- "days": 1,
- "hours": null
}
]
}, - {
- "id": 2,
- "deleted": false,
- "type": 1,
- "user": 2,
- "user_message": "Holiday I'd like to book please.",
- "start_date": "2015-12-25",
- "start_am_pm": "am",
- "end_date": "2016-01-03",
- "end_am_pm": "pm",
- "dates": [
- {
- "date": "2015-12-25",
- "year": "2015",
- "days": 1,
- "day_off": false
}, - {
- "date": "2015-12-26",
- "year": "2015",
- "days": 1,
- "day_off": false
}, - {
- "date": "2015-12-27",
- "year": "2015",
- "days": 1,
- "day_off": true
}, - {
- "date": "2015-12-28",
- "year": "2015",
- "days": 1,
- "day_off": false
}, - {
- "date": "2015-12-29",
- "year": "2015",
- "days": 1,
- "day_off": true
}, - {
- "date": "2015-12-30",
- "year": "2015",
- "days": 1,
- "day_off": false
}, - {
- "date": "2015-12-31",
- "year": "2015",
- "days": 1,
- "day_off": false
}, - {
- "date": "2016-01-01",
- "year": "2016",
- "days": 1,
- "day_off": false
}, - {
- "date": "2016-01-02",
- "year": "2016",
- "days": 1,
- "day_off": false
}, - {
- "date": "2016-01-03",
- "year": "2016",
- "days": 1,
- "day_off": false
}
]
}, - {
- "id": 3,
- "deleted": false,
- "type": 1,
- "user": 3,
- "user_message": "Could I get this morning off?",
- "start_date": "2016-03-02",
- "start_am_pm": "am",
- "end_date": "2016-03-02",
- "end_am_pm": "am",
- "dates": [
- {
- "date": "2016-03-02",
- "year": "2016",
- "days": 0.5,
- "day_off": false
}
]
}
]| type | number |
| start_date | string |
| start_am_pm | string |
| end_date | string |
| end_am_pm | string |
| user_message | string |
{- "type": 1,
- "start_date": "2016-04-27",
- "start_am_pm": "am",
- "end_date": "2016-04-29",
- "end_am_pm": "pm",
- "user_message": "It's my birthday, could I book these days holiday?"
}{- "id": 1,
- "user": 1,
- "type": 1,
- "requested_at": 1403280946,
- "start_date": "2016-04-27",
- "start_am_pm": "am",
- "end_date": "2016-04-29",
- "end_am_pm": "pm",
- "years": [
- 2016
], - "days": {
- "2016": {
- "days": 3,
- "workdays": 2,
- "days_off": 1
}
}, - "user_message": "It's my birthday, could I book these days holiday?"
}| id required | number Example: 1 ID of the leave request |
{- "id": 1,
- "deleted": false,
- "type": 1,
- "user": 1,
- "user_message": "It's my birthday, could I book these days holiday?",
- "start_date": "2016-04-27",
- "start_am_pm": "am",
- "end_date": "2016-04-29",
- "end_am_pm": "pm",
- "dates": [
- {
- "date": "2016-04-27",
- "year": "2016",
- "days": 1,
- "day_off": true
}, - {
- "date": "2016-04-28",
- "year": "2016",
- "days": 1,
- "hours": null
}, - {
- "date": "2016-04-29",
- "year": "2016",
- "days": 1,
- "hours": null
}
]
}[- {
- "id": 1,
- "name": "Holiday",
- "short_name": "Hol",
- "can_request": true,
- "colour": "33afdf"
}, - {
- "id": 2,
- "name": "Other Leave",
- "short_name": "Other",
- "can_request": true,
- "colour": "60c2a7"
}, - {
- "id": 3,
- "name": "Sickness",
- "short_name": "Sick",
- "can_request": false,
- "colour": "f5b827"
}, - {
- "id": 4,
- "name": "Maternity / Paternity",
- "short_name": "Mat / Pat",
- "can_request": false,
- "colour": "e889b9"
}, - {
- "id": 5,
- "name": "Public Holiday",
- "short_name": "Public Hol",
- "can_request": false,
- "colour": "1985af"
}, - {
- "id": 6,
- "name": "Absence (Authorised)",
- "short_name": "Absence (Auth)",
- "can_request": false,
- "colour": "ff813d"
}, - {
- "id": 7,
- "name": "Absence (Unauthorised)",
- "short_name": "Absence (Unauth)",
- "can_request": false,
- "colour": "e52332"
}
]| ids | Array of any IDs of locations to retrieve |
| include_deleted | boolean Example: include_deleted=true Include deleted locations |
| only_visible | boolean Example: only_visible=true Only return locations the currently authenticated user can see the rota for |
[- {
- "id": 1,
- "deleted": false,
- "name": "Bar",
- "address": "4 Blake Avenue, York",
- "location": {
- "lat": 51.3752172,
- "lng": -0.2881249,
- "radius": 50
}, - "timezone": 335,
- "users": [
- 1,
- 2,
- 3
]
}, - {
- "id": 2,
- "deleted": false,
- "name": "Restaurant",
- "address": "306 Princess View, Leeds",
- "location": {
- "lat": 53.5947442,
- "lng": -1.0458364,
- "radius": 50
}, - "timezone": 335,
- "users": [
- 4,
- 5,
- 6
]
}, - {
- "id": 3,
- "deleted": false,
- "name": "Back Office",
- "address": "212 Kings Street, Malton",
- "location": {
- "lat": 53.5947442,
- "lng": -1.0458364,
- "radius": 50
}, - "timezone": 335,
- "users": [
- 7,
- 8,
- 9
]
}
]| name | string |
| address | string |
object | |
| timezone | number |
{- "name": "Bar",
- "address": "4 Blake Avenue, York",
- "location": {
- "lat": 51.3752172,
- "lng": -0.2881249,
- "radius": 50
}, - "timezone": 335
}{- "id": 1,
- "deleted": false,
- "name": "Bar",
- "address": "4 Blake Avenue, York",
- "location": {
- "lat": 51.3752172,
- "lng": -0.2881249,
- "radius": 50
}, - "timezone": 335,
- "users": [ ]
}{- "id": 1,
- "deleted": false,
- "name": "Bar",
- "address": "4 Blake Avenue, York",
- "location": {
- "lat": 51.3752172,
- "lng": -0.2881249,
- "radius": 50
}, - "timezone": 335,
- "users": [
- 1,
- 2,
- 3
]
}| id required | number Example: 1 ID of the location |
| name | string |
| address | string |
object | |
| timezone | number |
{- "name": "Bar",
- "address": "4 Blake Avenue, York",
- "location": {
- "lat": 51.3752172,
- "lng": -0.2881249,
- "radius": 50
}, - "timezone": 335
}{- "id": 1,
- "deleted": false,
- "name": "Bar",
- "address": "4 Blake Avenue, York",
- "location": {
- "lat": 51.3752172,
- "lng": -0.2881249,
- "radius": 50
}, - "timezone": 335,
- "users": [
- 1,
- 2,
- 3
]
}| id required | number Example: 1 ID of the logbook category |
| name | string |
{- "name": "Review Meeting"
}{- "id": 1,
- "name": "Review Meeting"
}| user | number Example: user=1 ID of the user to list events for |
[- {
- "id": 1,
- "created_at": 1589627200,
- "created_by": 1,
- "updated_at": null,
- "updated_by": null,
- "deleted": false,
- "deleted_at": null,
- "deleted_by": null,
- "user": 1,
- "category": 1,
- "date": "2020-04-27",
- "time": "09:00",
- "name": "Completed advanced training",
- "description": null
}, - {
- "id": 2,
- "created_at": 1589627200,
- "created_by": 1,
- "updated_at": null,
- "updated_by": null,
- "deleted": false,
- "deleted_at": null,
- "deleted_by": null,
- "user": 1,
- "category": 1,
- "date": "2020-01-01",
- "time": null,
- "name": "End of probation review",
- "description": "The employee passed probation."
}, - {
- "id": 1,
- "created_at": 1589627200,
- "created_by": 1,
- "updated_at": null,
- "updated_by": null,
- "deleted": false,
- "deleted_at": null,
- "deleted_by": null,
- "user": 1,
- "category": 1,
- "date": "2019-07-12",
- "time": "12:00",
- "name": "Completion of onboarding",
- "description": null
}
]| user | number |
| category | number |
| date | string |
| time | string |
| name | string |
| description | any or null |
{- "user": 1,
- "category": 1,
- "date": "2020-04-27",
- "time": "09:00",
- "name": "Completed advanced training",
- "description": null
}{- "id": 1,
- "created_at": 1589627200,
- "created_by": 1,
- "updated_at": null,
- "updated_by": null,
- "deleted": false,
- "deleted_at": null,
- "deleted_by": null,
- "user": 1,
- "category": 1,
- "date": "2020-04-27",
- "time": "09:00",
- "name": "Completed advanced training",
- "description": null
}| id required | number Example: 1 ID of the logbook category |
{- "id": 1,
- "created_at": 1589627200,
- "created_by": 1,
- "updated_at": null,
- "updated_by": null,
- "deleted": false,
- "deleted_at": null,
- "deleted_by": null,
- "user": 1,
- "category": 1,
- "date": "2020-04-27",
- "time": "09:00",
- "name": "Completed advanced training",
- "description": null
}| id required | number Example: 1 ID of the logbook category |
| category | number |
| date | string |
| time | string |
| name | string |
| description | any or null |
{- "category": 2,
- "date": "2020-04-01",
- "time": "15:30",
- "name": "Completed advanced training",
- "description": null
}{- "id": 1,
- "created_at": 1589627200,
- "created_by": 1,
- "updated_at": 1589710029,
- "updated_by": 1,
- "deleted": false,
- "deleted_at": null,
- "deleted_by": null,
- "user": 1,
- "category": 2,
- "date": "2020-04-01",
- "time": "15:30",
- "name": "Completed advanced training",
- "description": null
}{- "id": 1,
- "deleted": false,
- "level": "admin",
- "first_name": "Joe",
- "last_name": "Bloggs",
- "email": "joe.bloggs@example.com",
- "group": 1,
- "locations": [
- 1,
- 2,
- 3,
- 4,
- 5
], - "roles": [
- 1,
- 2,
- 3,
- 7,
- 10
], - "default_role": 1,
- "dob": "1989-04-27",
- "start_date": "2016-01-01",
- "final_working_date": null,
- "weekly_hours": 40,
- "holiday_allowance": 28,
- "holiday_allowance_unit": "days",
- "payroll_id": "JB0001",
- "salary": 15,
- "salary_type": "hourly",
- "overtime_rate": 15,
- "role_rates": {
- "3": {
- "per_hour": 20,
- "per_shift": 3
}, - "7": {
- "per_hour": 10,
- "per_shift": 0
}
}, - "leave_rates": {
- "1": 50,
- "2": 40
}, - "leave_rates_unit": "days",
- "leave_rates_type": "deduction",
- "notes": "Qualified first aider",
- "preferences": {
- "setup_steps_hidden": false
}
}[- {
- "id": 0,
- "sent_by": 0,
- "sent_at": null,
- "subject": "",
- "message": "",
- "users": [
- {
- "user": 1,
- "sent": true,
- "opened": true,
- "opened_at": null,
- "error": null
}
], - "attachments": [
- {
- "name": "",
- "extension": "",
- "type": "",
- "size_kb": 0,
- "bucket": "",
- "key": "temp/1001/123/gfgrfewd5y5ygwe4gjvdnvo"
}
]
}
]Sends a message to users, possibly including an attachment. To include an attachment, it must first be uploaded to the temporary area of the bucket, with the key in the format temp/<accountId>/<userId>/<key>
| subject required | string The subject of the message |
| message required | string The message text |
| users required | Array of any An array of user IDs to deliver the message to |
| attachments | Array of any Maximum of 10 attachments to include with the message |
{- "subject": "Hello world!",
- "message": "Hello from RotaCloud",
- "users": [
- null
], - "attachments": [
- null
]
}{- "id": 0,
- "sent_by": 0,
- "subject": "",
- "message": "",
- "sent_at": null,
- "users": [
- {
- "user": 0,
- "sent": true,
- "opened": true,
- "opened_at": 1650963596,
- "error": null
}
]
}| start required | string Example: start=2016-01-01 Start of the date range to get pay periods for |
| end required | string Example: end=2016-01-31 End of the date range to get pay periods for |
[- {
- "id": 1,
- "start_date": "2016-01-01",
- "end_date": "2016-01-31",
- "name": "January 2016",
- "locked": true,
- "locked_at": 1464259648,
- "locked_by": 1,
- "unlocked_at": null,
- "unlocked_by": null,
- "finalised": true,
- "finalised_at": 1464610617,
- "finalised_by": 1,
- "unfinalised_at": null,
- "unfinalised_by": null
}, - {
- "id": 2,
- "start_date": "2016-02-01",
- "end_date": "2016-02-28",
- "name": "February 2016",
- "locked": true,
- "locked_at": 1463401592,
- "locked_by": 1,
- "unlocked_at": null,
- "unlocked_by": null,
- "finalised": true,
- "finalised_at": 1463401755,
- "finalised_by": 1,
- "unfinalised_at": null,
- "unfinalised_by": null
}, - {
- "id": 3,
- "start_date": "2016-03-01",
- "end_date": "2016-03-31",
- "name": "March 2016",
- "locked": false,
- "locked_at": null,
- "locked_by": null,
- "unlocked_at": 1463401592,
- "unlocked_by": 1,
- "finalised": false,
- "finalised_at": null,
- "finalised_by": null,
- "unfinalised_at": 1463401755,
- "unfinalised_by": 1
}
]{- "id": 1,
- "start_date": "2016-01-01",
- "end_date": "2016-01-31",
- "name": "January 2016",
- "locked": true,
- "locked_at": 1464259648,
- "locked_by": 1,
- "unlocked_at": null,
- "unlocked_by": null,
- "finalised": true,
- "finalised_at": 1464610617,
- "finalised_by": 1,
- "unfinalised_at": null,
- "unfinalised_by": null
}| id required | number Example: 1 ID of the pay period |
[- {
- "user": {
- "id": 1,
- "deleted": false,
- "first_name": "Joe",
- "last_name": "Bloggs",
- "group": null,
- "dob": null,
- "start_date": null,
- "final_working_date": null,
- "weekly_hours": null,
- "holiday_allowance": null,
- "holiday_allowance_unit": "hours",
- "payroll_id": null,
- "salary": 12,
- "salary_type": "hourly",
- "overtime_rate": null,
- "role_rates": null,
- "leave_rates": null,
- "leave_rates_unit": "hours",
- "leave_rates_type": "addition"
}, - "totals": {
- "overtime": 5,
- "overtime_is_auto": false,
- "pay": 2100,
- "pay_is_auto": true
}, - "attendance": [
- {
- "id": 1,
- "location": {
- "id": 1,
- "name": "Bar"
}, - "role": null,
- "in_time": 1483254000,
- "out_time": 1483290000,
- "minutes_break": 60,
- "minutes_late": 0,
- "hours": 7
}
], - "leave": [
- {
- "id": 2,
- "type": {
- "id": 5,
- "name": "Public Holiday",
- "short_name": "Public Hol"
}, - "paid": true,
- "dates": [
- {
- "date": "2017-01-01",
- "hours": null,
- "days": 1,
- "day_off": false
}
]
}, - {
- "id": 3,
- "type": {
- "id": 1,
- "name": "Holiday",
- "short_name": "Hol"
}, - "paid": false,
- "dates": [
- {
- "date": "2017-01-17",
- "hours": 8,
- "days": 1,
- "day_off": false
}, - {
- "date": "2017-01-18",
- "hours": 8,
- "days": 1,
- "day_off": false
}, - {
- "date": "2017-01-19",
- "hours": 8,
- "days": 1,
- "day_off": false
}, - {
- "date": "2017-01-20",
- "hours": 0,
- "days": 1,
- "day_off": false
}, - {
- "date": "2017-01-21",
- "hours": null,
- "days": 1,
- "day_off": false
}
]
}, - {
- "id": 4,
- "type": {
- "id": 5,
- "name": "Public Holiday",
- "short_name": "Public Hol"
}, - "paid": true,
- "dates": [
- {
- "date": "2017-01-29",
- "hours": null,
- "days": 0.5,
- "day_off": false
}, - {
- "date": "2017-01-30",
- "hours": null,
- "days": 1,
- "day_off": false
}, - {
- "date": "2017-01-31",
- "hours": null,
- "days": 1,
- "day_off": false
}
]
}
]
}
]| pin required | string Example: 1234 The pin to lookup |
{- "id": 1,
- "deleted": false,
- "level": "admin",
- "first_name": "Joe",
- "last_name": "Bloggs",
- "email": "joe.bloggs@example.com",
- "group": 1,
- "locations": [
- 1,
- 2,
- 3,
- 4,
- 5
], - "roles": [
- 1,
- 2,
- 3,
- 7,
- 10
], - "default_role": 1,
- "dob": "1989-04-27",
- "start_date": "2016-01-01",
- "final_working_date": null,
- "weekly_hours": 40,
- "holiday_allowance": 28,
- "holiday_allowance_unit": "days",
- "payroll_id": "JB0001",
- "salary": 15,
- "salary_type": "hourly",
- "overtime_rate": 15,
- "role_rates": {
- "3": {
- "per_hour": 20,
- "per_shift": 3
}, - "7": {
- "per_hour": 10,
- "per_shift": 0
}
}, - "leave_rates": {
- "1": 50,
- "2": 40
}, - "leave_rates_unit": "days",
- "leave_rates_type": "deduction",
- "notes": "Qualified first aider"
}| ids | Array of any IDs of roles to retrieve |
| include_deleted | boolean Example: include_deleted=true Include deleted roles |
[- {
- "id": 1,
- "deleted": false,
- "name": "Supervisor",
- "colour": "f79986",
- "default_break": 30,
- "users": [
- 1,
- 2,
- 3
]
}, - {
- "id": 2,
- "deleted": false,
- "name": "Sales Assistant",
- "colour": "95b7de",
- "default_break": 0,
- "users": [
- 4,
- 5,
- 6
]
}, - {
- "id": 2,
- "deleted": false,
- "name": "Stock Take",
- "colour": "408775",
- "default_break": 60,
- "users": [
- 7,
- 8,
- 9
]
}
]| name | string |
| colour | string |
| default_break | number |
{- "name": "Supervisor",
- "colour": "f79986",
- "default_break": 30
}{- "id": 1,
- "deleted": false,
- "name": "Supervisor",
- "colour": "f79986",
- "default_break": 30,
- "users": [ ]
}| id required | number Example: 1 ID of the role |
| name | string |
| colour | string |
| default_break | number |
{- "name": "Supervisor",
- "colour": "f79986",
- "default_break": 30
}{- "id": 1,
- "deleted": false,
- "name": "Supervisor",
- "colour": "f79986",
- "default_break": 30,
- "users": [
- 1,
- 2,
- 3
]
}{- "attendance_record_breaks": {
- "value": "clocked",
- "values": [
- "shift",
- "clocked"
]
}, - "clockin_without_shift_allowed": {
- "value": "always",
- "values": [
- "never",
- "no_shift",
- "always"
]
}, - "early_clockin_minutes": {
- "value": 60,
- "values": [
- 0,
- 5,
- 10,
- 15,
- 20,
- 25,
- 30,
- 45,
- 60,
- 120,
- 180
]
}, - "mobile_clocking_enabled": {
- "value": true,
- "values": [
- true,
- false
]
}
}| start required | number Example: start=1455875832 Start timestamp of the date range to get shifts for |
| end required | number Example: end=1464685882 End timestamp of the date range to get shifts for |
| users | Array of any User IDs to get shifts for |
| locations | Array of any Location IDs to get shifts for |
| roles | Array of any Role IDs to get shifts for |
| open | boolean Example: open=true Return open or assigned shifts. To include open or assigned shifts when the users parameter is specified, omit this parameter and instead include user ID 0 in the users parameter |
| published | boolean Example: published=true Return published or unpublished shifts |
| include_deleted | boolean Example: include_deleted=false Include deleted shifts |
[- {
- "id": 1,
- "deleted": false,
- "published": true,
- "open": false,
- "start_time": 1401789600,
- "end_time": 1401816600,
- "minutes_break": 30,
- "user": 1,
- "location": 1,
- "role": 1,
- "notes": "Early start due to bank holiday",
- "created_by": 1,
- "created_at": 1463650395,
- "updated_at": null,
- "claimed": false,
- "claimed_at": null,
- "acknowledged": true,
- "acknowledged_at": 1463650401
}, - {
- "id": 2,
- "deleted": false,
- "published": true,
- "open": false,
- "start_time": 1401789600,
- "end_time": 1401816600,
- "minutes_break": 0,
- "user": 2,
- "location": 2,
- "role": 2,
- "notes": null,
- "created_by": 1,
- "created_at": 1463650395,
- "updated_at": 1463652355,
- "claimed": true,
- "claimed_at": 1463652355,
- "acknowledged": false,
- "acknowledged_at": null
}, - {
- "id": 3,
- "deleted": false,
- "published": false,
- "open": true,
- "start_time": 1401789600,
- "end_time": 1401816600,
- "minutes_break": 45,
- "user": null,
- "location": 3,
- "role": 3,
- "notes": null,
- "created_by": 1,
- "created_at": 1463650395,
- "updated_at": 1463757500,
- "claimed": false,
- "claimed_at": null,
- "acknowledged": false,
- "acknowledged_at": null
}
]| published | boolean |
| start_time | number |
| end_time | number |
| minutes_break | number |
| user | number |
| location | number |
| role | number |
| notes | string |
{- "published": true,
- "start_time": 1401789600,
- "end_time": 1401816600,
- "minutes_break": 30,
- "user": 1,
- "location": 1,
- "role": 1,
- "notes": "Early start due to bank holiday"
}{- "id": 1,
- "deleted": false,
- "published": true,
- "open": false,
- "start_time": 1401789600,
- "end_time": 1401816600,
- "minutes_break": 30,
- "user": 1,
- "location": 1,
- "role": 1,
- "notes": "Early start due to bank holiday",
- "created_by": 1,
- "created_at": 1463650395,
- "updated_at": null,
- "claimed": false,
- "claimed_at": null,
- "acknowledged": true,
- "acknowledged_at": 1463650401
}{- "id": 1,
- "deleted": false,
- "published": true,
- "open": false,
- "start_time": 1401789600,
- "end_time": 1401816600,
- "minutes_break": 30,
- "user": 1,
- "location": 1,
- "role": 1,
- "notes": "Early start due to bank holiday",
- "created_by": 1,
- "created_at": 1463650395,
- "updated_at": null,
- "claimed": false,
- "claimed_at": null,
- "acknowledged": true,
- "acknowledged_at": 1463650401
}| id required | number Example: 1 ID of the shift |
| published | boolean |
| start_time | number |
| end_time | number |
| minutes_break | number |
| user | number |
| location | number |
| role | number |
| notes | string |
{- "published": true,
- "start_time": 1401789600,
- "end_time": 1401816600,
- "minutes_break": 30,
- "user": 1,
- "location": 1,
- "role": 1,
- "notes": "Early start due to bank holiday"
}{- "id": 1,
- "deleted": false,
- "published": true,
- "open": false,
- "start_time": 1401789600,
- "end_time": 1401816600,
- "minutes_break": 30,
- "user": 1,
- "location": 1,
- "role": 1,
- "notes": "Early start due to bank holiday",
- "created_by": 1,
- "created_at": 1463650395,
- "updated_at": null,
- "claimed": false,
- "claimed_at": null,
- "acknowledged": true,
- "acknowledged_at": 1463650401
}| include_deleted | boolean Example: include_deleted=true Include deleted swap requests |
[- {
- "id": 1,
- "deleted": false,
- "status": "requested",
- "requested_at": 1472055000,
- "old_user": 1,
- "new_user": 2,
- "user_approved": true,
- "user_replied_at": 1473080000,
- "admin_approved": null,
- "admin_replied_at": null,
- "shift": 1,
- "swapped_shift": null
}, - {
- "id": 2,
- "deleted": false,
- "status": "approved",
- "requested_at": 1472055000,
- "old_user": 1,
- "new_user": 2,
- "user_approved": true,
- "user_replied_at": 1473080000,
- "admin_approved": true,
- "admin_replied_at": 1474062000,
- "shift": 1,
- "swapped_shift": null
}
]| shift | number |
| new_user | number |
| swapped_shift | any or null |
{- "shift": 1,
- "new_user": 2,
- "swapped_shift": null
}{- "id": 1,
- "deleted": false,
- "status": "requested",
- "requested_at": 1472055000,
- "old_user": 1,
- "new_user": 2,
- "user_approved": null,
- "user_replied_at": null,
- "admin_approved": null,
- "admin_replied_at": null,
- "shift": 1,
- "swapped_shift": null
}{- "id": 1,
- "deleted": false,
- "status": "requested",
- "requested_at": 1472055000,
- "old_user": 1,
- "new_user": 2,
- "user_approved": true,
- "user_replied_at": 1473080000,
- "admin_approved": null,
- "admin_replied_at": null,
- "shift": 1,
- "swapped_shift": null
}| id required | number Example: 1 ID of the swap request |
| admin_approved | boolean |
{- "admin_approved": false
}{- "id": 1,
- "deleted": false,
- "status": "requested",
- "requested_at": 1472055000,
- "old_user": 1,
- "new_user": 2,
- "user_approved": true,
- "user_replied_at": 1476025000,
- "admin_approved": null,
- "admin_replied_at": 1476057000,
- "shift": 1,
- "swapped_shift": null
}[- {
- "id": 1,
- "deleted": false,
- "name": "Front Desk",
- "active": true,
- "platform": "ios",
- "device": "David's iPad",
- "version": "2.0.6",
- "ip": "192.168.0.1",
- "location": {
- "lat": 51.3752172,
- "lng": -0.2881249,
- "accuracy": 50
}, - "timezone": 335,
- "require_photo": false,
- "require_photo_breaks": false,
- "default_location": 1
}, - {
- "id": 2,
- "deleted": false,
- "name": "Warehouse Entrance",
- "active": false,
- "platform": null,
- "device": null,
- "version": null,
- "ip": null,
- "location": null,
- "timezone": 335,
- "require_photo": false,
- "require_photo_breaks": false,
- "default_location": 1
}
]| name | string |
| timezone | number |
| default_location | number |
{- "name": "Front Desk",
- "timezone": 335,
- "default_location": 1
}{- "id": 1,
- "deleted": false,
- "name": "Front Desk",
- "active": false,
- "platform": null,
- "device": null,
- "version": null,
- "ip": null,
- "location": null,
- "timezone": 335,
- "require_photo": false,
- "require_photo_breaks": false,
- "default_location": 1
}{- "id": 1,
- "deleted": false,
- "name": "Front Desk",
- "active": true,
- "platform": "ios",
- "device": "David's iPad",
- "version": "2.0.6",
- "ip": "192.168.0.1",
- "location": {
- "lat": 51.3752172,
- "lng": -0.2881249,
- "accuracy": 50
}, - "timezone": 335,
- "require_photo": false,
- "require_photo_breaks": false,
- "default_location": 1
}| id required | number Example: 1 ID of the terminal |
| name | string |
| timezone | number |
| default_location | number |
{- "name": "Front Desk",
- "timezone": 335,
- "default_location": 1
}{- "id": 1,
- "deleted": false,
- "name": "Front Desk",
- "active": false,
- "platform": null,
- "device": null,
- "version": null,
- "ip": null,
- "location": null,
- "timezone": 335,
- "require_photo": false,
- "require_photo_breaks": false,
- "default_location": 1
}[- {
- "id": 1,
- "deleted": false,
- "name": "Front Desk",
- "active": true,
- "platform": "ios",
- "device": "David's iPad",
- "version": "2.0.6",
- "ip": "192.168.0.1",
- "location": {
- "lat": 51.3752172,
- "lng": -0.2881249,
- "accuracy": 50
}, - "timezone": 335,
- "require_photo": false,
- "require_photo_breaks": false,
- "default_location": 1
}
]{- "terminal": 1,
- "device": "abcdefghijklmnopqrstuvwxyz",
- "location": {
- "lat": 51.3752172,
- "lng": -0.2881249,
- "accuracy": 50
}
}{- "id": 1,
- "deleted": false,
- "name": "Front Desk",
- "active": true,
- "platform": "ios",
- "device": "David's iPad",
- "version": "2.0.6",
- "ip": "192.168.0.1",
- "location": {
- "lat": 51.3752172,
- "lng": -0.2881249,
- "accuracy": 50
}, - "timezone": 335,
- "require_photo": false,
- "require_photo_breaks": false,
- "default_location": 1
}[- {
- "id": 1,
- "name": "Africa/Abidjan",
- "continent": "Africa",
- "city": "Abidjan",
- "sub": null
}, - {
- "id": 2,
- "name": "Africa/Accra",
- "continent": "Africa",
- "city": "Accra",
- "sub": null
}, - {
- "id": 3,
- "name": "Africa/Addis_Ababa",
- "continent": "Africa",
- "city": "Addis Ababa",
- "sub": null
}
][- {
- "id": 1,
- "created_at": 1472055000,
- "created_by": 1,
- "deleted": false,
- "deleted_at": null,
- "deleted_by": null,
- "leave_year": 2017,
- "comments": "Accrued for working bank holiday",
- "location_id": 1,
- "duration_hours": 8,
- "date": "2017-01-01",
- "user_id": 1
}, - {
- "id": 2,
- "created_at": 1472055000,
- "created_by": 1,
- "deleted": true,
- "deleted_at": 1472055000,
- "deleted_by": 1,
- "leave_year": 2017,
- "comments": "Accrued for working bank holiday",
- "location_id": 1,
- "duration_hours": 8,
- "date": "2017-01-01",
- "user_id": 3
}
]| duration_hours | number |
| date | string |
| leave_year | number |
| location_id | number |
| comments | string |
| user_id | number |
{- "duration_hours": 8,
- "date": "2017-01-01",
- "leave_year": 2017,
- "location_id": 1,
- "comments": "Accrued for working bank holiday",
- "user_id": 1
}{- "id": 1,
- "created_at": 1472055000,
- "created_by": 1,
- "deleted": false,
- "deleted_at": null,
- "deleted_by": null,
- "leave_year": 2017,
- "comments": "Accrued for working bank holiday",
- "location_id": 1,
- "duration_hours": 8,
- "date": "2017-01-01",
- "user_id": 1
}| id required | number Example: 1 ID of the toil accrual record |
{- "id": 1,
- "created_at": 1472055000,
- "created_by": 1,
- "deleted": false,
- "leave_year": 2017,
- "comments": "Accrued for working bank holiday",
- "location_id": 1,
- "duration_hours": 8,
- "date": "2017-01-01",
- "user_id": 1
}| ids | Array of any IDs of users to retrieve |
| include_deleted | boolean Example: include_deleted=true Include deleted roles |
| only_managed | boolean Example: only_managed=false Include only people the currently authenticated user can manage |
| include_self | boolean Example: include_self=false Include the current authenticated user |
Location IDs to get users from
[- null
][- {
- "id": 1,
- "deleted": false,
- "level": "admin",
- "first_name": "Joe",
- "last_name": "Bloggs",
- "email": "joe.bloggs@example.com",
- "group": 1,
- "locations": [
- 1,
- 2,
- 3,
- 4,
- 5
], - "roles": [
- 1,
- 2,
- 3,
- 7,
- 10
], - "default_role": 1,
- "dob": "1989-04-27",
- "start_date": "2016-01-01",
- "final_working_date": null,
- "weekly_hours": 40,
- "holiday_allowance": 28,
- "holiday_allowance_unit": "days",
- "payroll_id": "JB0001",
- "salary": 15,
- "salary_type": "hourly",
- "overtime_rate": 15,
- "role_rates": {
- "3": {
- "per_hour": 20,
- "per_shift": 3
}, - "7": {
- "per_hour": 10,
- "per_shift": 0
}
}, - "leave_rates": {
- "1": 50,
- "2": 40
}, - "leave_rates_unit": "days",
- "leave_rates_type": "deduction",
- "notes": "Qualified first aider",
- "preferences": {
- "setup_steps_hidden": false
}
}, - {
- "id": 2,
- "deleted": false,
- "level": "manager",
- "first_name": "Lorraine",
- "last_name": "Hughes",
- "email": "lorraine.hughes@example.com",
- "group": null,
- "locations": [
- 6,
- 7,
- 8,
- 9,
- 10
], - "roles": [
- 4,
- 5,
- 6
], - "default_role": 5,
- "dob": "1952-11-03",
- "start_date": "2014-03-18",
- "final_working_date": null,
- "weekly_hours": 40,
- "holiday_allowance": 28,
- "holiday_allowance_unit": "days",
- "payroll_id": "LH0001",
- "salary": 18000,
- "salary_type": "annual",
- "overtime_rate": null,
- "role_rates": { },
- "leave_rates": { },
- "leave_rates_unit": "hours",
- "leave_rates_type": "addition",
- "permissions": [
- "rotas",
- "rota_requests",
- "rota_requests_self",
- "leave_requests",
- "leave_self",
- "leave_embargoes",
- "employees",
- "employees_personal",
- "employees_salary",
- "timesheets",
- "payroll",
- "roles",
- "reports"
], - "locations_manager": [
- 11,
- 12,
- 13
], - "locations_cover": [
- 14,
- 15,
- 16
], - "notes": null,
- "preferences": {
- "setup_steps_hidden": false
}
}, - {
- "id": 3,
- "deleted": false,
- "level": "employee",
- "first_name": "Daniel",
- "last_name": "Barnes",
- "email": "daniel.barnes@example.com",
- "group": 5,
- "locations": [
- 11,
- 12
], - "roles": [
- 7,
- 8
], - "default_role": 7,
- "dob": "1992-07-22",
- "start_date": null,
- "final_working_date": null,
- "weekly_hours": 35,
- "holiday_allowance": 120,
- "holiday_allowance_unit": "hours",
- "payroll_id": "DB0001",
- "salary": 8,
- "salary_type": "hourly",
- "overtime_rate": null,
- "role_rates": { },
- "leave_rates": { },
- "leave_rates_unit": "hours",
- "leave_rates_type": "addition",
- "notes": null,
- "preferences": {
- "setup_steps_hidden": false
}
}
]| level | string |
| send_invite | boolean |
| first_name | string |
| last_name | string |
string | |
| locations | Array of numbers |
| roles | Array of numbers |
| default_role | number |
| dob | string |
| start_date | string |
| final_working_date | any or null |
| weekly_hours | number |
| holiday_allowance | number |
| holiday_allowance_unit | string |
| payroll_id | string |
| salary | number |
| salary_type | string |
| overtime_rate | number |
object | |
object | |
| notes | string |
{- "level": "admin",
- "send_invite": true,
- "first_name": "Joe",
- "last_name": "Bloggs",
- "email": "joe.bloggs@example.com",
- "locations": [
- 1,
- 2,
- 3,
- 4,
- 5
], - "roles": [
- 1,
- 2,
- 3,
- 7,
- 10
], - "default_role": 1,
- "dob": "1989-04-27",
- "start_date": "2016-01-01",
- "final_working_date": null,
- "weekly_hours": 40,
- "holiday_allowance": 28,
- "holiday_allowance_unit": "days",
- "payroll_id": "JB0001",
- "salary": 15,
- "salary_type": "hourly",
- "overtime_rate": 15,
- "role_rates": {
- "3": {
- "per_hour": 20,
- "per_shift": 3
}, - "7": {
- "per_hour": 10,
- "per_shift": 0
}
}, - "leave_rates": {
- "1": 50,
- "2": 40
}, - "notes": "Qualified first aider"
}{- "id": 1,
- "deleted": false,
- "level": "admin",
- "first_name": "Joe",
- "last_name": "Bloggs",
- "email": "joe.bloggs@example.com",
- "group": 1,
- "locations": [
- 1,
- 2,
- 3,
- 4,
- 5
], - "roles": [
- 1,
- 2,
- 3,
- 7,
- 10
], - "default_role": 1,
- "dob": "1989-04-27",
- "start_date": "2016-01-01",
- "final_working_date": null,
- "weekly_hours": 40,
- "holiday_allowance": 28,
- "holiday_allowance_unit": "days",
- "payroll_id": "JB0001",
- "salary": 15,
- "salary_type": "hourly",
- "overtime_rate": 15,
- "role_rates": {
- "3": {
- "per_hour": 20,
- "per_shift": 3
}, - "7": {
- "per_hour": 10,
- "per_shift": 0
}
}, - "leave_rates": {
- "1": 50,
- "2": 40
}, - "leave_rates_unit": "days",
- "leave_rates_type": "deduction",
- "notes": "Qualified first aider"
}{- "id": 1,
- "deleted": false,
- "level": "admin",
- "first_name": "Joe",
- "last_name": "Bloggs",
- "email": "joe.bloggs@example.com",
- "group": 1,
- "locations": [
- 1,
- 2,
- 3,
- 4,
- 5
], - "roles": [
- 1,
- 2,
- 3,
- 7,
- 10
], - "default_role": 1,
- "dob": "1989-04-27",
- "start_date": "2016-01-01",
- "final_working_date": null,
- "weekly_hours": 40,
- "holiday_allowance": 28,
- "holiday_allowance_unit": "days",
- "payroll_id": "JB0001",
- "salary": 15,
- "salary_type": "hourly",
- "overtime_rate": 15,
- "role_rates": {
- "3": {
- "per_hour": 20,
- "per_shift": 3
}, - "7": {
- "per_hour": 10,
- "per_shift": 0
}
}, - "leave_rates": {
- "1": 50,
- "2": 40
}, - "leave_rates_unit": "days",
- "leave_rates_type": "deduction",
- "notes": "Qualified first aider"
}| id required | number Example: 1 ID of the user |
| deleted | boolean |
| level | string |
| first_name | string |
| last_name | string |
string | |
| group | number |
| locations | Array of numbers |
| roles | Array of numbers |
| default_role | number |
| dob | string |
| start_date | string |
| final_working_date | any or null |
| weekly_hours | number |
| holiday_allowance | number |
| holiday_allowance_unit | string |
| payroll_id | string |
| salary | number |
| salary_type | string |
| overtime_rate | number |
object | |
object | |
| notes | string |
{- "deleted": false,
- "level": "admin",
- "first_name": "Joe",
- "last_name": "Bloggs",
- "email": "joe.bloggs@example.com",
- "group": 1,
- "locations": [
- 1,
- 2,
- 3,
- 4,
- 5
], - "roles": [
- 1,
- 2,
- 3,
- 7,
- 10
], - "default_role": 1,
- "dob": "1989-04-27",
- "start_date": "2016-01-01",
- "final_working_date": null,
- "weekly_hours": 40,
- "holiday_allowance": 28,
- "holiday_allowance_unit": "days",
- "payroll_id": "JB0001",
- "salary": 15,
- "salary_type": "hourly",
- "overtime_rate": 15,
- "role_rates": {
- "3": {
- "per_hour": 20,
- "per_shift": 3
}, - "7": {
- "per_hour": 10,
- "per_shift": 0
}
}, - "leave_rates": {
- "1": 50,
- "2": 40
}, - "notes": "Qualified first aider"
}{- "id": 1,
- "level": "admin",
- "first_name": "Joe",
- "last_name": "Bloggs",
- "email": "joe.bloggs@example.com",
- "group": 1,
- "locations": [
- 1,
- 2,
- 3,
- 4,
- 5
], - "roles": [
- 1,
- 2,
- 3,
- 7,
- 10
], - "default_role": 1,
- "dob": "1989-04-27",
- "start_date": "2016-01-01",
- "final_working_date": null,
- "weekly_hours": 40,
- "holiday_allowance": 28,
- "holiday_allowance_unit": "days",
- "payroll_id": "JB0001",
- "salary": 15,
- "salary_type": "hourly",
- "overtime_rate": 15,
- "role_rates": {
- "3": {
- "per_hour": 20,
- "per_shift": 3
}, - "7": {
- "per_hour": 10,
- "per_shift": 0
}
}, - "leave_rates": {
- "1": 50,
- "2": 40
}, - "leave_rates_unit": "days",
- "leave_rates_type": "deduction",
- "notes": "Qualified first aider"
}[- {
- "user": 1,
- "location": 1,
- "role": 1,
- "in_time": 1401789600,
- "minutes_late": 0,
- "shift": {
- "id": 1,
- "start_time": 1401789600,
- "end_time": 1401816600,
- "minutes_break": 60,
- "location": 1,
- "role": 1
}, - "in_method": "mobile",
- "in_location": {
- "lat": 51.3752172,
- "lng": -0.2881249,
- "accuracy": 50
}, - "in_device": null,
- "in_terminal": null
}, - {
- "user": 2,
- "location": 2,
- "role": 2,
- "in_time": 1401789600,
- "minutes_late": 0,
- "shift": null,
- "in_method": "mobile",
- "in_location": null,
- "in_device": null,
- "in_terminal": null
}, - {
- "user": 3,
- "location": 3,
- "role": 3,
- "in_time": 1401789600,
- "minutes_late": 0,
- "shift": {
- "id": 3,
- "start_time": 1401789600,
- "end_time": 1401816600,
- "minutes_break": 60,
- "location": 1,
- "role": 1
}, - "in_method": "mobile",
- "in_location": {
- "lat": 51.3752172,
- "lng": -0.2881249,
- "accuracy": 50
}, - "in_device": null,
- "in_terminal": null
}
]| method required | string The method being used for clocking |
| shift | number ID of the shift that is being clocked into |
| terminal | number The ID of the terminal being used (if method is 'terminal') |
| user | number The ID of the user clocking in (if method is 'terminal') |
| photo | string Base64 encoded JPEG image of the user (if method is 'terminal') |
object Location object representing where the user is (if method is 'mobile') |
{- "method": "terminal",
- "shift": 1,
- "terminal": 1,
- "user": 1,
- "photo": "string",
- "location": {
- "lat": 51.375217,
- "lng": -0.288125,
- "accuracy": 50
}
}{- "user": 1,
- "location": 1,
- "role": 1,
- "in_time": 1401789600,
- "minutes_late": 0,
- "shift": {
- "id": 1,
- "start_time": 1401789600,
- "end_time": 1401816600,
- "minutes_break": 60,
- "location": 1,
- "role": 1
}, - "in_method": "mobile",
- "in_location": {
- "lat": 51.3752172,
- "lng": -0.2881249,
- "accuracy": 50
}, - "in_device": null,
- "in_terminal": null
}{- "user": 1,
- "location": 1,
- "role": 1,
- "in_time": 1401789600,
- "minutes_late": 0,
- "shift": {
- "id": 1,
- "start_time": 1401789600,
- "end_time": 1401816600,
- "minutes_break": 60,
- "location": 1,
- "role": 1
}, - "in_method": "mobile",
- "in_location": {
- "lat": 51.3752172,
- "lng": -0.2881249,
- "accuracy": 50
}, - "in_device": null,
- "in_terminal": null
}| id required | number Example: 1 ID of the user |
| method required | string The method being used for clocking |
| action required | string The action being taken |
| terminal | number The ID of the terminal being used (if method is 'terminal') |
| photo | string Base64 encoded JPEG image of the user (if method is 'terminal') |
object Location object representing where the user is (if method is 'mobile') |
{- "method": "terminal",
- "action": "end_break",
- "terminal": 1,
- "photo": "string",
- "location": {
- "lat": 51.375217,
- "lng": -0.288125,
- "accuracy": 50
}
}{- "start_time": 1470779220,
- "start_location": {
- "lat": 51.3752172,
- "lng": -0.2881249,
- "accuracy": 50
}, - "end_time": 1470779400,
- "end_location": {
- "lat": 51.3752172,
- "lng": -0.2881249,
- "accuracy": 50
}
}| id required | number Example: 1 ID of the user |
| method required | string The method being used for clocking |
| terminal | number The ID of the terminal being used (if method is 'terminal') |
| photo | string Base64 encoded JPEG image of the user (if method is 'terminal') |
object Location object representing where the user is (if method is 'mobile') |
{- "method": "terminal",
- "terminal": 1,
- "photo": "string",
- "location": {
- "lat": 51.375217,
- "lng": -0.288125,
- "accuracy": 50
}
}{- "id": 23404,
- "deleted": false,
- "approved": true,
- "user": 1,
- "location": 1,
- "role": 1,
- "in_time": 1401789600,
- "out_time": 1468407950,
- "minutes_break": 60,
- "minutes_late": 0,
- "hours": 6,
- "hours_auto": 6,
- "hours_is_auto": true,
- "notes": null,
- "shift": {
- "id": 1,
- "start_time": 1401789600,
- "end_time": 1401816600,
- "minutes_break": 60,
- "location": 1,
- "role": 1
}, - "in_method": "mobile",
- "in_location": {
- "lat": 51.3752172,
- "lng": -0.2881249,
- "accuracy": 50
}, - "in_device": null,
- "in_terminal": null,
- "out_method": "mobile",
- "out_location": {
- "lat": 51.3752172,
- "lng": -0.2881249,
- "accuracy": 50
}, - "out_device": null,
- "out_terminal": null
}