Last modified by YellowFox_RD on 2024/12/19 10:11

Show last authors
1 (% class="box" %)
2 (((Table of Contents)))
3 {{toc/}}
4
5 Returns the status messages of orders.
6 = Description =
7 //**(% class="green mark" %)GET(%%) order_management/get_orderstate.php?company**=RTI_COMPANYKEY**&import**=RTI_IMPORTKEY**&start**=YYYYMMDDHHMMSS**&end**=YYYYMMDDHHMMSS//
8 = Parameters =
9 |=parameter|=description|=type|=hint|=mandatory
10 |company|RTI company key|string||yes
11 |vehicle|RTI vehicle key|string|either vehicle, group or import parameter|(yes)
12 |group|RTI vehicle group key (all vehicles of a group)|string|either vehicle, group or import parameter|(yes)
13 |import|RTI import key (all vehicles)|string|either vehicle, group or import parameter|(yes)
14 |customorderid|user-defined order number|string|either set this field or start and end|(yes)^^*1^^
15 |start|date from which to return order states|string|Format: YYYYMMDDHHMMSS|(yes)^^*1^^
16 |end|date to which to return order states|string|Format: YYYYMMDDHHMMSS
17 The maximum time span is 7 days.|(yes)^^*1^^
18 |datetype|type of date to be used for date restriction|string|Possible values:
19 (((
20 * gps (default)
21 * insert
22 )))|no
23 |format|output format|string|Possible values:
24 (((
25 * csv (default)
26 * json
27 )))|no
28
29 ^^*1 mandatory is either customorderid or ( start and end )^^
30 = Return value =
31 A** string **will be returned. On error you will receive "(% class="error" %)**ERROR:description**(%%)".
32
33 == CSV format ==
34 First line is the header with field names. We use a double quote as text delimiter.
35 === Meta information ===
36 |=separator|comma ( , )
37 |=text delimiter|double quote ( " )
38 |=line end|0x0D 0x0A (CarriageReturn LineFeed)
39 |=header|line 1
40
41 === Column description ===
42 |=column|=description|=
43 |CUSTORDERID|user-defined order number|
44 |DATE|date of pressed state|DD.MM.YYYY HH:MM:SS
45 |STATE|state text which was pressed|
46 |SOURCETYPE|type of source|PND (if vehicle or RTI) or PORTAL
47 |SOURCE|who triggered this action|person/system name
48 |STATE_IDENT|user-defined ident of state if given|
49 |STATE_LANG|country code, if the state was pressed in another language than german|
50 |STATE_TRANS|translated state text, if the state was pressed in another language than german|
51 |META|meta info|
52 |REQUESTDATE|request date|
53 |RTI_IDENT|RTI ident of vehicle|
54
55 === Example ===
56
57 {{code language="java"}}"CUSTORDERID","DATE","STATE","SOURCETYPE","SOURCE","STATE_IDENT","STATE_LANG","STATE_TRANS","META","REQUESTDATE","RTI_IDENT"
58 "Auftrag 123","18.07.2022 09:43:42","Zustellungsversuch","PORTAL","FTL YF 123","","","","","21.07.2022 06:38:50","rti123"{{/code}}
59
60 == JSON format ==
61 === Example ===
62
63 {{code language="java"}}[
64 {
65 "gpsdate": "18.07.2022 09:43:42",
66 "requestdate": "21.07.2022 06:43:45",
67 "custom_order_id": "Auftrag 123",
68 "state": "Zustellungsversuch",
69 "state_trans": null,
70 "state_lang": null,
71 "state_ident": null,
72 "meta": null,
73 "source_type": "PORTAL",
74 "source": "FTL YF 123",
75 "rti_ident": "rti123"
76 }
77 ]{{/code}}
78
79 == Possible error values ==
80 |=error|=description
81 |MISSING_COMPANY|company key is missing
82 |INVALID_COMPANY|Company not found. Migth be due to faulty company or import key.
83 |ERROR_MAINTENANCE|Your company is under maintenance, at the moment no requests are possible.
84 |INVALID_KEY(VEHICLE~|GROUP~|IMPORT)|The given RTI key does not match the expected structure.
85 |NO_KEY_GIVEN(VEHICLE~|GROUP~|IMPORT)|No RTI key to identify any vehicles was given.
86 |INVALID_VEHICLE_KEY / INVALID_GROUP_KEY|No vehicles which match the RTI keys were found.
87 |ERROR_MISSING_CUSTORDERID~|DATEFROM~|DATETO|You have to set either a custom order id or start and end for a valid request,
88 |ERROR_INVALID_DATEFROM|You have entered a start date, which does not match the needed format.
89 |ERROR_INVALID_DATETO|You have entered an end date, which does not match the needed format.
90 |ERROR_INVALID_DATERANGE|Your start and end date are either more than 7 days apart or your end date is before your start date.
91 |ERROR_INVALID_FORMAT|You have entered an unknown output format.
92 |ERROR_INVALID_DATE_TYPE|You have entered an unknown date type.
93 |ERROR_ORDER_NOT_FOUND|Search via custom order id: No order with given order number was found.
94 |ERROR_DUPLICATE_CUSTOMORDERID|Search via custom order id: Multiple orders with given order number were found. This function can only be used to gather states for orders which unique identifiers.
95
96 = Example call =
97 == JSON ==
98
99 {{code language="java"}}https://map.yellowfox.de/rti/order_management/get_orderstate.php?company=COMPANY_KEY&vehicle=VEHICLE_KEY&customorderid=Auftrag 123&format=json
100
101 https://map.yellowfox.de/rti/order_management/get_orderstate.php?company=COMPANY_KEY&vehicle={"type":"car_ident","groupKey":"GROUP_RTIKEY","ident":"VEHICLE_IDENT"}&customorderid=Auftrag 123&format=json {{/code}}
102
103 == CSV ==
104
105 {{code language="java"}}https://map.yellowfox.de/rti/order_management/get_orderstate.php?company=COMPANY_KEY&vehicle=VEHICLE_KEY&start=20220501000000&end=20220508000000&format=csv
106
107 https://map.yellowfox.de/rti/order_management/get_orderstate.php?company=COMPANY_KEY&vehicle={"type":"car_ident","groupKey":"GROUP_RTIKEY","ident":"VEHICLE_IDENT"}&start=20220501000000&end=20220508000000&format=csv{{/code}}
108