Users

This section give's control over the system's users.
Every user is stored in the DB with an attahcment to an account.
Every user can be related to a company (group) and some actions/settings will be applied to all the user's attached to the group.
Admin logged in - can upload users file,store new users in DB,attach user to companies,get information about all the users.
User logged in - can see it's own data about his user,account and company.

get-users-list

Returnes a list of all the users rows registered from the db.

SecurityAuthorization
Request
header Parameters
Authorization
required
string

auth header for JWT

Example: <JWT token>
username
required
string

auth header for username

Example: <username>
Responses
200

Success

401

Unauthorized

403

Forbidden

get/users
Response samples
application/json
{
  • "api_message": "<string>",
  • "api_data": {
    }
}

post-user-initial-info

Insert the initial user's info.

SecurityAuthorization
Request
header Parameters
Authorization
required
string

auth header for JWT

Example: <JWT token>
username
required
string

auth header for username

Example: <username>
Request Body schema: application/json
required

raw(json)

username
string
email
string
phone
string
CID
string
Responses
200

Success

401

Unauthorized

403

Forbidden

post/users
Request samples
application/json
{
  • "username": "NewUsername1!",
  • "email": "newCustomer@gmail.com",
  • "phone": "972537589912",
  • "CID": "ANY_CID_123!"
}
Response samples
application/json
{
  • "api_message": "<string>",
  • "api_data": {
    }
}

post-user-credentials

Insert the user's credentials

SecurityAuthorization
Request
path Parameters
user_id
required
string

user_id path parameter

Example: <user_id>
header Parameters
Authorization
required
string

auth header for JWT

Example: <JWT token>
username
required
string

auth header for username

Example: <username>
Request Body schema: application/json
required

raw(json)

user_id
string
api_token
string
api_key
string
api_secret
string
provider_name
string
provider_type
string
Responses
200

Success

401

Unauthorized

403

Forbidden

422

Unprocessable Content

post/users/{user_id}/credentials
Request samples
application/json
{
  • "user_id": "Y0ZuTVFCNnl6S3pISDhMTXVYSHBwZz09",
  • "api_token": "api_token",
  • "api_key": "api_key",
  • "api_secret": "api_secret",
  • "provider_name": "provider_name",
  • "provider_type": "provider_type"
}
Response samples
application/json
{
  • "api_message": "<string>",
  • "api_data": {
    }
}

update-exact-user-credentials

Update the user's credentials with credential_id

SecurityAuthorization
Request
path Parameters
user_id
required
string

user_id path parameter

Example: <user_id>
user_credential_id
required
string

user_credential_id path parameter

Example: <user_credential_id>
header Parameters
Authorization
required
string

auth header for JWT

Example: <JWT token>
username
required
string

auth header for username

Example: <username>
Request Body schema: application/json
required

raw(json)

user_id
string
api_token
string
api_key
string
api_secret
string
provider_name
string
provider_type
string
Responses
200

Success

401

Unauthorized

403

Forbidden

422

Unprocessable Content

put/users/{user_id}/credentials/{user_credential_id}
Request samples
application/json
{
  • "user_id": "Y0ZuTVFCNnl6S3pISDhMTXVYSHBwZz09",
  • "api_token": "api_token",
  • "api_key": "api_key",
  • "api_secret": "api_secret",
  • "provider_name": "provider_name",
  • "provider_type": "provider_type"
}
Response samples
application/json
{
  • "api_message": "<string>",
  • "api_data": {
    }
}

delete-exact-user-credentials

Delete the user's credentials with credential_id

SecurityAuthorization
Request
path Parameters
user_id
required
string

user_id path parameter

Example: <user_id>
user_credential_id
required
string

user_credential_id path parameter

Example: <user_credential_id>
header Parameters
Authorization
required
string

auth header for JWT

Example: <JWT token>
username
required
string

auth header for username

Example: <username>
Responses
204

No content (Success)

401

Unauthorized

403

Forbidden

delete/users/{user_id}/credentials/{user_credential_id}
Response samples
application/json
{
  • "api_data": {
    }
}

get-logged-user-details

Returns details on the logged in user.

SecurityAuthorization
Request
header Parameters
Authorization
required
string

auth header for JWT

Example: <JWT token>
username
required
string

auth header for username

Example: <username>
Responses
200

Success

get/users/me
Response samples
application/json
{
  • "api_message": "<string>",
  • "api_data": {
    },
  • "qr_image": "<string>"
}

get-user/admin-attached-companies-list

Return a list of companies the logged in user is attached to. In case of admin - returns all the attachments

SecurityAuthorization
Request
header Parameters
Authorization
required
string

auth header for JWT

Example: <JWT token>
username
required
string

auth header for username

Example: <username>
Responses
200

Success

401

Unauthorized

403

Forbidden

get/users/listCompanies
Response samples
application/json
{
  • "api_message": "<string>",
  • "api_data": {
    }
}

get-exact-user-details

Returns details on the requested user_id

SecurityAuthorization
Request
path Parameters
user_id
required
string

user_id path parameter

Example: <user_id>
header Parameters
Authorization
required
string

auth header for JWT

Example: <JWT token>
username
required
string

auth header for username

Example: <username>
Responses
200

Success

401

Unauthorized

403

Forbidden

404

Not Found

get/users/{user_id}
Response samples
application/json
{
  • "api_message": "<string>",
  • "api_data": {
    }
}

login-as-user

Authenticate as user to perform actions on behalf of the user

SecurityAuthorization
Request
query Parameters
user_id
required
string

user_id query parameter

Example: user_id=<user_id>
otp
required
string

admin's one-time-password

Example: otp=<otp>
header Parameters
Authorization
required
string

