Default response format
Data is returned by the API in JSON format.
The returned JSON array is made up of three elements:
data
links
metadata
Note
data is also an array which contains the relevant data - in the below example data is an array of employee time off records for employee 225657
{
"data": [
{
"employee": {
"id": 225657,
"first_name": "Sarah",
"known_as": "",
"middle_name": "",
"last_name": "Finch"
},
"start_date": "2017-07-19",
"end_date": "2017-07-19"
}
],
"links": {
"first": "https://api02.naturalhr.net/api/v1/employee/225657/time-off?page=1",
"last": "https://api02.naturalhr.net/api/v1/employee/225657/time-off?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "https://api02.naturalhr.net/api/v1/employee/225657/time-off",
"per_page": 100,
"to": 1,
"total": 1
}
}
Updated almost 4 years ago