Skip to content
veriffy
RUEN

Document data and files

What VERIFFY read from the document, how to download photos and videos, and how to see the course of a verification.

Document data

Shell
curl "https://api.veriffy.me/v1/sessions/{session_id}?include=extracted" \
  -H "Authorization: Bearer $VERIFFY_API_KEY"

Needs the pii:read scope. Every access to personal data is written to the audit log.

Field Description
document_type, document_number The document's type and number
issuing_country, issuing_country_alpha2 The issuing country: the three-letter code from the document and the two-letter code
nationality, nationality_alpha2 Nationality
surname, given_names Surname and given names in Latin script
birth_date, sex Date of birth and sex
issue_date, expiry_date Dates of issue and expiry
personal_number A personal number, for example the IIN in Kazakhstan
address The address, if the document has one
mrz_lines The lines of the machine-readable zone
source Where the data was read from: mrz, barcode or viz (the printed text)

For a Russian internal passport you also get surname_native and given_names_native — the name in Cyrillic — plus place_of_birth and issuing_authority. Such a passport has no expiry date, so expiry_date is derived from the holder's age.

Photos and videos

include=media adds the list of the verification's files. The file itself:

Shell
curl "https://api.veriffy.me/v1/sessions/{session_id}/media/{media_id}?max_side=800" \
  -H "Authorization: Bearer $VERIFFY_API_KEY" -o front.jpg

The max_side parameter — 64 to 2400 — returns a scaled-down JPEG copy. That is handy for lists and mobile screens.

Files are kept for a limited time. The period is set in the dashboard, in the organisation settings. When it ends the file is deleted and the request returns 410 media_purged.

The course of a verification

GET /v1/sessions/{id}/events returns the verification's event log in order: what the user did, what the server answered, what a team member decided.

Field Description
source Who the source is: server, client (the verification page or an SDK) or reviewer
type, step What happened and at which step
device The device and browser
network City, country, provider, and the VPN, Tor and data-centre flags

The IP address and coordinates are visible only to keys with the pii:read scope.

Re-running the checks

POST /v1/sessions/{id}/rerun runs all automatic checks of the current attempt again on the stored photos and videos and replaces the decision. It works only for verifications that already have a decision.

The ?use_current_level=true parameter applies the level's current settings instead of the ones the verification was created with.

Start typing: a section name, a parameter or an error code

↑↓ selectEnter openEsc close