User Management API (v2)

Download OpenAPI description
Languages
Servers
Mock server
https://developer.spotnana.com/_mock/openapi/usersapi/
Staging URL
https://apis.spotnana.com/

Users

APIs to onboard and manage users.

Operations

Create user

Request

This endpoint is used to create user profiles in Spotnana. This is typically used by partner companies to onboard user profiles of their customer organizations.

Bodyapplication/jsonrequired
personalInfoobject(UserPersonalInfo)required

User details.

personalInfo.​addressesArray of objects(PostalAddress)
personalInfo.​dobobject(DateModel)

Date in ISO 8601 standard.

personalInfo.​emailstring(email)
Example: "example@email.com"
personalInfo.​genderstring(Gender)
Enum"MALE""FEMALE""UNSPECIFIED""UNDISCLOSED"
personalInfo.​identityDocsArray of PassportWrapper (object) or ImmigrationDocumentWrapper (object) or RedressNumberWrapper (object) or KnownTravelerNumberWrapper (object) or NationalDocWrapper (object)(IdentityDocument)

List of user identity documents.

Example: [{"passport":{"docId":"PASSPORTID","expiryDate":{"iso8601":"2017-07-21"},"issueCountry":"IN","issuedDate":{"iso8601":"2017-07-21"},"nationalityCountry":"IN","type":"REGULAR"}},{"ktn":{"number":"123456","issueCountry":"US"}}]
personalInfo.​nameobject(Name)

Full name containing first, middle, last (family) names, and suffix.

personalInfo.​phoneNumbersArray of objects(PhoneNumber)
personalInfo.​profilePictureobject(Image)

An image with meta data. Either the data or url property must be supplied to load the image.

personalInfo.​nationalitystring

Nationality of user

Example: "Indian"
personalInfo.​titlestring(UserTitle)
Enum"TITLE_UNKNOWN""MR""MS""MRS""MX""MASTER""MISS""DR""PROFESSOR""CAPTAIN"
personalInfo.​preferredLanguagestring

Language preferred by user.

Example: "en-US"
personalInfo.​preferredPronounstring(PreferredPronoun)

Pronoun preferred by user.

Enum"SHE_HER_HERS""HE_HIM_HIS""THEY_THEM_THEIRS"
personalInfo.​travelerNameobject(Name)

Full name containing first, middle, last (family) names, and suffix.

personalInfo.​emergencyContactobject(EmergencyContact)

Emergency contact information.

personalInfo.​emergencyContactInfoobject(EmergencyContactInfo)Deprecated

Emergency contact information.

businessInfoobject(BusinessInfo)

User business information.

personastring(Persona)required

Persona of the user

Enum"UNKNOWN_PERSONA""EMPLOYEE""GUEST""PERSONAL""RELATIVE""ADHOC"
isActiveboolean

a boolean flag to show if traveler is active.

Example: true
relativeOfobject(RelativeOf)

Link to primary traveler

billingCurrencystring

Preferred billing currency of the user

Example: "INR"
tierstring(Tier)

Tier of User. Note: In default UI, BASIC is displayed as Standard, and SEAT1A is displayed as VIP.

Enum"BASIC""SEAT1A"
externalIdstring

External id of this user.

travelPreferencesobject(TravelPreferences)

User's travel preferences

membershipInfoobject(MembershipInfo)

User's travel preferences

notificationPreferencesobject(NotificationPreferences)

Notification preferences of a user for different notification types.

adhocUserInfoobject(AdhocUserInfo)

Basic information related to ad-hoc traveler profile.

rolesArray of objects(RoleConfig)
travelArrangersobject(UserTravelArrangers)Deprecated

Travel arrangers for a user.

