Discussions
Why is time punch rejected with "You must select a department when saving."?
over 1 year ago by Steve Davison
The docs for time punches do not say anything about the department being required in order to create a new time punch. However, the response I get from the post to create a time punch is as follows:
(
"title": "Bad Request",
"type": "https://httpstatus.es/400",
"status": 400,
"detail": "You must select a department when saving."
}
For the v1 API, we had implemented code to discover and supply a department, but after confirming with support that the department would no longer be required, we removed all that.
So, if it is not required, why am I getting this response? If it is required, why is it not documented as such and why has support told me that it's not? If the department is required, it would seem appropriate for there to be more discussion of how to discover the correct department, since we don't need department information for any other purpose.