> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://open-api-docs.dice.tech/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://open-api-docs.dice.tech/_mcp/server.

# Update Trip

POST https://heimdall.eka.io/apis/external/trips/updateTrip
Content-Type: application/json

### 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`.                                                                                                                                                                                  |

Reference: https://open-api-docs.dice.tech/dice-standardized-ap-is-v-2-copy/trip/update-trip

## Servers

- `https://heimdall.eka.io` (https://heimdall.eka.io, default)
- `https://heimdall.eka.ioapis` (https://heimdall.eka.ioapis)

## Request

### Headers

- `DICE-APP-ID` (string, optional) — Company Code of client
- `X-CLIENT-ID` (string, optional) — API Client ID
- `X-CLIENT-SECRET` (string, optional) — API Client Secret

### Body (application/json)

This endpoint expects an object.

- `tripId` (string, required) — 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.
- `tripStartDate` (long, required) — **Must equal** `data.origin.dateTime`. Epoch time in **milliseconds** (UTC).
- `tripEndDate` (long, required) — 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).
- `data` (ApisExternalTripsUpdateTripPostRequestBodyContentApplicationJsonSchemaData, required) — The complete updated itinerary. **Mandatory.**
- `employeeCode` (string, optional) — Employee code of the trip owner. **One of `employeeCode` / `employeeEmail` is mandatory**; the code wins if both are sent.
- `employeeEmail` (string, optional) — Email of the trip owner. Used when `employeeCode` is not sent.

## Response

### 200

OK

- `tripId` (string, required) — Trip reference stored in Dice. May differ from the request (`<tripId>_<id>`) – store this value.
- `success` (boolean, required) — `true` when the operation succeeded.
- `message` (string, required) — Outcome message.

## Types

### ApisExternalTripsUpdateTripPostRequestBodyContentApplicationJsonSchemaData

The complete updated itinerary. **Mandatory.**

- `origin` (ApisExternalTripsUpdateTripPostRequestBodyContentApplicationJsonSchemaDataOrigin, required) — Start of the trip. **Mandatory.**
- `cities` (list of ApisExternalTripsUpdateTripPostRequestBodyContentApplicationJsonSchemaDataCitiesItems, required) — Destination cities in visiting order. **Mandatory** – at least one city.
- `title` (string, optional) — Trip title shown to employees and approvers. Recommended.
- `return` (ApisExternalTripsUpdateTripPostRequestBodyContentApplicationJsonSchemaDataReturn, optional) — Return leg. When sent, `cityName` must equal the origin city and `dateTime` is required (unless `tripEndDate` is provided).
- `allowance` (long, optional) — Allowance for the trip, added to the recalculated budget. Send `0` if none.
- `additionalAmount` (long, optional) — Any additional amount to be added to the trip budget (e.g. visa, local conveyance).
- `advance` (boolean, optional) — `true` if `allowance` should be issued as a cash advance / petty cash.
- `qrCard` (boolean, optional) — `true` if `allowance` should be loaded to a QR card instead of an advance. Ignored when `advance` is `true`.
- `qrCardType` (string, optional) — QR card type. Required when `qrCard` is `true` and QR card types are enabled for your account.
- `foreignCurrency` (string, optional) — Currency code for forex cards (international trips, only when forex cards are enabled).
- `exchangeRate` (double, optional) — Exchange rate to use with `foreignCurrency`.
- `automation` (boolean, optional) — `true` to let Dice auto-book the trip services after approval (when auto booking is enabled for your account).
- `endTripHere` (boolean, optional) — **Must be `true` when `return` is not sent** (trip ends at the last city). The trip is then closed, so it does not block the employee's next trip.
- `skipApproval` (boolean, optional, default: false) — **Send `true` if the updated trip does not need approval in Dice** – otherwise Dice triggers its approval flow again. With `true` the trip is approved immediately, any pending approval request is cancelled and `approvers` (if sent) are ignored.
- `skipApprovalRemarks` (string, optional) — Reason for skipping approval. Stored with the trip; used only when `skipApproval` is `true`.
- `forms` (map from string to string, optional) — Custom trip form fields configured for your account (key = field name as configured in Dice, value = answer).
- `remarks` (map from string to string, optional) — Remarks per component. Keys are component names such as `flight`, `hotel`, `train`, `cab`.

### ApisExternalTripsUpdateTripPostRequestBodyContentApplicationJsonSchemaDataOrigin

Start of the trip. **Mandatory.**

- `cityName` (string, required) — Name of the city the trip starts from. Must match a city in the Dice city master (e.g. `Mumbai`, `New Delhi`).
- `dateTime` (long, required) — 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).
- `departureTime` (long, optional) — Departure time from origin, if different from `dateTime`. Epoch time in **milliseconds** (UTC).
- `journeyHours` (double, optional) — Travel duration in hours for the first leg.
- `stayHours` (double, optional) — Hours spent at origin before departure.
- `coords` (ApisExternalTripsUpdateTripPostRequestBodyContentApplicationJsonSchemaDataOriginCoords, optional) — Geo coordinates of a location.

### ApisExternalTripsUpdateTripPostRequestBodyContentApplicationJsonSchemaDataCitiesItems

A destination city for Update Trip. `startTime` and `endTime` are **mandatory** for every city, and each city must start on/after the previous city's end.

- `cityName` (string, required) — Destination city name. Must match a city in the Dice city master.
- `startTime` (long, required) — Arrival / start of stay in this city. Epoch time in **milliseconds** (UTC).
- `endTime` (long, required) — Departure / end of stay in this city. Must not be before the previous city's end. Epoch time in **milliseconds** (UTC).
- `travel` (ApisExternalTripsUpdateTripPostRequestBodyContentApplicationJsonSchemaDataCitiesItemsTravel, optional) — How the traveller reaches this city. If omitted, travel is set to `none`.
- `stay` (ApisExternalTripsUpdateTripPostRequestBodyContentApplicationJsonSchemaDataCitiesItemsStay, optional) — Accommodation in this city. If omitted, stay is set to `none`.
- `arrivalTime` (long, optional) — Actual arrival time in this city. Epoch time in **milliseconds** (UTC).
- `departureTime` (long, optional) — Actual departure time from this city. Epoch time in **milliseconds** (UTC).
- `journeyHours` (double, optional) — Travel duration in hours to reach this city.
- `stayHours` (double, optional) — Hours spent in this city.
- `roundTrip` (boolean, optional) — Set `true` when this leg is the return part of a round-trip booked with the previous leg.
- `coords` (ApisExternalTripsUpdateTripPostRequestBodyContentApplicationJsonSchemaDataCitiesItemsCoords, optional) — Geo coordinates of a location.
- `lat` (double, optional) — Latitude of the preferred stay area (hotel / Guest House only).
- `lng` (double, optional) — Longitude of the preferred stay area (hotel / Guest House only).
- `locationId` (string, optional) — Your locality / area id for the stay (hotel / Guest House only).
- `flightForms` (map from string to string, optional) — Custom flight form fields configured for your account (key = field name). Used when `travel.type` = `flight`.
- `hotelForms` (map from string to string, optional) — Custom hotel form fields configured for your account. Used when `stay.type` = `hotel`.
- `trainForms` (map from string to string, optional) — Custom train form fields configured for your account. Used when `travel.type` = `train`.
- `flightJustificationRemarks` (string, optional) — Justification when the selected flight is not the cheapest / is out of policy.
- `hotelJustificationRemarks` (string, optional) — Justification when the selected hotel is out of policy.

### ApisExternalTripsUpdateTripPostRequestBodyContentApplicationJsonSchemaDataReturn

Return leg. When sent, `cityName` must equal the origin city and `dateTime` is required (unless `tripEndDate` is provided).

- `cityName` (string, required) — Return city name. **Must be the same as `origin.cityName`.**
- `dateTime` (long, required) — 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).
- `travel` (ApisExternalTripsUpdateTripPostRequestBodyContentApplicationJsonSchemaDataReturnTravel, required) — How the traveller returns. **Mandatory** (`travel.type`).
- `arrivalTime` (long, optional) — Arrival time at origin. Epoch time in **milliseconds** (UTC).
- `journeyHours` (double, optional) — Travel duration in hours.
- `stayHours` (double, optional) — Hours of stay after return (normally 0).
- `roundTrip` (boolean, optional) — `true` when the return is part of a round-trip fare.
- `coords` (ApisExternalTripsUpdateTripPostRequestBodyContentApplicationJsonSchemaDataReturnCoords, optional) — Geo coordinates of a location.
- `flightJustificationRemarks` (string, optional) — Justification for an out-of-policy return flight.

### ApisExternalTripsUpdateTripPostRequestBodyContentApplicationJsonSchemaDataOriginCoords

Geo coordinates of a location.

- `name` (string, optional) — Display name of the location.
- `lat` (double, optional) — Latitude.
- `lng` (double, optional) — Longitude.

### ApisExternalTripsUpdateTripPostRequestBodyContentApplicationJsonSchemaDataCitiesItemsTravel

How the traveller reaches this city. If omitted, travel is set to `none`.