curl -i -X POST \
  https://developer.spotnana.com/_mock/openapi/usersapi/v2/users \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "personalInfo": {
      "addresses": [
        {
          "addressLines": [
            "Golden Gate Bridge"
          ],
          "administrativeArea": "CA",
          "administrativeAreaName": "California",
          "description": "San Francisco Home",
          "isDefault": true,
          "languageCode": "en",
          "locality": "San Francisco",
          "locationCode": "LAX",
          "organization": "Spotnana",
          "postalCode": "94130",
          "continentCode": "AF",
          "recipients": [
            "string"
          ],
          "regionCode": "US",
          "regionName": "America",
          "revision": 1,
          "sortingCode": "Jamaica",
          "sublocality": "string",
          "timezone": "America/Los_Angeles",
          "coordinates": {
            "latitude": 77.1025,
            "longitude": 28.7041
          }
        }
      ],
      "dob": {
        "iso8601": "2017-07-21"
      },
      "email": "example@email.com",
      "emergencyContactInfo": {
        "address": {
          "addressLines": [
            "Golden Gate Bridge"
          ],
          "administrativeArea": "CA",
          "administrativeAreaName": "California",
          "description": "San Francisco Home",
          "isDefault": true,
          "languageCode": "en",
          "locality": "San Francisco",
          "locationCode": "LAX",
          "organization": "Spotnana",
          "postalCode": "94130",
          "continentCode": "AF",
          "recipients": [
            "string"
          ],
          "regionCode": "US",
          "regionName": "America",
          "revision": 1,
          "sortingCode": "Jamaica",
          "sublocality": "string",
          "timezone": "America/Los_Angeles",
          "coordinates": {
            "latitude": 77.1025,
            "longitude": 28.7041
          }
        },
        "designation": "MANAGER",
        "email": "emergency-contact@email.com",
        "name": {
          "family1": "Gandas",
          "family2": "FamilyTwo",
          "given": "Vichitr",
          "middle": "Kumar",
          "suffix": "SR",
          "preferred": "Don"
        },
        "phoneNumber": {
          "countryCode": 91,
          "countryCodeSource": "FROM_NUMBER_WITH_PLUS_SIGN",
          "extension": "222",
          "isoCountryCode": "IN",
          "italianLeadingZero": true,
          "nationalNumber": 8150,
          "numberOfLeadingZeros": 1,
          "preferredDomesticCarrierCode": "7",
          "rawInput": "77777",
          "type": "MOBILE"
        },
        "userOrgId": {
          "organizationAgencyId": {
            "id": "string"
          },
          "organizationId": {
            "id": "string"
          },
          "userId": {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
          },
          "tmcInfo": {
            "id": {
              "id": "f49d00fe-1eda-4304-ba79-a980f565281d"
            },
            "primaryServiceProviderTmc": {
              "tmcId": {
                "id": "f49d00fe-1eda-4304-ba79-a980f565281d"
              }
            },
            "secondaryServiceProviderTmcs": [
              {
                "tmcId": {},
                "supplier": "SABRE",
                "travelType": "AIR"
              }
            ],
            "partnerTmcId": {
              "id": "f49d00fe-1eda-4304-ba79-a980f565281d"
            }
          },
          "tmcBasicInfo": {
            "contractingTmc": {
              "id": {
                "id": "f49d00fe-1eda-4304-ba79-a980f565281d"
              },
              "name": "string",
              "logo": {
                "data": "6935813e12584abda0e43d71cd2ea260",
                "dimensions": {},
                "url": "https://static.wixstatic.com/media/73f2e2_6935813e12584abda0e43d71cd2ea260~mv2.png/v1/fill/w_630,h_94,al_c,q_85,usm_0.66_1.00_0.01/Spotnana%403x.webp"
              }
            },
            "bookingTmc": {
              "id": {
                "id": "f49d00fe-1eda-4304-ba79-a980f565281d"
              },
              "name": "string",
              "logo": {
                "data": "6935813e12584abda0e43d71cd2ea260",
                "dimensions": {},
                "url": "https://static.wixstatic.com/media/73f2e2_6935813e12584abda0e43d71cd2ea260~mv2.png/v1/fill/w_630,h_94,al_c,q_85,usm_0.66_1.00_0.01/Spotnana%403x.webp"
              }
            }
          }
        }
      },
      "gender": "FEMALE",
      "identityDocs": [
        {
          "passport": {
            "docId": "PASSPORTID",
            "expiryDate": {
              "iso8601": "2017-07-21"
            },
            "issueCountry": "IN",
            "issuedDate": {
              "iso8601": "2017-07-21"
            },
            "nationalityCountry": "IN",
            "type": "REGULAR"
          }
        },
        {
          "ktn": {
            "number": "123456",
            "issueCountry": "US"
          }
        }
      ],
      "name": {
        "family1": "Gandas",
        "family2": "FamilyTwo",
        "given": "Vichitr",
        "middle": "Kumar",
        "suffix": "SR",
        "preferred": "Don"
      },
      "phoneNumbers": [
        {
          "countryCode": 91,
          "countryCodeSource": "FROM_NUMBER_WITH_PLUS_SIGN",
          "extension": "222",
          "isoCountryCode": "IN",
          "italianLeadingZero": true,
          "nationalNumber": 8150,
          "numberOfLeadingZeros": 1,
          "preferredDomesticCarrierCode": "7",
          "rawInput": "77777",
          "type": "MOBILE"
        }
      ],
      "profilePicture": {
        "data": "6935813e12584abda0e43d71cd2ea260",
        "dimensions": {
          "height": 120,
          "width": 240
        },
        "url": "https://static.wixstatic.com/media/73f2e2_6935813e12584abda0e43d71cd2ea260~mv2.png/v1/fill/w_630,h_94,al_c,q_85,usm_0.66_1.00_0.01/Spotnana%403x.webp"
      },
      "nationality": "Indian",
      "title": "MR",
      "preferredLanguage": "en-US",
      "preferredPronoun": "SHE_HER_HERS",
      "travelerName": {
        "family1": "Gandas",
        "family2": "FamilyTwo",
        "given": "Vichitr",
        "middle": "Kumar",
        "suffix": "SR",
        "preferred": "Don"
      },
      "emergencyContact": {
        "name": "John Smith",
        "email": "emergency-contact@email.com",
        "designation": "MANAGER",
        "relation": "SPOUSE",
        "phoneNumbers": [
          {
            "countryCode": 91,
            "countryCodeSource": "FROM_NUMBER_WITH_PLUS_SIGN",
            "extension": "222",
            "isoCountryCode": "IN",
            "italianLeadingZero": true,
            "nationalNumber": 8150,
            "numberOfLeadingZeros": 1,
            "preferredDomesticCarrierCode": "7",
            "rawInput": "77777",
            "type": "MOBILE"
          }
        ],
        "preferredLanguage": "en-US"
      }
    },
    "businessInfo": {
      "departmentRef": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "name": "string"
      },
      "designation": "MANAGER",
      "email": "user@business.com",
      "employeeId": "101",
      "gradeRef": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "name": "string"
      },
      "legalEntityRef": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "name": "string"
      },
      "managerRef": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "name": "string"
      },
      "officeRef": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "name": "string"
      },
      "organizationRef": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "name": "string"
      },
      "phoneNumbers": [
        {
          "countryCode": 91,
          "countryCodeSource": "FROM_NUMBER_WITH_PLUS_SIGN",
          "extension": "222",
          "isoCountryCode": "IN",
          "italianLeadingZero": true,
          "nationalNumber": 8150,
          "numberOfLeadingZeros": 1,
          "preferredDomesticCarrierCode": "7",
          "rawInput": "77777",
          "type": "MOBILE"
        }
      ],
      "costCenterRef": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "name": "string"
      },
      "countryCode": "USA",
      "workerType": "EMPLOYEE",
      "accountingCode": "123",
      "companySpecifiedAttributes": [
        {
          "fixedColumnName": "contingentType",
          "value": "FSTV"
        }
      ],
      "designatedApproverRefs": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "name": "string"
        }
      ],
      "authorizerEmail": "example@email.com"
    },
    "persona": "EMPLOYEE",
    "isActive": true,
    "relativeOf": {
      "userRef": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "name": "string"
      },
      "relation": "SPOUSE"
    },
    "billingCurrency": "INR",
    "tier": "SEAT1A",
    "externalId": "string",
    "travelPreferences": {
      "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"
          ]
        }
      }
    },
    "membershipInfo": {
      "membershipInfos": [
        {
          "appliedTo": [
            "TAJ"
          ],
          "id": "firstId",
          "issuedBy": "firstIssuedBy",
          "type": "AIR"
        }
      ]
    },
    "notificationPreferences": {
      "preferences": [
        {
          "notificationType": "FLIGHT_NOTIFICATION",
          "emailPreference": {
            "enabled": true,
            "ccEmails": [
              "user@example.com"
            ]
          }
        }
      ]
    },
    "travelArrangers": {
      "travelArrangers": [
        {
          "name": {
            "family1": "Gandas",
            "family2": "FamilyTwo",
            "given": "Vichitr",
            "middle": "Kumar",
            "suffix": "SR",
            "preferred": "Don"
          },
          "email": "example@email.com",
          "phoneNumbers": [
            {
              "countryCode": 91,
              "countryCodeSource": "FROM_NUMBER_WITH_PLUS_SIGN",
              "extension": "222",
              "isoCountryCode": "IN",
              "italianLeadingZero": true,
              "nationalNumber": 8150,
              "numberOfLeadingZeros": 1,
              "preferredDomesticCarrierCode": "7",
              "rawInput": "77777",
              "type": "MOBILE"
            }
          ],
          "userId": {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
          },
          "status": "PENDING"
        }
      ]
    },
    "adhocUserInfo": {
      "profileOwner": {
        "userId": {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
        }
      },
      "isSaved": false
    },
    "roles": [
      {
        "roleType": "COMPANY_ADMIN",
        "roleMetadata": {
          "travelArrangerMetadata": {
            "arrangerFor": [
              {
                "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
                "sendConfirmationEmail": false,
                "sendFlightStatsNotificationEmail": false
              }
            ]
          }
        },
        "metadata": {
          "roleType": "TRAVEL_ARRANGER",
          "arrangerFor": [
            {
              "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
              "sendConfirmationEmail": false,
              "sendFlightStatsNotificationEmail": false
            }
          ]
        }
      }
    ]
  }'

Responses

Created

Bodyapplication/json
idstring(uuid)required
Response
application/json
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08" }

Query user

Request

This endpoint queries user of given company based on given identifier like email or external ID. In case includeInactive is true, inactive users are also included in the response.

Query
companyIdstring(uuid)required

Identifier for company.

Example: companyId=4974a66b-7493-4f41-908c-58ba81093947
emailstring(email)

Email of the user. One of email or externalId should be provided.

Example: email=user@example.com
externalIdstring

External id of the user. Only one of email or externalId should be provided.

Example: externalId=123456
includeInactiveboolean

If true, include inactive users in the response.

Default false
Example: includeInactive=true
curl -i -X GET \
  'https://developer.spotnana.com/_mock/openapi/usersapi/v2/users?companyId=497f6eca-6276-4993-bfeb-53cbbbba6f08&email=user%40example.com&externalId=string&includeInactive=false' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
