XM

Users - Test Page

/user/local

post:

summary: 'Create new user'
operationId: 'create-user'
parameters:
- name: 'x-site-context'
in: 'header'
description: 'Represents single or multi-tenancy. For single-tenant clients, only the date and channel are mandatory attributes in the x-site-context.'
required: true
schema:
$ref: '#/components/schemas/site-context'
requestBody:
description: 'Specify the user details to create an account.'
content:
application/json:
schema:
$ref: '#/components/schemas/create-user'
required: true
responses:
'200':
description: 'OK'
content:
application/json:
schema:
$ref: '#/components/schemas/login-user-details'
'406':
description: 'Not Acceptable'

/auth/local/login

post:

summary: 'Login as local user'
operationId: 'user-login'
parameters:
- name: 'x-site-context'
in: 'header'
description: 'Represents single or multi-tenancy. For single-tenant clients, only the date and channel are mandatory attributes in the x-site-context.'
required: true
schema:
$ref: '#/components/schemas/site-context'
requestBody:
description: 'Specify the login credentials.'
content:
application/json:
schema:
$ref: '#/components/schemas/credentials'
required: true
responses:
'200':
description: 'OK'
content:
application/json:
schema:
$ref: '#/components/schemas/login-user-details'
'400':
description: 'Bad Request'

/auth/local/refresh

post:

summary: 'Refresh user token'
operationId: 'refresh-token'
parameters:
- name: 'x-site-context'
in: 'header'
description: 'Represents single or multi-tenancy. For single-tenant clients, only the date and channel are mandatory attributes in the x-site-context.'
required: true
schema:
$ref: '#/components/schemas/site-context'
requestBody:
description: 'Specify the refresh token'
content:
application/json:
schema:
$ref: '#/components/schemas/refresh-token'
required: true
responses:
'200':
description: 'OK'
content:
application/json:
schema:
$ref: '#/components/schemas/login-user-details'
'400':
description: 'Bad Request'

/user/{userId}

get:

summary: 'Retrieve user details'
operationId: 'get-user'
parameters:
- name: 'x-site-context'
in: 'header'
description: 'Represents single or multi-tenancy. For single-tenant clients, only the date and channel are mandatory attributes in the x-site-context.'
required: true
schema:
$ref: '#/components/schemas/site-context'
- name: 'Security'
in: 'header'
description: 'Specify the JWT Authorization code.'
required: true
schema:
$ref: '#/components/schemas/JWT'
- name: 'userId'
in: path
description: 'Specify the system-generated user ID.'
required: true
schema:
type: string
responses:
'200':
description: 'OK'
content:
application/json:
schema:
$ref: '#/components/schemas/user-details'
'403':
description: 'Forbidden'

patch:

summary: 'Update user details'
operationId: 'update-user'
parameters:
- name: 'Security'
in: 'header'
description: 'Specify the JWT Authorization code.'
required: true
schema:
$ref: '#/components/schemas/JWT'
- name: 'x-site-context'
in: 'header'
description: 'Represents single or multi-tenancy. For single-tenant clients, only the date and channel are mandatory attributes in the x-site-context.'
required: true
schema:
$ref: '#/components/schemas/site-context'
- name: 'userId'
in: path
description: 'Specify the user ID.'
required: true
schema:
type: string
requestBody:
description: 'Specify the user details to be updated.'
content:
application/json:
schema:
$ref: '#/components/schemas/update-username'
responses:
'200':
description: 'OK'
content:
application/json:
schema:
$ref: '#/components/schemas/user-details'
'404':
description: 'User Not Found'

/user/{userId}/username

patch:

summary: 'Update username'
operationId: 'update-username'
parameters:
- name: 'Security'
in: 'header'
description: 'Specify the JWT Authorization code.'
required: true
schema:
$ref: '#/components/schemas/JWT'
- name: 'x-site-context'
in: 'header'
description: 'Represents single or multi-tenancy. For single-tenant clients, only the date and channel are mandatory attributes in the x-site-context.'
required: true
schema:
$ref: '#/components/schemas/site-context'
- name: 'userId'
in: path
description: 'Specify the system-generated user ID.'
required: true
schema:
type: string
requestBody:
description: 'Specify the old and the new email addresses.'
content:
application/json:
schema:
$ref: '#/components/schemas/update-username'
required: true
responses:
200:
description: 'OK'
content:
application/json:
schema:
$ref: '#/components/schemas/user-details'
404:
description: 'Not Found'

/auth/local/reset/token

patch:

summary: 'Reset password'
operationId: 'reset-password'
parameters:
- name: 'Security'
in: 'header'
description: 'Specify the JWT Authorization code.'
required: true
schema:
$ref: '#/components/schemas/JWT'
- name: 'x-site-context'
in: 'header'
description: 'Represents single or multi-tenancy. For single-tenant clients, only the date and channel are mandatory attributes in the x-site-context.'
required: true
schema:
$ref: '#/components/schemas/site-context'
requestBody:
description: 'Specify the user name.'
content:
application/json:
schema:
$ref: '#/components/schemas/reset-password'
required: true
responses:
'200':
description: 'OK'
content:
application/json:
schema:
$ref: '#/components/schemas/reset-password-details'
'404':
description: 'Not Found'

/auth/token/{resetToken}

get:

summary: 'Verify reset token'
operationId: 'verify-reset-token'
parameters:
- name: 'x-site-context'
in: 'header'
description: 'Represents single or multi-tenancy. For single-tenant clients, only the date and channel are mandatory attributes in the x-site-context.'
required: true
schema:
$ref: '#/components/schemas/site-context'
- name: 'x-api-key'
in: 'header'
description: 'Specify the x-api-key.'
required: true
schema:
type: string
- name: 'resetToken'
in: path
description: 'Specify the reset token.'
required: true
schema:
type: string
responses:
'200':
description: 'OK'
content:
application/json:
schema:
$ref: '#/components/schemas/verify-reset-token'
'404':
description: 'User Not Found'

/auth/password

patch:

summary: 'Update password'
operationId: 'update-password'
parameters:
- name: 'x-site-context'
in: 'header'
description: 'Represents single or multi-tenancy. For single-tenant clients, only the date and channel are mandatory attributes in the x-site-context.'
required: true
schema:
$ref: '#/components/schemas/site-context'
requestBody:
description: 'Specify the updated password.'
content:
application/json:
schema:
$ref: '#/components/schemas/update-password'
required: true
responses:
200:
description: 'OK'
content:
application/json:
schema:
$ref: '#/components/schemas/user-details'
404:
description: 'Not Found'

