API Docs
/
No Results Found
Expense Categories

Expense Categories

An expense category entity allows you to maintain details of an expense category.

Attribute

category_id
long
Unique ID for expense category generated by the server. This is used as an identifier.
category_name
string
Name of the expense category.
gl_code
string
Unique account code for the expense category.
description
string
Description of the expense category.
status
string
Whether the expense category is active. It can either be true or false.
attachment_file_name
string
Name of the attachment file.
flat_amount
double
Amount for the expense category.
is_description_required
boolean
Whether description is mandatory. It can either be true or false.
is_receipt_required
boolean
Whether receipt is required. It can either be true or false.
is_maximum_amount_required
boolean
Whether there is any maximum amount limit for expense. It can either be true or false.
receipt_required_amount
double
Amount limit above which receipt is mandatory.
maximum_allowed_amount
double
Expense amount limit.
created_time
string
Time at which this expense category was created.
is_custom
boolean
Whether the expense category is custom. It can either be true or false.
is_mileage
boolean
Whether this is a mileage category. It can either be true or false.
has_transaction
boolean
Whether this expense category has transactions associated with it. It can either be true or false.
category_icon
string
Icon for the category.
last_modified_time
string
Last modified time.
can_override_settings
boolean
Whether this expense category can override the default polices. It can either be true or false.
can_delete
boolean
Whether we can delete this expense category. It can either be true or false.
category_type
string
Type of the Category.
is_enabled
boolean
Whether the category is currently enabled. It can either be true or false.
parent_account_id
long
Account ID of parent category.
parent_account_name
string
Account name of the parent.

Example

{ "category_id": "16367000000000418", "category_name": "Air Travel Expense", "gl_code": "air01", "description": "Expenses on business travels like hotel booking charges, flight charges, etc. are recorded as travel expenses.", "status": "active", "attachment_file_name": "", "flat_amount": 500, "is_description_required": false, "is_receipt_required": false, "is_maximum_amount_required": false, "receipt_required_amount": 500, "maximum_allowed_amount": 1000, "created_time": "2011-10-19T23:19:28-0700", "is_custom": false, "is_mileage": false, "has_transaction": false, "category_icon": "travel", "last_modified_time": "2017-02-28T17:01:02+0530", "can_override_settings": false, "can_delete": true, "category_type": "expense", "is_enabled": true, "parent_account_id": "16367000000106279", "parent_account_name": "expense" }

Create an expense category

Create a new expense category.

Arguments

category_name
string
(Required)
Name of the expense category.
gl_code
string
Unique account code for the expense category.
description
string
Description of the expense category.
maximum_allowed_amount
double
Expense amount limit.
receipt_required_amount
double
Amount limit above which receipt is mandatory.
flat_amount
double
Amount for the expense category.
parent_account_id
long
Account ID of parent category.

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/expensecategories" 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/expensecategories") .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/expensecategories', 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/expensecategories", 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/expensecategories", "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/expensecategories \ --header 'X-com-zoho-expense-organizationid: 10234695' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "category_name": "Air Travel Expense", "gl_code": "air01", "description": "Expenses on business travels like hotel booking charges, flight charges, etc. are recorded as travel expenses.", "maximum_allowed_amount": 1000, "receipt_required_amount": 500, "flat_amount": 500, "parent_account_id": "16367000000106279" }

Response Example

{ "code": 0, "message": "The expense category has been created.", "expense_category": { "category_id": "16367000000000418", "category_name": "Air Travel Expense", "gl_code": "air01", "description": "Expenses on business travels like hotel booking charges, flight charges, etc. are recorded as travel expenses.", "status": "active", "attachment_file_name": "", "flat_amount": 500, "is_description_required": false, "is_receipt_required": false, "is_maximum_amount_required": false, "receipt_required_amount": 500, "maximum_allowed_amount": 1000, "created_time": "2011-10-19T23:19:28-0700", "is_custom": false, "is_mileage": false, "has_transaction": false, "category_icon": "travel", "last_modified_time": "2017-02-28T17:01:02+0530", "can_override_settings": false, "can_delete": true, "category_type": "expense", "is_enabled": true, "parent_account_id": "16367000000106279", "parent_account_name": "expense" } }

List of expense categories

List of all active expense categories.

Query Parameters

filter_by
object
For filtering Expense Categories based on Status.
Show Sub-Attributes arrow
Status.Inactive
string
List of all Inactive Expense Categories.
Status.All
string
List of all Expense Categories.

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/expensecategories" 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/expensecategories") .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/expensecategories', 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/expensecategories", 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/expensecategories", "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/expensecategories \ --header 'X-com-zoho-expense-organizationid: 10234695'

