Loyalty Providers can be retrieved within the Locomote Corporate Travel Platform using the API. By using GET it will retrieve all Loyalty Providers within the database.
Loyalty Providers (or suppliers) are categorised into 3 resources of air, hotel & car. An air loyalty provider is the airline or carrier that has a rewards program eg. Virgin Australia has the "Velocity Frequent Flyer" program. An example of hotel loyalty is the Hyatt Hotel, which falls under the "World of Hyatt" loyalty program.
This data is Read Only and cannot be changed or edited by the API, which is why a "find all" (GET) is only available, whereas other resources have PATCH, POST & DELETE. A specific user does not require identifying, so there's no need to append an Employee ID to the back of the URL.
Authorisation via "X-USER-USERNAME" and "X-USER-TOKEN"
All Loyalty Providers
Get Loyalty Providers
Get a list of loyalty_providers resources
GET https://locomotetmp.com/api/loyalty_providers
Request Parameters
Parameter Name | Description | Required | Valid Values |
---|---|---|---|
page[number] | The page number to fetch | No | Any Integer |
page[size] | The number of items that appear on each page | No | Any Integer |
Example Request
curl -i -H X-USER_TOKEN\:\ [your API key] -H X-USER-USERNAME\:\ [Company Admin email] -H Content-Type\:\ application/json -XGET https\://[your subdomain].locomotetmp.com/api/loyalty_providers/
No request fields required for GET
Example Response
{
"data": [
{
"id": "9c51746b-2cce-11e8-87f9-0662bed6e7db",
"type": "loyalty_providers",
"attributes": {
"name": "JSC Aurora",
"category": "airline",
"code": "HZ"
}
},
{
"id": "9c5b4ca7-2cce-11e8-87f9-0662bed6e7db",
"type": "loyalty_providers",
"attributes": {
"name": "Aer Lingus Aer Club",
"category": "airline",
"code": "EI"
}
},
{
"id": "9c5b6165-2cce-11e8-87f9-0662bed6e7db",
"type": "loyalty_providers",
"attributes": {
"name": "Aeroflot Bonus",
"category": "airline",
"code": "SU"
}
},
Response Fields
Field Name | Description | Valid Values |
---|---|---|
id |
Identifier used to reference a given user | Read only |
type |
Type of resource | Read only |
name |
Loyalty Provider's name | Read only |
category |
Type of Loyalty Provider | Read only |
code |
Loyalty Provider chain code | Read only |
Need to Know
As Loyalty Providers is a Read Only query, there is no input or mandatory fields required as the data cannot be edited.
Note
We can use this data to complete endpoints for Loyalty Memberships.
Comments
Article is closed for comments.