Expenses
An expense represents the money that you spend, with the ultimate target of generating revenue for your organization.
Possible error codes:
Error Code | Message |
---|---|
1002 | Expense does not exists |
5001 | Expenses that were converted to an invoice cannot be deleted |
5015 | Enter a valid expense amount | 5019 | Contact cannot be changed for an invoiced expense |
5032 | You cannot make this expense non-billable as it has been already invoiced |
Attribute
business_gst
, business_none
, overseas
, consumer
.place of contact
given for the contact will be taken)Maximum length [100]
Maximum length [100]
Maximum length [100]
mileage_type
is odometer
.mileage_type
is odometer
.{
"expense_id": 982000000030049,
"transaction_id": " ",
"transaction_type": "expense",
"expense_item_id": 982000000567220,
"gst_no": "22AAAAA0000A1Z5",
"gst_treatment": "business_gst",
"destination_of_supply": "TN",
"destination_of_supply_state": "TN",
"hsn_or_sac": 80540,
"source_of_supply": "AP",
"paid_through_account_name": "Petty Cash",
"vat_reg_no": "string",
"reverse_charge_tax_id": 982000000561063,
"reverse_charge_tax_name": "intra",
"reverse_charge_tax_percentage": 10,
"reverse_charge_tax_amount": 12,
"tax_amount": 11.85,
"is_itemized_expense": false,
"is_pre_gst": "fasle",
"trip_id": "",
"trip_number": "",
"reverse_charge_vat_total": 1.2,
"acquisition_vat_total": 0,
"acquisition_vat_summary": [
{
"tax": {
"tax_name": "SalesTax",
"tax_amount": 11.85
}
}
],
"reverse_charge_vat_summary": [
{
"tax": {
"tax_name": "SalesTax",
"tax_amount": 11.85
}
}
],
"account_id": 982000000561057,
"account_name": "Rent",
"date": "2013-11-18",
"tax_id": 982000000566007,
"tax_name": "SalesTax",
"tax_percentage": 10.5,
"currency_id": 982000000567001,
"currency_code": "USD",
"exchange_rate": 1,
"sub_total": 90,
"total": 100,
"bcy_total": 100,
"amount": 112.5,
"is_inclusive_tax": false,
"reference_number": "#562SD23R4",
"description": "Marketing",
"is_billable": true,
"is_personal": false,
"customer_id": 982000000567001,
"customer_name": "Bowman & Co",
"expense_receipt_name": " ",
"expense_receipt_type": " ",
"last_modified_time": "2013-12-18T02:17:40-0800",
"status": "unbilled",
"invoice_id": " ",
"invoice_number": " ",
"project_id": 982000000567226,
"project_name": " ",
"mileage_rate": " ",
"mileage_type": "non_mileage",
"expense_type": "non-mileage",
"start_reading": " ",
"end_reading": " "
}
Create an Expense
Create billable or non-billable expense. oauthscope : ZohoInvoice.expenses.CREATE
Arguments
place of contact
given for the contact will be taken)Maximum length [100]
goods
and service
.Maximum length [100]
Maximum length [100]
uk
. If the vendor is in an EU country & VAT registered, you are resides in Northen Ireland and purchasing Goods then his VAT treatment is eu_vat_registered
and if he resides outside the UK then his VAT treatment is overseas
(For Pre Brexit, this can be split as eu_vat_registered
, eu_vat_not_registered
and non_eu
).goods
and service
.mileage_type
is odometer
.mileage_type
is odometer
.mileage_type
is manual
km
and mile
car
, van
, motorcycle
and bike
petrol
, lpg
and diesel
less_than_1400cc
, between_1400cc_and_1600cc
, between_1600cc_and_2000cc
and more_than_2000cc
Query Parameters
gif
, png
, jpeg
, jpg
, bmp
and pdf
. It should be sent in multipart/formdata.$ curl https://invoice.zoho.com/api/v3/expenses
-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"}'
{
"account_id": 982000000561057,
"date": "2013-11-18",
"amount": 112.5,
"tax_id": 982000000566007,
"is_inclusive_tax": false,
"source_of_supply": "AP",
"destination_of_supply": "TN",
"hsn_or_sac": 80540,
"gst_no": "22AAAAA0000A1Z5",
"reverse_charge_tax_id": 982000000561063,
"line_items": [
{
"line_item_id": 10763000000140068,
"account_id": 982000000561057,
"description": "Marketing",
"amount": 112.5,
"tax_id": 982000000566007,
"item_order": 1,
"product_type": "goods",
"acquisition_vat_id": " ",
"reverse_charge_vat_id": " ",
"reverse_charge_tax_id": 982000000561063,
"tax_exemption_code": "string",
"tax_exemption_id": 982000000561067
}
],
"is_billable": true,
"reference_number": "#562SD23R4",
"description": "Marketing",
"customer_id": 982000000567001,
"currency_id": 982000000567001,
"exchange_rate": 1,
"project_id": 982000000567226,
"mileage_type": "non_mileage",
"vat_treatment": "overseas",
"product_type": "goods",
"acquisition_vat_id": " ",
"reverse_charge_vat_id": " ",
"start_reading": " ",
"end_reading": " ",
"distance": " ",
"mileage_unit": " ",
"mileage_rate": " ",
"employee_id": " ",
"vehicle_type": " ",
"can_reclaim_vat_on_mileage": " ",
"fuel_type": " ",
"engine_capacity_range": " "
}
{
"code": 0,
"message": "The expense has been recorded.",
"expense": {
"expense_id": 982000000030049,
"transaction_id": " ",
"transaction_type": "expense",
"expense_item_id": 982000000567220,
"gst_no": "22AAAAA0000A1Z5",
"gst_treatment": "business_gst",
"destination_of_supply": "TN",
"destination_of_supply_state": "TN",
"hsn_or_sac": 80540,
"source_of_supply": "AP",
"paid_through_account_name": "Petty Cash",
"vat_reg_no": "string",
"reverse_charge_tax_id": 982000000561063,
"reverse_charge_tax_name": "intra",
"reverse_charge_tax_percentage": 10,
"reverse_charge_tax_amount": 12,
"tax_amount": 11.85,
"is_itemized_expense": false,
"is_pre_gst": "fasle",
"trip_id": "",
"trip_number": "",
"reverse_charge_vat_total": 1.2,
"acquisition_vat_total": 0,
"acquisition_vat_summary": [
{
"tax": {
"tax_name": "SalesTax",
"tax_amount": 11.85
}
}
],
"reverse_charge_vat_summary": [
{
"tax": {
"tax_name": "SalesTax",
"tax_amount": 11.85
}
}
],
"account_id": 982000000561057,
"account_name": "Rent",
"date": "2013-11-18",
"tax_id": 982000000566007,
"tax_name": "SalesTax",
"tax_percentage": 10.5,
"currency_id": 982000000567001,
"currency_code": "USD",
"exchange_rate": 1,
"sub_total": 90,
"total": 100,
"bcy_total": 100,
"amount": 112.5,
"is_inclusive_tax": false,
"reference_number": "#562SD23R4",
"description": "Marketing",
"is_billable": true,
"is_personal": false,
"customer_id": 982000000567001,
"customer_name": "Bowman & Co",
"expense_receipt_name": " ",
"expense_receipt_type": " ",
"last_modified_time": "2013-12-18T02:17:40-0800",
"status": "unbilled",
"invoice_id": " ",
"invoice_number": " ",
"project_id": 982000000567226,
"project_name": " ",
"mileage_rate": " ",
"mileage_type": "non_mileage",
"expense_type": "non-mileage",
"start_reading": " ",
"end_reading": " "
}
}
List Expenses
List all the Expenses with pagination. oauthscope : ZohoInvoice.expenses.READ
Query Parameters
description_startswith
and description_contains
. Maximum length [100]
reference_number_startswith
and reference_number_contains
. Maximum length [100]
date_start
, date_end
, date_before
and date_after
. Date Format [yyyy-mm-dd]
unbilled
, invoiced
, reimbursed
, non-billable
and billable
amount_less_than
, amount_less_equals
, amount_greater_than
and amount_greater_than
account_name_startswith
and account_name_contains
. Maximum length [100]
customer_name_startswith
and customer_name_contains
. Maximum length [100]
customer name
or vendor name
. Maximum length [100]
date
, account_name
, total
, bcy_total
, reference_number
, customer_name
and created_time
Status.All
, Status.Billable
, Status.Nonbillable
, Status.Reimbursed
, Status.Invoiced
and Status.Unbilled
$ curl https://invoice.zoho.com/api/v3/expenses
-H "X-com-zoho-invoice-organizationid: 10234695"
-H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"
{
"code": 0,
"message": "success",
"expenses": [
{
"expense_id": 982000000030049,
"date": "2013-11-18",
"account_name": "Rent",
"description": "Marketing",
"currency_id": 982000000567001,
"currency_code": "USD",
"bcy_total": 100,
"bcy_total_without_tax": 100,
"total": 100,
"total_without_tax": 100,
"is_billable": true,
"reference_number": "#562SD23R4",
"customer_id": 982000000567001,
"customer_name": "Bowman & Co",
"status": "unbilled",
"created_time": "2013-11-18T02:17:40-0800",
"last_modified_time": "2013-12-18T02:17:40-0800",
"expense_receipt_name": " ",
"mileage_rate": " ",
"mileage_unit": " ",
"expense_type": "non-mileage",
"start_reading": " ",
"end_reading": " "
},
{...},
{...}
]
}
Update an Expense
Update an existing Expense. oauthscope : ZohoInvoice.expenses.UPDATE
Arguments
place of contact
given for the contact will be taken)Maximum length [100]
goods
and service
.Maximum length [100]
Maximum length [100]
uk
. If the vendor is in an EU country & VAT registered, you are resides in Northen Ireland and purchasing Goods then his VAT treatment is eu_vat_registered
and if he resides outside the UK then his VAT treatment is overseas
(For Pre Brexit, this can be split as eu_vat_registered
, eu_vat_not_registered
and non_eu
).goods
and service
.mileage_type
is odometer
.mileage_type
is odometer
.mileage_type
is manual
km
and mile
car
, van
, motorcycle
and bike
petrol
, lpg
and diesel
less_than_1400cc
, between_1400cc_and_1600cc
, between_1600cc_and_2000cc
and more_than_2000cc
Query Parameters
gif
, png
, jpeg
, jpg
, bmp
and pdf
. It should be sent in multipart/formdata.$ curl https://invoice.zoho.com/api/v3/expenses/{expense_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"}'
{
"account_id": 982000000561057,
"date": "2013-11-18",
"amount": 120.5,
"tax_id": 982000000566007,
"source_of_supply": "AP",
"destination_of_supply": "TN",
"hsn_or_sac": 80540,
"gst_no": "22AAAAA0000A1Z5",
"reverse_charge_tax_id": 982000000561063,
"line_items": [
{
"line_item_id": 10763000000140068,
"account_id": 982000000561057,
"description": "Marketing",
"amount": 112.5,
"tax_id": 982000000566007,
"item_order": 1,
"product_type": "goods",
"acquisition_vat_id": " ",
"reverse_charge_vat_id": " ",
"reverse_charge_tax_id": 982000000561063,
"tax_exemption_code": "string",
"tax_exemption_id": 982000000561067
}
],
"is_inclusive_tax": false,
"is_billable": true,
"reference_number": "#562SD23R4",
"description": "Marketing",
"customer_id": 982000000567001,
"currency_id": 982000000567001,
"exchange_rate": 1,
"project_id": 982000000567226,
"mileage_type": "non_mileage",
"vat_treatment": "overseas",
"product_type": "goods",
"acquisition_vat_id": " ",
"reverse_charge_vat_id": " ",
"start_reading": " ",
"end_reading": " ",
"distance": " ",
"mileage_unit": " ",
"mileage_rate": " ",
"employee_id": " ",
"vehicle_type": " ",
"can_reclaim_vat_on_mileage": " ",
"fuel_type": " ",
"engine_capacity_range": " "
}
{
"code": 0,
"message": "Expense information has been updated.",
"expense": {
"expense_id": 982000000030049,
"transaction_id": " ",
"transaction_type": "expense",
"expense_item_id": 982000000567220,
"gst_no": "22AAAAA0000A1Z5",
"gst_treatment": "business_gst",
"destination_of_supply": "TN",
"destination_of_supply_state": "TN",
"hsn_or_sac": 80540,
"source_of_supply": "AP",
"paid_through_account_name": "Petty Cash",
"vat_reg_no": "string",
"reverse_charge_tax_id": 982000000561063,
"reverse_charge_tax_name": "intra",
"reverse_charge_tax_percentage": 10,
"reverse_charge_tax_amount": 12,
"tax_amount": 11.85,
"is_itemized_expense": false,
"is_pre_gst": "fasle",
"trip_id": "",
"trip_number": "",
"reverse_charge_vat_total": 1.2,
"acquisition_vat_total": 0,
"acquisition_vat_summary": [
{
"tax": {
"tax_name": "SalesTax",
"tax_amount": 11.85
}
}
],
"reverse_charge_vat_summary": [
{
"tax": {
"tax_name": "SalesTax",
"tax_amount": 11.85
}
}
],
"account_id": 982000000561057,
"account_name": "Rent",
"date": "2013-11-18",
"tax_id": 982000000566007,
"tax_name": "SalesTax",
"tax_percentage": 10.5,
"currency_id": 982000000567001,
"currency_code": "USD",
"exchange_rate": 1,
"sub_total": 90,
"total": 100,
"bcy_total": 100,
"amount": 120.5,
"is_inclusive_tax": false,
"reference_number": "#562SD23R4",
"description": "Marketing",
"is_billable": true,
"is_personal": false,
"customer_id": 982000000567001,
"customer_name": "Bowman & Co",
"expense_receipt_name": " ",
"expense_receipt_type": " ",
"last_modified_time": "2013-12-18T02:17:40-0800",
"status": "unbilled",
"invoice_id": " ",
"invoice_number": " ",
"project_id": 982000000567226,
"project_name": " ",
"mileage_rate": " ",
"mileage_type": "non_mileage",
"expense_type": "non-mileage",
"start_reading": " ",
"end_reading": " "
}
}
Get an Expense
Get the details of the Expense. oauthscope : ZohoInvoice.expenses.READ
$ curl https://invoice.zoho.com/api/v3/expenses/{expense_id}
-H "X-com-zoho-invoice-organizationid: 10234695"
-H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"
{
"code": 0,
"message": "success",
"expense": {
"expense_id": 982000000030049,
"transaction_id": " ",
"transaction_type": "expense",
"expense_item_id": 982000000567220,
"gst_no": "22AAAAA0000A1Z5",
"gst_treatment": "business_gst",
"destination_of_supply": "TN",
"destination_of_supply_state": "TN",
"hsn_or_sac": 80540,
"source_of_supply": "AP",
"paid_through_account_name": "Petty Cash",
"vat_reg_no": "string",
"reverse_charge_tax_id": 982000000561063,
"reverse_charge_tax_name": "intra",
"reverse_charge_tax_percentage": 10,
"reverse_charge_tax_amount": 12,
"tax_amount": 11.85,
"is_itemized_expense": false,
"is_pre_gst": "fasle",
"trip_id": "",
"trip_number": "",
"reverse_charge_vat_total": 1.2,
"acquisition_vat_total": 0,
"acquisition_vat_summary": [
{
"tax": {
"tax_name": "SalesTax",
"tax_amount": 11.85
}
}
],
"reverse_charge_vat_summary": [
{
"tax": {
"tax_name": "SalesTax",
"tax_amount": 11.85
}
}
],
"account_id": 982000000561057,
"account_name": "Rent",
"date": "2013-11-18",
"tax_id": 982000000566007,
"tax_name": "SalesTax",
"tax_percentage": 10.5,
"currency_id": 982000000567001,
"currency_code": "USD",
"exchange_rate": 1,
"sub_total": 90,
"total": 100,
"bcy_total": 100,
"amount": 112.5,
"is_inclusive_tax": false,
"reference_number": "#562SD23R4",
"description": "Marketing",
"is_billable": true,
"is_personal": false,
"customer_id": 982000000567001,
"customer_name": "Bowman & Co",
"expense_receipt_name": " ",
"expense_receipt_type": " ",
"last_modified_time": "2013-12-18T02:17:40-0800",
"status": "unbilled",
"invoice_id": " ",
"invoice_number": " ",
"project_id": 982000000567226,
"project_name": " ",
"mileage_rate": " ",
"mileage_type": "non_mileage",
"expense_type": "non-mileage",
"start_reading": " ",
"end_reading": " ",
"line_item": {
"line_item_id": 10763000000140068,
"account_id": 982000000561057,
"account_name": "Rent",
"description": "Marketing",
"tax_amount": 11.85,
"tax_id": 982000000566007,
"tax_name": "SalesTax",
"tax_type": "tax",
"tax_percentage": 10.5,
"item_total": 100,
"item_order": 1,
"amount": 112.5,
"hsn_or_sac": 80540,
"reverse_charge_tax_id": 982000000561063,
"reverse_charge_tax_name": "intra",
"reverse_charge_tax_percentage": 10,
"reverse_charge_tax_amount": 12
}
}
}
Delete an Expense
Delete an existing expense. oauthscope : ZohoInvoice.expenses.DELETE
$ curl https://invoice.zoho.com/api/v3/expenses/{expense_id}
-X DELETE
-H "X-com-zoho-invoice-organizationid: 10234695"
-H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"
{
"code": 0,
"message": "The expense has been deleted."
}
List expense History & Comments
Get history and comments of an expense. oauthscope : ZohoInvoice.expenses.READ
$ curl https://invoice.zoho.com/api/v3/expenses/{expense_id}/comments
-H "X-com-zoho-invoice-organizationid: 10234695"
-H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"
{
"code": 0,
"message": "success",
"comments": [
{
"comment_id": 982000000567272,
"expense_id": 982000000030049,
"description": "Marketing",
"commented_by_id": 982000000554041,
"commented_by": "John David",
"date_description": "16 hours ago",
"time": "4.22AM",
"operation_type": "Added",
"transaction_id": " ",
"transaction_type": "expense"
},
{...},
{...}
]
}
Create an employee
Create an employee for an expense. oauthscope : ZohoInvoice.expenses.CREATE
Arguments
$ curl https://invoice.zoho.com/api/v3/employees
-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"}'
{
"name": "John David",
"email": "test@zylker.org"
}
{
"code": 0,
"message": "success",
"employee": {
"employee_id": " ",
"name": "John David",
"email": "test@zylker.org"
}
}
List employees
List employees with pagination. oauthscope : ZohoInvoice.expenses.READ
$ curl https://invoice.zoho.com/api/v3/employees
-H "X-com-zoho-invoice-organizationid: 10234695"
-H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"
{
"code": 0,
"message": "success",
"employees": [
{
"employee_id": " ",
"name": "John David",
"email": "test@zylker.org"
},
{...},
{...}
]
}
Get an employee
Get the details of the employee. oauthscope : ZohoInvoice.expenses.READ
$ curl https://invoice.zoho.com/api/v3/employees/{employee_id}
-H "X-com-zoho-invoice-organizationid: 10234695"
-H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"
{
"code": 0,
"message": "success",
"employee": {
"employee_id": " ",
"name": "John David",
"email": "test@zylker.org"
}
}
Delete an employee
Delete an existing employee. oauthscope : ZohoInvoice.expenses.DELETE
$ curl https://invoice.zoho.com/api/v3/employee/{employee_id}
-X DELETE
-H "X-com-zoho-invoice-organizationid: 10234695"
-H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"
{
"code": 0,
"message": "Employee has been deleted."
}