POST api/v{version}/runs/{runId}/bookings

Schedules an existing booking onto a run. All of the booking's events are placed on the run, at an insert position chosen by the paratransit application.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
runId

The ID of the destination run. Must be greater than zero.

integer

Required

version

The requested API version

string

Required

Default value is 2.0

Body Parameters

The booking to schedule, and optionally whether to search for a solution.

ScheduleBookingToRunRequest
NameDescriptionTypeAdditional information
BookingId

Gets or sets the ID of the booking to schedule onto the run. Required; must be greater than zero.

integer

None.

SearchForSolution

Gets or sets whether to search for the best insert position on the run. Optional; defaults to true when omitted. Send false to place the events directly without a solution search (faster; used for Taxi/External-run and Broker scenarios).

boolean

None.

Request Formats

application/json, text/json, application/problem+json

Sample:
{
  "bookingId": 1,
  "searchForSolution": true
}

application/xml, text/xml

Sample:
<ScheduleBookingToRunRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TS.DR.Resources">
  <BookingId>1</BookingId>
  <SearchForSolution>true</SearchForSolution>
</ScheduleBookingToRunRequest>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

Returns 204 No Content on success. A 204 does not guarantee a violation-free placement: if no such position exists the booking is force-appended to the end of the run, and violation details are not returned.

IHttpActionResult

None.

Response Formats

application/json, text/json, application/problem+json, application/xml, text/xml

Sample:

Sample not available.