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
$ curl https://expense.zoho.com/api/v1/expensecategories -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
{ "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
$ curl https://expense.zoho.com/api/v1/expensecategories -H "X-com-zoho-expense-organizationid: 10234695" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"

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
$ curl https://expense.zoho.com/api/v1/expensecategories/{expense_category_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
{ "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
$ curl https://expense.zoho.com/api/v1/expensecategories/{expense_category_id} -H "X-com-zoho-expense-organizationid: 10234695" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"

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
$ curl https://expense.zoho.com/api/v1/expensecategories/{expense_category_id} -X DELETE -H "X-com-zoho-expense-organizationid: 10234695" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"

Response Example

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

Enable an expense category

Enable an expense category.

Request Example

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

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
$ curl https://expense.zoho.com/api/v1/expensecategories/{expense_category_id}/hide -X POST -H "X-com-zoho-expense-organizationid: 10234695" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"

Response Example

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