Skip to navigation

create Trip

View as Markdown

Create Trip

Creates a trip (travel request) for an employee in Dice, including its itinerary, budget and – optionally – the approvals already taken in your system.

Request Parameters

ParamRequiredDescription
tripIdMandatoryYour unique trip reference (e.g. the trip number in your system). Use it for all later calls. Must be unique per employee. If the same tripId already exists for another employee in your company, Dice stores it as <tripId>_<id> and returns that value – always store the tripId returned in the response.
tripStatusMandatoryStatus the trip should be created in (case-insensitive). Values: PENDING, APPROVAL, COMPLETED.
employeeCodeConditionalEmployee code of the traveller. One of employeeCode, employeeEmail or employeeData is mandatory; the code wins if both code and email are sent.
employeeEmailConditionalEmail of the traveller. Used when employeeCode is not sent.
tripStartDateMandatoryTrip start, epoch milliseconds. Must equal data.origin.dateTime.
tripEndDateMandatoryTrip end, epoch milliseconds. Must equal data.return.dateTime, or the last city endTime when data.endTripHere is true.
dataMandatoryTrip itinerary and budget details. Mandatory.
data.titleOptionalTrip title shown to employees and approvers. Recommended.
data.originMandatoryStart of the trip. Mandatory.
data.origin.cityNameMandatoryName of the city the trip starts from. Must match a city in the Dice city master (e.g. Mumbai, New Delhi).
data.origin.dateTimeMandatoryTrip start date & time (departure from origin). Back-dated trips are rejected unless allowed for your account. If tripStartDate is also sent, both must be identical. Epoch time in milliseconds (UTC).
data.origin.departureTimeOptionalDeparture time from origin, if different from dateTime. Epoch time in milliseconds (UTC).
data.origin.journeyHoursOptionalTravel duration in hours for the first leg.
data.origin.stayHoursOptionalHours spent at origin before departure.
data.origin.coordsOptionalGeo coordinates of a location.
data.origin.coords.nameOptionalDisplay name of the location.
data.origin.coords.latOptionalLatitude.
data.origin.coords.lngOptionalLongitude.
data.cities[]MandatoryDestination cities in visiting order. Mandatory – send at least one city.
data.cities[].cityNameMandatoryDestination city name. Must match a city in the Dice city master.
data.cities[].startTimeOptionalArrival / start of stay in this city. Epoch time in milliseconds (UTC).
data.cities[].endTimeOptionalDeparture / end of stay in this city. Must not be before the previous city’s end. Epoch time in milliseconds (UTC).
data.cities[].daysOptionalNumber of days in this city. Required when endTime is not sent (end is then computed as start + days).
data.cities[].travelMandatoryHow the traveller reaches this city. Mandatory (travel.type).
data.cities[].travel.typeMandatoryMode of travel to this city. Case-insensitive. If the city is the same as the previous city, travel is automatically set to none. Mandatory on Create Trip for every city and for return. Values: flight, train, bus, cab, own, none.
data.cities[].travel.amountOptionalEstimated / quoted fare for this leg in the employee’s currency. Used for flight only; for other modes Dice computes the budget from the travel policy. If omitted for a flight, Dice uses its policy-based estimate. A configured flight buffer may be added on top.
data.cities[].travel.titleOptionalShort label for the selected option, e.g. airline + flight number.
data.cities[].travel.selectedOptionalYour reference / key for the selected fare or train option.
data.cities[].travel.returnSelectedOptionalReference / key of the return fare when a round-trip fare was selected.
data.cities[].travel.travelBookingTypeOptionalWho books this leg, e.g. SELF or ADMIN. Informational.
data.cities[].travel.travelJourneyTypeOptionalFlight journey type. Defaults to ONE_WAY. Values: ONE_WAY, ROUND_TRIP.
data.cities[].travel.travellers[]OptionalTravellers on this flight leg (flights only).
data.cities[].travel.travellers[].codeOptionalEmployee code of the traveller (if the traveller is an employee).
data.cities[].travel.travellers[].nameOptionalFull name.
data.cities[].travel.travellers[].firstNameOptionalFirst name.
data.cities[].travel.travellers[].lastNameOptionalLast name.
data.cities[].travel.travellers[].emailOptionalEmail address.
data.cities[].travel.travellers[].mobileOptionalMobile number with country code.
data.cities[].travel.travellers[].genderOptionalGender. Values: MALE, FEMALE.
data.cities[].travel.travellers[].paxTypeOptionalPassenger type (used for flight fare split). Values: ADULT, CHILD, INFANT.
data.cities[].travel.travellers[].userTypeOptionalFree text traveller type, e.g. EMPLOYEE or GUEST.
data.cities[].travel.travellers[].dobOptionalDate of birth. Epoch time in milliseconds (UTC).
data.cities[].travel.travellers[].primaryOptionaltrue for the lead traveller.
data.cities[].stayMandatoryAccommodation in this city. Mandatory (stay.type, use none if not needed).
data.cities[].stay.typeMandatoryStay type. Use none when no accommodation is needed. Mandatory on Create Trip for every city. Values: hotel, Guest House, none.
data.cities[].stay.amountOptionalTotal stay cost for the whole stay in this city. If omitted, Dice uses policy-based hotel price x nights. A configured hotel buffer may be added on top.
data.cities[].stay.pricePerNightOptionalPrice per night. When sent (> 0) it overrides amount as pricePerNight x number of nights.
data.cities[].stay.nameOptionalHotel name.
data.cities[].stay.hotelTypeOptionalHotel category / star rating as text.
data.cities[].stay.codeOptionalYour hotel code.
data.cities[].stay.roomKeyOptionalYour room / rate code.
data.cities[].stay.hotelIdOptionalYour hotel identifier (hotel only, not Guest House).
data.cities[].stay.propertyTypeOptionalProperty type, e.g. Hotel, Serviced Apartment.
data.cities[].stay.checkInDateOptionalPlanned check-in. Epoch time in milliseconds (UTC).
data.cities[].stay.checkOutDateOptionalPlanned check-out. Epoch time in milliseconds (UTC).
data.cities[].stay.travellers[]OptionalGuests staying in this hotel.
data.cities[].stay.travellers[].codeOptionalEmployee code of the traveller (if the traveller is an employee).
data.cities[].stay.travellers[].nameOptionalFull name.
data.cities[].stay.travellers[].firstNameOptionalFirst name.
data.cities[].stay.travellers[].lastNameOptionalLast name.
data.cities[].stay.travellers[].emailOptionalEmail address.
data.cities[].stay.travellers[].mobileOptionalMobile number with country code.
data.cities[].stay.travellers[].genderOptionalGender. Values: MALE, FEMALE.
data.cities[].stay.travellers[].paxTypeOptionalPassenger type (used for flight fare split). Values: ADULT, CHILD, INFANT.
data.cities[].stay.travellers[].userTypeOptionalFree text traveller type, e.g. EMPLOYEE or GUEST.
data.cities[].stay.travellers[].dobOptionalDate of birth. Epoch time in milliseconds (UTC).
data.cities[].stay.travellers[].primaryOptionaltrue for the lead traveller.
data.cities[].arrivalTimeOptionalActual arrival time in this city. Epoch time in milliseconds (UTC).
data.cities[].departureTimeOptionalActual departure time from this city. Epoch time in milliseconds (UTC).
data.cities[].journeyHoursOptionalTravel duration in hours to reach this city.
data.cities[].stayHoursOptionalHours spent in this city.
data.cities[].roundTripOptionalSet true when this leg is the return part of a round-trip booked with the previous leg.
data.cities[].coordsOptionalGeo coordinates of a location.
data.cities[].coords.nameOptionalDisplay name of the location.
data.cities[].coords.latOptionalLatitude.
data.cities[].coords.lngOptionalLongitude.
data.cities[].latOptionalLatitude of the preferred stay area (hotel / Guest House only).
data.cities[].lngOptionalLongitude of the preferred stay area (hotel / Guest House only).
data.cities[].locationIdOptionalYour locality / area id for the stay (hotel / Guest House only).
data.cities[].flightFormsOptionalCustom flight form fields configured for your account (key = field name). Used when travel.type = flight.
data.cities[].hotelFormsOptionalCustom hotel form fields configured for your account. Used when stay.type = hotel.
data.cities[].trainFormsOptionalCustom train form fields configured for your account. Used when travel.type = train.
data.cities[].flightJustificationRemarksOptionalJustification when the selected flight is not the cheapest / is out of policy.
data.cities[].hotelJustificationRemarksOptionalJustification when the selected hotel is out of policy.
data.returnConditionalReturn leg to the origin city. Send it when the trip returns to the origin; the trip is then closed. If not sent, data.endTripHere must be true.
data.return.cityNameMandatoryReturn city name. Must be the same as origin.cityName.
data.return.dateTimeMandatoryDate & time of arrival back at origin. Becomes the trip end date. Must not be before the last city’s end. If tripEndDate is sent, both must be identical. Epoch time in milliseconds (UTC).
data.return.travelMandatoryHow the traveller returns. Mandatory (travel.type).
data.return.travel.typeMandatoryMode of travel to this city. Case-insensitive. If the city is the same as the previous city, travel is automatically set to none. Mandatory on Create Trip for every city and for return. Values: flight, train, bus, cab, own, none.
data.return.travel.amountOptionalEstimated / quoted fare for this leg in the employee’s currency. Used for flight only; for other modes Dice computes the budget from the travel policy. If omitted for a flight, Dice uses its policy-based estimate. A configured flight buffer may be added on top.
data.return.travel.titleOptionalShort label for the selected option, e.g. airline + flight number.
data.return.travel.selectedOptionalYour reference / key for the selected fare or train option.
data.return.travel.returnSelectedOptionalReference / key of the return fare when a round-trip fare was selected.
data.return.travel.travelBookingTypeOptionalWho books this leg, e.g. SELF or ADMIN. Informational.
data.return.travel.travelJourneyTypeOptionalFlight journey type. Defaults to ONE_WAY. Values: ONE_WAY, ROUND_TRIP.
data.return.travel.travellers[]OptionalTravellers on this flight leg (flights only).
data.return.travel.travellers[].codeOptionalEmployee code of the traveller (if the traveller is an employee).
data.return.travel.travellers[].nameOptionalFull name.
data.return.travel.travellers[].firstNameOptionalFirst name.
data.return.travel.travellers[].lastNameOptionalLast name.
data.return.travel.travellers[].emailOptionalEmail address.
data.return.travel.travellers[].mobileOptionalMobile number with country code.
data.return.travel.travellers[].genderOptionalGender. Values: MALE, FEMALE.
data.return.travel.travellers[].paxTypeOptionalPassenger type (used for flight fare split). Values: ADULT, CHILD, INFANT.
data.return.travel.travellers[].userTypeOptionalFree text traveller type, e.g. EMPLOYEE or GUEST.
data.return.travel.travellers[].dobOptionalDate of birth. Epoch time in milliseconds (UTC).
data.return.travel.travellers[].primaryOptionaltrue for the lead traveller.
data.return.arrivalTimeOptionalArrival time at origin. Epoch time in milliseconds (UTC).
data.return.journeyHoursOptionalTravel duration in hours.
data.return.stayHoursOptionalHours of stay after return (normally 0).
data.return.roundTripOptionaltrue when the return is part of a round-trip fare.
data.return.coordsOptionalGeo coordinates of a location.
data.return.coords.nameOptionalDisplay name of the location.
data.return.coords.latOptionalLatitude.
data.return.coords.lngOptionalLongitude.
data.return.flightJustificationRemarksOptionalJustification for an out-of-policy return flight.
data.allowanceMandatoryCash advance / allowance requested for the trip in the employee’s currency. It is added to the trip budget. Always send this field – use 0 when no allowance is needed.
data.additionalAmountOptionalAny additional amount to be added to the trip budget (e.g. visa, local conveyance).
data.advanceOptionaltrue if allowance should be issued as a cash advance / petty cash.
data.qrCardOptionaltrue if allowance should be loaded to a QR card instead of an advance. Ignored when advance is true.
data.qrCardTypeOptionalQR card type. Required when qrCard is true and QR card types are enabled for your account.
data.foreignCurrencyOptionalCurrency code for forex cards (international trips, only when forex cards are enabled).
data.exchangeRateOptionalExchange rate to use with foreignCurrency.
data.automationOptionaltrue to let Dice auto-book the trip services after approval (when auto booking is enabled for your account).
data.adminOptionaltrue if the trip will be booked by the travel desk / admin. false (default) uses your account’s self-booking setting.
data.draftOptionaltrue to save the trip as a draft (no approval is triggered).
data.endTripHereConditionalMust be true when data.return is not sent and the trip ends at the last city. If neither data.return nor endTripHere = true is sent, the trip is created as an open trip (not fully created) and blocks the employee’s next trip.
data.skipApprovalConditionalMust be true when the trip does not need approval in Dice; the trip is approved immediately and approvers are ignored. If not sent or false, the Dice approval flow is triggered.
data.skipApprovalRemarksOptionalReason for skipping approval. Stored with the trip; used only when skipApproval is true.
data.formsOptionalCustom trip form fields configured for your account (key = field name as configured in Dice, value = answer).
data.remarksOptionalRemarks per component. Keys are component names such as flight, hotel, train, cab.
approversOptionalApprovals already taken in your system. Optional – when omitted, Dice runs your configured approval workflow.
approvers.tripApprovers[]OptionalApprovers of this trip. Each approver gets the next approval level.
approvers.tripApprovers[].codeOptionalApprover’s employee code. Must be unique in your company.
approvers.tripApprovers[].nameOptionalApprover’s full name.
approvers.tripApprovers[].emailOptionalApprover’s email.
approvers.tripApprovers[].statusOptionalApproval status of this approver. Case-insensitive. When all approvers are Approved, the trip is marked approved immediately; otherwise it waits for the pending approvers in Dice. Values: Pending, Approved, Declined, AutoApproved, Completed, Cancelled, Reverted, Hold, UnHold.
approvers.tripApprovers[].approvalTimestampOptionalWhen the approver acted (or was assigned, if pending). Epoch time in milliseconds (UTC).
employeeDataConditionalTraveller details, used to create the employee when neither employeeCode nor employeeEmail is sent.
employeeData.codeMandatoryEmployee code to create.
employeeData.firstNameMandatoryFirst name.
employeeData.lastNameMandatoryLast name.
employeeData.emailMandatoryWork email.
employeeData.officeMandatoryOffice / branch name. Created automatically if it does not exist.
employeeData.departmentMandatoryDepartment name within the office. Created automatically if it does not exist.
employeeData.mobileOptionalMobile number.
employeeData.genderOptionalGender. Values: MALE, FEMALE.
employeeData.gradeOptionalEmployee grade / band (drives travel policy). Created if it does not exist.
employeeData.hierarchyOptionalParent office / region name, when your account uses office hierarchy.
employeeData.managerOptionalReporting manager’s employee code (UPPERCASE).
employeeData.alternateOptionalAlternate approver’s employee code (UPPERCASE).
employeeData.hrHeadOptionalHR head’s employee code (UPPERCASE).
employeeData.customFieldsOptionalCustom employee fields configured for your account.
employeeData.bankAccountOptionalReimbursement bank account (both fields required if sent).
employeeData.bankAccount.accountNoOptionalBank account number.
employeeData.bankAccount.ifscOptionalIFSC code.