Response Example

{ "code": 0, "message": "success", "expense_categories": [ { "category_id": "16367000000000418", "category_name": "Air Travel Expense", "gl_code": "air01", "description": "Expenses on business travels like hotel booking charges, flight charges, etc. are recorded as travel expenses.", "status": "active", "attachment_file_name": "", "flat_amount": 500, "is_maximum_amount_required": false, "maximum_allowed_amount": 1000, "is_description_required": false, "is_receipt_required": false, "is_mileage": false, "is_perdiem_account": false, "receipt_required_amount": 500, "can_override_settings": false, "is_custom": false, "is_super_parent": false, "is_enabled": true, "category_icon": "travel", "can_delete": true, "category_type": "expense", "parent_account_id": "16367000000106279", "parent_account_name": "expense", "depth": 0, "is_child_present": false, "child_count": "" }, {...}, {...} ] }

Update an expense category

Update the details of an existing expense category.

Arguments

category_name
string
Name of the expense category.
gl_code
string
Unique account code for the expense category.
description
string
Description of the expense category.
maximum_allowed_amount
double
Expense amount limit.
receipt_required_amount
double
Amount limit above which receipt is mandatory.
flat_amount
double
Amount for the expense category.

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/expensecategories/" 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/expensecategories/") .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/expensecategories/', 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/expensecategories/", 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/expensecategories/", "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/expensecategories/ \ --header 'X-com-zoho-expense-organizationid: 10234695' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "category_name": "Air Travel Expense", "gl_code": "air01", "description": "Expenses on business travels like hotel booking charges, flight charges, etc. are recorded as travel expenses.", "maximum_allowed_amount": 1000, "receipt_required_amount": 500, "flat_amount": 500 }

Response Example

{ "code": 0, "message": "The details of the expense category has been updated.", "expense_category": { "category_id": "16367000000000418", "category_name": "Air Travel Expense", "gl_code": "air01", "description": "Expenses on business travels like hotel booking charges, flight charges, etc. are recorded as travel expenses.", "status": "active", "attachment_file_name": "", "flat_amount": 500, "is_description_required": false, "is_receipt_required": false, "is_maximum_amount_required": false, "receipt_required_amount": 500, "maximum_allowed_amount": 1000, "created_time": "2011-10-19T23:19:28-0700", "is_custom": false, "is_mileage": false, "has_transaction": false, "category_icon": "travel", "last_modified_time": "2017-02-28T17:01:02+0530", "can_override_settings": false, "can_delete": true, "category_type": "expense", "is_enabled": true, "parent_account_id": "16367000000106279", "parent_account_name": "expense" } }

Retrieve details of an expense category

Details of an existing expense category.

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/expensecategories/" 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/expensecategories/") .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/expensecategories/', 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/expensecategories/", 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/expensecategories/", "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/expensecategories/ \ --header 'X-com-zoho-expense-organizationid: 10234695'

Response Example

{ "code": 0, "message": "success", "expense_category": { "category_id": "16367000000000418", "category_name": "Air Travel Expense", "gl_code": "air01", "description": "Expenses on business travels like hotel booking charges, flight charges, etc. are recorded as travel expenses.", "status": "active", "attachment_file_name": "", "flat_amount": 500, "is_description_required": false, "is_receipt_required": false, "is_maximum_amount_required": false, "receipt_required_amount": 500, "maximum_allowed_amount": 1000, "created_time": "2011-10-19T23:19:28-0700", "is_custom": false, "is_mileage": false, "has_transaction": false, "category_icon": "travel", "last_modified_time": "2017-02-28T17:01:02+0530", "can_override_settings": false, "can_delete": true, "category_type": "expense", "is_enabled": true, "parent_account_id": "16367000000106279", "parent_account_name": "expense" } }

Delete an expense category

Delete an existing expense category.

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/expensecategories/" 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/expensecategories/") .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/expensecategories/', 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/expensecategories/", 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/expensecategories/", "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/expensecategories/ \ --header 'X-com-zoho-expense-organizationid: 10234695'

Response Example

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

Enable an expense category

Enable an expense category.

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/expensecategories//show" 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/expensecategories//show") .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/expensecategories//show', 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/expensecategories//show", 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/expensecategories//show", "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/expensecategories//show \ --header 'X-com-zoho-expense-organizationid: 10234695'

Response Example

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

Disable an expense category

Disable an expense category.

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/expensecategories//hide" 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/expensecategories//hide") .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/expensecategories//hide', 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/expensecategories//hide", 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/expensecategories//hide", "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/expensecategories//hide \ --header 'X-com-zoho-expense-organizationid: 10234695'

Response Example

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