Expense Reports
An expense report entity allows you to maintain details of an expense report.
End Points
Create an expense report
List of all expense reports
Update an expense report
Retrieve details of an expense report
Approve an expense report
Reject an expense report
Reimburse an expense report
Approval history of an expense report
Attribute
report_id
long
Unique ID for expense report generated by the server . This is used as identifier.
report_name
string
Name of the report.
description
string
Description of the report.
report_number
string
Report Number.
start_date
string
Start date of the report.
end_date
string
End date of the report.
status
string
Status of the report. Possible values can be
draft
or submitted
or approved
or rejected
or reimbursed
or recalled
. currency_id
long
Unique ID for currency.
price_precision
integer
Precise amount upto n decimal points.
currency_code
string
Currency code.
total
double
Total amount.
reimbursable_total
double
Reimbursable amount.
non_reimbursable_total
double
Non reimbursable total.
created_time
string
Time when the report was created.
created_date
string
Date when the report was created.
created_by_id
long
ID of the person who created the report.
created_by_name
string
Name of the person who created the report.
created_by_email
string
Email ID of the person who created the report.
tags
array
Tags associated with the Report.
tag_id
long
Unique ID for Tag generated by the server.
tag_name
string
Name of the Tag.
tag_option_id
long
Unique ID for Tag option generated by the server.
tag_option_name
string
Name of the Tag Option.
expenses
array
Expenses associated with User.
date
string
Date of Expense.
receipt_name
string
Receipt Name
tax_amount
double
Tax amount.
start_reading
string
Start reading of the odometer.
category_name
string
Name of the Expense Category.
line_item_count
integer
Number of Line Items.
paid_through_account_id
long
Unique ID for the paid through account.
documents
array
Details of Documents attached.
file_name
string
Name of the Document.
file_size_formatted
string
Formatted value of File Size.
attachment_order
integer
Order of the Attached Document.
document_id
long
Unique Id for the Document.
project_name
string
Name of the project.
per_diem_rate
double
Rate per Diem.
per_diem_days
double
Number of Days for Diem.
project_id
long
Unique ID for project.
mileage_rate
double
Rate for mileage.
order
integer
Order of the expense in Report.
expense_type
string
Type of Expense.
exchange_rate
double
Exchange rate for the foreign currency.
is_inclusive_tax
boolean
Whether the Expense is inclusive of tax. It can either be
true
or false
. custom_fields
array
Custom Fields related to Expense.
customfield_id
long
Unique Id for the Custom Field.
label
string
Label of the Custom Field.
value
string
Value of the Custom Field.
attendees
string
Attendees of the Expense.
per_diem_name
string
Name of the Per Diem.
merchant_name
string
Name of the merchant.
transaction_description
string
Decription for Transaction.
reference_number
string
Reference Number
tax_id
long
Unique Id for the tax.
is_personal
boolean
Whether the expense is personal. It can either be
true
or false
. due_days
string
Number of days till the due date.
comments_count
integer
Number of Comments.
distance
double
Distance travelled.
policy_id
long
Unique Id for the Policy.
description
string
Description of the report.
merchant_id
long
Unique Id for Merchant.
currency_code
string
Currency code.
end_reading
long
End readind of the odometer.
bcy_total
double
Total in base currency.
total
double
Total amount.
category_id
long
Unique Id for the expense category.
receipt_type
string
Type of receipt.
maximum_allowed_amount
double
Maximum allowed expense amount.
is_uncategorized
boolean
Whether the expense is Uncategorized. It can either be
true
or false
. is_mandatory_fields_missing
boolean
Whether the mandatory fields are missing. It can either be
true
or false
. paid_through_account_name
string
Name of the paid through account.
amount
double
Total Amount.
payment_mode
string
Mode of payment for the expense.
last_modified_time
string
Time when the report was last modified.
per_diem_id
long
Unique Id for Per Diem.
tax_name
string
Name of the tax.
bcy_tax_amount
double
Tax Amount in Base Currency.
vehicle_type
string
Type of Vehicle.
is_billable
boolean
Whether the expense is a billable expense. It can either be
true
or false
. mileage_unit
string
Unit of mileage. Can be
km
or mile
. is_expired
boolean
Whether the expense is expired. It can either be
true
or false
. receipt_required_amount
double
Required Amount for Receipt.
is_reimbursable
boolean
Whether the expense is reimbursable. It can either be
true
or false
. expired_by
string
No. of days since the expense has expired.
tax_percentage
double
Percentage of Tax.
location
string
Location.
customer_name
string
Name of the Customer.
customer_id
long
Unique Id for the Customer.
expense_id
long
Unique Id of the Expense.
currency_id
long
Unique ID for currency.
expired_expense_count
integer
Number of expenses expired.
reimbursable_expenses_count
integer
Number of expenses that can be reimbursed.
non_reimbursable_expenses_count
integer
Number of expenses that cannot be reimbursed.
custom_fields
array
Custom Fields related to Expense.
customfield_id
long
Unique Id for the Custom Field.
label
string
Label of the Custom Field.
value
string
Value of the Custom Field.
customer_id
long
Unique Id for the Customer.
customer_name
string
Name of the Customer.
project_id
long
Unique ID for project.
project_name
string
Name of the project.
employee_number
string
Employee Number.
department_id
long
Unique Id of the department.
department_name
string
Name of the department.
policy_id
long
Unique Id for the Policy.
policy_name
string
Name of the Policy.
{
"report_id": "16367000000081005",
"report_name": "Trip to SFA",
"description": "To client office",
"report_number": "ER-00001",
"start_date": "2017-02-07",
"end_date": "2017-02-18",
"status": "submitted",
"currency_id": "16367000000000099",
"price_precision": 2,
"currency_code": "INR",
"total": 70000,
"reimbursable_total": 70000,
"non_reimbursable_total": 0,
"created_time": "2017-02-28T18:18:03+0530",
"created_date": "2017-02-28",
"created_by_id": "16367000000073071",
"created_by_name": "Will Smith",
"created_by_email": "will.smith@gmail.com",
"tags": [
{
"tag_id": "16367000000000301",
"tag_name": "Tag 1",
"tag_option_id": "16367000000225001",
"tag_option_name": "Option 1"
}
],
"expenses": [
{
"date": "2017-02-20",
"receipt_name": "receipt1.jpg",
"tax_amount": 5000,
"start_reading": "",
"category_name": "Lodging",
"line_item_count": 1,
"paid_through_account_id": "16367000000036003",
"documents": [
{
"file_name": "receipt1.jpg",
"file_size_formatted": "35.6 KB",
"attachment_order": 1,
"document_id": "16367000000078085"
}
],
"project_name": "Brochure Design - Spa",
"per_diem_rate": 0,
"per_diem_days": 0,
"project_id": "16367000000223045",
"mileage_rate": 0,
"order": 0,
"expense_type": "non_mileage",
"exchange_rate": 1,
"is_inclusive_tax": false,
"custom_fields": [
{
"customfield_id": "16367000000277001",
"label": "Other Name",
"value": "Trip"
}
],
"attendees": "Will Smith",
"per_diem_name": "",
"merchant_name": "ABS Solutions",
"transaction_description": "Has to be done Immediately..",
"reference_number": "DD145",
"tax_id": "16367000000219093",
"is_personal": false,
"due_days": "Due in 15 days",
"comments_count": 0,
"distance": 0,
"policy_id": "16367000000092011",
"description": "To client office",
"merchant_id": "16367000000074027",
"currency_code": "INR",
"end_reading": "",
"bcy_total": 70000,
"total": 70000,
"category_id": "16367000000033011",
"receipt_type": "jpg",
"maximum_allowed_amount": 0,
"is_uncategorized": false,
"is_mandatory_fields_missing": false,
"paid_through_account_name": "Employee Reimbursements",
"amount": 70000,
"payment_mode": "Check",
"last_modified_time": "2017-02-28T18:31:09+0530",
"per_diem_id": "",
"tax_name": "Service",
"bcy_tax_amount": 2000,
"vehicle_type": "Bike",
"is_billable": false,
"mileage_unit": "km",
"is_expired": false,
"receipt_required_amount": 0,
"is_reimbursable": true,
"expired_by": "",
"tax_percentage": 4,
"location": "Washington",
"customer_name": "Peter",
"customer_id": "16367000000088005",
"expense_id": "16367000000078079",
"currency_id": "16367000000000099"
}
],
"expired_expense_count": 0,
"reimbursable_expenses_count": 1,
"non_reimbursable_expenses_count": 0,
"custom_fields": [
{
"customfield_id": "16367000000277001",
"label": "Other Name",
"value": "Trip"
}
],
"customer_id": "16367000000088005",
"customer_name": "Peter",
"project_id": "16367000000223045",
"project_name": "Brochure Design - Spa",
"employee_number": "E001",
"department_id": "16367000000093001",
"department_name": "Finance",
"policy_id": "16367000000092011",
"policy_name": "Savings"
}
Create an expense report
Create a new expense report.
Arguments
report_name
string
(Required)
Name of the report.
description
string
Description of the report.
start_date
string
(Required)
Start date of the report.
end_date
string
(Required)
End date of the report.
expenses
array
Expenses associated with User.
expense_id
long
(Required)
Unique Id of the Expense.
order
integer
Order of the expense in Report.
custom_fields
array
Custom Fields related to Expense.
customfield_id
long
(Required)
Unique Id for the Custom Field.
value
string
(Required)
Value of the Custom Field.
customer_id
long
Unique Id for the Customer.
project_id
long
Unique ID for project.
tags
array
Tags associated with the Report.
tag_id
long
(Required)
Unique ID for Tag generated by the server.
tag_option_id
long
(Required)
Unique ID for Tag option generated by the server.
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("X-com-zoho-expense-organizationid", "10234695");
response = invokeUrl
[
url: "https://www.zohoapis.com/expense/v1/expensereports"
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/expensereports")
.post(body)
.addHeader("X-com-zoho-expense-organizationid", "10234695")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
'X-com-zoho-expense-organizationid': '10234695',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://www.zohoapis.com/expense/v1/expensereports', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'X-com-zoho-expense-organizationid': "10234695",
'content-type': "application/json"
}
conn.request("POST", "/expense/v1/expensereports", 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/expensereports",
"headers": {
"X-com-zoho-expense-organizationid": "10234695",
"content-type": "application/json"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
curl --request POST \
--url https://www.zohoapis.com/expense/v1/expensereports \
--header 'X-com-zoho-expense-organizationid: 10234695' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"report_name": "Trip to SFA",
"description": "To client office",
"start_date": "2017-02-07",
"end_date": "2017-02-18",
"expenses": [
{
"expense_id": "16367000000078079",
"order": 0
}
],
"custom_fields": [
{
"customfield_id": "16367000000277001",
"value": "Trip"
}
],
"customer_id": "16367000000088005",
"project_id": "16367000000223045",
"tags": [
{
"tag_id": "16367000000000301",
"tag_option_id": "16367000000225001"
}
]
}
{
"code": 0,
"message": "Expense report created successfully.",
"expense_report": {
"report_id": "16367000000081005",
"report_name": "Trip to SFA",
"description": "To client office",
"report_number": "ER-00001",
"start_date": "2017-02-07",
"end_date": "2017-02-18",
"status": "submitted",
"currency_id": "16367000000000099",
"price_precision": 2,
"currency_code": "INR",
"total": 70000,
"reimbursable_total": 70000,
"non_reimbursable_total": 0,
"created_time": "2017-02-28T18:18:03+0530",
"created_date": "2017-02-28",
"created_by_id": "16367000000073071",
"created_by_name": "Will Smith",
"created_by_email": "will.smith@gmail.com",
"tags": [
{
"tag_id": "16367000000000301",
"tag_name": "Tag 1",
"tag_option_id": "16367000000225001",
"tag_option_name": "Option 1"
}
],
"expenses": [
{
"date": "2017-02-20",
"receipt_name": "receipt1.jpg",
"tax_amount": 5000,
"start_reading": "",
"category_name": "Lodging",
"line_item_count": 1,
"paid_through_account_id": "16367000000036003",
"documents": [
{
"file_name": "receipt1.jpg",
"file_size_formatted": "35.6 KB",
"attachment_order": 1,
"document_id": "16367000000078085"
}
],
"project_name": "Brochure Design - Spa",
"per_diem_rate": 0,
"per_diem_days": 0,
"project_id": "16367000000223045",
"mileage_rate": 0,
"order": 0,
"expense_type": "non_mileage",
"exchange_rate": 1,
"is_inclusive_tax": false,
"custom_fields": [
{
"customfield_id": "16367000000277001",
"label": "Other Name",
"value": "Trip"
}
],
"attendees": "Will Smith",
"per_diem_name": "",
"merchant_name": "ABS Solutions",
"transaction_description": "Has to be done Immediately..",
"reference_number": "DD145",
"tax_id": "16367000000219093",
"is_personal": false,
"due_days": "Due in 15 days",
"comments_count": 0,
"distance": 0,
"policy_id": "16367000000092011",
"description": "To client office",
"merchant_id": "16367000000074027",
"currency_code": "INR",
"end_reading": "",
"bcy_total": 70000,
"total": 70000,
"category_id": "16367000000033011",
"receipt_type": "jpg",
"maximum_allowed_amount": 0,
"is_uncategorized": false,
"is_mandatory_fields_missing": false,
"paid_through_account_name": "Employee Reimbursements",
"amount": 70000,
"payment_mode": "Check",
"last_modified_time": "2017-02-28T18:31:09+0530",
"per_diem_id": "",
"tax_name": "Service",
"bcy_tax_amount": 2000,
"vehicle_type": "Bike",
"is_billable": false,
"mileage_unit": "km",
"is_expired": false,
"receipt_required_amount": 0,
"is_reimbursable": true,
"expired_by": "",
"tax_percentage": 4,
"location": "Washington",
"customer_name": "Peter",
"customer_id": "16367000000088005",
"expense_id": "16367000000078079",
"currency_id": "16367000000000099"
}
],
"expired_expense_count": 0,
"reimbursable_expenses_count": 1,
"non_reimbursable_expenses_count": 0,
"custom_fields": [
{
"customfield_id": "16367000000277001",
"label": "Other Name",
"value": "Trip"
}
],
"customer_id": "16367000000088005",
"customer_name": "Peter",
"project_id": "16367000000223045",
"project_name": "Brochure Design - Spa",
"employee_number": "E001",
"department_id": "16367000000093001",
"department_name": "Finance",
"policy_id": "16367000000092011",
"policy_name": "Savings"
}
}
List of all expense reports
List of all the submitted expense reports.
Query Parameters
filter_by
object
For Filtering Expense Reports based on status.
Type.Approval,Status.Submitted
string
List of all Submitted Reports.
Type.Approval,Status.Approved
string
List of all Approved Reports.
Type.Approval,Status.Rejected
string
List of all Rejected Reports.
Type.Approval,Status.Reimbursed
string
List of all Reimbursed Reports.
headers_data = Map();
headers_data.put("X-com-zoho-expense-organizationid", "10234695");
response = invokeUrl
[
url: "https://www.zohoapis.com/expense/v1/expensereports"
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/expensereports")
.get()
.addHeader("X-com-zoho-expense-organizationid", "10234695")
.build();
Response response = client.newCall(request).execute();
const options = {method: 'GET', headers: {'X-com-zoho-expense-organizationid': '10234695'}};
fetch('https://www.zohoapis.com/expense/v1/expensereports', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
headers = { 'X-com-zoho-expense-organizationid': "10234695" }
conn.request("GET", "/expense/v1/expensereports", 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/expensereports",
"headers": {
"X-com-zoho-expense-organizationid": "10234695"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
curl --request GET \
--url https://www.zohoapis.com/expense/v1/expensereports \
--header 'X-com-zoho-expense-organizationid: 10234695'
{
"code": 0,
"message": "success",
"expense_reports": [
{
"report_id": "16367000000081005",
"report_name": "Trip to SFA",
"description": "To client office",
"report_number": "ER-00001",
"start_date": "2017-02-07",
"end_date": "2017-02-18",
"status": "submitted",
"is_archived": false,
"due_date": "2017-03-15",
"submitted_date": "2017-02-28",
"approved_date": "2017-03-01",
"last_submitted_date": "2017-02-28",
"currency_id": "16367000000000099",
"currency_code": "INR",
"approver_id": "16367000000073001",
"approver_name": "PATRICIA BOYLE",
"approver_email": "patriciab@zillum.com",
"submitted_to_id": "16367000000073001",
"submitted_to_name": "PATRICIA BOYLE",
"submitted_to_email": "patriciab@zillum.com",
"submitter_email": "will.smith@gmail.com",
"submitted_by": "16367000000073071",
"submitter_name": "Will Smith",
"total": 70000,
"reimbursable_total": 70000,
"reimbursement_date": "2017-03-01",
"non_reimbursable_total": 0,
"created_time": "2017-02-28T18:18:03+0530",
"last_modified_time": "2017-02-28T18:31:09+0530",
"created_by_id": "16367000000073071",
"created_by_name": "Will Smith",
"comments_count": 0,
"policy_violated": false,
"uncategorized_expense_count": 0,
"customer_id": "16367000000088005",
"custom_fields": [
{
"customfield_id": "16367000000277001",
"label": "Other Name",
"value": "Trip"
}
],
"project_id": "16367000000223045",
"customer_name": "Peter",
"project_name": "Brochure Design - Spa",
"policy_id": "16367000000092011",
"policy_name": "Savings",
"due_days": "Due in 15 days"
},
{...},
{...}
]
}
Update an expense report
Update the details of an expense report.
Arguments
report_name
string
Name of the report.
description
string
Description of the report.
start_date
string
Start date of the report.
end_date
string
End date of the report.
expenses
array
(Required)
Expenses associated with User.
expense_id
long
(Required)
Unique Id of the Expense.
order
integer
Order of the expense in Report.
custom_fields
array
Custom Fields related to Expense.
customfield_id
long
(Required)
Unique Id for the Custom Field.
value
string
(Required)
Value of the Custom Field.
customer_id
long
Unique Id for the Customer.
project_id
long
Unique ID for project.
tags
array
Tags associated with the Report.
tag_id
long
(Required)
Unique ID for Tag generated by the server.
tag_option_id
long
(Required)
Unique ID for Tag option generated by the server.
expense_id
long
Unique Id of the Expense.
customfield_id
long
Unique Id for the Custom Field.
value
string
Value of the Custom Field.
tag_id
long
Unique ID for Tag generated by the server.
tag_option_id
long
Unique ID for Tag option generated by the server.
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("X-com-zoho-expense-organizationid", "10234695");
response = invokeUrl
[
url: "https://www.zohoapis.com/expense/v1/expensereports/"
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/expensereports/")
.put(body)
.addHeader("X-com-zoho-expense-organizationid", "10234695")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'PUT',
headers: {
'X-com-zoho-expense-organizationid': '10234695',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://www.zohoapis.com/expense/v1/expensereports/', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'X-com-zoho-expense-organizationid': "10234695",
'content-type': "application/json"
}
conn.request("PUT", "/expense/v1/expensereports/", 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/expensereports/",
"headers": {
"X-com-zoho-expense-organizationid": "10234695",
"content-type": "application/json"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
curl --request PUT \
--url https://www.zohoapis.com/expense/v1/expensereports/ \
--header 'X-com-zoho-expense-organizationid: 10234695' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"report_name": "Trip to SFA",
"description": "To client office",
"start_date": "2017-02-07",
"end_date": "2017-02-18",
"expenses": [
{
"expense_id": "16367000000078079",
"order": 0
}
],
"custom_fields": [
{
"customfield_id": "16367000000277001",
"value": "Trip"
}
],
"customer_id": "16367000000088005",
"project_id": "16367000000223045",
"tags": [
{
"tag_id": "16367000000000301",
"tag_option_id": "16367000000225001"
}
],
"expense_id": "16367000000078079",
"customfield_id": "16367000000277001",
"value": "Trip",
"tag_id": "16367000000000301",
"tag_option_id": "16367000000225001"
}
{
"code": 0,
"message": "Expense report details updated successfully.",
"expense_report": {
"report_id": "16367000000081005",
"report_name": "Trip to SFA",
"description": "To client office",
"report_number": "ER-00001",
"start_date": "2017-02-07",
"end_date": "2017-02-18",
"status": "submitted",
"currency_id": "16367000000000099",
"price_precision": 2,
"currency_code": "INR",
"total": 70000,
"reimbursable_total": 70000,
"non_reimbursable_total": 0,
"created_time": "2017-02-28T18:18:03+0530",
"created_date": "2017-02-28",
"created_by_id": "16367000000073071",
"created_by_name": "Will Smith",
"created_by_email": "will.smith@gmail.com",
"last_modified_time": "2017-02-28T18:31:09+0530",
"tags": [
{
"tag_id": "16367000000000301",
"tag_name": "Tag 1",
"tag_option_id": "16367000000225001",
"tag_option_name": "Option 1"
}
],
"expenses": [
{
"date": "2017-02-20",
"receipt_name": "receipt1.jpg",
"tax_amount": 5000,
"start_reading": "",
"category_name": "Lodging",
"line_item_count": 1,
"paid_through_account_id": "16367000000036003",
"documents": [
{
"file_name": "receipt1.jpg",
"file_size_formatted": "35.6 KB",
"attachment_order": 1,
"document_id": "16367000000078085"
}
],
"project_name": "Brochure Design - Spa",
"per_diem_rate": 0,
"per_diem_days": 0,
"project_id": "16367000000223045",
"mileage_rate": 0,
"order": 0,
"expense_type": "non_mileage",
"exchange_rate": 1,
"is_inclusive_tax": false,
"custom_fields": [
{
"customfield_id": "16367000000277001",
"label": "Other Name",
"value": "Trip"
}
],
"attendees": "Will Smith",
"per_diem_name": "",
"merchant_name": "ABS Solutions",
"transaction_description": "Has to be done Immediately..",
"reference_number": "DD145",
"tax_id": "16367000000219093",
"is_personal": false,
"due_days": "Due in 15 days",
"comments_count": 0,
"distance": 0,
"policy_id": "16367000000092011",
"description": "To client office",
"merchant_id": "16367000000074027",
"currency_code": "INR",
"end_reading": "",
"bcy_total": 70000,
"total": 70000,
"category_id": "16367000000033011",
"receipt_type": "jpg",
"maximum_allowed_amount": 0,
"is_uncategorized": false,
"is_mandatory_fields_missing": false,
"paid_through_account_name": "Employee Reimbursements",
"amount": 70000,
"payment_mode": "Check",
"last_modified_time": "2017-02-28T18:31:09+0530",
"per_diem_id": "",
"tax_name": "Service",
"bcy_tax_amount": 2000,
"vehicle_type": "Bike",
"is_billable": false,
"mileage_unit": "km",
"is_expired": false,
"receipt_required_amount": 0,
"is_reimbursable": true,
"expired_by": "",
"tax_percentage": 4,
"location": "Washington",
"customer_name": "Peter",
"customer_id": "16367000000088005",
"expense_id": "16367000000078079",
"currency_id": "16367000000000099"
}
],
"expired_expense_count": 0,
"reimbursable_expenses_count": 1,
"non_reimbursable_expenses_count": 0,
"custom_fields": [
{
"customfield_id": "16367000000277001",
"label": "Other Name",
"value": "Trip"
}
],
"customer_id": "16367000000088005",
"customer_name": "Peter",
"project_id": "16367000000223045",
"project_name": "Brochure Design - Spa",
"employee_number": "E001",
"department_id": "16367000000093001",
"department_name": "Finance",
"policy_id": "16367000000092011",
"policy_name": "Savings"
}
}
Retrieve details of an expense report
Details of an existing expense report.
headers_data = Map();
headers_data.put("X-com-zoho-expense-organizationid", "10234695");
response = invokeUrl
[
url: "https://www.zohoapis.com/expense/v1/expensereports/"
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/expensereports/")
.get()
.addHeader("X-com-zoho-expense-organizationid", "10234695")
.build();
Response response = client.newCall(request).execute();
const options = {method: 'GET', headers: {'X-com-zoho-expense-organizationid': '10234695'}};
fetch('https://www.zohoapis.com/expense/v1/expensereports/', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
headers = { 'X-com-zoho-expense-organizationid': "10234695" }
conn.request("GET", "/expense/v1/expensereports/", 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/expensereports/",
"headers": {
"X-com-zoho-expense-organizationid": "10234695"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
curl --request GET \
--url https://www.zohoapis.com/expense/v1/expensereports/ \
--header 'X-com-zoho-expense-organizationid: 10234695'
{
"code": 0,
"message": "success",
"expense_report": {
"report_id": "16367000000081005",
"report_name": "Trip to SFA",
"description": "To client office",
"report_number": "ER-00001",
"start_date": "2017-02-07",
"end_date": "2017-02-18",
"due_date": "2017-03-15",
"status": "submitted",
"is_archived": false,
"due_days": "Due in 15 days",
"submitted_date": "2017-02-28",
"last_submitted_date": "2017-02-28",
"currency_id": "16367000000000099",
"price_precision": 2,
"currency_code": "INR",
"approver_id": "16367000000073001",
"approver_name": "PATRICIA BOYLE",
"approver_email": "patriciab@zillum.com",
"approver_photo_url": "https://contacts.zoho.com/file?ID=16b87b9dbae5b1008b32c9736141b6f63b3864c8cf94d900cf9bb346f0eb97b105c58df21a12283d421fa80a6cb97ffca294a909bc0c7ae9f1e14dd2e499565d&fs=thumb",
"submitted_to_id": "16367000000073001",
"submitted_to_name": "PATRICIA BOYLE",
"submitted_to_email": "patriciab@zillum.com",
"submitted_to_employee_no": "E001",
"submitted_to_department_name": "Finance",
"submitted_to_photo_url": "https://contacts.zoho.com/file?ID=16b87b9dbae5b1008b32c9736141b6f63b3864c8cf94d900cf9bb346f0eb97b105c58df21a12283d421fa80a6cb97ffca294a909bc0c7ae9f1e14dd2e499565d&fs=thumb",
"submitted_by": "16367000000073071",
"submitter_name": "Will Smith",
"submitter_email": "will.smith@gmail.com",
"submitter_photo_url": "https://contacts.zoho.com/file?ID=16b87b9dbae5b1008b32c9736141b6f63b3864c8cf94d900cf9bb346f0eb97b105c58df21a12283d421fa80a6cb97ffca294a909bc0c7ae9f1e14dd2e499565d&fs=thumb",
"submitter_employee_no": "E002",
"submitter_department_name": "Maintenance",
"total": 70000,
"reimbursable_total": 70000,
"non_reimbursable_total": 0,
"created_time": "2017-02-28T18:18:03+0530",
"created_date": "2017-02-28",
"last_modified_time": "2017-02-28T18:31:09+0530",
"created_by_id": "16367000000073071",
"created_by_name": "Will Smith",
"created_by_email": "will.smith@gmail.com",
"creator_photo_url": "https://contacts.zoho.com/file?ID=16b87b9dbae5b1008b32c9736141b6f63b3864c8cf94d900cf9bb346f0eb97b105c58df21a12283d421fa80a6cb97ffca294a909bc0c7ae9f1e14dd2e499565d&fs=thumb",
"tags": [
{
"tag_id": "16367000000000301",
"tag_name": "Tag 1",
"tag_option_id": "16367000000225001",
"tag_option_name": "Option 1"
}
],
"expenses": [
{
"date": "2017-02-20",
"receipt_name": "receipt1.jpg",
"tax_amount": 5000,
"start_reading": "",
"category_name": "Lodging",
"line_item_count": 1,
"paid_through_account_id": "16367000000036003",
"documents": [
{
"file_name": "receipt1.jpg",
"file_size_formatted": "35.6 KB",
"attachment_order": 1,
"document_id": "16367000000078085"
}
],
"project_name": "Brochure Design - Spa",
"per_diem_rate": 0,
"per_diem_days": 0,
"project_id": "16367000000223045",
"mileage_rate": 0,
"order": 0,
"expense_type": "non_mileage",
"exchange_rate": 1,
"is_inclusive_tax": false,
"custom_fields": [
{
"customfield_id": "16367000000277001",
"label": "Other Name",
"value": "Trip"
}
],
"attendees": "Will Smith",
"per_diem_name": "",
"merchant_name": "ABS Solutions",
"transaction_description": "Has to be done Immediately..",
"reference_number": "DD145",
"tax_id": "16367000000219093",
"is_personal": false,
"due_days": "Due in 15 days",
"comments_count": 0,
"distance": 0,
"policy_id": "16367000000092011",
"description": "To client office",
"merchant_id": "16367000000074027",
"currency_code": "INR",
"end_reading": "",
"bcy_total": 70000,
"total": 70000,
"category_id": "16367000000033011",
"receipt_type": "jpg",
"maximum_allowed_amount": 0,
"is_uncategorized": false,
"is_mandatory_fields_missing": false,
"paid_through_account_name": "Employee Reimbursements",
"amount": 70000,
"payment_mode": "Check",
"last_modified_time": "2017-02-28T18:31:09+0530",
"per_diem_id": "",
"tax_name": "Service",
"bcy_tax_amount": 2000,
"vehicle_type": "Bike",
"is_billable": false,
"mileage_unit": "km",
"is_expired": false,
"receipt_required_amount": 0,
"is_reimbursable": true,
"expired_by": "",
"tax_percentage": 4,
"location": "Washington",
"customer_name": "Peter",
"customer_id": "16367000000088005",
"expense_id": "16367000000078079",
"currency_id": "16367000000000099"
}
],
"expired_expense_count": 0,
"reimbursable_expenses_count": 1,
"non_reimbursable_expenses_count": 0,
"custom_fields": [
{
"customfield_id": "16367000000277001",
"label": "Other Name",
"value": "Trip"
}
],
"uncategorized_expense_count": 0,
"policy_violated": false,
"reimbursements": [
{
"employee_reimbursement_id": "16367000000101099",
"date": "2017-02-20",
"amount": 70000,
"entity_type": 62,
"bcy_amount": 70000,
"notes": "Finish",
"currency_code": "INR",
"currency_id": "16367000000000099"
}
],
"advance_payments": [
{
"date": "2017-02-20",
"advance_payment_id": "16367000000243203",
"reimbursement_entity_id": "",
"currency_id": "16367000000000099",
"currency_code": "INR",
"exchange_rate": 1,
"amount": 70000,
"bcy_amount": 70000,
"excess_amount": 0,
"excess_bcy_amount": 0,
"applied_amount": 70000,
"applied_bcy_amount": 70000,
"excess_applied_amount": 0,
"excess_applied_bcy_amount": 0,
"excess_unapplied_amount": 0,
"excess_unapplied_bcy_amount": 0,
"price_precision": 2
}
],
"is_advancepayment_allowed": true,
"amount_to_be_reimbursed": 70000,
"remaining_reimbursement_total": 0,
"amount_to_be_refunded": 0,
"advance_total": 70000,
"can_create_advance": true,
"customer_id": "16367000000088005",
"customer_name": "Peter",
"project_id": "16367000000223045",
"project_name": "Brochure Design - Spa",
"employee_number": "E001",
"department_id": "16367000000093001",
"department_name": "Finance",
"next_approver_id": "16367000000073001",
"next_approver_email": "patriciab@zillum.com",
"next_approver_name": "PATRICIA BOYLE",
"approver_employee_no": "E001",
"approver_department_name": "Finance",
"previous_approver_id": "",
"previous_approver_name": "",
"previous_approver_employee_no": "",
"previous_approver_department_name": "",
"policy_id": "16367000000092011",
"policy_name": "Savings",
"unreported_expenses_count": 1,
"unreported_expenses": [
{
"expense_id": "16367000000078079",
"date": "2017-02-20",
"category_id": "16367000000033011",
"category_name": "Lodging",
"total": 70000,
"paid_through_account_id": "16367000000036003",
"paid_through_account_name": "Employee Reimbursements",
"bcy_total": 70000,
"currency_code": "INR",
"currency_id": "16367000000000099",
"receipt_name": "receipt1.jpg",
"is_billable": false,
"customer_id": "16367000000088005",
"customer_name": "Peter",
"project_id": "16367000000223045",
"project_name": "Brochure Design - Spa",
"is_reimbursable": true,
"merchant_id": "16367000000074027",
"merchant_name": "ABS Solutions",
"distance": 0,
"mileage_rate": 0,
"mileage_unit": "km",
"mileage_type": "non_mileage",
"start_reading": "",
"end_reading": "",
"receipt_type": "jpg",
"documents": [
{
"file_name": "receipt1.jpg",
"file_size_formatted": "35.6 KB",
"attachment_order": 1,
"document_id": "16367000000078085"
}
],
"exchange_rate": 1,
"is_uncategorized": false,
"due_days": "Due in 15 days",
"expired_by": "",
"is_expired": false,
"payment_mode": "Check",
"transaction_description": "Has to be done Immediately.."
}
],
"users": [
{
"user_id": "16367000000073001",
"role_id": "16367000000030001",
"name": "Will Smith",
"email": "will.smith@gmail.com",
"default_approver_id": "16367000000030001",
"default_approver_name": "PATRICIA BOYLE",
"user_role": "admin",
"can_approve": true,
"is_current_user": true,
"email_ids": [
{
"is_selected": true,
"email": "will.smith@gmail.com"
}
],
"status": "submitted",
"photo_url": "https://contacts.zoho.com/file?ID=16b87b9dbae5b1008b32c9736141b6f63b3864c8cf94d900cf9bb346f0eb97b105c58df21a12283d421fa80a6cb97ffca294a909bc0c7ae9f1e14dd2e499565d&fs=thumb",
"approves_to_id": "16367000000030001",
"approves_to_name": "PATRICIA BOYLE",
"submission_amount_limit": 0,
"approval_amount_limit": 0,
"created_time": "2017-02-28T18:18:03+0530",
"last_modified_time": "2017-02-28T18:31:09+0530",
"policy_id": "16367000000092011",
"policy_name": "Savings"
}
]
}
}
Approve an expense report
Approve an expense report.
headers_data = Map();
headers_data.put("X-com-zoho-expense-organizationid", "10234695");
response = invokeUrl
[
url: "https://www.zohoapis.com/expense/v1/expensereports//approve"
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/expensereports//approve")
.post(null)
.addHeader("X-com-zoho-expense-organizationid", "10234695")
.build();
Response response = client.newCall(request).execute();
const options = {method: 'POST', headers: {'X-com-zoho-expense-organizationid': '10234695'}};
fetch('https://www.zohoapis.com/expense/v1/expensereports//approve', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
headers = { 'X-com-zoho-expense-organizationid': "10234695" }
conn.request("POST", "/expense/v1/expensereports//approve", 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/expensereports//approve",
"headers": {
"X-com-zoho-expense-organizationid": "10234695"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
curl --request POST \
--url https://www.zohoapis.com/expense/v1/expensereports//approve \
--header 'X-com-zoho-expense-organizationid: 10234695'
{
"code": 0,
"message": "Report approved successfully"
}
Reject an expense report
Reject an expense report.
Arguments
comments
string
Comments on the report.
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("X-com-zoho-expense-organizationid", "10234695");
response = invokeUrl
[
url: "https://www.zohoapis.com/expense/v1/expensereports//reject"
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/expensereports//reject")
.post(body)
.addHeader("X-com-zoho-expense-organizationid", "10234695")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
'X-com-zoho-expense-organizationid': '10234695',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://www.zohoapis.com/expense/v1/expensereports//reject', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'X-com-zoho-expense-organizationid': "10234695",
'content-type': "application/json"
}
conn.request("POST", "/expense/v1/expensereports//reject", 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/expensereports//reject",
"headers": {
"X-com-zoho-expense-organizationid": "10234695",
"content-type": "application/json"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
curl --request POST \
--url https://www.zohoapis.com/expense/v1/expensereports//reject \
--header 'X-com-zoho-expense-organizationid: 10234695' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"comments": "Purpose is not valid."
}
{
"code": 0,
"message": "Report has been rejected"
}
Reimburse an expense report
Reimburse an expense report.
Arguments
notes
string
Notes on Reimbursement.
date
string
Date of Expense.
amount
double
Total Amount.
reference_number
string
Reference Number
currency_id
long
Unique ID for currency.
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("X-com-zoho-expense-organizationid", "10234695");
response = invokeUrl
[
url: "https://www.zohoapis.com/expense/v1/expensereports//reimburse"
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/expensereports//reimburse")
.post(body)
.addHeader("X-com-zoho-expense-organizationid", "10234695")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
'X-com-zoho-expense-organizationid': '10234695',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://www.zohoapis.com/expense/v1/expensereports//reimburse', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'X-com-zoho-expense-organizationid': "10234695",
'content-type': "application/json"
}
conn.request("POST", "/expense/v1/expensereports//reimburse", 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/expensereports//reimburse",
"headers": {
"X-com-zoho-expense-organizationid": "10234695",
"content-type": "application/json"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
curl --request POST \
--url https://www.zohoapis.com/expense/v1/expensereports//reimburse \
--header 'X-com-zoho-expense-organizationid: 10234695' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"notes": "Finish",
"date": "2017-02-20",
"amount": 70000,
"reference_number": "DD145",
"currency_id": "16367000000000099"
}
{
"code": 0,
"message": "Report has been reimbursed",
"expense_report_reimbursed": {
"report_id": "16367000000081005",
"report_name": "Trip to SFA",
"description": "To client office",
"report_number": "ER-00001",
"start_date": "2017-02-07",
"end_date": "2017-02-18",
"due_date": "2017-03-15",
"status": "submitted",
"is_archived": false,
"due_days": "Due in 15 days",
"submitted_date": "2017-02-28",
"last_submitted_date": "2017-02-28",
"currency_id": "16367000000000099",
"price_precision": 2,
"currency_code": "INR",
"approver_id": "16367000000073001",
"approver_name": "PATRICIA BOYLE",
"approver_email": "patriciab@zillum.com",
"approver_photo_url": "https://contacts.zoho.com/file?ID=16b87b9dbae5b1008b32c9736141b6f63b3864c8cf94d900cf9bb346f0eb97b105c58df21a12283d421fa80a6cb97ffca294a909bc0c7ae9f1e14dd2e499565d&fs=thumb",
"submitted_to_id": "16367000000073001",
"submitted_to_name": "PATRICIA BOYLE",
"submitted_to_email": "patriciab@zillum.com",
"submitted_to_employee_no": "E001",
"submitted_to_department_name": "Finance",
"submitted_to_photo_url": "https://contacts.zoho.com/file?ID=16b87b9dbae5b1008b32c9736141b6f63b3864c8cf94d900cf9bb346f0eb97b105c58df21a12283d421fa80a6cb97ffca294a909bc0c7ae9f1e14dd2e499565d&fs=thumb",
"submitted_by": "16367000000073071",
"submitter_name": "Will Smith",
"submitter_email": "will.smith@gmail.com",
"submitter_photo_url": "https://contacts.zoho.com/file?ID=16b87b9dbae5b1008b32c9736141b6f63b3864c8cf94d900cf9bb346f0eb97b105c58df21a12283d421fa80a6cb97ffca294a909bc0c7ae9f1e14dd2e499565d&fs=thumb",
"submitter_employee_no": "E002",
"submitter_department_name": "Maintenance",
"total": 70000,
"reimbursable_total": 70000,
"non_reimbursable_total": 0,
"created_time": "2017-02-28T18:18:03+0530",
"created_date": "2017-02-28",
"last_modified_time": "2017-02-28T18:31:09+0530",
"created_by_id": "16367000000073071",
"created_by_name": "Will Smith",
"created_by_email": "will.smith@gmail.com",
"creator_photo_url": "https://contacts.zoho.com/file?ID=16b87b9dbae5b1008b32c9736141b6f63b3864c8cf94d900cf9bb346f0eb97b105c58df21a12283d421fa80a6cb97ffca294a909bc0c7ae9f1e14dd2e499565d&fs=thumb",
"expenses": [
{
"date": "2017-02-20",
"receipt_name": "receipt1.jpg",
"tax_amount": 5000,
"start_reading": "",
"category_name": "Lodging",
"line_item_count": 1,
"paid_through_account_id": "16367000000036003",
"documents": [
{
"file_name": "receipt1.jpg",
"file_size_formatted": "35.6 KB",
"attachment_order": 1,
"document_id": "16367000000078085"
}
],
"project_name": "Brochure Design - Spa",
"per_diem_rate": 0,
"per_diem_days": 0,
"project_id": "16367000000223045",
"mileage_rate": 0,
"order": 0,
"expense_type": "non_mileage",
"exchange_rate": 1,
"is_inclusive_tax": false,
"custom_fields": [
{
"customfield_id": "16367000000277001",
"label": "Other Name",
"value": "Trip"
}
],
"attendees": "Will Smith",
"per_diem_name": "",
"merchant_name": "ABS Solutions",
"transaction_description": "Has to be done Immediately..",
"reference_number": "DD145",
"tax_id": "16367000000219093",
"is_personal": false,
"due_days": "Due in 15 days",
"comments_count": 0,
"distance": 0,
"policy_id": "16367000000092011",
"description": "To client office",
"merchant_id": "16367000000074027",
"currency_code": "INR",
"end_reading": "",
"bcy_total": 70000,
"total": 70000,
"category_id": "16367000000033011",
"receipt_type": "jpg",
"maximum_allowed_amount": 0,
"is_uncategorized": false,
"is_mandatory_fields_missing": false,
"paid_through_account_name": "Employee Reimbursements",
"amount": 70000,
"payment_mode": "Check",
"last_modified_time": "2017-02-28T18:31:09+0530",
"per_diem_id": "",
"tax_name": "Service",
"bcy_tax_amount": 2000,
"vehicle_type": "Bike",
"is_billable": false,
"mileage_unit": "km",
"is_expired": false,
"receipt_required_amount": 0,
"is_reimbursable": true,
"expired_by": "",
"tax_percentage": 4,
"location": "Washington",
"customer_name": "Peter",
"customer_id": "16367000000088005",
"expense_id": "16367000000078079",
"currency_id": "16367000000000099"
}
],
"expired_expense_count": 0,
"reimbursable_expenses_count": 1,
"non_reimbursable_expenses_count": 0,
"custom_fields": [
{
"customfield_id": "16367000000277001",
"label": "Other Name",
"value": "Trip"
}
],
"uncategorized_expense_count": 0,
"policy_violated": false,
"reimbursements": [
{
"employee_reimbursement_id": "16367000000101099",
"date": "2017-02-20",
"amount": 70000,
"entity_type": 62,
"bcy_amount": 70000,
"notes": "Finish",
"currency_code": "INR",
"currency_id": "16367000000000099"
}
],
"advance_payments": [
{
"date": "2017-02-20",
"advance_payment_id": "16367000000243203",
"reimbursement_entity_id": "",
"currency_id": "16367000000000099",
"currency_code": "INR",
"exchange_rate": 1,
"amount": 70000,
"bcy_amount": 70000,
"excess_amount": 0,
"excess_bcy_amount": 0,
"applied_amount": 70000,
"applied_bcy_amount": 70000,
"excess_applied_amount": 0,
"excess_applied_bcy_amount": 0,
"excess_unapplied_amount": 0,
"excess_unapplied_bcy_amount": 0,
"price_precision": 2
}
],
"is_advancepayment_allowed": true,
"amount_to_be_reimbursed": 70000,
"remaining_reimbursement_total": 0,
"amount_to_be_refunded": 0,
"advance_total": 70000,
"can_create_advance": true,
"customer_id": "16367000000088005",
"customer_name": "Peter",
"project_id": "16367000000223045",
"project_name": "Brochure Design - Spa",
"employee_number": "E001",
"department_id": "16367000000093001",
"department_name": "Finance",
"next_approver_id": "16367000000073001",
"next_approver_email": "patriciab@zillum.com",
"next_approver_name": "PATRICIA BOYLE",
"approver_employee_no": "E001",
"approver_department_name": "Finance",
"previous_approver_id": "",
"previous_approver_name": "",
"previous_approver_employee_no": "",
"previous_approver_department_name": "",
"policy_id": "16367000000092011",
"policy_name": "Savings"
}
}
Approval history of an expense report
Approval history of an expense report.
headers_data = Map();
headers_data.put("X-com-zoho-expense-organizationid", "10234695");
response = invokeUrl
[
url: "https://www.zohoapis.com/expense/v1/expensereports//approvalhistory"
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/expensereports//approvalhistory")
.get()
.addHeader("X-com-zoho-expense-organizationid", "10234695")
.build();
Response response = client.newCall(request).execute();
const options = {method: 'GET', headers: {'X-com-zoho-expense-organizationid': '10234695'}};
fetch('https://www.zohoapis.com/expense/v1/expensereports//approvalhistory', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
headers = { 'X-com-zoho-expense-organizationid': "10234695" }
conn.request("GET", "/expense/v1/expensereports//approvalhistory", 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/expensereports//approvalhistory",
"headers": {
"X-com-zoho-expense-organizationid": "10234695"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
curl --request GET \
--url https://www.zohoapis.com/expense/v1/expensereports//approvalhistory \
--header 'X-com-zoho-expense-organizationid: 10234695'
{
"code": 0,
"message": "success",
"approval_history": [
{
"approval_history_id": "16367000000101079",
"report_name": "Trip to SFA",
"report_id": "16367000000081005",
"report_number": "ER-00001",
"expense_id": "16367000000078079",
"comments": "Purpose is not valid.",
"description": "To client office",
"type": "approval_history",
"previous_status": "approved",
"approval_status": "approved",
"previous_approver_id": "",
"previous_approver_name": "",
"previous_approver_email": "will.smith@gmail.com",
"approver_id": "16367000000073001",
"approver_name": "PATRICIA BOYLE",
"date": "2017-02-20",
"time": "5:59 PM",
"commented_by_id": "16367000000073001",
"commented_by": "Will Smith",
"photo_url": "https://contacts.zoho.com/file?ID=16b87b9dbae5b1008b32c9736141b6f63b3864c8cf94d900cf9bb346f0eb97b105c58df21a12283d421fa80a6cb97ffca294a909bc0c7ae9f1e14dd2e499565d&fs=thumb"
},
{...},
{...}
]
}