Nodeblocks User Service Default Adapter API Specification (1.0)

Download OpenAPI specification:Download

UserDataService API spec (Default Adapter)

API documentation for OrderService default adapter. Includes features such as:

  • Creating/updating/verifying users
  • Deleting users
  • Reset password
  • Verify user email address
  • Upload and manage files/attachments

App

Get app status

Retrieves app status information.

Responses

Response samples

Content type
application/json
{
  • "status": "ok",
  • "packageInfo": {
    }
}

Invitation

Invite User to Service and Organization

Send an email to user with an invitation link. Once clicked, this link will redirect to invitation page.

Validation

  • valid Authorization specified in request header
  • Authorization meets one of the following requirements:
    • it is super user token or a system internal token
    • it is a non-super user token, and the user has owner or admin role in the organization (specified in the request body), and the Organization API is provided in the adapter.

Side effects

  • Invitation email will be sent to user's email address,
    • when inviteUser config is true when setting up the adapter

This endpoint is disabled when the invitation feature is disabled.

When Organization API is not provided in the adapter, the orgId and role fields are optional. Otherwise, they are required.

Authorizations:
Authorization
Request Body schema: application/json

Create an invite for a user to an organization

email
required
string <email> (userEmail.field)

The email address of the user.

fromUserId
required
string (objectId.field) ^[0-9a-z]{24}$

The user ID that sent the invite to the invited user

orgId
string (objectId.field) ^[0-9a-z]{24}$

The organization ID that the user is invited to. *Optional when Organization API is not provided in the adapter, but required when Organization API is provided

role
string (userOrganizationRole.field)
Enum: "owner" "admin" "member" "guest"

The role of the invited user in the organization. *Optional when Organization API is not provided in the adapter, but required when Organization API is provided)

Responses

Request samples

Content type
application/json
{
  • "email": "mouri@basal.dev",
  • "fromUserId": "0123456789ab0123456789ab",
  • "orgId": "0123456789ab0123456789ab",
  • "role": "owner"
}

Response samples

Content type
application/json
{
  • "id": "0123456789ab0123456789ab",
  • "fromUserId": "0123456789ab0123456789ab",
  • "orgId": "0123456789ab0123456789ab",
  • "email": "mouri@basal.dev",
  • "role": "owner",
  • "status": "waiting_accept",
  • "acceptedAt": "2022-01-01T00:00:000Z",
  • "createdAt": "2022-01-01T00:00:000Z",
  • "invitedAt": "2022-01-01T00:00:000Z",
  • "updatedAt": "2022-01-01T00:00:000Z"
}

Get invitation list to an organization

Retrieve list of invitations. System admin user can list all invitations, without filter. Organization owner/admin can specify their orgId in the filter query parameter to get invitations of their own organization.

Validation

  • valid Authorization specified in request header
  • Authorization meets one of the following requirements:
    • it is super user token or a system internal token
    • it is a non-super user token, and the user has owner or admin role in the organization (specified in the request body), and the Organization API is provided in the adapter.
Authorizations:
Authorization
query Parameters
$top
integer

number of object want to fetch

$skip
integer

number of object want to skip

$nextToken
string

Token for get next batch of list data

$previousToken
string

Token for get previous batch of list data

$filter
string

Return only items which matches to a condition (The operators below are listed in order of precedence from highest to lowest).

Operator Description Example
( ) Precedence grouping (items.quantity eq 1 or items.productName eq 'T-Shirt') and totalPrice gt 100
not Logical negation not totalPrice le 3.5
gt Greater than totalPrice gt 20
ge Greater than or equal totalPrice ge 10
lt Less than totalPrice lt 20
le Less than or equal totalPrice le 100
eq Equal customer.userId eq '01234567890123456789ab'
ne Not equal status ne 'CANCELED'
and Logical and totalPrice le 200 and totalPrice gt 3.5
or Logical or totalPrice le 3.5 or totalPrice gt 200
$orderBy
string

