API Docs
/
No Results Found
Users

Users

A user entity allows you to maintain information about a user.

End Points
Create an user
Retrieve list of users
Update details of an user
Retrieve details of an user
Delete an user
Make an user inactive
Make an user active
Assign a role to user

Attribute

user_id
long
Unique ID for user generated by the server. This is used as identifier.
name
string
Name of the user.
first_name
string
First Name of the User.
last_name
string
Last Name of the User.
email
string
Active Email ID of the user.
email_ids
array
Registered Email Ids of the user.
Show Sub-Attributes arrow
email
string
Active Email ID of the user.
is_selected
boolean
Whether selected as active. It can either be true or false.
status
string
Status of the user. It can either be active or inactive or deleted or invited.
role_id
long
Unique ID for the role of user.
user_role
string
Role of the user.
user_type
string
Type of the User.
photo_url
string
Url of the profile photo.
default_approver_id
long
ID of the Approver.
default_approver_name
string
Name of the Approver for a user.
default_approver_email
string
Email Id of the Approver for a user.
created_time
string
Time at which this user was created.
last_modified_time
string
Time at which this user's details were last modified.
approves_to_id
long
ID of the User getting approved by.
approves_to_name
string
Name of to user getting approved by.
approves_to_email
string
Email ID of the user getting approved by.
submission_amount_limit
double
Limit of the amount being submitted.
approval_amount_limit
double
Limit of the amount being approved.
employee_number
string
Number of the employee.
department_id
long
Unique ID for the department.
department_name
string
Name of the department.
designation_name
string
Name of the designation.
designation_id
long
Unique ID for the designation generated by server.
date_of_birth
string
Date Of Birth of the User.
date_of_joining
string
Date of Joining of the User.
mobile
long
Mobile Number of the User.
gender
string
Gender of the User.
policy_id
long
Unique ID for the Policy.
policy_name
string
Name of the Policy.
bank_name
string
Name of the bank.
bank_account_type
string
Type of Bank Account.
custom_fields
array
Custom Fields added.
Show Sub-Attributes arrow
customfield_id
long
Unique ID for the Custom Field.
data_type
string
Data Type of the Custom Field.
is_active
boolean
Whether the Custom Field is Active. It can either be true or false.
is_basecurrency_amount
boolean
Whether the Custom Field is Base Currency Amount. It can either be true or false.
is_mandatory
boolean
Whether the Custom Field is Mandatory. It can either be true or false.
label
string
Label for the Custom Field.
value
string
Value entered in the Custom Field.
user_mail_in_id
string
Mail ID generated by Zoho Expense for the User.

Example

{ "user_id": "16367000000073071", "name": "Tricia Boyle", "first_name": "Tricia", "last_name": "Boyle", "email": "patriciab@zillum.com", "email_ids": [ { "email": "patriciab@zillum.com", "is_selected": true } ], "status": "active", "role_id": "16367000000030005", "user_role": "submitter", "user_type": "zoho", "photo_url": "https://contacts.zoho.com/file?ID=a8625cce152ee5dc0ca36e254b6ccd89a644a6e131442dd531484dc7a3a15ad4cdd0803c615479b1c1a699af5729301fa0a180e1d691bb9609894e60544ef753&fs=thumb", "default_approver_id": "16367000000073001", "default_approver_name": "Will Smith", "default_approver_email": "will.smith@yahoo.in", "created_time": "2017-02-15", "last_modified_time": "2017-02-21", "approves_to_id": "16367000000073001", "approves_to_name": "Will Smith", "approves_to_email": "will.smith@yahoo.in", "submission_amount_limit": 5000, "approval_amount_limit": 1000, "employee_number": "E001", "department_id": "16367000000093001", "department_name": "Finance", "designation_name": "Manager", "designation_id": "16367000000093003", "date_of_birth": "1996-07-25", "date_of_joining": "2017-01-04", "mobile": "9500881944", "gender": "male", "policy_id": "16367000000092011", "policy_name": "Expense Saver", "bank_name": "HDFC", "bank_account_type": "Savings", "custom_fields": [ { "customfield_id": "16367000000093005", "data_type": "string", "is_active": true, "is_basecurrency_amount": true, "is_mandatory": false, "label": "Nick Name", "value": "Tric" } ], "user_mail_in_id": "tricia.boyle.9k2rrt@zohoexpensemail.com" }

