Errors

When something is wrong with a request, the API will respond with a non-200 status code.

To help you better understand the problem, where possible, the API overloads a number of different HTTP error codes. Additional information is provided by way of subcodes and cause strings, so your application logic has as much visibility as possible into what has gone wrong.

An invalid request

Here's an example response to a request with an invalid API key.

curl -i -X GET "https://store.bponi.com/api/v2/auth/test" \
       -u "thisIsNotAValidAPIKey:"
1
2
HTTP/1.1 401 Unauthorized

{
  "code": "InvalidCredentials",
  "message": {
    "error": 1102,
    "message": "The API key provided is invalid.",
    "request": "ec76efd0-b8c0-484a-ad5f-725c5bbee869",
    "cause": "This key does not exist or is no longer active."
  }
}
1
2
3
4
5
6
7
8
9
10
11

For a more detailed look at the various error subcodes, their meaning and parent HTTP status codes, please refer to this List of error codes, which will be periodically updated as the API's error handling evolves.

🔔 Getting help with errors

The error codes in the above list are generic and further explanation will be provided with the response in the message and cause fields.

If you run into any errors that you do not understand, take note of the request ID included in message.request and send this along to our support team for assistance.

Last Updated: 11/29/2021, 10:25:26 PM