Return sorted items based on property values. It can contains a comma-separated list of expressions. The expression may include the suffix "asc" for ascending or "desc" for descending, separated from the property name by one or more spaces. If "asc" or "desc" is not specified, the service MUST order by the specified property in ascending order. The sort order is the inherent order for the type of the property.

Examples:

Return all orders sorted by closedAt in descending order and a secondary sort order of updatedAt in ascending order.

orgId
string

OrganizationId

Responses

Response samples

Content type
application/json
{
  • "total": 100,
  • "count": 100,
  • "value": [
    ]
}

Accept an invitation

Checks invitation token. If valid, create user using payload information, and add user to invited organization (if any).

Validation

  • valid Authorization specified in request header
  • Authorization is one-time-token generated for this user's invitation verification use, and not been used before.
Authorizations:
Authorization
Request Body schema: application/json
name
string [ 2 .. 50 ] characters
password
required
string [ 8 .. 64 ] characters
typeId
required
string
avatar
string

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "password": "stringst",
  • "typeId": "string",
  • "avatar": "string"
}

Response samples

Content type
application/json
{
  • "id": "0123456789ab0123456789ab",
  • "fromUserId": "0123456789ab0123456789ab",
  • "orgId": "0123456789ab0123456789ab",
  • "email": "mouri@basal.dev",
  • "role": "owner",
  • "status": "waiting_accept",
  • "acceptedAt": "2022-01-01T00:00:000Z",
  • "createdAt": "2022-01-01T00:00:000Z",
  • "invitedAt": "2022-01-01T00:00:000Z",
  • "updatedAt": "2022-01-01T00:00:000Z"
}

Delete an invitation

Delete an invitation

Validation

  • valid Authorization specified in request header
  • Authorization meets one of the following requirements:
    • it is the user that created the invitation
    • it is super user token or a system internal token
    • if organizationAPI is set
      • it is a non-super user token, and the user has owner or admin role in the organization (specified in the request body)
Authorizations:
Authorization

Responses

Response samples

Content type
application/json
{
  • "code": "string",
  • "message": "string",
  • "target": "string",
  • "details": [
    ],
  • "innererror": {
    }
}

(Deprecated) Get upload url for avatar

get user upload url

Authorizations:
Authorization
path Parameters
userId
required
string

Responses

Response samples

Content type
application/json
{
  • "error": {
    }
}

User

Create User For Admins

Create a user and returns the created user information. This will not send an email to the user and will also set emailVerified to true.

Custom field information is configured when setting up user-service - please refer to other documentation.

Validation

  • valid Authorization specified in request header
  • Authorization meets the following requirements:
    • it is super user token or a system internal token
Authorizations:
Authorization
Request Body schema: application/json

Body for creating user into system

email
required
string <email>
password
required
string^(?=.*[a-z])(?=.*[0-9])[A-Za-z0-9]{8,24}$
typeId
required
string
Enum: "000" "010" "001" "100"
name
required
string [ 2 .. 20 ] characters
avatar
string <uri>
phoneNumber
string
addressLine1
string
addressLine2
string
addressLine3
string
customFields
object (customFields.field)

Custom fields added to the customFields options in UserDefaultAdapter.

object (timeline)

Timelines for the user.

Responses

Request samples

Content type
application/json
Example
{
  • "name": "毛利小五郎",
  • "email": "mouri@basal.dev",
  • "password": "password1234",
  • "typeId": "010"
}

Response samples

Content type
application/json
{
  • "mouri": {
    }
}

Create User

Create a user and returns the created user information.

Custom field information is configured when setting up user-service - please refer to other documentation.

For typeId != 100 (non super user type), no authentication or authorization is required.

Side effects

  • Verification email will be send to user's email address,
    • if verifyEmail config is true when setting up the adapter
Request Body schema: application/json

Body for creating user into system

