Skip to navigation

Update Trip

View as Markdown

Update Trip

Replaces the itinerary of an existing trip with the one you send (full update, not a partial patch). Budgets and trip dates are recalculated.

Request Parameters

ParamRequiredDescription
tripIdMandatoryThe trip reference used at creation (the value returned by Create Trip). If you send the original value, Dice also looks for the <tripId>_<id> variant for this employee.
employeeCodeConditionalEmployee code of the trip owner. One of employeeCode or employeeEmail is mandatory.
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.
dataMandatoryThe complete updated itinerary. 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 – at least one city.
data.cities[].cityNameMandatoryDestination city name. Must match a city in the Dice city master.
data.cities[].startTimeMandatoryArrival / start of stay in this city. Epoch time in milliseconds (UTC).
data.cities[].endTimeMandatoryDeparture / end of stay in this city. Must not be before the previous city’s end. Epoch time in milliseconds (UTC).
data.cities[].travelOptionalHow the traveller reaches this city. If omitted, travel is set to none.
data.cities[].travel.typeOptionalMode 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[].stayOptionalAccommodation in this city. If omitted, stay is set to none.
data.cities[].stay.typeOptionalStay 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.allowanceOptionalAllowance for the trip, added to the recalculated budget. Send 0 if none.
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.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.

Headers

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

Request

Update Trip request body.
tripIdstringRequired

The trip reference used at creation (the value returned by Create Trip). If you send the original value, Dice also looks for the <tripId>_<id> variant for this employee.

tripStartDatelongRequired

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

tripEndDatelongRequired

Must equal data.return.dateTime (or the last city’s endTime), must not be before tripStartDate, and no city may end after it. Epoch time in milliseconds (UTC).

dataobjectRequired

The complete updated itinerary. Mandatory.

employeeCodestringOptional

Employee code of the trip owner. One of employeeCode / employeeEmail is mandatory; the code wins if both are sent.

employeeEmailstringOptionalformat: "email"

Email of the trip owner. Used when employeeCode is not sent.

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.