Document Validate Service

Document Validate Service (DOCUMENTTRUST_VALIDATE)

Document validation without authority lookup: OCR extraction → format / expiry / cross-field checks → PASS / REVIEW / FAIL decision.

Use this when you only need to verify that a document image is readable and the extracted fields look valid — without calling FRSC, PVC, Passport, or NIN authority APIs.

Related: Document Trust Service (includes authority reconciliation) · Full API Guide


Quick reference

ItemValue
Service SKUDOCUMENTTRUST_VALIDATE
MethodPOST
Path/api/v1/document/validate
Content-Typemultipart/form-data
BilledYes — every completed session (including FAIL decisions)
AuthInstitution secret API key

What it does

  1. Uploads the document image to OCR and extracts identity fields.
  2. Runs classification, format, expiry, and cross-field checks.
  3. Skips all government authority reconciliation.
  4. Returns decision, trustScore, per-check breakdown, and audit evidence.

Authority-related checks appear as skipped in the checks array. The response does not include authorityData.


Request

Form fields

FieldTypeRequiredDefaultDescription
documentImagefileYesFront of document (photo or scan)
documentImageBackfileNoBack of document (stored for audit; not used in OCR v1)
docTypestringNoautoDocument type hint (see below)
customerReferencestringNoYour internal customer or case reference

docType values

ValueDocument
autoAuto-detect
passportInternational Passport
drivers_licenseDriver's Licence
voters_cardPermanent Voter's Card (PVC)
nin_slipNIN Slip

Example request

curl -X POST "https://api.dikript.com/api/v1/document/validate" \
  -H "X-Dikript-Api-Key: YOUR_SECRET_KEY" \
  -F "documentImage=@nin_slip.jpg" \
  -F "docType=nin_slip" \
  -F "customerReference=CUST-002"

Example response

{
  "status": true,
  "message": "Successful",
  "code": "200",
  "transactionRef": "N202608121200005678",
  "apiVersion": "v1",
  "data": {
    "sessionId": "b2c3d4e5f678901234567890abcdef12",
    "customerReference": "CUST-002",
    "decision": "PASS",
    "trustScore": 0.88,
    "mode": "validate",
    "docTypeRequested": "nin_slip",
    "docTypeDetected": "nin_slip",
    "processedAtUtc": "2026-08-12T11:00:00Z",
    "processingDurationMs": 3100,
    "summary": {
      "headline": "Document passed validation checks.",
      "checksPassed": 8,
      "checksFailed": 0,
      "checksReview": 0,
      "checksSkipped": 4
    },
    "checks": [
      {
        "code": "DOC_CLASSIFICATION",
        "category": "classification",
        "status": "pass",
        "message": "Document classified as nin slip.",
        "confidence": 0.92
      },
      {
        "code": "NIN_FORMAT_VALID",
        "category": "format",
        "status": "pass",
        "message": "NIN format is valid.",
        "confidence": 0.98
      },
      {
        "code": "AUTHORITY_RECORD_FOUND",
        "category": "authorityReconcile",
        "status": "skipped",
        "message": "Authority reconciliation skipped in validate mode.",
        "confidence": null
      }
    ],
    "extractedData": {
      "documentType": "nin_slip",
      "fields": {
        "fullName": "JANE DOE",
        "nin": "12345678901"
      }
    },
    "audit": {
      "auditRef": "b2c3d4e5f678901234567890abcdef12",
      "evidenceRetentionUntilUtc": "2033-08-12T11:00:00Z",
      "documentImageHash": "sha256:def456...",
      "documentImagePath": "125215/document-trust/b2c3.../front.jpg"
    }
  }
}

Note: authorityData is omitted in validate mode.


Decisions

DecisionMeaningSuggested action
PASSExtraction and validation checks passedProceed (or run separate authority verification if needed)
REVIEWMinor issue (e.g. expiring soon, type mismatch)Manual review
FAILMissing fields, invalid format, expired documentReject or request resubmission

Billing

HTTP statusBilled?
200 — completed session (any decision)Yes
400 — validation errorNo
401 / 403 — auth or service accessNo
Insufficient balanceNo

Validate mode is typically priced lower than full Document Trust because no authority APIs are called. Confirm pricing in your institution offerings.


Retrieve a session later

Sessions from validate mode are stored under the same session model:

GET /api/v1/document/trust/{sessionId}

Not billed.


Prerequisites

  1. DOCUMENTTRUST_VALIDATE enabled in your institution offerings with pricing.
  2. Sufficient wallet balance or active subscription.

When to use Document Validate vs Document Trust

ScenarioRecommended service
Pre-screen document quality before a full KYC stepDocument Validate
Confirm NIN/passport/licence exists at government sourceDocument Trust
Lower cost per check, no authority API usageDocument Validate
Full auditable trust decision with authority matchDocument Trust

Supported checks (validate mode)

CategoryExamples
ClassificationDOC_CLASSIFICATION, DOC_TYPE_MISMATCH
ExtractionEXTRACTION_COMPLETE, EXTRACTION_FAILED
FormatPASSPORT_FORMAT_VALID, NIN_FORMAT_VALID, VIN_FORMAT_VALID, LICENSE_FORMAT_VALID
ExpiryDOCUMENT_NOT_EXPIRED, DOCUMENT_EXPIRING_SOON
Cross-fieldCROSS_FIELD_CONSISTENT
AuthorityAll *_MATCH_AUTHORITY and AUTHORITY_RECORD_FOUNDskipped

See the full Document Trust API Guide for the complete check code reference.