Download OpenAPI specification:Download
API for Satalia Field Service.
https://ondemand.satalia.com/api/v1
Return a list of employees
sort_by | string The field to sort the results by |
order_by | any Enum: "asc" "desc" Example: order_by=asc Whether to sort results in ascending or descending order |
region_id | string Return only employees attached to this region |
{- "message": "string",
- "data": [
- {
- "id": "string",
- "account_id": "string",
- "name": "string",
- "enabled": true,
- "original_id": "string",
- "code": "string",
- "region_id": "string",
- "team_id": "string",
- "start_location_lat": 0,
- "start_location_lng": 0,
- "end_location_lat": 0,
- "end_location_lng": 0,
- "start_location_hub_id": "string",
- "end_location_hub_id": "string",
- "shift_pattern_id": "string",
- "rolling_pattern_from": "string",
- "rolling_pattern_to": "string",
- "working_rules_id": "string",
- "vehicle_id": "string",
- "cost_per_hour_of_duty": 0,
- "skill_ids": [
- "string"
], - "start_address": "string",
- "start_postcode": "string",
- "end_address": "string",
- "end_postcode": "string",
- "start_time": "string",
- "end_time": "string"
}
]
}
Add employee
Employee to add
name required | string The name of the employee |
enabled required | boolean Whether the employee is enabled or disabled in the system |
original_id | string If item is copied, the original id of this employee. |
code required | string A user defined reference code for the employee |
region_id required | string The id of the region the employee belongs to |
team_id required | string The id of the team the employee belongs to |
start_location_lat required | number The latitude value of the employee start location |
start_location_lng required | number The longitude value of the employee start location |
end_location_lat required | number The latitude value of the employee end location |
end_location_lng required | number The longitude value of the employee end location |
start_location_hub_id | string The id of the start location hub if present |
end_location_hub_id | string The id of the end location hub if present |
shift_pattern_id | string The id of the shift pattern the employee uses |
rolling_pattern_from | string If the shift pattern is a rolling template, the date from when this applies for this employee |
rolling_pattern_to | string If the shift pattern is a rolling template, the last date for when this applies for this employee |
working_rules_id | string The id of the working rule the employee uses |
vehicle_id | string The id of the vehicle the employee uses |
cost_per_hour_of_duty | integer The cost per hour of using this employee. (Use Pennies/Cents). Optional |
skill_ids | Array of strings Array of skill ids |
start_address | string Employee start location address |
start_postcode | string Employee start location postcode |
end_address | string Employee end location address |
end_postcode | string Employee end location postcode |
start_time | string Employee earliest start time |
end_time | string Employee latest finish time |
{- "name": "string",
- "enabled": true,
- "original_id": "string",
- "code": "string",
- "region_id": "string",
- "team_id": "string",
- "start_location_lat": 0,
- "start_location_lng": 0,
- "end_location_lat": 0,
- "end_location_lng": 0,
- "start_location_hub_id": "string",
- "end_location_hub_id": "string",
- "shift_pattern_id": "string",
- "rolling_pattern_from": "string",
- "rolling_pattern_to": "string",
- "working_rules_id": "string",
- "vehicle_id": "string",
- "cost_per_hour_of_duty": 0,
- "skill_ids": [
- "string"
], - "start_address": "string",
- "start_postcode": "string",
- "end_address": "string",
- "end_postcode": "string",
- "start_time": "string",
- "end_time": "string"
}
{- "message": "string",
- "data": {
- "id": "string"
}
}
Return an employee by ID
ID required | string ID of the item being accessed |
{- "message": "string",
- "data": {
- "id": "string",
- "account_id": "string",
- "name": "string",
- "enabled": true,
- "original_id": "string",
- "code": "string",
- "region_id": "string",
- "team_id": "string",
- "start_location_lat": 0,
- "start_location_lng": 0,
- "end_location_lat": 0,
- "end_location_lng": 0,
- "start_location_hub_id": "string",
- "end_location_hub_id": "string",
- "shift_pattern_id": "string",
- "rolling_pattern_from": "string",
- "rolling_pattern_to": "string",
- "working_rules_id": "string",
- "vehicle_id": "string",
- "cost_per_hour_of_duty": 0,
- "skill_ids": [
- "string"
], - "start_address": "string",
- "start_postcode": "string",
- "end_address": "string",
- "end_postcode": "string",
- "start_time": "string",
- "end_time": "string"
}
}
Update an existing employee
ID required | string ID of the item being accessed |
employee to update
name required | string The name of the employee |
enabled required | boolean Whether the employee is enabled or disabled in the system |
original_id | string If item is copied, the original id of this employee. |
code required | string A user defined reference code for the employee |
region_id required | string The id of the region the employee belongs to |
team_id required | string The id of the team the employee belongs to |
start_location_lat required | number The latitude value of the employee start location |
start_location_lng required | number The longitude value of the employee start location |
end_location_lat required | number The latitude value of the employee end location |
end_location_lng required | number The longitude value of the employee end location |
start_location_hub_id | string The id of the start location hub if present |
end_location_hub_id | string The id of the end location hub if present |
shift_pattern_id | string The id of the shift pattern the employee uses |
rolling_pattern_from | string If the shift pattern is a rolling template, the date from when this applies for this employee |
rolling_pattern_to | string If the shift pattern is a rolling template, the last date for when this applies for this employee |
working_rules_id | string The id of the working rule the employee uses |
vehicle_id | string The id of the vehicle the employee uses |
cost_per_hour_of_duty | integer The cost per hour of using this employee. (Use Pennies/Cents). Optional |
skill_ids | Array of strings Array of skill ids |
start_address | string Employee start location address |
start_postcode | string Employee start location postcode |
end_address | string Employee end location address |
end_postcode | string Employee end location postcode |
start_time | string Employee earliest start time |
end_time | string Employee latest finish time |
{- "name": "string",
- "enabled": true,
- "original_id": "string",
- "code": "string",
- "region_id": "string",
- "team_id": "string",
- "start_location_lat": 0,
- "start_location_lng": 0,
- "end_location_lat": 0,
- "end_location_lng": 0,
- "start_location_hub_id": "string",
- "end_location_hub_id": "string",
- "shift_pattern_id": "string",
- "rolling_pattern_from": "string",
- "rolling_pattern_to": "string",
- "working_rules_id": "string",
- "vehicle_id": "string",
- "cost_per_hour_of_duty": 0,
- "skill_ids": [
- "string"
], - "start_address": "string",
- "start_postcode": "string",
- "end_address": "string",
- "end_postcode": "string",
- "start_time": "string",
- "end_time": "string"
}
{- "message": "string"
}
Return a list of optimisation jobs
account_id required | string |
region_id | string |
date | string |
{- "message": "string",
- "data": [
- {
- "id": "string",
- "account_id": "string",
- "duration_secs": 60,
- "region_id": "string",
- "planning_horizon_start_date": "2022-03-31T00:00:00.000Z",
- "planning_horizon_days": 1,
- "planning_horizon_unit_type": "DAYS",
- "unscheduled_task_ids": [
- "string"
], - "kpis": {
- "total_distance_meters": 0,
- "total_time_secs": 0,
- "total_unscheduled_tasks": 0,
- "total_high_priority_unscheduled_tasks": 0,
- "total_trips": 0,
- "total_unmatched_tasks": 0,
- "total_used_employees": 0,
- "total_travel_time_secs": 0
}, - "job_type": "LIVE",
- "status": "PENDING",
- "objective_hierarchy": "OBJECTIVE_A",
- "trip_timing_policy": "AS_EARLY_AS_POSSIBLE"
}
]
}
Create optimisation job
optimisation job to add
account_id required | string |
duration_secs required | number how long the optimisation job should run for. The longer it runs, the better the resulting schedule |
region_id required | string ID of an existing region |
planning_horizon_start_date required | string The first day of the planning horizon |
planning_horizon_days required | number Number of days this job optimises. Min is 1. |
planning_horizon_unit_type | any Default: "DAYS" Enum: "DAYS" "WEEKS" Whether the job should should run in day mode or week mode. Week mode will include Mon-Sun of target date. |
job_type | string Enum: "LIVE" "SIMULATED" Whether the job should be live or simulated. |
objective_hierarchy | string Enum: "OBJECTIVE_A" "OBJECTIVE_B" "OBJECTIVE_C" "OBJECTIVE_COST" "OBJECTIVE_PROFIT" "OBJECTIVE_MISSING_TRIPS" Objective hierarchy (OBJECTIVE_A is default): * |
trip_timing_policy | string Enum: "AS_EARLY_AS_POSSIBLE" "EARLY_WITHOUT_WAITING_AT_FIRST_CLIENT" "AS_LATE_AS_POSSIBLE" When to send out employees (AS_LATE_AS_POSSIBLE is default) |
{- "account_id": "string",
- "duration_secs": 0,
- "region_id": "string",
- "planning_horizon_start_date": "string",
- "planning_horizon_days": 1,
- "planning_horizon_unit_type": "DAYS",
- "job_type": "LIVE",
- "objective_hierarchy": "OBJECTIVE_A",
- "trip_timing_policy": "AS_EARLY_AS_POSSIBLE"
}
{- "message": "string",
- "data": {
- "id": "string"
}
}
Return an optimisation job by ID
ID required | string ID of the item being accessed |
{- "message": "string",
- "data": {
- "id": "string",
- "account_id": "string",
- "duration_secs": 60,
- "region_id": "string",
- "planning_horizon_start_date": "2022-03-31T00:00:00.000Z",
- "planning_horizon_days": 1,
- "planning_horizon_unit_type": "DAYS",
- "unscheduled_task_ids": [
- "string"
], - "kpis": {
- "total_distance_meters": 0,
- "total_time_secs": 0,
- "total_unscheduled_tasks": 0,
- "total_high_priority_unscheduled_tasks": 0,
- "total_trips": 0,
- "total_unmatched_tasks": 0,
- "total_used_employees": 0,
- "total_travel_time_secs": 0
}, - "job_type": "LIVE",
- "status": "PENDING",
- "objective_hierarchy": "OBJECTIVE_A",
- "trip_timing_policy": "AS_EARLY_AS_POSSIBLE"
}
}
Updates the status of a job (Can be used to cancel job)
job_id required | string Example: job_id=4faf1eac-a9e2-481f-9a8d-003fde17fc5a The UUID of the job to change the status |
The status
status | string Value: "CANCELLING" |
{- "status": "CANCELLING"
}
{- "message": "string"
}
Return a list of teams
sort_by | string The field to sort the results by |
order_by | any Enum: "asc" "desc" Example: order_by=desc Whether to sort results in ascending or descending order |
{- "message": "string",
- "data": [
- {
- "id": "string",
- "account_id": "string",
- "name": "string",
- "team_type": "INHOUSE"
}
]
}
Add team
team to add
name required | string |
team_type required | string Enum: "INHOUSE" "CONTRACTOR" Whether the team is an INHOUSE or CONTRACTOR type |
{- "name": "string",
- "team_type": "INHOUSE"
}
{- "message": "string"
}
Update an existing team
ID required | string ID of the item being accessed |
team to update
name required | string |
team_type required | string Enum: "INHOUSE" "CONTRACTOR" Whether the team is an INHOUSE or CONTRACTOR type |
{- "name": "string",
- "team_type": "INHOUSE"
}
{- "message": "string"
}
Return a list of regions
sort_by | string The field to sort the results by |
order_by | any Enum: "asc" "desc" Example: order_by=desc Whether to sort results in ascending or descending order |
{- "message": "string",
- "data": [
- {
- "id": "string",
- "account_id": "string",
- "name": "string",
- "level": 0,
- "code": "string",
- "parent_region_id": "string"
}
]
}
Add a region
The region to create
name required | string The name of the region |
level required | number The level of the region |
code required | string A user defined reference code for the region |
parent_region_id | string The Id of the parent region |
{- "name": "string",
- "level": 0,
- "code": "string",
- "parent_region_id": "string"
}
{- "message": "string",
- "data": {
- "id": "string"
}
}
Update an existing region
ID required | string ID of the item being accessed |
The region to update
name required | string The name of the region |
level required | number The level of the region |
code required | string A user defined reference code for the region |
parent_region_id | string The Id of the parent region |
{- "name": "string",
- "level": 0,
- "code": "string",
- "parent_region_id": "string"
}
{- "message": "string"
}
Return a list of skills
sort_by | string The field to sort the results by |
order_by | any Enum: "asc" "desc" Example: order_by=desc Whether to sort results in ascending or descending order |
{- "message": "string",
- "data": [
- {
- "id": "string",
- "account_id": "string",
- "name": "string",
- "code": "string",
- "description": "string"
}
]
}
Add skills
Skill to add
name required | string |
description | string |
code required | string |
{- "name": "string",
- "description": "string",
- "code": "string"
}
{- "message": "string",
- "data": {
- "id": "string"
}
}
Update an existing skill
ID required | string ID of the item being accessed |
Skill to update
name required | string |
description | string |
code required | string |
{- "name": "string",
- "description": "string",
- "code": "string"
}
{- "message": "string"
}
Return a list of shift patterns
sort_by | string The field to sort the results by |
order_by | any Enum: "asc" "desc" Example: order_by=desc Whether to sort results in ascending or descending order |
{- "message": "string",
- "data": [
- {
- "id": "string",
- "account_id": "string",
- "name": "string",
- "code": "string",
- "description": "string",
- "availability_type": "SPECIFIC",
- "template_num_weeks": 0,
- "availability": [
- {
- "id": "string",
- "template_week": 0,
- "day_of_week": 0,
- "date": "string",
- "enabled": true,
- "time_windows": [
- {
- "id": "string",
- "start_time": "string",
- "end_time": "string"
}
], - "cost_per_hour_of_duty": 0,
- "vehicle_id": "string",
- "working_rules_id": "string",
- "start_address": "string",
- "start_postcode": "string",
- "end_address": "string",
- "end_postcode": "string"
}
]
}
]
}
Add a Shift Pattern
Shift pattern to create
name required | string The name of the shift pattern |
code required | string A user defined reference code for the shift pattern |
description | string A description of the shift pattern |
availability_type required | string Enum: "SPECIFIC" "ROLLING" Whether shift pattern uses specific dates or a rolling template |
template_num_weeks | number Number of weeks in rolling template (if applicable) |
required | Array of objects Array of Availability objects |
{- "name": "string",
- "code": "string",
- "description": "string",
- "availability_type": "SPECIFIC",
- "template_num_weeks": 0,
- "availability": [
- {
- "template_week": 0,
- "day_of_week": 0,
- "date": "string",
- "enabled": true,
- "time_windows": [
- {
- "start_time": "string",
- "end_time": "string"
}
], - "cost_per_hour_of_duty": 0,
- "vehicle_id": "string",
- "working_rules_id": "string",
- "start_address": "string",
- "start_postcode": "string",
- "end_address": "string",
- "end_postcode": "string"
}
]
}
{- "message": "string",
- "data": {
- "id": "string"
}
}
Return a shift pattern by ID
ID required | string |
{- "message": "string",
- "data": {
- "id": "string",
- "account_id": "string",
- "name": "string",
- "code": "string",
- "description": "string",
- "availability_type": "SPECIFIC",
- "template_num_weeks": 0,
- "availability": [
- {
- "id": "string",
- "template_week": 0,
- "day_of_week": 0,
- "date": "string",
- "enabled": true,
- "time_windows": [
- {
- "id": "string",
- "start_time": "string",
- "end_time": "string"
}
], - "cost_per_hour_of_duty": 0,
- "vehicle_id": "string",
- "working_rules_id": "string",
- "start_address": "string",
- "start_postcode": "string",
- "end_address": "string",
- "end_postcode": "string"
}
]
}
}
Update an existing Shift Pattern
ID required | string ID of the item being accessed |
Shift pattern to update
name required | string The name of the shift pattern |
code required | string A user defined reference code for the shift pattern |
description | string A description of the shift pattern |
availability_type required | string Enum: "SPECIFIC" "ROLLING" Whether shift pattern uses specific dates or a rolling template |
template_num_weeks | number Number of weeks in rolling template (if applicable) |
required | Array of objects Array of Availability objects |
{- "name": "string",
- "code": "string",
- "description": "string",
- "availability_type": "SPECIFIC",
- "template_num_weeks": 0,
- "availability": [
- {
- "template_week": 0,
- "day_of_week": 0,
- "date": "string",
- "enabled": true,
- "time_windows": [
- {
- "start_time": "string",
- "end_time": "string"
}
], - "cost_per_hour_of_duty": 0,
- "vehicle_id": "string",
- "working_rules_id": "string",
- "start_address": "string",
- "start_postcode": "string",
- "end_address": "string",
- "end_postcode": "string"
}
]
}
{- "message": "string"
}
Add a new employee availability
ID required | string ID of the item being accessed |
Availability to create
id | string The unique id for the availability (GUID) |
template_week | number Week in rolling template if AvailabilityType != SPECIFIC |
day_of_week | number Day of week 1-7 (mon - sun) in rolling template if AvailabilityType != SPECIFIC |
date | string Date for AvailabilityType == SPECIFIC |
enabled required | boolean Whether this availability is enabled |
required | Array of objects (TimeWindow) The time windows for the pattern or date |
cost_per_hour_of_duty | integer The cost per hour of using this employee. (Use Pennies/Cents). Optional |
vehicle_id | string The id of the vehicle the employee uses |
working_rules_id | string The id of the working rule the employee uses |
start_address | string Employee start location address |
start_postcode | string Employee start location postcode |
end_address | string Employee end location address |
end_postcode | string Employee end location postcode |
{- "id": "string",
- "template_week": 0,
- "day_of_week": 0,
- "date": "string",
- "enabled": true,
- "time_windows": [
- {
- "id": "string",
- "start_time": "string",
- "end_time": "string"
}
], - "cost_per_hour_of_duty": 0,
- "vehicle_id": "string",
- "working_rules_id": "string",
- "start_address": "string",
- "start_postcode": "string",
- "end_address": "string",
- "end_postcode": "string"
}
{- "id": "string",
- "template_week": 0,
- "day_of_week": 0,
- "date": "string",
- "enabled": true,
- "time_windows": [
- {
- "id": "string",
- "start_time": "string",
- "end_time": "string"
}
], - "cost_per_hour_of_duty": 0,
- "vehicle_id": "string",
- "working_rules_id": "string",
- "start_address": "string",
- "start_postcode": "string",
- "end_address": "string",
- "end_postcode": "string"
}
Update an existing Availability of specific Shift Pattern
ID required | string ID of the item being accessed |
ID required | string ID of the item being accessed |
Availability to update
id | string The unique id for the availability (GUID) |
template_week | number Week in rolling template if AvailabilityType != SPECIFIC |
day_of_week | number Day of week 1-7 (mon - sun) in rolling template if AvailabilityType != SPECIFIC |
date | string Date for AvailabilityType == SPECIFIC |
enabled required | boolean Whether this availability is enabled |
required | Array of objects (TimeWindow) The time windows for the pattern or date |
cost_per_hour_of_duty | integer The cost per hour of using this employee. (Use Pennies/Cents). Optional |
vehicle_id | string The id of the vehicle the employee uses |
working_rules_id | string The id of the working rule the employee uses |
start_address | string Employee start location address |
start_postcode | string Employee start location postcode |
end_address | string Employee end location address |
end_postcode | string Employee end location postcode |
{- "id": "string",
- "template_week": 0,
- "day_of_week": 0,
- "date": "string",
- "enabled": true,
- "time_windows": [
- {
- "id": "string",
- "start_time": "string",
- "end_time": "string"
}
], - "cost_per_hour_of_duty": 0,
- "vehicle_id": "string",
- "working_rules_id": "string",
- "start_address": "string",
- "start_postcode": "string",
- "end_address": "string",
- "end_postcode": "string"
}
{- "message": "string"
}
Return a list of Working Rules
sort_by | string The field to sort the results by |
order_by | any Enum: "asc" "desc" Example: order_by=desc Whether to sort results in ascending or descending order |
{- "message": "string",
- "data": [
- {
- "id": "string",
- "account_id": "string",
- "name": "string",
- "code": "string",
- "description": "string",
- "break_length_secs": 0,
- "min_duty_time_secs": 0,
- "max_duty_time_secs": 0,
- "max_drive_time_secs": 0,
- "max_drive_distance_meters": 0,
- "max_tasks": 0,
- "shift_as_service_window": true,
- "max_weekly_duty_time_secs": 0
}
]
}
Add a Working Rule
Shift pattern to create
name required | string The name of the working rule |
code required | string A user defined reference code for the working rule |
description | string A description of the working rule |
break_length_secs required | number The length of breaks in seconds |
min_duty_time_secs required | number The minimum time that must completed in a shift before a break could be scheduled in seconds |
max_duty_time_secs required | number The maximum time that is allowed in a shift without a break |
max_drive_time_secs required | number The maximum time that is allowed travelling in one go without a break |
max_drive_distance_meters | number The maximum distance that the employee can travel across their shift in total |
max_tasks | number The maximum amount of tasks an employee can be assigned in one shift |
shift_as_service_window required | boolean If true, travel to the first task and after the last task will fall outside the shift availability windows |
max_weekly_duty_time_secs | number The maximum amount of time an employee can work across a week (mon - sun) |
{- "name": "string",
- "code": "string",
- "description": "string",
- "break_length_secs": 0,
- "min_duty_time_secs": 0,
- "max_duty_time_secs": 0,
- "max_drive_time_secs": 0,
- "max_drive_distance_meters": 0,
- "max_tasks": 0,
- "shift_as_service_window": true,
- "max_weekly_duty_time_secs": 0
}
{- "message": "string",
- "data": {
- "id": "string"
}
}
Return a Working Rule by ID
ID required | string |
{- "message": "string",
- "data": {
- "id": "string",
- "account_id": "string",
- "name": "string",
- "code": "string",
- "description": "string",
- "break_length_secs": 0,
- "min_duty_time_secs": 0,
- "max_duty_time_secs": 0,
- "max_drive_time_secs": 0,
- "max_drive_distance_meters": 0,
- "max_tasks": 0,
- "shift_as_service_window": true,
- "max_weekly_duty_time_secs": 0
}
}
Update an existing Shift Pattern
ID required | string ID of the item being accessed |
Working Rule to update
name required | string The name of the working rule |
code required | string A user defined reference code for the working rule |
description | string A description of the working rule |
break_length_secs required | number The length of breaks in seconds |
min_duty_time_secs required | number The minimum time that must completed in a shift before a break could be scheduled in seconds |
max_duty_time_secs required | number The maximum time that is allowed in a shift without a break |
max_drive_time_secs required | number The maximum time that is allowed travelling in one go without a break |
max_drive_distance_meters | number The maximum distance that the employee can travel across their shift in total |
max_tasks | number The maximum amount of tasks an employee can be assigned in one shift |
shift_as_service_window required | boolean If true, travel to the first task and after the last task will fall outside the shift availability windows |
max_weekly_duty_time_secs | number The maximum amount of time an employee can work across a week (mon - sun) |
{- "name": "string",
- "code": "string",
- "description": "string",
- "break_length_secs": 0,
- "min_duty_time_secs": 0,
- "max_duty_time_secs": 0,
- "max_drive_time_secs": 0,
- "max_drive_distance_meters": 0,
- "max_tasks": 0,
- "shift_as_service_window": true,
- "max_weekly_duty_time_secs": 0
}
{- "message": "string"
}
Return a list of tasks
sort_by | string The field to sort the results by |
order_by | string Whether to sort results in ascending or descending order |
region_id | string Limit results by region |
dates | string Limit tasks to those with time windows falling within provided dates |
enabled | boolean Limit tasks to those which are enabled/or not |
schedule_ids | string Limit tasks to those which are scheduled in provided schedule |
{- "message": "string",
- "data": [
- {
- "id": "string",
- "account_id": "string",
- "code": "string",
- "enabled": true,
- "address": "string",
- "postcode": "string",
- "description": "string",
- "duration_secs": 0,
- "latitude": 0,
- "longitude": 0,
- "schedule_ids": [
- "string"
], - "num_emps_req": 1,
- "priority": true,
- "num_visits": 0,
- "skill_ids": [
- "string"
], - "preferred_team_ids": [
- "string"
], - "region_id": "string",
- "task_type_id": "string",
- "preferred_employee_ids": [
- "string"
], - "allowed_employee_ids": [
- "string"
], - "time_windows": [
- {
- "date": "string",
- "start_time": "string",
- "end_time": "string"
}
], - "service_gap": 0,
- "max_emp_over_horizon": 0,
- "weight": 0,
- "volume": 0,
- "revenue_per_visit": 0,
- "sla_deadline": "string",
- "sla_last_free_day": "string",
- "sla_penalty_per_day": 0
}
]
}
Add Task
Task to add
enabled required | boolean Whether is enabled and available to be scheduled |
address | string An address for the task |
postcode | string A postcode for the task |
code | string A code or customer reference for this task |
description | string A description of the task |
duration_secs required | number How long the task will take in seconds |
latitude required | number The latitude of the task |
longitude required | number The longitude of the task |
num_emps_req required | integer [ 1 .. 5 ] Default: 1 The number of employees needed to carry out the task |
priority required | boolean Whether the task is high priority |
num_visits | number The number of times the task needs to be carried out in the scheduling horizon |
skill_ids | Array of strings Array of skill ids |
preferred_team_ids | Array of strings A list of the preferred team(s) IDs to carry out task (optional). |
region_id required | string The id of the region the task belongs to |
task_type_id | string The id of the task type the task is classified as (optional) |
preferred_employee_ids | Array of strings A list of the preferred employee(s) IDs to carry out the task (optional). Note if allowed_employee_ids provided then this id must be included within that list. |
allowed_employee_ids | Array of strings A list of employees that are allowed to carry out this task. If left empty then assumes any employee allowed. |
required | Array of objects An array of time window options for when the employee can arrive to carry out the task |
service_gap | number The gap required between each service in a the horizon if multi visit |
max_emp_over_horizon | number The maximum number of different employees allowed to service multi visits in a horizon |
weight | number The weight of the task (optional) |
volume | number The volume of the task (optional) |
revenue_per_visit | integer The revenue for a task (Use Pennies/Cents). Optional but must be > 0 if provided. |
sla_deadline | string The date of the SLA deadline (hard constraint, Optional) (YYYY-MM-DD) |
sla_last_free_day | string The date of the last free day (soft constraint, Optional but use with sla_penalty_per_day) (YYYY-MM-DD) |
sla_penalty_per_day | integer The cost for missing the last free day per day (Use Pennies/Cents). Optional but use with sla_last_free_day. |
{- "enabled": true,
- "address": "string",
- "postcode": "string",
- "code": "string",
- "description": "string",
- "duration_secs": 0,
- "latitude": 0,
- "longitude": 0,
- "num_emps_req": 1,
- "priority": true,
- "num_visits": 0,
- "skill_ids": [
- "string"
], - "preferred_team_ids": [
- "string"
], - "region_id": "string",
- "task_type_id": "string",
- "preferred_employee_ids": [
- "string"
], - "allowed_employee_ids": [
- "string"
], - "time_windows": [
- {
- "date": "string",
- "start_time": "string",
- "end_time": "string"
}
], - "service_gap": 0,
- "max_emp_over_horizon": 0,
- "weight": 0,
- "volume": 0,
- "revenue_per_visit": 0,
- "sla_deadline": "string",
- "sla_last_free_day": "string",
- "sla_penalty_per_day": 0
}
{- "message": "string",
- "data": {
- "id": "string"
}
}
Return a task by ID
ID required | string ID of the item being accessed |
{- "message": "string",
- "data": {
- "id": "string",
- "account_id": "string",
- "code": "string",
- "enabled": true,
- "address": "string",
- "postcode": "string",
- "description": "string",
- "duration_secs": 0,
- "latitude": 0,
- "longitude": 0,
- "schedule_ids": [
- "string"
], - "num_emps_req": 1,
- "priority": true,
- "num_visits": 0,
- "skill_ids": [
- "string"
], - "preferred_team_ids": [
- "string"
], - "region_id": "string",
- "task_type_id": "string",
- "preferred_employee_ids": [
- "string"
], - "allowed_employee_ids": [
- "string"
], - "time_windows": [
- {
- "date": "string",
- "start_time": "string",
- "end_time": "string"
}
], - "service_gap": 0,
- "max_emp_over_horizon": 0,
- "weight": 0,
- "volume": 0,
- "revenue_per_visit": 0,
- "sla_deadline": "string",
- "sla_last_free_day": "string",
- "sla_penalty_per_day": 0
}
}
Update an existing Task
ID required | string ID of the item being accessed |
Task to update
enabled required | boolean Whether is enabled and available to be scheduled |
address | string An address for the task |
postcode | string A postcode for the task |
code | string A code or customer reference for this task |
description | string A description of the task |
duration_secs required | number How long the task will take in seconds |
latitude required | number The latitude of the task |
longitude required | number The longitude of the task |
num_emps_req required | integer [ 1 .. 5 ] Default: 1 The number of employees needed to carry out the task |
priority required | boolean Whether the task is high priority |
num_visits | number The number of times the task needs to be carried out in the scheduling horizon |
skill_ids | Array of strings Array of skill ids |
preferred_team_ids | Array of strings A list of the preferred team(s) IDs to carry out task (optional). |
region_id required | string The id of the region the task belongs to |
task_type_id | string The id of the task type the task is classified as (optional) |
preferred_employee_ids | Array of strings A list of the preferred employee(s) IDs to carry out the task (optional). Note if allowed_employee_ids provided then this id must be included within that list. |
allowed_employee_ids | Array of strings A list of employees that are allowed to carry out this task. If left empty then assumes any employee allowed. |
required | Array of objects An array of time window options for when the employee can arrive to carry out the task |
service_gap | number The gap required between each service in a the horizon if multi visit |
max_emp_over_horizon | number The maximum number of different employees allowed to service multi visits in a horizon |
weight | number The weight of the task (optional) |
volume | number The volume of the task (optional) |
revenue_per_visit | integer The revenue for a task (Use Pennies/Cents). Optional but must be > 0 if provided. |
sla_deadline | string The date of the SLA deadline (hard constraint, Optional) (YYYY-MM-DD) |
sla_last_free_day | string The date of the last free day (soft constraint, Optional but use with sla_penalty_per_day) (YYYY-MM-DD) |
sla_penalty_per_day | integer The cost for missing the last free day per day (Use Pennies/Cents). Optional but use with sla_last_free_day. |
{- "enabled": true,
- "address": "string",
- "postcode": "string",
- "code": "string",
- "description": "string",
- "duration_secs": 0,
- "latitude": 0,
- "longitude": 0,
- "num_emps_req": 1,
- "priority": true,
- "num_visits": 0,
- "skill_ids": [
- "string"
], - "preferred_team_ids": [
- "string"
], - "region_id": "string",
- "task_type_id": "string",
- "preferred_employee_ids": [
- "string"
], - "allowed_employee_ids": [
- "string"
], - "time_windows": [
- {
- "date": "string",
- "start_time": "string",
- "end_time": "string"
}
], - "service_gap": 0,
- "max_emp_over_horizon": 0,
- "weight": 0,
- "volume": 0,
- "revenue_per_visit": 0,
- "sla_deadline": "string",
- "sla_last_free_day": "string",
- "sla_penalty_per_day": 0
}
{- "message": "string"
}
Return a list of task types
sort_by | string The field to sort the results by |
order_by | any Enum: "asc" "desc" Example: order_by=desc Whether to sort results in ascending or descending order |
{- "message": "string",
- "data": [
- {
- "id": "string",
- "name": "string",
- "description": "string",
- "account_id": "string",
- "duration_secs": 0,
- "num_employees": 0,
- "skill_ids": [
- "string"
], - "preferred_team_ids": [
- "string"
]
}
]
}
Add Task Type
The information needed to add the task type
name required | string The name of the task type |
code required | string A user defined reference code for the task type |
duration_secs required | string The default length of time for the task in seconds |
num_employees required | number The default number of employees required to carry out the task |
description | string A description of the task type |
skill_ids | Array of strings Array of skill ids (UUIDs) |
preferred_team_ids | Array of strings A list of the preferred team(s) IDs to carry out task (optional). |
{- "name": "string",
- "code": "string",
- "duration_secs": "string",
- "num_employees": 0,
- "description": "string",
- "skill_ids": [
- "string"
], - "preferred_team_ids": [
- "string"
]
}
{- "message": "string",
- "data": {
- "id": "string"
}
}
Return a task type by ID
ID required | string The task type ID |
{- "message": "string",
- "data": {
- "id": "string",
- "name": "string",
- "description": "string",
- "account_id": "string",
- "duration_secs": 0,
- "num_employees": 0,
- "skill_ids": [
- "string"
], - "preferred_team_ids": [
- "string"
]
}
}
Update an existing Task Type
ID required | string The task type ID |
Task type to update
name required | string The name of the task type |
code required | string A user defined reference code for the task type |
duration_secs required | string The default length of time for the task in seconds |
num_employees required | number The default number of employees required to carry out the task |
description | string A description of the task type |
skill_ids | Array of strings Array of skill ids (UUIDs) |
preferred_team_ids | Array of strings A list of the preferred team(s) IDs to carry out task (optional). |
{- "name": "string",
- "code": "string",
- "duration_secs": "string",
- "num_employees": 0,
- "description": "string",
- "skill_ids": [
- "string"
], - "preferred_team_ids": [
- "string"
]
}
{- "message": "string"
}
Return a list of schedules
sort_by | string The field to sort the results by |
order_by | string Whether to sort results in ascending or descending order |
region_id | string Limit results by region |
employee_id | string Limit results by employee |
optimiser_job_id | string Limit results by job id |
schedule_type | string Enum: "LIVE" "SIMULATED" Limit results by schedule type |
dates | string Example: dates=2022-03-31;2022-04-01 A list of dates (comma delimited) to limit results by |
{- "message": "string",
- "data": [
- {
- "id": "string",
- "optimiser_job_id": "string",
- "account_id": "string",
- "employee_id": "string",
- "region_id": "string",
- "employee_name": "string",
- "schedule_date": "string",
- "shift_start_time": "string",
- "shift_end_time": "string",
- "total_duty_time_secs": 0,
- "total_travel_distance_meters": 0,
- "total_travel_time_secs": 0,
- "total_number_services": 0,
- "schedule_type": "string",
- "activities": [
- {
- "id": "string",
- "schedule_id": "string",
- "task_id": "string",
- "task_code": "string",
- "duration_secs": 0,
- "high_priority": true,
- "latitude": 0,
- "longitude": 0,
- "scheduled_start": "string",
- "scheduled_end": "string",
- "activity_type": "string",
- "activity_status": "string"
}
]
}
]
}
Return a schedule by ID
ID required | string ID of the item being accessed |
{- "message": "string",
- "data": {
- "id": "string",
- "optimiser_job_id": "string",
- "account_id": "string",
- "employee_id": "string",
- "region_id": "string",
- "employee_name": "string",
- "schedule_date": "string",
- "shift_start_time": "string",
- "shift_end_time": "string",
- "total_duty_time_secs": 0,
- "total_travel_distance_meters": 0,
- "total_travel_time_secs": 0,
- "total_number_services": 0,
- "schedule_type": "string",
- "activities": [
- {
- "id": "string",
- "schedule_id": "string",
- "task_id": "string",
- "task_code": "string",
- "duration_secs": 0,
- "high_priority": true,
- "latitude": 0,
- "longitude": 0,
- "scheduled_start": "string",
- "scheduled_end": "string",
- "activity_type": "string",
- "activity_status": "string"
}
]
}
}
Return a list of Vehicles
sort_by | string The field to sort the results by |
order_by | any Enum: "asc" "desc" Example: order_by=desc Whether to sort results in ascending or descending order |
{- "message": "string",
- "data": [
- {
- "id": "string",
- "account_id": "string",
- "name": "string",
- "max_weight": 0,
- "max_volume": 0,
- "cost_per_trip": 0,
- "cost_per_kilometer": 0
}
]
}
Add a Vehicle
Vehicle to create
name required | string |
max_weight required | number |
max_volume required | number |
cost_per_trip | integer The fixed cost for utilising a vehicle in a shift. |
cost_per_kilometer | integer Cost per kilometer for using the vehicle. |
{- "name": "string",
- "max_weight": 0,
- "max_volume": 0,
- "cost_per_trip": 0,
- "cost_per_kilometer": 0
}
{- "message": "string",
- "data": {
- "id": "string"
}
}
{- "message": "string",
- "data": {
- "id": "string",
- "account_id": "string",
- "name": "string",
- "max_weight": 0,
- "max_volume": 0,
- "cost_per_trip": 0,
- "cost_per_kilometer": 0
}
}
Update an existing Vehicle
ID required | string ID of the item being accessed |
Vehicle to update
name required | string |
max_weight required | number |
max_volume required | number |
cost_per_trip | integer The fixed cost for utilising a vehicle in a shift. |
cost_per_kilometer | integer Cost per kilometer for using the vehicle. |
{- "name": "string",
- "max_weight": 0,
- "max_volume": 0,
- "cost_per_trip": 0,
- "cost_per_kilometer": 0
}
{- "message": "string"
}
The data to get slot availability
date required | string The date to retrieve slots for. Must be inside planning horizon. |
required | object (WriteTask) |
required | Array of objects Set of slots to check for. |
{- "date": "string",
- "task": {
- "enabled": true,
- "address": "string",
- "postcode": "string",
- "code": "string",
- "description": "string",
- "duration_secs": 0,
- "latitude": 0,
- "longitude": 0,
- "num_emps_req": 1,
- "priority": true,
- "num_visits": 0,
- "skill_ids": [
- "string"
], - "preferred_team_ids": [
- "string"
], - "region_id": "string",
- "task_type_id": "string",
- "preferred_employee_ids": [
- "string"
], - "allowed_employee_ids": [
- "string"
], - "time_windows": [
- {
- "date": "string",
- "start_time": "string",
- "end_time": "string"
}
], - "service_gap": 0,
- "max_emp_over_horizon": 0,
- "weight": 0,
- "volume": 0,
- "revenue_per_visit": 0,
- "sla_deadline": "string",
- "sla_last_free_day": "string",
- "sla_penalty_per_day": 0
}, - "slotOptions": [
- {
- "date": "string",
- "startDate": "string",
- "endDate": "string"
}
]
}