APIs to onboard and manage users.
curl -i -X PUT \
https://apis.spotnana.com/v2/users/4974a66b-7493-4f41-908c-58ba81093947/travel-preferences \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"preferences": {
"airPref": {
"airlinePrefs": [
{
"airlines": [
"Indigo"
],
"flightType": "DOMESTIC"
}
],
"alliancePref": {
"alliances": [
"STAR_ALLIANCE"
]
},
"farePref": {
"fareTypes": [
"CHANGEABLE"
]
},
"homeAirport": "NEW YORK",
"mealPref": {
"exclMealPrefs": [
"VGML"
],
"inclMealPrefs": [
"VGML"
],
"specialMealDescription": "Veg only meal"
},
"numStopPref": {
"numOfStops": 34
},
"seatAmenityPref": {
"seatAmenityTypes": [
"WIFI"
]
},
"seatLocationPrefs": [
{
"cabins": [
"FIRST"
],
"isBulkHeadPref": false,
"maxFlightDurationInHours": 3,
"position": "WINDOW"
}
],
"preferredAirports": [
{
"airportName": "San Francisco International Airport",
"airportCode": "SFO",
"label": "HOME"
}
]
},
"preferredCurrency": "USD",
"railCards": [
{
"cardNumber": "string",
"expiryDate": {
"iso8601": "2017-07-21"
},
"name": "Veterans Railcard",
"spotnanaCode": "VET",
"vendor": "ATOC"
}
],
"railPref": {
"preferredRailStations": [
{
"stationName": "Chicago Union Station",
"stationCode": "CHI",
"cityName": "Chicago",
"countryCode": "string",
"label": "HOME"
}
],
"seatPreference": {
"hasAccessibility": false,
"seatTypes": [
"NORMAL"
],
"seatLocations": [
"AISLE"
],
"deckLevels": [
"UPPER_DECK"
],
"seatDirections": [
"FORWARD"
]
},
"travelClasses": [
"FIRST"
],
"coachPreferences": [
"NON_SMOKING"
],
"conditionalRates": [
"AAA"
]
},
"carPref": {
"vendors": [
{
"code": "ZE",
"name": "HERTZ",
"isPresentInPreferredVendors": true
}
],
"carTypes": [
"ECONOMY"
],
"engineTypes": [
"PETROL"
],
"transmissionTypes": [
"AUTOMATIC"
],
"conditionalRates": [
"AAA"
]
},
"hotelPref": {
"hotelParentChains": [
{
"chainCode": "EM",
"chainName": "Mariott"
}
],
"hotelBrands": [
{
"brandCode": "HY",
"brandName": "Global Hytt Corp."
}
],
"hotelAmenityTypes": [
"PARKING"
],
"roomPreference": {
"isMobilityAccessible": false,
"bedCount": "ONE_BED",
"roomType": "SMOKING",
"mostImportantFact": "BED_COUNT",
"roomLocation": "HIGH_FLOOR",
"pillowType": "FOAM",
"roomAmenityPrefs": [
"EXTRA_TOWELS"
]
},
"conditionalRates": [
"AAA"
]
}
}
}'
curl -i -X GET \
https://apis.spotnana.com/v2/users/4974a66b-7493-4f41-908c-58ba81093947/membership-info \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
{ "membershipInfos": [ { … } ] }
curl -i -X PUT \
https://apis.spotnana.com/v2/users/4974a66b-7493-4f41-908c-58ba81093947/membership-info \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"membershipInfos": [
{
"appliedTo": [
"TAJ"
],
"id": "firstId",
"issuedBy": "firstIssuedBy",
"type": "AIR"
}
]
}'