email
required
string <email>
password
required
string^(?=.*[a-z])(?=.*[0-9])[A-Za-z0-9]{8,24}$
typeId
required
string
Enum: "000" "010" "001" "100"
name
required
string [ 2 .. 20 ] characters
avatar
string <uri>
phoneNumber
string
addressLine1
string
addressLine2
string
addressLine3
string
customFields
object (customFields.field)

Custom fields added to the customFields options in UserDefaultAdapter.

object (timeline)

Timelines for the user.

Responses

Request samples

Content type
application/json
Example
{
  • "name": "毛利小五郎",
  • "email": "mouri@basal.dev",
  • "password": "password1234",
  • "typeId": "010"
}

Response samples

Content type
application/json
{
  • "mouri": {
    }
}

Get User List

Get user list

Validation

  • valid Authorization specified in request header
  • Authorization is super user token or a system internal token
Authorizations:
Authorizationx-nb-fingerprint
query Parameters
$top
integer

number of object want to fetch

$skip
integer

number of object want to skip

$nextToken
string

Token for get next batch of list data

$previousToken
string

Token for get previous batch of list data

$filter
string

Return only items which matches to a condition (The operators below are listed in order of precedence from highest to lowest).

Operator Description Example
( ) Precedence grouping (items.quantity eq 1 or items.productName eq 'T-Shirt') and totalPrice gt 100
not Logical negation not totalPrice le 3.5
gt Greater than totalPrice gt 20
ge Greater than or equal totalPrice ge 10
lt Less than totalPrice lt 20
le Less than or equal totalPrice le 100
eq Equal customer.userId eq '01234567890123456789ab'
ne Not equal status ne 'CANCELED'
and Logical and totalPrice le 200 and totalPrice gt 3.5
or Logical or totalPrice le 3.5 or totalPrice gt 200
$orderBy
string

Return sorted items based on property values. It can contains a comma-separated list of expressions. The expression may include the suffix "asc" for ascending or "desc" for descending, separated from the property name by one or more spaces. If "asc" or "desc" is not specified, the service MUST order by the specified property in ascending order. The sort order is the inherent order for the type of the property.

Examples:

Return all orders sorted by closedAt in descending order and a secondary sort order of updatedAt in ascending order.

$expand
string

Include extra information that are not included in responses by default in the response. You can expand customFields, by using $expand=customFields.field

Responses

Response samples

Content type
application/json
{
  • "total": 1,
  • "count": 1,
  • "@nextLink": "string",
  • "@previousLink": "string",
  • "value": [
    ]
}

Get User Info by User ID

Retrieve the information of the user with the matching user ID.

Validation

  • valid Authorization specified in request header
  • Authorization is any of the following:
    • super user token or a system internal token
    • useId inside the token matches the userId in the path
Authorizations:
Authorization
query Parameters
$expand
string

Include extra information that are not included in responses by default in the response. You can expand customFields, by using $expand=customFields.field

Responses

Response samples

Content type
application/json
{
  • "mouri": {
    }
}

Delete User Info by User ID

Delete user by ID

Validation

  • valid Authorization specified in request header
  • Authorization is any of the following:
    • super user token or a system internal token
    • useId inside the token matches the userId in the path
Authorizations:
Authorization

Responses

Response samples

Content type
application/json
{
  • "code": "string",
  • "message": "string",
  • "target": "string",
  • "details": [
    ],
  • "innererror": {
    }
}

Update User's Information by ID

Update user information by user ID

Validation

  • valid Authorization specified in request header
  • Authorization is any of the following:
    • super user token or a system internal token
    • useId inside the token matches the userId in the path
Authorizations:
Authorization
Request Body schema: application/json
addressLine1
string
addressLine2
string
addressLine3
string
avatar
string
customFields
object (customFields.field)

Custom fields added to the customFields options in UserDefaultAdapter.

name
string [ 2 .. 50 ] characters
password
string [ 8 .. 64 ] characters
phoneNumber
string
postalCode
string
object (reviewStats.field)

