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

HTTP Status Codes

Status CodeStatus NameMessage
200OKRequest successful. Most GET requests will return 200 OK.
201CreatedResource successfully created. Most POST requests to create a Fidel API entity (for example, a program or a card) will return a 201 Created.
204No ContentRequest successful with no content returned. Usually DELETE requests will return a 204 No Content.
400Bad RequestRequest 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" }
401UnauthorizedAPI or SDK key provided is invalid. For example: "error": { "code": "credential", "message": "Credential does not exist" }
402Request FailedValid parameters but the request failed.
403ForbiddenThe request could not be satisfied. The API throws a 403 when you try to send invalid HTTP requests. For example, sending a POST body with a GET request.
404Not FoundResource does not exist within Fidel API. For example: "error": { "code": "routes", "message": "Route does not exist"
405Method Not allowedInvalid 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" }
429Too Many RequestsThe endpoint rate limit was exceeded. See more about rate limits on Fidel API.
500, 502, 503, 504Server ErrorSomething went wrong on the API's side.

Card Errors

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