Wiki source code of add_driver_license_check.php
Last modified by YellowFox_RD on 2025/01/23 10:14
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | (% class="box" %) | ||
2 | ((( | ||
3 | Table of Contents | ||
4 | ))) | ||
5 | |||
6 | {{toc/}} | ||
7 | |||
8 | Enables the import of a performed driver's license control | ||
9 | |||
10 | = Description = | ||
11 | |||
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// | ||
14 | |||
15 | = Parameter = | ||
16 | |||
17 | == Query parameters == | ||
18 | |||
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:((( | ||
23 | * single_insert: einzelne Buchung (default) | ||
24 | * csv_import: Import einer CSV Datei | ||
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[]|((( | ||
31 | * { "type" : "datetime", "pattern":"YmdHis"} | ||
32 | * { "type" : "date", "pattern":"Ymd"} | ||
33 | * { "type" : "time", "pattern":"His"} | ||
34 | * { "type" : "terminal" } | ||
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 | ||
39 | |||
40 | == Body parameters == | ||
41 | |||
42 | |=Parameter|=Description|=Type|=Notes|=Mandatory | ||
43 | |file|File|file| |yes, mode single_insert | ||
44 | |||
45 | = Return = | ||
46 | |||
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. | ||
49 | |||
50 | = Examples = | ||
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 | |||
58 | **Return CSV Import with 3 lines** | ||
59 | {{code language="java"}}{ | ||
60 | "1": "ERROR:NO DRIVER FOUND WITH NFC KEY: abc123def", | ||
61 | "2": "OK", | ||
62 | "3": "OK" | ||
63 | }{{/code}} | ||
64 |