API Docs
/
No Results Found
Expenses

Expenses

An expense object allows you to maintain details of an expense.

Attribute

expense_id
long
Unique ID for expense. This is used as an identifier.
total
double
Total.
bcy_total
double
Total in base currency.
is_billable
boolean
Whether the expense is billable. It can either be true or false.
is_reimbursable
boolean
Whether the expense is reimbursable. It can either be true or false.
date
string
Date of the expense.
currency_id
long
Unique ID for currency.
currency_code
string
Currency code.
exchange_rate
double
Exchange rate.
is_inclusive_tax
boolean
Whether the expense amount is inclusive of tax. It can either be true or false.
customer_id
long
Unique ID for the customer.
customer_name
string
Name of the customer.
project_id
long
Unique ID for the project.
project_name
string
Name of the project.
paid_through_account_id
long
Unique ID for the paid through account.
paid_through_account_name
string
Name of the paid through account.
created_time
string
Time when the expense was created.
last_modified_time
string
Time when the expense was last modified.
status
string
Status of the expense report with which the expense is associated.
merchant_id
long
Unique ID for merchant.
merchant_name
string
Name of the merchant.
report_id
long
Unique ID for report.
report_name
string
Name of the expense report.
mileage_type
string
Mileage type. Possible values can be non_mileage or manual or odometer or gps or imaps or gmaps or wmaps.
due_days
string
Number of days till the due date.
is_expired
boolean
Whether the expense is expired. It can either be true or false.
gl_code
string
A unique reference code for the category.
payment_mode
string
Payment mode.
attendees
array
Attendees for the expense.
Show Sub-Attributes arrow
attendee_id
long
Unique ID for the attendee.
user_id
long
Unique ID for user.
department_id
long
Unique ID of the department.
department_name
string
Name of the department.
name
string
Name of the User.
employee_number
string
Employee Number.
customer_id
long
Unique ID for the customer.
email
string
Email Id of the User.
custom_fields
array
Custom Fields.
Show Sub-Attributes arrow
customfield_id
long
Unique Id for the Custom Field.
label
string
Label of the Custom Field.
value
string
Value of the Custom Field.
line_items
array
Line Items of the expense.
Show Sub-Attributes arrow
line_item_id
long
Unique ID for the line item.
category_id
long
Unique ID for expense category.
category_name
string
Name of the expense category.
description
string
Description about the line item.
tax_id
long
Unique ID for tax.
tax_name
string
Name of the tax.
tax_percentage
double
Tax percentage.
item_total
double
Total amount for the line item.
amount
double
Amount.
item_order
integer
Order of the line item.
tags
array
Tags associated with the Line Item.
Show Sub-Attributes arrow
tag_id
long
(Required)
Unique ID for Tag generated by the server.
tag_name
string
Name of the Tag.
tag_option_id
long
(Required)
Unique ID for Tag option generated by the server.
tag_option_name
string
Name of the Tag Option.

Example

[ { "expense_id": "16367000000083065", "total": 207.65, "bcy_total": 13900.79, "is_billable": true, "is_reimbursable": false, "date": "2017-02-21", "currency_id": "16367000000000097", "currency_code": "USD", "exchange_rate": 66.943366, "is_inclusive_tax": false, "customer_id": "27927000000075081", "customer_name": "ACME Corp.", "project_id": "27927000001243001", "project_name": "Coffee Research", "paid_through_account_id": "16367000000036003", "paid_through_account_name": "Employee Reimbursements", "created_time": "2017-02-21T18:33:12+0530", "last_modified_time": "2017-02-21T18:42:46+0530", "status": "submitted", "merchant_id": "16367000000074027", "merchant_name": "ABS Solutions", "report_id": "16367000000083075", "report_name": "Purchase", "mileage_type": "non_mileage", "due_days": "Due in 15 days", "is_expired": false, "gl_code": "LG001", "payment_mode": "Check", "attendees": [ { "attendee_id": "16367000000104051", "user_id": "27927000001331015", "department_id": "16367000000093001", "department_name": "Finance", "name": "Will Smith", "employee_number": "E001", "customer_id": "27927000000075081", "email": "will.smith@gmail.com" } ], "custom_fields": [ { "customfield_id": "16367000000277001", "label": "Other Name", "value": "Trip" } ], "line_items": [ { "line_item_id": "16367000000354007", "category_id": "16367000000000400", "category_name": "Office Supplies", "description": "Necessary Purchase", "tax_id": "16367000000086001", "tax_name": "Sales Tax", "tax_percentage": 2, "item_total": 207.65, "amount": 207.65, "item_order": 0, "tags": [ { "tag_id": "16367000000000301", "tag_name": "Tag 1", "tag_option_id": "16367000000225001", "tag_option_name": "Option 1" } ] } ] } ]