The current statistics for reviews made against this user. If the review service is not in use, then 0 will be returned for all fields.

object (timeline)

Timelines for the user.

Responses

Request samples

Content type
application/json
{
  • "name": "毛利小五郎"
}

Response samples

Content type
application/json
{
  • "mouri": {
    }
}

Send user verification email

This endpoint will send verification Email to user.

Usually when create user endpoint the email will be send. But to give a chance to resend the email (in case the email is missing, or token expired), this endpoint is provided.

Validation

  • valid Authorization specified in request header
  • Authorization is any of the following:
    • useId inside the token matches the userId in the path

Side effects

  • Send Reset Password Email will be send to user's email address,
    • if verifyEmail config is set to be true when setting up the adapter
Authorizations:
Authorizationx-nb-fingerprint

Responses

Response samples

Content type
application/json
{
  • "code": "string",
  • "message": "string",
  • "target": "string",
  • "details": [
    ],
  • "innererror": {
    }
}

Check user Email/Password combination is valid

Validate user's password with the matches the email.

This endpoint is designed for internal communication with AuthDefaultAdapter.

If developer want to handle use case like "user login", please use /login endpoint in Auth service

After several failed attempts, the user will be locked out.

Validation

  • valid Authorization specified in request header
  • Authorization is any of the following:
    • super user token or a system internal token
Authorizations:
Authorization
Request Body schema: application/json

Post check user password

email
string <email> >= 5 characters
password
string >= 8 characters

Responses

Request samples

Content type
application/json
{
  • "email": "mouri@basal.dev",
  • "password": "password1234"
}

Response samples

Content type
application/json
{
  • "valid": true
}

Change User Password

Validate user's password with the userId specified in the Authorization header and the password provided in the request body.

This endpoint is designed for user to change their own password.

After several failed attempts, the user will be locked out.

Validation

  • valid Authorization specified in request header
  • Authorization is any of the following:
    • super user token or your own token
Authorizations:
Authorization
Request Body schema: application/json

Change User Password

password
string >= 8 characters
newPassword
string >= 8 characters

Responses

Request samples

Content type
application/json
{
  • "password": "password1234",
  • "newPassword": "password12345"
}

Response samples

Content type
application/json
{
  • "code": "string",
  • "message": "string",
  • "target": "string",
  • "details": [
    ],
  • "innererror": {
    }
}

Change User Email

Validate the user's userId specified in the Authorization header.

This endpoint is designed for user to change their own email.

an email will be sent to the new email address to verify the email.

Verifcation is reset when email is changed.

Validation

  • valid Authorization specified in request header
  • Authorization is any of the following:
    • super user token or your own token
Authorizations:
Authorization

Responses

Response samples

Content type
application/json
{
  • "code": "string",
  • "message": "string",
  • "target": "string",
  • "details": [
    ],
  • "innererror": {
    }
}

Verify User's Email

Verify user's Email address. User can use some function of system only after his email is verified.

When creating user with POST /users endpoint, it will send user an Email link encoded with one-time-token.

Use the one time token with this endpoint, to get the user's Email verified.

Validation

  • valid Authorization specified in request header
  • Authorization is one-time-token generated for this user's email verification use, and not been used before.
Authorizations:
Authorization

Responses

Response samples

Content type
application/json
{
  • "code": "string",
  • "message": "string",
  • "target": "string",
  • "details": [
    ],
  • "innererror": {
    }
}

Send Reset Password Email

This endpoint will send a reset password email to a user. Users who click the link in the email will be redirected to the password reset view.

Side effects

  • Reset password email will be sent to user's email address,
    • when resetPassword config is true when setting up the adapter
Authorizations:
Authorization
Request Body schema: application/json
email
string <email> >= 5 characters

Responses

Request samples

Content type
application/json
{
  • "email": "edogawaconan@basal.dev"
}

Response samples

