Travel Request API
On myBiz, one of the key focus areas is automating all the processes in an organisation's travel management system. One of the key areas of automation is to reflect the approved travel request in the client's internal systems on our myBiz platform.
If the client is using an internal system to approve the travel requests of the employee, then the approved itineraries can be sent to myBiz via Travel Request API integration.
Procedure
- 1Client’s IP needs to be whitelisted at myBiz end.
- 2Client has to integrate with myBiz Travel Request API. API details are given below:
API Details: Parameters for pushing travel request to myBiz
Details to be pushed from internal portal of client to myBiz
- 1Name
- 2Email
- 3For Flight booking:
- Trip type
- Travel class
- Adult, child count
- Age
- From/to details:
- Airport city code/name
- Airport country code/name
- 4For Hotel booking:
- City name/code
- Country name/code
- Checkin/checkout date
- Room details: adult/child count
- 5Reason for travel
- 6Approver/Manager details
- Name
Possible values for above parameters
- 1deviceDetails
- This node will have device specific information like device version and platform.
- platform possible values: ANDROID/IOS/DESKTOP
- version: App version or Browser version
- 2travellerDetails
- This node will have details of all the travelling passengers.
- name – FirstName + Middle Name + Last Name
- emaiIId – official email id of pax.
- One of these travellers should be marked as primary pax and the primary pax’s email id should be registered with myBiz.
- 3services
- Flight
- serviceId -> Unique identifier for selected service. This identifier will be used in further actions if needed.
Eg. recalling this service request. - airportCode -> This will be standard IATA code.
- departureDate, arrivalDate -> flight arrival and departure date in epoc time format (milliseconds)
- tripType possible values: ONWARDS / ROUND_TRIP/ MULTICITY
- travelClass possible values: ECONOMY / PREMIUM_ECONOMY / BUSINESS
- Hotel
- serviceId -> Unique identifier for selected service.
- cityCode -> Locus city codes provided my MakeMyTrip team.
- checkin, checkout -> hotel check-in/checkout dates in epoc time format (milliseconds) roomDetailsPaxWise -> This will be a list of rooms. List size will be equal to the number of rooms to be booked.
- Adults, Child and Infant count will be the number of former staying in one room.
*For child passenger age is mandatory. - 4reasonForTravel
- This node captures employee’s travel reason in the company travel API integration (if applicable).
Eg. Sales visit, offsite, urgent meeting etc. - Same reasons will be shown in reports as well.
- 5approvalDetails
- approvalRequired -> If approval is required for travel booking.
- approverDetails -> Approving manager details.
API contract details - for pushing travel request to myBiz
POST: /corporate/v1/create/partner/travel-request
Header:
- partner-apikey : <unique key for third party, to be shared by myBiz team>
- client-code : <unique code for third party, to be shared by myBiz team>
- Content-Type : <application/json>
Sample Payload:
COPY{ "deviceDetails": { "version": "10.15.7", "platform": "ANDROID" }, "travellerDetails": { "paxDetails": [ { "name": "Emp One", "email": "emp_one@xyz.com", "isPrimaryPax": true }, { "name": "Emp Two", "email": "emp_two@xyz.com", "isPrimaryPax": false }, { "name": "Emp Three", "email": "emp_three@xyz.com", "isPrimaryPax": false } ] }, "services": { "FLIGHT": [ { "serviceId": "<unique service id>", "tripType": "ONEWAY", "travelClass": "ECONOMY", "paxDetails": { "adult": 2, "child": { "count": 2, "age": [ 3, 5 ] }, "infant": 0 }, "journeyDetails": [ { "from": { "airportCode": "BLR", "cityName": "Bangalore", "countryCode": "IN", "countryName": "India" }, "to": { "airportCode": "HYD", "cityName": "Hyderabad", "countryCode": "IN", "countryName": "India" }, "departureDate": 1658212200000, "arrivalDate": 1658385000000 }, { "from": { "airportCode": "HYD", "cityName": "Hyderabad", "countryCode": "IN", "countryName": "India" }, "to": { "airportCode": "BLR", "cityName": "Bangalore", "countryCode": "IN", "countryName": "India" }, "departureDate": 1658212200000, "arrivalDate": 1658385000000 } ] } ], "HOTEL": [ { "serviceId": "<unique service id>", "cityCode": "CTBLR", "cityName": "Bengaluru", "countryCode": "IN", "countryName": "India", "checkin": 1658212200000, "checkout": 1658298600000, "roomDetailsPaxWise": [ { "adult": 1, "child": { "count": 2, "age": [ 3, 5 ], "infant": 0 } }, { "adult": 2, "child": { "count": 0, "age": [] }, "infant": 0 } ] } ] }, "reasonForTravel": { "reason": "Sales Visit" }, "approvalDetails": { "approvalRequired": true, "approverDetails": [ { "approvalLevel": 1, "name": "Manager One", "emailId": "mgr_one@xyz.com" }, { "approvalLevel": 2, "name": "Manager Two", "emailId": "mgr_two@xyz.com" } ] }, "trfId": "<travel trf number>" }
Response
COPY{ "travelRequestUrl": "<url>", "status": "success", "statusCode": 200, "responseCode": "600", "message": "Operation executed successfully." }
API Details Recall Travel Request
If the client wants to cancel (on internal portal) the travel request post approval, this can also be achieved.
POST: /internal/corporate/v1/update/partner/travel-request
Header:
- partner-apikey : <unique key for third party, to be shared by myBiz team>
- client-code : <unique code for third party, to be shared by myBiz team>
- Content-Type : <application/json>
Sample Payload:
COPY{ "trfId": "<trf number>", "action": "recalled", "serviceId": "<selected service’s unique id>" }
Response
COPY{ "status": "success", "statusCode": 200, "responseCode": "600", "message": "Operation executed successfully." }
Notes for request recall API:
- trfId -> Requisition Number of travel request
- action -> action to be performed. ‘recalled’ in this case
- serviceId -> selected hotel or flight service’s unique id