-
Introduction
-
All requests require a valid subscription key header.
The request header is a subscription key which provides access to this API. These are managed and found in your Profile.
If you neglect to include the subscription key header, you will be reminded in the response:
{ "statusCode": 401, "message": "Access denied due to missing subscription key. Make sure to include subscription key when making requests to an API." }
-
All requests require a valid bearer token in the header.
The is obtained from your Token Endpoint. Note this resource requires your Client Id, username and password.
The request headers with value is the required header to authorize your calls to protected resources.
If you neglect to include the token, you will be reminded in the response:
{ "type": null, "title": "Unauthorized", "status": 401, "detail": "Missing Bearer Token. Each request requires an Authorization header with value 'Bearer [bearer token]'", "instance": "http://whatever.com/..." }
-
Code 403 "Access Restricted Resource" with "Failed to get authorization token"
This refers to an and can be immediately retried. Contact Codit if this is recurrent. Representation example:
{ "type": null, "title": "Access Restricted Resource", "status": 403, "detail": "Failed to get authorization token", "instance": "http://whatever.com/..." }
-
Code 404 Not Found used for "No records found."
This refers to data not available for the resource. That is no records matched your search. Representation example:
{ "type": null, "title": "Resource Not Found", "status": 404, "detail": "Resource Not Found", "instance": "http://whatever.com/..." }
-
Code 429 Rate limit is exceeded.
This refers to encountering a subscription rate limitation. The response will include information on when resposes will again be processed. Representation example:
{ "statusCode":429, "message":"Rate limit is exceeded. Try again in 31 seconds." }
-
Code 500 "Internal server error" with activityId
This refers to an and can be immediately retried. Contact Codit and supply the if this is recurrent. Representation example:
{ "statusCode": 500, "message": "Internal server error", "activityId": "..." }
-
Code 500 Internal Server Error
This refers to an . Representation example:
{ "type": null, "title": "Unknown Error", "status": 500, "detail": "[Error Message]", "instance": "http://whatever.com/..." }
-
Dates are all returned in UTC time
Client applications will need to take this in to account.
For instance:The value in the database is: 2016-02-16 21:54:00.000 (Eastern) All of the dates that are being returned via the REST API look similar to this
"addDate": "2015-10-01T04:01:00.34Z" The Z stands for Zulu time or UTC +0.