latestOpenAPI 3.0.12026-08-192092911.2 MB

916e669fc527

Resources

Get a list of resources

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

get/v1/resources

Query parameters

sortBy'name' | 'createdAt'

Represents the sort options for resources<p>Possible values:</p><ul><li><b>name</b>: Sort by name</li><li><b>createdAt</b>: Sort by created at date</li></ul>

Example:name

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

namestring

Only return resources where name matches or starts with the value provided

referencestring[]

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

idinteger[]

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

groupIdinteger[]

Only return resources where groupId 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)

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,
      "createdAt": "2022-11-29T16:50:16.0000000+00:00",
      "reference": "XYZ12345",
      "name": "David Smith",
      "groupId": 441122,
      "groupName": "Plumbers",
      "mobile": "+447812 123112",
      "timeZoneId": "GMT Standard Time",
      "maxTravelDistance": 5,
      "fuelCard": "01234567891234",
      "businessKey": "1231231",
      "privateKey": "414221",
      "tachoCard": "DRI0RDW0000000100",
      "isTracked": true,
      "workingHours": [
        {
          "dayOfWeek": "sunday",
          "start": "09:00",
          "stop": "17:00",
          "startAtContactId": 1241551,
          "startAtLocation": {
            "latitude": 51.31349,
            "longitude": -0.7464233
          }
        }
      ],
      "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"
          }
        }
      ]
    }
  ],
  "pageNumber": 2,
  "pageSize": 100,
  "pageItemCount": 55
}