POST api/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
| Name | Description | Type | Additional information |
|---|---|---|---|
| runId |
The ID of the destination run. Must be greater than zero. |
integer |
Required |
Body Parameters
The booking to schedule, and optionally whether to search for a solution.
ScheduleBookingToRunRequest| Name | Description | Type | Additional 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
{
"bookingId": 1,
"searchForSolution": true
}
application/xml, text/xml
<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 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.
IHttpActionResultNone.
Response Formats
application/json, text/json, application/problem+json, application/xml, text/xml
Sample not available.