Discussions
Employees endpoint does not return status attribute
9 days ago by Martin Gregoire
Hey there! I'm looking into an issue where our app cannot get the status of an employee.
While querying the Personio API endpoints, I noticed that indeed the status
attribute is absent.
For reference: Changelog
Here in the example responses we see:
"status": {
"label": "Status",
"value": "active",
"type": "standard",
"universal_id": "status"
},
I tested this with cURL. Please have a look:
curl --request GET \
--url 'https://api.personio.de/v1/company/employees?limit=1&offset=0&attributes[]=status&attributes[]=first_name' \
--header 'accept: application/json' \
--header 'authorization: Bearer ...'
This is the response:
{
"success": true,
"data": [
{
"type": "Employee",
"attributes": {
"id": {
"label": "ID",
"value": 12345,
"type": "integer",
"universal_id": "id"
},
"first_name": {
"label": "First name",
"value": "Foo",
"type": "standard",
"universal_id": "first_name"
}
}
}
],
"metadata": {
"total_elements": 183,
"current_page": 0,
"total_pages": 183
},
"offset": 0,
"limit": 1
}
As you can see, only the first_name
attribute is present. status
is missing.
The same happens when not passing any attributes
query parameter.
It's similar for the "Get Employee by ID" endpoint - the response does not contain the status
among all the attributes.
curl --request GET \
--url 'https://api.personio.de/v1/company/employees/12345' \
--header 'accept: application/json' \
--header 'authorization: Bearer ...'
Are we doing something wrong here?
Any help would be greatly appreciated.