CCJ web service – error codes
When utilising the CCJ web service, there is a possibility that you will experience errors at some point.
The errors that could occur during the authentication process are highlighted below:
Authentication Errors
| error | Service response | Response Content |
|---|---|---|
| Consumer key is not valid | 401 HTTP response code: HTTP/1.1 401 Unauthorised | oauth_problem=consumer_key_unknown |
| Oauth signature is not valid | 401 HTTP response code: HTTP/1.1 401 Unauthorised | oauth_problem=signature_invalid |
| Oauth nonce has been used previously | 401 HTTP response code: HTTP/1.1 401 Unauthorised | oauth_problem=nonce_used |
| Timestamp sent in request is too old (over 5 minutes) | 401 HTTP response code: HTTP/1.1 401 Unauthorised | ooauth_problem=timestamp_refused |
Once authenticated, you may experience service errors. A service error is indicated by the presence of the error response parameter. Additionally, the errors property will contain a list of error messages.
Examples of errors and the error response parameters and error properties returned are highlighted below:
Service Errors
| Error | Error Response Parameter/Error Properties |
|---|---|
| No forename supplied | { "error":true, "errors":[ "forename: Value is required and can't be empty" ] } |
| No surname supplied | { "error":true, "errors":[ "surname: Value is required and can't be empty" ] } |
| No postcode supplied | { "error":true, "errors":[ "postcode: Value is required and can't be empty" ] } |
| No credits available | { "error":true, "errors":[ "No credits available" ] } |
| No credits allocated | { "error":true, "errors":[ "No credits allocated" ] } |
| Internal service error | { "error":true, "errors":[ "Service error" ] } |
| An example of multiple errors | { "error":true, "errors":[ "forename: Value is required and can't be empty", "surname: Value is required and can't be empty", "postcode: Value is required and can't be empty" ] } |
If you have any issues related to errors, or need assistance, please do not hesitate to contact our web service support team.