Use APIs with Back Office
Call Datakeen's Document API from your own application and review results in the back office
This guide explains how to use Datakeen's Document API from your own screens and applications while saving the results to the Datakeen back office for manual review. This approach gives you full control over the user experience while leveraging Datakeen's AI and back office for verification.
When to use this approach
Use the Document API with back office integration when you want to:
- Build your own UI for document capture and verification
- Keep your existing screens and plug Datakeen in as a verification backend
- Review results manually in the Datakeen back office alongside journey sessions
- Group multiple API calls for the same customer into a single file
Step 1: Save API results to the back office
When making API calls to the Document API, add the save parameter to store results in your Datakeen back office.
Example for reco/id:
{
"paramDict": {
"files": [
"data:image/jpg;base64,A13...",
"data:image/jpg;base64,B45..."
],
"userInput": {
"firstName": "Jean",
"lastName": "Dupont"
},
"save": true
}
}Example for reco/bankdetails:
{
"paramDict": {
"file": "data:image/jpg;base64,A13...",
"userInput": {
"firstName": "Jean",
"lastName": "Dupont"
},
"save": true
}
}This feature requires both an API access and a platform account.
In the API response you will receive:
- A verificationId β the unique identifier for this verification in the back office
- A verificationUrl β a direct link to view the verification
Step 2: Group API calls for the same customer
If you need to verify multiple documents for the same person or entity, you can group them together using a correlation id header.
Set a X-Correlation-ID header on all API calls for the same customer. This groups them automatically in the back office.
X-Correlation-ID: MYCOMPANY-customer-12345
The Correlation-ID can be:
- A unique identifier you generate for each customer file (e.g.
MYCOMPANY-a71644665544000) - An anonymous identifier linked to your internal customer or file ID
Use the same Correlation-ID across all HTTP requests linked to the same customer.
If you use a X-Correlation-ID in your headers, the verificationId in the response will match your Correlation-ID.
Step 3: Review results in the back office
- Connect to your Datakeen back office
- Navigate to Analysis in the left sidebar
- Find the analysis using the verificationId or Correlation-ID (use the search bar)
- Review all extracted data and AI controls in the "By folder" view β all documents for the same customer are grouped together
Step 4: Set up a webhook for decision events
To get notified when an analyst reviews a verification:
- Go to Settings β Integration in the left sidebar
- Enter the webhook URL where you want to receive events
Every time a user manually validates or rejects an analysis, you will receive a POST request:
{
"analysisId": "680a29939ae31600116ae34b",
"correlationId": "TEST-123456",
"sesssionId": "ca43a641d3a8e702dc2dbcd4",
"newStatus": "user_rejected"
}Possible values for newStatus:
| Status | Meaning |
|---|---|
| user_approved | The analyst approved the provided documents |
| user_rejected | The analyst rejected the provided documents |
Next steps
- See the Document API for the full list of supported document types and endpoints
- See Authentication for how to obtain an API token
- See Analytics for more on reviewing results in the back office
Updated 2 days ago