Content type
application/json
{
  • "error": {
    }
}

Reset User's Password

By calling this endpoint, user can reset his password.

When request password change, POST /users/send_reset_password_email endpoint to ask system send Email to specified Email address. By Click the url contained in the Email, user navigate to password reset page, and call this endpoint to reset password.

Validation

  • valid Authorization specified in request header
  • Authorization is one-time-token generated for this user's password reset use, and not been used before.
Authorizations:
Authorization
Request Body schema: application/json
password
string [ 8 .. 64 ] characters

Responses

Request samples

Content type
application/json
{
  • "password": "stringst"
}

Response samples

Content type
application/json
{
  • "code": "string",
  • "message": "string",
  • "target": "string",
  • "details": [
    ],
  • "innererror": {
    }
}

Lock user

Locks a user. A user who is locked cannot be logged in to.

Authorizations:
x-nb-fingerprintAuthorization

Responses

Response samples

Content type
application/json
{
  • "error": {
    }
}

Unlock user

Unlocks a user, allowing logins to their user account again.

Authorizations:
x-nb-fingerprintAuthorization

Responses

Response samples

Content type
application/json
{
  • "error": {
    }
}

Deactivate a user

This handler will lock the user by applying the following steps in sequence:

  1. Verify the user's Email address with a one-time token.
  2. Set isLocked for the user (userService.updateUser).
  3. Delete refresh tokens for the user (authAPI.deleteRefreshTokensForUser).
Authorizations:
Authorization
Request Body schema: application/json
userId
required
string

ID of the user to deactivate

Responses

Request samples

Content type
application/json
{
  • "userId": "string"
}

Response samples

Content type
application/json
{
  • "error": {
    }
}

Activate a user

This handler will unlock a given deactivated user, sending them an email using activateUserEmailConfig's template. Only Superusers can perform this action.

Authorizations:
Authorization

Responses

Response samples

Content type
application/json
{
  • "error": {
    }
}

Preference

Add user preference

Create a new user preference

Authorizations:
Authorizationx-nb-fingerprint
Request Body schema: application/json
key
string
value
string

Responses

Request samples

Content type
application/json
{
  • "key": "string",
  • "value": "string"
}

Response samples

Content type
application/json
{
  • "userId": "string",
  • "key": "string",
  • "value": "string"
}

Get user preferences

Get list of preferences for user

Authorizations:
Authorizationx-nb-fingerprint
query Parameters
$top
integer

number of object want to fetch

$skip
integer

number of object want to skip

$nextToken
string

Token for get next batch of list data

$previousToken
string

Token for get previous batch of list data

$filter
string

Return only items which matches to a condition (The operators below are listed in order of precedence from highest to lowest).

Operator Description Example
( ) Precedence grouping (items.quantity eq 1 or items.productName eq 'T-Shirt') and totalPrice gt 100
not Logical negation not totalPrice le 3.5
gt Greater than totalPrice gt 20
ge Greater than or equal totalPrice ge 10
lt Less than totalPrice lt 20
le Less than or equal totalPrice le 100
eq Equal customer.userId eq '01234567890123456789ab'
ne Not equal status ne 'CANCELED'
and Logical and totalPrice le 200 and totalPrice gt 3.5
or Logical or totalPrice le 3.5 or totalPrice gt 200
$orderBy
string

Return sorted items based on property values. It can contains a comma-separated list of expressions. The expression may include the suffix "asc" for ascending or "desc" for descending, separated from the property name by one or more spaces. If "asc" or "desc" is not specified, the service MUST order by the specified property in ascending order. The sort order is the inherent order for the type of the property.

Examples:

Return all orders sorted by closedAt in descending order and a secondary sort order of updatedAt in ascending order.

Responses

Response samples

Content type
application/json
{
  • "total": 0,
  • "count": 0,
  • "@nextLink": "string",
  • "@previousLink": "string",
  • "value": [
    ]
}

Delete user preference

Delete user preference

