inventory/get_history.php

Last modified by YellowFox_RD on 2025/03/04 16:27

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

ParameterDescriptionsTypeHintMandatory
companyRTI company keystring yes
importRTI import keystring yes
offset unsigned intPro Abfrage werden bis zu 1000 Einträge zurück geliefert.  Um weitere Einträge zu erhalten, können Sie ein Offset angeben.no
date_fromFormat: ISO 8601
(YYYY-MM-DD)
date stringGet history entries from start time.
If nothing set assume a start date 1 month in past.
no
date_todate stringGet history until end time.
If nothing set, use current time as end time
no
profiles[]profiles UUID[] stringoptional limitation to a list of given profilesno
objects[]objects UUID[] stringoptional limitaiton to a list of given itemsno
groups[]group UUID[] stringoptional limitiation to a list of given object groupsno
with_beaconBeacon position updatesbool
  • false: only return booked item or state changes
  • true: additionally return all beacon position updates
    • Keep in mind: This may result in large response data.
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

FehlerBeschreibung
ERROR_MAINTENANCEYour company is under maintenance, no RTI request are possible at the moment.
INVALID_COMPANYCompany not found. Company key or import key might be faulty.
INVENTORY_NOT_ACTIVATEDInventory management is not activated for your company.
MISSING_COMPANYCompany key is missing.
MISSING_IMPORTImport key is missing.
INVALID_DATE_RANGETime range invalid or exceeded 1 month
MISSING_DATE_FROMStart date missing (required, if end date is set)
INVALID_FORMAT_OFFSETOffset 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": []
        }

    ]
}

Example calls

https://map.yellowfox.de/rti/inventory/get_history.php?company=COMPANY_RTIKEY&import=IMPORT_RTIKEY