REST API: Key Concepts
Learn the fundamental concepts of the Expiration Reminder API
Here is everything you need to understand before starting using the API.
Endpoints
The API is accessed by making HTTPS requests to a specific version endpoint URL, in which GET, POST, PUT, and DELETE methods dictate how your interact with the objects available. Every endpoint is accessed only via the SSL-enabled HTTPS (port 443) protocol.
Every call must contain the version number. The latest version is v1.
https://api.expirationreminder.net/v1/
Requests
Requests must be sent over HTTPS with any payload formatted in JSON (application/json). Every request must include the headers content-type: application/json and Authentication.
The API key can be retrieved from the account settings. Make sure to get the key for the version of the API you're using.
curl -X POST 'https://api.expirationreminder.net/v1/contacts'
-H 'content-type: application/json'
-H 'Authorization: Bearer YOUR_API_KEY'
-d '{"email":"john@doe.com"}'
Rate limiting
Our endpoint list has been optimized to ensure the critical routes can efficiently handle as many requests as possible without compromising stability. You can refer to the limits for each endpoint in this section.
Pagination
The results returned may be paginated, depending on the endpoint and your request. You can page through the results by using the following parameters in the query string.
Name | Type | Description |
---|---|---|
paging | integer | The number of results returned per page. The default and maximum value may vary per API |
page | integer | The page number to request. |
curl -X GET 'https://api.expirationreminder.net/v1/contacts?page=2'
-H 'content-type: application/json'
-H 'Authorization: Bearer YOUR_API_KEY'
Responses
Format
Each response can either be empty - for example in case of an update which returns an http 204 response and doesn't need to return additional infos - or a JSON object.
In case of success, the JSON object returned for each endpoint will be different.
An error object will contain a flag indicating if it was a success and a human-readable description of the error.
{
"contact_types": [
{
"name": "Customer",
"id": "e6a4b5a4-1272-49f9-af36-c9904ea86d61",
"organization_id": "c73983e2-4db4-4839-8270-4c043eacca22",
"is_active": true,
"modified": "2018-04-12 01:17:13Z",
"client_modified": "2018-04-12 01:17:13Z"
},
{
"name": "Employee",
"id": "59117351-0536-4fdd-b619-7cd11b8598ee",
"organization_id": "c73983e2-4db4-4839-8270-4c043eacca22",
"is_active": true,
"modified": "2018-04-12 01:16:37Z",
"client_modified": "2018-04-12 01:16:37Z"
},
{
"name": "Other",
"id": "a0741696-31fc-4763-936e-13134d268518",
"organization_id": "c73983e2-4db4-4839-8270-4c043eacca22",
"is_active": true,
"modified": "2018-04-12 01:15:47Z",
"client_modified": "2018-04-12 01:15:47Z"
},
],
"pages": 1,
"page": 0,
"total": 6
}
{
"message": "The access token is invalid",
"ok": false
}
HTTP response codes
Please find below, the HTTP response codes that can be returned by the Expiration Reminder API:
HTTP code | Status | Description |
---|---|---|
200 | OK | The request was successful |
400 | Bad request | The request is invalid. Check the error code in JSON. |
401 | Unauthorized | You have not been authenticated. Make sure the provided API key is correct. |
402 | Payment Required | Make sure your account is activated and that you have enough records. |
403 | Forbidden | You do not have the right to access the resource. |
404 | Not Found | Make sure you're calling an existing endpoint and that the parameters (object id etc.) in the path are correct. |
Updated 3 months ago