Learn how to resolve the most common problems people encounter in the REST API.
If you're encountering some oddities in the API, here's a list of resolutions to some of the problems you may be experiencing.
401
error?Typically, we send a 401
error when our API cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
Make sure that your client and request-message has been setup correctly.
When the setup is correct, but your credentials isn't, the API returns a 400
error instead.
400 Bad Request
?A 400 Bad Request
error indicates that your credentials are not correct. Ensure you're authenticating correctly and you're sending both your ClientId
and ClientSecret
inside the body. We recommand you to test your API-call with Postman, to validate your request. If the problem stll occurs, please contact us.
{
"message": "ClientId or Secret is incorrect"
}
ClientId and ClientSecret are not explicitly expired. The access will be invalidated if our organisation suspends your account from the API. In most cases we'll notify you if your access has been suspended.
Your access token is only valid for short time and becomes invalid after that time. If this happens, you need to re-authorize again.
When you're authorizing, the API includes the expiration datetime of the access token.
{
"token": "--granted-access-token--",
"validTill": "2020-08-22T19:06:58.4049696+00:00"
}
401 Unauthorized
error?The HTTP 401 Unauthorized
client error status response code indicates that the request has not been applied because it lacks valid authentication credentials for the target resource.
Ensure your bearer-token is included in your header when you make a request/post to the API. In case the API is still returning 401
eror, it may indicate that the token may be expired and you need to re-authorize again
404 Not found
response?When the API returns a 404 Not found
error, it usually indicates that the reference
you're passing cannot be found within the data we have for your organisation.
If you have posted a new job-posting with the reference
you are seeking, it means that the data is still inside the queue and still needs to be verified and approved by one of our employees.
When your job-post is still in the queue, you are still able to submit changes for that particular job item.
400 Bad Request
? Why am I getting a A 400 Bad Request
error indicates that your message is not valid. The API will always return a json response message when a 400
error occurs. This helps you to indicate the problem(s) of the error.
{
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"traceId": "|4f95f991-47b8474e697bd575.",
"errors": {
"Reference": [
"The Reference field is required."
],
"Description": [
"The Description field is required."
],
"JobFunction": [
"The JobFunction field is required."
]
}
}
409 Conflict
response?Conflicts are most likely to occur in response to a POST request which cannot handled properly. For example, you may get a 409 response when you are trying to post a value for a certain field, but where the type of value does not match the expected type resulting in a conflict.