Health Check
Test and confirm that the Transaction History API is up and ready to process requests.
GET
/transaction-history/health
Take a look at our OpenAPI (Swagger-Spec) schema to learn more about the API calls.
This test endpoint ensures there are no known connectivity issues between AIR MILES and our partners. The HEALTH call functions similarly to a standard ‘ping’ request, determining if a client or host is online and accessible.
Note
To receive a Bearer token and authorize your request, use theclient_id
and client_secret
provided to you by AIR MILES.
Tip
It is highly recommended that all partners use the HEALTH endpoint upon starting their integration, to ensure both systems can communicate properly. Also at the partner’s discretion, we recommend performing periodic HEALTH tests at regular intervals to be notified immediately in the case of any unforeseen outages.Sample request
curl -X GET
https://cert.airmilesapis.ca/transaction-history/health \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsI...' \
--header 'Channel-Code: MOBAPP' \
--header 'Accept-Language: EN'
Header parameters
Parameter | Description |
---|---|
Content-Type | Default value: application/json |
Authorization | Token from authentication.
Example: |
Channel-Code | Channel by which the transaction is called. The response will differ for different channels.
Example: |
Accept-Language | Language parameters, either “EN” for English or “FR” for French.
Example: |
Sample response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Transfer-Encoding: chunked
Date: Mon, 29 Oct 2019 15:27:34 GMT
{
"status": "up"
}
Status codes
Status Code | Description |
---|---|
200 |
The transaction was successful. |
408 |
The transaction timed out. |
400 |
A mistake was made when submitting the request. Please correct the error and try again. |
503 |
The system is unavailable due to scheduled maintenance. No requests can be sent. |
500 |
An unknown error occurred. |
none | No valid Bearer token present. Please generate a valid Bearer token and submit to continue. |