inventory/get_history.php
Table of Contents
Returns a list of booked acticities and position updates (position updates only available, if the item is connected with a YellowFox beacon) for one or multiple items and a given time range.
Description
GET/inventory/get_history.php?company=RTI_COMPANYKEY&import=RTI_IMPORTKEY
Parameter
Parameter | Descriptions | Type | Hint | Mandatory |
---|---|---|---|---|
company | RTI company key | string | yes | |
import | RTI import key | string | yes | |
offset | unsigned int | Pro Abfrage werden bis zu 1000 Einträge zurück geliefert. Um weitere Einträge zu erhalten, können Sie ein Offset angeben. | no | |
date_from | Format: ISO 8601 (YYYY-MM-DD) | date string | Get history entries from start time. If nothing set assume a start date 1 month in past. | no |
date_to | date string | Get history until end time. If nothing set, use current time as end time | no | |
profiles[] | profiles UUID | [] string | optional limitation to a list of given profiles | no |
objects[] | objects UUID | [] string | optional limitaiton to a list of given items | no |
groups[] | group UUID | [] string | optional limitiation to a list of given object groups | no |
with_beacon | Beacon position updates | bool |
| no |
Remark for date range setting
The setting will work in 3 modes:
a) If no date set (date_from/date_to), all entries during last month will be returned.
b) If only start date is set (date_from), return all events from this date until now (up to 1 month).
c) If both date values set (date_from, date_to), all events in time range will returned (up to 1 month)
Return value
On success you will receive the result as json. On missing parameters or errors you will receive "ERROR:description".
Possible error values
Fehler | Beschreibung |
---|---|
ERROR_MAINTENANCE | Your company is under maintenance, no RTI request are possible at the moment. |
INVALID_COMPANY | Company not found. Company key or import key might be faulty. |
INVENTORY_NOT_ACTIVATED | Inventory management is not activated for your company. |
MISSING_COMPANY | Company key is missing. |
MISSING_IMPORT | Import key is missing. |
INVALID_DATE_RANGE | Time range invalid or exceeded 1 month |
MISSING_DATE_FROM | Start date missing (required, if end date is set) |
INVALID_FORMAT_OFFSET | Offset value faulty |
JSON
You can access the specification as a JSON Schema file here.
Output example
"_date": "2025-02-26T10:13:17+01:00",
"_links": {
"next": {
"href": null
}
},
"events": [
{
"uuid": "7d64c6ac-49fd-0d4e-27e6-f7c1ea727b2b",
"gpsdate": "2025-02-25T11:59:20+01",
"data_source": "booking",
"driver_name": null,
"vehicle_sign": null,
"lat": 0,
"lon": 0,
"satellites": 0,
"text_position": "",
"customer_text": null,
"activities": [
{
"value": "Abgesetzt",
"description": "Status"
},
{
"value": "Bauhof",
"description": "Status"
},
{
"value": 1,
"description": "Betriebsgewicht"
},
{
"value": 12,
"description": "Verdichtungstiefe"
},
{
"value": 22,
"description": "Flächenleistung"
},
{
"value": "Hallo",
"description": "Status 2"
},
{
"value": 1,
"description": "test"
}
]
},
{
"uuid": "a5ddb6a3-20ad-a418-5236-bc7e6a229b55",
"gpsdate": "2025-02-25T11:58:29+01",
"data_source": "position",
"driver_name": null,
"vehicle_sign": null,
"lat": 51.03629,
"lon": 13.59799,
"satellites": 8,
"text_position": null,
"customer_text": "test",
"activities": []
}
]
}