Wiki source code of add_driver_license_check.php

Last modified by YellowFox_RD on 2025/01/23 10:14

Hide last authors
YellowFox_RD 1.1 1 (% class="box" %)
Dominic Lippmann 2.1 2 (((
Dominic Lippmann 5.1 3 Table of Contents
Dominic Lippmann 2.1 4 )))
5
YellowFox_RD 1.1 6 {{toc/}}
7
Dominic Lippmann 5.1 8 Enables the import of a performed driver's license control
Dominic Lippmann 2.1 9
Dominic Lippmann 5.1 10 = Description =
Dominic Lippmann 2.1 11
Dominic Lippmann 5.1 12 (% class="blue mark" %)**POST**(%%)//**  /personnel/add_driver_license_check.php?company=**RTI_COMPANYKEY**&import=**RTI_VEHICLEKEY**&nfc_tag=**NFC_TAG**&date=**20210324151000**&terminal=**optionales Terminal//
13 (% class="blue mark" %)**POST**(%%)//**  /personnel/add_driver_license_check.php?company=**RTI_COMPANYKEY**&import=**RTI_VEHICLEKEY**&mode**=csv_import**&delimiter**=COMMA**&csv_structure[]**={ "type" : "datetime", "pattern":"YmdHis"}**&csv_structure[]**={ "type" : "nfc_tag" }&headline=1//
Dominic Lippmann 2.1 14
YellowFox_RD 1.1 15 = Parameter =
Dominic Lippmann 2.1 16
Dominic Lippmann 5.1 17 == Query parameters ==
Dominic Lippmann 2.1 18
Dominic Lippmann 5.1 19 |=Parameter|=Description|=Type|=Notes|=Mandatory
20 |company|RTI company key|string| |yes
21 |import|RTI import key|string| |yes
22 |mode|Differentiation of the various actions|string|permissible modes are:(((
YellowFox_RD 1.1 23 * single_insert: einzelne Buchung (default)
24 * csv_import: Import einer CSV Datei
Dominic Lippmann 5.1 25 )))|no
26 |nfc_tag|NFC Tag|string| |yes, mode single_insert
27 |date|date in ME(S)Z|string|Format: YYYYMMDDHHMMSS|yes, mode single_insert
28 |terminal|At which terminal was the driver's license check performed|string| |no
29 |delimiter|Which separator was used in the CSV|string|COMMA, SEMICOLON oder TAB|yes, mode single_insert
30 |csv_structure[]|One entry per column, what kind of content can be found in the column|string[]|(((
YellowFox_RD 1.1 31 * { "type" : "datetime", "pattern":"YmdHis"}
32 * { "type" : "date", "pattern":"Ymd"}
33 * { "type" : "time", "pattern":"His"}
34 * { "type" : "terminal" }
Dominic Lippmann 5.1 35 * { "type" : "nfc_tag" }
36 * { "type" : "ignore" }
37 )))|yes, mode single_insert
38 |headline|file contains a header|int|0 = no headline (default), 1 = headline present|no
YellowFox_RD 1.1 39
Dominic Lippmann 5.1 40 == Body parameters ==
Dominic Lippmann 2.1 41
Dominic Lippmann 5.1 42 |=Parameter|=Description|=Type|=Notes|=Mandatory
43 |file|File|file| |yes, mode single_insert
YellowFox_RD 1.1 44
Dominic Lippmann 5.1 45 = Return =
Dominic Lippmann 2.1 46
Dominic Lippmann 5.1 47 In case of success "**OK**" is returned. or in case of CSV import per line.
48 In case of missing or incorrect entries an "**ERROR:Description**" is returned.
Dominic Lippmann 2.1 49
Dominic Lippmann 5.1 50 = Examples =
YellowFox_RD 1.1 51
52 **Single Import**
53 {{code language="java"}}https://map.yellowfox.de/rti/personnel/add_driver_license_check.php?company=COMPANY_KEY&import=IMPORTKEY&nfc_tag=abc123def&date=20210324151000&terminal=optionales Terminal{{/code}}
54
55 **CSV Import**
56 {{code language="java"}}https://map.yellowfox.de/rti/personnel/add_driver_license_check.php?company=COMPANY_KEY&import=IMPORTKEY&&mode=csv_import&delimiter=COMMA&csv_structure[]={"type":"datetime","pattern":"YmdHis"}&csv_structure[]={"type":"nfc_tag"}&headline=1{{/code}}
57
Dominic Lippmann 5.1 58 **Return CSV Import with 3 lines**
YellowFox_RD 1.1 59 {{code language="java"}}{
60 "1": "ERROR:NO DRIVER FOUND WITH NFC KEY: abc123def",
61 "2": "OK",
62 "3": "OK"
63 }{{/code}}
64