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
parameters_data='{"field1":"value1","field2":"value2"}'; headers_data = Map(); headers_data.put("X-com-zoho-expense-organizationid", "10234695"); response = invokeUrl [ url: "https://www.zohoapis.com/expense/v1/users" type: POST headers: headers_data content-type: application/json parameters: parameters_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}"); Request request = new Request.Builder() .url("https://www.zohoapis.com/expense/v1/users") .post(body) .addHeader("X-com-zoho-expense-organizationid", "10234695") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
const options = { method: 'POST', headers: { 'X-com-zoho-expense-organizationid': '10234695', 'content-type': 'application/json' }, body: '{"field1":"value1","field2":"value2"}' }; fetch('https://www.zohoapis.com/expense/v1/users', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'X-com-zoho-expense-organizationid': "10234695", 'content-type': "application/json" } conn.request("POST", "/expense/v1/users", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "POST", "hostname": "www.zohoapis.com", "port": null, "path": "/expense/v1/users", "headers": { "X-com-zoho-expense-organizationid": "10234695", "content-type": "application/json" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(JSON.stringify({field1: 'value1', field2: 'value2'})); req.end();
curl --request POST \ --url https://www.zohoapis.com/expense/v1/users \ --header 'X-com-zoho-expense-organizationid: 10234695' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

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
headers_data = Map(); headers_data.put("X-com-zoho-expense-organizationid", "10234695"); response = invokeUrl [ url: "https://www.zohoapis.com/expense/v1/users" type: GET headers: headers_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/expense/v1/users") .get() .addHeader("X-com-zoho-expense-organizationid", "10234695") .build(); Response response = client.newCall(request).execute();
const options = {method: 'GET', headers: {'X-com-zoho-expense-organizationid': '10234695'}}; fetch('https://www.zohoapis.com/expense/v1/users', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") headers = { 'X-com-zoho-expense-organizationid': "10234695" } conn.request("GET", "/expense/v1/users", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "GET", "hostname": "www.zohoapis.com", "port": null, "path": "/expense/v1/users", "headers": { "X-com-zoho-expense-organizationid": "10234695" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
curl --request GET \ --url https://www.zohoapis.com/expense/v1/users \ --header 'X-com-zoho-expense-organizationid: 10234695'

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
parameters_data='{"field1":"value1","field2":"value2"}'; headers_data = Map(); headers_data.put("X-com-zoho-expense-organizationid", "10234695"); response = invokeUrl [ url: "https://www.zohoapis.com/expense/v1/users/16367000000073071" type: PUT headers: headers_data content-type: application/json parameters: parameters_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}"); Request request = new Request.Builder() .url("https://www.zohoapis.com/expense/v1/users/16367000000073071") .put(body) .addHeader("X-com-zoho-expense-organizationid", "10234695") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
const options = { method: 'PUT', headers: { 'X-com-zoho-expense-organizationid': '10234695', 'content-type': 'application/json' }, body: '{"field1":"value1","field2":"value2"}' }; fetch('https://www.zohoapis.com/expense/v1/users/16367000000073071', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'X-com-zoho-expense-organizationid': "10234695", 'content-type': "application/json" } conn.request("PUT", "/expense/v1/users/16367000000073071", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "PUT", "hostname": "www.zohoapis.com", "port": null, "path": "/expense/v1/users/16367000000073071", "headers": { "X-com-zoho-expense-organizationid": "10234695", "content-type": "application/json" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(JSON.stringify({field1: 'value1', field2: 'value2'})); req.end();
curl --request PUT \ --url https://www.zohoapis.com/expense/v1/users/16367000000073071 \ --header 'X-com-zoho-expense-organizationid: 10234695' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

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
headers_data = Map(); headers_data.put("X-com-zoho-expense-organizationid", "10234695"); response = invokeUrl [ url: "https://www.zohoapis.com/expense/v1/users/16367000000073071" type: GET headers: headers_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/expense/v1/users/16367000000073071") .get() .addHeader("X-com-zoho-expense-organizationid", "10234695") .build(); Response response = client.newCall(request).execute();
const options = {method: 'GET', headers: {'X-com-zoho-expense-organizationid': '10234695'}}; fetch('https://www.zohoapis.com/expense/v1/users/16367000000073071', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") headers = { 'X-com-zoho-expense-organizationid': "10234695" } conn.request("GET", "/expense/v1/users/16367000000073071", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "GET", "hostname": "www.zohoapis.com", "port": null, "path": "/expense/v1/users/16367000000073071", "headers": { "X-com-zoho-expense-organizationid": "10234695" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
curl --request GET \ --url https://www.zohoapis.com/expense/v1/users/16367000000073071 \ --header 'X-com-zoho-expense-organizationid: 10234695'

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
headers_data = Map(); headers_data.put("X-com-zoho-expense-organizationid", "10234695"); response = invokeUrl [ url: "https://www.zohoapis.com/expense/v1/users/16367000000073071" type: DELETE headers: headers_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/expense/v1/users/16367000000073071") .delete(null) .addHeader("X-com-zoho-expense-organizationid", "10234695") .build(); Response response = client.newCall(request).execute();
const options = {method: 'DELETE', headers: {'X-com-zoho-expense-organizationid': '10234695'}}; fetch('https://www.zohoapis.com/expense/v1/users/16367000000073071', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") headers = { 'X-com-zoho-expense-organizationid': "10234695" } conn.request("DELETE", "/expense/v1/users/16367000000073071", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "DELETE", "hostname": "www.zohoapis.com", "port": null, "path": "/expense/v1/users/16367000000073071", "headers": { "X-com-zoho-expense-organizationid": "10234695" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
curl --request DELETE \ --url https://www.zohoapis.com/expense/v1/users/16367000000073071 \ --header 'X-com-zoho-expense-organizationid: 10234695'

Response Example

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

Make an user inactive

Make an user inactive.

Request Example

Click to copy
headers_data = Map(); headers_data.put("X-com-zoho-expense-organizationid", "10234695"); response = invokeUrl [ url: "https://www.zohoapis.com/expense/v1/users/16367000000073071/inactive" type: POST headers: headers_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/expense/v1/users/16367000000073071/inactive") .post(null) .addHeader("X-com-zoho-expense-organizationid", "10234695") .build(); Response response = client.newCall(request).execute();
const options = {method: 'POST', headers: {'X-com-zoho-expense-organizationid': '10234695'}}; fetch('https://www.zohoapis.com/expense/v1/users/16367000000073071/inactive', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") headers = { 'X-com-zoho-expense-organizationid': "10234695" } conn.request("POST", "/expense/v1/users/16367000000073071/inactive", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "POST", "hostname": "www.zohoapis.com", "port": null, "path": "/expense/v1/users/16367000000073071/inactive", "headers": { "X-com-zoho-expense-organizationid": "10234695" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
curl --request POST \ --url https://www.zohoapis.com/expense/v1/users/16367000000073071/inactive \ --header 'X-com-zoho-expense-organizationid: 10234695'

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
headers_data = Map(); headers_data.put("X-com-zoho-expense-organizationid", "10234695"); response = invokeUrl [ url: "https://www.zohoapis.com/expense/v1/users/16367000000073071/active" type: POST headers: headers_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/expense/v1/users/16367000000073071/active") .post(null) .addHeader("X-com-zoho-expense-organizationid", "10234695") .build(); Response response = client.newCall(request).execute();
const options = {method: 'POST', headers: {'X-com-zoho-expense-organizationid': '10234695'}}; fetch('https://www.zohoapis.com/expense/v1/users/16367000000073071/active', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") headers = { 'X-com-zoho-expense-organizationid': "10234695" } conn.request("POST", "/expense/v1/users/16367000000073071/active", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "POST", "hostname": "www.zohoapis.com", "port": null, "path": "/expense/v1/users/16367000000073071/active", "headers": { "X-com-zoho-expense-organizationid": "10234695" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
curl --request POST \ --url https://www.zohoapis.com/expense/v1/users/16367000000073071/active \ --header 'X-com-zoho-expense-organizationid: 10234695'

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
headers_data = Map(); headers_data.put("X-com-zoho-expense-organizationid", "10234695"); response = invokeUrl [ url: "https://www.zohoapis.com/expense/v1/users/16367000000073071/role/16367000000030005" type: POST headers: headers_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/expense/v1/users/16367000000073071/role/16367000000030005") .post(null) .addHeader("X-com-zoho-expense-organizationid", "10234695") .build(); Response response = client.newCall(request).execute();
const options = {method: 'POST', headers: {'X-com-zoho-expense-organizationid': '10234695'}}; fetch('https://www.zohoapis.com/expense/v1/users/16367000000073071/role/16367000000030005', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("www.zohoapis.com") headers = { 'X-com-zoho-expense-organizationid': "10234695" } conn.request("POST", "/expense/v1/users/16367000000073071/role/16367000000030005", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "POST", "hostname": "www.zohoapis.com", "port": null, "path": "/expense/v1/users/16367000000073071/role/16367000000030005", "headers": { "X-com-zoho-expense-organizationid": "10234695" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
curl --request POST \ --url https://www.zohoapis.com/expense/v1/users/16367000000073071/role/16367000000030005 \ --header 'X-com-zoho-expense-organizationid: 10234695'

Response Example

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