- `type` (enum, required) — 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`.
  - Allowed values: `flight`, `train`, `bus`, `cab`, `own`, `none`
- `amount` (long, 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.
- `title` (string, optional) — Short label for the selected option, e.g. airline + flight number.
- `selected` (string, optional) — Your reference / key for the selected fare or train option.
- `returnSelected` (string, optional) — Reference / key of the return fare when a round-trip fare was selected.
- `travelBookingType` (string, optional) — Who books this leg, e.g. `SELF` or `ADMIN`. Informational.
- `travelJourneyType` (enum, optional) — Flight journey type. Defaults to `ONE_WAY`.
  - Allowed values: `ONE_WAY`, `ROUND_TRIP`
- `travellers` (list of ApisExternalTripsUpdateTripPostRequestBodyContentApplicationJsonSchemaDataCitiesItemsTravelTravellersItems, optional) — Travellers on this flight leg (flights only).

### ApisExternalTripsUpdateTripPostRequestBodyContentApplicationJsonSchemaDataCitiesItemsStay

Accommodation in this city. If omitted, stay is set to `none`.

- `type` (enum, required) — Stay type. Use `none` when no accommodation is needed. **Mandatory on Create Trip** for every city.
  - Allowed values: `hotel`, `Guest House`, `none`
- `amount` (long, 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.
- `pricePerNight` (double, optional) — Price per night. When sent (> 0) it **overrides** `amount` as `pricePerNight x number of nights`.
- `name` (string, optional) — Hotel name.
- `hotelType` (string, optional) — Hotel category / star rating as text.
- `code` (string, optional) — Your hotel code.
- `roomKey` (string, optional) — Your room / rate code.
- `hotelId` (string, optional) — Your hotel identifier (hotel only, not Guest House).
- `propertyType` (string, optional) — Property type, e.g. `Hotel`, `Serviced Apartment`.
- `checkInDate` (long, optional) — Planned check-in. Epoch time in **milliseconds** (UTC).
- `checkOutDate` (long, optional) — Planned check-out. Epoch time in **milliseconds** (UTC).
- `travellers` (list of ApisExternalTripsUpdateTripPostRequestBodyContentApplicationJsonSchemaDataCitiesItemsStayTravellersItems, optional) — Guests staying in this hotel.

### ApisExternalTripsUpdateTripPostRequestBodyContentApplicationJsonSchemaDataCitiesItemsCoords

Geo coordinates of a location.

- `name` (string, optional) — Display name of the location.
- `lat` (double, optional) — Latitude.
- `lng` (double, optional) — Longitude.

### ApisExternalTripsUpdateTripPostRequestBodyContentApplicationJsonSchemaDataReturnTravel

How the traveller returns. **Mandatory** (`travel.type`).

- `type` (enum, required) — 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`.
  - Allowed values: `flight`, `train`, `bus`, `cab`, `own`, `none`
