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 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": [ {} ] }

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