Skedulo Schedule API
The Schedule API from Skedulo — 14 operation(s) for schedule.
The Schedule API from Skedulo — 14 operation(s) for schedule.
openapi: 3.0.0
info:
title: Authentication Admin Schedule API
description: Skedulo Authentication API
version: 1.0.0
servers:
- url: https://api.skedulo.com/auth
- url: https://api.uk.skedulo.com/auth
- url: https://api.ca.skedulo.com/auth
- url: https://api.au.skedulo.com/auth
tags:
- name: Schedule
paths:
/schedule:
post:
summary: Start an one-off optimization run
description: This will begin a new one-off optimization run that will start as soon as possible for the requested input.
operationId: Schedule Run
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ScheduleRequestShape'
example:
label: label-1
persistenceStrategy: optimize
optimizationType: pvrp
plan:
regionId: region-1
resourceIds:
- 6fecdd33-378a-40dc-9348-e3e8265b5d06
- a4c55101-c50d-4515-b999-244f26acc5d8
jobIds:
- dfde31dd-1dc8-4c8c-87fa-c7fff6e8c81b
- ca950065-f414-4440-bc91-77c74798ef27
scheduleWindow:
start: '2022-09-01T00:00:01Z'
end: '2022-09-03T23:59:59Z'
timezone: UTC
schedulingOptions:
full: false
ignoreTravelTime: false
ignoreTravelTimeFirstJob: false
ignoreTravelTimeLastJob: false
minimizeResources: false
respectAllocationTimes: false
respectAllocationTimesOverTimeConstraints: false
balanceAbsoluteWorkload: false
enablePartiallyAllocatedGroups: true
enablePartiallyAllocatedAllocationDependencies: true
removeLockedJobsFromShifts: true
respectSchedule: false
transformers: []
ignoreResourceOverrideLocations: false
config: {}
required: true
responses:
'201':
description: ''
content:
application/json:
schema:
required:
- result
type: object
properties:
result:
$ref: '#/components/schemas/ScheduleResult'
'400':
description: 'Invalid value for: body'
content:
text/plain:
schema:
type: string
security:
- httpAuth: []
tags:
- Schedule
/schedule/run:
get:
summary: Get a list of schedule runs
description: Returns a paginated list of schedule runs for the authenticated tenant. Schedule runs are product-level optimization runs initiated via the schedule endpoint.
operationId: Get Schedule Runs
responses:
'200':
description: ''
content:
application/json:
schema:
required:
- result
- paging
type: object
properties:
result:
type: array
items:
$ref: '#/components/schemas/APIProductRunDetailsShape'
paging:
$ref: '#/components/schemas/Paging'
example:
paging:
limit: 10
total: 2
result:
- autoSaved: false
savedByUserId: user-1
savedByDate: '2022-02-15T19:03:00Z'
saveState: saved
start: '2022-08-18T19:00:00Z'
operation: optimize
optimizationType: pvrp
status: complete
scheduleId: a15c285f-2c69-4a3c-9b9b-c9a8c5252db6
createdByUserId: user-1
label: label-1
completedAt: '2022-02-15T19:02:00Z'
summary:
totalPlannedJobs: 3
totalScheduledJobs: 3
requestedJobs: 2
requestedJobsScheduled: 2
window:
start: '2022-07-05T09:00:00Z'
end: '2022-08-05T23:59:59Z'
id: 20ecb249-8331-491f-9049-565a2252df76
- autoSaved: false
saveState: error
errors:
- message: error-1
start: '2022-08-18T19:00:00Z'
operation: optimize
optimizationType: pvrp
status: failed
scheduleId: a15c285f-2c69-4a3c-9b9b-c9a8c5252db6
createdByUserId: user-1
label: label-1
completedAt: '2022-02-15T19:02:00Z'
summary:
totalPlannedJobs: 3
totalScheduledJobs: 3
requestedJobs: 2
requestedJobsScheduled: 2
window:
start: '2022-07-05T09:00:00Z'
end: '2022-08-05T23:59:59Z'
id: 20ecb249-8331-491f-9049-565a2252df76
security:
- httpAuth: []
tags:
- Schedule
/schedule/run/{runId}:
get:
summary: Get a schedule run by id
description: Returns the details of a single schedule run identified by its run ID, including its current status, configuration, and timing information.
operationId: Get Schedule Run By Id
parameters:
- name: runId
in: path
required: true
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
required:
- result
type: object
properties:
result:
$ref: '#/components/schemas/APIProductRunDetailsShape'
examples:
Example0:
value:
result:
autoSaved: false
savedByUserId: user-1
savedByDate: '2022-02-15T19:03:00Z'
saveState: saved
start: '2022-08-18T19:00:00Z'
operation: optimize
optimizationType: pvrp
status: complete
scheduleId: a15c285f-2c69-4a3c-9b9b-c9a8c5252db6
createdByUserId: user-1
label: label-1
completedAt: '2022-02-15T19:02:00Z'
summary:
totalPlannedJobs: 3
totalScheduledJobs: 3
requestedJobs: 2
requestedJobsScheduled: 2
window:
start: '2022-07-05T09:00:00Z'
end: '2022-08-05T23:59:59Z'
id: 20ecb249-8331-491f-9049-565a2252df76
Example1:
value:
result:
autoSaved: false
saveState: error
errors:
- message: error-1
start: '2022-08-18T19:00:00Z'
operation: optimize
optimizationType: pvrp
status: failed
scheduleId: a15c285f-2c69-4a3c-9b9b-c9a8c5252db6
createdByUserId: user-1
label: label-1
completedAt: '2022-02-15T19:02:00Z'
summary:
totalPlannedJobs: 3
totalScheduledJobs: 3
requestedJobs: 2
requestedJobsScheduled: 2
window:
start: '2022-07-05T09:00:00Z'
end: '2022-08-05T23:59:59Z'
id: 20ecb249-8331-491f-9049-565a2252df76
security:
- httpAuth: []
tags:
- Schedule
/schedule/run/{runId}/routes:
get:
summary: Get the routes for a schedule run
description: Returns the planned travel routes for all resources in a completed schedule run, including the ordered sequence of locations visited, travel times and distances between stops, and per-day breakdowns.
operationId: Get Schedule Run Routes
parameters:
- name: runId
in: path
required: true
schema:
type: string
- name: userResult
in: query
description: if `true`, response is wrapped into `result` field. Default `false`
required: false
schema:
type: boolean
responses:
'200':
description: ''
content:
application/json:
schema:
required:
- result
type: object
properties:
result:
$ref: '#/components/schemas/RoutesShape'
example:
result:
type: pvrp
resources:
- UID: 2e46e9f9-e8f2-49c9-9699-9ef013a5f692
GeoLatitude: 51.509763
GeoLongitude: -0.118102
HomeAddress: London, Some Street 1
ResourceTags: []
Locations:
- type: home
arrivalTime: '2022-01-05T11:00:00Z'
departureTime: '2022-01-05T11:30:00Z'
travelTimeToNext: 40
distanceToNext: 3000
lat: 51.509865
lng: -0.118092
Days: []
TravelTime: 10
ScheduledTime: 15
TravelDistance: 3000
totalPlannedJobs: 3
totalScheduledJobs: 3
totalTravelTime: 10
totalScheduledTime: 15
totalTravelDistance: 3000
scheduleId: f1f559bd-1e62-4743-aea9-48c76f045d1a
label: Label1
runDate: '2022-01-05T10:00:00Z'
start: '2022-01-05T10:00:00Z'
end: '2022-01-05T23:00:00Z'
windowStart: '2022-01-05T10:00:00Z'
windowEnd: '2022-01-05T23:00:00Z'
timeZone: UTC
'400':
description: 'Invalid value for: query parameter userResult'
content:
text/plain:
schema:
type: string
security:
- httpAuth: []
tags:
- Schedule
/schedule/run/{runId}/results:
get:
summary: Get results of a schedule run
description: Returns the optimization results for a completed schedule run, including which jobs were scheduled (with their assigned resources and start times), which jobs could not be scheduled and the reasons why, any excluded jobs, and aggregate totals for the run.
operationId: Get Schedule Run Results
parameters:
- name: runId
in: path
required: true
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
required:
- result
type: object
properties:
result:
$ref: '#/components/schemas/ResultsShape'
example:
result:
optimizationType: pvrp
scheduled:
job-1:
resourceRequirements:
rr-1:
resourceIds:
- res-1
- res-2
requiredAllocationCount: 3
rr-2:
resourceIds:
- res-3
- res-4
requiredAllocationCount: 2
start: '2022-01-26T23:00:00Z'
resourceIds:
- res-1
- res-2
excluded: false
requiredAllocationCount: 2
reasons: []
unscheduled:
job-1:
missingAllocationCount: 2
reasons:
- exclusionReason: notInRequestedJobs
type: job_excluded
- resourceId: res-3
type: resource_exhausted_availability
excluded:
job-1:
- notInRequestedJobs
activities:
act-1:
- res-1
totals:
scoped:
planned: 2
scheduled: 3
requested:
planned: 3
scheduled: 3
security:
- httpAuth: []
tags:
- Schedule
/schedule/run/{runId}/params:
get:
summary: Get parameters for a schedule run
description: Returns the input parameters used to configure a schedule run, including the set of jobs and resources, the schedule window, timezone, and any recipe or scheduling goal overrides.
operationId: Get Schedule Run Params
parameters:
- name: runId
in: path
required: true
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
required:
- result
type: object
properties:
result:
$ref: '#/components/schemas/CorePVRPRunParamsShape'
examples:
Example0:
value:
result:
resourceIds:
- f67950ad-5dce-478d-bb22-565e0b072f65
- 06988f48-aeb3-422a-bb0c-1d925dd2f47e
jobIds:
- e223ee46-ff38-4bcf-b93d-9dff6aa35f67
- 6dba1ab7-0dfa-4ce3-a510-bcdbabd806e9
regionId: 015d3e00-7564-4f18-8226-da1d2b136612
scheduleBounds:
from: '2022-07-05T09:00:00Z'
to: '2022-08-06T00:00:00Z'
scheduleWindow:
from: '2022-07-05T09:00:00Z'
to: '2022-08-06T00:00:00Z'
timezone: UTC
options:
respectSchedule: false
recipeId: 62cb6c6c-c210-4aa5-92a6-9dccfc327b59
full: false
ignoreTravelTime: false
ignoreTravelTimeFirstJob: false
ignoreTravelTimeLastJob: false
minimizeResources: false
respectAllocationTimes: false
respectAllocationTimesOverTimeConstraints: false
balanceAbsoluteWorkload: false
objectiveWeights:
balanceAbsoluteWorkload: 10
enablePartiallyAllocatedGroups: true
enablePartiallyAllocatedAllocationDependencies: true
removeLockedJobsFromShifts: true
Example1:
value:
result:
resourceIds:
- f67950ad-5dce-478d-bb22-565e0b072f65
- 06988f48-aeb3-422a-bb0c-1d925dd2f47e
jobIds:
- e223ee46-ff38-4bcf-b93d-9dff6aa35f67
- 6dba1ab7-0dfa-4ce3-a510-bcdbabd806e9
regionId: 015d3e00-7564-4f18-8226-da1d2b136612
scheduleBounds:
from: '2022-07-05T09:00:00Z'
to: '2022-08-06T00:00:00Z'
scheduleWindow:
from: '2022-07-05T09:00:00Z'
to: '2022-08-06T00:00:00Z'
timezone: UTC
options:
respectSchedule: false
full: false
ignoreTravelTime: false
ignoreTravelTimeFirstJob: false
ignoreTravelTimeLastJob: false
minimizeResources: false
respectAllocationTimes: false
respectAllocationTimesOverTimeConstraints: false
balanceAbsoluteWorkload: false
enablePartiallyAllocatedGroups: true
enablePartiallyAllocatedAllocationDependencies: true
removeLockedJobsFromShifts: true
security:
- httpAuth: []
tags:
- Schedule
/schedule/run/{runId}/save:
get:
summary: Get the save status of a schedule run
description: Returns the current save status of a completed schedule run.
operationId: Get Schedule Run Save
parameters:
- name: runId
in: path
required: true
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
required:
- result
type: object
properties:
result:
$ref: '#/components/schemas/APISaveResultsShape'
examples:
Example0:
value:
result:
state: saved
change:
deleteAllocationsIds:
- alloc-1
- alloc-2
insertAllocations:
- resourceId: res-1
jobId: job-1
resourceRequirementId: rr-1
- resourceId: res-2
jobId: job-2
updateJobs:
- jobId: uid-1
start: '2022-01-26T23:00:00Z'
end: '2022-01-26T23:01:00Z'
runId: 3be4d28e-7c65-4581-89b0-80264a3e93e8
meta:
userId: uid-1
date: '2024-01-26T23:00:00Z'
autoApplied: true
autoSaved: true
Example1:
value:
result:
state: rejected
runId: 3be4d28e-7c65-4581-89b0-80264a3e93e8
meta:
userId: uid-1
date: '2024-01-26T23:00:00Z'
autoApplied: false
autoSaved: false
Example2:
value:
result:
message: Some error
state: error
runId: 3be4d28e-7c65-4581-89b0-80264a3e93e8
meta:
userId: uid-1
date: '2024-01-26T23:00:00Z'
autoApplied: false
autoSaved: false
security:
- httpAuth: []
tags:
- Schedule
post:
summary: Save a completed schedule run
description: Persist the results of a completed optimization run, applying the scheduled allocations to the system. Once saved the run results are committed and cannot be rolled back through this API.
operationId: Schedule Run Save
parameters:
- name: runId
in: path
required: true
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
required:
- result
type: object
properties:
result:
$ref: '#/components/schemas/APISaveResultsShape'
examples:
Saved:
value:
result:
state: saved
change:
deleteAllocationsIds:
- alloc-1
- alloc-2
insertAllocations:
- resourceId: res-1
jobId: job-1
resourceRequirementId: rr-1
- resourceId: res-2
jobId: job-2
updateJobs:
- jobId: uid-1
start: '2022-01-26T23:00:00Z'
end: '2022-01-26T23:01:00Z'
runId: 3be4d28e-7c65-4581-89b0-80264a3e93e8
meta:
userId: uid-1
date: '2024-01-26T23:00:00Z'
autoApplied: true
autoSaved: true
Rejected:
value:
result:
state: rejected
runId: 3be4d28e-7c65-4581-89b0-80264a3e93e8
meta:
userId: uid-1
date: '2024-01-26T23:00:00Z'
autoApplied: false
autoSaved: false
Error:
value:
result:
message: Some error
state: error
runId: 3be4d28e-7c65-4581-89b0-80264a3e93e8
meta:
userId: uid-1
date: '2024-01-26T23:00:00Z'
autoApplied: false
autoSaved: false
security:
- httpAuth: []
tags:
- Schedule
/schedule/run/{runId}/save/reject:
post:
summary: Reject a schedule run save
description: Reject the pending save for a completed optimization run, discarding the scheduled allocations without applying them to the system.
operationId: Reject Schedule Run Save
parameters:
- name: runId
in: path
required: true
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
required:
- result
type: object
properties:
result:
$ref: '#/components/schemas/APISaveResultsShape'
examples:
Example0:
value:
result:
state: saved
change:
deleteAllocationsIds:
- alloc-1
- alloc-2
insertAllocations:
- resourceId: res-1
jobId: job-1
resourceRequirementId: rr-1
- resourceId: res-2
jobId: job-2
updateJobs:
- jobId: uid-1
start: '2022-01-26T23:00:00Z'
end: '2022-01-26T23:01:00Z'
runId: 3be4d28e-7c65-4581-89b0-80264a3e93e8
meta:
userId: uid-1
date: '2024-01-26T23:00:00Z'
autoApplied: true
autoSaved: true
Example1:
value:
result:
state: rejected
runId: 3be4d28e-7c65-4581-89b0-80264a3e93e8
meta:
userId: uid-1
date: '2024-01-26T23:00:00Z'
autoApplied: false
autoSaved: false
Example2:
value:
result:
message: Some error
state: error
runId: 3be4d28e-7c65-4581-89b0-80264a3e93e8
meta:
userId: uid-1
date: '2024-01-26T23:00:00Z'
autoApplied: false
autoSaved: false
security:
- httpAuth: []
tags:
- Schedule
/schedule/run/{runId}/save/defer:
post:
summary: Defer auto-save for a run
description: Sets the run's persistence strategy to `Optimize`, preventing auto-save from occurring. Only valid for in-progress runs with no existing save record.
operationId: Defer Schedule Run Auto-Save
parameters:
- name: runId
in: path
required: true
schema:
type: string
responses:
'204':
description: ''
security:
- httpAuth: []
tags:
- Schedule
/schedule/run/{runId}/save/mutations:
get:
summary: Get the save mutations for a schedule run
description: Returns the set of data mutations that would be applied when saving a completed schedule run.
operationId: Get Schedule Run Save Mutations
parameters:
- name: runId
in: path
required: true
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
required:
- result
type: object
properties:
result:
$ref: '#/components/schemas/Change'
example:
result:
deleteAllocationsIds:
- alloc-1
- alloc-2
insertAllocations:
- resourceId: res-1
jobId: job-1
resourceRequirementId: rr-1
- resourceId: res-2
jobId: job-2
updateJobs:
- jobId: uid-1
start: '2022-01-26T23:00:00Z'
end: '2022-01-26T23:01:00Z'
security:
- httpAuth: []
tags:
- Schedule
/schedule/plan:
post:
summary: Get the full schedule plan
description: This endpoint will return all the data necessary to run optimization. This includes any extra jobs or resources that need to be considered to avoid schedule clashes for the requested resources. The optimization run will not be started until the body of this request is POSTed to the /solve/planned endpoint.
operationId: Schedule Run Plan
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Plan'
example:
regionId: region-1
resourceIds:
- 6fecdd33-378a-40dc-9348-e3e8265b5d06
- a4c55101-c50d-4515-b999-244f26acc5d8
jobIds:
- dfde31dd-1dc8-4c8c-87fa-c7fff6e8c81b
- ca950065-f414-4440-bc91-77c74798ef27
scheduleWindow:
start: '2022-09-01T00:00:01Z'
end: '2022-09-03T23:59:59Z'
timezone: UTC
schedulingOptions:
full: false
ignoreTravelTime: false
ignoreTravelTimeFirstJob: false
ignoreTravelTimeLastJob: false
minimizeResources: false
respectAllocationTimes: false
respectAllocationTimesOverTimeConstraints: false
balanceAbsoluteWorkload: false
enablePartiallyAllocatedGroups: true
enablePartiallyAllocatedAllocationDependencies: true
removeLockedJobsFromShifts: true
respectSchedule: false
transformers: []
ignoreResourceOverrideLocations: false
required: true
responses:
'201':
description: ''
content:
application/json:
schema:
required:
- result
type: object
properties:
result:
$ref: '#/components/schemas/SchedulePlanShape'
example:
result:
productData:
jobs:
- UID: job-1
Start: '2022-01-26T09:00:00Z'
Duration: 60
JobStatus: Ready
LocationId: loc-1
GeoLatitude: 53.4834
GeoLongitude: -2.2425
Quantity: 1
JobAllocations: []
JobTags: []
ResourceRequirements: []
JobTimeConstraints: []
JobDependenciesFrom: []
JobDependenciesTo: []
Locked: false
RegionId: region-1
Urgency: Normal
activities:
- UID: activity-1
Start: '2022-01-26T09:00:00Z'
End: '2022-01-26T10:00:00Z'
LocationId: loc-1
GeoLatitude: 53.4834
GeoLongitude: -2.2425
ResourceId: resource1
ActivityResources: []
resources:
- UID: resource1
GeoLatitude: 1
GeoLongitude: 1
ResourceTags: []
HomeAddress: test home address
WorkingHoursTimePeriod: Week
WorkingHoursStart: '2022-01-26'
WorkingHoursMin: 20
WorkingHoursMax: 40
ResourceOverrides: []
PrimaryRegion:
Timezone: UTC
locationResourceScores:
- LocationId: loc-1
ResourceId: resource1
Blacklisted: false
accountResourceScores:
- AccountId: account-1
ResourceId: resource1
Blacklisted: false
availability:
2bd0af54-377e-4960-8d4b-ba5272070830:
available:
- start: '2022-01-26T23:00:00Z'
end: '2022-01-29T23:00:00Z'
regions:
- start: '2022-01-26T23:00:00Z'
end: '2022-01-29T23:00:00Z'
regionIds:
- region-1
start: '2022-01-26T09:00:00Z'
end: '2022-01-30T23:00:00Z'
timeZone: UTC
region:
UID: region-1
Timezone: UTC
GeoLatitude: 53.4834
GeoLongitude: -2.2425
featureModel:
allocations:
- id: alloc-1
groupId: alloc-group-1
groupIds:
- alloc-group-1
start: '2022-01-26T09:00:00Z'
duration: 30
resourceId: res-1
locationId: loc-1
priority: 10
locked: true
attributeRequirements:
- id: attr-1
- id: attr-2
weighting: 10
resourceConstraints:
type: blocked
resources:
- res-2
scheduleConstraints:
- windowStart: '2022-01-26T10:00:00Z'
# --- truncated at 32 KB (125 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/skedulo/refs/heads/main/openapi/skedulo-schedule-api-openapi.yml