Option request

Request
Description The option request allows OMD clients to ask for options for a specific task. The options can then be used to select the preferred option.
Context https://<instance>.optimizemyday.com/omdservices-basic/rest/v1/services/option
URL /request
Method GET
Response Code 200 when successful, another HTTP status code otherwise
Success Response A list of feasible insertion points for the provided task.
Response Type XML or JSON
Parameter Datatype Description
configId Integer The identifier of the configuration.
taskId String The external identifier of the task.
resourceId String A comma-separated list of resources for which the options are to be calculated. If omitted, the request will automatically identify potential candidates.
dateFrom Date/Time The time frame start boundary for the request. If omitted, this value will default to the earliest date/time attribute of the task.
dateTo Date/Time The time frame end boundary for the request. If omitted, this value will default to the latest date/time attribute of the task.
explain Boolean Provides a detailed explanation of the costs before and after the insertion. Defaults to false.
abort Boolean If false, the request will ignore all hard constraint exceptions. Default value is true.
maxSeconds Integer The request must stop calculating more options if the maximum amount of time has been surpassed. Defaults to -1, i.e. as long as the plan horizon allows.
maxOptions Integer The maximum number of options. Defaults to -1, i.e. as many options as possible.
checkTerritory Boolean Indicates whether the calculations should consider the territory being a hard constraint.
checkSkill Boolean Indicates whether the calculations should consider the skill being a hard constraint.
checkRequiredResource Boolean Indicates whether the calculations should consider the required resource being a hard constraint.
allowExtraOvertime Boolean Indicates if extra overtime should be added to each trip during the calculations. This will temporarily give the planning engine more room for finding feasible options.
extraOvertime Integer The number of minutes added to the working hours of each trip while executing the request. This value is only applicable if the allowExtraOvertime parameter has been set.
_output String The requested output format being xml or json. If omitted, xml is assumed.

Sample Call

https://sandbox.optimizemyday.com/omdservices-basic/rest/v1/services/option/request?configId=16167225&taskId=b8d61bb7-497e-4ca5-a76c-84f7a44ab7df&explain=true

Sample Result

