The purpose of this documentation is to provide a guide on how to integrate with the Transaction History API. As part of this documentation, we also include information on RESTful HTTPS requests/responses, error codes, and integration environments.
Target audience
This material is intended to be used by a partner wishing to integrate with the Transaction History API.
Service level objective
Please contact our partner support team for details on our Service Level Agreement (SLA). Refer to our “Escalation Guide” for contact details.
Did you know
Our “Transaction Day” for real-time Issuance runs from 12:00AM to 11:59PM EST daily.
Integration environments
There are two sets of environments used by partners to integrate with the real-time checkout platform. These environments are configured similarly for consistent production-level quality, whether the partner has deployed to production or is still performing non-production testing.
Contains production code and live user data for real-world 3rd party integrations.
Note
ALL integration environments must be accessed via HTTPS only.
Your AMRP project team
In preparation for launch, an AIR MILES team is pulled together to assist Partners with integration and setup. This team will provide the following services:
Consulting Partners on the best technical solution to support AIR MILES Issuance based on system compatibility.
Providing guidance for assessing Partner requirements, data exchange methods, and reconciliation.
As well as overseeing a broad range of activities to meet the requirements of launch, including:
Planning
Communications
Delivery
Execution
Monitoring
Commonly used acronyms
Name
Definition
L1
AirMilesLoyaltyInc: Is the name of the parent organization that operates the AMRP.
AMRP
AIR MILES Rewards Program: The loyalty program itself consisting both AIR MILES issuance an redemption processes.
AMRM
AIR MILES Rewards Miles: The loyalty program currency that Collectors earn and redeem for travel, merchandise and cash rewards.
RTC
Real-Time Checkout: An AIR MILES API platform specifically tailored for “Real-Time Issuance” & redemption of AIR MILES “Reward Miles”.
M2M
Machine-to-Machine: Refers to direct communication between devices using any communications channel, including wired and wireless. This includes CLIs, daemons, or services running on your back-end that self-authenticates and/or authorizes an application without collector interaction.
1 - Authentication & Authorization
The AIR MILES security layer granting access to member APIs and associated services.
For more information on “Auth0” and the various authentication flows, click the button below.
2 - API Library
This section includes the three (3) Transaction History API endpoints listed below. Each page offers a brief summary of the API endpoint in question, common use-case scenarios, and sample request/response messages with response codes.
Retrieve the transaction history for a specified Collector number and filter by sponsor.
Handling request/response messages
As described above, the RESTful specification defines a transaction as a pair of request and response messages that are used for information interchange.
Note
Mandatory parameters will be marked with an asterisk (*) in the subsequent pages.
Message Type
Description
Request
All mandatory parameters MUST be included in each API call.
All other parameters are optional, unless stated otherwise.
Response
Indicates which parameters/elements are always returned.
The “Response” Content-Type is specified in the Header (e.g., application/json.
A “Response” resulting in an ’error condition’ will include an accompanying responseCode.
Partners are expected to verify and handle each Response Code as necessary.
All response values are NOT not case-sensitive.
Data elements that contain null or ’empty’ values are automatically excluded from the response body.
The ‘POS’ terminal may use the response elements to display/print information for the customer.
Status codes
Status Code
Description
200
The transaction was successful.
401
The Collector account is not active.
408
The transaction timed out.
401
The Collector number is invalid.
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.
2.1 - Health Check
Test and confirm that the Transaction History API is up and ready to process requests.
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 the client_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.
This API call is not intended for manual search queries, it only retrieves the transaction history for a Collector who is logged in.
This endpoint is used to retrieve the transaction history for a Collector who is logged in to the website or the mobile application. A date range must be provided (with a start and end-date), and this will return results for all sponsors the Collector has transacted with during this time period.
Note
The Collector number is embedded in the Bearer access token automatically and therefore does not need to be included in the request itself.
This endpoint is used to retrieve the transaction history for a specified Collector and filtered by sponsor. A date range must be provided (with a start and end-date), and at least one sponsor and a single Collector number. This will return the Collector’s transaction history at the sponsor, for the time period specified above.
Note
To receive a Bearer token and authorize your request, use the client_id and client_secret provided to you by AIR MILES.