Create an expense

Create a new expense.

Arguments

currency_id
long
(Required)
Unique ID for currency.
date
string
Date of the expense.
is_reimbursable
boolean
Whether the expense is reimbursable. It can either be true or false.
paid_through_account_id
long
Unique ID for the paid through account.
distance
double
Distance travelled.
merchant_id
long
Unique ID for merchant.
report_id
long
Unique ID for report.
payment_mode
string
Payment mode.
customer_id
long
Unique ID for the customer.
project_id
long
Unique ID for the project.
is_billable
boolean
Whether the expense is billable. It can either be true or false.
is_inclusive_tax
boolean
Whether the expense amount is inclusive of tax. It can either be true or false.
attendees
array
Attendees for the expense.
Show Sub-Attributes arrow
user_id
long
Unique ID for user.
custom_fields
array
Custom Fields.
Show Sub-Attributes arrow
customfield_id
long
(Required)
Unique Id for the Custom Field.
value
string
(Required)
Value of the Custom Field.
line_items
array
(Required)
Line Items of the expense.
Show Sub-Attributes arrow
category_id
long
(Required)
Unique ID for expense category.
amount
double
(Required)
Amount.
tax_id
long
Unique ID for tax.
description
string
Description about the line item.
tags
array
Tags associated with the Line Item.
Show Sub-Attributes arrow
tag_id
long
(Required)
Unique ID for Tag generated by the server.
tag_name
string
Name of the Tag.
tag_option_id
long
(Required)
Unique ID for Tag option generated by the server.
tag_option_name
string
Name of the Tag Option.

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

Body Parameters

Click to copy
{ "currency_id": "16367000000000097", "date": "2017-02-21", "is_reimbursable": false, "paid_through_account_id": "16367000000036003", "distance": 0, "merchant_id": "16367000000074027", "report_id": "16367000000083075", "payment_mode": "Check", "customer_id": "27927000000075081", "project_id": "27927000001243001", "is_billable": true, "is_inclusive_tax": false, "attendees": [ { "user_id": "27927000001331015" } ], "custom_fields": [ { "customfield_id": "16367000000277001", "value": "Trip" } ], "line_items": [ { "category_id": "16367000000000400", "amount": 207.65, "tax_id": "16367000000086001", "description": "Necessary Purchase", "tags": [ { "tag_id": "16367000000000301", "tag_name": "Tag 1", "tag_option_id": "16367000000225001", "tag_option_name": "Option 1" } ] } ] }

Response Example

{ "code": 0, "message": "The expense has been recorded.", "expenses": [ { "expense_id": "16367000000083065", "total": 207.65, "bcy_total": 13900.79, "is_billable": true, "is_reimbursable": false, "date": "2017-02-21", "currency_id": "16367000000000097", "currency_code": "USD", "exchange_rate": 66.943366, "is_inclusive_tax": false, "customer_id": "27927000000075081", "customer_name": "ACME Corp.", "project_id": "27927000001243001", "project_name": "Coffee Research", "paid_through_account_id": "16367000000036003", "paid_through_account_name": "Employee Reimbursements", "created_time": "2017-02-21T18:33:12+0530", "last_modified_time": "2017-02-21T18:42:46+0530", "status": "submitted", "merchant_id": "16367000000074027", "merchant_name": "ABS Solutions", "report_id": "16367000000083075", "report_name": "Purchase", "mileage_type": "non_mileage", "due_days": "Due in 15 days", "is_expired": false, "gl_code": "LG001", "payment_mode": "Check", "attendees": [ { "attendee_id": "16367000000104051", "user_id": "27927000001331015", "department_id": "16367000000093001", "department_name": "Finance", "name": "Will Smith", "employee_number": "E001", "customer_id": "27927000000075081", "email": "will.smith@gmail.com" } ], "custom_fields": [ { "customfield_id": "16367000000277001", "label": "Other Name", "value": "Trip" } ], "line_items": [ { "line_item_id": "16367000000354007", "category_id": "16367000000000400", "category_name": "Office Supplies", "description": "Necessary Purchase", "tax_id": "16367000000086001", "tax_name": "Sales Tax", "tax_percentage": 2, "item_total": 207.65, "amount": 207.65, "item_order": 0, "tags": [ { "tag_id": "16367000000000301", "tag_name": "Tag 1", "tag_option_id": "16367000000225001", "tag_option_name": "Option 1" } ] } ] }, {...}, {...} ] }