/auth/change-password

patch:

summary: 'Change password of logged in user'
operationId: 'change-password'
parameters:
- name: 'Security'
in: 'header'
description: 'Specify the JWT Authorization code.'
required: true
schema:
$ref: '#/components/schemas/JWT'
- name: 'x-site-context'
in: 'header'
description: 'Represents single or multi-tenancy. For single-tenant clients, only the date and channel are mandatory attributes in the x-site-context.'
required: true
schema:
$ref: '#/components/schemas/site-context'
requestBody:
description: 'Specify the new and old passwords, along with the user ID.'
content:
application/json:
schema:
$ref: '#/components/schemas/change-password'
required: true
responses:
'200':
description: 'OK'
content:
application/json:
schema:
$ref: '#/components/schemas/user-details'
'400':
description: 'Bad Request. The password entered is incorrect.'
'404':
description: 'User not found.'

/user/{userId}/address

post:

summary: 'Create Address'
operationId: 'create-address'
parameters:
- name: 'Security'
in: 'header'
description: 'Specify the JWT Authorization code.'
required: true
schema:
$ref: '#/components/schemas/JWT'
- name: 'x-site-context'
in: 'header'
description: 'Represents single or multi-tenancy. For single-tenant clients, only the date and channel are mandatory attributes in the x-site-context.'
required: true
schema:
$ref: '#/components/schemas/site-context'
- name: 'userId'
in: path
description: 'Specify the user ID.'
required: true
schema:
type: string
requestBody:
description: 'Specify the address.'
content:
application/json:
schema:
$ref: '#/components/schemas/address'
required: true
responses:
'200':
description: 'OK'
content:
application/json:
schema:
$ref: '#/components/schemas/user-details'
'404':
description: 'Not Found'

/user/{userId}/address/

get:

summary: 'Retrive all addresses of the user.'
operationId: 'retrieve-all-addresses'
parameters:
- name: 'Security'
in: 'header'
description: 'Specify the JWT Authorization code.'
required: true
schema:
$ref: '#/components/schemas/JWT'
- name: 'x-site-context'
in: 'header'
description: 'Represents single or multi-tenancy. For single-tenant clients, only the date and channel are mandatory attributes in the x-site-context.'
required: true
schema:
$ref: '#/components/schemas/site-context'
- name: 'userId'
in: path
description: 'Specify the user ID.'
required: true
schema:
type: string
responses:
'200':
description: 'OK'
content:
application/json:
schema:
$ref: '#/components/schemas/address-list'
'404':
description: 'Not Found'

/user/{userId}/address{addressId}

patch:

summary: 'Update address'
operationId: 'update-address'
parameters:
- name: 'Security'
in: 'header'
description: 'Specify the JWT Authorization code.'
required: true
schema:
$ref: '#/components/schemas/JWT'
- name: 'x-site-context'
in: 'header'
description: 'Represents single or multi-tenancy. For single-tenant clients, only the date and channel are mandatory attributes in the x-site-context.'
required: true
schema:
$ref: '#/components/schemas/site-context'
- name: 'userId'
in: path
description: 'Specify the user ID.'
required: true
schema:
type: string
- name: 'addressId'
in: path
description: 'Specify the address ID.'
required: true
schema:
type: string
requestBody:
description: 'Specify the new address to be created.'
content:
application/json:
schema:
$ref: '#/components/schemas/address'
required: true
responses:
'200':
description: 'OK'
content:
application/json:
schema:
$ref: '#/components/schemas/user-details'
'404':
description: 'User/Address not found.'

delete:

summary: 'Delete address'
operationId: 'delete-address'
parameters:
- name: 'Security'
in: 'header'
description: 'Specify the JWT Authorization code.'
required: true
schema:
$ref: '#/components/schemas/JWT'
- name: 'x-site-context'
in: 'header'
description: 'Represents single or multi-tenancy. For single-tenant clients, only the date and channel are mandatory attributes in the x-site-context.'
required: true
schema:
$ref: '#/components/schemas/site-context'
- name: 'userId'
in: path
description: 'Specify the user ID.'
required: true
schema:
type: string
- name: 'addressId'
in: path
description: 'Specify the address ID.'
required: true
schema:
type: string
responses:
'200':
description: 'OK'
content:
application/json:
schema:
$ref: '#/components/schemas/user-details'

get:

summary: 'Retrieve the specified user address'
operationId: 'get-address'
parameters:
- name: 'Security'
in: 'header'
description: 'Specify the JWT Authorization code.'
required: true
schema:
$ref: '#/components/schemas/JWT'
- name: 'x-site-context'
in: 'header'
description: 'Represents single or multi-tenancy. For single-tenant clients, only the date and channel are mandatory attributes in the x-site-context.'
required: true
schema:
$ref: '#/components/schemas/site-context'
- name: 'userId'
in: path
description: 'Specify the user ID.'
required: true
schema:
type: string
- name: 'addressId'
in: path
description: 'Specify the address ID.'
required: true
schema:
type: string
responses:
'200':
description: 'OK'
content:
application/json:
schema:
$ref: '#/components/schemas/user-info'
'404':
description: 'User/Address not found.'

/user/{userId}/address?kind=Billing

get:

summary: 'Retrieve address based on the address type.'
operationId: 'get-address-by-kind'
parameters:
- name: 'Security'
in: 'header'
description: 'Specify the JWT Authorization code.'
required: true
schema:
$ref: '#/components/schemas/JWT'
- name: 'x-site-context'
in: 'header'
description: 'Represents single or multi-tenancy. For single-tenant clients, only the date and channel are mandatory attributes in the x-site-context.'
required: true
schema:
$ref: '#/components/schemas/site-context'
- name: 'userId'
in: path
description: 'Specify the user ID.'
required: true
schema:
type: string
- name: 'kind'
in: query
description: 'Specify the address kind such as billing or shipping.'
required: true
schema:
type: string
responses:
'200':
description: 'OK'
content:
application/json:
schema:
$ref: '#/components/schemas/address-list'
'404':
description: 'User/Address not found.'

/user/{userId}/address/{addressId}/set

post:

