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