Authorizations:
Authorization

Responses

Response samples

Content type
application/json
{
  • "error": {
    }
}

Get user preference by ID

Get user preference by ID

Authorizations:
Authorization

Responses

Response samples

Content type
application/json
{
  • "userId": "string",
  • "key": "string",
  • "value": "string"
}

Follow

Follow user

Follow a user

This API is used to follow a user. The user in the path will be followed by the given followerId and followerType.

Required

  • followerId and followerType must be specified in the request body

When Organization API is not provided in the adapter, using organization in followType will throw an error.

Authorizations:
Authorization
Request Body schema: application/json
followerId
string (objectId.field) ^[0-9a-z]{24}$
Enum: "user Id" "organization Id" "product Id"

follower id can be any other type of Id and it required

followerType
string
Enum: "user" "organization" "product"

follower type is required. If Organization API is not provided in the adapter, organization will throw an error.

Responses

Request samples

Content type
application/json
{
  • "followerId": "0123456789ab0123456789ab",
  • "followerType": "user"
}

Response samples

Content type
application/json
{
  • "error": {
    }
}

Unfollow User

Unfollow a user

This API is used to unfollow a user. By passing the id in the body, the user on the path will be unfollowed.

Required

  • followerId and followerType must be specified in the request body

When Organization API is not provided in the adapter, using organization in followType will throw an error.

Authorizations:
Authorization
Request Body schema: application/json
followerId
string (objectId.field) ^[0-9a-z]{24}$
Enum: "user Id" "organization Id" "product Id"

follower id can be any other type of Id and it required

followerType
string
Enum: "user" "organization" "product"

follower type is required. If Organization API is not provided in the adapter, organization will throw an error.

Responses

Request samples

Content type
application/json
{
  • "followerId": "0123456789ab0123456789ab",
  • "followerType": "user"
}

Response samples

Content type
application/json
{
  • "error": {
    }
}

Get User Follow List (Deprecated) Deprecated

Deprecated use GET /follows instead

Get user follow list

Validation

  • valid Authorization specified in request header
  • Authorization is super user token or a system internal token
Authorizations:
Authorizationx-nb-fingerprint
query Parameters
type
required
string

type of follow/follower examples:

  • user
  • organization
  • product
$top
integer

number of object want to fetch

$skip
integer

number of object want to skip

$nextToken
string

Token for get next batch of list data

$previousToken
string

Token for get previous batch of list data

$filter
string

Return only items which matches to a condition (The operators below are listed in order of precedence from highest to lowest).

Operator Description Example
( ) Precedence grouping (items.quantity eq 1 or items.productName eq 'T-Shirt') and totalPrice gt 100
not Logical negation not totalPrice le 3.5
gt Greater than totalPrice gt 20
ge Greater than or equal totalPrice ge 10
lt Less than totalPrice lt 20
le Less than or equal totalPrice le 100
eq Equal customer.userId eq '01234567890123456789ab'
ne Not equal status ne 'CANCELED'
and Logical and totalPrice le 200 and totalPrice gt 3.5
or Logical or totalPrice le 3.5 or totalPrice gt 200
$orderBy
string

Return sorted items based on property values. It can contains a comma-separated list of expressions. The expression may include the suffix "asc" for ascending or "desc" for descending, separated from the property name by one or more spaces. If "asc" or "desc" is not specified, the service MUST order by the specified property in ascending order. The sort order is the inherent order for the type of the property.

Examples:

Return all orders sorted by closedAt in descending order and a secondary sort order of updatedAt in ascending order.

Responses

Response samples

Content type
application/json
{
  • "total": 0,
  • "count": 0,
  • "@nextLink": "string",
  • "@previousLink": "string",
  • "value": [
    ]
}

Get User Follower List

Get user follower list

Validation

  • valid Authorization specified in request header
  • Authorization is super user token or a system internal token
Authorizations:
Authorizationx-nb-fingerprint
query Parameters
type
required
string