summary: 'Set default address'
operationId: set-default-address
parameters:
- name: 'Security'
in: 'header'
description: 'Specify the JWT Authorization code.'
required: true
schema:
$ref: '#/components/schemas/JWT'
- name: 'x-site-context'
in: 'header'
description: 'Represents single or multi-tenancy. For single-tenant clients, only the date and channel are mandatory attributes in the x-site-context.'
required: true
schema:
$ref: '#/components/schemas/site-context'
- name: 'userId'
in: path
description: 'Specify the user and address IDs in the path.'
required: true
schema:
type: string
- name: 'addressId'
in: path
description: 'Specify the address ID in the path.'
required: true
schema:
type: string
responses:
200:
description: 'OK'
content:
application/json:
schema:
$ref: '#/components/schemas/user-details'
404:
description: 'Address not found.'

/user/{userId}/address/unset

post:

summary: 'Unset default address'
operationId: 'unset-default-address'
parameters:
- name: 'Security'
in: 'header'
description: 'Specify the JWT Authorization code.'
required: true
schema:
$ref: '#/components/schemas/JWT'
- name: 'x-site-context'
in: 'header'
description: 'Represents single or multi-tenancy. For single-tenant clients, only the date and channel are mandatory attributes in the x-site-context.'
required: true
schema:
$ref: '#/components/schemas/site-context'
- name: 'userId'
in: path
description: 'Specify the user ID in the path.'
required: true
schema:
type: string
responses:
200:
description: 'OK'
content:
application/json:
schema:
$ref: '#/components/schemas/user-details'
404:
description: 'User/Address Not Found.'

Components

Schemas

JWT

type: 'object'
properties:
type:
description: "The type of security."
type: string
example: "Authorization key"
description:
description: "The authorization token to be passed in the header."
type: string
name:
description: "The name of the security."
type: string
example: 'Authorization'
in:
description: "Represents the header parameter."
type: string
example: 'header'

site-context

type: 'object'
required:
- 'channel'
- 'date'
- 'account'
- 'stage'
properties:
date:
description: 'The localized date.'
type: string
example: '2020-08-28T02:35:27.787Z'
channel:
description: 'The sales channel.'
type: number
example: 12
account:
description: 'The 24 character alpha-numeric identifier. This attribute is not mandatory for a single-tenant client.'
type: string
example: '5f493c9f30ec2a0007a94fc8'
stage:
description: 'The environment stage shared with the client during onboarding. This attribute is not mandatory for a single-tenant client.'
type: string
example: 'develop'

create-user

type: object
properties:
user:
description: 'The user (customer) details.'
$ref: '#/components/schemas/user'

user

type: 'object'
properties:
name:
description: 'The name of the user (customer).'
$ref: '#/components/schemas/name'
phone:
description: 'The phone number of the user.'
type: array
items:
$ref: '#/components/schemas/phone'
email:
description: 'The email address of the user.'
type: string
example: '[email protected]'
extra:
description: 'The date of birth of the user.'
$ref: '#/components/schemas/extra'
provider:
description: 'Authentication provider to be used. Default to LOCAL'
$ref: '#/components/schemas/credentials'

login-user-details

type: object
properties:
_id:
description: "The system-generated user ID."
type: string
example: '5e97947d3cb8553c0e43d87f'
userId:
description: 'The ID of the user.'
type: 'string'
example: 90
roles:
description: 'The roles ID assigned to the customer. This is applicable in the response of POST /auth/local/login endpoint.'
type: array
items:
$ref: '#/components/schemas/roles'
name:
description: 'The name of the user.'
$ref: '#/components/schemas/name'
accessToken:
description: "The JWT access token to authorize the user."
type: string
example: 'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVlOTc5NDdkM2NiODU1M2MwZTQzZDg3ZiIsInJvbGVzIjpbeyJpZCI6IjVkZTE2NDZmOGM2MzUyMDkxZDk0NGYxYyJ9XSwiaWF0IjoxNTg2OTkyMjUzLCJleHAiOjE1ODY5OTQwNTN9'
refreshToken:
description: "The JTW refresh token to extend the user session, seemlessly."
type: string
example: 'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVlOTc5NDdkM2NiODU1M2MwZTQzZDg3ZiIsInJvbGVzIjpbeyJpZCI6IjVkZTE2NDZmOGM2MzUyMDkxZDk0NGYxYyJ9XSwiaWF0IjoxNTg3MDExMjg5LCJleHAiOjE1ODcwMTMwODl9.GM0t3TOsHL7HAOwBY8LaC1mnp79e6E_XV8rd4pT0mC2hlHoPHgLfgfj5x7qMzQzuD9MirgiV5Wtfmf9LkZw400'

login-user

type: object
properties:
_id:
description: 'The system-generated user ID of the customer that is used for API calls.'
type: string
userId:
description: 'A unique user ID of the customer. This is applicable in the response of POST /auth/local/login endpoint.'
type: 'integer'
example: 90
roles:
description: 'The roles ID assigned to the customer.'
type: array
items:
$ref: '#/components/schemas/roles'
name:
description: 'The name of the user.'
$ref: '#/components/schemas/name'
accessToken:
description: 'JWT accesToken to be used for authorization.'
type: string
refreshToken:
description: 'JWT refreshToken tp keep the session alive.'
$ref: '#/components/schemas/refresh-token'

user-details

type: object
properties:
_id:
description: 'The system-generated user ID.'
type: string
example: '5e97947d3cb8553c0e43d87f'
name:
description: 'The name of the customer.'
$ref: '#/components/schemas/name'
phone:
description: 'The phone number of the customer.'
type: array
items:
$ref: '#/components/schemas/phone'
email:
description: 'The email address of the user.'
type: string
example: '[email protected]'
extra:
description: 'The date of birth of the user.'
$ref: '#/components/schemas/extra'
provider:
description: 'The login credentials.'
type: array
items:
$ref: '#/components/schemas/provider'
isActive:
description: 'True indicates the user account is active and false indicates otherwise.'
$ref: '#/components/schemas/isActive'
registrationDate:
description: 'The customer registration date.'
example: '2020-04-15T22:34:22.429Z'
type: string
expiryDate:
description: 'The expiry date of the customer registration.'
example: '2070-04-15T22:34:22.429Z'
type: string
registrationSite:
description: 'The site of user signup.'
example: 'abcde.com'
type: string
roles:
description: 'The roles ID assigned to the user. This is applicable in the response of POST /auth/local/login endpoint.'
example: ['5de1646f8c6352091d944f1c']
type: array
items:
type: string
account:
description: 'The account corresponding to the signed-up user.'
type: 'string'
example: '5e97947d3cb8553c0e43d87e'
userId:
description: 'The ID of the user.'
type: 'string'
example: 90
address:
description: 'The address of the user. This attribute displays blank array when there is no address added to the account or the address is deleted throught the DELETE /user/{userId}/address{addressId}.'
type: array
items:
$ref: '#/components/schemas/address'
createdAt:
description: 'The timestamp of creation.'
type: string
example: '2020-04-15T23:10:53.773Z'
updatedAt:
description: 'The time stamp of update.'
type: string
example: '2020-04-16T04:28:33.560Z'
__v:
description: 'The internal version of the document/record.'
type: 'string'
example: 0

