Trips
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
A trip entity allows you to maintain information about the trips of your employees.
Attribute
true or false.true or false.flight ,by_road, train, bus{
"trip_id": "34017000000000103",
"is_international": true,
"is_round_trip": true,
"is_visa_required": true,
"start_date": "2017-02-21",
"end_date": "2017-02-27",
"trip_number": "TRIP-00001",
"business_purpose": "Meeting with client",
"description": "Regarding business proposal",
"departure": "ABC International Airport",
"destination_country": "Australia",
"destination_city": "melbourne",
"meal_preference": "avml",
"seat_preference": "middle",
"is_billable": false,
"customer_id": "16367000000096001",
"project_id": "16367000000096055",
"project_name": "Brochure Design - Spa",
"customer_name": "Kenny Digital",
"currency_id": "16367000000000097",
"currency_code": "INR",
"exchange_rate": 1,
"price_precision": 2,
"budget_amount": 5000,
"bcy_budget_amount": 5000,
"status": "draft",
"custom_fields": [
{
"customfield_id": "16367000000093005",
"data_type": "string",
"is_active": true,
"is_mandatory": false,
"label": "Nick Name",
"value": "Tric"
}
],
"submitted_date": "2017-02-28",
"last_submitted_date": "2017-02-28",
"approved_date": "2017-03-01",
"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",
"submitted_to_employee_no": "E001",
"submitted_to_department_name": "Finance",
"submitted_by": "34017000000091001",
"submitter_name": "Will Smith",
"submitter_email": "will.smith@gmail.com",
"submitter_employee_no": "E002",
"submitter_department_name": "Maintenance",
"employee_number": "E003",
"department_id": "16367000000093001",
"department_name": "Finance",
"air_travel_itinerary": [
{
"is_accomodation": false,
"is_personal_travel": true,
"line_item_id": "34017000000091584",
"departure_state": "tamil nadu",
"departure_date": "2017-09-08",
"description": "Regarding business proposal",
"departure_city": "chennai",
"departure_country": "india",
"arrival_country": "australia",
"travel_mode": "flight",
"arrival_state": "victoria",
"arrival_city": "melbourne",
"arrival_date": "2017-09-08",
"order": 1
}
],
"created_time": "2017-02-28T18:18:03+0530",
"created_date": "2017-02-28",
"last_modified_time": "2017-02-28T18:31:09+0530",
"documents": [
{
"file_name": "receipt1.jpg",
"file_size_formatted": "35.6 KB",
"attachment_order": 1,
"document_id": "16367000000078085"
}
],
"created_by_id": "16367000000073071",
"created_by_name": "Will Smith",
"user_id": "16367000000073001",
"user_name": "Will Smith",
"user_email": "will.smith@gmail.com",
"created_by_email": "will.smith@gmail.com"
}
Create a trip
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 trip.
OAuth Scope : ZohoExpense.trip.CREATE
Arguments
flight ,by_road, train, busHeaders
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/trips"
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/trips")
.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/trips', 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/trips", 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/trips",
"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/trips \
--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",
"exchange_rate": 1,
"budget_amount": 5000,
"is_international": true,
"is_visa_required": true,
"business_purpose": "Meeting with client",
"is_billable": false,
"customer_id": "16367000000096001",
"project_id": "16367000000096055",
"destination_country": "Australia",
"meal_preference": "avml",
"seat_preference": "middle",
"line_items": [
{
"line_item_id": "34017000000091584",
"order": 1,
"departure_date": "2017-09-08",
"departure_country": "india",
"departure_state": "tamil nadu",
"departure_city": "chennai",
"arrival_date": "2017-09-08",
"arrival_country": "australia",
"arrival_state": "victoria",
"arrival_city": "melbourne",
"travel_mode": "flight",
"is_personal_travel": true,
"is_accomodation": false
}
],
"description": "Regarding business proposal",
"custom_fields": [
{
"customfield_id": "16367000000093005",
"value": "Tric"
}
],
"attendees": [
{
"user_id": "16367000000073001"
}
],
"trip_number": "TRIP-00001"
}
{
"code": 0,
"message": "trip created successfully",
"trip": {
"trip_id": "34017000000000103",
"is_international": true,
"is_round_trip": true,
"is_visa_required": true,
"start_date": "2017-02-21",
"end_date": "2017-02-27",
"trip_number": "TRIP-00001",
"business_purpose": "Meeting with client",
"description": "Regarding business proposal",
"departure": "ABC International Airport",
"destination_country": "Australia",
"destination_city": "melbourne",
"meal_preference": "avml",
"seat_preference": "middle",
"is_billable": false,
"customer_id": "16367000000096001",
"project_id": "16367000000096055",
"project_name": "Brochure Design - Spa",
"customer_name": "Kenny Digital",
"currency_id": "16367000000000097",
"currency_code": "INR",
"exchange_rate": 1,
"price_precision": 2,
"budget_amount": 5000,
"bcy_budget_amount": 5000,
"status": "draft",
"custom_fields": [
{
"customfield_id": "16367000000093005",
"data_type": "string",
"is_active": true,
"is_mandatory": false,
"label": "Nick Name",
"value": "Tric"
}
],
"submitted_date": "2017-02-28",
"last_submitted_date": "2017-02-28",
"approved_date": "2017-03-01",
"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",
"submitted_to_employee_no": "E001",
"submitted_to_department_name": "Finance",
"submitted_by": "34017000000091001",
"submitter_name": "Will Smith",
"submitter_email": "will.smith@gmail.com",
"submitter_employee_no": "E002",
"submitter_department_name": "Maintenance",
"employee_number": "E003",
"department_id": "16367000000093001",
"department_name": "Finance",
"air_travel_itinerary": [
{
"is_accomodation": false,
"is_personal_travel": true,
"line_item_id": "34017000000091584",
"departure_state": "tamil nadu",
"departure_date": "2017-09-08",
"description": "Regarding business proposal",
"departure_city": "chennai",
"departure_country": "india",
"arrival_country": "australia",
"travel_mode": "flight",
"arrival_state": "victoria",
"arrival_city": "melbourne",
"arrival_date": "2017-09-08",
"order": 1
}
],
"created_time": "2017-02-28T18:18:03+0530",
"created_date": "2017-02-28",
"last_modified_time": "2017-02-28T18:31:09+0530",
"documents": [
{
"file_name": "receipt1.jpg",
"file_size_formatted": "35.6 KB",
"attachment_order": 1,
"document_id": "16367000000078085"
}
],
"created_by_id": "16367000000073071",
"created_by_name": "Will Smith",
"user_id": "16367000000073001",
"user_name": "Will Smith",
"user_email": "will.smith@gmail.com",
"created_by_email": "will.smith@gmail.com"
}
}
Retrive list of all trips
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 all existing trips.
OAuth Scope : ZohoExpense.trip.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/trips"
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/trips")
.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/trips', 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/trips", 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/trips",
"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/trips \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-expense-organizationid: 10234695'
{
"code": 0,
"message": "success",
"trips": [
{
"currency_id": "16367000000000097",
"budget_amount": 5000,
"bcy_budget_amount": 5000,
"start_date": "2017-02-21",
"end_date": "2017-02-27",
"trip_id": "34017000000000103",
"is_round_trip": true,
"is_international": true,
"is_visa_required": true,
"trip_number": "TRIP-00001",
"business_purpose": "Meeting with client",
"description": "Regarding business proposal",
"departure": "ABC International Airport",
"destination_country": "Australia",
"destination_city": "melbourne",
"meal_preference": "avml",
"seat_preference": "middle",
"is_billable": false,
"customer_id": "16367000000096001",
"project_id": "16367000000096055",
"customer_name": "Kenny Digital",
"project_name": "Brochure Design - Spa",
"status": "draft",
"custom_fields": [
{
"customfield_id": "16367000000093005",
"data_type": "string",
"is_active": true,
"is_mandatory": false,
"label": "Nick Name",
"value": "Tric"
}
],
"submitted_date": "2017-02-28",
"last_submitted_date": "2017-02-28",
"approver_id": "16367000000073001",
"approver_name": "PATRICIA BOYLE",
"approver_email": "patriciab@zillum.com",
"submitted_to_id": "16367000000073001",
"submitted_to_email": "patriciab@zillum.com",
"submitted_to_name": "PATRICIA BOYLE",
"submitted_by": "34017000000091001",
"submitter_name": "Will Smith",
"submitter_email": "will.smith@gmail.com",
"submitter_employee_no": "E002",
"submitter_department_name": "Maintenance",
"employee_number": "E003",
"department_id": "16367000000093001",
"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": "16367000000073001",
"previous_approver_name": "Will Smith",
"previous_approver_email": "will.smith@gmail.com",
"previous_approver_employee_no": "E008",
"previous_approver_department_name": "Marketing",
"air_travel_itinerary": [
{
"is_accomodation": false,
"is_personal_travel": true,
"line_item_id": "34017000000091584",
"departure_state": "tamil nadu",
"departure_date": "2017-09-08",
"description": "Regarding business proposal",
"departure_city": "chennai",
"departure_country": "india",
"arrival_country": "australia",
"travel_mode": "flight",
"arrival_state": "victoria",
"arrival_city": "melbourne",
"arrival_date": "2017-09-08",
"order": 1
}
],
"hotel_reservation_itinerary": [
{
"is_accomodation": false,
"is_personal_travel": true,
"line_item_id": "34017000000091584",
"departure_state": "tamil nadu",
"departure_date": "2017-09-08",
"description": "Regarding business proposal",
"departure_city": "chennai",
"departure_country": "india",
"arrival_country": "australia",
"travel_mode": "flight",
"arrival_state": "victoria",
"arrival_city": "melbourne",
"arrival_date": "2017-09-08",
"order": 1
}
],
"car_rental_itinerary": [
{
"is_accomodation": false,
"is_personal_travel": true,
"line_item_id": "34017000000091584",
"departure_state": "tamil nadu",
"departure_date": "2017-09-08",
"description": "Regarding business proposal",
"departure_city": "chennai",
"departure_country": "india",
"arrival_country": "australia",
"travel_mode": "flight",
"arrival_state": "victoria",
"arrival_city": "melbourne",
"arrival_date": "2017-09-08",
"order": 1
}
],
"other_itinerary": [
{
"is_accomodation": false,
"is_personal_travel": true,
"line_item_id": "34017000000091584",
"departure_state": "tamil nadu",
"departure_date": "2017-09-08",
"description": "Regarding business proposal",
"departure_city": "chennai",
"departure_country": "india",
"arrival_country": "australia",
"travel_mode": "flight",
"arrival_state": "victoria",
"arrival_city": "melbourne",
"arrival_date": "2017-09-08",
"order": 1
}
],
"attendees": [
{
"department_id": "16367000000093001",
"user_id": "16367000000073001",
"attendee_id": "31672000000003102",
"name": "Jayson",
"employee_number": "E003",
"email": "jayson@gmail.com"
}
],
"line_items": [
{
"line_item_id": "34017000000091584",
"order": 1,
"departure_date": "2017-09-08",
"departure_country": "india",
"departure_state": "tamil nadu",
"departure_city": "chennai",
"arrival_date": "2017-09-08",
"arrival_country": "australia",
"arrival_state": "victoria",
"arrival_city": "melbourne",
"travel_mode": "flight",
"is_personal_travel": true,
"is_accomodation": false
}
],
"comments": [
{
"description": "Regarding business proposal",
"commented_by_id": "34017000000091216",
"commented_by": "Will Smith"
}
],
"currency_code": "INR",
"price_precision": 2,
"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",
"user_id": "16367000000073001",
"policy_id": "30082000000003588",
"policy_name": "Official Trips",
"user_name": "Will Smith",
"user_email": "will.smith@gmail.com",
"user_employee_no": "E002",
"user_department_name": "Maintenance",
"documents": [
{
"file_name": "receipt1.jpg",
"file_size_formatted": "35.6 KB",
"attachment_order": 1,
"document_id": "16367000000078085"
}
]
},
{...},
{...}
]
}
Update a trip
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 an existing Trip.
OAuth Scope : ZohoExpense.trip.UPDATE
Arguments
flight ,by_road, train, busPath 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/trips/34017000000000103"
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/trips/34017000000000103")
.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/trips/34017000000000103', 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/trips/34017000000000103", 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/trips/34017000000000103",
"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/trips/34017000000000103 \
--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",
"budget_amount": 5000,
"is_international": true,
"is_visa_required": true,
"business_purpose": "Meeting with client",
"is_billable": false,
"customer_id": "16367000000096001",
"project_id": "16367000000096055",
"destination_country": "Australia",
"meal_preference": "avml",
"seat_preference": "middle",
"line_items": [
{
"line_item_id": "34017000000091584",
"order": 1,
"departure_date": "2017-09-08",
"departure_country": "india",
"departure_state": "tamil nadu",
"departure_city": "chennai",
"arrival_date": "2017-09-08",
"arrival_country": "australia",
"arrival_state": "victoria",
"arrival_city": "melbourne",
"travel_mode": "flight",
"is_personal_travel": true,
"is_accomodation": false
}
],
"description": "Regarding business proposal",
"custom_fields": [
{
"customfield_id": "16367000000093005",
"value": "Tric"
}
],
"attendees": [
{
"user_id": "16367000000073001"
}
],
"trip_number": "TRIP-00001"
}
{
"code": 0,
"message": "Trip details updated successfully",
"trips": {
"currency_id": "16367000000000097",
"budget_amount": 5000,
"bcy_budget_amount": 5000,
"start_date": "2017-02-21",
"end_date": "2017-02-27",
"trip_id": "34017000000000103",
"is_round_trip": true,
"is_international": true,
"is_visa_required": true,
"trip_number": "TRIP-00001",
"business_purpose": "Meeting with client",
"description": "Regarding business proposal",
"departure": "ABC International Airport",
"destination_country": "Australia",
"destination_city": "melbourne",
"meal_preference": "avml",
"seat_preference": "middle",
"is_billable": false,
"customer_id": "16367000000096001",
"project_id": "16367000000096055",
"customer_name": "Kenny Digital",
"project_name": "Brochure Design - Spa",
"status": "draft",
"custom_fields": [
{
"customfield_id": "16367000000093005",
"data_type": "string",
"is_active": true,
"is_mandatory": false,
"label": "Nick Name",
"value": "Tric"
}
],
"submitted_date": "2017-02-28",
"last_submitted_date": "2017-02-28",
"approver_id": "16367000000073001",
"approver_name": "PATRICIA BOYLE",
"approver_email": "patriciab@zillum.com",
"submitted_to_id": "16367000000073001",
"submitted_to_email": "patriciab@zillum.com",
"submitted_to_name": "PATRICIA BOYLE",
"submitted_by": "34017000000091001",
"submitter_name": "Will Smith",
"submitter_email": "will.smith@gmail.com",
"submitter_employee_no": "E002",
"submitter_department_name": "Maintenance",
"employee_number": "E003",
"department_id": "16367000000093001",
"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": "16367000000073001",
"previous_approver_name": "Will Smith",
"previous_approver_email": "will.smith@gmail.com",
"previous_approver_employee_no": "E008",
"previous_approver_department_name": "Marketing",
"air_travel_itinerary": [
{
"is_accomodation": false,
"is_personal_travel": true,
"line_item_id": "34017000000091584",
"departure_state": "tamil nadu",
"departure_date": "2017-09-08",
"description": "Regarding business proposal",
"departure_city": "chennai",
"departure_country": "india",
"arrival_country": "australia",
"travel_mode": "flight",
"arrival_state": "victoria",
"arrival_city": "melbourne",
"arrival_date": "2017-09-08",
"order": 1
}
],
"hotel_reservation_itinerary": [
{
"is_accomodation": false,
"is_personal_travel": true,
"line_item_id": "34017000000091584",
"departure_state": "tamil nadu",
"departure_date": "2017-09-08",
"description": "Regarding business proposal",
"departure_city": "chennai",
"departure_country": "india",
"arrival_country": "australia",
"travel_mode": "flight",
"arrival_state": "victoria",
"arrival_city": "melbourne",
"arrival_date": "2017-09-08",
"order": 1
}
],
"car_rental_itinerary": [
{
"is_accomodation": false,
"is_personal_travel": true,
"line_item_id": "34017000000091584",
"departure_state": "tamil nadu",
"departure_date": "2017-09-08",
"description": "Regarding business proposal",
"departure_city": "chennai",
"departure_country": "india",
"arrival_country": "australia",
"travel_mode": "flight",
"arrival_state": "victoria",
"arrival_city": "melbourne",
"arrival_date": "2017-09-08",
"order": 1
}
],
"other_itinerary": [
{
"is_accomodation": false,
"is_personal_travel": true,
"line_item_id": "34017000000091584",
"departure_state": "tamil nadu",
"departure_date": "2017-09-08",
"description": "Regarding business proposal",
"departure_city": "chennai",
"departure_country": "india",
"arrival_country": "australia",
"travel_mode": "flight",
"arrival_state": "victoria",
"arrival_city": "melbourne",
"arrival_date": "2017-09-08",
"order": 1
}
],
"attendees": [
{
"department_id": "16367000000093001",
"user_id": "16367000000073001",
"attendee_id": "31672000000003102",
"name": "Jayson",
"employee_number": "E003",
"email": "jayson@gmail.com"
}
],
"line_items": [
{
"line_item_id": "34017000000091584",
"order": 1,
"departure_date": "2017-09-08",
"departure_country": "india",
"departure_state": "tamil nadu",
"departure_city": "chennai",
"arrival_date": "2017-09-08",
"arrival_country": "australia",
"arrival_state": "victoria",
"arrival_city": "melbourne",
"travel_mode": "flight",
"is_personal_travel": true,
"is_accomodation": false
}
],
"comments": [
{
"description": "Regarding business proposal",
"commented_by_id": "34017000000091216",
"commented_by": "Will Smith"
}
],
"currency_code": "INR",
"price_precision": 2,
"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",
"user_id": "16367000000073001",
"policy_id": "30082000000003588",
"policy_name": "Official Trips",
"user_name": "Will Smith",
"user_email": "will.smith@gmail.com",
"user_employee_no": "E002",
"user_department_name": "Maintenance",
"documents": [
{
"file_name": "receipt1.jpg",
"file_size_formatted": "35.6 KB",
"attachment_order": 1,
"document_id": "16367000000078085"
}
]
}
}
Retrive details of a trip
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
Retrive details of an existing trip.
OAuth Scope : ZohoExpense.trip.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/trips/34017000000000103"
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/trips/34017000000000103")
.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/trips/34017000000000103', 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/trips/34017000000000103", 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/trips/34017000000000103",
"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/trips/34017000000000103 \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-expense-organizationid: 10234695'
{
"code": 0,
"message": "success",
"trip": {
"trip_id": "34017000000000103",
"is_international": true,
"is_round_trip": true,
"is_visa_required": true,
"start_date": "2017-02-21",
"end_date": "2017-02-27",
"trip_number": "TRIP-00001",
"business_purpose": "Meeting with client",
"description": "Regarding business proposal",
"departure": "ABC International Airport",
"destination_country": "Australia",
"destination_city": "melbourne",
"meal_preference": "avml",
"seat_preference": "middle",
"is_billable": false,
"customer_id": "16367000000096001",
"project_id": "16367000000096055",
"project_name": "Brochure Design - Spa",
"customer_name": "Kenny Digital",
"currency_id": "16367000000000097",
"currency_code": "INR",
"exchange_rate": 1,
"price_precision": 2,
"budget_amount": 5000,
"bcy_budget_amount": 5000,
"status": "draft",
"custom_fields": [
{
"customfield_id": "16367000000093005",
"data_type": "string",
"is_active": true,
"is_mandatory": false,
"label": "Nick Name",
"value": "Tric"
}
],
"submitted_date": "2017-02-28",
"last_submitted_date": "2017-02-28",
"approved_date": "2017-03-01",
"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",
"submitted_to_employee_no": "E001",
"submitted_to_department_name": "Finance",
"submitted_by": "34017000000091001",
"submitter_name": "Will Smith",
"submitter_email": "will.smith@gmail.com",
"submitter_employee_no": "E002",
"submitter_department_name": "Maintenance",
"employee_number": "E003",
"department_id": "16367000000093001",
"department_name": "Finance",
"air_travel_itinerary": [
{
"is_accomodation": false,
"is_personal_travel": true,
"line_item_id": "34017000000091584",
"departure_state": "tamil nadu",
"departure_date": "2017-09-08",
"description": "Regarding business proposal",
"departure_city": "chennai",
"departure_country": "india",
"arrival_country": "australia",
"travel_mode": "flight",
"arrival_state": "victoria",
"arrival_city": "melbourne",
"arrival_date": "2017-09-08",
"order": 1
}
],
"created_time": "2017-02-28T18:18:03+0530",
"created_date": "2017-02-28",
"last_modified_time": "2017-02-28T18:31:09+0530",
"documents": [
{
"file_name": "receipt1.jpg",
"file_size_formatted": "35.6 KB",
"attachment_order": 1,
"document_id": "16367000000078085"
}
],
"created_by_id": "16367000000073071",
"created_by_name": "Will Smith",
"user_id": "16367000000073001",
"user_name": "Will Smith",
"user_email": "will.smith@gmail.com",
"created_by_email": "will.smith@gmail.com"
}
}
Delete a trip request
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
Delete a trip request. Approved, Closed and Cancelled trips cannot be deleted.
OAuth Scope : ZohoExpense.trip.DELETE
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/trips/34017000000000103"
type: DELETE
headers: headers_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/expense/v1/trips/34017000000000103")
.delete(null)
.addHeader("X-com-zoho-expense-organizationid", "10234695")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'DELETE',
headers: {
'X-com-zoho-expense-organizationid': '10234695',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/expense/v1/trips/34017000000000103', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
headers = {
'X-com-zoho-expense-organizationid': "10234695",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("DELETE", "/expense/v1/trips/34017000000000103", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "DELETE",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/expense/v1/trips/34017000000000103",
"headers": {
"X-com-zoho-expense-organizationid": "10234695",
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
curl --request DELETE \
--url https://www.zohoapis.com/expense/v1/trips/34017000000000103 \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-expense-organizationid: 10234695'
{
"code": 0,
"message": "Trip(s) deleted successfully"
}
Approve a trip request
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
Approve a submitted trip request.
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/trips/34017000000000103/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/trips/34017000000000103/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/trips/34017000000000103/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/trips/34017000000000103/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/trips/34017000000000103/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/trips/34017000000000103/approve \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-expense-organizationid: 10234695'
{
"code": 0,
"message": "Trip approved successfully"
}
Reject a trip request
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
Reject a submitted trip request.
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/trips/34017000000000103/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/trips/34017000000000103/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/trips/34017000000000103/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/trips/34017000000000103/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/trips/34017000000000103/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/trips/34017000000000103/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": [
{
"description": "Regarding business proposal",
"commented_by_id": "34017000000091216",
"commented_by": "Will Smith"
}
]
}
{
"code": 0,
"message": "Trip has been rejected."
}
Cancel a trip
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
Cancel a trip.
OAuth Scope : ZohoExpense.trip.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/trips/34017000000000103/cancel"
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/trips/34017000000000103/cancel")
.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/trips/34017000000000103/cancel', 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/trips/34017000000000103/cancel", 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/trips/34017000000000103/cancel",
"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/trips/34017000000000103/cancel \
--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": [
{
"description": "Regarding business proposal",
"commented_by_id": "34017000000091216",
"commented_by": "Will Smith"
}
]
}
{
"code": 0,
"message": "Trip has been marked 'Cancelled'."
}
Close a trip
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
Close an approved trip.
OAuth Scope : ZohoExpense.trip.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/trips/34017000000000103/close"
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/trips/34017000000000103/close")
.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/trips/34017000000000103/close', 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/trips/34017000000000103/close", 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/trips/34017000000000103/close",
"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/trips/34017000000000103/close \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-expense-organizationid: 10234695'
{
"code": 0,
"message": "Trip closed successfully"
}