Download OpenAPI specification:
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 assigned to this region |
| team_id | string Return only employees assigned to this team |
| vehicle_id | string Return only employees assigned to this vehicle |
| page | integer >= 0 Zero-based page index to return. Defaults to 0 when omitted. |
| page_size | integer >= 1 Maximum number of items to return per page. |
{- "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-31",
- "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-31",
- "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"
}
}Return a region by ID
| ID required | string |
{- "message": "string",
- "data": {
- "id": "string",
- "account_id": "string",
- "name": "string",
- "level": 0,
- "code": "string",
- "parent_region_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 |
| page | integer >= 0 Zero-based page index to return. Defaults to 0 when omitted. |
| page_size | integer >= 1 Maximum number of items to return per page. |
{- "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_distance_to_end_location_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_distance_to_end_location_meters | number The maximum distance a employee can drive from their end location. |
| 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_distance_to_end_location_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_distance_to_end_location_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_distance_to_end_location_meters | number The maximum distance a employee can drive from their end location. |
| 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_distance_to_end_location_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 |
| search | string Case-insensitive search by visit code or visit ID |
| schedule_ids | string Limit tasks to those which are scheduled in provided schedule |
| search | string Search string for employee name or code |
| page | integer >= 0 Zero-based page index to return. Defaults to 0 when omitted. |
| page_size | integer >= 1 Maximum number of items to return per page. |
{- "message": "string",
- "data": [
- {
- "id": "string",
- "account_id": "string",
- "code": "string",
- "enabled": true,
- "priority": true,
- "num_emps_req": 0,
- "region_id": "string",
- "task_type_id": "string",
- "skill_ids": [
- "string"
], - "preferred_team_ids": [
- "string"
], - "preferred_employee_ids": [
- "string"
], - "allowed_employee_ids": [
- "string"
], - "visit_count": 0,
- "schedule_ids": [
- "string"
], - "revenue_per_visit": 0,
- "sla_deadline": "string",
- "sla_last_free_day": "string",
- "sla_penalty_per_day": 0,
- "created_at": "string",
- "updated_at": "string",
- "visits": [
- {
- "id": "string",
- "visit_index": 0,
- "kind": "ITINERANT",
- "code": "string",
- "description": "string",
- "address": "string",
- "postcode": "string",
- "latitude": 0,
- "longitude": 0,
- "duration_secs": 0,
- "time_windows": [
- {
- "date": "string",
- "start_time": "string",
- "end_time": "string"
}
], - "volume": 0,
- "weight": 0,
- "passengers": 0,
- "schedule_id": "string",
- "schedule_ids": [
- "string"
], - "created_at": "string",
- "updated_at": "string"
}
]
}
]
}Add Task
Task to add
| enabled required | boolean Whether the task is enabled and available for scheduling |
| priority required | boolean Whether every visit should be treated as high priority |
| num_emps_req required | integer [ 1 .. 5 ] Number of employees required per visit |
| region_id required | string Region identifier |
| task_type_id | string Task type identifier (optional) |
| skill_ids | Array of strings Skills required across all visits |
| preferred_team_ids | Array of strings Preferred teams for servicing the visits |
| preferred_employee_ids | Array of strings Preferred employees for servicing the visits |
| allowed_employee_ids | Array of strings Allowed employees for servicing the visits (optional) |
| revenue_per_visit | integer Revenue attributed to each visit (pence / cents) |
| sla_deadline | string SLA deadline (YYYY-MM-DD) |
| sla_last_free_day | string Last free day before penalties apply (YYYY-MM-DD) |
| sla_penalty_per_day | integer Penalty applied per day beyond the last free day (pence / cents) |
required | Array of objects (TaskVisitRequest) Per-visit configuration. Each visit materialises into an individual stop. |
{- "enabled": true,
- "priority": true,
- "num_emps_req": 1,
- "region_id": "string",
- "task_type_id": "string",
- "skill_ids": [
- "string"
], - "preferred_team_ids": [
- "string"
], - "preferred_employee_ids": [
- "string"
], - "allowed_employee_ids": [
- "string"
], - "revenue_per_visit": 0,
- "sla_deadline": "string",
- "sla_last_free_day": "string",
- "sla_penalty_per_day": 0,
- "visits": [
- {
- "visit_index": 0,
- "kind": "ITINERANT",
- "code": "string",
- "description": "string",
- "address": "string",
- "postcode": "string",
- "latitude": 0,
- "longitude": 0,
- "duration_secs": 0,
- "time_windows": [
- {
- "date": "string",
- "start_time": "string",
- "end_time": "string"
}
], - "volume": 0,
- "weight": 0,
- "passengers": 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,
- "priority": true,
- "num_emps_req": 0,
- "region_id": "string",
- "task_type_id": "string",
- "skill_ids": [
- "string"
], - "preferred_team_ids": [
- "string"
], - "preferred_employee_ids": [
- "string"
], - "allowed_employee_ids": [
- "string"
], - "visit_count": 0,
- "schedule_ids": [
- "string"
], - "revenue_per_visit": 0,
- "sla_deadline": "string",
- "sla_last_free_day": "string",
- "sla_penalty_per_day": 0,
- "created_at": "string",
- "updated_at": "string",
- "visits": [
- {
- "id": "string",
- "visit_index": 0,
- "kind": "ITINERANT",
- "code": "string",
- "description": "string",
- "address": "string",
- "postcode": "string",
- "latitude": 0,
- "longitude": 0,
- "duration_secs": 0,
- "time_windows": [
- {
- "date": "string",
- "start_time": "string",
- "end_time": "string"
}
], - "volume": 0,
- "weight": 0,
- "passengers": 0,
- "schedule_id": "string",
- "schedule_ids": [
- "string"
], - "created_at": "string",
- "updated_at": "string"
}
]
}
}Update an existing Task
| ID required | string ID of the item being accessed |
Task to update
| enabled required | boolean Whether the task is enabled and available for scheduling |
| priority required | boolean Whether every visit should be treated as high priority |
| num_emps_req required | integer [ 1 .. 5 ] Number of employees required per visit |
| region_id required | string Region identifier |
| task_type_id | string Task type identifier (optional) |
| skill_ids | Array of strings Skills required across all visits |
| preferred_team_ids | Array of strings Preferred teams for servicing the visits |
| preferred_employee_ids | Array of strings Preferred employees for servicing the visits |
| allowed_employee_ids | Array of strings Allowed employees for servicing the visits (optional) |
| revenue_per_visit | integer Revenue attributed to each visit (pence / cents) |
| sla_deadline | string SLA deadline (YYYY-MM-DD) |
| sla_last_free_day | string Last free day before penalties apply (YYYY-MM-DD) |
| sla_penalty_per_day | integer Penalty applied per day beyond the last free day (pence / cents) |
required | Array of objects (TaskVisitRequest) Per-visit configuration. Each visit materialises into an individual stop. |
{- "enabled": true,
- "priority": true,
- "num_emps_req": 1,
- "region_id": "string",
- "task_type_id": "string",
- "skill_ids": [
- "string"
], - "preferred_team_ids": [
- "string"
], - "preferred_employee_ids": [
- "string"
], - "allowed_employee_ids": [
- "string"
], - "revenue_per_visit": 0,
- "sla_deadline": "string",
- "sla_last_free_day": "string",
- "sla_penalty_per_day": 0,
- "visits": [
- {
- "visit_index": 0,
- "kind": "ITINERANT",
- "code": "string",
- "description": "string",
- "address": "string",
- "postcode": "string",
- "latitude": 0,
- "longitude": 0,
- "duration_secs": 0,
- "time_windows": [
- {
- "date": "string",
- "start_time": "string",
- "end_time": "string"
}
], - "volume": 0,
- "weight": 0,
- "passengers": 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 |
| page | integer >= 0 Zero-based page index to return. Defaults to 0 when omitted. |
| page_size | integer >= 1 Maximum number of items to return per page. |
| search | string Case-insensitive search by visit code, task ID, visit ID, or employee 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_visit_code": "string",
- "task_visit_id": "string",
- "task_visit_index": 0,
- "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_visit_code": "string",
- "task_visit_id": "string",
- "task_visit_index": 0,
- "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,
- "max_passengers": 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 |
| max_passengers 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,
- "max_passengers": 0,
- "cost_per_trip": 0,
- "cost_per_kilometer": 0
}{- "message": "string",
- "data": {
- "id": "string"
}
}Return a Vehicle by ID
| ID required | string |
{- "message": "string",
- "data": {
- "id": "string",
- "account_id": "string",
- "name": "string",
- "max_weight": 0,
- "max_volume": 0,
- "max_passengers": 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 |
| max_passengers 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,
- "max_passengers": 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,
- "priority": true,
- "num_emps_req": 1,
- "region_id": "string",
- "task_type_id": "string",
- "skill_ids": [
- "string"
], - "preferred_team_ids": [
- "string"
], - "preferred_employee_ids": [
- "string"
], - "allowed_employee_ids": [
- "string"
], - "revenue_per_visit": 0,
- "sla_deadline": "string",
- "sla_last_free_day": "string",
- "sla_penalty_per_day": 0,
- "visits": [
- {
- "visit_index": 0,
- "kind": "ITINERANT",
- "code": "string",
- "description": "string",
- "address": "string",
- "postcode": "string",
- "latitude": 0,
- "longitude": 0,
- "duration_secs": 0,
- "time_windows": [
- {
- "date": "string",
- "start_time": "string",
- "end_time": "string"
}
], - "volume": 0,
- "weight": 0,
- "passengers": 0
}
]
}, - "slotOptions": [
- {
- "date": "string",
- "startDate": "string",
- "endDate": "string"
}
]
}