Discussions

Ask a Question
Back to All

POST to /company/employees using example data returns an error

Using the example data from the API reference, creating an employee returns an error:

{
"employee": {
"email": "[email protected]",
"first_name": "John",
"last_name": "Dou",
"gender": "male",
"position": "developer",
"subcompany": "ACME",
"department": "IT",
"office": "Madrid",
"hire_date": "2020-01-31",
"weekly_working_hours": 40,
"status": "active",
"supervisor_id": 5,
}
}

{
"success": false,
"error": {
"message": "The given data was invalid.",
"code": 0,
"error_data": {
"employee.first_name": [
"Bitte geben Sie employee.first name ein, um fortzufahren."
],
"employee.last_name": [
"Bitte geben Sie employee.last name ein, um fortzufahren."
],
"employee.email": [
"Bitte geben Sie employee.email ein, um fortzufahren."
]
}
}
}