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

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://apis.spotnana.com/v2/users/4974a66b-7493-4f41-908c-58ba81093947/membership-info \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "membershipInfos": [
      {
        "appliedTo": [
          "TAJ"
        ],
        "id": "firstId",
        "issuedBy": "firstIssuedBy",
        "type": "AIR"
      }
    ]
  }'

Responses

No Content

Response
No content

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

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://apis.spotnana.com/v2/users/4974a66b-7493-4f41-908c-58ba81093947/roles \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

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