lengthinteger(int32)
elementsArray of objects(UserSummary)

List of references containing id and name.

Response
application/json
{ "length": 0, "elements": [ {} ] }

Get user

Request

This endpoint gets user details for user ID.

Path
userIdstring(uuid)required

Identifier for user.

Example: 4974a66b-7493-4f41-908c-58ba81093947
Query
includeInactiveboolean

Include inactive users in the response.

Default false
Example: includeInactive=true
curl -i -X GET \
  'https://developer.spotnana.com/_mock/openapi/usersapi/v2/users/{userId}?includeInactive=true' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
idstring(uuid)
personalInfoobject(UserPersonalInfo)

User details.

businessInfoobject(BusinessInfo)

User business information.

personastring(Persona)

Persona of the user

Enum"UNKNOWN_PERSONA""EMPLOYEE""GUEST""PERSONAL""RELATIVE""ADHOC"
isActiveboolean

a boolean flag to show if traveler is active.

Example: true
tierstring(Tier)

Tier of User. Note: In default UI, BASIC is displayed as Standard, and SEAT1A is displayed as VIP.

Enum"BASIC""SEAT1A"
relativeOfobject(RelativeOf)

Link to primary traveler

travelPreferencesobject(TravelPreferences)

User's travel preferences

membershipInfoobject(MembershipInfo)

User's travel preferences

notificationPreferencesobject(NotificationPreferences)

Notification preferences of a user for different notification types.

travelArrangersobject(UserTravelArrangers)

Travel arrangers for a user.

adhocUserInfoobject(AdhocUserInfo)

Basic information related to ad-hoc traveler profile.

externalIdstring

External id of this user.

Response
application/json
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "personalInfo": { "addresses": [], "dob": {}, "email": "example@email.com", "emergencyContactInfo": {}, "gender": "FEMALE", "identityDocs": [], "name": {}, "phoneNumbers": [], "profilePicture": {}, "nationality": "Indian", "title": "MR", "preferredLanguage": "en-US", "preferredPronoun": "SHE_HER_HERS", "travelerName": {}, "emergencyContact": {} }, "businessInfo": { "departmentRef": {}, "designation": "MANAGER", "email": "user@business.com", "employeeId": "101", "gradeRef": {}, "legalEntityRef": {}, "managerRef": {}, "officeRef": {}, "organizationRef": {}, "phoneNumbers": [], "costCenterRef": {}, "countryCode": "USA", "workerType": "EMPLOYEE", "accountingCode": "123", "companySpecifiedAttributes": [], "designatedApproverRefs": [], "authorizerEmail": "example@email.com" }, "persona": "EMPLOYEE", "isActive": true, "tier": "SEAT1A", "relativeOf": { "userRef": {}, "relation": "SPOUSE" }, "travelPreferences": { "preferences": {} }, "membershipInfo": { "membershipInfos": [] }, "notificationPreferences": { "preferences": [] }, "travelArrangers": { "travelArrangers": [] }, "adhocUserInfo": { "profileOwner": {}, "isSaved": false }, "externalId": "string" }

Delete user

Request

This endpoint deletes a user by user ID.

Path
userIdstring(uuid)required

Identifier for user.

Example: 4974a66b-7493-4f41-908c-58ba81093947
curl -i -X DELETE \
  'https://developer.spotnana.com/_mock/openapi/usersapi/v2/users/{userId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

No Content

Response
application/json
{ "debugIdentifier": "string", "errorMessages": [ {} ] }

Update user

Request

Path
userIdstring(uuid)required

Identifier for user.

Example: 4974a66b-7493-4f41-908c-58ba81093947
Bodyapplication/jsonrequired
personalInfoobject(UserPersonalInfo)required

User details.

personalInfo.​addressesArray of objects(PostalAddress)
personalInfo.​dobobject(DateModel)

Date in ISO 8601 standard.

personalInfo.​emailstring(email)
Example: "example@email.com"
personalInfo.​genderstring(Gender)
Enum"MALE""FEMALE""UNSPECIFIED""UNDISCLOSED"
personalInfo.​identityDocsArray of PassportWrapper (object) or ImmigrationDocumentWrapper (object) or RedressNumberWrapper (object) or KnownTravelerNumberWrapper (object) or NationalDocWrapper (object)(IdentityDocument)

List of user identity documents.

Example: [{"passport":{"docId":"PASSPORTID","expiryDate":{"iso8601":"2017-07-21"},"issueCountry":"IN","issuedDate":{"iso8601":"2017-07-21"},"nationalityCountry":"IN","type":"REGULAR"}},{"ktn":{"number":"123456","issueCountry":"US"}}]
personalInfo.​nameobject(Name)

Full name containing first, middle, last (family) names, and suffix.

personalInfo.​phoneNumbersArray of objects(PhoneNumber)
personalInfo.​profilePictureobject(Image)

An image with meta data. Either the data or url property must be supplied to load the image.

personalInfo.​nationalitystring

Nationality of user

Example: "Indian"
personalInfo.​titlestring(UserTitle)
Enum"TITLE_UNKNOWN""MR""MS""MRS""MX""MASTER""MISS""DR""PROFESSOR""CAPTAIN"
personalInfo.​preferredLanguagestring

Language preferred by user.

Example: "en-US"
personalInfo.​preferredPronounstring(PreferredPronoun)

Pronoun preferred by user.

Enum"SHE_HER_HERS""HE_HIM_HIS""THEY_THEM_THEIRS"
personalInfo.​travelerNameobject(Name)

Full name containing first, middle, last (family) names, and suffix.

personalInfo.​emergencyContactobject(EmergencyContact)

Emergency contact information.

personalInfo.​emergencyContactInfoobject(EmergencyContactInfo)Deprecated

Emergency contact information.

businessInfoobject(BusinessInfo)required

User business information.

businessInfo.​departmentRefobject(Reference)

Reference of an entity

businessInfo.​designationstring
Example: "MANAGER"
businessInfo.​emailstring(email)
Example: "user@business.com"
businessInfo.​employeeIdstring

Unique employee id. Can use email if a company don't use employee ids.

Example: "101"
businessInfo.​gradeRefobject(Reference)

Reference of an entity

businessInfo.​legalEntityRefobject(Reference)required

Reference of an entity

businessInfo.​legalEntityRef.​idstring(uuid)required
businessInfo.​legalEntityRef.​namestring
businessInfo.​managerRefobject(Reference)

Reference of an entity

businessInfo.​officeRefobject(Reference)

Reference of an entity

businessInfo.​organizationRefobject(Reference)required

Reference of an entity

businessInfo.​organizationRef.​idstring(uuid)required
businessInfo.​organizationRef.​namestring
businessInfo.​phoneNumbersArray of objects(PhoneNumber)
businessInfo.​costCenterRefobject(Reference)

Reference of an entity

businessInfo.​countryCodestring

alpha-2 or alpha-3 ISO country code.

Example: "USA"
businessInfo.​workerTypestring(WorkerType)

The type of worker.

Enum"EMPLOYEE""CONTINGENT""SEASONAL""INTERN"
businessInfo.​accountingCodestring

Code used for accounting.

Example: "123"
businessInfo.​companySpecifiedAttributesArray of objects(CompanySpecifiedAttribute)
businessInfo.​designatedApproverRefsArray of objects(Reference object containing uuid and name of the entity.)

A list of references for designated approvers.

