Discussions
/company/attendances -- POST request not working - Given Data Invalid
First Attempt
- The demo python code is not working.
- The Try it form ist not working:
--> Response: {"success":false"error":{"code":0"message":"The given data was invalid.""errors":{"attendances":["Bitte geben Sie attendances ein, um fortzufahren."
]}}}
Second Attempt
Applied your JSON example structure using my credentials/ids in my code:
{
"attendances": [
{
"employee": 12345,
"date": "2018-09-05",
"start_time": "08:00",
"end_time": "11:00",
"break": 15,
"comment": "Some comment"
}, {
"employee": 12345,
"date": "2018-09-06",
"start_time": "09:00",
"end_time": "18:00",
"break": 30,
"comment": "Another comment"
}
]
}
--> Response:: {'success': False, 'error': {'code': 0, 'message': 'The given data was invalid.', 'errors': {'attendances': ['The attendances must be an array.']}}}
By the way: employee is defined as string in your try-it field and python code, but unsigned integer below in the model description. What is right?
What is the right way to send this POST request, please?
Thanks in advance for a quick feedback