API 7: Verification API
Verification API
Use this API to get the verify status and blockchain details for a results page.
Send the uniqueid from API 1 (Generate QR Code). Other IDs will not work.
| Item | Description |
|---|---|
| Provider Endpoint URI | https://my.veridocglobal.com/api/verification |
| Interface description | Get verify status by API |
| Mode of Interface | RESTFUL API (JSON) |
| Security | Authorization Header: Access Key |
| Supports Multi-Records | No |
| Method(s) | POST |
| Request Body Content-Type | Application/JSON |
Sample verification-api request header:
Request Header
Content-Type: application/x-www-form-urlencodedContent-Length: 0apikey: < To enter API Key as provided by VeriDoc Global >payload: < SHA256 HASH of APIKEYUNIQUEIDSECRETKEY) >
Sample verification-api request body:
Request Body
{"uniqueid": "b6537845-98fa-4e40-82f4-f06e060611e0",}
| Field Name | Description | Mandatory | Comments |
|---|---|---|---|
| uniqueid | Enter uniqueid received in API 1 response | Yes | Use the uniqueid from the Generate QR Code API. This fetches status for that results page. |
Sample verification-api response:
{"uniqueid": "b6537845-98fa-4e40-82f4-f06e060611e0","verificationrequesttimestamp": "06:59 AM 20/01/2022 UTC","verificationstatus": "Verification Successful","reasonforfail": null,"verifyurl": "https://veridocglobal.com/verify/mainnet/TestExtension/b6537845-98fa-4e40-82f4-f06e060611e0","fileurl": "https://drive.google.com/open?id=1SCnzBmOMPLx1H8tK8YzR13L3UGGohb8Z","metadata": "Name: John Smith || Title: Test Analyst || Email: John.Smith@test.com","message": "Verification status retrieved successfully.","returncode": 1,"blockchaindetails": {"blockchaindata": "5a22f60ddfbc47a37a730db4af18510a72209d82ccd78daa92126194efd9ad47||add any data string or uhv here to show in blockchain record","transactionid": "47VIfkaVomLBtAHkHtkJdi","blockchainstatus": "Success","blockchainurl": "https://qldbexplorer.veridocglobal.com/mainnet/tx/47VIfkaVomLBtAHkHtkJdi","blockchaintimestamp": "02:16 AM 13/12/2021 UTC"}}
| Field Name | Description | Comments |
|---|---|---|
| uniqueid | Unique Identifier ID for API Call | |
| verificationrequesttimestamp | Date and timestamp of API call | |
| verificationstatus | Current verification status for results page: Verification Successful OR Verification Failed OR Verification Pending | Successful: All three hashes match. Failed: We could not get or compare the hashes. Pending: We are still securing this uniqueid. Try again later. |
| reasonforfail | This field is one of: null OR S01/S02/S03/S04/S05 error code | null: if Verification is successful. OR All possible reasons for verification failure: S01: Could not get the file from your server. S02: Could not get the file hash from your server. S03: Could not get the hash from VeriDoc Global. S04: Could not get the hash from the blockchain. S05: The file hash and the VeriDoc Global hash do not match. |
| verifyurl | Verify Page URL mapped with QR code uniqueid | |
| fileurl | Link to the file sent for verify. | |
| metadata | Any extra text sent with API 2 (Submit Document). | This is results-page text. It is not the blockchain extra text. That extra text is in blockchain details. |
| message | Verification status retrieved successfully. | See return code for all possible messages. |
| returncode | Refers to the status | 1 - Success “message”: “Verification status retrieved successfully.” OR 0 - Error "message": "Wrong Payload: Please check your payload and ensure that you are entering all parameters required to make the payload string and converting it into a SHA256 unique hash value correctly.” OR 10 - Error "message": "No data found for the uniqueid you have passed in the parameter. Please try again with a different uniqueid." |