businessInfo.​authorizerEmailstringDeprecated

Email address to be used as approval authorizer, when a manager is not present.

Example: "example@email.com"
personastring(Persona)required

Persona of the user

Enum"UNKNOWN_PERSONA""EMPLOYEE""GUEST""PERSONAL""RELATIVE""ADHOC"
tierstring(Tier)

Tier of User. Note: In default UI, BASIC is displayed as Standard, and SEAT1A is displayed as VIP.

Enum"BASIC""SEAT1A"
relativeOfobject(RelativeOf)

Link to primary traveler

travelPreferencesobject(TravelPreferences)

User's travel preferences

membershipInfoobject(MembershipInfo)

User's travel preferences

notificationPreferencesobject(NotificationPreferences)

Notification preferences of a user for different notification types.

adhocUserInfoobject(AdhocUserInfo)

Basic information related to ad-hoc traveler profile.

externalIdstring

External id of this user.

travelArrangersobject(UserTravelArrangers)Deprecated

Travel arrangers for a user.

curl -i -X PUT \
  'https://developer.spotnana.com/_mock/openapi/usersapi/v2/users/{userId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "personalInfo": {
      "addresses": [
        {
          "addressLines": [
            "Golden Gate Bridge"
          ],
          "administrativeArea": "CA",
          "administrativeAreaName": "California",
          "description": "San Francisco Home",
          "isDefault": true,
          "languageCode": "en",
          "locality": "San Francisco",
          "locationCode": "LAX",
          "organization": "Spotnana",
          "postalCode": "94130",
          "continentCode": "AF",
          "recipients": [
            "string"
          ],
          "regionCode": "US",
          "regionName": "America",
          "revision": 1,
          "sortingCode": "Jamaica",
          "sublocality": "string",
          "timezone": "America/Los_Angeles",
          "coordinates": {
            "latitude": 77.1025,
            "longitude": 28.7041
          }
        }
      ],
      "dob": {
        "iso8601": "2017-07-21"
      },
      "email": "example@email.com",
      "emergencyContactInfo": {
        "address": {
          "addressLines": [
            "Golden Gate Bridge"
          ],
          "administrativeArea": "CA",
          "administrativeAreaName": "California",
          "description": "San Francisco Home",
          "isDefault": true,
          "languageCode": "en",
          "locality": "San Francisco",
          "locationCode": "LAX",
          "organization": "Spotnana",
          "postalCode": "94130",
          "continentCode": "AF",
          "recipients": [
            "string"
          ],
          "regionCode": "US",
          "regionName": "America",
          "revision": 1,
          "sortingCode": "Jamaica",
          "sublocality": "string",
          "timezone": "America/Los_Angeles",
          "coordinates": {
            "latitude": 77.1025,
            "longitude": 28.7041
          }
        },
        "designation": "MANAGER",
        "email": "emergency-contact@email.com",
        "name": {
          "family1": "Gandas",
          "family2": "FamilyTwo",
          "given": "Vichitr",
          "middle": "Kumar",
          "suffix": "SR",
          "preferred": "Don"
        },
        "phoneNumber": {
          "countryCode": 91,
          "countryCodeSource": "FROM_NUMBER_WITH_PLUS_SIGN",
          "extension": "222",
          "isoCountryCode": "IN",
          "italianLeadingZero": true,
          "nationalNumber": 8150,
          "numberOfLeadingZeros": 1,
          "preferredDomesticCarrierCode": "7",
          "rawInput": "77777",
          "type": "MOBILE"
        },
        "userOrgId": {
          "organizationAgencyId": {
            "id": "string"
          },
          "organizationId": {
            "id": "string"
          },
          "userId": {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
          },
          "tmcInfo": {
            "id": {
              "id": "f49d00fe-1eda-4304-ba79-a980f565281d"
            },
            "primaryServiceProviderTmc": {
              "tmcId": {
                "id": "f49d00fe-1eda-4304-ba79-a980f565281d"
              }
            },
            "secondaryServiceProviderTmcs": [
              {
                "tmcId": {},
                "supplier": "SABRE",
                "travelType": "AIR"
              }
            ],
            "partnerTmcId": {
              "id": "f49d00fe-1eda-4304-ba79-a980f565281d"
            }
          },
          "tmcBasicInfo": {
            "contractingTmc": {
              "id": {
                "id": "f49d00fe-1eda-4304-ba79-a980f565281d"
              },
              "name": "string",
              "logo": {
                "data": "6935813e12584abda0e43d71cd2ea260",
                "dimensions": {},
                "url": "https://static.wixstatic.com/media/73f2e2_6935813e12584abda0e43d71cd2ea260~mv2.png/v1/fill/w_630,h_94,al_c,q_85,usm_0.66_1.00_0.01/Spotnana%403x.webp"
              }
            },
            "bookingTmc": {
              "id": {
                "id": "f49d00fe-1eda-4304-ba79-a980f565281d"
              },
              "name": "string",
              "logo": {
                "data": "6935813e12584abda0e43d71cd2ea260",
                "dimensions": {},
                "url": "https://static.wixstatic.com/media/73f2e2_6935813e12584abda0e43d71cd2ea260~mv2.png/v1/fill/w_630,h_94,al_c,q_85,usm_0.66_1.00_0.01/Spotnana%403x.webp"
              }
            }
          }
        }
      },
      "gender": "FEMALE",
      "identityDocs": [
        {
          "passport": {
            "docId": "PASSPORTID",
            "expiryDate": {
              "iso8601": "2017-07-21"
            },
            "issueCountry": "IN",
            "issuedDate": {
              "iso8601": "2017-07-21"
            },
            "nationalityCountry": "IN",
            "type": "REGULAR"
          }
        },
        {
          "ktn": {
            "number": "123456",
            "issueCountry": "US"
          }
        }
      ],
      "name": {
        "family1": "Gandas",
        "family2": "FamilyTwo",
        "given": "Vichitr",
        "middle": "Kumar",
        "suffix": "SR",
        "preferred": "Don"
      },
      "phoneNumbers": [
        {
          "countryCode": 91,
          "countryCodeSource": "FROM_NUMBER_WITH_PLUS_SIGN",
          "extension": "222",
          "isoCountryCode": "IN",
          "italianLeadingZero": true,
          "nationalNumber": 8150,
          "numberOfLeadingZeros": 1,
          "preferredDomesticCarrierCode": "7",
          "rawInput": "77777",
          "type": "MOBILE"
        }
      ],
      "profilePicture": {
        "data": "6935813e12584abda0e43d71cd2ea260",
        "dimensions": {
          "height": 120,
          "width": 240
        },
        "url": "https://static.wixstatic.com/media/73f2e2_6935813e12584abda0e43d71cd2ea260~mv2.png/v1/fill/w_630,h_94,al_c,q_85,usm_0.66_1.00_0.01/Spotnana%403x.webp"
      },
      "nationality": "Indian",
      "title": "MR",
      "preferredLanguage": "en-US",
      "preferredPronoun": "SHE_HER_HERS",
      "travelerName": {
        "family1": "Gandas",
        "family2": "FamilyTwo",
        "given": "Vichitr",
        "middle": "Kumar",
        "suffix": "SR",
        "preferred": "Don"
      },
      "emergencyContact": {
        "name": "John Smith",
        "email": "emergency-contact@email.com",
        "designation": "MANAGER",
        "relation": "SPOUSE",
        "phoneNumbers": [
          {
            "countryCode": 91,
            "countryCodeSource": "FROM_NUMBER_WITH_PLUS_SIGN",
            "extension": "222",
            "isoCountryCode": "IN",
            "italianLeadingZero": true,
            "nationalNumber": 8150,
            "numberOfLeadingZeros": 1,
            "preferredDomesticCarrierCode": "7",
            "rawInput": "77777",
            "type": "MOBILE"
          }
        ],
        "preferredLanguage": "en-US"
      }
    },
    "businessInfo": {
      "departmentRef": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "name": "string"
      },
      "designation": "MANAGER",
      "email": "user@business.com",
      "employeeId": "101",
      "gradeRef": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "name": "string"
      },
      "legalEntityRef": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "name": "string"
      },
      "managerRef": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "name": "string"
      },
      "officeRef": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "name": "string"
      },
      "organizationRef": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "name": "string"
      },
      "phoneNumbers": [
        {
          "countryCode": 91,
          "countryCodeSource": "FROM_NUMBER_WITH_PLUS_SIGN",
          "extension": "222",
          "isoCountryCode": "IN",
          "italianLeadingZero": true,
          "nationalNumber": 8150,
          "numberOfLeadingZeros": 1,
          "preferredDomesticCarrierCode": "7",
          "rawInput": "77777",
          "type": "MOBILE"
        }
      ],
      "costCenterRef": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "name": "string"
      },
      "countryCode": "USA",
      "workerType": "EMPLOYEE",
      "accountingCode": "123",
      "companySpecifiedAttributes": [
        {
          "fixedColumnName": "contingentType",
          "value": "FSTV"
        }
      ],
      "designatedApproverRefs": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "name": "string"
        }
      ],
      "authorizerEmail": "example@email.com"
    },
    "persona": "EMPLOYEE",
    "tier": "SEAT1A",
    "relativeOf": {
      "userRef": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "name": "string"
      },
      "relation": "SPOUSE"
    },
    "travelPreferences": {
      "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"
          ]
        }
      }
    },
    "membershipInfo": {
      "membershipInfos": [
        {
          "appliedTo": [
            "TAJ"
          ],
          "id": "firstId",
          "issuedBy": "firstIssuedBy",
          "type": "AIR"
        }
      ]
    },
    "notificationPreferences": {
      "preferences": [
        {
          "notificationType": "FLIGHT_NOTIFICATION",
          "emailPreference": {
            "enabled": true,
            "ccEmails": [
              "user@example.com"
            ]
          }
        }
      ]
    },
    "adhocUserInfo": {
      "profileOwner": {
        "userId": {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
        }
      },
      "isSaved": false
    },
    "externalId": "string",
    "travelArrangers": {
      "travelArrangers": [
        {
          "name": {
            "family1": "Gandas",
            "family2": "FamilyTwo",
            "given": "Vichitr",
            "middle": "Kumar",
            "suffix": "SR",
            "preferred": "Don"
          },
          "email": "example@email.com",
          "phoneNumbers": [
            {
              "countryCode": 91,
              "countryCodeSource": "FROM_NUMBER_WITH_PLUS_SIGN",
              "extension": "222",
              "isoCountryCode": "IN",
              "italianLeadingZero": true,
              "nationalNumber": 8150,
              "numberOfLeadingZeros": 1,
              "preferredDomesticCarrierCode": "7",
              "rawInput": "77777",
              "type": "MOBILE"
            }
          ],
          "userId": {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
          },
          "status": "PENDING"
        }
      ]
    }
  }'

