CEA Card API
Introduction
Welcome to the CEA Card API.
This RESTful JSON API provides access to up-to-date information about the status of CEA cards.
Registration
To use the API you will need to email us to request a new account.
All account registrations are manually validated before being activated. You will receive an email once your account has been accepted and activated.
Once registered you will be able to login to the developer portal to manage your API key.
Authentication
All API requests require a valid API key in the HTTP header formatted as follows, where <api-key> is your registered API key:
Authorization: Bearer <api-key>
You can register a new API key or manage your existing key in the developer dashboard.
Accept Header
The following Accept HTTP header must also be included in all API requests:
Accept: application/json
IP whitelisting
Each registered account has an associated list of whitelisted IP addresses from which requests can be made.
The IP whitelist for your account can be managed within the developer portal.
Card information
When retrieving a card the following information will be available in the response:
Key name | Value / description |
---|---|
card_number | The 9 digit card number. |
expiry_date | The expiry date of the card in YYYY-MM-DD format. |
status | The status of the card. Either ACTIVE, EXPIRED, or SUSPENDED. |
Validating a single card
The card endpoint retrieves a single card with all its details.
You may use this endpoint to validate any card number. For example, you may call this endpoint to validate a given CEA card number during your booking process.
HTTP request:
GET https://api.ceacard.co.uk/api/card/<card_number>
URL parameters:
Parameter | Description |
---|---|
card_number | The card number to retrieve. |
Example response:
{
"data": {
"card_number": 400465676,
"expiry_date": "2018-12-13",
"status": "ACTIVE"
}
}
Response Codes
The API uses standard HTTP response codes as follows.
Note: Your API client should check the HTTP response code before parsing the response body.
Code | Name | Meaning |
---|---|---|
200 | OK | You got a valid response. Awesome. |
400 | Bad Request | Your request is bad. |
401 | Unauthorized | Your API key is wrong or not present. |
403 | Forbidden | You do not have access to what you are trying to do. Check the IP address whitelist. |
404 | Not found | The card number you have requested could not be found. |
405 | Method not allowed | You tried to access the API endpoint with an invalid method. |
406 | Not Acceptable | You requested a format that isn't application/json. |
429 | Too Many Requests | You're making too many requests. Slow down! |
500 | Internal Server Error | We had a problem with our server. Try again later. |
503 | Service Unavailable | We're temporarily offline for maintenance. Please try again later. |