List all expenses

List of all existing expenses.

Query Parameters

status
Status of the expense report with which the expense is associated.
date_start
Starting Date
date_end
Ending Date
user_id
Unique ID for user.
category_id
Unique ID for expense category.
merchant_id
Unique ID for merchant.
customer_id
Unique ID for the customer.
project_id
Unique ID for the project.

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

Response Example

{ "code": 0, "message": "success", "expenses": [ { "expense_id": "16367000000083065", "date": "2017-02-21", "description": "Necessary Purchase", "created_by": "16367000000074021", "created_by_name": "PATRICIA", "employee_number": "E001", "currency_id": "16367000000000097", "currency_code": "USD", "paid_through_account_id": "16367000000036003", "paid_through_account_name": "Employee Reimbursements", "bcy_total": 13900.79, "bcy_subtotal": 13900.79, "total": 207.65, "total_without_tax": 207.65, "is_billable": true, "is_reimbursable": false, "reference_number": "DD145", "due_days": "Due in 15 days", "merchant_id": "16367000000074027", "merchant_name": "ABS Solutions", "status": "submitted", "created_time": "2017-02-21T18:33:12+0530", "last_modified_time": "2017-02-21T18:42:46+0530", "receipt_name": "receipt1.jpg", "report_id": "16367000000083075", "mileage_type": "non_mileage", "report_name": "Purchase", "is_receipt_only": false, "distance": 0, "per_diem_rate": 0, "per_diem_days": 0, "per_diem_id": "", "per_diem_name": "", "expense_type": "non_mileage", "location": "Washington", "receipt_type": "jpg", "policy_violated": false, "comments_count": 0, "report_status": "submitted", "price_precision": 2, "mileage_rate": 0, "mileage_unit": "km", "receipt_status": "processed", "is_uncategorized": false, "is_expired": false, "gl_code": "LG001", "exchange_rate": 66.943366, "start_reading": "", "end_reading": "", "payment_mode": "Check", "customer_id": "27927000000075081", "customer_name": "ACME Corp.", "custom_fields": [ { "customfield_id": "16367000000277001", "label": "Other Name", "value": "Trip" } ], "project_id": "27927000001243001", "project_name": "Coffee Research", "transaction_description": "", "tax_id": "16367000000086001", "tax_name": "Sales Tax", "tax_percentage": 2, "amount": 207.65, "is_inclusive_tax": false, "vehicle_type": "Bike", "vehicle_id": "17456000000078029", "fuel_type": "lpg", "engine_capacity_range": "between_1401cc_and_1600cc", "is_personal": false, "policy_id": "16367000000092011", "policy_name": "LIC", "documents": [ { "file_name": "receipt1.jpg", "file_size_formatted": "71.8 KB", "attachment_order": 1, "document_id": "16367000000083071" } ], "reimbursement_reference": "", "reimbursement_date": "", "reimbursement_paid_through_account_id": "", "reimbursement_paid_through_account_name": "", "reimbursement_currency_id": "", "reimbursement_currency_code": "" }, {...}, {...} ] }

Update an expense

Update the details of an expense.

Arguments

paid_through_account_id
long
Unique ID for the paid through account.
date
string
Date of the expense.
is_reimbursable
boolean
Whether the expense is reimbursable. It can either be true or false.
currency_id
long
Unique ID for currency.
merchant_id
long
Unique ID for merchant.
report_id
long
Unique ID for report.
payment_mode
string
Payment mode.
customer_id
long
Unique ID for the customer.
project_id
long
Unique ID for the project.
is_billable
boolean
Whether the expense is billable. It can either be true or false.
is_inclusive_tax
boolean
Whether the expense amount is inclusive of tax. It can either be true or false.
attendees
array
Attendees for the expense.
Show Sub-Attributes arrow
attendee_id
long
Unique ID for the attendee.
user_id
long
Unique ID for user.
custom_fields
array
Custom Fields.
Show Sub-Attributes arrow
customfield_id
long
(Required)
Unique Id for the Custom Field.
value
string
(Required)
Value of the Custom Field.
line_items
array
(Required)
Line Items of the expense.
Show Sub-Attributes arrow
line_item_id
long
Unique ID for the line item.
category_id
long
Unique ID for expense category.
description
string
Description about the line item.
tax_id
long
Unique ID for tax.
amount
double
Amount.
item_order
integer
Order of the line item.
tags
array
Tags associated with the Line Item.
Show Sub-Attributes arrow
tag_id
long
(Required)
Unique ID for Tag generated by the server.
tag_name
string
Name of the Tag.
tag_option_id
long
(Required)
Unique ID for Tag option generated by the server.
tag_option_name
string
Name of the Tag Option.

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

