Retrieve a Document Validation
Endpointβ
GET https://api.verifik.co/v2/document-validations/{id}
With this service, you can bring all Document Validations that you have created or if you only want one, you can specify the ID of the document validation and the endpoint will return only the selected validation.
Headersβ
Content-Typeβ
Type: String
Required: Yes
application/json
Authorizationβ
Type: String
Required: Yes
Bearer <token>
Query Parametersβ
idβ
Type: string
Required: Yes
ID of the Document Validation that you want to bring the information.
populates[]β
Type: string
Required: No
Options: appRegistration, projectFlow
Requestβ
- Node.js
- Python
- PHP
- Go
import axios from 'axios';
const options = {
method: 'GET',
url: 'https://api.verifik.co/v2/document-validations/document_validation_123456789',
params: {
'populates[]': ['appRegistration', 'projectFlow']
},
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer <your_token>'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
import http.client
conn = http.client.HTTPSConnection("api.verifik.co")
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer <your_token>'
}
conn.request("GET", "/v2/document-validations/document_validation_123456789?populates[]=appRegistration&populates[]=projectFlow", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://api.verifik.co/v2/document-validations/document_validation_123456789', [
'headers' => [
'Content-Type' => 'application/json',
'Authorization' => 'Bearer <your_token>',
],
'query' => [
'populates[]' => ['appRegistration', 'projectFlow']
]
]);
echo $response->getBody();
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.verifik.co/v2/document-validations/document_validation_123456789?populates[]=appRegistration&populates[]=projectFlow"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Authorization", "Bearer <your_token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(string(body))
}
Responseβ
- 200
- 404
{
"data": {
"_id": "document_validation_123456789",
"age": "25",
"appRegistration": {
"_id": "reg_123456789",
"email": "user@example.com",
"status": "completed"
},
"backUrl": "https://example.com/back",
"client": "client_123456789",
"country": "US",
"createdAt": "2024-01-15T10:30:00Z",
"documentData": {
"firstName": "John",
"lastName": "Doe",
"documentNumber": "123456789",
"birthDate": "1999-01-15"
},
"documentType": "id",
"frontUrl": "https://example.com/front",
"images": {
"frontImage": "base64_encoded_image",
"backImage": "base64_encoded_image"
},
"ocrResults": {
"confidence": 0.95,
"rawText": "US DRIVER LICENSE..."
},
"project": "project_123456789",
"projectFlow": {
"_id": "flow_123456789",
"name": "Example Flow",
"type": "onboarding"
},
"status": "completed",
"updatedAt": "2024-01-15T10:32:00Z",
"validationResults": {
"documentAuthenticity": "passed",
"dataConsistency": "passed"
}
},
"signature": {
"dateTime": "April 11, 2023 12:25 PM",
"message": "Certified by Verifik.co"
}
}
{
"error": "Document validation not found",
"message": "DOCUMENT_VALIDATION_NOT_FOUND"
}
</TabItem>
</Tabs>
### Features
- **Retrieval by ID**: Get a specific document validation using its unique ID
- **Complete Information**: Includes all document validation process details
- **Document Data**: Information extracted from the document (name, number, birth date)
- **OCR Results**: Confidence and extracted text from optical character recognition
- **Images**: Front and back document images in base64
- **Related Data**: Application registration and project flow information
- **Validation Results**: Document authenticity and data consistency
- **Multiple Languages**: Support for JavaScript, Python, PHP, and Swift
- **Error Handling**: Detailed error responses for different scenarios