Slot Request API
Slot Request API sends the input regarding the work order for which the Propose Times option is used. This input API is the same as the Scheduling Input JSON for batch optimization. However, input information is passed only for the work order for which the Propose Times option is being used. The JSON payload should have only one work order along with resources and events data.
* 
GMT time zone must be used in all references. All the date-time field values should be in the UTC format. For example, 2020-02-14T18:00:00.000Z.
Endpoint
https://<host>:<port>/optimax/scheduling/v2/slots
Sample Input Data
{
"workOrders": [
{"address":"4141 Morse Crossing, Columbus, Ohio 43219, United States",
"geoLocation": {
"latitude":40.054933,
"longitude":-82.92126
},
"serviceDuration":"PT2H30M",
"importance":2,
"recommendedResources": [
{"id":"b9868291-9daf-4e4c-94de-dd451d20e329",
"priority":1
},
{
"id":"fe698014-e5cc-4656-8a44-be9f54dffd1a",
"priority":2
},
{
"id":"496e332c-6747-44f1-b9cc-7ac849cd22cc",
"priority":6
}
],
"preferredStart":"2021-09-17T19:01:46Z",
"preferredEnd":"2021-09-22T02:00:00Z",
"isAvailableForOvernightStay":false,
"applyEfficiencyFactor":false,
"workOrderId":"dfb25319-534e-4e3d-aca2-f1408d536371",
"accessHours": [
{"begin":"2021-09-20T04:00:00Z",
"end":"2021-09-20T14:00:00Z",
"preferredHour":false
},
{
"begin":"2021-09-20T14:00:00Z",
"end":"2021-09-21T14:00:00Z",
"preferredHour":false
},
{
"begin":"2021-09-21T14:00:00Z",
"end":"2021-09-22T14:00:00Z",
"preferredHour":false
},
{
"begin":"2021-09-22T14:00:00Z",
"end":"2021-09-23T14:00:00Z",
"preferredHour":false
},
{
"begin":"2021-09-23T14:00:00Z",
"end":"2021-09-24T14:00:00Z",
"preferredHour":false
},
{
"begin":"2021-09-24T14:00:00Z",
"end":"2021-09-25T14:00:00Z",
"preferredHour":false
},
{
"begin":"2021-09-25T14:00:00Z",
"end":"2021-09-26T14:00:00Z",
"preferredHour":false
},
{
"begin":"2021-09-26T14:00:00Z",
"end":"2021-09-27T14:00:00Z",
"preferredHour":false
},
{
"begin":"2021-09-27T14:00:00Z",
"end":"2021-09-28T14:00:00Z",
"preferredHour":false
},
{
"begin":"2021-09-28T14:00:00Z",
"end":"2021-09-29T14:00:00Z",
"preferredHour":false
},
{
"begin":"2021-09-29T14:00:00Z",
"end":"2021-09-30T14:00:00Z",
"preferredHour":false
},
{
"begin":"2021-09-30T14:00:00Z",
"end":"2021-10-01T14:00:00Z",
"preferredHour":false
},
{
"begin":"2021-10-01T14:00:00Z",
"end":"2021-10-02T14:00:00Z",
"preferredHour":false
},
{
"begin":"2021-10-02T14:00:00Z",
"end":"2021-10-03T14:00:00Z",
"preferredHour":false
},
{
"begin":"2021-10-03T13:00:00Z",
"end":"2021-10-04T13:00:00Z",
"preferredHour":false
},
{
"begin":"2021-10-04T13:00:00Z",
"end":"2021-10-05T04:00:00Z",
"preferredHour":false
}
]
}
],
"resources": [
{"geoLocation": {
"latitude":39.94635391,
"longitude":-83.07978821
},
"maxDistance":"381.0 km",
"travelUnitCost":0.0,
"hourlyCost":0.0,
"fixedCost":0.0,
"avgTravelSpeed":"50.0 km/h",
"overTimeTolerance":"PT30M",
"efficiencyFactor":0.0,
"resourceId":"496e332c-6747-44f1-b9cc-7ac849cd22cc",
"workingHours": [
{"begin":"2021-09-20T13:00:00Z",
"end":"2021-09-20T21:00:00Z"
},
{
"begin":"2021-09-21T13:00:00Z",
"end":"2021-09-21T21:00:00Z"
},
{
"begin":"2021-09-22T13:00:00Z",
"end":"2021-09-22T21:00:00Z"
},
{
"begin":"2021-09-23T13:00:00Z",
"end":"2021-09-23T21:00:00Z"
},
{
"begin":"2021-09-24T13:00:00Z",
"end":"2021-09-24T21:00:00Z"
},
{
"begin":"2021-09-27T13:00:00Z",
"end":"2021-09-27T21:00:00Z"
},
{
"begin":"2021-09-28T13:00:00Z",
"end":"2021-09-28T21:00:00Z"
},
{
"begin":"2021-09-29T13:00:00Z",
"end":"2021-09-29T21:00:00Z"
},
{
"begin":"2021-09-30T13:00:00Z",
"end":"2021-09-30T21:00:00Z"
},
{
"begin":"2021-10-01T13:00:00Z",
"end":"2021-10-01T21:00:00Z"
},
{
"begin":"2021-10-04T13:00:00Z",
"end":"2021-10-04T21:00:00Z"
}
]
},
{
"geoLocation": {
"latitude":40.0393278,
"longitude":-82.99146929999999
},
"maxDistance":"381.0 km",
"travelUnitCost":0.0,
"hourlyCost":0.0,
"fixedCost":0.0,
"avgTravelSpeed":"50.0 km/h",
"overTimeTolerance":"PT30M",
"efficiencyFactor":0.0,
"resourceId":"b9868291-9daf-4e4c-94de-dd451d20e329",
"workingHours": [
{"begin":"2021-09-20T13:00:00Z",
"end":"2021-09-20T21:00:00Z"
},
{
"begin":"2021-09-21T13:00:00Z",
"end":"2021-09-21T21:00:00Z"
},
{
"begin":"2021-09-22T13:00:00Z",
"end":"2021-09-22T21:00:00Z"
},
{
"begin":"2021-09-23T13:00:00Z",
"end":"2021-09-23T21:00:00Z"
},
{
"begin":"2021-09-24T13:00:00Z",
"end":"2021-09-24T21:00:00Z"
},
{
"begin":"2021-09-27T13:00:00Z",
"end":"2021-09-27T21:00:00Z"
},
{
"begin":"2021-09-28T13:00:00Z",
"end":"2021-09-28T21:00:00Z"
},
{
"begin":"2021-09-29T13:00:00Z",
"end":"2021-09-29T21:00:00Z"
},
{
"begin":"2021-09-30T13:00:00Z",
"end":"2021-09-30T21:00:00Z"
},
{
"begin":"2021-10-01T13:00:00Z",
"end":"2021-10-01T21:00:00Z"
},
{
"begin":"2021-10-04T13:00:00Z",
"end":"2021-10-04T21:00:00Z"
}
]
},
{
"geoLocation": {
"latitude":39.85155515,
"longitude":-84.2784
},
"maxDistance":"381.0 km",
"travelUnitCost":0.0,
"hourlyCost":0.0,
"fixedCost":0.0,
"avgTravelSpeed":"50.0 km/h",
"overTimeTolerance":"PT30M",
"efficiencyFactor":0.0,
"resourceId":"fe698014-e5cc-4656-8a44-be9f54dffd1a",
"workingHours": [
{"begin":"2021-09-20T13:00:00Z",
"end":"2021-09-20T21:00:00Z"
},
{
"begin":"2021-09-21T13:00:00Z",
"end":"2021-09-21T21:00:00Z"
},
{
"begin":"2021-09-22T13:00:00Z",
"end":"2021-09-22T21:00:00Z"
},
{
"begin":"2021-09-23T13:00:00Z",
"end":"2021-09-23T21:00:00Z"
},
{
"begin":"2021-09-24T13:00:00Z",
"end":"2021-09-24T21:00:00Z"
},
{
"begin":"2021-09-27T13:00:00Z",
"end":"2021-09-27T21:00:00Z"
},
{
"begin":"2021-09-28T13:00:00Z",
"end":"2021-09-28T21:00:00Z"
},
{
"begin":"2021-09-29T13:00:00Z",
"end":"2021-09-29T21:00:00Z"
},
{
"begin":"2021-09-30T13:00:00Z",
"end":"2021-09-30T21:00:00Z"
},
{
"begin":"2021-10-01T13:00:00Z",
"end":"2021-10-01T21:00:00Z"
},
{
"begin":"2021-10-04T13:00:00Z",
"end":"2021-10-04T21:00:00Z"
}
]
}
],
"events": [
{"address":"3616 East Broad Street, Columbus, Ohio 43213, United States",
"geoLocation": {
"latitude":39.973755,
"longitude":-82.906452
},
"eventDuration":"PT2H30M",
"assignedResourceId":"496e332c-6747-44f1-b9cc-7ac849cd22cc",
"eventType":"CALENDAR_GEO_ITEM",
"isForcedStayNode":false,
"eventId":"1e6ed927-2317-4d5c-b854-968e72ca3137",
"accessHours": [
{"begin":"2021-09-20T14:00:00Z",
"end":"2021-09-20T16:30:00Z",
"preferredHour":false
}
]
}
],
"parameters": {
"objectiveWorkDistribution":"5",
"modeOfJob":"ProposeSlots",
"maxProposeSlot":"10",
"objectiveProfileName":"CUSTOM",
"modeOfTravel":"Driving",
"objectiveTime":"5",
"distanceProvider":"MapProvider",
"objectiveDistance":"5",
"objectiveRelation":"45",
"objectiveTimeWindow":"40"
},
"jobInstanceId":0
}
Input Description
For the input field descriptions, see the Scheduling Input JSON.
Error Codes and Messages
For the list of error codes and messages, see Error Codes and Messages.
Was this helpful?