Skip to main content

(Legacy) User Management API (v0)

Download OpenAPI specification:Download

Use this API to manage the retailer's identity and user management configurations within the NewStore platform.

Warning: This API version is deprecated and will be sunset on January 12th, 2024. We recommend that all existing integrations use the latest User Management API.

Get identity configuration Deprecated

Retrieves the retailer's identity configuration, such as identity providers.

Responses

Response samples

Content type
application/json
{
  • "issuer": "string",
  • "providers": [
    ]
}

List user accounts Deprecated

Retrieves all available user accounts for the retailer. Searches if the query parameter is used.

Authorizations:
newStoreAccessToken
query Parameters
q
string

Query the resulting list by first/last name or email address.

offset
integer >= 0

The offset to be used for the resulting user account list.

count
integer >= 0

The number of requested user accounts.

Responses

Response samples

Content type
application/json
[ ]

Create user account Deprecated

Creates a new user account.

To assign roles to a new user account, provide the IDs of the relevant roles in the roles property. To retrieve the role IDs, use the List roles method.

If the external_directory property is set to false, the user account is created in Auth0 as well and an email with password setup instructions is sent. The user can then use these credentials to log into NewStore.

Note: If the user has no roles assigned, they will be able to log in to NOM but will not be able to interact with NOM until you assign roles to the user to allow them to interact with the various apps. See the Create user role method.

Authorizations:
newStoreAccessToken
Request Body schema: application/json
email
required
string <email>

Email address of the user.

first_name
string

First name of the user.

last_name
string

Last name of the user.

phone
string

Telephone number of the user.

avatar_url
string

DEPRECATED; will be ignored.

external_directory
boolean

User is managed by an external directory.

is_active
boolean

Whether the user can login or not.

roles
Array of strings

List of role IDs the user is assigned to.

Responses

Request samples

Content type
application/json
{
  • "email": "user@example.com",
  • "first_name": "string",
  • "last_name": "string",
  • "phone": "string",
  • "avatar_url": "string",
  • "external_directory": true,
  • "is_active": true,
  • "roles": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "associate_id": "string",
  • "email": "user@example.com",
  • "first_name": "string",
  • "last_name": "string",
  • "phone": "string",
  • "avatar_url": "string",
  • "external_directory": true,
  • "is_active": true,
  • "updated_at": "2019-08-24T14:15:22Z",
  • "created_at": "2019-08-24T14:15:22Z",
  • "last_login_at": "2019-08-24T14:15:22Z",
  • "roles": [
    ]
}

Get user account Deprecated

Retrieves the user account with the specified ID.

path Parameters
id
required
string

The user account ID.

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "associate_id": "string",
  • "email": "user@example.com",
  • "first_name": "string",
  • "last_name": "string",
  • "phone": "string",
  • "avatar_url": "string",
  • "external_directory": true,
  • "is_active": true,
  • "updated_at": "2019-08-24T14:15:22Z",
  • "created_at": "2019-08-24T14:15:22Z",
  • "last_login_at": "2019-08-24T14:15:22Z",
  • "roles": [
    ]
}

Update user account Deprecated

Updates the user account with the specified ID.

If the external_directory property is changed to false, the user account will be created in Auth0 as well and an email with password setup instructions will be send. The user can then use these credentials to log into NewStore.

Note: If the user has no roles assigned, they will be able to log in to NOM but will not be able to interact with NOM until you assign roles to the user to allow them to interact with the various apps. See the Create user role method..

If the external_directory property is changed to true, the user account will be deleted from Auth0. The user then can login with the enterprise directory credentials.

path Parameters
id
required
string

The user account ID.

Request Body schema: application/json
first_name
required
string

First name of the user.

last_name
required
string

Last name of the user.

phone
required
string

Telephone number of the user.

avatar_url
required
string

DEPRECATED; will be ignored.

external_directory
required
boolean

User is managed by an external directory.

is_active
required
boolean

Whether the user can login or not.

roles
required
Array of strings

List of role IDs the user is assigned to.

Responses

Request samples

Content type
application/json
{
  • "first_name": "string",
  • "last_name": "string",
  • "phone": "string",
  • "avatar_url": "string",
  • "external_directory": true,
  • "is_active": true,
  • "roles": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "associate_id": "string",
  • "email": "user@example.com",
  • "first_name": "string",
  • "last_name": "string",
  • "phone": "string",
  • "avatar_url": "string",
  • "external_directory": true,
  • "is_active": true,
  • "updated_at": "2019-08-24T14:15:22Z",
  • "created_at": "2019-08-24T14:15:22Z",
  • "last_login_at": "2019-08-24T14:15:22Z",
  • "roles": [
    ]
}

