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.

Request Example

Click to copy
$ curl https://expense.zoho.com/api/v1/trips -X POST -H "X-com-zoho-expense-organizationid: 10234695" -H "Content-Type: application/json;charset=UTF-8" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f" -d '{"field":"value","field":"value"}'

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" } ] }

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
$ curl https://expense.zoho.com/api/v1/trips -H "X-com-zoho-expense-organizationid: 10234695" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"

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.

Request Example

Click to copy
$ curl https://expense.zoho.com/api/v1/trips/{trip_id} -X PUT -H "X-com-zoho-expense-organizationid: 10234695" -H "Content-Type: application/json;charset=UTF-8" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f" -d '{"field":"value","field":"value"}'

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" } ] }

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
$ curl https://expense.zoho.com/api/v1/trips/{trip_id} -H "X-com-zoho-expense-organizationid: 10234695" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"

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
$ curl https://expense.zoho.com/api/v1/trips/{trip_id} -X DELETE -H "X-com-zoho-expense-organizationid: 10234695" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"

Response Example

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

Approve a trip request

Approve a submitted trip request.

Request Example

Click to copy
$ curl https://expense.zoho.com/api/v1/trips/{trip_id}/approve -X POST -H "X-com-zoho-expense-organizationid: 10234695" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"

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
$ curl https://expense.zoho.com/api/v1/trips/{trip_id}/reject -X POST -H "X-com-zoho-expense-organizationid: 10234695" -H "Content-Type: application/json;charset=UTF-8" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f" -d '{"field":"value","field":"value"}'

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
$ curl https://expense.zoho.com/api/v1/trips/{trip_id}/cancel -X POST -H "X-com-zoho-expense-organizationid: 10234695" -H "Content-Type: application/json;charset=UTF-8" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f" -d '{"field":"value","field":"value"}'

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
$ curl https://expense.zoho.com/api/v1/trips/{trip_id}/close -X POST -H "X-com-zoho-expense-organizationid: 10234695" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"

Response Example

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