Headers

DICE-APP-IDstringOptional
Company Code of client
X-CLIENT-IDstringOptional
API Client ID
X-CLIENT-SECRETstringOptional
API Client Secret

Request

Create Trip request body.
tripIdstringRequired

Your unique trip reference (e.g. the trip number in your system). Use it for all later calls. Must be unique per employee. If the same tripId already exists for another employee in your company, Dice stores it as <tripId>_<id> and returns that value – always store the tripId returned in the response.

tripStatusenumRequired

Status the trip should be created in (case-insensitive):

  • PENDING – trip is approved and active (ready for booking / travel). If the trip is already approved in your system, send PENDING.
  • APPROVAL – trip is in the approval state, waiting for approvers.
  • COMPLETED – travel is completed.
Allowed values:
tripStartDatelongRequired

Trip start. Must equal data.origin.dateTime. Epoch time in milliseconds (UTC).

tripEndDatelongRequired

Trip end. Must equal data.return.dateTime (or the last city’s endTime when there is no return) and must not be before tripStartDate. Epoch time in milliseconds (UTC).

dataobjectRequired

Trip itinerary and budget details. Mandatory.

employeeCodestringOptional

Employee code of the traveller (trip owner) in Dice. One of employeeCode, employeeEmail or employeeData is mandatory. If both code and email are sent, the code is used.

employeeEmailstringOptionalformat: "email"

Email of the traveller in Dice. Used when employeeCode is not sent.

approversobjectOptional

Approvals already taken in your system. Optional – when omitted, Dice runs your configured approval workflow.

employeeDataobjectOptional

Employee details for auto-creation when the employee does not exist yet. Optional (see availability note).

Response

OK
tripIdstring

Trip reference stored in Dice. May differ from the request (<tripId>_<id>) – store this value.

successboolean

true when the operation succeeded.

messagestring
Outcome message.