Using this endpoint you can request paginated and filtered infringements. You will only be able to see infringements linked to your account via the vehicles they are linked to
POST http:///fleet.roadprotect.co.il/api/v1/query/infringement/spreadsheet
You can filter the results using query parameters with the following format:
filter=FIELD||OPERATION||VALUE
You can combine multiple filters to refine your result (see examples)
You can order the result by a specific column by adding a query param with the following format:
sort=FIELD,ORDER
You can select how many items per page you want and which page you want by using the following query parameters
per_page=COUNT
page=PAGE
The query parameter via is used to simplify filtering infringements
EG: via=nominated will return all infringements nominated to your account
EG: via=onVehicles will return all infringements linked to vehicles you have used, regardless of whether they are nominated to you or not
Request infringements that contain the string "123" in their noticeNumber
?filter=noticeNumber||cont||123
Request infringements that contain the string "123" in their noticeNumber and which have an offence date before 2000
?filter=noticeNumber||cont||123&filter=offenceDate||lte||2000-01-01T00:00:00.000Z
Request the first 30 infringements created since a certain date
?filter=createdAt||gt||2020-02-18T22:00:00.000Z&per_page=30&page=1
| Parameter name | Value | Description | Additional |
|---|---|---|---|
| mine | string |
Possible values are:
|
Required |
| graphing | string |
Possible values are:
|
|
| via | string |
Possible values are:
|
|
| startDate | string | ||
| endDate | string | ||
| issuers | array of string, multiple occurances | ||
| vehicleRegistration | string | ||
| infringementStatus | string |
Possible values are:
|
The request body takes a complete AdvancedTableColumn resource, containing the following writable properties:
[
{
"isDisplaying": "boolean",
"key": "string",
"spreadsheetFormat": "string",
"spreadsheetKey": "string",
"title": "string"
}
]
| Name | Type | Description | Additional |
|---|---|---|---|
| isDisplaying | boolean | ||
| key | string | ||
| spreadsheetFormat | string |
Possible values are:
|
|
| spreadsheetKey | string | ||
| title | string |
To authenticate your client integration please put your token in the header of your requests with the key Authorization, it should look like this:
Authorization: Bearer YOUR_TOKEN_HERE
Please keep your token secured. If your token is compromised, we can issue a new token for you.
This request requires the use of one of following authorisation methods:
API key
.
The following HTTP status codes may be returned, optionally with a response resource.
| Status code | Description | Resource |
|---|---|---|
| 201 | Created | Buffer |
| 400 | Bad Request E112: No data to export to spreadsheet |
|
| 401 | Unauthorized Unauthorized |
|
| 500 | Internal Server Error Invalid query parameters |
For example, to find my infringements where 200 < amountDue < 800:
var request = require('request');
var options = {
'method': 'GET',
'url': 'http://fleet.roadprotect.co.il/api/v1/query/infringement/spreadsheet?mine=true&filter=amountDue||gt||200&filter=amountDue||lt||800',
'headers': {
'Content-Type': 'application/x-www-form-urlencoded',
'Authorization': 'Bearer YOUR_TOKEN_HERE'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
For example, to find my infringements where 200 < amountDue < 800:
url = "http://fleet.roadprotect.co.il/api/v1/query/infringement/spreadsheet?mine=true&filter=amountDue||gt||200&filter=amountDue||lt||800"
payload={}
headers = {
'Content-Type': 'application/x-www-form-urlencoded',
'Authorization': 'Bearer YOUR_TOKEN_HERE'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)