Wiki source code of inventory/get_inventories.php

Last modified by Dominic Lippmann on 2025/03/04 16:29

Show last authors
1 (% class="box" %)
2 (((
3 Table of Contents
4 )))
5
6 {{toc/}}
7
8 Get all existing inventory items including their profile and group assignments, as well as their uuids for reference. For example uuids might be used to assign inventory itemsto tours created via TourWS.
9
10 = Description =
11
12 (% class="green mark" %)**GET**(%%)//**  /inventory/get_inventories.php?company**=RTI_COMPANYKEY**&import**=IMPORTKEY//
13
14 = Parameter =
15
16 |=Parameter|=Description|=Type|=Hint|=Mandatory
17 |company|RTI company key|string| |yes
18 |import|RTI import key|string| |yes
19 |offset| |int|This function returns 5000 results at max. To get further entries, you can add an offset.|no
20 |profiles[]|profiles UUID|[] string| |no
21 |objects|objects UUID|[] string| |no
22 |groups|groups UUID|[] string| |no
23
24 = Return value =
25
26 On success you will receive the result as json. On missing parameters or errors you will receive "(% class="error" %)**ERROR:description**(%%)".
27
28 == Possible error values ==
29
30 |=Error|=Description
31 |MISSING_COMPANY|Company key is missing.
32 |INVALID_COMPANY|Company not found. Company key or import key might be faulty.
33 |ERROR_MAINTENANCE|Your company is under maintenance, no RTI request are possible at the moment.
34 |MISSING_IMPORT|Import key is missing.
35 |INVENTORY_NOT_ACTIVATED|Inventory management is not activated for your company.
36 |INVALID_FORMAT_OFFSET|Offset value faulty.
37
38 == JSON ==
39
40 You can access the specification as a JSON Schema file [[here>>https://map.yellowfox.de/rti/schema/get_inventories_schema.json]].
41 **Example **
42
43 {{code language="java"}}
44 {
45 "_date": "2025-02-26T10:04:30+01:00",
46 "_links": {
47 "next": {
48 "href": null
49 }
50 },
51 "items": [
52 {
53 "uuid": "a77d258f-362e-0546-2816-501708d9ebb7",
54 "description": "AB 1705-05",
55 "nfcTag": "04d41a3af94880",
56 "beaconMac": null,
57 "profiles": [
58 {
59 "name": "Abrollcontainer",
60 "uuid": "a4e4f9d6-0144-4c7d-ca86-37f7b94ac673"
61 }
62 ],
63 "groups": [
64 {
65 "name": "Container Sachsen",
66 "uuid": "66ff7431-e455-7d1c-7a20-0ec6c464c80a"
67 }
68 ],
69 "canTours": true
70 },
71 {
72 "uuid": "e34135f8-bd5b-93eb-bb97-897806508c33",
73 "description": "AB 1705-01",
74 "nfcTag": "17071983",
75 "beaconMac": "58C356ECE224",
76 "profiles": [
77 {
78 "name": "Abrollcontainer",
79 "uuid": "a4e4f9d6-0144-4c7d-ca86-37f7b94ac673"
80 }
81 ],
82 "groups": [
83 {
84 "name": "Container NRW",
85 "uuid": "c1f91a2d-e867-f18d-f573-9219d66b8330"
86 },
87 {
88 "name": "Container Sachsen",
89 "uuid": "66ff7431-e455-7d1c-7a20-0ec6c464c80a"
90 }
91 ],
92 "canTours": true
93 }
94 ]
95 }
96 {{/code}}
97
98 {{code language="java"}}
99 https://map.yellowfox.de/rti/inventory/get_inventories.php?company=COMPANY_RTIKEY&import=IMPORT_RTIKEY
100 https://map.yellowfox.de/rti/inventory/get_inventories.php?company=COMPANY_RTIKEY&import=IMPORT_RTIKEY&profiles[]=PROFILE_UUID
101 {{/code}}