Create an user

Create a new user.

Arguments

name
string
(Required)
Name of the user.
email
string
(Required)
Active Email ID of the user.
user_role
string
(Required)
Role of the user.
default_approver_email
string
Email Id of the Approver for a user.
approves_to_email
string
Email ID of the user getting approved by.
submission_amount_limit
double
Limit of the amount being submitted.
approval_amount_limit
double
Limit of the amount being approved.
employee_number
string
Number of the employee.
department_name
string
Name of the department.
designation_name
string
Name of the designation.
date_of_birth
string
Date Of Birth of the User.
date_of_joining
string
Date of Joining of the User.
mobile
long
Mobile Number of the User.
gender
string
Gender of the User.
policy_name
string
Name of the Policy.
custom_fields
array
Custom Fields added.
Show Sub-Attributes arrow
customfield_id
long
(Required)
Unique ID for the Custom Field.
value
string
(Required)
Value entered in the Custom Field.

Request Example

Click to copy
$ curl https://expense.zoho.com/api/v1/users -X POST -H "X-com-zoho-expense-organizationid: 10234695" -H "Content-Type: application/json;charset=UTF-8" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f" -d '{"field":"value","field":"value"}'

Body Parameters

Click to copy
{ "name": "Tricia Boyle", "email": "patriciab@zillum.com", "user_role": "submitter", "default_approver_email": "will.smith@yahoo.in", "approves_to_email": "will.smith@yahoo.in", "submission_amount_limit": 5000, "approval_amount_limit": 1000, "employee_number": "E001", "department_name": "Finance", "designation_name": "Manager", "date_of_birth": "1996-07-25", "date_of_joining": "2017-01-04", "mobile": "9500881944", "gender": "male", "policy_name": "Expense Saver", "custom_fields": [ { "customfield_id": "16367000000093005", "value": "Tric" } ] }

Response Example

{ "code": 0, "message": "Your invitation has been sent.", "user": { "user_id": "16367000000073071", "name": "Tricia Boyle", "first_name": "Tricia", "last_name": "Boyle", "email": "patriciab@zillum.com", "email_ids": [ { "email": "patriciab@zillum.com", "is_selected": true } ], "status": "active", "role_id": "16367000000030005", "user_role": "submitter", "user_type": "zoho", "photo_url": "https://contacts.zoho.com/file?ID=a8625cce152ee5dc0ca36e254b6ccd89a644a6e131442dd531484dc7a3a15ad4cdd0803c615479b1c1a699af5729301fa0a180e1d691bb9609894e60544ef753&fs=thumb", "default_approver_id": "16367000000073001", "default_approver_name": "Will Smith", "default_approver_email": "will.smith@yahoo.in", "created_time": "2017-02-15", "last_modified_time": "2017-02-21", "approves_to_id": "16367000000073001", "approves_to_name": "Will Smith", "approves_to_email": "will.smith@yahoo.in", "submission_amount_limit": 5000, "approval_amount_limit": 1000, "employee_number": "E001", "department_id": "16367000000093001", "department_name": "Finance", "designation_name": "Manager", "designation_id": "16367000000093003", "date_of_birth": "1996-07-25", "date_of_joining": "2017-01-04", "mobile": "9500881944", "gender": "male", "policy_id": "16367000000092011", "policy_name": "Expense Saver", "bank_name": "HDFC", "bank_account_type": "Savings", "custom_fields": [ { "customfield_id": "16367000000093005", "data_type": "string", "is_active": true, "is_basecurrency_amount": true, "is_mandatory": false, "label": "Nick Name", "value": "Tric" } ], "user_mail_in_id": "tricia.boyle.9k2rrt@zohoexpensemail.com" } }

