API Docs
/
No Results Found
Trips

Trips

A trip entity allows you to maintain information about the trips of your employees.

End Points

Attribute

trip_id
long
Unique ID generated by the server. This is used as a identifier.
is_international
boolean
Whether the trip is an international trip.
is_round_trip
boolean
Whether the trip is a round trip.
is_visa_required
boolean
Whether visa is required for the trip.
start_date
string
Start date of the trip.
end_date
string
End date of the trip.
trip_number
string
Trip's unique number
business_purpose
string
Purpose of the trip.
description
string
Any comments about the trip.
departure
string
Place of departure.
destination_country
string
Destination Country of the trip.
destination_city
string
Destination City of the trip.
meal_preference
string
Meal preference for the traveller in flight.
seat_preference
string
Seat preference for the traveller in flight.
is_billable
boolean
Whether the customer needs to be billed for the trip.
customer_id
long
Unique ID of the customer associated with the trip.
project_id
long
Unique ID of the project associated with the trip.
project_name
string
Name of the project associated with the trip.
customer_name
string
Name of the customer associated with the trip.
currency_id
long
Unique ID for currency.
currency_code
string
Currency code.
exchange_rate
double
Exchange rate of the currency with respect to base currency.
price_precision
integer
Amount precision upto n decimal points.
budget_amount
double
Budget amount for the trip.
bcy_budget_amount
double
Budget amount for the trip in base currency.
status
string
Status of the trip.
custom_fields
array
Custom field added.
Show Sub-Attributes arrow
customfield_id
long
Unique ID for the Custom Field.
data_type
string
Data Type of the Custom Field.
is_active
boolean
Whether the Custom Field is Active. It can either be true or false.
is_mandatory
boolean
Whether the Custom Field is Mandatory. It can either be true or false.
label
string
Label for the Custom Field.
value
string
Value entered in the Custom Field.
submitted_date
string
Date of trip submission.
last_submitted_date
string
Date of previous submission.
approved_date
string
Date of trip Approval.
approver_id
long
Unique ID for the current approver.
approver_name
string
Current approver name.
approver_email
string
Email ID of the current approver.
submitted_to_id
long
Unique ID of the person to whom the trip was submitted first.
submitted_to_name
string
Name of the person to whom the trip was submitted first.
submitted_to_email
string
Email ID of the person to whom the trip was submitted first.
submitted_to_employee_no
string
Employee Number of the person to whom the trip was submitted first.
submitted_to_department_name
string
Department Name of the person to whom the trip was submitted first.
submitted_by
long
Unique ID of the submitter.
submitter_name
string
Name of the submitter.
submitter_email
string
Email ID of the submitter.
submitter_employee_no
string
Employee Number of the submitter.
submitter_department_name
string
Department Name of the submitter.
employee_number
string
Employee Number of the owner of the trip.
department_id
long
Unique ID of the department.
department_name
string
Name of the department.
air_travel_itinerary
array
Air Travel Itinerary
Show Sub-Attributes arrow
is_accomodation
boolean
Whether accomodation is provided.
is_personal_travel
boolean
Whether it is a personal trip.
line_item_id
long
Unique ID for identifying the line item. This is server generated.
departure_state
string
Departure State.
departure_date
string
Date of departure.
description
string
Any comments about the trip.
departure_city
string
Departure City.
departure_country
string
Departure Country.
arrival_country
string
Arrival Country
travel_mode
string
Mode of transportation. Possible values are flight ,by_road, train, bus
arrival_state
string
Arrival State
arrival_city
string
Arrival City
arrival_date
string
Date of arrival.
order
integer
Order of the line item.
created_time
string
Time when the trip was created.
created_date
string
Date when the trip was created.
last_modified_time
string
Time when the trip was last modified.
documents
array
Details of Documents attached.
Show Sub-Attributes arrow
file_name
string
Name of the Document.
file_size_formatted
string
Formatted value of File Size.
attachment_order
integer
Order of the Attached Document.
document_id
long
Unique Id for the Document.
created_by_id
long
Unique ID of the person who created the trip.
created_by_name
string
Name of the person who created the trip.
user_id
long
Unique ID of the owner of the trip.
user_name
string
Name of the User.
user_email
string
Email Id of the User.
created_by_email
string
Email ID of the person who created the trip.