<Result success="true">
  <PlanningOption task="0000161996-1-1-2017-05-11" resource="10000032" dateTime="2017-10-19 09:32:56" index="1">
   <Cost costValue="89">
    <CostComponent name="Waiting time" base="0.0" value="0"/>
    <CostComponent name="Busy time" base="75.0" value="0"/>
    <CostComponent name="Idle time" base="-75.0" value="0"/>
    <CostComponent name="Travel time" base="0.0" value="0"/>
    <CostComponent name="Travel distance" base="0.0" value="0"/>
    <CostComponent name="Duration" base="75.0" value="0"/>
    <CostComponent name="Best age" base="0.0" value="89"/>
   </Cost>
   <TripInfoBefore identifier="16167225 / 10000032 / Thu Oct 19 00:00:00 CEST 2017">
    <Cost costValue="278872">
     <CostComponent name="Waiting time" base="0.0" value="0"/>
     <CostComponent name="Busy time" base="260.892" value="0"/>
     <CostComponent name="Idle time" base="279.108" value="0"/>
     <CostComponent name="Travel time" base="185.892" value="278838"/>
     <CostComponent name="Travel distance" base="298764.0" value="0"/>
     <CostComponent name="Duration" base="75.0" value="0"/>
     <CostComponent name="Best age" base="0.0" value="34"/>
    </Cost>
    <StopInfo type="Departure" start="2017-10-19T08:00:00+02:00" duration="0.0" travelDistance="149382" travelTime="92.946" travelUnknown="false" overlap="0.0" busyTime="92.946" isTravelUnknown="false" pauseTimeTravel="0.0" pauseTimeOnSite="0.0">
     <Cost costValue="139419">
      <CostComponent name="Travel time" base="92.946" value="139419"/>
      <CostComponent name="Travel distance" base="149382.0" value="0"/>
     </Cost>
    </StopInfo>
    <StopInfo type="Visit" externalId="0000161996-1-1-2017-05-11" start="2017-10-19T09:32:56.760+02:00" duration="75.0" travelDistance="0" travelTime="0.0" travelUnknown="false" overlap="0.0" busyTime="75.0" waitingTime="0.0" isTravelUnknown="false" pauseTimeTravel="0.0" pauseTimeOnSite="0.0">
     <Cost costValue="89">
      <CostComponent name="Duration" base="75.0" value="0"/>
      <CostComponent name="Best age" base="0.0" value="89"/>
     </Cost>
    </StopInfo>
    <StopInfo type="Visit" externalId="b8d61bb7-497e-4ca5-a76c-84f7a44ab7df" start="2017-10-19T10:47:56.760+02:00" duration="75.0" travelDistance="149382" travelTime="92.946" travelUnknown="false" overlap="0.0" busyTime="167.946" waitingTime="0.0" isTravelUnknown="false" pauseTimeTravel="0.0" pauseTimeOnSite="0.0">
     <Cost costValue="139453">
      <CostComponent name="Travel time" base="92.946" value="139419"/>
      <CostComponent name="Travel distance" base="149382.0" value="0"/>
      <CostComponent name="Duration" base="75.0" value="0"/>
      <CostComponent name="Best age" base="0.0" value="34"/>
     </Cost>
    </StopInfo>
    <StopInfo type="Arrival" start="2017-10-19T17:00:00+02:00" duration="0.0" travelDistance="0" travelTime="0.0" travelUnknown="false" overlap="0.0" busyTime="0.0" isTravelUnknown="false" pauseTimeTravel="0.0" pauseTimeOnSite="0.0">
     <Cost costValue="0"/>
    </StopInfo>
   </TripInfoBefore>
   <TripInfoAfter identifier="16167225 / 10000032 / Thu Oct 19 00:00:00 CEST 2017">
    <Cost costValue="278961">
     <CostComponent name="Waiting time" base="0.0" value="0"/>
     <CostComponent name="Busy time" base="335.892" value="0"/>
     <CostComponent name="Idle time" base="204.108" value="0"/>
     <CostComponent name="Travel time" base="185.892" value="278838"/>
     <CostComponent name="Travel distance" base="298764.0" value="0"/>
     <CostComponent name="Duration" base="150.0" value="0"/>
     <CostComponent name="Best age" base="0.0" value="123"/>
    </Cost>
    <StopInfo type="Departure" start="2017-10-19T08:00:00+02:00" duration="0.0" travelDistance="149382" travelTime="92.946" travelUnknown="false" overlap="0.0" busyTime="92.946" isTravelUnknown="false" pauseTimeTravel="0.0" pauseTimeOnSite="0.0">
     <Cost costValue="139419">
      <CostComponent name="Travel time" base="92.946" value="139419"/>
      <CostComponent name="Travel distance" base="149382.0" value="0"/>
     </Cost>
    </StopInfo>
    <StopInfo type="Visit" externalId="0000161996-1-1-2017-05-11" start="2017-10-19T09:32:56.760+02:00" duration="75.0" travelDistance="0" travelTime="0.0" travelUnknown="false" overlap="0.0" busyTime="75.0" waitingTime="0.0" isTravelUnknown="false" pauseTimeTravel="0.0" pauseTimeOnSite="0.0">
     <Cost costValue="89">
      <CostComponent name="Duration" base="75.0" value="0"/>
      <CostComponent name="Best age" base="0.0" value="89"/>
     </Cost>
    </StopInfo>
    <StopInfo type="Visit" externalId="b8d61bb7-497e-4ca5-a76c-84f7a44ab7df" start="2017-10-19T10:47:56.760+02:00" duration="75.0" travelDistance="149382" travelTime="92.946" travelUnknown="false" overlap="0.0" busyTime="167.946" waitingTime="0.0" isTravelUnknown="false" pauseTimeTravel="0.0" pauseTimeOnSite="0.0">
     <Cost costValue="139453">
      <CostComponent name="Travel time" base="92.946" value="139419"/>
      <CostComponent name="Travel distance" base="149382.0" value="0"/>
      <CostComponent name="Duration" base="75.0" value="0"/>
      <CostComponent name="Best age" base="0.0" value="34"/>
     </Cost>
    </StopInfo>
    <StopInfo type="Arrival" start="2017-10-19T17:00:00+02:00" duration="0.0" travelDistance="0" travelTime="0.0" travelUnknown="false" overlap="0.0" busyTime="0.0" isTravelUnknown="false" pauseTimeTravel="0.0" pauseTimeOnSite="0.0">
     <Cost costValue="0"/>
    </StopInfo>
   </TripInfoAfter>
  </PlanningOption>
</Result>

results matching ""

    No results matching ""