Difference between revisions of "NPS-DL"
(→Version) |
|||
(6 intermediate revisions by the same user not shown) | |||
Line 6: | Line 6: | ||
}} | }} | ||
[[File:Datasheet240.png|200px|thumb|right|Datasheet240 NPS-DL. South African Drivers Licence barcode decoder API]] | [[File:Datasheet240.png|200px|thumb|right|Datasheet240 NPS-DL. South African Drivers Licence barcode decoder API]] | ||
− | {{API|1=This is the developer's corner to aid in integrating our | + | {{API|1=This is the developer's corner to aid in integrating our RESTful API into their apps.}} |
== Interface == | == Interface == | ||
This is a [[REST API]] endpoint using HTTP GET.<br> | This is a [[REST API]] endpoint using HTTP GET.<br> | ||
Line 12: | Line 12: | ||
== Usage == | == Usage == | ||
To use this endpoint you will need a valid [[API Key]] available after registration on [[NPS-CLOUD]].<br> | To use this endpoint you will need a valid [[API Key]] available after registration on [[NPS-CLOUD]].<br> | ||
− | See our [https://api.nptracker.co.za/docs API documentation page] for | + | See our [https://api.nptracker.co.za/docs/ API documentation page] for advanced help and examples on using this endpoint. |
=== Parameters === | === Parameters === | ||
==== scan ==== | ==== scan ==== | ||
− | The HEX encoded | + | The HEX encoded string of the South African Drivers Licence (SADL) PDF-417 barcode.<br>This HEX string shall begin with 019b0945000025...<br>Please see our example application on [https://github.com/nptracker/NPS-SADL | GitHub] for an example of how to convert from the PDF417 decoded binary format scan to the expected HEX value. |
==== token ==== | ==== token ==== | ||
Line 26: | Line 26: | ||
[[File:NPS-DL JSON.png|400px|thumb|right|NPS-DL JSON output]] | [[File:NPS-DL JSON.png|400px|thumb|right|NPS-DL JSON output]] | ||
=== User_IP === | === User_IP === | ||
+ | Client's IP address that was used to send the enquiry from. | ||
=== EncryptionVersion === | === EncryptionVersion === | ||
+ | Returns the value set in the decrypted barcode. | ||
=== BarcodeVersion === | === BarcodeVersion === | ||
+ | Returns the value set in the decrypted barcode. | ||
=== Citizen === | === Citizen === | ||
+ | Returns the driver's citizen ISO code set in the decrypted barcode. | ||
=== Initial === | === Initial === | ||
+ | Driver's initial. | ||
=== Surname === | === Surname === | ||
+ | Driver's surname. | ||
=== DOB === | === DOB === | ||
+ | Driver's date of birth. | ||
=== IDNo === | === IDNo === | ||
+ | Driver's ID Number. | ||
=== IssuedBy === | === IssuedBy === | ||
+ | Issued state in ISO format. | ||
=== LicNo === | === LicNo === | ||
+ | Driver's licence number. | ||
=== Issued === | === Issued === | ||
+ | Date the card was first issued. | ||
=== ValidFrom === | === ValidFrom === | ||
+ | Date the card was issued/renewed. | ||
=== ValidTo === | === ValidTo === | ||
+ | Date the licence will expire. | ||
=== Code === | === Code === | ||
+ | The driver's licence vehicle codes the driver is allowed to operate. ie Bike & car/truck types... | ||
==== Licence1 ==== | ==== Licence1 ==== | ||
+ | The first licence vehicle code the driver may operate. | ||
==== Licence2 ==== | ==== Licence2 ==== | ||
+ | The second licence vehicle code the driver may operate. | ||
=== Unlock === | === Unlock === | ||
+ | Returns a true report if the user is allowed to inquire the drivers license details.<br> | ||
+ | Return false if, for instance, the user's token credits have run out. | ||
=== Version === | === Version === | ||
The version of the API endpoint. | The version of the API endpoint. | ||
− | |||
=== TokensLeft === | === TokensLeft === | ||
+ | Current token credits left for the API account. | ||
=== Checks === | === Checks === | ||
+ | Addition checks based on data in the decrypted barcode. | ||
==== VehRestr ==== | ==== VehRestr ==== | ||
+ | Shows if the driver has a vehicle type restriction linked to his driver's licence (manual, automatic etc.) | ||
==== UserRestr ==== | ==== UserRestr ==== | ||
+ | Shows if the driver has a restriction type linked to his driver's licence (glasses, prosthetics etc.) | ||
==== PrDP ==== | ==== PrDP ==== | ||
==== expired ==== | ==== expired ==== | ||
+ | The boolean value will be false if ValidTo date is past today's date else return true | ||
==== age ==== | ==== age ==== | ||
+ | The driver's age based on his ID number | ||
==== gender ==== | ==== gender ==== | ||
+ | The driver's gender is based on his ID number | ||
==== url ==== | ==== url ==== | ||
+ | Full URL for decoded driver's photo.<br> | ||
+ | '''NOTE'': The photo decoding takes a second or two to be served by the server please allow a delay before retrieving the image. | ||
==== filename ==== | ==== filename ==== | ||
+ | The file path for decoded driver's photo. |
Latest revision as of 09:39, 31 May 2023
This is the developer's corner to aid in integrating our RESTful API into their apps. |
Contents
Interface
This is a REST API endpoint using HTTP GET.
Available to any device/server on the internet.
Usage
To use this endpoint you will need a valid API Key available after registration on NPS-CLOUD.
See our API documentation page for advanced help and examples on using this endpoint.
Parameters
scan
The HEX encoded string of the South African Drivers Licence (SADL) PDF-417 barcode.
This HEX string shall begin with 019b0945000025...
Please see our example application on | GitHub for an example of how to convert from the PDF417 decoded binary format scan to the expected HEX value.
token
This is your NPS-CLOUD account access token (API Key) available under the NPS-API menu in your NPS-CLOUD account.
Output
We provide a JSON formatted output of the results available from this API endpoint.
User_IP
Client's IP address that was used to send the enquiry from.
EncryptionVersion
Returns the value set in the decrypted barcode.
BarcodeVersion
Returns the value set in the decrypted barcode.
Citizen
Returns the driver's citizen ISO code set in the decrypted barcode.
Initial
Driver's initial.
Surname
Driver's surname.
DOB
Driver's date of birth.
IDNo
Driver's ID Number.
IssuedBy
Issued state in ISO format.
LicNo
Driver's licence number.
Issued
Date the card was first issued.
ValidFrom
Date the card was issued/renewed.
ValidTo
Date the licence will expire.
Code
The driver's licence vehicle codes the driver is allowed to operate. ie Bike & car/truck types...
Licence1
The first licence vehicle code the driver may operate.
Licence2
The second licence vehicle code the driver may operate.
Unlock
Returns a true report if the user is allowed to inquire the drivers license details.
Return false if, for instance, the user's token credits have run out.
Version
The version of the API endpoint.
TokensLeft
Current token credits left for the API account.
Checks
Addition checks based on data in the decrypted barcode.
VehRestr
Shows if the driver has a vehicle type restriction linked to his driver's licence (manual, automatic etc.)
UserRestr
Shows if the driver has a restriction type linked to his driver's licence (glasses, prosthetics etc.)
PrDP
expired
The boolean value will be false if ValidTo date is past today's date else return true
age
The driver's age based on his ID number
gender
The driver's gender is based on his ID number
url
Full URL for decoded driver's photo.
'NOTE: The photo decoding takes a second or two to be served by the server please allow a delay before retrieving the image.
filename
The file path for decoded driver's photo.