- `amount` (long, 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.
- `title` (string, optional) — Short label for the selected option, e.g. airline + flight number.
- `selected` (string, optional) — Your reference / key for the selected fare or train option.
- `returnSelected` (string, optional) — Reference / key of the return fare when a round-trip fare was selected.
- `travelBookingType` (string, optional) — Who books this leg, e.g. `SELF` or `ADMIN`. Informational.
- `travelJourneyType` (enum, optional) — Flight journey type. Defaults to `ONE_WAY`.
  - Allowed values: `ONE_WAY`, `ROUND_TRIP`
- `travellers` (list of ApisExternalTripsUpdateTripPostRequestBodyContentApplicationJsonSchemaDataReturnTravelTravellersItems, optional) — Travellers on this flight leg (flights only).

### ApisExternalTripsUpdateTripPostRequestBodyContentApplicationJsonSchemaDataReturnCoords

Geo coordinates of a location.

- `name` (string, optional) — Display name of the location.
- `lat` (double, optional) — Latitude.
- `lng` (double, optional) — Longitude.

### ApisExternalTripsUpdateTripPostRequestBodyContentApplicationJsonSchemaDataCitiesItemsTravelTravellersItems

A person travelling on this leg / staying in this hotel. Use it when the booking is for someone other than, or in addition to, the trip owner.

- `code` (string, optional) — Employee code of the traveller (if the traveller is an employee).
- `name` (string, optional) — Full name.
- `firstName` (string, optional) — First name.
- `lastName` (string, optional) — Last name.
- `email` (string, optional) — Email address.
- `mobile` (string, optional) — Mobile number with country code.
- `gender` (enum, optional) — Gender.
  - Allowed values: `MALE`, `FEMALE`
- `paxType` (enum, optional) — Passenger type (used for flight fare split).
  - Allowed values: `ADULT`, `CHILD`, `INFANT`
- `userType` (string, optional) — Free text traveller type, e.g. `EMPLOYEE` or `GUEST`.
- `dob` (long, optional) — Date of birth. Epoch time in **milliseconds** (UTC).
- `primary` (boolean, optional) — `true` for the lead traveller.

### ApisExternalTripsUpdateTripPostRequestBodyContentApplicationJsonSchemaDataCitiesItemsStayTravellersItems

A person travelling on this leg / staying in this hotel. Use it when the booking is for someone other than, or in addition to, the trip owner.

- `code` (string, optional) — Employee code of the traveller (if the traveller is an employee).
- `name` (string, optional) — Full name.
- `firstName` (string, optional) — First name.
- `lastName` (string, optional) — Last name.
- `email` (string, optional) — Email address.
- `mobile` (string, optional) — Mobile number with country code.
- `gender` (enum, optional) — Gender.
  - Allowed values: `MALE`, `FEMALE`
- `paxType` (enum, optional) — Passenger type (used for flight fare split).
  - Allowed values: `ADULT`, `CHILD`, `INFANT`
- `userType` (string, optional) — Free text traveller type, e.g. `EMPLOYEE` or `GUEST`.
- `dob` (long, optional) — Date of birth. Epoch time in **milliseconds** (UTC).
- `primary` (boolean, optional) — `true` for the lead traveller.

### ApisExternalTripsUpdateTripPostRequestBodyContentApplicationJsonSchemaDataReturnTravelTravellersItems

A person travelling on this leg / staying in this hotel. Use it when the booking is for someone other than, or in addition to, the trip owner.

- `code` (string, optional) — Employee code of the traveller (if the traveller is an employee).
- `name` (string, optional) — Full name.
- `firstName` (string, optional) — First name.
- `lastName` (string, optional) — Last name.
- `email` (string, optional) — Email address.
- `mobile` (string, optional) — Mobile number with country code.
- `gender` (enum, optional) — Gender.
  - Allowed values: `MALE`, `FEMALE`
- `paxType` (enum, optional) — Passenger type (used for flight fare split).
  - Allowed values: `ADULT`, `CHILD`, `INFANT`
- `userType` (string, optional) — Free text traveller type, e.g. `EMPLOYEE` or `GUEST`.
- `dob` (long, optional) — Date of birth. Epoch time in **milliseconds** (UTC).
- `primary` (boolean, optional) — `true` for the lead traveller.

## Examples

### Mandatory fields – with return city

**Request**

```json
{
  "tripId": "EXT-TRIP-1001",
  "tripStartDate": 1794274200000,
  "tripEndDate": 1794672000000,
  "data": {
    "origin": {
      "cityName": "Mumbai",
      "dateTime": 1794274200000
    },
    "cities": [
      {
        "cityName": "Bengaluru",
        "startTime": 1794285000000,
        "endTime": 1794659400000
      }
    ],
    "return": {
      "cityName": "Mumbai",
      "dateTime": 1794672000000,
      "travel": {
        "type": "flight"
      }
    },
    "skipApproval": true
  },
  "employeeEmail": "rahul.sharma@acme.com"
}
```

**Response**

```json
{
  "tripId": "EXT-TRIP-1001",
  "success": true,
  "message": "Trip updated successfully"
}
```

**SDK Code**

```python Mandatory fields – with return city
import requests

url = "https://heimdall.eka.io/apis/external/trips/updateTrip"

payload = {
    "tripId": "EXT-TRIP-1001",
    "tripStartDate": 1794274200000,
    "tripEndDate": 1794672000000,
    "data": {
        "origin": {
            "cityName": "Mumbai",
            "dateTime": 1794274200000
        },
        "cities": [
            {
                "cityName": "Bengaluru",
                "startTime": 1794285000000,
                "endTime": 1794659400000
            }
        ],
        "return": {
            "cityName": "Mumbai",
            "dateTime": 1794672000000,
            "travel": { "type": "flight" }
        },
        "skipApproval": True
    },
    "employeeEmail": "rahul.sharma@acme.com"
}
headers = {
    "DICE-APP-ID": "{{Company Code}}",
    "X-CLIENT-ID": "{{API Client ID}}",
    "X-CLIENT-SECRET": "{{API Client Secret}}",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Mandatory fields – with return city
const url = 'https://heimdall.eka.io/apis/external/trips/updateTrip';
const options = {
  method: 'POST',
  headers: {
    'DICE-APP-ID': '{{Company Code}}',
    'X-CLIENT-ID': '{{API Client ID}}',
    'X-CLIENT-SECRET': '{{API Client Secret}}',
    'Content-Type': 'application/json'
  },
  body: '{"tripId":"EXT-TRIP-1001","tripStartDate":1794274200000,"tripEndDate":1794672000000,"data":{"origin":{"cityName":"Mumbai","dateTime":1794274200000},"cities":[{"cityName":"Bengaluru","startTime":1794285000000,"endTime":1794659400000}],"return":{"cityName":"Mumbai","dateTime":1794672000000,"travel":{"type":"flight"}},"skipApproval":true},"employeeEmail":"rahul.sharma@acme.com"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Mandatory fields – with return city
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://heimdall.eka.io/apis/external/trips/updateTrip"

	payload := strings.NewReader("{\n  \"tripId\": \"EXT-TRIP-1001\",\n  \"tripStartDate\": 1794274200000,\n  \"tripEndDate\": 1794672000000,\n  \"data\": {\n    \"origin\": {\n      \"cityName\": \"Mumbai\",\n      \"dateTime\": 1794274200000\n    },\n    \"cities\": [\n      {\n        \"cityName\": \"Bengaluru\",\n        \"startTime\": 1794285000000,\n        \"endTime\": 1794659400000\n      }\n    ],\n    \"return\": {\n      \"cityName\": \"Mumbai\",\n      \"dateTime\": 1794672000000,\n      \"travel\": {\n        \"type\": \"flight\"\n      }\n    },\n    \"skipApproval\": true\n  },\n  \"employeeEmail\": \"rahul.sharma@acme.com\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("DICE-APP-ID", "{{Company Code}}")
	req.Header.Add("X-CLIENT-ID", "{{API Client ID}}")
	req.Header.Add("X-CLIENT-SECRET", "{{API Client Secret}}")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Mandatory fields – with return city
require 'uri'
require 'net/http'

url = URI("https://heimdall.eka.io/apis/external/trips/updateTrip")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["DICE-APP-ID"] = '{{Company Code}}'
request["X-CLIENT-ID"] = '{{API Client ID}}'
request["X-CLIENT-SECRET"] = '{{API Client Secret}}'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"tripId\": \"EXT-TRIP-1001\",\n  \"tripStartDate\": 1794274200000,\n  \"tripEndDate\": 1794672000000,\n  \"data\": {\n    \"origin\": {\n      \"cityName\": \"Mumbai\",\n      \"dateTime\": 1794274200000\n    },\n    \"cities\": [\n      {\n        \"cityName\": \"Bengaluru\",\n        \"startTime\": 1794285000000,\n        \"endTime\": 1794659400000\n      }\n    ],\n    \"return\": {\n      \"cityName\": \"Mumbai\",\n      \"dateTime\": 1794672000000,\n      \"travel\": {\n        \"type\": \"flight\"\n      }\n    },\n    \"skipApproval\": true\n  },\n  \"employeeEmail\": \"rahul.sharma@acme.com\"\n}"

response = http.request(request)
puts response.read_body
```

```java Mandatory fields – with return city
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://heimdall.eka.io/apis/external/trips/updateTrip")
  .header("DICE-APP-ID", "{{Company Code}}")
  .header("X-CLIENT-ID", "{{API Client ID}}")
  .header("X-CLIENT-SECRET", "{{API Client Secret}}")
  .header("Content-Type", "application/json")
  .body("{\n  \"tripId\": \"EXT-TRIP-1001\",\n  \"tripStartDate\": 1794274200000,\n  \"tripEndDate\": 1794672000000,\n  \"data\": {\n    \"origin\": {\n      \"cityName\": \"Mumbai\",\n      \"dateTime\": 1794274200000\n    },\n    \"cities\": [\n      {\n        \"cityName\": \"Bengaluru\",\n        \"startTime\": 1794285000000,\n        \"endTime\": 1794659400000\n      }\n    ],\n    \"return\": {\n      \"cityName\": \"Mumbai\",\n      \"dateTime\": 1794672000000,\n      \"travel\": {\n        \"type\": \"flight\"\n      }\n    },\n    \"skipApproval\": true\n  },\n  \"employeeEmail\": \"rahul.sharma@acme.com\"\n}")
  .asString();
```

```php Mandatory fields – with return city
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://heimdall.eka.io/apis/external/trips/updateTrip', [
  'body' => '{
  "tripId": "EXT-TRIP-1001",
  "tripStartDate": 1794274200000,
  "tripEndDate": 1794672000000,
  "data": {
    "origin": {
      "cityName": "Mumbai",
      "dateTime": 1794274200000
    },
    "cities": [
      {
        "cityName": "Bengaluru",
        "startTime": 1794285000000,
        "endTime": 1794659400000
      }
    ],
    "return": {
      "cityName": "Mumbai",
      "dateTime": 1794672000000,
      "travel": {
        "type": "flight"
      }
    },
    "skipApproval": true
  },
  "employeeEmail": "rahul.sharma@acme.com"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'DICE-APP-ID' => '{{Company Code}}',
    'X-CLIENT-ID' => '{{API Client ID}}',
    'X-CLIENT-SECRET' => '{{API Client Secret}}',
  ],
]);

echo $response->getBody();
```

```csharp Mandatory fields – with return city
using RestSharp;

var client = new RestClient("https://heimdall.eka.io/apis/external/trips/updateTrip");
var request = new RestRequest(Method.POST);
request.AddHeader("DICE-APP-ID", "{{Company Code}}");
request.AddHeader("X-CLIENT-ID", "{{API Client ID}}");
request.AddHeader("X-CLIENT-SECRET", "{{API Client Secret}}");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"tripId\": \"EXT-TRIP-1001\",\n  \"tripStartDate\": 1794274200000,\n  \"tripEndDate\": 1794672000000,\n  \"data\": {\n    \"origin\": {\n      \"cityName\": \"Mumbai\",\n      \"dateTime\": 1794274200000\n    },\n    \"cities\": [\n      {\n        \"cityName\": \"Bengaluru\",\n        \"startTime\": 1794285000000,\n        \"endTime\": 1794659400000\n      }\n    ],\n    \"return\": {\n      \"cityName\": \"Mumbai\",\n      \"dateTime\": 1794672000000,\n      \"travel\": {\n        \"type\": \"flight\"\n      }\n    },\n    \"skipApproval\": true\n  },\n  \"employeeEmail\": \"rahul.sharma@acme.com\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Mandatory fields – with return city
import Foundation

let headers = [
  "DICE-APP-ID": "{{Company Code}}",
  "X-CLIENT-ID": "{{API Client ID}}",
  "X-CLIENT-SECRET": "{{API Client Secret}}",
  "Content-Type": "application/json"
]
let parameters = [
  "tripId": "EXT-TRIP-1001",
  "tripStartDate": 1794274200000,
  "tripEndDate": 1794672000000,
  "data": [
    "origin": [
      "cityName": "Mumbai",
      "dateTime": 1794274200000
    ],
    "cities": [
      [
        "cityName": "Bengaluru",
        "startTime": 1794285000000,
        "endTime": 1794659400000
      ]
    ],
    "return": [
      "cityName": "Mumbai",
      "dateTime": 1794672000000,
      "travel": ["type": "flight"]
    ],
    "skipApproval": true
  ],
  "employeeEmail": "rahul.sharma@acme.com"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://heimdall.eka.io/apis/external/trips/updateTrip")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Mandatory fields – without return city (endTripHere = true)

**Request**

```json
{
  "tripId": "EXT-TRIP-1001",
  "tripStartDate": 1794274200000,
  "tripEndDate": 1794659400000,
  "data": {
    "origin": {
      "cityName": "Mumbai",
      "dateTime": 1794274200000
    },
    "cities": [
      {
        "cityName": "Bengaluru",
        "startTime": 1794285000000,
        "endTime": 1794659400000
      }
    ],
    "endTripHere": true,
    "skipApproval": true
  },
  "employeeEmail": "rahul.sharma@acme.com"
}
```

**Response**

```json
{
  "tripId": "EXT-TRIP-1001",
  "success": true,
  "message": "Trip updated successfully"
}
```

**SDK Code**

```python Mandatory fields – without return city (endTripHere = true)
import requests

url = "https://heimdall.eka.io/apis/external/trips/updateTrip"

payload = {
    "tripId": "EXT-TRIP-1001",
    "tripStartDate": 1794274200000,
    "tripEndDate": 1794659400000,
    "data": {
        "origin": {
            "cityName": "Mumbai",
            "dateTime": 1794274200000
        },
        "cities": [
            {
                "cityName": "Bengaluru",
                "startTime": 1794285000000,
                "endTime": 1794659400000
            }
        ],
        "endTripHere": True,
        "skipApproval": True
    },
    "employeeEmail": "rahul.sharma@acme.com"
}
headers = {
    "DICE-APP-ID": "{{Company Code}}",
    "X-CLIENT-ID": "{{API Client ID}}",
    "X-CLIENT-SECRET": "{{API Client Secret}}",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Mandatory fields – without return city (endTripHere = true)
const url = 'https://heimdall.eka.io/apis/external/trips/updateTrip';
const options = {
  method: 'POST',
  headers: {
    'DICE-APP-ID': '{{Company Code}}',
    'X-CLIENT-ID': '{{API Client ID}}',
    'X-CLIENT-SECRET': '{{API Client Secret}}',
    'Content-Type': 'application/json'
  },
  body: '{"tripId":"EXT-TRIP-1001","tripStartDate":1794274200000,"tripEndDate":1794659400000,"data":{"origin":{"cityName":"Mumbai","dateTime":1794274200000},"cities":[{"cityName":"Bengaluru","startTime":1794285000000,"endTime":1794659400000}],"endTripHere":true,"skipApproval":true},"employeeEmail":"rahul.sharma@acme.com"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Mandatory fields – without return city (endTripHere = true)
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://heimdall.eka.io/apis/external/trips/updateTrip"

	payload := strings.NewReader("{\n  \"tripId\": \"EXT-TRIP-1001\",\n  \"tripStartDate\": 1794274200000,\n  \"tripEndDate\": 1794659400000,\n  \"data\": {\n    \"origin\": {\n      \"cityName\": \"Mumbai\",\n      \"dateTime\": 1794274200000\n    },\n    \"cities\": [\n      {\n        \"cityName\": \"Bengaluru\",\n        \"startTime\": 1794285000000,\n        \"endTime\": 1794659400000\n      }\n    ],\n    \"endTripHere\": true,\n    \"skipApproval\": true\n  },\n  \"employeeEmail\": \"rahul.sharma@acme.com\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("DICE-APP-ID", "{{Company Code}}")
	req.Header.Add("X-CLIENT-ID", "{{API Client ID}}")
	req.Header.Add("X-CLIENT-SECRET", "{{API Client Secret}}")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Mandatory fields – without return city (endTripHere = true)
require 'uri'
require 'net/http'

url = URI("https://heimdall.eka.io/apis/external/trips/updateTrip")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["DICE-APP-ID"] = '{{Company Code}}'
request["X-CLIENT-ID"] = '{{API Client ID}}'
request["X-CLIENT-SECRET"] = '{{API Client Secret}}'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"tripId\": \"EXT-TRIP-1001\",\n  \"tripStartDate\": 1794274200000,\n  \"tripEndDate\": 1794659400000,\n  \"data\": {\n    \"origin\": {\n      \"cityName\": \"Mumbai\",\n      \"dateTime\": 1794274200000\n    },\n    \"cities\": [\n      {\n        \"cityName\": \"Bengaluru\",\n        \"startTime\": 1794285000000,\n        \"endTime\": 1794659400000\n      }\n    ],\n    \"endTripHere\": true,\n    \"skipApproval\": true\n  },\n  \"employeeEmail\": \"rahul.sharma@acme.com\"\n}"

response = http.request(request)
puts response.read_body
```

```java Mandatory fields – without return city (endTripHere = true)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://heimdall.eka.io/apis/external/trips/updateTrip")
  .header("DICE-APP-ID", "{{Company Code}}")
  .header("X-CLIENT-ID", "{{API Client ID}}")
  .header("X-CLIENT-SECRET", "{{API Client Secret}}")
  .header("Content-Type", "application/json")
  .body("{\n  \"tripId\": \"EXT-TRIP-1001\",\n  \"tripStartDate\": 1794274200000,\n  \"tripEndDate\": 1794659400000,\n  \"data\": {\n    \"origin\": {\n      \"cityName\": \"Mumbai\",\n      \"dateTime\": 1794274200000\n    },\n    \"cities\": [\n      {\n        \"cityName\": \"Bengaluru\",\n        \"startTime\": 1794285000000,\n        \"endTime\": 1794659400000\n      }\n    ],\n    \"endTripHere\": true,\n    \"skipApproval\": true\n  },\n  \"employeeEmail\": \"rahul.sharma@acme.com\"\n}")
  .asString();
```

```php Mandatory fields – without return city (endTripHere = true)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://heimdall.eka.io/apis/external/trips/updateTrip', [
  'body' => '{
  "tripId": "EXT-TRIP-1001",
  "tripStartDate": 1794274200000,
  "tripEndDate": 1794659400000,
  "data": {
    "origin": {
      "cityName": "Mumbai",
      "dateTime": 1794274200000
    },
    "cities": [
      {
        "cityName": "Bengaluru",
        "startTime": 1794285000000,
        "endTime": 1794659400000
      }
    ],
    "endTripHere": true,
    "skipApproval": true
  },
  "employeeEmail": "rahul.sharma@acme.com"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'DICE-APP-ID' => '{{Company Code}}',
    'X-CLIENT-ID' => '{{API Client ID}}',
    'X-CLIENT-SECRET' => '{{API Client Secret}}',
  ],
]);

echo $response->getBody();
```

```csharp Mandatory fields – without return city (endTripHere = true)
using RestSharp;

var client = new RestClient("https://heimdall.eka.io/apis/external/trips/updateTrip");
var request = new RestRequest(Method.POST);
request.AddHeader("DICE-APP-ID", "{{Company Code}}");
request.AddHeader("X-CLIENT-ID", "{{API Client ID}}");
request.AddHeader("X-CLIENT-SECRET", "{{API Client Secret}}");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"tripId\": \"EXT-TRIP-1001\",\n  \"tripStartDate\": 1794274200000,\n  \"tripEndDate\": 1794659400000,\n  \"data\": {\n    \"origin\": {\n      \"cityName\": \"Mumbai\",\n      \"dateTime\": 1794274200000\n    },\n    \"cities\": [\n      {\n        \"cityName\": \"Bengaluru\",\n        \"startTime\": 1794285000000,\n        \"endTime\": 1794659400000\n      }\n    ],\n    \"endTripHere\": true,\n    \"skipApproval\": true\n  },\n  \"employeeEmail\": \"rahul.sharma@acme.com\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Mandatory fields – without return city (endTripHere = true)
import Foundation

let headers = [
  "DICE-APP-ID": "{{Company Code}}",
  "X-CLIENT-ID": "{{API Client ID}}",
  "X-CLIENT-SECRET": "{{API Client Secret}}",
  "Content-Type": "application/json"
]
let parameters = [
  "tripId": "EXT-TRIP-1001",
  "tripStartDate": 1794274200000,
  "tripEndDate": 1794659400000,
  "data": [
    "origin": [
      "cityName": "Mumbai",
      "dateTime": 1794274200000
    ],
    "cities": [
      [
        "cityName": "Bengaluru",
        "startTime": 1794285000000,
        "endTime": 1794659400000
      ]
    ],
    "endTripHere": true,
    "skipApproval": true
  ],
  "employeeEmail": "rahul.sharma@acme.com"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://heimdall.eka.io/apis/external/trips/updateTrip")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### All fields

**Request**

```json
{
  "tripId": "EXT-TRIP-1002",
  "tripStartDate": 1794274200000,
  "tripEndDate": 1794672000000,
  "data": {
    "origin": {
      "cityName": "Mumbai",
      "dateTime": 1794274200000,
      "departureTime": 1794274200000,
      "journeyHours": 1.75,
      "stayHours": 0,
      "coords": {
        "name": "Mumbai",
        "lat": 19.076,
        "lng": 72.8777
      }
    },
    "cities": [
      {
        "cityName": "Bengaluru",
        "startTime": 1794285000000,
        "endTime": 1794486600000,
        "travel": {
          "type": "flight",
          "amount": 6500,
          "title": "6E 5321 BOM-BLR",
          "selected": "6E-5321-SAVER",
          "travelBookingType": "ADMIN",
          "travelJourneyType": "ONE_WAY",
          "travellers": [
            {
              "code": "EMP101",
              "name": "Rahul Sharma",
              "email": "rahul.sharma@acme.com",
              "gender": "MALE",
              "paxType": "ADULT",
              "primary": true
            }
          ]
        },
        "stay": {
          "type": "hotel",
          "pricePerNight": 6000,
          "name": "Taj MG Road",
          "hotelType": "5 Star",
          "code": "TAJ-BLR-01",
          "roomKey": "DLX-KING-BB",
          "hotelId": "HTL-99812",
          "propertyType": "Hotel",
          "checkInDate": 1794292200000,
          "checkOutDate": 1794461400000
        },
        "arrivalTime": 1794285000000,
        "departureTime": 1794486600000,
        "journeyHours": 1.75,
        "stayHours": 56,
        "coords": {
          "name": "Bengaluru",
          "lat": 12.9716,
          "lng": 77.5946
        },
        "lat": 12.9756,
        "lng": 77.605,
        "locationId": "BLR-MGROAD",
        "flightForms": {
          "purpose": "Client meeting"
        },
        "hotelForms": {
          "preferredArea": "MG Road"
        },
        "flightJustificationRemarks": "Only non-stop option before 10 AM",
        "hotelJustificationRemarks": "Walking distance from client office"
      },
      {
        "cityName": "Chennai",
        "startTime": 1794504600000,
        "endTime": 1794659400000,
        "travel": {
          "type": "train",
          "title": "12658 Chennai Mail",
          "selected": "12658-3A"
        },
        "stay": {
          "type": "hotel",
          "amount": 9000,
          "name": "ITC Grand Chola",
          "hotelType": "5 Star"
        },
        "arrivalTime": 1794504600000,
        "departureTime": 1794659400000,
        "journeyHours": 6.5,
        "stayHours": 43,
        "trainForms": {
          "berthPreference": "Lower"
        }
      }
    ],
    "title": "Client visit - Bengaluru & Chennai (extended)",
    "return": {
      "cityName": "Mumbai",
      "dateTime": 1794672000000,
      "travel": {
        "type": "flight",
        "amount": 7200,
        "title": "AI 571 MAA-BOM"
      },
      "arrivalTime": 1794672000000,
      "journeyHours": 2,
      "stayHours": 0,
      "roundTrip": false,
      "flightJustificationRemarks": "Late evening client meeting"
    },
    "allowance": 6000,
    "additionalAmount": 1500,
    "advance": true,
    "qrCard": false,
    "automation": false,
    "endTripHere": false,
    "skipApproval": false,
    "forms": {
      "costCenter": "CC-1042",
      "project": "Apollo",
      "purpose": "Client meeting"
    },
    "remarks": {
      "flight": "Aisle seat preferred",
      "hotel": "Early check-in requested"
    }
  },
  "employeeCode": "EMP101",
  "employeeEmail": "rahul.sharma@acme.com"
}
```

**Response**

```json
{
  "tripId": "EXT-TRIP-1001",
  "success": true,
  "message": "Trip updated successfully"
}
```

**SDK Code**

```python All fields
import requests

url = "https://heimdall.eka.io/apis/external/trips/updateTrip"

payload = {
    "tripId": "EXT-TRIP-1002",
    "tripStartDate": 1794274200000,
    "tripEndDate": 1794672000000,
    "data": {
        "origin": {
            "cityName": "Mumbai",
            "dateTime": 1794274200000,
            "departureTime": 1794274200000,
            "journeyHours": 1.75,
            "stayHours": 0,
            "coords": {
                "name": "Mumbai",
                "lat": 19.076,
                "lng": 72.8777
            }
        },
        "cities": [
            {
                "cityName": "Bengaluru",
                "startTime": 1794285000000,
                "endTime": 1794486600000,
                "travel": {
                    "type": "flight",
                    "amount": 6500,
                    "title": "6E 5321 BOM-BLR",
                    "selected": "6E-5321-SAVER",
                    "travelBookingType": "ADMIN",
                    "travelJourneyType": "ONE_WAY",
                    "travellers": [
                        {
                            "code": "EMP101",
                            "name": "Rahul Sharma",
                            "email": "rahul.sharma@acme.com",
                            "gender": "MALE",
                            "paxType": "ADULT",
                            "primary": True
                        }
                    ]
                },
                "stay": {
                    "type": "hotel",
                    "pricePerNight": 6000,
                    "name": "Taj MG Road",
                    "hotelType": "5 Star",
                    "code": "TAJ-BLR-01",
                    "roomKey": "DLX-KING-BB",
                    "hotelId": "HTL-99812",
                    "propertyType": "Hotel",
                    "checkInDate": 1794292200000,
                    "checkOutDate": 1794461400000
                },
                "arrivalTime": 1794285000000,
                "departureTime": 1794486600000,
                "journeyHours": 1.75,
                "stayHours": 56,
                "coords": {
                    "name": "Bengaluru",
                    "lat": 12.9716,
                    "lng": 77.5946
                },
                "lat": 12.9756,
                "lng": 77.605,
                "locationId": "BLR-MGROAD",
                "flightForms": { "purpose": "Client meeting" },
                "hotelForms": { "preferredArea": "MG Road" },
                "flightJustificationRemarks": "Only non-stop option before 10 AM",
                "hotelJustificationRemarks": "Walking distance from client office"
            },
            {
                "cityName": "Chennai",
                "startTime": 1794504600000,
                "endTime": 1794659400000,
                "travel": {
                    "type": "train",
                    "title": "12658 Chennai Mail",
                    "selected": "12658-3A"
                },
                "stay": {
                    "type": "hotel",
                    "amount": 9000,
                    "name": "ITC Grand Chola",
                    "hotelType": "5 Star"
                },
                "arrivalTime": 1794504600000,
                "departureTime": 1794659400000,
                "journeyHours": 6.5,
                "stayHours": 43,
                "trainForms": { "berthPreference": "Lower" }
            }
        ],
        "title": "Client visit - Bengaluru & Chennai (extended)",
        "return": {
            "cityName": "Mumbai",
            "dateTime": 1794672000000,
            "travel": {
                "type": "flight",
                "amount": 7200,
                "title": "AI 571 MAA-BOM"
            },
            "arrivalTime": 1794672000000,
            "journeyHours": 2,
            "stayHours": 0,
            "roundTrip": False,
            "flightJustificationRemarks": "Late evening client meeting"
        },
        "allowance": 6000,
        "additionalAmount": 1500,
        "advance": True,
        "qrCard": False,
        "automation": False,
        "endTripHere": False,
        "skipApproval": False,
        "forms": {
            "costCenter": "CC-1042",
            "project": "Apollo",
            "purpose": "Client meeting"
        },
        "remarks": {
            "flight": "Aisle seat preferred",
            "hotel": "Early check-in requested"
        }
    },
    "employeeCode": "EMP101",
    "employeeEmail": "rahul.sharma@acme.com"
}
headers = {
    "DICE-APP-ID": "{{Company Code}}",
    "X-CLIENT-ID": "{{API Client ID}}",
    "X-CLIENT-SECRET": "{{API Client Secret}}",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript All fields
const url = 'https://heimdall.eka.io/apis/external/trips/updateTrip';
const options = {
  method: 'POST',
  headers: {
    'DICE-APP-ID': '{{Company Code}}',
    'X-CLIENT-ID': '{{API Client ID}}',
    'X-CLIENT-SECRET': '{{API Client Secret}}',
    'Content-Type': 'application/json'
  },
  body: '{"tripId":"EXT-TRIP-1002","tripStartDate":1794274200000,"tripEndDate":1794672000000,"data":{"origin":{"cityName":"Mumbai","dateTime":1794274200000,"departureTime":1794274200000,"journeyHours":1.75,"stayHours":0,"coords":{"name":"Mumbai","lat":19.076,"lng":72.8777}},"cities":[{"cityName":"Bengaluru","startTime":1794285000000,"endTime":1794486600000,"travel":{"type":"flight","amount":6500,"title":"6E 5321 BOM-BLR","selected":"6E-5321-SAVER","travelBookingType":"ADMIN","travelJourneyType":"ONE_WAY","travellers":[{"code":"EMP101","name":"Rahul Sharma","email":"rahul.sharma@acme.com","gender":"MALE","paxType":"ADULT","primary":true}]},"stay":{"type":"hotel","pricePerNight":6000,"name":"Taj MG Road","hotelType":"5 Star","code":"TAJ-BLR-01","roomKey":"DLX-KING-BB","hotelId":"HTL-99812","propertyType":"Hotel","checkInDate":1794292200000,"checkOutDate":1794461400000},"arrivalTime":1794285000000,"departureTime":1794486600000,"journeyHours":1.75,"stayHours":56,"coords":{"name":"Bengaluru","lat":12.9716,"lng":77.5946},"lat":12.9756,"lng":77.605,"locationId":"BLR-MGROAD","flightForms":{"purpose":"Client meeting"},"hotelForms":{"preferredArea":"MG Road"},"flightJustificationRemarks":"Only non-stop option before 10 AM","hotelJustificationRemarks":"Walking distance from client office"},{"cityName":"Chennai","startTime":1794504600000,"endTime":1794659400000,"travel":{"type":"train","title":"12658 Chennai Mail","selected":"12658-3A"},"stay":{"type":"hotel","amount":9000,"name":"ITC Grand Chola","hotelType":"5 Star"},"arrivalTime":1794504600000,"departureTime":1794659400000,"journeyHours":6.5,"stayHours":43,"trainForms":{"berthPreference":"Lower"}}],"title":"Client visit - Bengaluru & Chennai (extended)","return":{"cityName":"Mumbai","dateTime":1794672000000,"travel":{"type":"flight","amount":7200,"title":"AI 571 MAA-BOM"},"arrivalTime":1794672000000,"journeyHours":2,"stayHours":0,"roundTrip":false,"flightJustificationRemarks":"Late evening client meeting"},"allowance":6000,"additionalAmount":1500,"advance":true,"qrCard":false,"automation":false,"endTripHere":false,"skipApproval":false,"forms":{"costCenter":"CC-1042","project":"Apollo","purpose":"Client meeting"},"remarks":{"flight":"Aisle seat preferred","hotel":"Early check-in requested"}},"employeeCode":"EMP101","employeeEmail":"rahul.sharma@acme.com"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go All fields
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://heimdall.eka.io/apis/external/trips/updateTrip"

	payload := strings.NewReader("{\n  \"tripId\": \"EXT-TRIP-1002\",\n  \"tripStartDate\": 1794274200000,\n  \"tripEndDate\": 1794672000000,\n  \"data\": {\n    \"origin\": {\n      \"cityName\": \"Mumbai\",\n      \"dateTime\": 1794274200000,\n      \"departureTime\": 1794274200000,\n      \"journeyHours\": 1.75,\n      \"stayHours\": 0,\n      \"coords\": {\n        \"name\": \"Mumbai\",\n        \"lat\": 19.076,\n        \"lng\": 72.8777\n      }\n    },\n    \"cities\": [\n      {\n        \"cityName\": \"Bengaluru\",\n        \"startTime\": 1794285000000,\n        \"endTime\": 1794486600000,\n        \"travel\": {\n          \"type\": \"flight\",\n          \"amount\": 6500,\n          \"title\": \"6E 5321 BOM-BLR\",\n          \"selected\": \"6E-5321-SAVER\",\n          \"travelBookingType\": \"ADMIN\",\n          \"travelJourneyType\": \"ONE_WAY\",\n          \"travellers\": [\n            {\n              \"code\": \"EMP101\",\n              \"name\": \"Rahul Sharma\",\n              \"email\": \"rahul.sharma@acme.com\",\n              \"gender\": \"MALE\",\n              \"paxType\": \"ADULT\",\n              \"primary\": true\n            }\n          ]\n        },\n        \"stay\": {\n          \"type\": \"hotel\",\n          \"pricePerNight\": 6000,\n          \"name\": \"Taj MG Road\",\n          \"hotelType\": \"5 Star\",\n          \"code\": \"TAJ-BLR-01\",\n          \"roomKey\": \"DLX-KING-BB\",\n          \"hotelId\": \"HTL-99812\",\n          \"propertyType\": \"Hotel\",\n          \"checkInDate\": 1794292200000,\n          \"checkOutDate\": 1794461400000\n        },\n        \"arrivalTime\": 1794285000000,\n        \"departureTime\": 1794486600000,\n        \"journeyHours\": 1.75,\n        \"stayHours\": 56,\n        \"coords\": {\n          \"name\": \"Bengaluru\",\n          \"lat\": 12.9716,\n          \"lng\": 77.5946\n        },\n        \"lat\": 12.9756,\n        \"lng\": 77.605,\n        \"locationId\": \"BLR-MGROAD\",\n        \"flightForms\": {\n          \"purpose\": \"Client meeting\"\n        },\n        \"hotelForms\": {\n          \"preferredArea\": \"MG Road\"\n        },\n        \"flightJustificationRemarks\": \"Only non-stop option before 10 AM\",\n        \"hotelJustificationRemarks\": \"Walking distance from client office\"\n      },\n      {\n        \"cityName\": \"Chennai\",\n        \"startTime\": 1794504600000,\n        \"endTime\": 1794659400000,\n        \"travel\": {\n          \"type\": \"train\",\n          \"title\": \"12658 Chennai Mail\",\n          \"selected\": \"12658-3A\"\n        },\n        \"stay\": {\n          \"type\": \"hotel\",\n          \"amount\": 9000,\n          \"name\": \"ITC Grand Chola\",\n          \"hotelType\": \"5 Star\"\n        },\n        \"arrivalTime\": 1794504600000,\n        \"departureTime\": 1794659400000,\n        \"journeyHours\": 6.5,\n        \"stayHours\": 43,\n        \"trainForms\": {\n          \"berthPreference\": \"Lower\"\n        }\n      }\n    ],\n    \"title\": \"Client visit - Bengaluru & Chennai (extended)\",\n    \"return\": {\n      \"cityName\": \"Mumbai\",\n      \"dateTime\": 1794672000000,\n      \"travel\": {\n        \"type\": \"flight\",\n        \"amount\": 7200,\n        \"title\": \"AI 571 MAA-BOM\"\n      },\n      \"arrivalTime\": 1794672000000,\n      \"journeyHours\": 2,\n      \"stayHours\": 0,\n      \"roundTrip\": false,\n      \"flightJustificationRemarks\": \"Late evening client meeting\"\n    },\n    \"allowance\": 6000,\n    \"additionalAmount\": 1500,\n    \"advance\": true,\n    \"qrCard\": false,\n    \"automation\": false,\n    \"endTripHere\": false,\n    \"skipApproval\": false,\n    \"forms\": {\n      \"costCenter\": \"CC-1042\",\n      \"project\": \"Apollo\",\n      \"purpose\": \"Client meeting\"\n    },\n    \"remarks\": {\n      \"flight\": \"Aisle seat preferred\",\n      \"hotel\": \"Early check-in requested\"\n    }\n  },\n  \"employeeCode\": \"EMP101\",\n  \"employeeEmail\": \"rahul.sharma@acme.com\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("DICE-APP-ID", "{{Company Code}}")
	req.Header.Add("X-CLIENT-ID", "{{API Client ID}}")
	req.Header.Add("X-CLIENT-SECRET", "{{API Client Secret}}")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby All fields
require 'uri'
require 'net/http'

url = URI("https://heimdall.eka.io/apis/external/trips/updateTrip")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["DICE-APP-ID"] = '{{Company Code}}'
request["X-CLIENT-ID"] = '{{API Client ID}}'
request["X-CLIENT-SECRET"] = '{{API Client Secret}}'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"tripId\": \"EXT-TRIP-1002\",\n  \"tripStartDate\": 1794274200000,\n  \"tripEndDate\": 1794672000000,\n  \"data\": {\n    \"origin\": {\n      \"cityName\": \"Mumbai\",\n      \"dateTime\": 1794274200000,\n      \"departureTime\": 1794274200000,\n      \"journeyHours\": 1.75,\n      \"stayHours\": 0,\n      \"coords\": {\n        \"name\": \"Mumbai\",\n        \"lat\": 19.076,\n        \"lng\": 72.8777\n      }\n    },\n    \"cities\": [\n      {\n        \"cityName\": \"Bengaluru\",\n        \"startTime\": 1794285000000,\n        \"endTime\": 1794486600000,\n        \"travel\": {\n          \"type\": \"flight\",\n          \"amount\": 6500,\n          \"title\": \"6E 5321 BOM-BLR\",\n          \"selected\": \"6E-5321-SAVER\",\n          \"travelBookingType\": \"ADMIN\",\n          \"travelJourneyType\": \"ONE_WAY\",\n          \"travellers\": [\n            {\n              \"code\": \"EMP101\",\n              \"name\": \"Rahul Sharma\",\n              \"email\": \"rahul.sharma@acme.com\",\n              \"gender\": \"MALE\",\n              \"paxType\": \"ADULT\",\n              \"primary\": true\n            }\n          ]\n        },\n        \"stay\": {\n          \"type\": \"hotel\",\n          \"pricePerNight\": 6000,\n          \"name\": \"Taj MG Road\",\n          \"hotelType\": \"5 Star\",\n          \"code\": \"TAJ-BLR-01\",\n          \"roomKey\": \"DLX-KING-BB\",\n          \"hotelId\": \"HTL-99812\",\n          \"propertyType\": \"Hotel\",\n          \"checkInDate\": 1794292200000,\n          \"checkOutDate\": 1794461400000\n        },\n        \"arrivalTime\": 1794285000000,\n        \"departureTime\": 1794486600000,\n        \"journeyHours\": 1.75,\n        \"stayHours\": 56,\n        \"coords\": {\n          \"name\": \"Bengaluru\",\n          \"lat\": 12.9716,\n          \"lng\": 77.5946\n        },\n        \"lat\": 12.9756,\n        \"lng\": 77.605,\n        \"locationId\": \"BLR-MGROAD\",\n        \"flightForms\": {\n          \"purpose\": \"Client meeting\"\n        },\n        \"hotelForms\": {\n          \"preferredArea\": \"MG Road\"\n        },\n        \"flightJustificationRemarks\": \"Only non-stop option before 10 AM\",\n        \"hotelJustificationRemarks\": \"Walking distance from client office\"\n      },\n      {\n        \"cityName\": \"Chennai\",\n        \"startTime\": 1794504600000,\n        \"endTime\": 1794659400000,\n        \"travel\": {\n          \"type\": \"train\",\n          \"title\": \"12658 Chennai Mail\",\n          \"selected\": \"12658-3A\"\n        },\n        \"stay\": {\n          \"type\": \"hotel\",\n          \"amount\": 9000,\n          \"name\": \"ITC Grand Chola\",\n          \"hotelType\": \"5 Star\"\n        },\n        \"arrivalTime\": 1794504600000,\n        \"departureTime\": 1794659400000,\n        \"journeyHours\": 6.5,\n        \"stayHours\": 43,\n        \"trainForms\": {\n          \"berthPreference\": \"Lower\"\n        }\n      }\n    ],\n    \"title\": \"Client visit - Bengaluru & Chennai (extended)\",\n    \"return\": {\n      \"cityName\": \"Mumbai\",\n      \"dateTime\": 1794672000000,\n      \"travel\": {\n        \"type\": \"flight\",\n        \"amount\": 7200,\n        \"title\": \"AI 571 MAA-BOM\"\n      },\n      \"arrivalTime\": 1794672000000,\n      \"journeyHours\": 2,\n      \"stayHours\": 0,\n      \"roundTrip\": false,\n      \"flightJustificationRemarks\": \"Late evening client meeting\"\n    },\n    \"allowance\": 6000,\n    \"additionalAmount\": 1500,\n    \"advance\": true,\n    \"qrCard\": false,\n    \"automation\": false,\n    \"endTripHere\": false,\n    \"skipApproval\": false,\n    \"forms\": {\n      \"costCenter\": \"CC-1042\",\n      \"project\": \"Apollo\",\n      \"purpose\": \"Client meeting\"\n    },\n    \"remarks\": {\n      \"flight\": \"Aisle seat preferred\",\n      \"hotel\": \"Early check-in requested\"\n    }\n  },\n  \"employeeCode\": \"EMP101\",\n  \"employeeEmail\": \"rahul.sharma@acme.com\"\n}"

response = http.request(request)
puts response.read_body
```

```java All fields
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://heimdall.eka.io/apis/external/trips/updateTrip")
  .header("DICE-APP-ID", "{{Company Code}}")
  .header("X-CLIENT-ID", "{{API Client ID}}")
  .header("X-CLIENT-SECRET", "{{API Client Secret}}")
  .header("Content-Type", "application/json")
  .body("{\n  \"tripId\": \"EXT-TRIP-1002\",\n  \"tripStartDate\": 1794274200000,\n  \"tripEndDate\": 1794672000000,\n  \"data\": {\n    \"origin\": {\n      \"cityName\": \"Mumbai\",\n      \"dateTime\": 1794274200000,\n      \"departureTime\": 1794274200000,\n      \"journeyHours\": 1.75,\n      \"stayHours\": 0,\n      \"coords\": {\n        \"name\": \"Mumbai\",\n        \"lat\": 19.076,\n        \"lng\": 72.8777\n      }\n    },\n    \"cities\": [\n      {\n        \"cityName\": \"Bengaluru\",\n        \"startTime\": 1794285000000,\n        \"endTime\": 1794486600000,\n        \"travel\": {\n          \"type\": \"flight\",\n          \"amount\": 6500,\n          \"title\": \"6E 5321 BOM-BLR\",\n          \"selected\": \"6E-5321-SAVER\",\n          \"travelBookingType\": \"ADMIN\",\n          \"travelJourneyType\": \"ONE_WAY\",\n          \"travellers\": [\n            {\n              \"code\": \"EMP101\",\n              \"name\": \"Rahul Sharma\",\n              \"email\": \"rahul.sharma@acme.com\",\n              \"gender\": \"MALE\",\n              \"paxType\": \"ADULT\",\n              \"primary\": true\n            }\n          ]\n        },\n        \"stay\": {\n          \"type\": \"hotel\",\n          \"pricePerNight\": 6000,\n          \"name\": \"Taj MG Road\",\n          \"hotelType\": \"5 Star\",\n          \"code\": \"TAJ-BLR-01\",\n          \"roomKey\": \"DLX-KING-BB\",\n          \"hotelId\": \"HTL-99812\",\n          \"propertyType\": \"Hotel\",\n          \"checkInDate\": 1794292200000,\n          \"checkOutDate\": 1794461400000\n        },\n        \"arrivalTime\": 1794285000000,\n        \"departureTime\": 1794486600000,\n        \"journeyHours\": 1.75,\n        \"stayHours\": 56,\n        \"coords\": {\n          \"name\": \"Bengaluru\",\n          \"lat\": 12.9716,\n          \"lng\": 77.5946\n        },\n        \"lat\": 12.9756,\n        \"lng\": 77.605,\n        \"locationId\": \"BLR-MGROAD\",\n        \"flightForms\": {\n          \"purpose\": \"Client meeting\"\n        },\n        \"hotelForms\": {\n          \"preferredArea\": \"MG Road\"\n        },\n        \"flightJustificationRemarks\": \"Only non-stop option before 10 AM\",\n        \"hotelJustificationRemarks\": \"Walking distance from client office\"\n      },\n      {\n        \"cityName\": \"Chennai\",\n        \"startTime\": 1794504600000,\n        \"endTime\": 1794659400000,\n        \"travel\": {\n          \"type\": \"train\",\n          \"title\": \"12658 Chennai Mail\",\n          \"selected\": \"12658-3A\"\n        },\n        \"stay\": {\n          \"type\": \"hotel\",\n          \"amount\": 9000,\n          \"name\": \"ITC Grand Chola\",\n          \"hotelType\": \"5 Star\"\n        },\n        \"arrivalTime\": 1794504600000,\n        \"departureTime\": 1794659400000,\n        \"journeyHours\": 6.5,\n        \"stayHours\": 43,\n        \"trainForms\": {\n          \"berthPreference\": \"Lower\"\n        }\n      }\n    ],\n    \"title\": \"Client visit - Bengaluru & Chennai (extended)\",\n    \"return\": {\n      \"cityName\": \"Mumbai\",\n      \"dateTime\": 1794672000000,\n      \"travel\": {\n        \"type\": \"flight\",\n        \"amount\": 7200,\n        \"title\": \"AI 571 MAA-BOM\"\n      },\n      \"arrivalTime\": 1794672000000,\n      \"journeyHours\": 2,\n      \"stayHours\": 0,\n      \"roundTrip\": false,\n      \"flightJustificationRemarks\": \"Late evening client meeting\"\n    },\n    \"allowance\": 6000,\n    \"additionalAmount\": 1500,\n    \"advance\": true,\n    \"qrCard\": false,\n    \"automation\": false,\n    \"endTripHere\": false,\n    \"skipApproval\": false,\n    \"forms\": {\n      \"costCenter\": \"CC-1042\",\n      \"project\": \"Apollo\",\n      \"purpose\": \"Client meeting\"\n    },\n    \"remarks\": {\n      \"flight\": \"Aisle seat preferred\",\n      \"hotel\": \"Early check-in requested\"\n    }\n  },\n  \"employeeCode\": \"EMP101\",\n  \"employeeEmail\": \"rahul.sharma@acme.com\"\n}")
  .asString();
```

```php All fields
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://heimdall.eka.io/apis/external/trips/updateTrip', [
  'body' => '{
  "tripId": "EXT-TRIP-1002",
  "tripStartDate": 1794274200000,
  "tripEndDate": 1794672000000,
  "data": {
    "origin": {
      "cityName": "Mumbai",
      "dateTime": 1794274200000,
      "departureTime": 1794274200000,
      "journeyHours": 1.75,
      "stayHours": 0,
      "coords": {
        "name": "Mumbai",
        "lat": 19.076,
        "lng": 72.8777
      }
    },
    "cities": [
      {
        "cityName": "Bengaluru",
        "startTime": 1794285000000,
        "endTime": 1794486600000,
        "travel": {
          "type": "flight",
          "amount": 6500,
          "title": "6E 5321 BOM-BLR",
          "selected": "6E-5321-SAVER",
          "travelBookingType": "ADMIN",
          "travelJourneyType": "ONE_WAY",
          "travellers": [
            {
              "code": "EMP101",
              "name": "Rahul Sharma",
              "email": "rahul.sharma@acme.com",
              "gender": "MALE",
              "paxType": "ADULT",
              "primary": true
            }
          ]
        },
        "stay": {
          "type": "hotel",
          "pricePerNight": 6000,
          "name": "Taj MG Road",
          "hotelType": "5 Star",
          "code": "TAJ-BLR-01",
          "roomKey": "DLX-KING-BB",
          "hotelId": "HTL-99812",
          "propertyType": "Hotel",
          "checkInDate": 1794292200000,
          "checkOutDate": 1794461400000
        },
        "arrivalTime": 1794285000000,
        "departureTime": 1794486600000,
        "journeyHours": 1.75,
        "stayHours": 56,
        "coords": {
          "name": "Bengaluru",
          "lat": 12.9716,
          "lng": 77.5946
        },
        "lat": 12.9756,
        "lng": 77.605,
        "locationId": "BLR-MGROAD",
        "flightForms": {
          "purpose": "Client meeting"
        },
        "hotelForms": {
          "preferredArea": "MG Road"
        },
        "flightJustificationRemarks": "Only non-stop option before 10 AM",
        "hotelJustificationRemarks": "Walking distance from client office"
      },
      {
        "cityName": "Chennai",
        "startTime": 1794504600000,
        "endTime": 1794659400000,
        "travel": {
          "type": "train",
          "title": "12658 Chennai Mail",
          "selected": "12658-3A"
        },
        "stay": {
          "type": "hotel",
          "amount": 9000,
          "name": "ITC Grand Chola",
          "hotelType": "5 Star"
        },
        "arrivalTime": 1794504600000,
        "departureTime": 1794659400000,
        "journeyHours": 6.5,
        "stayHours": 43,
        "trainForms": {
          "berthPreference": "Lower"
        }
      }
    ],
    "title": "Client visit - Bengaluru & Chennai (extended)",
    "return": {
      "cityName": "Mumbai",
      "dateTime": 1794672000000,
      "travel": {
        "type": "flight",
        "amount": 7200,
        "title": "AI 571 MAA-BOM"
      },
      "arrivalTime": 1794672000000,
      "journeyHours": 2,
      "stayHours": 0,
      "roundTrip": false,
      "flightJustificationRemarks": "Late evening client meeting"
    },
    "allowance": 6000,
    "additionalAmount": 1500,
    "advance": true,
    "qrCard": false,
    "automation": false,
    "endTripHere": false,
    "skipApproval": false,
    "forms": {
      "costCenter": "CC-1042",
      "project": "Apollo",
      "purpose": "Client meeting"
    },
    "remarks": {
      "flight": "Aisle seat preferred",
      "hotel": "Early check-in requested"
    }
  },
  "employeeCode": "EMP101",
  "employeeEmail": "rahul.sharma@acme.com"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'DICE-APP-ID' => '{{Company Code}}',
    'X-CLIENT-ID' => '{{API Client ID}}',
    'X-CLIENT-SECRET' => '{{API Client Secret}}',
  ],
]);

echo $response->getBody();
```

```csharp All fields
using RestSharp;

var client = new RestClient("https://heimdall.eka.io/apis/external/trips/updateTrip");
var request = new RestRequest(Method.POST);
request.AddHeader("DICE-APP-ID", "{{Company Code}}");
request.AddHeader("X-CLIENT-ID", "{{API Client ID}}");
request.AddHeader("X-CLIENT-SECRET", "{{API Client Secret}}");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"tripId\": \"EXT-TRIP-1002\",\n  \"tripStartDate\": 1794274200000,\n  \"tripEndDate\": 1794672000000,\n  \"data\": {\n    \"origin\": {\n      \"cityName\": \"Mumbai\",\n      \"dateTime\": 1794274200000,\n      \"departureTime\": 1794274200000,\n      \"journeyHours\": 1.75,\n      \"stayHours\": 0,\n      \"coords\": {\n        \"name\": \"Mumbai\",\n        \"lat\": 19.076,\n        \"lng\": 72.8777\n      }\n    },\n    \"cities\": [\n      {\n        \"cityName\": \"Bengaluru\",\n        \"startTime\": 1794285000000,\n        \"endTime\": 1794486600000,\n        \"travel\": {\n          \"type\": \"flight\",\n          \"amount\": 6500,\n          \"title\": \"6E 5321 BOM-BLR\",\n          \"selected\": \"6E-5321-SAVER\",\n          \"travelBookingType\": \"ADMIN\",\n          \"travelJourneyType\": \"ONE_WAY\",\n          \"travellers\": [\n            {\n              \"code\": \"EMP101\",\n              \"name\": \"Rahul Sharma\",\n              \"email\": \"rahul.sharma@acme.com\",\n              \"gender\": \"MALE\",\n              \"paxType\": \"ADULT\",\n              \"primary\": true\n            }\n          ]\n        },\n        \"stay\": {\n          \"type\": \"hotel\",\n          \"pricePerNight\": 6000,\n          \"name\": \"Taj MG Road\",\n          \"hotelType\": \"5 Star\",\n          \"code\": \"TAJ-BLR-01\",\n          \"roomKey\": \"DLX-KING-BB\",\n          \"hotelId\": \"HTL-99812\",\n          \"propertyType\": \"Hotel\",\n          \"checkInDate\": 1794292200000,\n          \"checkOutDate\": 1794461400000\n        },\n        \"arrivalTime\": 1794285000000,\n        \"departureTime\": 1794486600000,\n        \"journeyHours\": 1.75,\n        \"stayHours\": 56,\n        \"coords\": {\n          \"name\": \"Bengaluru\",\n          \"lat\": 12.9716,\n          \"lng\": 77.5946\n        },\n        \"lat\": 12.9756,\n        \"lng\": 77.605,\n        \"locationId\": \"BLR-MGROAD\",\n        \"flightForms\": {\n          \"purpose\": \"Client meeting\"\n        },\n        \"hotelForms\": {\n          \"preferredArea\": \"MG Road\"\n        },\n        \"flightJustificationRemarks\": \"Only non-stop option before 10 AM\",\n        \"hotelJustificationRemarks\": \"Walking distance from client office\"\n      },\n      {\n        \"cityName\": \"Chennai\",\n        \"startTime\": 1794504600000,\n        \"endTime\": 1794659400000,\n        \"travel\": {\n          \"type\": \"train\",\n          \"title\": \"12658 Chennai Mail\",\n          \"selected\": \"12658-3A\"\n        },\n        \"stay\": {\n          \"type\": \"hotel\",\n          \"amount\": 9000,\n          \"name\": \"ITC Grand Chola\",\n          \"hotelType\": \"5 Star\"\n        },\n        \"arrivalTime\": 1794504600000,\n        \"departureTime\": 1794659400000,\n        \"journeyHours\": 6.5,\n        \"stayHours\": 43,\n        \"trainForms\": {\n          \"berthPreference\": \"Lower\"\n        }\n      }\n    ],\n    \"title\": \"Client visit - Bengaluru & Chennai (extended)\",\n    \"return\": {\n      \"cityName\": \"Mumbai\",\n      \"dateTime\": 1794672000000,\n      \"travel\": {\n        \"type\": \"flight\",\n        \"amount\": 7200,\n        \"title\": \"AI 571 MAA-BOM\"\n      },\n      \"arrivalTime\": 1794672000000,\n      \"journeyHours\": 2,\n      \"stayHours\": 0,\n      \"roundTrip\": false,\n      \"flightJustificationRemarks\": \"Late evening client meeting\"\n    },\n    \"allowance\": 6000,\n    \"additionalAmount\": 1500,\n    \"advance\": true,\n    \"qrCard\": false,\n    \"automation\": false,\n    \"endTripHere\": false,\n    \"skipApproval\": false,\n    \"forms\": {\n      \"costCenter\": \"CC-1042\",\n      \"project\": \"Apollo\",\n      \"purpose\": \"Client meeting\"\n    },\n    \"remarks\": {\n      \"flight\": \"Aisle seat preferred\",\n      \"hotel\": \"Early check-in requested\"\n    }\n  },\n  \"employeeCode\": \"EMP101\",\n  \"employeeEmail\": \"rahul.sharma@acme.com\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift All fields
import Foundation

let headers = [
  "DICE-APP-ID": "{{Company Code}}",
  "X-CLIENT-ID": "{{API Client ID}}",
  "X-CLIENT-SECRET": "{{API Client Secret}}",
  "Content-Type": "application/json"
]
let parameters = [
  "tripId": "EXT-TRIP-1002",
  "tripStartDate": 1794274200000,
  "tripEndDate": 1794672000000,
  "data": [
    "origin": [
      "cityName": "Mumbai",
      "dateTime": 1794274200000,
      "departureTime": 1794274200000,
      "journeyHours": 1.75,
      "stayHours": 0,
      "coords": [
        "name": "Mumbai",
        "lat": 19.076,
        "lng": 72.8777
      ]
    ],
    "cities": [
      [
        "cityName": "Bengaluru",
        "startTime": 1794285000000,
        "endTime": 1794486600000,
        "travel": [
          "type": "flight",
          "amount": 6500,
          "title": "6E 5321 BOM-BLR",
          "selected": "6E-5321-SAVER",
          "travelBookingType": "ADMIN",
          "travelJourneyType": "ONE_WAY",
          "travellers": [
            [
              "code": "EMP101",
              "name": "Rahul Sharma",
              "email": "rahul.sharma@acme.com",
              "gender": "MALE",
              "paxType": "ADULT",
              "primary": true
            ]
          ]
        ],
        "stay": [
          "type": "hotel",
          "pricePerNight": 6000,
          "name": "Taj MG Road",
          "hotelType": "5 Star",
          "code": "TAJ-BLR-01",
          "roomKey": "DLX-KING-BB",
          "hotelId": "HTL-99812",
          "propertyType": "Hotel",
          "checkInDate": 1794292200000,
          "checkOutDate": 1794461400000
        ],
        "arrivalTime": 1794285000000,
        "departureTime": 1794486600000,
        "journeyHours": 1.75,
        "stayHours": 56,
        "coords": [
          "name": "Bengaluru",
          "lat": 12.9716,
          "lng": 77.5946
        ],
        "lat": 12.9756,
        "lng": 77.605,
        "locationId": "BLR-MGROAD",
        "flightForms": ["purpose": "Client meeting"],
        "hotelForms": ["preferredArea": "MG Road"],
        "flightJustificationRemarks": "Only non-stop option before 10 AM",
        "hotelJustificationRemarks": "Walking distance from client office"
      ],
      [
        "cityName": "Chennai",
        "startTime": 1794504600000,
        "endTime": 1794659400000,
        "travel": [
          "type": "train",
          "title": "12658 Chennai Mail",
          "selected": "12658-3A"
        ],
        "stay": [
          "type": "hotel",
          "amount": 9000,
          "name": "ITC Grand Chola",
          "hotelType": "5 Star"
        ],
        "arrivalTime": 1794504600000,
        "departureTime": 1794659400000,
        "journeyHours": 6.5,
        "stayHours": 43,
        "trainForms": ["berthPreference": "Lower"]
      ]
    ],
    "title": "Client visit - Bengaluru & Chennai (extended)",
    "return": [
      "cityName": "Mumbai",
      "dateTime": 1794672000000,
      "travel": [
        "type": "flight",
        "amount": 7200,
        "title": "AI 571 MAA-BOM"
      ],
      "arrivalTime": 1794672000000,
      "journeyHours": 2,
      "stayHours": 0,
      "roundTrip": false,
      "flightJustificationRemarks": "Late evening client meeting"
    ],
    "allowance": 6000,
    "additionalAmount": 1500,
    "advance": true,
    "qrCard": false,
    "automation": false,
    "endTripHere": false,
    "skipApproval": false,
    "forms": [
      "costCenter": "CC-1042",
      "project": "Apollo",
      "purpose": "Client meeting"
    ],
    "remarks": [
      "flight": "Aisle seat preferred",
      "hotel": "Early check-in requested"
    ]
  ],
  "employeeCode": "EMP101",
  "employeeEmail": "rahul.sharma@acme.com"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://heimdall.eka.io/apis/external/trips/updateTrip")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```