Expense Reports
An expense report entity allows you to maintain details of an expense report.
Attribute
draft
or submitted
or approved
or rejected
or reimbursed
or recalled
.true
or false
.true
or false
.true
or false
.true
or false
.true
or false
.km
or mile
.true
or false
.true
or false
.{
"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.
OAuth Scope : ZohoExpense.expensereport.CREATE
Arguments
Headers
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/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("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/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",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'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",
"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/expensereports \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--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.
OAuth Scope : ZohoExpense.expensereport.READ
Query Parameters
Headers
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/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")
.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/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",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
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",
"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/expensereports \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--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.
OAuth Scope : ZohoExpense.expensereport.UPDATE
Arguments
Path Parameters
Headers
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/expensereports/16367000000081005"
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/16367000000081005")
.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/expensereports/16367000000081005', 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/expensereports/16367000000081005", 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/16367000000081005",
"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/expensereports/16367000000081005 \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--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.
OAuth Scope : ZohoExpense.expensereport.READ
Path Parameters
Headers
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/expensereports/16367000000081005"
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/16367000000081005")
.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/expensereports/16367000000081005', 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/expensereports/16367000000081005", 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/16367000000081005",
"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/expensereports/16367000000081005 \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--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.
OAuth Scope : ZohoExpense.approval.CREATE
Path Parameters
Headers
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/expensereports/16367000000081005/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/16367000000081005/approve")
.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/expensereports/16367000000081005/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",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("POST", "/expense/v1/expensereports/16367000000081005/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/16367000000081005/approve",
"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/expensereports/16367000000081005/approve \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-expense-organizationid: 10234695'
{
"code": 0,
"message": "Report approved successfully"
}
Reject an expense report
Reject an expense report.
OAuth Scope : ZohoExpense.approval.CREATE
Arguments
Path Parameters
Headers
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/expensereports/16367000000081005/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/16367000000081005/reject")
.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/expensereports/16367000000081005/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",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("POST", "/expense/v1/expensereports/16367000000081005/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/16367000000081005/reject",
"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/expensereports/16367000000081005/reject \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--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.
OAuth Scope : ZohoExpense.reimbursement.CREATE
Arguments
Path Parameters
Headers
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/expensereports/16367000000081005/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/16367000000081005/reimburse")
.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/expensereports/16367000000081005/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",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("POST", "/expense/v1/expensereports/16367000000081005/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/16367000000081005/reimburse",
"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/expensereports/16367000000081005/reimburse \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--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.
OAuth Scope : ZohoExpense.expensereport.READ
Path Parameters
Headers
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/expensereports/16367000000081005/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/16367000000081005/approvalhistory")
.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/expensereports/16367000000081005/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",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("GET", "/expense/v1/expensereports/16367000000081005/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/16367000000081005/approvalhistory",
"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/expensereports/16367000000081005/approvalhistory \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--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"
},
{...},
{...}
]
}