Responses

No Content

Response
application/json
{ "debugIdentifier": "string", "errorMessages": [ {} ] }

Get user business info

Request

This endpoint gets user business info by user ID.

Path
userIdstring(uuid)required

Identifier for user.

Example: 4974a66b-7493-4f41-908c-58ba81093947
Query
includeInactiveboolean

Include inactive users.

Default false
Example: includeInactive=true
curl -i -X GET \
  'https://developer.spotnana.com/_mock/openapi/usersapi/v2/users/{userId}/business-info?includeInactive=true' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
departmentRefobject(Reference)

Reference of an entity

designationstring
Example: "MANAGER"
emailstring(email)
Example: "user@business.com"
employeeIdstring

Unique employee id. Can use email if a company don't use employee ids.

Example: "101"
gradeRefobject(Reference)

Reference of an entity

legalEntityRefobject(Reference)required

Reference of an entity

legalEntityRef.​idstring(uuid)required
legalEntityRef.​namestring
managerRefobject(Reference)

Reference of an entity

officeRefobject(Reference)

Reference of an entity

organizationRefobject(Reference)required

Reference of an entity

organizationRef.​idstring(uuid)required
organizationRef.​namestring
phoneNumbersArray of objects(PhoneNumber)
costCenterRefobject(Reference)

Reference of an entity

countryCodestring

alpha-2 or alpha-3 ISO country code.

Example: "USA"
workerTypestring(WorkerType)

The type of worker.

Enum"EMPLOYEE""CONTINGENT""SEASONAL""INTERN"
accountingCodestring

Code used for accounting.

Example: "123"
companySpecifiedAttributesArray of objects(CompanySpecifiedAttribute)
designatedApproverRefsArray of objects(Reference object containing uuid and name of the entity.)

A list of references for designated approvers.

authorizerEmailstringDeprecated

Email address to be used as approval authorizer, when a manager is not present.

Example: "example@email.com"
Response
application/json
{ "departmentRef": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" }, "designation": "MANAGER", "email": "user@business.com", "employeeId": "101", "gradeRef": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" }, "legalEntityRef": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" }, "managerRef": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" }, "officeRef": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" }, "organizationRef": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" }, "phoneNumbers": [ {} ], "costCenterRef": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" }, "countryCode": "USA", "workerType": "EMPLOYEE", "accountingCode": "123", "companySpecifiedAttributes": [ {} ], "designatedApproverRefs": [ {} ], "authorizerEmail": "example@email.com" }

Update user business info

Request

This endpoint updates user business info by user ID.

Path
userIdstring(uuid)required

Identifier for user.

Example: 4974a66b-7493-4f41-908c-58ba81093947
Query
includeInactiveboolean

Include inactive users.

Default false
Example: includeInactive=true
Bodyapplication/jsonrequired
departmentRefobject(Reference)

Reference of an entity

designationstring
Example: "MANAGER"
emailstring(email)
Example: "user@business.com"
employeeIdstring

Unique employee id. Can use email if a company don't use employee ids.

Example: "101"
gradeRefobject(Reference)

Reference of an entity

legalEntityRefobject(Reference)required

Reference of an entity

legalEntityRef.​idstring(uuid)required
legalEntityRef.​namestring
managerRefobject(Reference)

Reference of an entity

officeRefobject(Reference)

Reference of an entity

organizationRefobject(Reference)required

Reference of an entity

organizationRef.​idstring(uuid)required
organizationRef.​namestring
phoneNumbersArray of objects(PhoneNumber)
costCenterRefobject(Reference)

Reference of an entity

countryCodestring

alpha-2 or alpha-3 ISO country code.

Example: "USA"
workerTypestring(WorkerType)

The type of worker.

Enum"EMPLOYEE""CONTINGENT""SEASONAL""INTERN"
accountingCodestring

Code used for accounting.

Example: "123"
companySpecifiedAttributesArray of objects(CompanySpecifiedAttribute)
designatedApproverRefsArray of objects(Reference object containing uuid and name of the entity.)

A list of references for designated approvers.