Retrieve list of users

Details of all existing users.

Request Example

Click to copy
$ curl https://expense.zoho.com/api/v1/users -H "X-com-zoho-expense-organizationid: 10234695" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"

Response Example

{ "code": 0, "message": "success", "users": [ { "user_id": "16367000000073071", "role_id": "16367000000030005", "name": "Tricia Boyle", "email": "patriciab@zillum.com", "user_role": "submitter", "user_type": "zoho", "can_approve": true, "status": "active", "default_approver_id": "16367000000073001", "default_approver_name": "Will Smith", "default_approver_email": "will.smith@yahoo.in", "is_from_crm": false, "is_current_user": true, "photo_url": "https://contacts.zoho.com/file?ID=a8625cce152ee5dc0ca36e254b6ccd89a644a6e131442dd531484dc7a3a15ad4cdd0803c615479b1c1a699af5729301fa0a180e1d691bb9609894e60544ef753&fs=thumb", "approves_to_id": "16367000000073001", "approves_to_name": "Will Smith", "approves_to_email": "will.smith@yahoo.in", "submission_amount_limit": 5000, "approval_amount_limit": 1000, "created_time": "2017-02-15", "last_modified_time": "2017-02-21", "user_mail_in_id": "tricia.boyle.9k2rrt@zohoexpensemail.com", "employee_number": "E001", "department_id": "16367000000093001", "department_name": "Finance", "policy_id": "16367000000092011", "policy_name": "Expense Saver" }, {...}, {...} ] }

Update details of an user

Update the details of an existing user.

Arguments

name
string
Name of the user.
user_role
string
Role of the user.
approval_amount_limit
double
Limit of the amount being approved.
submission_amount_limit
double
Limit of the amount being submitted.
department_id
long
Unique ID for the department.
department_name
string
Name of the department.
designation_name
string
Name of the designation.
mobile
long
Mobile Number of the User.
custom_fields
array
Custom Fields added.
Show Sub-Attributes arrow
customfield_id
long
(Required)
Unique ID for the Custom Field.
value
string
(Required)
Value entered in the Custom Field.

Request Example

Click to copy
$ curl https://expense.zoho.com/api/v1/users/{user_id} -X PUT -H "X-com-zoho-expense-organizationid: 10234695" -H "Content-Type: application/json;charset=UTF-8" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f" -d '{"field":"value","field":"value"}'

Body Parameters

Click to copy
{ "name": "Tricia Boyle", "user_role": "submitter", "approval_amount_limit": 1000, "submission_amount_limit": 5000, "department_id": "16367000000093001", "department_name": "Finance", "designation_name": "Manager", "mobile": "9500881944", "custom_fields": [ { "customfield_id": "16367000000093005", "value": "Tric" } ] }

Response Example

{ "code": 0, "message": "The user details has been updated.", "user_id": "16367000000073071", "name": "Tricia Boyle", "first_name": "Tricia", "last_name": "Boyle", "email": "patriciab@zillum.com", "email_ids": [ { "email": "patriciab@zillum.com", "is_selected": true } ], "status": "active", "role_id": "16367000000030005", "user_role": "submitter", "user_type": "zoho", "photo_url": "https://contacts.zoho.com/file?ID=a8625cce152ee5dc0ca36e254b6ccd89a644a6e131442dd531484dc7a3a15ad4cdd0803c615479b1c1a699af5729301fa0a180e1d691bb9609894e60544ef753&fs=thumb", "default_approver_id": "16367000000073001", "default_approver_name": "Will Smith", "default_approver_email": "will.smith@yahoo.in", "created_time": "2017-02-15", "last_modified_time": "2017-02-21", "approves_to_id": "16367000000073001", "approves_to_name": "Will Smith", "approves_to_email": "will.smith@yahoo.in", "submission_amount_limit": 5000, "approval_amount_limit": 1000, "employee_number": "E001", "department_id": "16367000000093001", "department_name": "Finance", "designation_name": "Manager", "designation_id": "16367000000093003", "date_of_birth": "1996-07-25", "date_of_joining": "2017-01-04", "mobile": "9500881944", "gender": "male", "policy_id": "16367000000092011", "policy_name": "Expense Saver", "bank_name": "HDFC", "bank_account_type": "Savings", "custom_fields": [ { "customfield_id": "16367000000093005", "data_type": "string", "is_active": true, "is_basecurrency_amount": true, "is_mandatory": false, "label": "Nick Name", "value": "Tric" } ], "user_mail_in_id": "tricia.boyle.9k2rrt@zohoexpensemail.com" }

