Jobs

Get scheduling assistant suggestions

Changed on

Suggests candidate resources or vehicles and time slots for scheduling a job. Returns suggestions only - use PUT /v1/jobs/{jobId}/schedule to act on one (required scope jobs:read)

get/v1/jobs/schedulingAssistant

Request

  • Base URL
    https://api.bigchange.com
  • URL
    https://api.bigchange.com/v1/jobs/schedulingAssistant
  • Auth
    HTTP bearer

Query parameters

schedulingType'resources' | 'vehicles'

The type of entity to find scheduling suggestions for<p>Possible values:</p><ul><li><b>resources</b>: Suggest resources</li><li><b>vehicles</b>: Suggest vehicles</li></ul>

Example:resources

Whether to find candidate resources or vehicles

latitudenumber double
Example:51.5074

The latitude of the location to schedule the job at. Required unless jobId is supplied, in which case the job's own location is used

longitudenumber double
Example:-0.1278

The longitude of the location to schedule the job at. Required unless jobId is supplied, in which case the job's own location is used

fromDatestring date-time
Example:2022-11-29T00:00:00.0000000+00:00

The UTC start of the date range to search for available slots in

toDatestring date-time
Example:2022-12-01T00:00:00.0000000+00:00

The UTC end of the date range to search for available slots in. The range is capped at 7 days from fromDate

when'anytime' | 'morning' | 'afternoon' | 'custom'

The time-of-day period to restrict scheduling suggestions to<p>Possible values:</p><ul><li><b>anytime</b>: Any time of day</li><li><b>morning</b>: The morning period</li><li><b>afternoon</b>: The afternoon period</li><li><b>custom</b>: A custom period, defined by whenFrom and whenTo</li></ul>

Example:anytime

The time-of-day period to restrict suggestions to

whenFromstring date-span
Example:09:00

The start of the custom time-of-day period. Required when when is Custom

whenTostring date-span
Example:17:00

The end of the custom time-of-day period. Required when when is Custom

jobIdinteger
Example:5514123

The unique identifier of the job to schedule. When supplied, the job's own location, duration and restrictions are used instead of the raw parameters

resourceIdinteger
Example:243556

Restrict suggestions to a single resource

resourceGroupIdinteger
Example:112233

Restrict suggestions to a single resource group

vehicleIdinteger
Example:665433

Restrict suggestions to a single vehicle

vehicleGroupIdinteger
Example:445566

Restrict suggestions to a single vehicle group

skillIdsinteger[]

Restrict suggestions to resources with all of the given skills (Max items: 50)

attributeIdsinteger[]

Restrict suggestions to vehicles with all of the given attributes (Max items: 50)

Headers

Customer-Idinteger required

The customer identifier

Response

OK

Example response

{
  "items": [
    {
      "resourceId": 243556,
      "vehicleId": 665433,
      "resourceReference": "ENG-04",
      "resourceName": "John Smith",
      "resourceGroupName": "Plumbers",
      "skills": [
        "Gas Safe",
        "Electrical"
      ],
      "startAt": "2022-11-29T12:00:00.0000000+00:00",
      "extraDistanceKm": 4.2,
      "extraDrivingMinutes": 12,
      "jobCost": 45.5,
      "averageDurationMinutes": 75,
      "successRatePercent": 92.5,
      "punctualityPercent": 88
    }
  ]
}

Changes