Body Parameters

Click to copy
{ "paid_through_account_id": "16367000000036003", "date": "2017-02-21", "is_reimbursable": false, "currency_id": "16367000000000097", "merchant_id": "16367000000074027", "report_id": "16367000000083075", "payment_mode": "Check", "customer_id": "27927000000075081", "project_id": "27927000001243001", "is_billable": true, "is_inclusive_tax": false, "attendees": [ { "attendee_id": "16367000000104051", "user_id": "27927000001331015" } ], "custom_fields": [ { "customfield_id": "16367000000277001", "value": "Trip" } ], "line_items": [ { "line_item_id": "16367000000354007", "category_id": "16367000000000400", "description": "Necessary Purchase", "tax_id": "16367000000086001", "amount": 207.65, "item_order": 0, "tags": [ { "tag_id": "16367000000000301", "tag_name": "Tag 1", "tag_option_id": "16367000000225001", "tag_option_name": "Option 1" } ] } ] }

Response Example

{ "code": 0, "message": "Expense information has been updated.", "expense": { "expense_id": "16367000000083065", "total": 207.65, "bcy_total": 13900.79, "is_billable": true, "is_reimbursable": false, "date": "2017-02-21", "currency_id": "16367000000000097", "currency_code": "USD", "exchange_rate": 66.943366, "is_inclusive_tax": false, "customer_id": "27927000000075081", "customer_name": "ACME Corp.", "project_id": "27927000001243001", "project_name": "Coffee Research", "paid_through_account_id": "16367000000036003", "paid_through_account_name": "Employee Reimbursements", "created_time": "2017-02-21T18:33:12+0530", "last_modified_time": "2017-02-21T18:42:46+0530", "status": "submitted", "merchant_id": "16367000000074027", "merchant_name": "ABS Solutions", "report_id": "16367000000083075", "report_name": "Purchase", "mileage_type": "non_mileage", "due_days": "Due in 15 days", "is_expired": false, "gl_code": "LG001", "payment_mode": "Check", "attendees": [ { "attendee_id": "16367000000104051", "user_id": "27927000001331015", "department_id": "16367000000093001", "department_name": "Finance", "name": "Will Smith", "employee_number": "E001", "customer_id": "27927000000075081", "email": "will.smith@gmail.com" } ], "policy_name": "LIC", "custom_fields": [ { "customfield_id": "16367000000277001", "label": "Other Name", "value": "Trip" } ], "line_items": [ { "line_item_id": "16367000000354007", "category_id": "16367000000000400", "category_name": "Office Supplies", "description": "Necessary Purchase", "tax_id": "16367000000086001", "tax_name": "Sales Tax", "tax_percentage": 2, "item_total": 207.65, "amount": 207.65, "item_order": 0, "tags": [ { "tag_id": "16367000000000301", "tag_name": "Tag 1", "tag_option_id": "16367000000225001", "tag_option_name": "Option 1" } ] } ] } }

Merge expenses

Merge multiple expenses.

Query Parameters

duplicate_expense_id
(Required)
Unique ID of the expense to be merged.

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/expenses/16367000000083065/merge?duplicate_expense_id=16367000000083070" 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/expenses/16367000000083065/merge?duplicate_expense_id=16367000000083070") .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/expenses/16367000000083065/merge?duplicate_expense_id=16367000000083070', 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/expenses/16367000000083065/merge?duplicate_expense_id=16367000000083070", 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/expenses/16367000000083065/merge?duplicate_expense_id=16367000000083070", "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/expenses/16367000000083065/merge?duplicate_expense_id=16367000000083070' \ --header 'X-com-zoho-expense-organizationid: 10234695'

Response Example

{ "code": 0, "message": "Expenses merged successfully." }