POST api/clients/{clientID}/trip?failOnWarnings={failOnWarnings}&additionalPassengerMode={additionalPassengerMode}&setRequestedLateDropoffFromOBT={setRequestedLateDropoffFromOBT}&forceAllowImmediateBooking={forceAllowImmediateBooking}&overrideClientTripLimits={overrideClientTripLimits}&doDropOffTimeAdjustment={doDropOffTimeAdjustment}

Books a trip 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 booked 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

setRequestedLateDropoffFromOBT

When true, the requested late dropoff time for the trip will be set based on the requested pickup time and the maximum onboard time settings configured in the Paratransit application. Requires a requested pickup time to be set.

boolean

Default value is False

forceAllowImmediateBooking

Overrides settings in the paratransit app to allow bookings for the current time, even if they are otherwise disallowed

boolean

Default value is False

overrideClientTripLimits

Overrides settings in the paratransit app to bypass limits on how many trips can be booked by the client, or whether the trips overlap. Intended for cases when the client is a 'bucket' for multiple people's trips.

boolean

Default value is False

doDropOffTimeAdjustment

Whether to perform drop off time adjustment

boolean

Default value is True

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 booked 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>