user-info

type: object
properties:
_id:
description: 'The system-generated user ID.'
type: string
example: '5e97947d3cb8553c0e43d87f'
address:
description: 'The name of the customer.'
type: array
items:
$ref: '#/components/schemas/address-list'

name

type: object
properties:
first:
description: 'The first name of the user.'
type: string
example: 'John'
middle:
description: 'The middle name of the user.'
type: string
example: 'M'
last:
description: 'The last name of the user.'
type: string
example: 'demo'

phone

type: object
properties:
number:
type: string
example: '123456789'
description: 'The phone number of the user.'
countryCode:
type: string
example: '+1'
description: 'The country-code of the phone number.'
extension:
type: string
example: '1234'
description: 'The extension number to reach the user. Applicable for landline numbers.'
kind:
type: string
example: 'mobile'
description: 'The type of contact number such as mobile or land line.'
_id:
description: 'Internal database id of the record'
type: string
example: '5e97947d3cb8553c0e43d880'
id:
description: 'Internal database ID of the record.'
type: string
example: '5e97947d3cb8553c0e43d880'

credentials

type: object
properties:
username:
description: 'The username of the account.'
type: string
example: '[email protected]'
password:
description: 'The account password.'
type: string
example: 'ExamplePassword123!'
description: 'User credentials to login to the site.'

provider

type: object
properties:
registrationDate:
description: 'Date of registration'
type: string
example: '2020-04-15T22:34:22.429Z'
isActive:
description: 'True represents the account is active and false represents account is inactive.'
type: boolean
_id:
description: 'The system-generated ID of the provider.'
type: string
example: '5e97947d3cb8553c0e43d881'
name:
description: 'Name of Authentication provider. Eg: Local, Auth0 etc.'
type: string
example: 'Local'
lastLoginDate:
description: 'The last login date to the account.'
type: string
example: '2020-04-16T04:28:33.560Z'
id:
description: 'The internal database ID of the record.'
type: string
example: '5e97947d3cb8553c0e43d881'

update-username:

type: object
properties:
oldUserName:
type: string
example: '[email protected]'
description: 'The previous user name.'
newUsername:
description: 'The new user name.'
type: string
example: '[email protected]'

reset-password:

type: object
properties:
userName:
description: 'The registered username.'
type: string
example: '[email protected]'

reset-password-details:

type: object
properties:
name:
description: 'The name of the user.'
type: string
example: 'john smith'
resetLink:
description: 'The reset link sent to the users registered email address.'
type: 'string'
example: 'http://localhost:3000/resetpassword/5e97e4873cb8553c0e43d88e'
email:
description: 'The email address of the user.'
type: string
example: '[email protected]'
emailSent:
description: 'True indicates the link to reset password is sent to the email address of the user and false indicates otherwise.'
type: boolean

verify-reset-token:

type: object
properties:
tokenValid:
description: 'True indicates the token is valid and false indicates otherwise.'
type: boolean
userId:
description: 'The system-generated user ID.'
type: string
example: '5e97947d3cb8553c0e43d87f'

isActive:

type: 'object'
properties:
status:
description: 'True indicates the account is active and false indicates otherwise.'
type: boolean

update-password:

type: 'object'
properties:
resetToken:
description: 'The reset token.'
type: string
example: '[email protected]'
userId:
description: 'The system-generated user ID.'
type: string
example: '5e97947d3cb8553c0e43d87f'
newPassword:
description: 'The new password for the account.'
type: string
example: 'Password12345!'

address:

type: 'object'
properties:
_id:
description: 'The system-generated ID of the address. This attribute is applicable in the response of the POST /user/{useId}/address and PATCH /user/{useId}/address/{addressId endpoints (not applicable in the request body).'
type: string
example: '5e98a2a13e9e9e495ed2e3b3'
id:
description: 'The internal database ID of the record. This attribute is applicable in the response of the POST /user/{useId}/address and PATCH /user/{useId}/address/{addressId} endpoints (not applicable in the request body).'
type: string
example: '5e98a2a13e9e9e495ed2e3b3'
address1:
description: 'The line address of the user.'
type: string
example: "10400 NE 4th St "
city:
description: 'The city of the specified address.'
type: string
example: 'Bellevue'
state:
description: 'The state of the specified address.'
type: string
example: 'WA'
country:
description: 'The country of the specified address.'
type: string
example: 'United States'
zipCode:
description: 'The zip code of the specified address.'
type: string
example: '98004'
kind:
description: 'The kind/type of the address.'
type: string
example: 'shipping'
name:
description: 'Name object containing firstname and lastname of the contact person with respect to the corresponding address'
$ref: '#/components/schemas/name'
isDefault:
description: "True indicates the address is set as default address and false indicates otherwise. This attribute is applicable in the response of the POST /user/{useId}/address and PATCH /user/{useId}/address/{addressId} endpoints (not applicable in the request body)."
type: boolean
example: false
isValidated:
description: "True indicates the address is validated. This attribute is applicable in the response of the POST /user/{useId}/address and PATCH /user/{useId}/address/{addressId} endpoints (not applicable in the request body)"
type: boolean
example: false
isVerfied:
description: "True indicates the address is verified. This attribute is applicable in the request of the POST /user/{useId}/address and PATCH /user/{useId}/address/{addressId} endpoints (not applicable in the response body)."
type: boolean
example: false

change-password:

type: 'object'
properties:
userId:
description: 'The system-generated user ID.'
type: string
example: '5e97947d3cb8553c0e43d87f'
oldPassword:
description: 'The old password of the account.'
type: string
example: 'Passwordxyz!'
newPassword:
description: 'The new password of the account.'
type: string
example: 'Password12345!'