authorizerEmailstringDeprecated

Email address to be used as approval authorizer, when a manager is not present.

Example: "example@email.com"
curl -i -X PUT \
  'https://developer.spotnana.com/_mock/openapi/usersapi/v2/users/{userId}/business-info?includeInactive=true' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "departmentRef": {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "string"
    },
    "designation": "MANAGER",
    "email": "user@business.com",
    "employeeId": "101",
    "gradeRef": {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "string"
    },
    "legalEntityRef": {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "string"
    },
    "managerRef": {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "string"
    },
    "officeRef": {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "string"
    },
    "organizationRef": {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "string"
    },
    "phoneNumbers": [
      {
        "countryCode": 91,
        "countryCodeSource": "FROM_NUMBER_WITH_PLUS_SIGN",
        "extension": "222",
        "isoCountryCode": "IN",
        "italianLeadingZero": true,
        "nationalNumber": 8150,
        "numberOfLeadingZeros": 1,
        "preferredDomesticCarrierCode": "7",
        "rawInput": "77777",
        "type": "MOBILE"
      }
    ],
    "costCenterRef": {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "string"
    },
    "countryCode": "USA",
    "workerType": "EMPLOYEE",
    "accountingCode": "123",
    "companySpecifiedAttributes": [
      {
        "fixedColumnName": "contingentType",
        "value": "FSTV"
      }
    ],
    "designatedApproverRefs": [
      {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "name": "string"
      }
    ],
    "authorizerEmail": "example@email.com"
  }'

Responses

OK

Response
application/json
{ "debugIdentifier": "string", "errorMessages": [ {} ] }

Get user personal info

Request

This endpoint gets user personal info by user ID.

Path
userIdstring(uuid)required

Identifier for user.

Example: 4974a66b-7493-4f41-908c-58ba81093947
Query
includeInactiveboolean

Include inactive users.

Default false
Example: includeInactive=true
curl -i -X GET \
  'https://developer.spotnana.com/_mock/openapi/usersapi/v2/users/{userId}/personal-info?includeInactive=true' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
addressesArray of objects(PostalAddress)
dobobject(DateModel)

Date in ISO 8601 standard.

emailstring(email)
Example: "example@email.com"
genderstring(Gender)
Enum"MALE""FEMALE""UNSPECIFIED""UNDISCLOSED"
identityDocsArray of PassportWrapper (object) or ImmigrationDocumentWrapper (object) or RedressNumberWrapper (object) or KnownTravelerNumberWrapper (object) or NationalDocWrapper (object)(IdentityDocument)

List of user identity documents.

Example: [{"passport":{"docId":"PASSPORTID","expiryDate":{"iso8601":"2017-07-21"},"issueCountry":"IN","issuedDate":{"iso8601":"2017-07-21"},"nationalityCountry":"IN","type":"REGULAR"}},{"ktn":{"number":"123456","issueCountry":"US"}}]
nameobject(Name)

Full name containing first, middle, last (family) names, and suffix.

phoneNumbersArray of objects(PhoneNumber)
profilePictureobject(Image)

An image with meta data. Either the data or url property must be supplied to load the image.

nationalitystring

Nationality of user

Example: "Indian"
titlestring(UserTitle)
Enum"TITLE_UNKNOWN""MR""MS""MRS""MX""MASTER""MISS""DR""PROFESSOR""CAPTAIN"
preferredLanguagestring

Language preferred by user.

Example: "en-US"
preferredPronounstring(PreferredPronoun)

Pronoun preferred by user.

Enum"SHE_HER_HERS""HE_HIM_HIS""THEY_THEM_THEIRS"
travelerNameobject(Name)

Full name containing first, middle, last (family) names, and suffix.

emergencyContactobject(EmergencyContact)

Emergency contact information.

emergencyContactInfoobject(EmergencyContactInfo)Deprecated

Emergency contact information.

Response
application/json
{ "addresses": [ {} ], "dob": { "iso8601": "2017-07-21" }, "email": "example@email.com", "emergencyContactInfo": { "address": {}, "designation": "MANAGER", "email": "emergency-contact@email.com", "name": {}, "phoneNumber": {}, "userOrgId": {} }, "gender": "FEMALE", "identityDocs": [ {}, {} ], "name": { "family1": "Gandas", "family2": "FamilyTwo", "given": "Vichitr", "middle": "Kumar", "suffix": "SR", "preferred": "Don" }, "phoneNumbers": [ {} ], "profilePicture": { "data": "6935813e12584abda0e43d71cd2ea260", "dimensions": {}, "url": "https://static.wixstatic.com/media/73f2e2_6935813e12584abda0e43d71cd2ea260~mv2.png/v1/fill/w_630,h_94,al_c,q_85,usm_0.66_1.00_0.01/Spotnana%403x.webp" }, "nationality": "Indian", "title": "MR", "preferredLanguage": "en-US", "preferredPronoun": "SHE_HER_HERS", "travelerName": { "family1": "Gandas", "family2": "FamilyTwo", "given": "Vichitr", "middle": "Kumar", "suffix": "SR", "preferred": "Don" }, "emergencyContact": { "name": "John Smith", "email": "emergency-contact@email.com", "designation": "MANAGER", "relation": "SPOUSE", "phoneNumbers": [], "preferredLanguage": "en-US" } }

Update user personal info

Request

This endpoint updates user personal info by user ID.

Path
userIdstring(uuid)required

Identifier for user.

Example: 4974a66b-7493-4f41-908c-58ba81093947
Query
includeInactiveboolean

Include inactive users.

Default false
Example: includeInactive=true
Bodyapplication/jsonrequired
addressesArray of objects(PostalAddress)
dobobject(DateModel)

Date in ISO 8601 standard.

emailstring(email)
Example: "example@email.com"
genderstring(Gender)
Enum"MALE""FEMALE""UNSPECIFIED""UNDISCLOSED"
identityDocsArray of PassportWrapper (object) or ImmigrationDocumentWrapper (object) or RedressNumberWrapper (object) or KnownTravelerNumberWrapper (object) or NationalDocWrapper (object)(IdentityDocument)

List of user identity documents.

Example: [{"passport":{"docId":"PASSPORTID","expiryDate":{"iso8601":"2017-07-21"},"issueCountry":"IN","issuedDate":{"iso8601":"2017-07-21"},"nationalityCountry":"IN","type":"REGULAR"}},{"ktn":{"number":"123456","issueCountry":"US"}}]
nameobject(Name)

Full name containing first, middle, last (family) names, and suffix.

phoneNumbersArray of objects(PhoneNumber)
profilePictureobject(Image)

An image with meta data. Either the data or url property must be supplied to load the image.

nationalitystring

Nationality of user

Example: "Indian"
titlestring(UserTitle)
Enum"TITLE_UNKNOWN""MR""MS""MRS""MX""MASTER""MISS""DR""PROFESSOR""CAPTAIN"
preferredLanguagestring

Language preferred by user.

Example: "en-US"
preferredPronounstring(PreferredPronoun)

Pronoun preferred by user.

Enum"SHE_HER_HERS""HE_HIM_HIS""THEY_THEM_THEIRS"
travelerNameobject(Name)

Full name containing first, middle, last (family) names, and suffix.

emergencyContactobject(EmergencyContact)

Emergency contact information.

emergencyContactInfoobject(EmergencyContactInfo)Deprecated

Emergency contact information.