type of follow/follower examples:

  • user
  • organization
  • product
$top
integer

number of object want to fetch

$skip
integer

number of object want to skip

$nextToken
string

Token for get next batch of list data

$previousToken
string

Token for get previous batch of list data

$filter
string

Return only items which matches to a condition (The operators below are listed in order of precedence from highest to lowest).

Operator Description Example
( ) Precedence grouping (items.quantity eq 1 or items.productName eq 'T-Shirt') and totalPrice gt 100
not Logical negation not totalPrice le 3.5
gt Greater than totalPrice gt 20
ge Greater than or equal totalPrice ge 10
lt Less than totalPrice lt 20
le Less than or equal totalPrice le 100
eq Equal customer.userId eq '01234567890123456789ab'
ne Not equal status ne 'CANCELED'
and Logical and totalPrice le 200 and totalPrice gt 3.5
or Logical or totalPrice le 3.5 or totalPrice gt 200
$orderBy
string

Return sorted items based on property values. It can contains a comma-separated list of expressions. The expression may include the suffix "asc" for ascending or "desc" for descending, separated from the property name by one or more spaces. If "asc" or "desc" is not specified, the service MUST order by the specified property in ascending order. The sort order is the inherent order for the type of the property.

Examples:

Return all orders sorted by closedAt in descending order and a secondary sort order of updatedAt in ascending order.

Responses

Response samples

Content type
application/json
{
  • "total": 0,
  • "count": 0,
  • "@nextLink": "string",
  • "@previousLink": "string",
  • "value": [
    ]
}

Get Followed (Deprecated) Deprecated

Deprecated use GET /follows instead

Get the list of followed users by followerId and type

This API gets a list of users that are being followed by an entity.

For example, this can be used to fetch all users that are being followed by organization or other user

Required

  • followerId and type must be specified in the query
Authorizations:
Authorizationx-nb-fingerprint
query Parameters
followerId
required
string

follower id can be user id or organization id

type
required
string

type of follow/follower examples:

  • user
  • organization
  • product
$top
integer

number of object want to fetch

$skip
integer

number of object want to skip

$nextToken
string

Token for get next batch of list data

$previousToken
string

Token for get previous batch of list data

$filter
string

Return only items which matches to a condition (The operators below are listed in order of precedence from highest to lowest).

Operator Description Example
( ) Precedence grouping (items.quantity eq 1 or items.productName eq 'T-Shirt') and totalPrice gt 100
not Logical negation not totalPrice le 3.5
gt Greater than totalPrice gt 20
ge Greater than or equal totalPrice ge 10
lt Less than totalPrice lt 20
le Less than or equal totalPrice le 100
eq Equal customer.userId eq '01234567890123456789ab'
ne Not equal status ne 'CANCELED'
and Logical and totalPrice le 200 and totalPrice gt 3.5
or Logical or totalPrice le 3.5 or totalPrice gt 200
$orderBy
string

Return sorted items based on property values. It can contains a comma-separated list of expressions. The expression may include the suffix "asc" for ascending or "desc" for descending, separated from the property name by one or more spaces. If "asc" or "desc" is not specified, the service MUST order by the specified property in ascending order. The sort order is the inherent order for the type of the property.

Examples:

Return all orders sorted by closedAt in descending order and a secondary sort order of updatedAt in ascending order.

Responses

Response samples

Content type
application/json
{
  • "total": 0,
  • "count": 0,
  • "@nextLink": "string",
  • "@previousLink": "string",
  • "value": [
    ]
}

Get Follows

Get the list of followed users by followerId and type

This API gets a list of users that are being followed by an entity.

For example, this can be used to fetch all users that are being followed by organization or other user

Required

  • followerId and type must be specified in the query
Authorizations:
Authorizationx-nb-fingerprint
query Parameters
followerId
required
string

follower id can be user id or organization id

type
required
string

