latestOpenAPI 3.0.12026-08-192092911.2 MB

916e669fc527

Jobs

Get a list of jobs

Retrieve a paged collection of jobs (required scope jobs:read)

get/v1/jobs

Query parameters

sortBy'createdAt' | 'scheduledAt'

Represents the fields that can be used to sort jobs<p>Possible values:</p><ul><li><b>createdAt</b>: The date and time when the job was created</li><li><b>scheduledAt</b>: The date and time when the job was scheduled to start</li></ul>

Example:createdAt

The field to sort items in the page by

direction'ascending' | 'descending'

Represents the direction in which sorting should be applied<p>Possible values:</p><ul><li><b>ascending</b>: Indicates ascending sorting order</li><li><b>descending</b>: Indicates descending sorting order</li></ul>

Example:ascending

The direction to apply the sort

idinteger[]

Only return jobs where id matches the value(s) provided (Max items: 50)

typeIdinteger[]

Only return jobs where typeId matches the value(s) provided (Max items: 50)

contactIdinteger[]

Only return jobs where contactId matches the value(s) provided (Max items: 50)

orderNumberstring[]

Only return jobs where orderNumber matches the value(s) provided (Max items: 50)

pageNumberinteger

The page number being requested. (minimum: 1, maximum: 2147483)

pageSizeinteger

The page size being requested. (minimum: 1, maximum: 1000)

createdAtFromstring date-time

Only return jobs where createdAt is the same or newer than this UTC value

createdAtTostring date-time

Only return jobs where createdAt is the same or older than this UTC value

resourceIdinteger[]

Only return jobs where resourceId matches the value(s) provided (Max items: 50)

vehicleIdinteger[]

Only return jobs where vehicleId matches the value(s) provided (Max items: 50)

referencestring[]

Only return jobs where reference matches the value(s) provided (Max items: 50)

plannedAtFromstring date-time

Only return jobs where plannedStartAt is newer than this value

plannedAtTostring date-time

Only return jobs where plannedStartAt is older than this value

startAtFromstring date-time

Only return jobs where plannedStartAt or actualStartAt is newer than this value

startAtTostring date-time

Only return jobs where plannedStartAt or actualStartAt is older than this value

statusModifiedAtFromstring date-time

Only return jobs where statusModifiedAt is newer than this value

statusModifiedAtTostring date-time

Only return jobs where statusModifiedAt is older than this value

statusJobStatus[]

Only return jobs where status matches the value(s) provided (Max items: 50)

[
  "new"
]

Headers

Customer-Idinteger required

The customer identifier

Response

OK

pageNumberinteger

The page number of the response where 1 is the first page

pageSizeinteger

The number of items requested for the current page

pageItemCountinteger

The number of items returned in the current page

Example response

{
  "items": [
    {
      "id": 5514123,
      "uid": "3729C414-ED21-4849-816F-25D332265DC8",
      "typeId": 5514123,
      "typeName": "Boiler Service",
      "contactId": 5514123,
      "contactName": "Global Solutions Ltd",
      "contactAddress": "15 High Street, Lichfield, Staffordshire, WS15 3TT",
      "contactLocation": {
        "latitude": 51.31349,
        "longitude": -0.7464233
      },
      "status": "new",
      "statusModifiedAt": "2022-11-29T13:39:00.0000000+00:00",
      "plannedDuration": 90,
      "dueAt": "2022-11-29T06:00:00.0000000+00:00",
      "reference": "ABC/5514123",
      "description": "New boiler install - please remove and retain the old boiler",
      "createdAt": "2022-11-29T16:50:16.0000000+00:00",
      "orderNumber": "PAO/1312KU",
      "personId": "3729c414-ed21-4849-816f-25d332265dc8",
      "personName": "Peter Brown",
      "isConfirmed": true,
      "categoryId": 5514123,
      "categoryName": "Global Solutions Ltd",
      "resourceId": 243556,
      "resourceName": "John Smith",
      "vehicleId": 665433,
      "vehicleRegistration": "BC21 BCL",
      "plannedStartAt": "2022-11-29T12:00:00.0000000+00:00",
      "plannedEndAt": "2022-11-29T13:30:00.0000000+00:00",
      "actualStartAt": "2022-11-29T12:03:00.0000000+00:00",
      "actualEndAt": "2022-11-29T13:39:00.0000000+00:00",
      "actualDuration": 6000,
      "internalComment": "Old boiler has been moved to storage",
      "resourcesComment": "Boiler removed and stored in van",
      "contactComment": "No issues with new boiler",
      "result": "Ok",
      "jobGroupId": 123456789,
      "officeNotes": "Customer has requested a follow-up call",
      "contractId": 123456,
      "recurrenceId": 789012,
      "customFields": [
        {
          "definitionId": 5514123,
          "value": "Purple",
          "definition": {
            "caption": "Favourite colour",
            "type": "boolean",
            "listOptions": [
              "Red",
              "Blue",
              "Green",
              "Purple"
            ],
            "isRequired": true,
            "isEditable": true,
            "default": "10"
          },
          "systemListValueMetadata": {
            "label": "John Doe",
            "entityType": "resource"
          }
        }
      ],
      "siteContactIds": [
        15548440,
        9425766
      ]
    }
  ],
  "pageNumber": 2,
  "pageSize": 100,
  "pageItemCount": 55
}