Error Handling

The following error codes may be returned by the UPC Database API.

 

Status Name Message
200 OK Everything worked successfully.
400 Bad Request The parameters provided for the request are invalid.
401 Unauthorised There was a problem with the authentication.
403 Forbidden Access to the requested object is forbidden.
404 Not Found The requested object does not exist.

 

In case of an error, the response will contain an array with proper statuses and messages:

{
    "message": "Product not found.",
    "status": 404,
    "error": true
}