POST api/clients/{clientId}/subscription?failOnWarnings={failOnWarnings}&doDropOffTimeAdjustment={doDropOffTimeAdjustment}&additionalPassengerMode={additionalPassengerMode}
Books a recurring trip for a client.
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
clientId |
The ID of the client to book the trip for. |
integer |
Required |
failOnWarnings |
When true, if warnings are generated while booking the subscription, the trip will not be booked. This does not apply to errors/warnings generated during activation of the subscription |
boolean |
Default value is False |
doDropOffTimeAdjustment |
Whether to perform drop off time adjustment |
boolean |
Default value is True |
additionalPassengerMode |
If set to , the client will be automatically included in the additional passengers list. |
AdditionalPassengerMode |
Default value is ClientPlusAdditionalPassengers |
Body Parameters
Information about the location, time, and recurrence schedule of the trip.
RecurringTripItineraryName | Description | Type | Additional information |
---|---|---|---|
Days |
Gets or sets the days that this recurring trip will apply to. |
TripDays |
None. |
IsPending |
Gets or sets whether to book these trips with a "pending" status. |
boolean |
None. |
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 not available.
Response Information
Resource Description
Returns the validation result if the trip was booked successfully, or an internal server if it was not.
BookTripResultName | Description | Type | Additional 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
{ "tripIds": [ 1, 2 ], "itineraryId": 1, "synchronizationStatuses": [ 0, 0 ], "tripStatus": { "1": 0, "2": 0 }, "validationItems": [], "hasErrors": false, "hasErrorsOrWarnings": false }
application/xml, text/xml
<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>