The API returns standard HTTP response codes to indicate success or failure of the API requests. For errors, we also return a customised error message inside the JSON response. You can see the returned HTTP status codes below.

HTTP Status Codes

Status Code

Status Name

Message

200

OK

Request successful. Most GET requests will return 200 OK.

201

Created

Resource successfully created. Most POST requests to create a Fidel entity (for example, a program or a location) will return a 201 Created.

204

No Content

Request successful with no content returned. Usually DELETE requests will return a 204 No Content.

400

Bad Request

Request was unacceptable. error.code and error.message contain information about the rejection reason. For example:
"error": { "code": "content-type", "message": "Content-Type header is not defined" }

401

Unauthorised

API or SDK key provided is invalid. For example:
"error": { "code": "credential", "message": "Credential does not exist" }

402

Request Failed

Valid parameters but the request failed.

403

Forbidden

The request could not be satisfied. We throw a 403 when you try to send invalid HTTP requests. For example, sending a POST body with a GET request.

404

Not Found

Resource does not exist within the Fidel API. For example:
"error": { "code": "routes", "message": "Route does not exist"

405

Method Not Allowed

Invalid HTTP method. The resource you're trying to call does not support the method you're trying to use. For example:
"error": { "code": "routes", "message": "Invalid HTTP method" }

500, 502, 503, 504

Server Errors

Something went wrong with the FIDEL API.

You can see all the possible error responses for the Create Card and Delete Card endpoints in the following pages:

Create Card - Error Responses
Delete Card - Error Responses