type of follow/follower examples:

  • user
  • organization
  • product
$top
integer

number of object want to fetch

$skip
integer

number of object want to skip

$nextToken
string

Token for get next batch of list data

$previousToken
string

Token for get previous batch of list data

$orderBy
string

Return sorted items based on property values. It can contains a comma-separated list of expressions. The expression may include the suffix "asc" for ascending or "desc" for descending, separated from the property name by one or more spaces. If "asc" or "desc" is not specified, the service MUST order by the specified property in ascending order. The sort order is the inherent order for the type of the property.

Examples:

Return all orders sorted by closedAt in descending order and a secondary sort order of updatedAt in ascending order.

Responses

Response samples

Content type
application/json
{
  • "total": 0,
  • "count": 0,
  • "@nextLink": "string",
  • "@previousLink": "string",
  • "value": [
    ]
}

Attachment

attachment

Create a new user attachment

Create a user attachment

This operation requires

  • valid Authorization specified in request header
  • Authorization have super user permission or
    • userId inside Authorization equals the userId in path
Authorizations:
Authorization
Request Body schema: application/json

attachment data

Array
objectId
string non-empty

objectId in storage

type
string non-empty

type of the attachment

ownerId
string non-empty

owner of the attachment

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "id": "string",
  • "ownerId": "string",
  • "ownerType": "string",
  • "type": "string",
}

Get a list of user attachments

Get list of user attachments

This operation requires

  • valid Authorization specified in request header
  • Authorization have super user permission or
    • userId inside Authorization belongs to the user
Authorizations:
Authorization
query Parameters
$filter
string

Return only items which matches to a condition (The operators below are listed in order of precedence from highest to lowest).

Operator Description Example
( ) Precedence grouping (items.quantity eq 1 or items.productName eq 'T-Shirt') and totalPrice gt 100
not Logical negation not totalPrice le 3.5
gt Greater than totalPrice gt 20
ge Greater than or equal totalPrice ge 10
lt Less than totalPrice lt 20
le Less than or equal totalPrice le 100
eq Equal customer.userId eq '01234567890123456789ab'
ne Not equal status ne 'CANCELED'
and Logical and totalPrice le 200 and totalPrice gt 3.5
or Logical or totalPrice le 3.5 or totalPrice gt 200
$orderBy
string

Return sorted items based on property values. It can contains a comma-separated list of expressions. The expression may include the suffix "asc" for ascending or "desc" for descending, separated from the property name by one or more spaces. If "asc" or "desc" is not specified, the service MUST order by the specified property in ascending order. The sort order is the inherent order for the type of the property.

Examples:

Return all orders sorted by closedAt in descending order and a secondary sort order of updatedAt in ascending order.

$top
integer

number of object want to fetch

$skip
integer

number of object want to skip

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get a specific user attachment

Get an user attachment

This operation requires

  • valid Authorization specified in request header
  • Authorization have super user permission or
    • userId inside Authorization matches the userId in path
Authorizations:
Authorization
path Parameters
userId
required
string

The ID of the user

attachmentId
required
string

The ID of the attachment

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "ownerId": "string",
  • "ownerType": "string",
  • "type": "string",
}

Delete a specific user attachment

Delete an user attachment

This operation requires

  • valid Authorization specified in request header
  • Authorization have super user permission or
    • userId inside Authorization matches the userId in path
Authorizations:
Authorization
path Parameters
userId
required
string

The ID of the user

attachmentId
required
string

The ID of the attachment

Responses

Response samples

Content type
application/json
{
  • "code": "string",
  • "message": "string",
  • "target": "string",
  • "details": [
    ],
  • "innererror": {
    }
}

Create a signed upload url for user to upload the attachment

Create signed url for user to upload the attachment

This operation requires

  • valid Authorization specified in request header
  • Authorization have super user permission or
    • userId inside Authorization equals the userId in path
Authorizations:
Authorization

Responses

Response samples

Content type
application/json
null