Update Trip
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
| Param | Required | Description |
|---|---|---|
| tripId | Mandatory | 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. |
| employeeCode | Conditional | Employee code of the trip owner. One of employeeCode or employeeEmail is mandatory. |
| employeeEmail | Conditional | Email of the traveller. Used when employeeCode is not sent. |
| tripStartDate | Mandatory | Trip start, epoch milliseconds. Must equal data.origin.dateTime. |
| tripEndDate | Mandatory | Trip end, epoch milliseconds. Must equal data.return.dateTime, or the last city endTime when data.endTripHere is true. |
| data | Mandatory | The complete updated itinerary. Mandatory. |
| data.title | Optional | Trip title shown to employees and approvers. Recommended. |
| data.origin | Mandatory | Start of the trip. Mandatory. |
| data.origin.cityName | Mandatory | Name of the city the trip starts from. Must match a city in the Dice city master (e.g. Mumbai, New Delhi). |
| data.origin.dateTime | Mandatory | Trip 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.departureTime | Optional | Departure time from origin, if different from dateTime. Epoch time in milliseconds (UTC). |
| data.origin.journeyHours | Optional | Travel duration in hours for the first leg. |
| data.origin.stayHours | Optional | Hours spent at origin before departure. |
| data.origin.coords | Optional | Geo coordinates of a location. |
| data.origin.coords.name | Optional | Display name of the location. |
| data.origin.coords.lat | Optional | Latitude. |
| data.origin.coords.lng | Optional | Longitude. |
| data.cities[] | Mandatory | Destination cities in visiting order. Mandatory – at least one city. |
| data.cities[].cityName | Mandatory | Destination city name. Must match a city in the Dice city master. |
| data.cities[].startTime | Mandatory | Arrival / start of stay in this city. Epoch time in milliseconds (UTC). |
| data.cities[].endTime | Mandatory | Departure / end of stay in this city. Must not be before the previous city’s end. Epoch time in milliseconds (UTC). |
| data.cities[].travel | Optional | How the traveller reaches this city. If omitted, travel is set to none. |
| data.cities[].travel.type | Optional | Mode 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.amount | Optional | Estimated / 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.title | Optional | Short label for the selected option, e.g. airline + flight number. |
| data.cities[].travel.selected | Optional | Your reference / key for the selected fare or train option. |
| data.cities[].travel.returnSelected | Optional | Reference / key of the return fare when a round-trip fare was selected. |
| data.cities[].travel.travelBookingType | Optional | Who books this leg, e.g. SELF or ADMIN. Informational. |
| data.cities[].travel.travelJourneyType | Optional | Flight journey type. Defaults to ONE_WAY. Values: ONE_WAY, ROUND_TRIP. |
| data.cities[].travel.travellers[] | Optional | Travellers on this flight leg (flights only). |
| data.cities[].travel.travellers[].code | Optional | Employee code of the traveller (if the traveller is an employee). |
| data.cities[].travel.travellers[].name | Optional | Full name. |
| data.cities[].travel.travellers[].firstName | Optional | First name. |
| data.cities[].travel.travellers[].lastName | Optional | Last name. |
| data.cities[].travel.travellers[].email | Optional | Email address. |
| data.cities[].travel.travellers[].mobile | Optional | Mobile number with country code. |
| data.cities[].travel.travellers[].gender | Optional | Gender. Values: MALE, FEMALE. |
| data.cities[].travel.travellers[].paxType | Optional | Passenger type (used for flight fare split). Values: ADULT, CHILD, INFANT. |
| data.cities[].travel.travellers[].userType | Optional | Free text traveller type, e.g. EMPLOYEE or GUEST. |
| data.cities[].travel.travellers[].dob | Optional | Date of birth. Epoch time in milliseconds (UTC). |
| data.cities[].travel.travellers[].primary | Optional | true for the lead traveller. |
| data.cities[].stay | Optional | Accommodation in this city. If omitted, stay is set to none. |
| data.cities[].stay.type | Optional | Stay type. Use none when no accommodation is needed. Mandatory on Create Trip for every city. Values: hotel, Guest House, none. |
| data.cities[].stay.amount | Optional | Total 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.pricePerNight | Optional | Price per night. When sent (> 0) it overrides amount as pricePerNight x number of nights. |
| data.cities[].stay.name | Optional | Hotel name. |
| data.cities[].stay.hotelType | Optional | Hotel category / star rating as text. |
| data.cities[].stay.code | Optional | Your hotel code. |
| data.cities[].stay.roomKey | Optional | Your room / rate code. |
| data.cities[].stay.hotelId | Optional | Your hotel identifier (hotel only, not Guest House). |
| data.cities[].stay.propertyType | Optional | Property type, e.g. Hotel, Serviced Apartment. |
| data.cities[].stay.checkInDate | Optional | Planned check-in. Epoch time in milliseconds (UTC). |
| data.cities[].stay.checkOutDate | Optional | Planned check-out. Epoch time in milliseconds (UTC). |
| data.cities[].stay.travellers[] | Optional | Guests staying in this hotel. |
| data.cities[].stay.travellers[].code | Optional | Employee code of the traveller (if the traveller is an employee). |
| data.cities[].stay.travellers[].name | Optional | Full name. |
| data.cities[].stay.travellers[].firstName | Optional | First name. |
| data.cities[].stay.travellers[].lastName | Optional | Last name. |
| data.cities[].stay.travellers[].email | Optional | Email address. |
| data.cities[].stay.travellers[].mobile | Optional | Mobile number with country code. |
| data.cities[].stay.travellers[].gender | Optional | Gender. Values: MALE, FEMALE. |
| data.cities[].stay.travellers[].paxType | Optional | Passenger type (used for flight fare split). Values: ADULT, CHILD, INFANT. |
| data.cities[].stay.travellers[].userType | Optional | Free text traveller type, e.g. EMPLOYEE or GUEST. |
| data.cities[].stay.travellers[].dob | Optional | Date of birth. Epoch time in milliseconds (UTC). |
| data.cities[].stay.travellers[].primary | Optional | true for the lead traveller. |
| data.cities[].arrivalTime | Optional | Actual arrival time in this city. Epoch time in milliseconds (UTC). |
| data.cities[].departureTime | Optional | Actual departure time from this city. Epoch time in milliseconds (UTC). |
| data.cities[].journeyHours | Optional | Travel duration in hours to reach this city. |
| data.cities[].stayHours | Optional | Hours spent in this city. |
| data.cities[].roundTrip | Optional | Set true when this leg is the return part of a round-trip booked with the previous leg. |
| data.cities[].coords | Optional | Geo coordinates of a location. |
| data.cities[].coords.name | Optional | Display name of the location. |
| data.cities[].coords.lat | Optional | Latitude. |
| data.cities[].coords.lng | Optional | Longitude. |
| data.cities[].lat | Optional | Latitude of the preferred stay area (hotel / Guest House only). |
| data.cities[].lng | Optional | Longitude of the preferred stay area (hotel / Guest House only). |
| data.cities[].locationId | Optional | Your locality / area id for the stay (hotel / Guest House only). |
| data.cities[].flightForms | Optional | Custom flight form fields configured for your account (key = field name). Used when travel.type = flight. |
| data.cities[].hotelForms | Optional | Custom hotel form fields configured for your account. Used when stay.type = hotel. |
| data.cities[].trainForms | Optional | Custom train form fields configured for your account. Used when travel.type = train. |
| data.cities[].flightJustificationRemarks | Optional | Justification when the selected flight is not the cheapest / is out of policy. |
| data.cities[].hotelJustificationRemarks | Optional | Justification when the selected hotel is out of policy. |
| data.return | Conditional | Return 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.cityName | Mandatory | Return city name. Must be the same as origin.cityName. |
| data.return.dateTime | Mandatory | Date & 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.travel | Mandatory | How the traveller returns. Mandatory (travel.type). |
| data.return.travel.type | Mandatory | Mode 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.amount | Optional | Estimated / 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.title | Optional | Short label for the selected option, e.g. airline + flight number. |
| data.return.travel.selected | Optional | Your reference / key for the selected fare or train option. |
| data.return.travel.returnSelected | Optional | Reference / key of the return fare when a round-trip fare was selected. |
| data.return.travel.travelBookingType | Optional | Who books this leg, e.g. SELF or ADMIN. Informational. |
| data.return.travel.travelJourneyType | Optional | Flight journey type. Defaults to ONE_WAY. Values: ONE_WAY, ROUND_TRIP. |
| data.return.travel.travellers[] | Optional | Travellers on this flight leg (flights only). |
| data.return.travel.travellers[].code | Optional | Employee code of the traveller (if the traveller is an employee). |
| data.return.travel.travellers[].name | Optional | Full name. |
| data.return.travel.travellers[].firstName | Optional | First name. |
| data.return.travel.travellers[].lastName | Optional | Last name. |
| data.return.travel.travellers[].email | Optional | Email address. |
| data.return.travel.travellers[].mobile | Optional | Mobile number with country code. |
| data.return.travel.travellers[].gender | Optional | Gender. Values: MALE, FEMALE. |
| data.return.travel.travellers[].paxType | Optional | Passenger type (used for flight fare split). Values: ADULT, CHILD, INFANT. |
| data.return.travel.travellers[].userType | Optional | Free text traveller type, e.g. EMPLOYEE or GUEST. |
| data.return.travel.travellers[].dob | Optional | Date of birth. Epoch time in milliseconds (UTC). |
| data.return.travel.travellers[].primary | Optional | true for the lead traveller. |
| data.return.arrivalTime | Optional | Arrival time at origin. Epoch time in milliseconds (UTC). |
| data.return.journeyHours | Optional | Travel duration in hours. |
| data.return.stayHours | Optional | Hours of stay after return (normally 0). |
| data.return.roundTrip | Optional | true when the return is part of a round-trip fare. |
| data.return.coords | Optional | Geo coordinates of a location. |
| data.return.coords.name | Optional | Display name of the location. |
| data.return.coords.lat | Optional | Latitude. |
| data.return.coords.lng | Optional | Longitude. |
| data.return.flightJustificationRemarks | Optional | Justification for an out-of-policy return flight. |
| data.allowance | Optional | Allowance for the trip, added to the recalculated budget. Send 0 if none. |
| data.additionalAmount | Optional | Any additional amount to be added to the trip budget (e.g. visa, local conveyance). |
| data.advance | Optional | true if allowance should be issued as a cash advance / petty cash. |
| data.qrCard | Optional | true if allowance should be loaded to a QR card instead of an advance. Ignored when advance is true. |
| data.qrCardType | Optional | QR card type. Required when qrCard is true and QR card types are enabled for your account. |
| data.foreignCurrency | Optional | Currency code for forex cards (international trips, only when forex cards are enabled). |
| data.exchangeRate | Optional | Exchange rate to use with foreignCurrency. |
| data.automation | Optional | true to let Dice auto-book the trip services after approval (when auto booking is enabled for your account). |
| data.endTripHere | Conditional | Must 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.skipApproval | Conditional | Must 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.skipApprovalRemarks | Optional | Reason for skipping approval. Stored with the trip; used only when skipApproval is true. |
| data.forms | Optional | Custom trip form fields configured for your account (key = field name as configured in Dice, value = answer). |
| data.remarks | Optional | Remarks per component. Keys are component names such as flight, hotel, train, cab. |
Headers
Request
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.
Must equal data.origin.dateTime. Epoch time in milliseconds (UTC).
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).
The complete updated itinerary. Mandatory.
Employee code of the trip owner. One of employeeCode / employeeEmail is mandatory; the code wins if both are sent.
format: "email"Email of the trip owner. Used when employeeCode is not sent.
Response
Trip reference stored in Dice. May differ from the request (<tripId>_<id>) – store this value.
true when the operation succeeded.
