Expenses
AI Tools
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
An expense object allows you to maintain details of an expense.
Attribute
true or false.true or false.true or false.non_mileage or manual or odometer or gps or imaps or gmaps or wmaps.true or false.{
"expense_id": "16367000000083065",
"total": 207.65,
"bcy_total": 13900.79,
"is_billable": true,
"is_reimbursable": false,
"date": "2017-02-21",
"currency_id": "16367000000000097",
"currency_code": "USD",
"exchange_rate": 66.943366,
"is_inclusive_tax": false,
"customer_id": "27927000000075081",
"customer_name": "ACME Corp.",
"project_id": "27927000001243001",
"project_name": "Coffee Research",
"paid_through_account_id": "16367000000036003",
"paid_through_account_name": "Employee Reimbursements",
"created_time": "2017-02-21T18:33:12+0530",
"last_modified_time": "2017-02-21T18:42:46+0530",
"status": "submitted",
"merchant_id": "16367000000074027",
"merchant_name": "ABS Solutions",
"report_id": "16367000000083075",
"report_name": "Purchase",
"mileage_type": "non_mileage",
"due_days": "Due in 15 days",
"is_expired": false,
"gl_code": "LG001",
"payment_mode": "Check",
"attendees": [
{
"attendee_id": "16367000000104051",
"user_id": "27927000001331015",
"department_id": "16367000000093001",
"department_name": "Finance",
"name": "Will Smith",
"employee_number": "E001",
"customer_id": "27927000000075081",
"email": "will.smith@gmail.com"
}
],
"custom_fields": [
{
"customfield_id": "16367000000277001",
"label": "Other Name",
"value": "Trip"
}
],
"line_items": [
{
"line_item_id": "16367000000354007",
"category_id": "16367000000000400",
"category_name": "Office Supplies",
"description": "Necessary Purchase",
"tax_id": "16367000000086001",
"tax_name": "Sales Tax",
"tax_percentage": 2,
"item_total": 207.65,
"amount": 207.65,
"item_order": 0,
"tags": [
{
"tag_id": "16367000000000301",
"tag_name": "Tag 1",
"tag_option_id": "16367000000225001",
"tag_option_name": "Option 1"
}
]
}
]
}
Create an expense
AI Tools
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Create a new expense.
OAuth Scope : ZohoExpense.expense.CREATE
Arguments
true or false.true or false.true or false.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/expenses"
type: POST
headers: headers_data
content-type: application/json
parameters: parameters_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}");
Request request = new Request.Builder()
.url("https://www.zohoapis.com/expense/v1/expenses")
.post(body)
.addHeader("X-com-zoho-expense-organizationid", "10234695")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
'X-com-zoho-expense-organizationid': '10234695',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://www.zohoapis.com/expense/v1/expenses', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'X-com-zoho-expense-organizationid': "10234695",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("POST", "/expense/v1/expenses", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "POST",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/expense/v1/expenses",
"headers": {
"X-com-zoho-expense-organizationid": "10234695",
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
"content-type": "application/json"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
curl --request POST \
--url https://www.zohoapis.com/expense/v1/expenses \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-expense-organizationid: 10234695' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"currency_id": "16367000000000097",
"date": "2017-02-21",
"is_reimbursable": false,
"paid_through_account_id": "16367000000036003",
"distance": 0,
"merchant_id": "16367000000074027",
"report_id": "16367000000083075",
"payment_mode": "Check",
"customer_id": "27927000000075081",
"project_id": "27927000001243001",
"is_billable": true,
"is_inclusive_tax": false,
"attendees": [
{
"user_id": "27927000001331015"
}
],
"custom_fields": [
{
"customfield_id": "16367000000277001",
"value": "Trip"
}
],
"line_items": [
{
"category_id": "16367000000000400",
"amount": 207.65,
"tax_id": "16367000000086001",
"description": "Necessary Purchase",
"tags": [
{
"tag_id": "16367000000000301",
"tag_name": "Tag 1",
"tag_option_id": "16367000000225001",
"tag_option_name": "Option 1"
}
]
}
]
}
{
"code": 0,
"message": "The expense has been recorded.",
"expenses": [
{
"expense_id": "16367000000083065",
"total": 207.65,
"bcy_total": 13900.79,
"is_billable": true,
"is_reimbursable": false,
"date": "2017-02-21",
"currency_id": "16367000000000097",
"currency_code": "USD",
"exchange_rate": 66.943366,
"is_inclusive_tax": false,
"customer_id": "27927000000075081",
"customer_name": "ACME Corp.",
"project_id": "27927000001243001",
"project_name": "Coffee Research",
"paid_through_account_id": "16367000000036003",
"paid_through_account_name": "Employee Reimbursements",
"created_time": "2017-02-21T18:33:12+0530",
"last_modified_time": "2017-02-21T18:42:46+0530",
"status": "submitted",
"merchant_id": "16367000000074027",
"merchant_name": "ABS Solutions",
"report_id": "16367000000083075",
"report_name": "Purchase",
"mileage_type": "non_mileage",
"due_days": "Due in 15 days",
"is_expired": false,
"gl_code": "LG001",
"payment_mode": "Check",
"attendees": [
{
"attendee_id": "16367000000104051",
"user_id": "27927000001331015",
"department_id": "16367000000093001",
"department_name": "Finance",
"name": "Will Smith",
"employee_number": "E001",
"customer_id": "27927000000075081",
"email": "will.smith@gmail.com"
}
],
"custom_fields": [
{
"customfield_id": "16367000000277001",
"label": "Other Name",
"value": "Trip"
}
],
"line_items": [
{
"line_item_id": "16367000000354007",
"category_id": "16367000000000400",
"category_name": "Office Supplies",
"description": "Necessary Purchase",
"tax_id": "16367000000086001",
"tax_name": "Sales Tax",
"tax_percentage": 2,
"item_total": 207.65,
"amount": 207.65,
"item_order": 0,
"tags": [
{
"tag_id": "16367000000000301",
"tag_name": "Tag 1",
"tag_option_id": "16367000000225001",
"tag_option_name": "Option 1"
}
]
}
]
},
{...},
{...}
]
}
List all expenses
AI Tools
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
List of all existing expenses.
OAuth Scope : ZohoExpense.expense.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/reports/expensedetails"
type: GET
headers: headers_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/expense/v1/reports/expensedetails")
.get()
.addHeader("X-com-zoho-expense-organizationid", "10234695")
.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/reports/expensedetails', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
headers = {
'X-com-zoho-expense-organizationid': "10234695",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("GET", "/expense/v1/reports/expensedetails", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "GET",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/expense/v1/reports/expensedetails",
"headers": {
"X-com-zoho-expense-organizationid": "10234695",
"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/reports/expensedetails \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-expense-organizationid: 10234695'
{
"code": 0,
"message": "success",
"expenses": [
{
"expense_id": "16367000000083065",
"date": "2017-02-21",
"description": "Necessary Purchase",
"created_by": "16367000000074021",
"created_by_name": "PATRICIA",
"employee_number": "E001",
"currency_id": "16367000000000097",
"currency_code": "USD",
"paid_through_account_id": "16367000000036003",
"paid_through_account_name": "Employee Reimbursements",
"bcy_total": 13900.79,
"bcy_subtotal": 13900.79,
"total": 207.65,
"total_without_tax": 207.65,
"is_billable": true,
"is_reimbursable": false,
"reference_number": "DD145",
"due_days": "Due in 15 days",
"merchant_id": "16367000000074027",
"merchant_name": "ABS Solutions",
"status": "submitted",
"created_time": "2017-02-21T18:33:12+0530",
"last_modified_time": "2017-02-21T18:42:46+0530",
"receipt_name": "receipt1.jpg",
"report_id": "16367000000083075",
"mileage_type": "non_mileage",
"report_name": "Purchase",
"is_receipt_only": false,
"distance": 0,
"per_diem_rate": 0,
"per_diem_days": 0,
"per_diem_id": "",
"per_diem_name": "",
"expense_type": "non_mileage",
"location": "Washington",
"receipt_type": "jpg",
"policy_violated": false,
"comments_count": 0,
"report_status": "submitted",
"price_precision": 2,
"mileage_rate": 0,
"mileage_unit": "km",
"receipt_status": "processed",
"is_uncategorized": false,
"is_expired": false,
"gl_code": "LG001",
"exchange_rate": 66.943366,
"start_reading": "",
"end_reading": "",
"payment_mode": "Check",
"customer_id": "27927000000075081",
"customer_name": "ACME Corp.",
"custom_fields": [
{
"customfield_id": "16367000000277001",
"label": "Other Name",
"value": "Trip"
}
],
"project_id": "27927000001243001",
"project_name": "Coffee Research",
"transaction_description": "",
"tax_id": "16367000000086001",
"tax_name": "Sales Tax",
"tax_percentage": 2,
"amount": 207.65,
"is_inclusive_tax": false,
"vehicle_type": "Bike",
"vehicle_id": "17456000000078029",
"fuel_type": "lpg",
"engine_capacity_range": "between_1401cc_and_1600cc",
"is_personal": false,
"policy_id": "16367000000092011",
"policy_name": "LIC",
"documents": [
{
"file_name": "receipt1.jpg",
"file_size_formatted": "71.8 KB",
"attachment_order": 1,
"document_id": "16367000000083071"
}
],
"reimbursement_reference": "",
"reimbursement_date": "",
"reimbursement_paid_through_account_id": "",
"reimbursement_paid_through_account_name": "",
"reimbursement_currency_id": "",
"reimbursement_currency_code": ""
},
{...},
{...}
]
}
Update an expense
AI Tools
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Update the details of an expense.
OAuth Scope : ZohoExpense.expense.UPDATE
Arguments
true or false.true or false.true or false.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/expenses/16367000000083065"
type: PUT
headers: headers_data
content-type: application/json
parameters: parameters_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}");
Request request = new Request.Builder()
.url("https://www.zohoapis.com/expense/v1/expenses/16367000000083065")
.put(body)
.addHeader("X-com-zoho-expense-organizationid", "10234695")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'PUT',
headers: {
'X-com-zoho-expense-organizationid': '10234695',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://www.zohoapis.com/expense/v1/expenses/16367000000083065', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'X-com-zoho-expense-organizationid': "10234695",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("PUT", "/expense/v1/expenses/16367000000083065", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "PUT",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/expense/v1/expenses/16367000000083065",
"headers": {
"X-com-zoho-expense-organizationid": "10234695",
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
"content-type": "application/json"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
curl --request PUT \
--url https://www.zohoapis.com/expense/v1/expenses/16367000000083065 \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-expense-organizationid: 10234695' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"paid_through_account_id": "16367000000036003",
"date": "2017-02-21",
"is_reimbursable": false,
"currency_id": "16367000000000097",
"merchant_id": "16367000000074027",
"report_id": "16367000000083075",
"payment_mode": "Check",
"customer_id": "27927000000075081",
"project_id": "27927000001243001",
"is_billable": true,
"is_inclusive_tax": false,
"attendees": [
{
"attendee_id": "16367000000104051",
"user_id": "27927000001331015"
}
],
"custom_fields": [
{
"customfield_id": "16367000000277001",
"value": "Trip"
}
],
"line_items": [
{
"line_item_id": "16367000000354007",
"category_id": "16367000000000400",
"description": "Necessary Purchase",
"tax_id": "16367000000086001",
"amount": 207.65,
"item_order": 0,
"tags": [
{
"tag_id": "16367000000000301",
"tag_name": "Tag 1",
"tag_option_id": "16367000000225001",
"tag_option_name": "Option 1"
}
]
}
]
}
{
"code": 0,
"message": "Expense information has been updated.",
"expense": {
"expense_id": "16367000000083065",
"total": 207.65,
"bcy_total": 13900.79,
"is_billable": true,
"is_reimbursable": false,
"date": "2017-02-21",
"currency_id": "16367000000000097",
"currency_code": "USD",
"exchange_rate": 66.943366,
"is_inclusive_tax": false,
"customer_id": "27927000000075081",
"customer_name": "ACME Corp.",
"project_id": "27927000001243001",
"project_name": "Coffee Research",
"paid_through_account_id": "16367000000036003",
"paid_through_account_name": "Employee Reimbursements",
"created_time": "2017-02-21T18:33:12+0530",
"last_modified_time": "2017-02-21T18:42:46+0530",
"status": "submitted",
"merchant_id": "16367000000074027",
"merchant_name": "ABS Solutions",
"report_id": "16367000000083075",
"report_name": "Purchase",
"mileage_type": "non_mileage",
"due_days": "Due in 15 days",
"is_expired": false,
"gl_code": "LG001",
"payment_mode": "Check",
"attendees": [
{
"attendee_id": "16367000000104051",
"user_id": "27927000001331015",
"department_id": "16367000000093001",
"department_name": "Finance",
"name": "Will Smith",
"employee_number": "E001",
"customer_id": "27927000000075081",
"email": "will.smith@gmail.com"
}
],
"policy_name": "LIC",
"custom_fields": [
{
"customfield_id": "16367000000277001",
"label": "Other Name",
"value": "Trip"
}
],
"line_items": [
{
"line_item_id": "16367000000354007",
"category_id": "16367000000000400",
"category_name": "Office Supplies",
"description": "Necessary Purchase",
"tax_id": "16367000000086001",
"tax_name": "Sales Tax",
"tax_percentage": 2,
"item_total": 207.65,
"amount": 207.65,
"item_order": 0,
"tags": [
{
"tag_id": "16367000000000301",
"tag_name": "Tag 1",
"tag_option_id": "16367000000225001",
"tag_option_name": "Option 1"
}
]
}
]
}
}
Merge expenses
AI Tools
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Merge multiple expenses.
OAuth Scope : ZohoExpense.expense.CREATE
Path Parameters
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/expenses/16367000000083065/merge?duplicate_expense_id=16367000000083070"
type: POST
headers: headers_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/expense/v1/expenses/16367000000083065/merge?duplicate_expense_id=16367000000083070")
.post(null)
.addHeader("X-com-zoho-expense-organizationid", "10234695")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
'X-com-zoho-expense-organizationid': '10234695',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/expense/v1/expenses/16367000000083065/merge?duplicate_expense_id=16367000000083070', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
headers = {
'X-com-zoho-expense-organizationid': "10234695",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("POST", "/expense/v1/expenses/16367000000083065/merge?duplicate_expense_id=16367000000083070", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "POST",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/expense/v1/expenses/16367000000083065/merge?duplicate_expense_id=16367000000083070",
"headers": {
"X-com-zoho-expense-organizationid": "10234695",
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
curl --request POST \
--url 'https://www.zohoapis.com/expense/v1/expenses/16367000000083065/merge?duplicate_expense_id=16367000000083070' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-expense-organizationid: 10234695'
{
"code": 0,
"message": "Expenses merged successfully."
}