Retrieve details of an user

Details of an existing user.

Request Example

Click to copy
$ curl https://expense.zoho.com/api/v1/users/{user_id} -H "X-com-zoho-expense-organizationid: 10234695" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"

Response Example

{ "code": 0, "message": "success", "user": { "user_id": "16367000000073071", "name": "Tricia Boyle", "first_name": "Tricia", "last_name": "Boyle", "email": "patriciab@zillum.com", "email_ids": [ { "email": "patriciab@zillum.com", "is_selected": true } ], "status": "active", "role_id": "16367000000030005", "user_role": "submitter", "user_type": "zoho", "photo_url": "https://contacts.zoho.com/file?ID=a8625cce152ee5dc0ca36e254b6ccd89a644a6e131442dd531484dc7a3a15ad4cdd0803c615479b1c1a699af5729301fa0a180e1d691bb9609894e60544ef753&fs=thumb", "default_approver_id": "16367000000073001", "default_approver_name": "Will Smith", "default_approver_email": "will.smith@yahoo.in", "created_time": "2017-02-15", "last_modified_time": "2017-02-21", "approves_to_id": "16367000000073001", "approves_to_name": "Will Smith", "approves_to_email": "will.smith@yahoo.in", "submission_amount_limit": 5000, "approval_amount_limit": 1000, "employee_number": "E001", "department_id": "16367000000093001", "department_name": "Finance", "designation_name": "Manager", "designation_id": "16367000000093003", "date_of_birth": "1996-07-25", "date_of_joining": "2017-01-04", "mobile": "9500881944", "gender": "male", "policy_id": "16367000000092011", "policy_name": "Expense Saver", "bank_name": "HDFC", "bank_account_type": "Savings", "custom_fields": [ { "customfield_id": "16367000000093005", "data_type": "string", "is_active": true, "is_basecurrency_amount": true, "is_mandatory": false, "label": "Nick Name", "value": "Tric" } ], "user_mail_in_id": "tricia.boyle.9k2rrt@zohoexpensemail.com" } }

Delete an user

Delete an existing user.

Request Example

Click to copy
$ curl https://expense.zoho.com/api/v1/users/{user_id} -X DELETE -H "X-com-zoho-expense-organizationid: 10234695" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"

Response Example

{ "code": 0, "message": "The user has been deleted." }

Make an user inactive

Make an user inactive.

Request Example

Click to copy
$ curl https://expense.zoho.com/api/v1/users/{user_id}/inactive -X POST -H "X-com-zoho-expense-organizationid: 10234695" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"

Response Example

{ "code": 0, "message": "The user has been marked as inactive." }

Make an user active

Make an user active.

Request Example

Click to copy
$ curl https://expense.zoho.com/api/v1/users/{user_id}/active -X POST -H "X-com-zoho-expense-organizationid: 10234695" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"

Response Example

{ "code": 0, "message": "The user has been marked as active." }

Assign a role to user

Assign a role to user.

Request Example

Click to copy
$ curl https://expense.zoho.com/api/v1/users/{user_id}/role/{role_id} -X POST -H "X-com-zoho-expense-organizationid: 10234695" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"

Response Example

{ "code": 0, "message": "Role has been assigned to the user" }