POST api/schedules/{scheduleId}/tripsolutions?failOnWarnings={failOnWarnings}

Schedules one or more trips using a scheduling solution that was previously found.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
scheduleId

The ID of the schedule that the trip(s) will be scheduled to.

integer

Required

failOnWarnings

When true, the trip will fail to schedule if there are any warnings

boolean

Required

Body Parameters

Specifies the list of trips that the solution should be applied and saved with.

ScheduleTripData
NameDescriptionTypeAdditional information
ClientId

Gets or sets the ID of the client that the trips belong to.

integer

None.

SolutionSetId

Gets or sets the ID of the solution set that contains the schedule details.

integer

None.

SolutionNumber

Gets or sets the solution number of the itinerary solution that contains the schedule details.

integer

None.

TripIds

Gets or sets the list of Trip IDs that the solution should be applied to.

Collection of integer

None.

TripProviderIds

Gets or sets the list of trip provider ids.

Collection of TripProviderId

None.

Request Formats

application/json, text/json

Sample:
{
  "clientId": 1,
  "solutionSetId": 2,
  "solutionNumber": 3,
  "tripIds": [
    1,
    2
  ],
  "tripProviderIds": [
    {
      "tripId": 1,
      "providerId": 2
    },
    {
      "tripId": 1,
      "providerId": 2
    }
  ]
}

application/xml, text/xml

Sample:
<ScheduleTripData xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TS.DR.Resources">
  <ClientId>1</ClientId>
  <SolutionNumber>3</SolutionNumber>
  <SolutionSetId>2</SolutionSetId>
  <TripIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>1</d2p1:int>
    <d2p1:int>2</d2p1:int>
  </TripIds>
  <TripProviderIds>
    <TripProviderId>
      <ProviderId>2</ProviderId>
      <TripId>1</TripId>
    </TripProviderId>
    <TripProviderId>
      <ProviderId>2</ProviderId>
      <TripId>1</TripId>
    </TripProviderId>
  </TripProviderIds>
</ScheduleTripData>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

IHttpActionResult

None.

Response Formats

application/json, text/json, application/xml, text/xml

Sample:

Sample not available.