Example

{ "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

Create a new trip.

Arguments

currency_id
long
Unique ID for currency.
exchange_rate
double
Exchange rate of the currency with respect to base currency.
budget_amount
double
Budget amount for the trip.
is_international
boolean
(Required)
Whether the trip is an international trip.
is_visa_required
boolean
Whether visa is required for the trip.
business_purpose
string
Purpose of the trip.
is_billable
boolean
Whether the customer needs to be billed for the trip.
customer_id
long
Unique ID of the customer associated with the trip.
project_id
long
Unique ID of the project associated with the trip.
destination_country
string
(Required)
Destination Country of the trip.
meal_preference
string
Meal preference for the traveller in flight.
seat_preference
string
Seat preference for the traveller in flight.
line_items
array
Show Sub-Attributes arrow
line_item_id
long
Unique ID for identifying the line item. This is server generated.
order
integer
Order of the line item.
departure_date
string
Date of departure.
departure_country
string
Departure Country.
departure_state
string
Departure State.
departure_city
string
Departure City.
arrival_date
string
Date of arrival.
arrival_country
string
Arrival Country
arrival_state
string
Arrival State
arrival_city
string
Arrival City
travel_mode
string
Mode of transportation. Possible values are flight ,by_road, train, bus
is_personal_travel
boolean
Whether it is a personal trip.
is_accomodation
boolean
Whether accomodation is provided.
description
string
Any comments about the trip.
custom_fields
array
Custom field added.
Show Sub-Attributes arrow
customfield_id
long
Unique ID for the Custom Field.
value
string
Value entered in the Custom Field.
attendees
array
Other travellers of the trip.
Show Sub-Attributes arrow
user_id
long
Unique ID of the owner of the trip.
trip_number
string
(Required)
Trip's unique number

Request Example

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

Body Parameters

Click to copy
{ "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" }

Response Example

{ "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

List all existing trips.

Query Parameters

filter_by
object
For filtering trips based on status.
Show Sub-Attributes arrow
Type.Trip%2CStatus.Submitted
string
List all submitted trip requests
Type.Trip%2CStatus.Approved
string
List all approved trip requests
Type.Trip%2CStatus.Rejected
string
List all rejected trip requests
Type.Trip%2CStatus.Closed
string
List all closed trips
Type.Trip%2CStatus.Cancelled
string
List all the cancelled trips.

Request Example

Click to copy
headers_data = Map(); headers_data.put("X-com-zoho-expense-organizationid", "10234695"); 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") .build(); Response response = client.newCall(request).execute();
const options = {method: 'GET', headers: {'X-com-zoho-expense-organizationid': '10234695'}}; fetch('https://www.zohoapis.com/expense/v1/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" } 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" } }; 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 'X-com-zoho-expense-organizationid: 10234695'

Response Example

{ "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

Update an existing Trip.

Arguments

currency_id
long
Unique ID for currency.
budget_amount
double
Budget amount for the trip.
is_international
boolean
(Required)
Whether the trip is an international trip.
is_visa_required
boolean
Whether visa is required for the trip.
business_purpose
string
Purpose of the trip.
is_billable
boolean
Whether the customer needs to be billed for the trip.
customer_id
long
Unique ID of the customer associated with the trip.
project_id
long
Unique ID of the project associated with the trip.
destination_country
string
(Required)
Destination Country of the trip.
meal_preference
string
Meal preference for the traveller in flight.
seat_preference
string
Seat preference for the traveller in flight.
line_items
array
Show Sub-Attributes arrow
line_item_id
long
Unique ID for identifying the line item. This is server generated.
order
integer
Order of the line item.
departure_date
string
Date of departure.
departure_country
string
Departure Country.
departure_state
string
Departure State.
departure_city
string
Departure City.
arrival_date
string
Date of arrival.
arrival_country
string
Arrival Country
arrival_state
string
Arrival State
arrival_city
string
Arrival City
travel_mode
string
Mode of transportation. Possible values are flight ,by_road, train, bus
is_personal_travel
boolean
Whether it is a personal trip.
is_accomodation
boolean
Whether accomodation is provided.
description
string
Any comments about the trip.
custom_fields
array
Custom field added.
Show Sub-Attributes arrow
customfield_id
long
Unique ID for the Custom Field.
value
string
Value entered in the Custom Field.
attendees
array
Other travellers of the trip.
Show Sub-Attributes arrow
user_id
long
Unique ID of the owner of the trip.
trip_number
string
(Required)
Trip's unique number

Request Example

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

Body Parameters

Click to copy
{ "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" }

Response Example

{ "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

Retrive details of an existing trip.

Request Example

Click to copy
headers_data = Map(); headers_data.put("X-com-zoho-expense-organizationid", "10234695"); 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") .build(); Response response = client.newCall(request).execute();
const options = {method: 'GET', headers: {'X-com-zoho-expense-organizationid': '10234695'}}; fetch('https://www.zohoapis.com/expense/v1/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" } 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" } }; 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 'X-com-zoho-expense-organizationid: 10234695'

Response Example

{ "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

Delete a trip request. Approved, Closed and Cancelled trips cannot be deleted.

Request Example

Click to copy
headers_data = Map(); headers_data.put("X-com-zoho-expense-organizationid", "10234695"); 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") .build(); Response response = client.newCall(request).execute();
const options = {method: 'DELETE', headers: {'X-com-zoho-expense-organizationid': '10234695'}}; 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" } 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" } }; 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 'X-com-zoho-expense-organizationid: 10234695'

Response Example

{ "code": 0, "message": "Trip(s) deleted successfully" }

Approve a trip request

Approve a submitted trip request.

Request Example

Click to copy
headers_data = Map(); headers_data.put("X-com-zoho-expense-organizationid", "10234695"); 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") .build(); Response response = client.newCall(request).execute();
const options = {method: 'POST', headers: {'X-com-zoho-expense-organizationid': '10234695'}}; fetch('https://www.zohoapis.com/expense/v1/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" } 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" } }; 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 'X-com-zoho-expense-organizationid: 10234695'

Response Example

{ "code": 0, "message": "Trip approved successfully" }

Reject a trip request

Reject a submitted trip request.

Arguments

comments
array
Show Sub-Attributes arrow
description
string
Any comments about the trip.
commented_by_id
long
Unique ID of the person who commented.
commented_by
string
Name of the User Commented.

Request Example

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

Body Parameters

Click to copy
{ "comments": [ { "description": "Regarding business proposal", "commented_by_id": "34017000000091216", "commented_by": "Will Smith" } ] }

Response Example

{ "code": 0, "message": "Trip has been rejected." }

Cancel a trip

Cancel a trip.

Arguments

comments
array
Show Sub-Attributes arrow
description
string
Any comments about the trip.
commented_by_id
long
Unique ID of the person who commented.
commented_by
string
Name of the User Commented.

Request Example

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

Body Parameters

Click to copy
{ "comments": [ { "description": "Regarding business proposal", "commented_by_id": "34017000000091216", "commented_by": "Will Smith" } ] }

Response Example

{ "code": 0, "message": "Trip has been marked 'Cancelled'." }

Close a trip

Close an approved trip.

Request Example

Click to copy
headers_data = Map(); headers_data.put("X-com-zoho-expense-organizationid", "10234695"); 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") .build(); Response response = client.newCall(request).execute();
const options = {method: 'POST', headers: {'X-com-zoho-expense-organizationid': '10234695'}}; fetch('https://www.zohoapis.com/expense/v1/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" } 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" } }; 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 'X-com-zoho-expense-organizationid: 10234695'

Response Example

{ "code": 0, "message": "Trip closed successfully" }