User Management API (v2)

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

Users

APIs to onboard and manage users.

Operations

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://apis.spotnana.com/v2/users/4974a66b-7493-4f41-908c-58ba81093947/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)

A name of user that does not contain special characters.

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)

A name of user that does not contain special characters.

emergencyContactobject(EmergencyContact)

Emergency contact information.

emergencyContactInfoobject(EmergencyContactInfo)Deprecated

Emergency contact information.

curl -i -X PUT \
  'https://apis.spotnana.com/v2/users/4974a66b-7493-4f41-908c-58ba81093947/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
No content

Get user travel preferences

Request

Path
userIdstring(uuid)required

Identifier for user.

Example: 4974a66b-7493-4f41-908c-58ba81093947
curl -i -X GET \
  https://apis.spotnana.com/v2/users/4974a66b-7493-4f41-908c-58ba81093947/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": {} } }