Wiki source code of get_timerecording.asp

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 (% class="box" %)
6 (((
7 **Compatibility
8 **This function is intended to be used with timerecording V2
9 If you are using the newer V3 version, please use [[get_timerecording.php>>doc:YellowFox Remote Tracking Interface.Funktionen.Zeiterfassung.get_timerecording\.php.WebHome]]
10 )))
11
12 Returns all timerecording bookings within desired timerange.
13 = Description =
14 ****(% class="green mark" %)GET(%%) **get_timerecording.asp?company**=//COMPANY_RTIKEY//**&import**=//COMPANY_IMPORTKEY//**&begin**=//YYYYMMDDHHMMSS//**&end**=//YYYYMMDDHHMMSS//**&mode**=//CSV//**&version**=//2//
15 = Parameter =
16 |=Parameter|=Description|=Type|=Note|=Mandatory
17 |company|RTI company key|string||yes
18 |import|RTI import key|string||yes
19 |begin|output start time|string|the output timerange is limited to 31 days|yes
20 |end|output end time|string|the output timerange is limited to 31 days|yes
21 |mode|output format|string|valid output formats
22 (((
23 * CSV
24 * RSCT
25 * BOTIME
26 )))|yes
27 |version|alternative CSV output|integer|a value of "2" add geocoordinates for output|no
28 |date_query|which date column is base for date query|string|'insert' (default) : date of proceed
29 'gps' : date of timerecording message|no
30
31 = Return =
32 A **string** will be returned. In case of error "(% class="error" %)**ERROR:Description**(%%)".
33 == Reiner SCT Format ==
34 The returning data matching the specification of Reiner SCT import definition.
35 == Botime Format ==
36 The returning data matching the specification of BOTIME. A TXT file will be returned. The requested date is based on timerecording date and not the date of message processing.
37 == CSV Format ==
38 On success, the data will be delivered in csv (comma seperated values) format. The first line always is defined as head with column names. The following rows containing the booking data.
39 === Meta informations ===
40 |=Separator|Semicolon ( ; )
41 |=Delimiter|Double quote ( " )
42 |=Line break|0x0D 0x0A (CarriageReturn LineFeed)
43 |=Header|Row 1
44 |=Encoding|Windows-1252
45
46 === Columns ===
47 |=Column|=Description|=
48 |DATETIME|Date|format DD.MM.YYYY HH:MM:SS
49 |ACTION|Short booging type definition|(((
50 * K, G, X, Y, B, E
51 )))
52 |ACTIONTEXT|Description text for booking as defined|(((
53 * Definition set at Administration -> [[Timerecording >>doc:YellowFox Standard Portal.Verwaltung.Zeiterfassung.WebHome]]
54 )))
55 |POSITION|Aufgelöster Positionstext|
56 |AREA|Cost centers/areas, as defined for this Position|(((
57 * delimiter: "%~|%" 
58 * structure: cost center + space + area name
59 * example: "101 construction site A%~|%201 construction site B%~|%456 customer smith"
60 )))
61 |DRIVERKEY|personal key of person who did the booking|
62 |DRIVERNAME|name of person who did the booking|
63 |CAR|portal Name of object, where the booking was done|
64 |LAT|Latitude|(((
65 * example: "51.4"
66 * only for "mode=CSV" and "version=2"
67 )))
68 |LON|Longitude|(((
69 * example: "13.1"
70 * only for "mode=CSV" and "version=2"
71 )))
72
73 === Example ===
74 **return in csv**
75 {{code language="java"}}"DATETIME";"ACTION";"ACTIONTEXT";"POSITION";"AREA";"DRIVERKEY";"DRIVERNAME";"CAR";"LAT";"LON";
76 "01.10.2015 08:00:00";"K";"work start";"Examplestreet 17, 01234 Examplecity";"head office";"12345";"Sam Smith";"MU-YF 1";"51.4";"13.1";
77 "01.10.2015 08:00:00";"X";"pause start";"Testroad 23, 91234 Testvillage";"John Doe GmbH";"12345";"Sam Smith";"MU-YF 1";"52";"11.3";
78  {{/code}}
79
80 = Example calls =
81 **get bookings with geo coordinates**
82 {{code language="java"}}https://map.yellowfox.de/rti/get_timerecording.asp?company=COMPANY_RTIKEY&import=COMPANY_IMPORTKEY&begin=20151102000000&end=20151108235959&mode=CSV&version=2{{/code}}
83
84 **get bookings for Reiner SCT import**
85 {{code language="java"}}https://map.yellowfox.de/rti/get_timerecording.asp?company=COMPANY_RTIKEY&import=COMPANY_IMPORTKEY&begin=20151026000000&end=20151101235959&mode=RSCT{{/code}}
86