Delete user account Deprecated

Deletes the user account with the specified ID.

If the external_directory property is set to false, the user account will be deleted in Auth0 as well.

If the external_directory property is set to true, the user account will not be deleted from the respective enterprise directory.

Authorizations:
newStoreAccessToken
path Parameters
id
required
string

The user account ID.

Responses

Response samples

Content type
application/json
{
  • "error_code": "string",
  • "message": "string",
  • "request_id": "string"
}

List permissions for a user Deprecated

Retrieves information and permissions of the user identified by the bearer token.

Authorizations:
newStoreAccessToken
query Parameters
application
string
Enum: "nom" "aa" "fa"

Filter the users permission by application.

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "associate_id": "string",
  • "email": "user@example.com",
  • "first_name": "string",
  • "last_name": "string",
  • "permissions": [
    ]
}

List user permissions Deprecated

Lists all the user permissions available for the retailer.

Authorizations:
newStoreAccessToken

Responses

Response samples

Content type
application/json
{
  • "elements": [
    ]
}

List user roles Deprecated

Lists all available user roles for the retailer. Search if the query parameter is used.

Authorizations:
newStoreAccessToken
query Parameters
q
string

Query the resulting list by name.

Responses

Response samples

Content type
application/json
{
  • "elements": [
    ]
}

Create user role Deprecated

Creates a new role.

Authorizations:
newStoreAccessToken
Request Body schema: application/json
name
required
string^[^/]+$

Name of the role. To be valid, it can't include slashes ('/').

directory_mapping
Array of strings

Maps external directory groups to this role.

required
Array of objects non-empty

List of permissions.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "directory_mapping": [
    ],
  • "permissions": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "is_readonly": true,
  • "directory_mapping": [
    ],
  • "updated_at": "2019-08-24T14:15:22Z",
  • "created_at": "2019-08-24T14:15:22Z",
  • "permissions": [
    ]
}

Get user role Deprecated

Retrieves the user role with the specified ID.

Authorizations:
newStoreAccessToken
path Parameters
id
required
string

The role ID.

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "is_readonly": true,
  • "directory_mapping": [
    ],
  • "updated_at": "2019-08-24T14:15:22Z",
  • "created_at": "2019-08-24T14:15:22Z",
  • "permissions": [
    ]
}

Update user role Deprecated

Updates the user role with the specified ID.

Authorizations:
newStoreAccessToken
path Parameters
id
required
string

The role ID.

Request Body schema: application/json
name
required
string^[^/]+$

Name of the role. To be valid, it can't include slashes ('/').

directory_mapping
Array of strings

Maps external directory groups to this role.

required
Array of objects non-empty

List of permissions.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "directory_mapping": [
    ],
  • "permissions": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "is_readonly": true,
  • "directory_mapping": [
    ],
  • "updated_at": "2019-08-24T14:15:22Z",
  • "created_at": "2019-08-24T14:15:22Z",
  • "permissions": [
    ]
}

Delete user role Deprecated

Deletes the user role with the specified ID.

Once deleted, the user role is unassigned from all associated user accounts.

Authorizations:
newStoreAccessToken
path Parameters
id
required
string

The role ID.

Responses

Response samples

Content type
application/json
{
  • "error_code": "string",
  • "message": "string",
  • "request_id": "string"
}

List user accounts for a user role Deprecated

Retrieves all user accounts that have been assigned the specified user role.

Authorizations:
newStoreAccessToken
path Parameters
id
required
string

The role ID.

Responses

Response samples

Content type
application/json
[ ]

Send Keycloak events to the platform Deprecated

Sends Keycloak events to the NewStore platform.

Request Body schema: application/json
realm
required
string

Realm of the incoming event.

operation
required
string

Operation type done on the given resource. e.g. create

resource_id
required
string

Identifier of the given resource.

resource_name
string

Name of the given resource. e.g. user

error
string

Something went wrong on keycloak site to emit the event.

Responses

Request samples

Content type
application/json
{
  • "realm": "string",
  • "operation": "string",
  • "resource_id": "string",
  • "resource_name": "string",
  • "error": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "associate_id": "string",
  • "email": "user@example.com",
  • "first_name": "string",
  • "last_name": "string",
  • "phone": "string",
  • "avatar_url": "string",
  • "external_directory": true,
  • "is_active": true,
  • "updated_at": "2019-08-24T14:15:22Z",
  • "created_at": "2019-08-24T14:15:22Z",
  • "last_login_at": "2019-08-24T14:15:22Z",
  • "roles": [
    ]
}