curl -i -X PUT \
  'https://developer.spotnana.com/_mock/openapi/usersapi/v2/users/{userId}/personal-info?includeInactive=true' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "addresses": [
      {
        "addressLines": [
          "Golden Gate Bridge"
        ],
        "administrativeArea": "CA",
        "administrativeAreaName": "California",
        "description": "San Francisco Home",
        "isDefault": true,
        "languageCode": "en",
        "locality": "San Francisco",
        "locationCode": "LAX",
        "organization": "Spotnana",
        "postalCode": "94130",
        "continentCode": "AF",
        "recipients": [
          "string"
        ],
        "regionCode": "US",
        "regionName": "America",
        "revision": 1,
        "sortingCode": "Jamaica",
        "sublocality": "string",
        "timezone": "America/Los_Angeles",
        "coordinates": {
          "latitude": 77.1025,
          "longitude": 28.7041
        }
      }
    ],
    "dob": {
      "iso8601": "2017-07-21"
    },
    "email": "example@email.com",
    "emergencyContactInfo": {
      "address": {
        "addressLines": [
          "Golden Gate Bridge"
        ],
        "administrativeArea": "CA",
        "administrativeAreaName": "California",
        "description": "San Francisco Home",
        "isDefault": true,
        "languageCode": "en",
        "locality": "San Francisco",
        "locationCode": "LAX",
        "organization": "Spotnana",
        "postalCode": "94130",
        "continentCode": "AF",
        "recipients": [
          "string"
        ],
        "regionCode": "US",
        "regionName": "America",
        "revision": 1,
        "sortingCode": "Jamaica",
        "sublocality": "string",
        "timezone": "America/Los_Angeles",
        "coordinates": {
          "latitude": 77.1025,
          "longitude": 28.7041
        }
      },
      "designation": "MANAGER",
      "email": "emergency-contact@email.com",
      "name": {
        "family1": "Gandas",
        "family2": "FamilyTwo",
        "given": "Vichitr",
        "middle": "Kumar",
        "suffix": "SR",
        "preferred": "Don"
      },
      "phoneNumber": {
        "countryCode": 91,
        "countryCodeSource": "FROM_NUMBER_WITH_PLUS_SIGN",
        "extension": "222",
        "isoCountryCode": "IN",
        "italianLeadingZero": true,
        "nationalNumber": 8150,
        "numberOfLeadingZeros": 1,
        "preferredDomesticCarrierCode": "7",
        "rawInput": "77777",
        "type": "MOBILE"
      },
      "userOrgId": {
        "organizationAgencyId": {
          "id": "string"
        },
        "organizationId": {
          "id": "string"
        },
        "userId": {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
        },
        "tmcInfo": {
          "id": {
            "id": "f49d00fe-1eda-4304-ba79-a980f565281d"
          },
          "primaryServiceProviderTmc": {
            "tmcId": {
              "id": "f49d00fe-1eda-4304-ba79-a980f565281d"
            }
          },
          "secondaryServiceProviderTmcs": [
            {
              "tmcId": {
                "id": "f49d00fe-1eda-4304-ba79-a980f565281d"
              },
              "supplier": "SABRE",
              "travelType": "AIR"
            }
          ],
          "partnerTmcId": {
            "id": "f49d00fe-1eda-4304-ba79-a980f565281d"
          }
        },
        "tmcBasicInfo": {
          "contractingTmc": {
            "id": {
              "id": "f49d00fe-1eda-4304-ba79-a980f565281d"
            },
            "name": "string",
            "logo": {
              "data": "6935813e12584abda0e43d71cd2ea260",
              "dimensions": {
                "height": 120,
                "width": 240
              },
              "url": "https://static.wixstatic.com/media/73f2e2_6935813e12584abda0e43d71cd2ea260~mv2.png/v1/fill/w_630,h_94,al_c,q_85,usm_0.66_1.00_0.01/Spotnana%403x.webp"
            }
          },
          "bookingTmc": {
            "id": {
              "id": "f49d00fe-1eda-4304-ba79-a980f565281d"
            },
            "name": "string",
            "logo": {
              "data": "6935813e12584abda0e43d71cd2ea260",
              "dimensions": {
                "height": 120,
                "width": 240
              },
              "url": "https://static.wixstatic.com/media/73f2e2_6935813e12584abda0e43d71cd2ea260~mv2.png/v1/fill/w_630,h_94,al_c,q_85,usm_0.66_1.00_0.01/Spotnana%403x.webp"
            }
          }
        }
      }
    },
    "gender": "FEMALE",
    "identityDocs": [
      {
        "passport": {
          "docId": "PASSPORTID",
          "expiryDate": {
            "iso8601": "2017-07-21"
          },
          "issueCountry": "IN",
          "issuedDate": {
            "iso8601": "2017-07-21"
          },
          "nationalityCountry": "IN",
          "type": "REGULAR"
        }
      },
      {
        "ktn": {
          "number": "123456",
          "issueCountry": "US"
        }
      }
    ],
    "name": {
      "family1": "Gandas",
      "family2": "FamilyTwo",
      "given": "Vichitr",
      "middle": "Kumar",
      "suffix": "SR",
      "preferred": "Don"
    },
    "phoneNumbers": [
      {
        "countryCode": 91,
        "countryCodeSource": "FROM_NUMBER_WITH_PLUS_SIGN",
        "extension": "222",
        "isoCountryCode": "IN",
        "italianLeadingZero": true,
        "nationalNumber": 8150,
        "numberOfLeadingZeros": 1,
        "preferredDomesticCarrierCode": "7",
        "rawInput": "77777",
        "type": "MOBILE"
      }
    ],
    "profilePicture": {
      "data": "6935813e12584abda0e43d71cd2ea260",
      "dimensions": {
        "height": 120,
        "width": 240
      },
      "url": "https://static.wixstatic.com/media/73f2e2_6935813e12584abda0e43d71cd2ea260~mv2.png/v1/fill/w_630,h_94,al_c,q_85,usm_0.66_1.00_0.01/Spotnana%403x.webp"
    },
    "nationality": "Indian",
    "title": "MR",
    "preferredLanguage": "en-US",
    "preferredPronoun": "SHE_HER_HERS",
    "travelerName": {
      "family1": "Gandas",
      "family2": "FamilyTwo",
      "given": "Vichitr",
      "middle": "Kumar",
      "suffix": "SR",
      "preferred": "Don"
    },
    "emergencyContact": {
      "name": "John Smith",
      "email": "emergency-contact@email.com",
      "designation": "MANAGER",
      "relation": "SPOUSE",
      "phoneNumbers": [
        {
          "countryCode": 91,
          "countryCodeSource": "FROM_NUMBER_WITH_PLUS_SIGN",
          "extension": "222",
          "isoCountryCode": "IN",
          "italianLeadingZero": true,
          "nationalNumber": 8150,
          "numberOfLeadingZeros": 1,
          "preferredDomesticCarrierCode": "7",
          "rawInput": "77777",
          "type": "MOBILE"
        }
      ],
      "preferredLanguage": "en-US"
    }
  }'

Responses

OK

Response
application/json
{ "debugIdentifier": "string", "errorMessages": [ {} ] }

Get user travel preferences

Request

Path
userIdstring(uuid)required

Identifier for user.

Example: 4974a66b-7493-4f41-908c-58ba81093947
curl -i -X GET \
  'https://developer.spotnana.com/_mock/openapi/usersapi/v2/users/{userId}/travel-preferences' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
preferencesobject(TravelPref)

Travel preferences.

