API Docs
/
No Results Found
Expense Category

Expense Category

Expense Category represents a group of cumuative expense. For example, Rental Expense, Office Supplies etc.

End Points
Create an expense category
List expense categories
Update an expense category
Get an expense category
Delete an expense category
Mark an expense category as active
Mark an expense category as inactive

Attribute

account_id
string
ID of the account
account_name
string
Account name of the expenses.
description
string
Describe the expense created.
status
string
Search expenses by expense status. Allowed Values active, stopped and expired
created_time
string
date when expense was created
last_modified_time
string
Date when the expense was last edited

Example

{ "account_id": 982000000561057, "account_name": "Rent", "description": " ", "status": "active", "created_time": "2013-11-18T02:17:40-0800", "last_modified_time": "2013-12-18T02:17:40-0800" }

Create an expense category

Create an expense category.
oauthscope : ZohoInvoice.settings.CREATE

Arguments

account_name
string
Account name of the expenses.
description
string
Describe the expense created.

Request Example

Click to copy
$ curl https://invoice.zoho.com/api/v3/expensecategories -X POST -H "X-com-zoho-invoice-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
{ "account_name": "Rent", "description": " " }

Response Example

{ "code": 0, "message": "The expense category has been created.", "expense_category": { "account_id": 982000000561057, "account_name": "Rent", "description": " ", "status": "active", "created_time": "2013-11-18T02:17:40-0800", "last_modified_time": "2013-12-18T02:17:40-0800" } }

List expense categories

List expense categories along with pagination.
oauthscope : ZohoInvoice.settings.READ

Query Parameters

filter_by
Filter expense categories by status. Allowed Values: ExpenseCategories.Active, ExpenseCategories.Inactive and ExpenseCategories.All
sort_column
Sort expenses. Allowed Values account_name

Request Example

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

Response Example

{ "code": 0, "message": "success", "expense_accounts": [ { "account_id": 982000000561057, "account_name": "Rent", "description": " ", "status": "active" }, {...}, {...} ] }

Update an expense category

Update an expense category.
oauthscope : ZohoInvoice.settings.UPDATE

Arguments

account_name
string
Account name of the expenses.
description
string
Describe the expense created.

Request Example

Click to copy
$ curl https://invoice.zoho.com/api/v3/expensecategories/{category_id} -X PUT -H "X-com-zoho-invoice-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
{ "account_name": "Rent", "description": " " }

Response Example

{ "code": 0, "message": "The expense category has been created.", "expense_category": { "account_id": 982000000561057, "account_name": "Rent", "description": " ", "status": "active", "created_time": "2013-11-18T02:17:40-0800", "last_modified_time": "2013-12-18T02:17:40-0800" } }

Get an expense category

Get the details of an expense category.
oauthscope : ZohoInvoice.settings.READ

Request Example

Click to copy
$ curl https://invoice.zoho.com/api/v3/expensecategories/{category_id} -H "X-com-zoho-invoice-organizationid: 10234695" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"

Response Example

{ "code": 0, "message": "success", "expense_category": { "account_id": 982000000561057, "account_name": "Rent", "description": " ", "status": "active", "created_time": "2013-11-18T02:17:40-0800", "last_modified_time": "2013-12-18T02:17:40-0800" } }

Delete an expense category

Delete an existing expense category. Category which is associated with expense cannot be deleted.
oauthscope : ZohoInvoice.settings.DELETE

Request Example

Click to copy
$ curl https://invoice.zoho.com/api/v3/expensecategories/{category_id} -X DELETE -H "X-com-zoho-invoice-organizationid: 10234695" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"

Response Example

{ "code": 0, "message": "The expense category is deleted successfully." }

Mark an expense category as active

Update an expense category status as active.
oauthscope : ZohoInvoice.settings.CREATE

Arguments

category_id
string
ID of the expense category

Request Example

Click to copy
$ curl https://invoice.zoho.com/api/v3/expensecategories/{categoryid}/active -X POST -H "X-com-zoho-invoice-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_id": "982000000561057" }

Response Example

{ "code": 0, "message": "The expense is marked as active." }

Mark an expense category as inactive

Update an expense category status as inactive.
oauthscope : ZohoInvoice.settings.CREATE

Arguments

category_id
string
ID of the expense category

Request Example

Click to copy
$ curl https://invoice.zoho.com/api/v3/expensecategories/{categoryid}/inactive -X POST -H "X-com-zoho-invoice-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_id": "982000000561057" }

Response Example

{ "code": 0, "message": "The expense is marked as inactive." }