POST requests

Interacting with Verilocation's POST endpoints

Pre-requisites

  • Pre-requisites: Authenticated and received an authentication Bearer token to submit with requests

Verilocation POST Requests

VeriLocation has multiple POST endpoints that allow for data models to be created or updated via the v1API including

When sending a POST request with data to the Verilocation system all data should be sent within the request body (with the exception of one ExternalReference endpoint.

Create Vs Update

In some cases the same endpoint is available to both Create and Update a data model.

If a model requires updating, the model can be retrieved, have the required fields updated and sent as a POST request along with the model 'Id' which is received.

If a model represents a new Object e.g. a New Geofence, then the model should not include an Id. This is assigned by the System and the field should be left off the model entirely

POST endpoints

Driver

The POST Drivers endpoint allows for new Driver models to be loaded into the system

post
Body
idinteger · int32 | nullableOptional
namestring | nullableOptional
mobilestring | nullableOptional
statusinteger · enumOptionalPossible values:
usernamestring | nullableOptional
passwordstring | nullableOptional
emailstring | nullableOptional
buttonIdstring | nullableOptional
Responses
200
Success
Responseinteger · int32
post
POST /public/v1/drivers HTTP/1.1
Host: 
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 118

{
  "id": 1,
  "name": "text",
  "mobile": "text",
  "status": 0,
  "username": "text",
  "password": "text",
  "email": "text",
  "buttonId": "text"
}
200

Success

1

Body Fields

{
    "id": 0, // SHOULD ONLY BE INCLUDED ON UPDATE OF EXISTING DRIVER
    "name": "string",         // Required * May be passed with or instead of 'buttonId' field 
    "mobile": "string",
    "status": 0,              // Required
    "username": "string",     // Required
    "password": "string",     // Required
    "email": "string",
    "buttonId": "string" * May be passed with or instead of 'name' field
}

Notes:

status field should be: 0 = Inactive 1 = Active

buttonId field represents the Drivers Tachograph card number This will be used as the Driver name if this field is populated while the name field is not. If the buttonId field is not populated the name field is required and no tacho card number will be assigned to the Driver

The return will be the newly created Driver's Id.

Driver Assignments

2 separate endpoints exist for Driver Assignment. The first creates a vehicle assignment, and the second ends an assignment.

Creating Driver -> Vehicle Assignments

The POST endpoint for creating Driver Assignments allows for a relationship between a Driver and Vehicle to be assigned.

post
Body
idinteger · int32Optional
vehicleIdinteger · int32Optional
driverIdinteger · int32Optional
startUtcstring · date-timeOptional
endUtcstring · date-timeOptional
assignmentSourceinteger · enumOptionalPossible values:
Responses
200
Success
post
POST /public/v1/drivers/assignments/start HTTP/1.1
Host: 
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 130

{
  "id": 1,
  "vehicleId": 1,
  "driverId": 1,
  "startUtc": "2025-07-28T19:36:17.265Z",
  "endUtc": "2025-07-28T19:36:17.265Z",
  "assignmentSource": 0
}
200

Success

No content

Body Fields

{
    "vehicleId": 0,                                  // Required
    "driverId": 0,                                   // Required
    "startUtc": "2023-02-28T11:07:13.394Z",          // Required
}

Notes:

The creation process will populate an endDate for the assignment of

01/01/2200 00:00:00

It is not possible to create an assignment where the startUtc and endUtc are set on creation and assignments need to be ended via the .../drivers/assignments/end route below

Ending Driver -> Vehicle Assignments

The POST endpoint for ending Driver assignments ends an association between a Driver and Vehicle

post
Body
idinteger · int32Optional
vehicleIdinteger · int32Optional
driverIdinteger · int32Optional
startUtcstring · date-timeOptional
endUtcstring · date-timeOptional
assignmentSourceinteger · enumOptionalPossible values:
Responses
200
Success
post
POST /public/v1/drivers/assignments/end HTTP/1.1
Host: 
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 130

{
  "id": 1,
  "vehicleId": 1,
  "driverId": 1,
  "startUtc": "2025-07-28T19:36:17.265Z",
  "endUtc": "2025-07-28T19:36:17.265Z",
  "assignmentSource": 0
}
200

Success

No content

Body Fields

{
    "vehicleId": 0,                                 // Required
    "driverId": 0,                                  // Required
    "endUtc": "2023-02-28T11:34:19.797Z"            // Required
}

External References

External References allow VeriLocation Data models to be attributed with an External reference representing how integrating systems identify the Vehicle / Driver / Geofence.

Endpoints exist for GETs that allow models to then be retrieved using these External References.

Please see the External Reference section for guides on how to implement, utilise and mange these resources.

Geofences

The POST endpoint for Geofences allows for a new Geofence to be created or for existing Geofences to be updated.

post
Body
addr1string | nullableOptional

Gets or sets Address Line 1

addr2string | nullableOptional

Gets or sets Address Line 2

addr3string | nullableOptional

Gets or sets Address Line 3

addr4string | nullableOptional

Gets or sets Address Line 4

descriptionstring · max: 50Required

Gets or sets Description of Geofence

descriptionExtstring | nullableOptional

Gets or sets Extended description of Geofence

emailstring | nullableOptional

Gets or sets Semi colon separated email addresses for notifications

geofenceTypeinteger · enumRequiredPossible values:
idinteger · int32 | nullableOptional

Gets or sets Id

latitudenumber · double | nullableOptional

Gets or sets Latitude of Geofence

longitudenumber · double | nullableOptional

Gets or sets Longitude of Geofence

radiusnumber · double | nullableOptional

Gets or sets Radius of Geofence, if needed

tagsinteger · int32[] | nullableOptional
Responses
200
Success
post
POST /public/v1/geofences HTTP/1.1
Host: 
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 209

{
  "addr1": "text",
  "addr2": "text",
  "addr3": "text",
  "addr4": "text",
  "description": "text",
  "descriptionExt": "text",
  "email": "text",
  "geofenceType": 0,
  "id": 1,
  "latitude": 1,
  "longitude": 1,
  "radius": 1,
  "points": [
    [
      1
    ]
  ],
  "tags": [
    1
  ]
}
200

Success

No content

VeriLocation has 2 types of Geofence

  • Circle Geofences - Are defined by a central latitude and longitude and a radius

  • Polygon Geofences - Are defined by a series of 3 or more points, each a Latitude/Longitude pair that each represent one node in the polygon boundary

Creating Circle Geofences

This type of Geofence is a basic implementation in which the centre of the fenced area is defined by a latitude and longitude along with a radius in metres to define the size of the encompassing area

A circle type Geofence must have a radius of between 50 - 1000 metres

from VeriLocation GUI - representation of 2 circle Geofences of different radius

Body Fields - For Circular Geofence

{
    "id": 0,     // SHOULD ONLY BE INCLUDED ON UPDATE OF EXISTING GEOFENCE
    "addr1": "string",
    "addr2": "string",
    "addr3": "string",
    "addr4": "string",
    "description": "string",                        // Required
    "descriptionExt": "string",
    "email": "string",
    "geofenceType": 0,                              // Required
    "latitude": 0,                                  // Required
    "longitude": 0,                                 // Required
    "radius": 0,                                    // Required
    "points": [
      [
        0, 0
      ]
    ],
    "tags": [
      0
    ]
}

Creating Polygon Geofences

This type of Geofence is a more complex representation on which a series of points are used to define nodes in the perimeter of a Geofence. These nodes are connected by straight lines to produce a geofenced area which can be highly customised.

from VeriLocation GUI - Oxford Zero Emission Zone & Pilot as polygon Geofence

Body Fields - For Polygon Geofence

{
    "id": 0, // SHOULD ONLY BE INCLUDED ON UPDATE OF EXISTING GEOFENCE
    "addr1": "string",
    "addr2": "string",
    "addr3": "string",
    "addr4": "string",
    "description": "string",                            // Required
    "descriptionExt": "string",
    "email": "string",
    "geofenceType": 0,                                  // Required
    "latitude": 0,
    "longitude": 0,
    "radius": 0,
    "points": [                                         // Required
      [
        0, 0
      ]
    ],
    "tags": [
      0
    ]
}

Notes:

geofenceType field should be: 0 = Polygon 1 = Circle

latitude should be between -90° -> 90°

longitude should be between -180° -> 180°

This is also true for lat/lng pairs loaded as points

The description field will be the string used to identify the Geofence within the VeriLocation GUI and reporting structure

Inputs and InputTypes

inputs in VeriLocation are defined as sensor data from a binary switch. An input in itself can be

1 || 0

and VeriLocation monitors the change in a switch's state to produce a map of when the switch was high and low

inputTypes are an overlay that allows for a context to be assigned to an input. They hold contextual information with reference to the switches name, and inputDescription that describes the real world objects context e.g. what does the switch represent.

Input
InputType name
InputType description

1

Door

Open | Closed

2

RefridgerationUnit

On | Off

InputTypes

The POST endpoint for inputTypes allows a new or updated model to be saved to VeriLocation.

POST to update or Add Input Types

post

Accepts: - Path Parameters: • {inputId} as an integer - Body Parameters: • See associated Schema - Possible inputDesctiptions: 0 = On/Off, 1 = Open/Closed Returns: - Updates the input Type Record associated with {inputTypeId} with new InputType name and inputDescription

Body
inputTypeIdinteger · int32 | nullableOptional
namestring | nullableOptional
inputDescriptioninteger · enumOptionalPossible values:
Responses
200
Query completed
post
POST /public/v1/inputs/types HTTP/1.1
Host: 
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 52

{
  "inputTypeId": 1,
  "name": "text",
  "inputDescription": 0
}

No content

Body Fields

{
    "inputTypeId": 0,  // SHOULD ONLY BE INCLUDED ON UPDATE OF EXISTING INPUTTYPE
    "name": "string",                                    // Required
    "inputDescription": 0                                // Required
}

Notes:

inputDescription field should be: 0 = On | Off 1 = Open | Closed 2 = Active | Inactive 3 = Connected | Disconnected

The success return will contain the Id field for a new or existing inputType

Inputs

The POST endpoint for inputs allows an input to be assigned an inputType

POST to update Sensor Input Info

post

Accepts: - Path Parameters: • {inputId} as an integer - Body Parameters: • See associated Schema - Possible inputDesctiptions: 0 = On/Off, 1 = Open/Closed Returns: - Updates the input Record associated with {inputId} with new Input name and inputDescription

Body
inputIdinteger · int32Optional
inputTypeIdinteger · int32Optional
Responses
200
Query completed
post
POST /public/v1/inputs HTTP/1.1
Host: 
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 29

{
  "inputId": 1,
  "inputTypeId": 1
}

No content

Body Fields

{
    "inputId": 0,                                      // Required
    "inputTypeId": 0                                   // Required
}

Notes:

To find out what inputTypes already exist, these can be requested from GET

.../public/v1/inputs/types

Temperature Probes and Profiles

Devices that send temperature data to Verilocation, have their temperature sensors defined as ‘Probes’. Each Temperature Probe represents an individual sensor in situ and connected to a device capable of sending Temperature data.

Each Probe in Verilocation can have a ‘Temperature Profile’ associated with it. These profiles define the upper and lower bounds that are acceptable for a specific Probe and are used to trigger Temperature Alarms, which can be used to set up email and text alerts via the GUI and retrieved via GET endpoints for fleet or vehicle by timeframe.

Temperature Probes

Probes are automatically created by the system and their object models can be retrieved for a fleet or vehicle via GET endpoints.

The POST endpoint for Temperature Probes allows for customisation of the Probes to display a contextual name and set a Temperature Profile for the Probe.

Body Fields

{
    “probeId”: 0,                                      // Required
    “name”: “string”,                                  // Required
    “profileId”: 0                                     // Required
}

‘profileId’ is the Id field of a Temperature Profile model which can be created (see below). Existing Temperature Profiles can be requested by fleet, vehicle or probe via GET endpoints

Temperature Profiles

Temperature profiles can be created and updated via the POST endpoint. They can be attributed a contextual name for the Profile and two bounds fields which represent the upper and lower bounds, with a Probe entering an Alarm state if any readings fall outside the resulting Temperature range.

POST to Add OR Update a Temperature Profile

post

Accepts: - Path Parameters: • No path parameters required - Body Parameters: • See associated Schema Notes - To Add a new profile Id == 0, - Created and Updated fields are not required. Returns: - Adds or Updates a Temperature Profile Record

Body
idinteger · int32 | nullableOptional
namestring | nullableOptional
upperBoundinteger · int32Optional
lowerBoundinteger · int32Optional
createdstring · date-time | nullableOptional
updatedstring · date-time | nullableOptional
Responses
200
Query completed
post
POST /public/v1/temperature/profiles HTTP/1.1
Host: 
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 126

{
  "id": 1,
  "name": "text",
  "upperBound": 1,
  "lowerBound": 1,
  "created": "2025-07-28T19:36:17.265Z",
  "updated": "2025-07-28T19:36:17.265Z"
}

No content

Body Fields

{
    “id”: 0,    // SHOULD ONLY BE INCLUDED ON UPDATE OF EXISTING TEMPERATURE PROFILE
    “name”: string,                                      // Required
    “upperBound”: 0,                                     // Required
    “lowerBound”: 0                                      // Required
}

Successful creation or update will return the Id of the Profile.

A list of all existing Temperature Profiles can be requested by fleet, vehicle or probe via GET endpoints

Verilocation Tags

‘Tags’ are primarily used within Verilocation to

  • enable a report to be run against a specific subset of a data source, e.g. Vehicles or Drivers, that have been attributed with a specific ‘Tag’.

  • enable Geofences to be shown in a customisable colour in Verilocation maps

post
Body
idinteger · int32 | nullableOptional

Gets or sets Id of a Tag

positioninteger · int32Optional

Gets or sets the position of a Tag If not supplied will be set to the current maximum position + 1

namestring · max: 50Required

Gets or sets Name of a Tag

resourceTypeinteger · enumRequiredPossible values:
colourinteger · enumRequiredPossible values:
Responses
200
Success
Responseinteger · int32
post
POST /public/v1/tags HTTP/1.1
Host: 
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 63

{
  "id": 1,
  "position": 1,
  "name": "text",
  "resourceType": 0,
  "colour": 0
}
200

Success

1

Body Fields

{
    “id”: 0,    //  SHOULD ONLY BE INCLUDED ON UPDATE OF EXISTING TAG
    “position”: 0,
    “name”: string,                                // Required
    “resourceType”: 0,   // Required - Enum as int.  NEEDS TO ALWAYS BE SET TO 25 - GEOFENCE
    “colour”: 0                                    // Required - Enum as int
}

position represents the importance of a given Tag when a specific Geofence is displayed. This means that a single Geofence can have multiple Tags attributed for Reporting purposes, however, the UI will choose the Tag with the lowest position number when displaying Geofence colours.

resourceType represents the resources that can be attributed with the Tag. Currently only Geofence Tags are supported via the POST API endpoints and this will generate an error if the ‘resourceType’ is not set to 25.

colour represents the colour that any Geofences attributed with the Tag will be displayed in and should be:

0 = None 1 = Blue 2 = Red 3 = Yellow 4 = Orange 5 = Green 6 = Purple 7 = Black 8 = Grey

Last updated