PUT api/clients/{clientID}/edittrip?failOnWarnings={failOnWarnings}&additionalPassengerMode={additionalPassengerMode}

Edits trip(s) for a client.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
clientID

The ID of the client to book the trip for

integer

Required

failOnWarnings

If true, any trips will not be edited if a warning is generated

boolean

Default value is False

additionalPassengerMode

If set to , the client will be automatically included in the additional passengers list.

AdditionalPassengerMode

Default value is ClientPlusAdditionalPassengers

Body Parameters

Contains the details of the trip to book.

TripItinerary
NameDescriptionTypeAdditional information
Trips

Collection of Trip

None.

ContainsReturnTrip

boolean

None.

Count

integer

None.

Item

Trip

None.

Request Formats

application/json, text/json, application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

Returns the validation result if the trip was edited successfully, or an internal server if it was not.

BookTripResult
NameDescriptionTypeAdditional information
TripIds

Gets or sets the list of IDs of the newly saved Trip, if the save operation was successful.

Collection of integer

None.

ItineraryId

Gets or sets the Itinerary ID of the newly saved Itinerary, if the save operation was successful and the itinerary ID is available.

integer

None.

SynchronizationStatuses

Gets or sets the statuses of updated, added and removed trips as a result of synchronization

Collection of TripSynchronizationStatus

None.

TripStatus

Trip schedule status after booking or updating trip

Dictionary of integer [key] and TripStatusCode [value]

None.

ValidationItems

Gets the list of validation items.

Collection of ValidationItem

None.

HasErrors

Determines whether there are any validation errors.

boolean

None.

HasErrorsOrWarnings

Determines whether there are any validation errors.

boolean

None.

Response Formats

application/json, text/json

Sample:
{
  "tripIds": [
    1,
    2
  ],
  "itineraryId": 1,
  "synchronizationStatuses": [
    0,
    0
  ],
  "tripStatus": {
    "1": 0,
    "2": 0
  },
  "validationItems": [],
  "hasErrors": false,
  "hasErrorsOrWarnings": false
}

application/xml, text/xml

Sample:
<BookTripResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TS.DR.Resources">
  <ValidationItems />
  <ItineraryId>1</ItineraryId>
  <SynchronizationStatuses>
    <TripSynchronizationStatus>NotActive</TripSynchronizationStatus>
    <TripSynchronizationStatus>NotActive</TripSynchronizationStatus>
  </SynchronizationStatuses>
  <TripIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>1</d2p1:int>
    <d2p1:int>2</d2p1:int>
  </TripIds>
  <TripStatus xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfintTripStatusCodep2VB0fU_P>
      <d2p1:Key>1</d2p1:Key>
      <d2p1:Value>Unscheduled</d2p1:Value>
    </d2p1:KeyValueOfintTripStatusCodep2VB0fU_P>
    <d2p1:KeyValueOfintTripStatusCodep2VB0fU_P>
      <d2p1:Key>2</d2p1:Key>
      <d2p1:Value>Unscheduled</d2p1:Value>
    </d2p1:KeyValueOfintTripStatusCodep2VB0fU_P>
  </TripStatus>
</BookTripResult>