Expenses

Expenses AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

Attribute

expense_id
string
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
string
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
string
Unique ID for the customer.
customer_name
string
Name of the customer.
project_id
string
Unique ID for the project.
project_name
string
Name of the project.
paid_through_account_id
string
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
string
Unique ID for merchant.
merchant_name
string
Name of the merchant.
report_id
string
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
string
Unique ID for the attendee.
user_id
string
Unique ID for user.
department_id
string
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
string
Unique ID for the customer.
email
string
Email Id of the User.
custom_fields
array
Custom Fields.
Show Sub-Attributes arrow
customfield_id
string
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
string
Unique ID for the line item.
category_id
string
Unique ID for expense category.
category_name
string
Name of the expense category.
description
string
Description about the line item.
tax_id
string
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
string
(Required)
Unique ID for Tag generated by the server.
tag_name
string
Name of the Tag.
tag_option_id
string
(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 AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

To create a new expense, pass the organization ID. Provide the amount, currency, date, and expense category as required fields. You can also include optional details such as merchant name, description, payment mode, project, cost center, tags, and custom fields.
OAuth Scope : ZohoExpense.expense.CREATE

Arguments

currency_id
string
(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
string
Unique ID for the paid through account.
distance
double
Distance travelled.
merchant_id
string
Unique ID for merchant.
report_id
string
Unique ID for report.
payment_mode
string
Payment mode.
customer_id
string
Unique ID for the customer.
project_id
string
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
string
Unique ID for user.
custom_fields
array
Custom Fields.
Show Sub-Attributes arrow
customfield_id
string
(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
string
(Required)
Unique ID for expense category.
amount
double
(Required)
Amount.
tax_id
string
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
string
(Required)
Unique ID for Tag generated by the server.
tag_name
string
Name of the Tag.
tag_option_id
string
(Required)
Unique ID for Tag option generated by the server.
tag_option_name
string
Name of the Tag Option.

Headers

X-com-zoho-expense-organizationid
string
(Required)
ID of the organization

Request Example

Click to copy
parameters_data='{"field1":"value1","field2":"value2"}'; headers_data = Map(); headers_data.put("X-com-zoho-expense-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); 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("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
const options = { method: 'POST', headers: { 'X-com-zoho-expense-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f', '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", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", '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", "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", "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 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --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 AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

To retrieve all expenses in your organization, pass the organization ID. You can narrow down the results using optional filters such as status, category, project, submitted by, and date range.
OAuth Scope : ZohoExpense.expense.READ

Query Parameters

status
string
Status of the expense report with which the expense is associated.
date_start
string
Starting Date
date_end
string
Ending Date
category_id
string
Unique ID for expense category.
merchant_id
string
Unique ID for merchant.
customer_id
string
Unique ID for the customer.
project_id
string
Unique ID for the project.
page
integer
Page number to be fetched. Default value is 1.
per_page
integer
Number of records to be fetched per page. Default value is 200.

Headers

X-com-zoho-expense-organizationid
string
(Required)
ID of the organization

Request Example

Click to copy
headers_data = Map(); headers_data.put("X-com-zoho-expense-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/expense/v1/expenses" 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/expenses") .get() .addHeader("X-com-zoho-expense-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'GET', headers: { 'X-com-zoho-expense-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; 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") headers = { 'X-com-zoho-expense-organizationid': "10234695", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/expense/v1/expenses", 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/expenses", "headers": { "X-com-zoho-expense-organizationid": "10234695", "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } }; 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/expenses \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-expense-organizationid: 10234695'

Response Example

{ "code": 0, "message": "success", "page_context": { "page": 1, "per_page": 200, "has_more_page": false, "report_name": "Expenses", "applied_filter": "Status.All", "sort_column": "created_time", "sort_order": "D" }, "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": "" } ] }

Delete multiple expenses AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

To delete multiple expenses at once, pass the organization ID and provide an array of expense identifiers in the request body. You cannot delete expenses in the Submitted, Approved, and Reimbursed statuses.
OAuth Scope : ZohoExpense.expense.DELETE

Query Parameters

expense_ids
string
(Required)
Comma-separated unique IDs of the expenses to be deleted.
receipt
boolean
Set to true to delete only the receipts attached to the expenses. Allowed values true and false.

Headers

X-com-zoho-expense-organizationid
string
(Required)
ID of the organization

Request Example

Click to copy
headers_data = Map(); headers_data.put("X-com-zoho-expense-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/expense/v1/expenses?expense_ids=16367000000083065,16367000000083070" 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/expenses?expense_ids=16367000000083065%2C16367000000083070") .delete(null) .addHeader("X-com-zoho-expense-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'DELETE', headers: { 'X-com-zoho-expense-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/expense/v1/expenses?expense_ids=16367000000083065%2C16367000000083070', 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", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("DELETE", "/expense/v1/expenses?expense_ids=16367000000083065%2C16367000000083070", 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/expenses?expense_ids=16367000000083065%2C16367000000083070", "headers": { "X-com-zoho-expense-organizationid": "10234695", "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } }; 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/expenses?expense_ids=16367000000083065%2C16367000000083070' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-expense-organizationid: 10234695'

Response Example

{ "code": 0, "message": "The selected expenses have been deleted." }

Update an expense AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

To update an expense, pass the organization ID and specify the expense in the request URL. Include only the fields you want to update, such as amount, date, category, merchant name, description, project, cost center, or custom fields.
OAuth Scope : ZohoExpense.expense.UPDATE

Arguments

paid_through_account_id
string
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
string
Unique ID for currency.
merchant_id
string
Unique ID for merchant.
report_id
string
Unique ID for report.
payment_mode
string
Payment mode.
customer_id
string
Unique ID for the customer.
project_id
string
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
string
Unique ID for the attendee.
user_id
string
Unique ID for user.
custom_fields
array
Custom Fields.
Show Sub-Attributes arrow
customfield_id
string
(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
string
Unique ID for the line item.
category_id
string
Unique ID for expense category.
description
string
Description about the line item.
tax_id
string
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
string
(Required)
Unique ID for Tag generated by the server.
tag_name
string
Name of the Tag.
tag_option_id
string
(Required)
Unique ID for Tag option generated by the server.
tag_option_name
string
Name of the Tag Option.

Path Parameters

expense_id
string
(Required)
Unique identifier of the expense.

Headers

X-com-zoho-expense-organizationid
string
(Required)
ID of the organization

Request Example

Click to copy
parameters_data='{"field1":"value1","field2":"value2"}'; headers_data = Map(); headers_data.put("X-com-zoho-expense-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); 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("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
const options = { method: 'PUT', headers: { 'X-com-zoho-expense-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f', '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", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", '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", "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", "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 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --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" } ] } ] } }

Get an expense AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

To retrieve the full details of a specific expense, pass the organization ID along with the expense identifier in the request URL.
OAuth Scope : ZohoExpense.expense.READ

Path Parameters

expense_id
string
(Required)
Unique identifier of the expense.

Headers

X-com-zoho-expense-organizationid
string
(Required)
ID of the organization

Request Example

Click to copy
headers_data = Map(); headers_data.put("X-com-zoho-expense-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/expense/v1/expenses/16367000000083065" 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/expenses/16367000000083065") .get() .addHeader("X-com-zoho-expense-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'GET', headers: { 'X-com-zoho-expense-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; 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") headers = { 'X-com-zoho-expense-organizationid': "10234695", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/expense/v1/expenses/16367000000083065", 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/expenses/16367000000083065", "headers": { "X-com-zoho-expense-organizationid": "10234695", "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } }; 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/expenses/16367000000083065 \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-expense-organizationid: 10234695'

Response Example

{ "code": 0, "message": "success", "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" } ], "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" } ] } ] } }

Delete an expense AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

To delete a single expense, pass the organization ID and specify the expense in the request URL. You cannot delete expenses in the Submitted, Approved, and Reimbursed statuses.
OAuth Scope : ZohoExpense.expense.DELETE

Path Parameters

expense_id
string
(Required)
Unique identifier of the expense.

Query Parameters

receipt
boolean
Set to true to delete only the receipt attached to the expense. Allowed values true and false.

Headers

X-com-zoho-expense-organizationid
string
(Required)
ID of the organization

Request Example

Click to copy
headers_data = Map(); headers_data.put("X-com-zoho-expense-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/expense/v1/expenses/16367000000083065" 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/expenses/16367000000083065") .delete(null) .addHeader("X-com-zoho-expense-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'DELETE', headers: { 'X-com-zoho-expense-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; 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") headers = { 'X-com-zoho-expense-organizationid': "10234695", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("DELETE", "/expense/v1/expenses/16367000000083065", 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/expenses/16367000000083065", "headers": { "X-com-zoho-expense-organizationid": "10234695", "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } }; 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/expenses/16367000000083065 \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-expense-organizationid: 10234695'

Response Example

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

Bulk add expenses AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

To create multiple expenses in a single request, pass the organization ID and provide an array of expense objects in the request body. Each object must include the amount, currency, date, and category. Additional expense-level fields can be included per object as needed.
OAuth Scope : ZohoExpense.expense.CREATE

Arguments

expenses
array
(Required)
List of expenses. Each expense carries its category and amount directly (not nested under line_items).
Show Sub-Attributes arrow
category_id
string
(Required)
Unique ID for expense category.
amount
double
(Required)
Amount.
date
string
Date of the expense.
currency_id
string
Unique ID for currency.
tax_id
string
Unique ID for tax.
description
string
Description about the line item.
reference_number
string
Reference number of the expense.
merchant_id
string
Unique ID for merchant.
report_id
string
Unique ID for report.
customer_id
string
Unique ID for the customer.
project_id
string
Unique ID for the project.
payment_mode
string
Payment mode.
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.
is_inclusive_tax
boolean
Whether the expense amount is inclusive of tax. It can either be true or false.
is_personal
boolean
Whether the expense personal. It can either be true or false.
tags
array
Tags associated with the Line Item.
Show Sub-Attributes arrow
tag_id
string
(Required)
Unique ID for Tag generated by the server.
tag_name
string
Name of the Tag.
tag_option_id
string
(Required)
Unique ID for Tag option generated by the server.
tag_option_name
string
Name of the Tag Option.

Headers

X-com-zoho-expense-organizationid
string
(Required)
ID of the organization

Request Example

Click to copy
parameters_data='{"field1":"value1","field2":"value2"}'; headers_data = Map(); headers_data.put("X-com-zoho-expense-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/expense/v1/expenses/bulkadd" 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/bulkadd") .post(body) .addHeader("X-com-zoho-expense-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
const options = { method: 'POST', headers: { 'X-com-zoho-expense-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f', 'content-type': 'application/json' }, body: '{"field1":"value1","field2":"value2"}' }; fetch('https://www.zohoapis.com/expense/v1/expenses/bulkadd', 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", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("POST", "/expense/v1/expenses/bulkadd", 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/bulkadd", "headers": { "X-com-zoho-expense-organizationid": "10234695", "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", "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/bulkadd \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-expense-organizationid: 10234695' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "expenses": [ { "category_id": "16367000000000400", "amount": 207.65, "date": "2017-02-21", "currency_id": "16367000000000097", "tax_id": "16367000000086001", "description": "Necessary Purchase", "reference_number": "DD145", "merchant_id": "16367000000074027", "report_id": "16367000000083075", "customer_id": "27927000000075081", "project_id": "27927000001243001", "payment_mode": "Check", "is_billable": true, "is_reimbursable": false, "is_inclusive_tax": false, "is_personal": false, "tags": [ { "tag_id": "16367000000000301", "tag_name": "Tag 1", "tag_option_id": "16367000000225001", "tag_option_name": "Option 1" } ] } ] }

Response Example

{ "code": 0, "message": "The expenses have 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" } ] } ] }, {...}, {...} ] }

Bulk update a field AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

To update a single field across multiple expenses at once, pass the organization ID and provide an array of expense identifiers, the field name to update, and the new value.
OAuth Scope : ZohoExpense.expense.CREATE

Arguments

description
string
Description about the line item.
paid_through_account_id
string
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
string
Unique ID for currency.
merchant_id
string
Unique ID for merchant.
report_id
string
Unique ID for report.
payment_mode
string
Payment mode.
customer_id
string
Unique ID for the customer.
project_id
string
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.

Query Parameters

expense_ids
string
(Required)
Comma-separated unique IDs of the expenses to update.

Headers

X-com-zoho-expense-organizationid
string
(Required)
ID of the organization

Request Example

Click to copy
parameters_data='{"field1":"value1","field2":"value2"}'; headers_data = Map(); headers_data.put("X-com-zoho-expense-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/expense/v1/expenses/bulkfieldupdate?expense_ids=16367000000083065,16367000000083070" 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/bulkfieldupdate?expense_ids=16367000000083065%2C16367000000083070") .post(body) .addHeader("X-com-zoho-expense-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
const options = { method: 'POST', headers: { 'X-com-zoho-expense-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f', 'content-type': 'application/json' }, body: '{"field1":"value1","field2":"value2"}' }; fetch('https://www.zohoapis.com/expense/v1/expenses/bulkfieldupdate?expense_ids=16367000000083065%2C16367000000083070', 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", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("POST", "/expense/v1/expenses/bulkfieldupdate?expense_ids=16367000000083065%2C16367000000083070", 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/bulkfieldupdate?expense_ids=16367000000083065%2C16367000000083070", "headers": { "X-com-zoho-expense-organizationid": "10234695", "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", "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/bulkfieldupdate?expense_ids=16367000000083065%2C16367000000083070' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-expense-organizationid: 10234695' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "description": "Necessary Purchase", "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 }

Response Example

{ "code": 0, "message": "success" }

Add documents to an expense AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

To attach documents to an expense, pass the organization ID and specify the expense. Upload the document files (PDF, JPG, or PNG) in the request body. You can optionally flag one document as the primary document at the time of upload.
OAuth Scope : ZohoExpense.expense.CREATE

Arguments

attachment
binary
Receipt document file to attach to the expense. Used for direct file uploads.
doc
string
JSON string describing documents to attach from a connected cloud source. Supported sources: Zoho WorkDrive, Google Drive, OneDrive, Dropbox, Box, and Evernote. Each entry contains the docId, docName, and docType of the cloud file.
totalFiles
integer
Total number of files being attached from the cloud source.

Path Parameters

expense_id
string
(Required)
Unique identifier of the expense.

Headers

X-com-zoho-expense-organizationid
string
(Required)
ID of the organization

Request Example

Click to copy
parameters_data = Map(); parameters_data.put("field1", "value1") parameters_data.put("field2", "value2") headers_data = Map(); headers_data.put("X-com-zoho-expense-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/expense/v1/expenses/16367000000083065/documents" type: POST headers: headers_data parameters: parameters_data connection: <connection_name> ]; info response;
OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("multipart/form-data; boundary=---011000010111000001101001"); RequestBody body = RequestBody.create(mediaType, "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"field1\"\r\n\r\nvalue1\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"field2\"\r\n\r\nvalue2\r\n-----011000010111000001101001--\r\n"); Request request = new Request.Builder() .url("https://www.zohoapis.com/expense/v1/expenses/16367000000083065/documents") .post(body) .addHeader("X-com-zoho-expense-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "multipart/form-data; boundary=---011000010111000001101001") .build(); Response response = client.newCall(request).execute();
const form = new FormData(); form.append("field1", "value1"); form.append("field2", "value2"); const options = { method: 'POST', headers: { 'X-com-zoho-expense-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f', 'content-type': 'multipart/form-data; boundary=---011000010111000001101001' } }; options.body = form; fetch('https://www.zohoapis.com/expense/v1/expenses/16367000000083065/documents', 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 = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"field1\"\r\n\r\nvalue1\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"field2\"\r\n\r\nvalue2\r\n-----011000010111000001101001--\r\n" headers = { 'X-com-zoho-expense-organizationid': "10234695", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "multipart/form-data; boundary=---011000010111000001101001" } conn.request("POST", "/expense/v1/expenses/16367000000083065/documents", 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/16367000000083065/documents", "headers": { "X-com-zoho-expense-organizationid": "10234695", "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", "content-type": "multipart/form-data; boundary=---011000010111000001101001" } }; 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("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"field1\"\r\n\r\nvalue1\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"field2\"\r\n\r\nvalue2\r\n-----011000010111000001101001--\r\n"); req.end();
curl --request POST \ --url https://www.zohoapis.com/expense/v1/expenses/16367000000083065/documents \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-expense-organizationid: 10234695' \ --header 'content-type: multipart/form-data' \ --form field1=value1 \ --form field2=value2

Body Parameters

Click to copy
{ "attachment": "string", "doc": "{\"dropbox\":{},\"box\":{},\"gdrive\":{},\"onedrive\":{},\"evernote\":{},\"workdrive\":[{\"docId\":\"go0n4773876005b6540b9aa6cdd82646ee729\",\"docName\":\"receipt.png\",\"docType\":\"image/png\"}]}", "totalFiles": 1 }

Response Example

{ "code": 0, "message": "success", "documents": [ { "document_id": "16367000000083071", "file_name": "receipt1.jpg", "file_type": "jpg", "file_size": 73503, "file_size_formatted": "71.8 KB" }, {...}, {...} ] }

Get an expense document AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

To retrieve a specific document attached to an expense, pass the organization ID and specify both the expense and the document.
OAuth Scope : ZohoExpense.expense.READ

Path Parameters

expense_id
string
(Required)
Unique identifier of the expense.
document_id
string
(Required)
Unique identifier of the document.

Query Parameters

image_size
string
Size of the document image to be returned. Allowed values thumb, medium, large and original.

Headers

X-com-zoho-expense-organizationid
string
(Required)
ID of the organization

Request Example

Click to copy
headers_data = Map(); headers_data.put("X-com-zoho-expense-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/expense/v1/expenses/16367000000083065/documents/16367000000083071" 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/expenses/16367000000083065/documents/16367000000083071") .get() .addHeader("X-com-zoho-expense-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'GET', headers: { 'X-com-zoho-expense-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/expense/v1/expenses/16367000000083065/documents/16367000000083071', 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", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/expense/v1/expenses/16367000000083065/documents/16367000000083071", 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/expenses/16367000000083065/documents/16367000000083071", "headers": { "X-com-zoho-expense-organizationid": "10234695", "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } }; 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/expenses/16367000000083065/documents/16367000000083071 \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-expense-organizationid: 10234695'

Response Example

{ "code": 0, "message": "success" }

Delete an expense document AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

To remove a document from an expense, pass the organization ID and specify both the expense and the document.
OAuth Scope : ZohoExpense.expense.DELETE

Path Parameters

expense_id
string
(Required)
Unique identifier of the expense.
document_id
string
(Required)
Unique identifier of the document.

Headers

X-com-zoho-expense-organizationid
string
(Required)
ID of the organization

Request Example

Click to copy
headers_data = Map(); headers_data.put("X-com-zoho-expense-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/expense/v1/expenses/16367000000083065/documents/16367000000083071" 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/expenses/16367000000083065/documents/16367000000083071") .delete(null) .addHeader("X-com-zoho-expense-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'DELETE', headers: { 'X-com-zoho-expense-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/expense/v1/expenses/16367000000083065/documents/16367000000083071', 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", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("DELETE", "/expense/v1/expenses/16367000000083065/documents/16367000000083071", 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/expenses/16367000000083065/documents/16367000000083071", "headers": { "X-com-zoho-expense-organizationid": "10234695", "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } }; 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/expenses/16367000000083065/documents/16367000000083071 \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-expense-organizationid: 10234695'

Response Example

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

Mark a document as primary AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

To set a document as the primary document for an expense, pass the organization ID and specify both the expense and the document.
OAuth Scope : ZohoExpense.expense.CREATE

Path Parameters

expense_id
string
(Required)
Unique identifier of the expense.
document_id
string
(Required)
Unique identifier of the document.

Headers

X-com-zoho-expense-organizationid
string
(Required)
ID of the organization

Request Example

Click to copy
headers_data = Map(); headers_data.put("X-com-zoho-expense-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/expense/v1/expenses/16367000000083065/documents/16367000000083071/primary" 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/documents/16367000000083071/primary") .post(null) .addHeader("X-com-zoho-expense-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'POST', headers: { 'X-com-zoho-expense-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/expense/v1/expenses/16367000000083065/documents/16367000000083071/primary', 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", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("POST", "/expense/v1/expenses/16367000000083065/documents/16367000000083071/primary", 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/documents/16367000000083071/primary", "headers": { "X-com-zoho-expense-organizationid": "10234695", "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } }; 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/documents/16367000000083071/primary \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-expense-organizationid: 10234695'

Response Example

{ "code": 0, "message": "success", "documents": [ { "document_id": "16367000000083071", "file_name": "receipt1.jpg", "file_type": "jpg", "file_size": 73503, "file_size_formatted": "71.8 KB" }, {...}, {...} ] }

Split an expense AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

To split an expense, pass the organization ID and specify the expense. Provide an array of split objects, each containing the amount and category. The sum of all split amounts must equal the original expense amount. You can optionally assign different project, cost center, or custom field values to each split.
OAuth Scope : ZohoExpense.expense.CREATE

Arguments

expenses
array
(Required)
List of expenses. Each expense carries its category and amount directly (not nested under line_items).
Show Sub-Attributes arrow
category_id
string
(Required)
Unique ID for expense category.
amount
double
(Required)
Amount.
date
string
Date of the expense.
currency_id
string
Unique ID for currency.
tax_id
string
Unique ID for tax.
description
string
Description about the line item.
reference_number
string
Reference number of the expense.
merchant_id
string
Unique ID for merchant.
report_id
string
Unique ID for report.
customer_id
string
Unique ID for the customer.
project_id
string
Unique ID for the project.
payment_mode
string
Payment mode.
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.
is_inclusive_tax
boolean
Whether the expense amount is inclusive of tax. It can either be true or false.
is_personal
boolean
Whether the expense personal. It can either be true or false.
tags
array
Tags associated with the Line Item.
Show Sub-Attributes arrow
tag_id
string
(Required)
Unique ID for Tag generated by the server.
tag_name
string
Name of the Tag.
tag_option_id
string
(Required)
Unique ID for Tag option generated by the server.
tag_option_name
string
Name of the Tag Option.

Path Parameters

expense_id
string
(Required)
Unique identifier of the expense.

Headers

X-com-zoho-expense-organizationid
string
(Required)
ID of the organization

Request Example

Click to copy
parameters_data='{"field1":"value1","field2":"value2"}'; headers_data = Map(); headers_data.put("X-com-zoho-expense-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/expense/v1/expenses/16367000000083065/split" 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/16367000000083065/split") .post(body) .addHeader("X-com-zoho-expense-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
const options = { method: 'POST', headers: { 'X-com-zoho-expense-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f', 'content-type': 'application/json' }, body: '{"field1":"value1","field2":"value2"}' }; fetch('https://www.zohoapis.com/expense/v1/expenses/16367000000083065/split', 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", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("POST", "/expense/v1/expenses/16367000000083065/split", 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/16367000000083065/split", "headers": { "X-com-zoho-expense-organizationid": "10234695", "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", "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/16367000000083065/split \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-expense-organizationid: 10234695' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "expenses": [ { "category_id": "16367000000000400", "amount": 207.65, "date": "2017-02-21", "currency_id": "16367000000000097", "tax_id": "16367000000086001", "description": "Necessary Purchase", "reference_number": "DD145", "merchant_id": "16367000000074027", "report_id": "16367000000083075", "customer_id": "27927000000075081", "project_id": "27927000001243001", "payment_mode": "Check", "is_billable": true, "is_reimbursable": false, "is_inclusive_tax": false, "is_personal": false, "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 split.", "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" } ] } ] }, {...}, {...} ] }

Merge expenses AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

To merge multiple expenses into one, pass the organization ID. Provide an array of at least two expense identifiers and specify which one should be the primary expense, the one into which the others will be merged. You cannot merge Submitted, Approved, and Reimbursed expenses.
OAuth Scope : ZohoExpense.expense.CREATE

Path Parameters

expense_id
string
(Required)
Unique identifier of the expense.

Query Parameters

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

Headers

X-com-zoho-expense-organizationid
string
(Required)
ID of the organization

Request Example

Click to copy
headers_data = Map(); headers_data.put("X-com-zoho-expense-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); 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") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'POST', headers: { 'X-com-zoho-expense-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; 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", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } 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", "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } }; 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 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-expense-organizationid: 10234695'

Response Example

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

List duplicate expenses AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

To retrieve expenses flagged as potential duplicates in your organization, pass the organization ID. You can optionally filter the results by date range, status, or the employee who submitted the expenses.
OAuth Scope : ZohoExpense.expense.READ

Path Parameters

expense_id
string
(Required)
Unique identifier of the expense.

Headers

X-com-zoho-expense-organizationid
string
(Required)
ID of the organization

Request Example

Click to copy
headers_data = Map(); headers_data.put("X-com-zoho-expense-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/expense/v1/expenses/16367000000083065/duplicates" 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/expenses/16367000000083065/duplicates") .get() .addHeader("X-com-zoho-expense-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'GET', headers: { 'X-com-zoho-expense-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/expense/v1/expenses/16367000000083065/duplicates', 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", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/expense/v1/expenses/16367000000083065/duplicates", 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/expenses/16367000000083065/duplicates", "headers": { "X-com-zoho-expense-organizationid": "10234695", "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } }; 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/expenses/16367000000083065/duplicates \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-expense-organizationid: 10234695'

Response Example

{ "code": 0, "message": "success", "page_context": { "page": 1, "per_page": 200, "has_more_page": false, "report_name": "Expenses", "applied_filter": "Status.All", "sort_column": "created_time", "sort_order": "D" }, "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": "" } ] }

Skip duplicate detection AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

To mark an expense as not a duplicate and bypass further duplicate detection, pass the organization ID and specify the expense.
OAuth Scope : ZohoExpense.expense.CREATE

Path Parameters

expense_id
string
(Required)
Unique identifier of the expense.

Headers

X-com-zoho-expense-organizationid
string
(Required)
ID of the organization

Request Example

Click to copy
headers_data = Map(); headers_data.put("X-com-zoho-expense-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/expense/v1/expenses/16367000000083065/skipduplicate" 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/skipduplicate") .post(null) .addHeader("X-com-zoho-expense-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'POST', headers: { 'X-com-zoho-expense-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/expense/v1/expenses/16367000000083065/skipduplicate', 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", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("POST", "/expense/v1/expenses/16367000000083065/skipduplicate", 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/skipduplicate", "headers": { "X-com-zoho-expense-organizationid": "10234695", "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } }; 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/skipduplicate \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-expense-organizationid: 10234695'

Response Example

{ "code": 0, "message": "success" }

Add a comment AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

To add a comment to an expense, pass the organization ID, specify the expense, and include the comment text in the request body.
OAuth Scope : ZohoExpense.expense.CREATE

Arguments

comments
string
(Required)
Content of the comment.

Path Parameters

expense_id
string
(Required)
Unique identifier of the expense.

Headers

X-com-zoho-expense-organizationid
string
(Required)
ID of the organization

Request Example

Click to copy
parameters_data='{"field1":"value1","field2":"value2"}'; headers_data = Map(); headers_data.put("X-com-zoho-expense-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/expense/v1/expenses/16367000000083065/comments" 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/16367000000083065/comments") .post(body) .addHeader("X-com-zoho-expense-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
const options = { method: 'POST', headers: { 'X-com-zoho-expense-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f', 'content-type': 'application/json' }, body: '{"field1":"value1","field2":"value2"}' }; fetch('https://www.zohoapis.com/expense/v1/expenses/16367000000083065/comments', 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", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("POST", "/expense/v1/expenses/16367000000083065/comments", 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/16367000000083065/comments", "headers": { "X-com-zoho-expense-organizationid": "10234695", "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", "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/16367000000083065/comments \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-expense-organizationid: 10234695' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "comments": "Receipt attached for verification." }

Response Example

{ "code": 0, "message": "Comment has been added.", "comment": { "comment_id": "16367000000095001", "expense_id": "16367000000083065", "description": "Necessary Purchase", "commented_by_id": "16367000000074021", "commented_by": "PATRICIA", "date": "2017-02-21", "time": "11:03 AM" } }

List expense comments AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

To retrieve all comments on an expense, pass the organization ID and specify the expense.
OAuth Scope : ZohoExpense.expense.READ

Path Parameters

expense_id
string
(Required)
Unique identifier of the expense.

Headers

X-com-zoho-expense-organizationid
string
(Required)
ID of the organization

Request Example

Click to copy
headers_data = Map(); headers_data.put("X-com-zoho-expense-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/expense/v1/expenses/16367000000083065/comments" 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/expenses/16367000000083065/comments") .get() .addHeader("X-com-zoho-expense-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'GET', headers: { 'X-com-zoho-expense-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/expense/v1/expenses/16367000000083065/comments', 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", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/expense/v1/expenses/16367000000083065/comments", 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/expenses/16367000000083065/comments", "headers": { "X-com-zoho-expense-organizationid": "10234695", "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } }; 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/expenses/16367000000083065/comments \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-expense-organizationid: 10234695'

Response Example

{ "code": 0, "message": "success", "comments": [ { "comment_id": "16367000000095001", "expense_id": "16367000000083065", "description": "Necessary Purchase", "comments": "Receipt attached for verification.", "commented_by_id": "16367000000074021", "commented_by": "PATRICIA", "date": "2017-02-21", "time": "11:03 AM", "type": "comment" }, {...}, {...} ] }

Delete a comment AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

To delete a comment, pass the organization ID and specify both the expense and the comment. Users can only delete comments they authored.
OAuth Scope : ZohoExpense.expense.report.DELETE

Path Parameters

expense_id
string
(Required)
Unique identifier of the expense.
comment_id
string
(Required)
Unique identifier of the comment.

Headers

X-com-zoho-expense-organizationid
string
(Required)
ID of the organization

Request Example

Click to copy
headers_data = Map(); headers_data.put("X-com-zoho-expense-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/expense/v1/expenses/16367000000083065/comments/16367000000095001" 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/expenses/16367000000083065/comments/16367000000095001") .delete(null) .addHeader("X-com-zoho-expense-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'DELETE', headers: { 'X-com-zoho-expense-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/expense/v1/expenses/16367000000083065/comments/16367000000095001', 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", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("DELETE", "/expense/v1/expenses/16367000000083065/comments/16367000000095001", 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/expenses/16367000000083065/comments/16367000000095001", "headers": { "X-com-zoho-expense-organizationid": "10234695", "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } }; 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/expenses/16367000000083065/comments/16367000000095001 \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-expense-organizationid: 10234695'

Response Example

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

Associate tags AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

To link tags to an expense, pass the organization ID, specify the expense, and provide an array of tag identifiers in the request body. Tags must already exist in your organization. Use the Tags API to create them before associating.
OAuth Scope : ZohoExpense.expense.CREATE

Arguments

tags
array
(Required)
Tags associated with the Line Item.
Show Sub-Attributes arrow
tag_id
string
(Required)
Unique ID for Tag generated by the server.
tag_name
string
Name of the Tag.
tag_option_id
string
(Required)
Unique ID for Tag option generated by the server.
tag_option_name
string
Name of the Tag Option.

Path Parameters

expense_id
string
(Required)
Unique identifier of the expense.

Headers

X-com-zoho-expense-organizationid
string
(Required)
ID of the organization

Request Example

Click to copy
parameters_data='{"field1":"value1","field2":"value2"}'; headers_data = Map(); headers_data.put("X-com-zoho-expense-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/expense/v1/expenses/16367000000083065/tags" 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/16367000000083065/tags") .post(body) .addHeader("X-com-zoho-expense-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
const options = { method: 'POST', headers: { 'X-com-zoho-expense-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f', 'content-type': 'application/json' }, body: '{"field1":"value1","field2":"value2"}' }; fetch('https://www.zohoapis.com/expense/v1/expenses/16367000000083065/tags', 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", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("POST", "/expense/v1/expenses/16367000000083065/tags", 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/16367000000083065/tags", "headers": { "X-com-zoho-expense-organizationid": "10234695", "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", "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/16367000000083065/tags \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-expense-organizationid: 10234695' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "tags": [ { "tag_id": "16367000000000301", "tag_name": "Tag 1", "tag_option_id": "16367000000225001", "tag_option_name": "Option 1" } ] }

Response Example

{ "code": 0, "message": "success" }