Skip to content

User Management API (v2)

Download OpenAPI description
Languages
Servers
Sandbox URL
https://api-ext-sboxmeta.partners.spotnana.com/
Spotnana mock server
https://developer.spotnana.com/_mock/openapi/usersapi/

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.

Security
Bearer
Bodyapplication/jsonrequired
personalInfoobject(UserPersonalInfo)
businessInfoobject(BusinessInfo)
personastring(Persona)required
Enum"UNKNOWN_PERSONA""EMPLOYEE""GUEST""PERSONAL""RELATIVE""ADHOC"
billingCurrencystring

Preferred billing currency of the user

Example: "INR"
tierstring(Tier)
Enum"BASIC""SEAT1A"
externalIdstring

A partner-assigned user identifier. This value must be unique for all travelers within a PNR.

travelPreferencesobject(TravelPreferences)
membershipInfoobject(MembershipInfo)
notificationPreferencesobject(NotificationPreferences)
adhocUserInfoobject(AdhocUserInfo)
rolesArray of objects(RoleConfig)
relativeOfobject(RelativeOf)Deprecated
travelArrangersobject(UserTravelArrangers)Deprecated
curl -i -X POST \
  https://api-ext-sboxmeta.partners.spotnana.com/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": "b93dc51f-12dd-46c7-b7d6-1cb12cd3f5b3",
        "name": "Name"
      },
      "designation": "MANAGER",
      "email": "user@business.com",
      "employeeId": "101",
      "gradeRef": {
        "id": "b93dc51f-12dd-46c7-b7d6-1cb12cd3f5b3",
        "name": "Name"
      },
      "legalEntityRef": {
        "id": "b93dc51f-12dd-46c7-b7d6-1cb12cd3f5b3",
        "name": "Name"
      },
      "managerRef": {
        "id": "b93dc51f-12dd-46c7-b7d6-1cb12cd3f5b3",
        "name": "Name"
      },
      "officeRef": {
        "id": "b93dc51f-12dd-46c7-b7d6-1cb12cd3f5b3",
        "name": "Name"
      },
      "organizationRef": {
        "id": "b93dc51f-12dd-46c7-b7d6-1cb12cd3f5b3",
        "name": "Name"
      },
      "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": "b93dc51f-12dd-46c7-b7d6-1cb12cd3f5b3",
        "name": "Name"
      },
      "countryCode": "USA",
      "workerType": "EMPLOYEE",
      "accountingCode": "123",
      "companySpecifiedAttributes": [
        {
          "fixedColumnName": "contingentType",
          "value": "FSTV"
        }
      ],
      "designatedApproverRefs": [
        {
          "id": "b93dc51f-12dd-46c7-b7d6-1cb12cd3f5b3",
          "name": "Name"
        }
      ],
      "authorizerEmail": "example@email.com"
    },
    "persona": "EMPLOYEE",
    "relativeOf": {
      "userRef": {
        "id": "b93dc51f-12dd-46c7-b7d6-1cb12cd3f5b3",
        "name": "Name"
      },
      "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",
          "linked": false
        }
      ],
      "isLoyaltyBlocked": false
    },
    "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
Example: "b93dc51f-12dd-46c7-b7d6-1cb12cd3f5b3"
Response
application/json
{ "id": "b93dc51f-12dd-46c7-b7d6-1cb12cd3f5b3" }

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.

Security
Bearer
Query
companyIdstring(uuid)

Identifier for company to search user for. Please specify one of the companyId or tmcId.

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

Identifier for TMC to search user for. Please specify one of the companyId or tmcId.

Example: tmcId=b83e9704-2e8e-4256-90bf-2e59c1bcf9f2
emailstring(email)

Email ID of the user.

Example: email=user@example.com
externalIdstring

The partner-assigned user identifier.

Example: externalId=123456
includeInactiveboolean

If true, include inactive users in the response.

Default false
Example: includeInactive=true
curl -i -X GET \
  'https://api-ext-sboxmeta.partners.spotnana.com/v2/users?companyId=4974a66b-7493-4f41-908c-58ba81093947&tmcId=b83e9704-2e8e-4256-90bf-2e59c1bcf9f2&email=user%40example.com&externalId=123456&includeInactive=true' \
  -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": [ {} ] }

List users

Request

List users of a specific TMC or a company.

Security
Bearer
Bodyapplication/jsonrequired
One of:

TMC ID

object ListUsersV3TmcId Recursive
curl -i -X POST \
  https://api-ext-sboxmeta.partners.spotnana.com/v3/users/list \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "tmcId": {
      "id": "b93dc51f-12dd-46c7-b7d6-1cb12cd3f5b3"
    },
    "userStatusFilter": "INACTIVE",
    "searchText": "chi",
    "pagination": {
      "offset": 0,
      "limit": 100
    },
    "filters": [
      {
        "legalEntityIds": [
          {
            "id": "b93dc51f-12dd-46c7-b7d6-1cb12cd3f5b3"
          }
        ],
        "officeIds": [
          {
            "id": "b93dc51f-12dd-46c7-b7d6-1cb12cd3f5b3"
          }
        ],
        "departmentIds": [
          {
            "id": "b93dc51f-12dd-46c7-b7d6-1cb12cd3f5b3"
          }
        ],
        "costCenterIds": [
          {
            "id": "b93dc51f-12dd-46c7-b7d6-1cb12cd3f5b3"
          }
        ],
        "userIds": [
          {
            "id": "b93dc51f-12dd-46c7-b7d6-1cb12cd3f5b3"
          }
        ],
        "emails": [
          "string"
        ],
        "externalIds": [
          "string"
        ],
        "personas": [
          "EMPLOYEE"
        ],
        "roles": [
          "TRAVEL_ARRANGER"
        ],
        "designations": [
          "string"
        ],
        "tiers": [
          "SEAT1A"
        ]
      }
    ],
    "sort": {
      "sortBy": "NAME",
      "sortOrder": "DESCENDING"
    }
  }'

Responses

OK

Bodyapplication/json
usersArray of objects(UserDetail)

Users matching the filters specified in the request.

paginationobject(OffsetBasedPaginationResponseParams)
Response
application/json
{ "users": [ {} ], "pagination": { "totalNumResults": 0 } }