All Dayforce REST APIs return an HTTP Status code of 200 if the request was successful. Other possible error codes include 400 level error codes indicating an issue with the request itself, or 500 level codes indicating the server isn’t functioning properly.
In the case of a unsuccessful request, you should always check the body of the response to determine if there is any additional information to help in resolving the error.
The following method is called from the above code samples to check for an error and display the content of the response body:
Additionally, read ProcessResult Messages. The process results are messages that will assist you in resolving issues with requests that result in 400 level HTTP status codes.