Batch Schedule Trips

Runs the batch scheduling algorithm over many trips at once and commits the result: every
route that receives work is saved, exactly as the desktop client's batch schedule window
does. This is the multi-trip counterpart to route/shopTrip + route/saveRoute, and it produces
a batch-optimal answer rather than a series of per-trip ones.

This modifies dispatch plans for the whole day being scheduled.

Limits, both reported back rather than silently applied:
a request may name at most 500 trips (1000 service ids) and is rejected with 400 above that;
the algorithm is given 120 seconds, after which the request fails with 504 and nothing is
committed - no route is changed.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required
Query Params
string
required

Scoping selector for the target transportation provider.

Body Params

Date, the trips to schedule, and the batch options.

Request body for batch scheduling a set of trips onto routes for one service date - the API
equivalent of selecting trips in the desktop client and running its batch schedule window.

date-time

The service date being scheduled. Every trip identified by {SvAPI.Models.BatchScheduleRequestModel.ServiceIdList} must
have this same service date - a trip can only be scheduled onto routes for its own date.

service_ids
array of int32s

Service ids of the trips to schedule. Either event (pickup or dropoff) of a trip identifies
it; both events always move together. Required, and capped to protect the shared API - see
BatchSchedulingManager.MAX_TRIPS_PER_BATCH.

service_ids
route_ids
array of int32s

Optional. Restricts the batch to these routes (the desktop's run-selection tab). When
omitted or empty, every eligible route on {SvAPI.Models.BatchScheduleRequestModel.Date} may receive trips. Cancelled
routes, routes with no vehicle, and the unscheduled placeholder are never eligible.

route_ids
string

Optional. How strictly scheduling constraints are enforced: batch (default),
single (the desktop's single-insert set) or force (most permissive).

boolean

Optional, defaults to false. When true the algorithm spreads work across the
participating routes by capping events per route, exactly as the desktop's Load Balance
checkbox does.

string

Optional, defaults to batch, which is currently the only supported value.
force_returns_to_appt_runs and force_to_default_drivers are recognised but
rejected with 400 - see {SvAPI.Models.BatchScheduleMode} for why.

Headers
string

access token

string
enum
Defaults to application/json

Generated from available response content types

Allowed:
string
enum
Defaults to application/json

Generated from available request content types

Allowed:
Responses

400

Missing or unaligned data. Error message will be returned with response.

403

The api key used does not have access to this resource.

404

A requested service id, or the schedule day, does not exist.

504

The scheduling algorithm exceeded its time limit. Nothing was committed.

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
text/json