Welcome to FIDEL API. 👋
You can use the API to access all endpoints, such as the Locations endpoint to create locations and add merchantIds, or the Transaction endpoint to get transactions from a specific program or location.
The API is organised around REST. JSON is returned by all API responses, including errors. In all API requests, you must set the
content-type HTTP header to
application/json. All API requests must be made over HTTPS. Calls made over HTTP will fail.
All API URLs referenced in this documentation start with the following base URL:
FIDEL API accounts have test mode and live mode API keys. To change modes just use the appropriate key to get a live or test object. You can find your API keys in the account page of your FIDEL dashboard.
Authenticate your API requests by including your test or live secret API key in the request header. Create an HTTP header named
fidel-key and set your secret key as the value.
You should use the public keys on the SDKs and the secret keys to authenticate API requests.
curl -X GET \ https://api.fidel.uk/v1/transactions/85cdb967-5c5d-45e3-afdd-d0a9e792bf0f \ -H 'content-type: application/json' \ -H 'fidel-key: sk_test_50ea90b6-2a3b-4a56-814d-1bc592ba4d63'
Do not share or include your secret API keys on client side code.
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
Resource successfully created.
Request successful with no content returned.
Request was unacceptable.
API key provided is invalid.
Valid parameters but the request failed.
Resource does not exist.
500, 502, 503, 504
Something went wrong with the FIDEL API.
All objects have created and updated date properties. Dates are encoded as strings following the ISO 8601 standard. (2017-06-01T17:18:11.345Z)
On all List endpoints, objects can be filtered by date using the
curl -X GET \ 'https://api.fidel.uk/v1/programs/e1d96ed3-dfd6-4896-8e57-37dca8b1c394/transactions?from=2019-10-26&to=2019-10-27' \ -H 'content-type: application/json' \ -H 'fidel-key: sk_test_50ea90b6-2a3b-4a56-814d-1bc592ba4d63'
On the List Transactions endpoint the date filtering is applied on the
datetime property considering no timezone information. You can access On the other List endpoints the filtering is applied on the
In order to migrate to a newer version of the API you can use a custom HTTP header specifying the API version you would like to request. This allows you to stay on an earlier version and test your development environments against new versions and upgrade when ready.
The Fidel-Version header allows you define in each request the version of the endpoint output. It is possible to request the current version or newer versions of the API.
curl -X GET \ https://api.fidel.uk/v1/transactions/9cc66ebe-8a18-4a00-b9cb-e1802bc6709d \ -H 'content-type: application/json' \ -H 'fidel-key: sk_test_50ea90b6-2a3b-4a56-814d-1bc592ba4d63' \ -H 'fidel-version: 2019-03-05'
Some API requests support fetching multiple objects. FIDEL API uses cursor-based pagination via the 'start' and 'last' parameters.
A maximum of 100 objects can be returned per request and the limit can be specified by using the 'limit' parameter. By default the 'limit' is set to 100.
curl -X GET \ 'https://api.fidel.uk/v1/transactions?limit=50' \ -H 'content-type: application/json' \ -H 'fidel-key: sk_test_8168fe13-91fb-4516-93cf-8a21e5736350'
When the response contains the ‘last’ property it means there are more objects you can fetch. To get the next objects you should set the 'start' property to the value of the 'last' property.
Remember to stringify the 'last' property before using it.
By default, the objects are returned in descending order by 'created' date. If you want to fetch the results in ascending order you can set the 'order' property with the value 'asc'.
Deleting Brands on live environment
You can only delete Brands with no signed consent on live environment.