Response
application/json
{ "preferences": { "airPref": {}, "preferredCurrency": "USD", "railCards": [], "railPref": {}, "carPref": {}, "hotelPref": {} } }

Update user travel preferences

Request

Path
userIdstring(uuid)required

Identifier for user.

Example: 4974a66b-7493-4f41-908c-58ba81093947
Bodyapplication/jsonrequired
preferencesobject(TravelPref)

Travel preferences.

curl -i -X PUT \
  'https://developer.spotnana.com/_mock/openapi/usersapi/v2/users/{userId}/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"
        ]
      }
    }
  }'

Responses

No Content

Response
application/json
{ "debugIdentifier": "string", "errorMessages": [ {} ] }

Get user membership info

Request

Path
userIdstring(uuid)required

Identifier for user.

Example: 4974a66b-7493-4f41-908c-58ba81093947
curl -i -X GET \
  'https://developer.spotnana.com/_mock/openapi/usersapi/v2/users/{userId}/membership-info' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
membershipInfosArray of objects(LoyaltyInfo)
Response
application/json
{ "membershipInfos": [ {} ] }

Update user membership info

Request

Path
userIdstring(uuid)required

Identifier for user.

Example: 4974a66b-7493-4f41-908c-58ba81093947
Bodyapplication/jsonrequired
membershipInfosArray of objects(LoyaltyInfo)
curl -i -X PUT \
  'https://developer.spotnana.com/_mock/openapi/usersapi/v2/users/{userId}/membership-info' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "membershipInfos": [
      {
        "appliedTo": [
          "TAJ"
        ],
        "id": "firstId",
        "issuedBy": "firstIssuedBy",
        "type": "AIR"
      }
    ]
  }'

Responses

No Content

Response
application/json
{ "debugIdentifier": "string", "errorMessages": [ {} ] }

Update user roles

Request

This endpoint updates user roles.

Path
userIdstring(uuid)required

Identifier for user.

Example: 4974a66b-7493-4f41-908c-58ba81093947
Bodyapplication/jsonrequired
rolesArray of objects(RoleConfig)
curl -i -X PUT \
  'https://developer.spotnana.com/_mock/openapi/usersapi/v2/users/{userId}/roles' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "roles": [
      {
        "roleType": "COMPANY_ADMIN",
        "roleMetadata": {
          "travelArrangerMetadata": {
            "arrangerFor": [
              {
                "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
                "sendConfirmationEmail": false,
                "sendFlightStatsNotificationEmail": false
              }
            ]
          }
        },
        "metadata": {
          "roleType": "TRAVEL_ARRANGER",
          "arrangerFor": [
            {
              "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
              "sendConfirmationEmail": false,
              "sendFlightStatsNotificationEmail": false
            }
          ]
        }
      }
    ]
  }'

Responses

No Content

Response
application/json
{ "debugIdentifier": "string", "errorMessages": [ {} ] }

Get user roles

Request

This endpoint gets user roles.

Path
userIdstring(uuid)required

Identifier for user.

Example: 4974a66b-7493-4f41-908c-58ba81093947
curl -i -X GET \
  'https://developer.spotnana.com/_mock/openapi/usersapi/v2/users/{userId}/roles' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
rolesArray of objects(RoleConfig)
Response
application/json
{ "roles": [ {} ] }

Get notification preferences

Request

This endpoint gets notification preferences for a user.

Path
userIdstring(uuid)required

Identifier for user.

Example: 4974a66b-7493-4f41-908c-58ba81093947
curl -i -X GET \
  'https://developer.spotnana.com/_mock/openapi/usersapi/v2/users/{userId}/notification-preferences' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
preferencesArray of objects(NotificationPreferencePerType)
Response
application/json
{ "preferences": [ {} ] }

Update notification preferences

Request

This endpoint updates notification preferences for a user.

Path
userIdstring(uuid)required

Identifier for user.

Example: 4974a66b-7493-4f41-908c-58ba81093947
Bodyapplication/jsonrequired
preferencesArray of objects(NotificationPreferencePerType)
curl -i -X PUT \
  'https://developer.spotnana.com/_mock/openapi/usersapi/v2/users/{userId}/notification-preferences' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "preferences": [
      {
        "notificationType": "FLIGHT_NOTIFICATION",
        "emailPreference": {
          "enabled": true,
          "ccEmails": [
            "user@example.com"
          ]
        }
      }
    ]
  }'

Responses

OK

Response
application/json
{ "debugIdentifier": "string", "errorMessages": [ {} ] }

Get user travel arrangers

Request

Path
userIdstring(uuid)required

Identifier for user.

Example: 4974a66b-7493-4f41-908c-58ba81093947
curl -i -X GET \
  'https://developer.spotnana.com/_mock/openapi/usersapi/v2/users/{userId}/travel-arrangers' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
travelArrangersArray of objects(TravelArrangerBasicInfo)required
travelArrangers[].​nameobject(Name)

Full name containing first, middle, last (family) names, and suffix.

travelArrangers[].​emailstring(email)
Example: "example@email.com"
travelArrangers[].​phoneNumbersArray of objects(PhoneNumber)
travelArrangers[].​userIdobject(UserId)required

User identifier

travelArrangers[].​userId.​idstring(uuid)required
travelArrangers[].​statusstring(TravelerArrangerStatus)

Status of the traveler-arranger assignment.

Enum"PENDING""ACCEPTED""DENIED"
Response
application/json
{ "travelArrangers": [ {} ] }

Get user's external ID

Request

This endpoint gets user's external ID by user ID.

Path
userIdstring(uuid)required

Identifier for user.

Example: 4974a66b-7493-4f41-908c-58ba81093947
Query
includeInactiveboolean

Include inactive users.

Default false
Example: includeInactive=true
curl -i -X GET \
  'https://developer.spotnana.com/_mock/openapi/usersapi/v2/users/{userId}/external-id?includeInactive=true' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
externalIdstringrequired

External id of user within partner database.

Example: "user-1"
Response
application/json
{ "externalId": "user-1" }

Update user's external ID

Request

This endpoint updates user's external ID by user ID.

Path
userIdstring(uuid)required

Identifier for user.

Example: 4974a66b-7493-4f41-908c-58ba81093947
Query
includeInactiveboolean

Include inactive users.

Default false
Example: includeInactive=true
Bodyapplication/jsonrequired
externalIdstringrequired

External id of user within partner database.

Example: "user-1"
curl -i -X PUT \
  'https://developer.spotnana.com/_mock/openapi/usersapi/v2/users/{userId}/external-id?includeInactive=true' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "externalId": "user-1"
  }'

Responses

OK

Response
application/json
{ "debugIdentifier": "string", "errorMessages": [ {} ] }

Activate a user

Request

This endpoint activates a deactivated user.

Path
userIdstring(uuid)required

Identifier for user.

Example: 4974a66b-7493-4f41-908c-58ba81093947
curl -i -X POST \
  'https://developer.spotnana.com/_mock/openapi/usersapi/v2/users/{userId}/activate' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Response
application/json
{ "debugIdentifier": "string", "errorMessages": [ {} ] }

Get user policies

Request

Path
userIdstring(uuid)required

Identifier for user.

Example: 4974a66b-7493-4f41-908c-58ba81093947
curl -i -X GET \
  'https://developer.spotnana.com/_mock/openapi/usersapi/v2/users/{userId}/applicable-policies' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
policiesArray of objects(PolicyBasicInfo)
Response
application/json
{ "policies": [ {} ] }