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.
Returnes a list of all the users rows registered from the db.
Success
Unauthorized
Forbidden
{- "api_message": "<string>",
- "api_data": {
- "users": [
- {
- "id": "<string>",
- "username": "<string>",
- "external_uuid": "<string>",
- "company": "<string>",
- "user_status": "Active",
- "register_status": "<string>",
- "user_type": "End user",
- "account_id": "<not in use>",
- "ref_account_id": "<not in use>",
- "first_name": "<not in use>",
- "last_name": "<not in use>",
- "email": "<string>",
- "phone_verified_at": "<not in use>",
- "verification_attempts": "<not in use>",
- "phone": "<string>",
- "profile_img": "<not in use>",
- "login_counter": 1,
- "user_created_at": "<datetime string>",
- "user_updated_at": "<datetime string>",
- "last_login_at": "<datetime string>",
- "total_balance": 1,
- "frozen_balance": 1,
- "spendable_balance": 1,
- "new_balance": true,
- "new_user": true
}
], - "last_at": "<datetime string>",
- "total_items": 1
}
}
Insert the initial user's info.
Success
Unauthorized
Forbidden
{- "username": "NewUsername1!",
- "email": "newCustomer@gmail.com",
- "phone": "972537589912",
- "CID": "ANY_CID_123!"
}
{- "api_message": "<string>",
- "api_data": {
- "UUID": "<string>"
}
}
Insert the user's credentials
raw(json)
Success
Unauthorized
Forbidden
Unprocessable Content
{- "user_id": "Y0ZuTVFCNnl6S3pISDhMTXVYSHBwZz09",
- "api_token": "api_token",
- "api_key": "api_key",
- "api_secret": "api_secret",
- "provider_name": "provider_name",
- "provider_type": "provider_type"
}
{- "api_message": "<string>",
- "api_data": {
- "user_credential_id": "<string>"
}
}
Update the user's credentials with credential_id
raw(json)
Success
Unauthorized
Forbidden
Unprocessable Content
{- "user_id": "Y0ZuTVFCNnl6S3pISDhMTXVYSHBwZz09",
- "api_token": "api_token",
- "api_key": "api_key",
- "api_secret": "api_secret",
- "provider_name": "provider_name",
- "provider_type": "provider_type"
}
{- "api_message": "<string>",
- "api_data": {
- "user_credential_id": "<string>"
}
}
Delete the user's credentials with credential_id
No content (Success)
Unauthorized
Forbidden
{- "api_data": {
- "user_credential_id": "<string>"
}
}
Returns details on the logged in user.
Success
{- "api_message": "<string>",
- "api_data": {
- "id": "<string>",
- "external_uuid": "<string>",
- "username": "<string>",
- "role_id": "<string>",
- "login_as": "<string>",
- "company": "<string>",
- "register_status": "<string>",
- "status": "<string>",
- "user_type": "<string>",
- "account_id": "<string>",
- "ref_account_id": "<string>",
- "first_name": "<string>",
- "last_name": "<string>",
- "email": "<string>",
- "phone_verified_at": "<datetime string>",
- "verification_attempts": 1,
- "last_login_at": "<string>",
- "authenticator_secret": "<string>",
- "two_factor_type": "SMS",
- "two_factor_created_at": "<datetime string>",
- "remember_token_expire_at": "<datetime string>",
- "phone": "<string>",
- "profile_img": "<string>",
- "login_counter": 1,
- "lang": "en",
- "created_at": "<datetime string>",
- "updated_at": "<datetime string>"
}, - "qr_image": "<string>"
}
Return a list of companies the logged in user is attached to. In case of admin - returns all the attachments
Success
Unauthorized
Forbidden
{- "api_message": "<string>",
- "api_data": {
- "companies": [
- "<string>"
]
}
}
Returns details on the requested user_id
Success
Unauthorized
Forbidden
Not Found
{- "api_message": "<string>",
- "api_data": {
- "id": "<string>",
- "external_uuid": "<string>",
- "username": "<string>",
- "role_id": "<string>",
- "login_as": "<string>",
- "company": "<string>",
- "register_status": "<string>",
- "status": "<string>",
- "user_type": "<string>",
- "account_id": "<string>",
- "ref_account_id": "<string>",
- "first_name": "<string>",
- "last_name": "<string>",
- "email": "<string>",
- "phone_verified_at": "<datetime string>",
- "verification_attempts": 1,
- "last_login_at": "<string>",
- "authenticator_secret": "<string>",
- "two_factor_type": "SMS",
- "two_factor_created_at": "<datetime string>",
- "remember_token_expire_at": "<datetime string>",
- "phone": "<string>",
- "profile_img": "<string>",
- "login_counter": 1,
- "lang": "en",
- "created_at": "<datetime string>",
- "updated_at": "<datetime string>",
- "discount": [
- {
- "id": "<string>",
- "is_one_time": true,
- "currency": "<string>",
- "volumes": {
- "discount": [
- {
- "volume": 1,
- "type": "<string>",
- "amount": 2
}
]
}, - "created_at": "<datetime string>",
- "updated_at": "<datetime string>",
- "pivot": {
- "user_id": "<string>",
- "discount_id": "<string>",
- "id": "<string>"
}
}
]
}
}
:Returnes a list of pending terms and conditions documents the user is requested to sign and approve
Success
Unauthorized
Forbidden
Not Found
{- "api_message": "<string>",
- "api_data": {
- "tacs": [
- {
- "id": "<string>",
- "uploaded_by_id": "<string>",
- "url": "<string>",
- "status": true,
- "created_at": "<datetime string>",
- "updated_at": "<datetime srting>",
- "base64": "<base64 pdf string>"
}
]
}
}
Check if the user is an admin performing on behalf of a user
Success
Unauthorized
Forbidden
{- "api_message": "<string>",
- "api_data": {
- "is_acting_as": true,
- "username": "<string>"
}
}
Return a list of the allowed pages a user can see (affecting the ui)
Success
Unauthorized
Forbidden
{- "api_message": "<string>",
- "api_data": {
- "pages": "<string>"
}
}
Response contains information regarding username that you send
Success
Unauthorized
Forbidden
Not Found
{- "api_message": "<string>",
- "api_data": {
- "id": "<string>",
- "external_uuid": "<string>",
- "username": "<string>",
- "role_id": "<string>",
- "login_as": "<string>",
- "company": "<string>",
- "register_status": "<string>",
- "status": "<string>",
- "user_type": "<string>",
- "account_id": "<string>",
- "ref_account_id": "<string>",
- "first_name": "<string>",
- "last_name": "<string>",
- "email": "<string>",
- "phone_verified_at": "<datetime string>",
- "verification_attempts": 1,
- "last_login_at": "<string>",
- "authenticator_secret": "<string>",
- "two_factor_type": "SMS",
- "two_factor_created_at": "<datetime string>",
- "remember_token_expire_at": "<datetime string>",
- "phone": "<string>",
- "profile_img": "<string>",
- "login_counter": 1,
- "lang": "en",
- "created_at": "<datetime string>",
- "updated_at": "<datetime string>"
}
}
Update user's status
Success
Unauthorized
Forbidden
Unprocessable Content
{- "UUID": "Y0ZuTVFCNnl6S3dxNDBnaTdqc1VpUT09",
- "CID": "ANY_CID_123",
- "status": "BLOCK | UNBLOCK | ACTIVATE"
}
{- "api_message": "<string>",
- "api_data": {
- "UUID": "<string>",
- "CID": "<string>",
- "status": "<string>"
}
}
Approve a terms and conditions document for user_id and tac_id
Success
Unauthorized
Forbidden
{- "api_message": "USER_PUT_APPROVE_TAC_SUCCESS",
- "api_data": true
}
Validate an otp for a scpecific user
Success
Unauthorized
Forbidden
Unprocessable Content
{- "otp": 494531
}
{- "api_message": "<string>",
- "api_data": true
}