auth header for JWT

Example: <JWT token>
username
required
string

auth header for username

Example: <username>
Responses
200

Success

401

Unauthorized

403

Forbidden

get/users/login_as
Response samples
application/json
{
  • "api_message": "<string>",
  • "api_data": true
}

get-pending-tacs-list

:Returnes a list of pending terms and conditions documents the user is requested to sign and approve

SecurityAuthorization
Request
path Parameters
user_id
required
string

user_id path parameter

Example: <user_id>
header Parameters
Authorization
required
string

auth header for JWT

Example: <JWT token>
username
required
string

auth header for username

Example: <username>
Responses
200

Success

401

Unauthorized

403

Forbidden

404

Not Found

get/users/{user_id}/awaitingTac
Response samples
application/json
{
  • "api_message": "<string>",
  • "api_data": {
    }
}

is-login-as-check

Check if the user is an admin performing on behalf of a user

SecurityAuthorization
Request
header Parameters
Authorization
required
string

auth header for JWT

Example: <JWT token>
username
required
string

auth header for username

Example: <username>
Responses
200

Success

401

Unauthorized

403

Forbidden

get/users/is_login_as
Response samples
application/json
{
  • "api_message": "<string>",
  • "api_data": {
    }
}

back-to-admin

In case logged in as user,log out and return to admin.

SecurityAuthorization
Request
header Parameters
Authorization
required
string

auth header for JWT

Example: <JWT token>
username
required
string

auth header for username

Example: <username>
Responses
200

Success

401

Unauthorized

403

Forbidden

get/users/back_to_admin
Response samples
application/json
{
  • "api_message": "<string>",
  • "api_data": true
}

get-allowed-pages-list-for-exact-user

Return a list of the allowed pages a user can see (affecting the ui)

SecurityAuthorization
Request
header Parameters
Authorization
required
string

auth header for JWT

Example: <JWT token>
username
required
string

auth header for username

Example: <username>
Responses
200

Success

401

Unauthorized

403

Forbidden

get/users/allowedPages
Response samples
application/json
{
  • "api_message": "<string>",
  • "api_data": {
    }
}

get-exact-username-info

Response contains information regarding username that you send

SecurityAuthorization
Request
path Parameters
username
required
string

username

Example: <username>
header Parameters
Authorization
required
string

auth header for JWT

Example: <JWT token>
username
required
string

auth header for username

Example: <username>
Responses
200

Success

401

Unauthorized

403

Forbidden

404

Not Found

get/users/username/{username}
Response samples
application/json
{
  • "api_message": "<string>",
  • "api_data": {
    }
}

update-exact-user-status

Update user's status

SecurityAuthorization
Request
header Parameters
Authorization
required
string

auth header for JWT

Example: <JWT token>
username
required
string

auth header for username

Example: <username>
Request Body schema: application/json
required

raw(json)

UUID
string
CID
string
status
string
Responses
200

Success

401

Unauthorized

403

Forbidden

422

Unprocessable Content

put/users/status
Request samples
application/json
{
  • "UUID": "Y0ZuTVFCNnl6S3dxNDBnaTdqc1VpUT09",
  • "CID": "ANY_CID_123",
  • "status": "BLOCK | UNBLOCK | ACTIVATE"
}
Response samples
application/json
{
  • "api_message": "<string>",
  • "api_data": {
    }
}

update-exact-user-lang

Update user language given the user_id

SecurityAuthorization
Request
path Parameters
user_id
required
string

user_id path parameter

Example: <user_id>
header Parameters
Authorization
required
string

auth header for JWT

Example: <JWT token>
username
required
string

auth header for username

Example: <username>
Responses
200

Success

401

Unauthorized

403

Forbidden

422

Unprocessable Content

put/users/{user_id}/lang
Response samples
application/json
{
  • "api_message": "<string>",
  • "api_data": true
}

update-exact-user-company

Update user company given the user_id

SecurityAuthorization
Request
path Parameters
user_id
required
string

user_id path parameter

Example: <user_id>
header Parameters
Authorization
required
string

auth header for JWT

Example: <JWT token>
username
required
string

auth header for JWT

Example: <username>
Responses
200

Success

401

Unauthorized

403

Forbidden

422

Unprocessable Content

put/users/{user_id}/company
Response samples
application/json
{
  • "api_message": "<string>",
  • "api_data": true
}

approve-exact-tac-for-exact-user

Approve a terms and conditions document for user_id and tac_id

SecurityAuthorization
Request
path Parameters
user_id
required
string

user_id path parameter

Example: <user_id>
tac_id
required
string

tac-id path parameter

Example: <tac_id>
header Parameters
Authorization
required
string

auth header for JWT

Example: <JWT token>
username
required
string

auth header for username

Example: <username>
Responses
200

Success

401

Unauthorized

403

Forbidden

put/users/{user_id}/{tac_id}/approve
Response samples
application/json
{
  • "api_message": "USER_PUT_APPROVE_TAC_SUCCESS",
  • "api_data": true
}

validate-otp-for-exact-user

Validate an otp for a scpecific user

SecurityAuthorization
Request
path Parameters
user_id
required
string

user_id path parameter

Example: <user_id>
header Parameters
Authorization
required
string

auth header for JWT

Example: <JWT token>
username
required
string

auth header for username

Example: <username>
Request Body schema: application/json
required

raw(json)

otp
number
Responses
200

Success

401

Unauthorized

403

Forbidden

422

Unprocessable Content

post/users/{user_id}/validateAuthenticatorOTP
Request samples
application/json
{
  • "otp": 494531
}
Response samples
application/json
{
  • "api_message": "<string>",
  • "api_data": true
}