refresh-token:

type: object
properties:
refreshToken:
description: 'The JWT refresh token to extend the user session.'
type: string
example: 'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVlOTc5NDdkM2NiODU1M2MwZTQzZDg3ZiIsInJvbGVzIjpbeyJpZCI6IjVkZTE2NDZmOGM2MzUyMDkxZDk0NGYxYyJ9XSwiaWF0IjoxNTg3MDExMjg5LCJleHAiOjE1ODcwMTMwODl9.GM0t3TOsHL7HAOwBY8LaC1mnp79e6E_XV8rd4pT0mC2hlHoPHgLfgfj5x7qMzQzuD9MirgiV5Wtfmf9LkZw4Bg'

roles:

type: 'object'
properties:
ID:
description: 'The system-generated role ID.'
type: string
example: '5de1646f8c6352091d944f1c'

extra:

type: 'object'
properties:
DoB:
description: 'Date of Birth of the user. This attribute not applicable in the responses of the PATCH /auth/password and PATCH /auth/change-password endpoints.'
type: string
example: '03-19-1993'
resetPassword:
description: 'The reset password request. This attribute is applicable only in the responses of the PATCH /auth/password and /auth/change-password endpoints.'
type: string
example: 'requested'

address-list:

type: 'object'
properties:
isDefault:
description: 'True indicates the address is a default one and false indicates otherwise.'
type: boolean
isValidated:
description: 'True indicates the address is validated one and false indicates otherwise.'
type: boolean
_id:
description: 'Represents the address ID.'
type: string
example: '5e98a2a13e9e9e495ed2e3b3'
address1:
description: 'The first line of the address.'
type: string
example: '10400 NE 4th St'
city:
description: 'The city of the address.'
type: string
example: 'Bellevue'
state:
description: 'The state of the address.'
type: string
example: 'WA'
country:
description: 'The country of the address.'
type: string
example: 'United States'
zipCode:
description: 'The zip code of the address.'
type: string
example: '98004'
kind:
description: 'The type of address.'
type: string
example: 'Billing'
name:
description: 'The name of the user.'
$ref: '#/components/schemas/name'
address2:
description: 'The second address of the user. This attribute is not applicable in the response of PATCH /user/{userId}/address/{addressId}/set.'
type: string
example: 'null'
attention:
description: 'The name of the person who needs to be notified or whose attention is required when the corresponding address is to be used for billing or shipping.'
type: string
example: 'Joe Demo'
company:
description: 'The company name, if the address is a business address'
type: string
example: 'XYZ Inc.'
email:
description: 'The email address of the user.'
type: string
example: '[email protected]'
phone:
description: 'The phone number to contact.'
type: string
example: '123456789'
id:
description: 'Internal database ID for the corresponding address.'
type: string
example: '5e98a2a13e9e9e495ed2e3b3'
YAML
YAML
openapi: 3.0.0
info:
version: 1.0.0
title: "API Interface to Fabric e-commerce business layer"
description: "Fabric e-commerce API interface to build storefronts."
contact:
url: "https://fabric.inc"
license:
name: Apache 2.0
url: 'http://www.apache.org/licenses/LICENSE-2.0.html'
servers:
- url: http://example.com
variables: {}
basePath: "/api-commerceIdentity"
tags:
- name: "Fabric's Users resource plays a vital role in ensuring an unparalleled user experience."
paths:
/user/local:
post:
summary: 'Create new user'
operationId: 'create-user'
parameters:
- name: 'x-site-context'
in: 'header'
description: 'Represents single or multi-tenancy. For single-tenant clients, only the date and channel are mandatory attributes in the x-site-context.'
required: true
schema:
$ref: '#/components/schemas/site-context'
requestBody:
description: 'Specify the user details to create an account.'
content:
application/json:
schema:
$ref: '#/components/schemas/create-user'
required: true
responses:
'200':
description: 'OK'
content:
application/json:
schema:
$ref: '#/components/schemas/login-user-details'
'406':
description: 'Not Acceptable'
/auth/local/login:
post:
summary: 'Login as local user'
operationId: 'user-login'
parameters:
- name: 'x-site-context'
in: 'header'
description: 'Represents single or multi-tenancy. For single-tenant clients, only the date and channel are mandatory attributes in the x-site-context.'
required: true
schema:
$ref: '#/components/schemas/site-context'
requestBody:
description: 'Specify the login credentials.'
content:
application/json:
schema:
$ref: '#/components/schemas/credentials'
required: true
responses:
'200':
description: 'OK'
content:
application/json:
schema:
$ref: '#/components/schemas/login-user-details'
'400':
description: 'Bad Request'
/auth/local/refresh:
post:
summary: 'Refresh user token'
operationId: 'refresh-token'
parameters:
- name: 'x-site-context'
in: 'header'
description: 'Represents single or multi-tenancy. For single-tenant clients, only the date and channel are mandatory attributes in the x-site-context.'
required: true
schema:
$ref: '#/components/schemas/site-context'
requestBody:
description: 'Specify the refresh token'
content:
application/json:
schema:
$ref: '#/components/schemas/refresh-token'
required: true
responses:
'200':
description: 'OK'
content:
application/json:
schema:
$ref: '#/components/schemas/login-user-details'
'400':
description: 'Bad Request'
/user/{userId}:
get:
summary: 'Retrieve user details'
operationId: 'get-user'
parameters:
- name: 'x-site-context'
in: 'header'
description: 'Represents single or multi-tenancy. For single-tenant clients, only the date and channel are mandatory attributes in the x-site-context.'
required: true
schema:
$ref: '#/components/schemas/site-context'
- name: 'Security'
in: 'header'
description: 'Specify the JWT Authorization code.'
required: true
schema:
$ref: '#/components/schemas/JWT'
- name: 'userId'
in: path
description: 'Specify the system-generated user ID.'
required: true
schema:
type: string
responses:
'200':
description: 'OK'
content:
application/json:
schema:
$ref: '#/components/schemas/user-details'
'403':
description: 'Forbidden'
patch:
summary: 'Update user details'
operationId: 'update-user'
parameters:
- name: 'Security'
in: 'header'
description: 'Specify the JWT Authorization code.'
required: true
schema:
$ref: '#/components/schemas/JWT'
- name: 'x-site-context'
in: 'header'
description: 'Represents single or multi-tenancy. For single-tenant clients, only the date and channel are mandatory attributes in the x-site-context.'
required: true
schema:
$ref: '#/components/schemas/site-context'
- name: 'userId'
in: path
description: 'Specify the user ID.'
required: true
schema:
type: string
requestBody:
description: 'Specify the user details to be updated.'
content:
application/json:
schema:
$ref: '#/components/schemas/update-username'
responses:
'200':
description: 'OK'
content:
application/json:
schema:
$ref: '#/components/schemas/user-details'
'404':
description: 'User Not Found'
/user/{userId}/username:
patch:
summary: 'Update username'
operationId: 'update-username'
parameters:
- name: 'Security'
in: 'header'
description: 'Specify the JWT Authorization code.'
required: true
schema:
$ref: '#/components/schemas/JWT'
- name: 'x-site-context'
in: 'header'
description: 'Represents single or multi-tenancy. For single-tenant clients, only the date and channel are mandatory attributes in the x-site-context.'
required: true
schema:
$ref: '#/components/schemas/site-context'
- name: 'userId'
in: path
description: 'Specify the system-generated user ID.'
required: true
schema:
type: string
requestBody:
description: 'Specify the old and the new email addresses.'
content:
application/json:
schema:
$ref: '#/components/schemas/update-username'
required: true
responses:
200:
description: 'OK'
content:
application/json:
schema:
$ref: '#/components/schemas/user-details'
404:
description: 'Not Found'
/auth/local/reset/token:
patch:
summary: 'Reset password'
operationId: 'reset-password'
parameters:
- name: 'Security'
in: 'header'
description: 'Specify the JWT Authorization code.'
required: true
schema:
$ref: '#/components/schemas/JWT'
- name: 'x-site-context'
in: 'header'
description: 'Represents single or multi-tenancy. For single-tenant clients, only the date and channel are mandatory attributes in the x-site-context.'
required: true
schema:
$ref: '#/components/schemas/site-context'
requestBody:
description: 'Specify the user name.'
content:
application/json:
schema:
$ref: '#/components/schemas/reset-password'
required: true
responses:
'200':
description: 'OK'
content:
application/json:
schema:
$ref: '#/components/schemas/reset-password-details'
'404':
description: 'Not Found'
/auth/token/{resetToken}:
get:
summary: 'Verify reset token'
operationId: 'verify-reset-token'
parameters:
- name: 'x-site-context'
in: 'header'
description: 'Represents single or multi-tenancy. For single-tenant clients, only the date and channel are mandatory attributes in the x-site-context.'
required: true
schema:
$ref: '#/components/schemas/site-context'
- name: 'x-api-key'
in: 'header'
description: 'Specify the x-api-key.'
required: true
schema:
type: string
- name: 'resetToken'
in: path
description: 'Specify the reset token.'
required: true
schema:
type: string
responses:
'200':
description: 'OK'
content:
application/json:
schema:
$ref: '#/components/schemas/verify-reset-token'
'404':
description: 'User Not Found'
/auth/password:
patch:
summary: 'Update password'
operationId: 'update-password'
parameters:
- name: 'x-site-context'
in: 'header'
description: 'Represents single or multi-tenancy. For single-tenant clients, only the date and channel are mandatory attributes in the x-site-context.'
required: true
schema:
$ref: '#/components/schemas/site-context'
requestBody:
description: 'Specify the updated password.'
content:
application/json:
schema:
$ref: '#/components/schemas/update-password'
required: true
responses:
200:
description: 'OK'
content:
application/json:
schema:
$ref: '#/components/schemas/user-details'
404:
description: 'Not Found'
/auth/change-password:
patch:
summary: 'Change password of logged in user'
operationId: 'change-password'
parameters:
- name: 'Security'
in: 'header'
description: 'Specify the JWT Authorization code.'
required: true
schema:
$ref: '#/components/schemas/JWT'
- name: 'x-site-context'
in: 'header'
description: 'Represents single or multi-tenancy. For single-tenant clients, only the date and channel are mandatory attributes in the x-site-context.'
required: true
schema:
$ref: '#/components/schemas/site-context'
requestBody:
description: 'Specify the new and old passwords, along with the user ID.'
content:
application/json:
schema:
$ref: '#/components/schemas/change-password'
required: true
responses:
'200':
description: 'OK'
content:
application/json:
schema:
$ref: '#/components/schemas/user-details'
'400':
description: 'Bad Request. The password entered is incorrect.'
'404':
description: 'User not found.'
/user/{userId}/address:
post:
summary: 'Create Address'
operationId: 'create-address'
parameters:
- name: 'Security'
in: 'header'
description: 'Specify the JWT Authorization code.'
required: true
schema:
$ref: '#/components/schemas/JWT'
- name: 'x-site-context'
in: 'header'
description: 'Represents single or multi-tenancy. For single-tenant clients, only the date and channel are mandatory attributes in the x-site-context.'
required: true
schema:
$ref: '#/components/schemas/site-context'
- name: 'userId'
in: path
description: 'Specify the user ID.'
required: true
schema:
type: string
requestBody:
description: 'Specify the address.'
content:
application/json:
schema:
$ref: '#/components/schemas/address'
required: true
responses:
'200':
description: 'OK'
content:
application/json:
schema:
$ref: '#/components/schemas/user-details'
'404':
description: 'Not Found'
/user/{userId}/address/:
get:
summary: 'Retrive all addresses of the user.'
operationId: 'retrieve-all-addresses'
parameters:
- name: 'Security'
in: 'header'
description: 'Specify the JWT Authorization code.'
required: true
schema:
$ref: '#/components/schemas/JWT'
- name: 'x-site-context'
in: 'header'
description: 'Represents single or multi-tenancy. For single-tenant clients, only the date and channel are mandatory attributes in the x-site-context.'
required: true
schema:
$ref: '#/components/schemas/site-context'
- name: 'userId'
in: path
description: 'Specify the user ID.'
required: true
schema:
type: string
responses:
'200':
description: 'OK'
content:
application/json:
schema:
$ref: '#/components/schemas/address-list'
'404':
description: 'Not Found'
/user/{userId}/address{addressId}:
patch:
summary: 'Update address'
operationId: 'update-address'
parameters:
- name: 'Security'
in: 'header'
description: 'Specify the JWT Authorization code.'
required: true
schema:
$ref: '#/components/schemas/JWT'
- name: 'x-site-context'
in: 'header'
description: 'Represents single or multi-tenancy. For single-tenant clients, only the date and channel are mandatory attributes in the x-site-context.'
required: true
schema:
$ref: '#/components/schemas/site-context'
- name: 'userId'
in: path
description: 'Specify the user ID.'
required: true
schema:
type: string
- name: 'addressId'
in: path
description: 'Specify the address ID.'
required: true
schema:
type: string
requestBody:
description: 'Specify the new address to be created.'
content:
application/json:
schema:
$ref: '#/components/schemas/address'
required: true
responses:
'200':
description: 'OK'
content:
application/json:
schema:
$ref: '#/components/schemas/user-details'
'404':
description: 'User/Address not found.'
delete:
summary: 'Delete address'
operationId: 'delete-address'
parameters:
- name: 'Security'
in: 'header'
description: 'Specify the JWT Authorization code.'
required: true
schema:
$ref: '#/components/schemas/JWT'
- name: 'x-site-context'
in: 'header'
description: 'Represents single or multi-tenancy. For single-tenant clients, only the date and channel are mandatory attributes in the x-site-context.'
required: true
schema:
$ref: '#/components/schemas/site-context'
- name: 'userId'
in: path
description: 'Specify the user ID.'
required: true
schema:
type: string
- name: 'addressId'
in: path
description: 'Specify the address ID.'
required: true
schema:
type: string
responses:
'200':
description: 'OK'
content:
application/json:
schema:
$ref: '#/components/schemas/user-details'
get:
summary: 'Retrieve the specified user address'
operationId: 'get-address'
parameters:
- name: 'Security'
in: 'header'
description: 'Specify the JWT Authorization code.'
required: true
schema:
$ref: '#/components/schemas/JWT'
- name: 'x-site-context'
in: 'header'
description: 'Represents single or multi-tenancy. For single-tenant clients, only the date and channel are mandatory attributes in the x-site-context.'
required: true
schema:
$ref: '#/components/schemas/site-context'
- name: 'userId'
in: path
description: 'Specify the user ID.'
required: true
schema:
type: string
- name: 'addressId'
in: path
description: 'Specify the address ID.'
required: true
schema:
type: string
responses:
'200':
description: 'OK'
content:
application/json:
schema:
$ref: '#/components/schemas/user-info'
'404':
description: 'User/Address not found.'
/user/{userId}/address?kind=Billing:
get:
summary: 'Retrieve address based on the address type.'
operationId: 'get-address-by-kind'
parameters:
- name: 'Security'
in: 'header'
description: 'Specify the JWT Authorization code.'
required: true
schema:
$ref: '#/components/schemas/JWT'
- name: 'x-site-context'
in: 'header'
description: 'Represents single or multi-tenancy. For single-tenant clients, only the date and channel are mandatory attributes in the x-site-context.'
required: true
schema:
$ref: '#/components/schemas/site-context'
- name: 'userId'
in: path
description: 'Specify the user ID.'
required: true
schema:
type: string
- name: 'kind'
in: query
description: 'Specify the address kind such as billing or shipping.'
required: true
schema:
type: string
responses:
'200':
description: 'OK'
content:
application/json:
schema:
$ref: '#/components/schemas/address-list'
'404':
description: 'User/Address not found.'
/user/{userId}/address/{addressId}/set:
post:
summary: 'Set default address'
operationId: set-default-address
parameters:
- name: 'Security'
in: 'header'
description: 'Specify the JWT Authorization code.'
required: true
schema:
$ref: '#/components/schemas/JWT'
- name: 'x-site-context'
in: 'header'
description: 'Represents single or multi-tenancy. For single-tenant clients, only the date and channel are mandatory attributes in the x-site-context.'
required: true
schema:
$ref: '#/components/schemas/site-context'
- name: 'userId'
in: path
description: 'Specify the user and address IDs in the path.'
required: true
schema:
type: string
- name: 'addressId'
in: path
description: 'Specify the address ID in the path.'
required: true
schema:
type: string
responses:
200:
description: 'OK'
content:
application/json:
schema:
$ref: '#/components/schemas/user-details'
404:
description: 'Address not found.'
/user/{userId}/address/unset:
post:
summary: 'Unset default address'
operationId: 'unset-default-address'
parameters:
- name: 'Security'
in: 'header'
description: 'Specify the JWT Authorization code.'
required: true
schema:
$ref: '#/components/schemas/JWT'
- name: 'x-site-context'
in: 'header'
description: 'Represents single or multi-tenancy. For single-tenant clients, only the date and channel are mandatory attributes in the x-site-context.'
required: true
schema:
$ref: '#/components/schemas/site-context'
- name: 'userId'
in: path
description: 'Specify the user ID in the path.'
required: true
schema:
type: string
responses:
200:
description: 'OK'
content:
application/json:
schema:
$ref: '#/components/schemas/user-details'
404:
description: 'User/Address Not Found.'
components:
schemas:
JWT:
type: 'object'
properties:
type:
description: "The type of security."
type: string
example: "Authorization key"
description:
description: "The authorization token to be passed in the header."
type: string
name:
description: "The name of the security."
type: string
example: 'Authorization'
in:
description: "Represents the header parameter."
type: string
example: 'header'
site-context:
type: 'object'
required:
- 'channel'
- 'date'
- 'account'
- 'stage'
properties:
date:
description: 'The localized date.'
type: string
example: '2020-08-28T02:35:27.787Z'
channel:
description: 'The sales channel.'
type: number
example: 12
account:
description: 'The 24 character alpha-numeric identifier. This attribute is not mandatory for a single-tenant client.'
type: string
example: '5f493c9f30ec2a0007a94fc8'
stage:
description: 'The environment stage shared with the client during onboarding. This attribute is not mandatory for a single-tenant client.'
type: string
example: 'develop'
create-user:
type: object
properties:
user:
description: 'The user (customer) details.'
$ref: '#/components/schemas/user'
user:
type: 'object'
properties:
name:
description: 'The name of the user (customer).'
$ref: '#/components/schemas/name'
phone:
description: 'The phone number of the user.'
type: array
items:
$ref: '#/components/schemas/phone'
email:
description: 'The email address of the user.'
type: string
example: '[email protected]'
extra:
description: 'The date of birth of the user.'
$ref: '#/components/schemas/extra'
provider:
description: 'Authentication provider to be used. Default to LOCAL'
$ref: '#/components/schemas/credentials'
login-user-details:
type: object
properties:
_id:
description: "The system-generated user ID."
type: string
example: '5e97947d3cb8553c0e43d87f'
userId:
description: 'The ID of the user.'
type: 'string'
example: 90
roles:
description: 'The roles ID assigned to the customer. This is applicable in the response of POST /auth/local/login endpoint.'
type: array
items:
$ref: '#/components/schemas/roles'
name:
description: 'The name of the user.'
$ref: '#/components/schemas/name'
accessToken:
description: "The JWT access token to authorize the user."
type: string
example: 'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVlOTc5NDdkM2NiODU1M2MwZTQzZDg3ZiIsInJvbGVzIjpbeyJpZCI6IjVkZTE2NDZmOGM2MzUyMDkxZDk0NGYxYyJ9XSwiaWF0IjoxNTg2OTkyMjUzLCJleHAiOjE1ODY5OTQwNTN9'
refreshToken:
description: "The JTW refresh token to extend the user session, seemlessly."
type: string
example: 'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVlOTc5NDdkM2NiODU1M2MwZTQzZDg3ZiIsInJvbGVzIjpbeyJpZCI6IjVkZTE2NDZmOGM2MzUyMDkxZDk0NGYxYyJ9XSwiaWF0IjoxNTg3MDExMjg5LCJleHAiOjE1ODcwMTMwODl9.GM0t3TOsHL7HAOwBY8LaC1mnp79e6E_XV8rd4pT0mC2hlHoPHgLfgfj5x7qMzQzuD9MirgiV5Wtfmf9LkZw400'
login-user:
type: object
properties:
_id:
description: 'The system-generated user ID of the customer that is used for API calls.'
type: string
userId:
description: 'A unique user ID of the customer. This is applicable in the response of POST /auth/local/login endpoint.'
type: 'integer'
example: 90
roles:
description: 'The roles ID assigned to the customer.'
type: array
items:
$ref: '#/components/schemas/roles'
name:
description: 'The name of the user.'
$ref: '#/components/schemas/name'
accessToken:
description: 'JWT accesToken to be used for authorization.'
type: string
refreshToken:
description: 'JWT refreshToken tp keep the session alive.'
$ref: '#/components/schemas/refresh-token'
user-details:
type: object
properties:
_id:
description: 'The system-generated user ID.'
type: string
example: '5e97947d3cb8553c0e43d87f'
name:
description: 'The name of the customer.'
$ref: '#/components/schemas/name'
phone:
description: 'The phone number of the customer.'
type: array
items:
$ref: '#/components/schemas/phone'
email:
description: 'The email address of the user.'
type: string
example: '[email protected]'
extra:
description: 'The date of birth of the user.'
$ref: '#/components/schemas/extra'
provider:
description: 'The login credentials.'
type: array
items:
$ref: '#/components/schemas/provider'
isActive:
description: 'True indicates the user account is active and false indicates otherwise.'
$ref: '#/components/schemas/isActive'
registrationDate:
description: 'The customer registration date.'
example: '2020-04-15T22:34:22.429Z'
type: string
expiryDate:
description: 'The expiry date of the customer registration.'
example: '2070-04-15T22:34:22.429Z'
type: string
registrationSite:
description: 'The site of user signup.'
example: 'abcde.com'
type: string
roles:
description: 'The roles ID assigned to the user. This is applicable in the response of POST /auth/local/login endpoint.'
example: ['5de1646f8c6352091d944f1c']
type: array
items:
type: string
account:
description: 'The account corresponding to the signed-up user.'
type: 'string'
example: '5e97947d3cb8553c0e43d87e'
userId:
description: 'The ID of the user.'
type: 'string'
example: 90
address:
description: 'The address of the user. This attribute displays blank array when there is no address added to the account or the address is deleted throught the DELETE /user/{userId}/address{addressId}.'
type: array
items:
$ref: '#/components/schemas/address'
createdAt:
description: 'The timestamp of creation.'
type: string
example: '2020-04-15T23:10:53.773Z'
updatedAt:
description: 'The time stamp of update.'
type: string
example: '2020-04-16T04:28:33.560Z'
__v:
description: 'The internal version of the document/record.'
type: 'string'
example: 0
user-info:
type: object
properties:
_id:
description: 'The system-generated user ID.'
type: string
example: '5e97947d3cb8553c0e43d87f'
address:
description: 'The name of the customer.'
type: array
items:
$ref: '#/components/schemas/address-list'
name:
type: object
properties:
first:
description: 'The first name of the user.'
type: string
example: 'John'
middle:
description: 'The middle name of the user.'
type: string
example: 'M'
last:
description: 'The last name of the user.'
type: string
example: 'demo'
phone:
type: object
properties:
number:
type: string
example: '123456789'
description: 'The phone number of the user.'
countryCode:
type: string
example: '+1'
description: 'The country-code of the phone number.'
extension:
type: string
example: '1234'
description: 'The extension number to reach the user. Applicable for landline numbers.'
kind:
type: string
example: 'mobile'
description: 'The type of contact number such as mobile or land line.'
_id:
description: 'Internal database id of the record'
type: string
example: '5e97947d3cb8553c0e43d880'
id:
description: 'Internal database ID of the record.'
type: string
example: '5e97947d3cb8553c0e43d880'
credentials:
type: object
properties:
username:
description: 'The username of the account.'
type: string
example: '[email protected]'
password:
description: 'The account password.'
type: string
example: 'ExamplePassword123!'
description: 'User credentials to login to the site.'
provider:
type: object
properties:
registrationDate:
description: 'Date of registration'
type: string
example: '2020-04-15T22:34:22.429Z'
isActive:
description: 'True represents the account is active and false represents account is inactive.'
type: boolean
_id:
description: 'The system-generated ID of the provider.'
type: string
example: '5e97947d3cb8553c0e43d881'
name:
description: 'Name of Authentication provider. Eg: Local, Auth0 etc.'
type: string
example: 'Local'
lastLoginDate:
description: 'The last login date to the account.'
type: string
example: '2020-04-16T04:28:33.560Z'
id:
description: 'The internal database ID of the record.'
type: string
example: '5e97947d3cb8553c0e43d881'
update-username:
type: object
properties:
oldUserName:
type: string