Skip to main content

Technical

How to Fix OCR-Misread Data on an Approved KYC Session

PATCH /v3/session/{session_id}/update-data/ corrects misread OCR fields on a Didit KYC session while it is Approved, Declined, In Review or Kyc Expired. The user does not redo the flow.

How to Fix OCR-Misread Data on an Approved KYC Session

Contents

In this guide

Jump to the part you need.

This page is for teams that approved a Didit KYC session and found a misread OCR field: a date of birth off by one digit, names swapped, a wrong issuing country. One PATCH call corrects the stored record; the user does not repeat the flow, and no new ID, liveness or face match check is billed. If AML is still running, changing a name, date of birth, or nationality can trigger a new AML check billed at $0.20 at list price.

Last updated: November 26, 2026. Prices checked against the live Didit price feed on November 26, 2026.

Correcting misread KYC data on a finished Didit session
QuestionAnswer
EndpointPATCH https://verification.didit.me/v3/session/{session_id}/update-data/
Session statuses acceptedApproved, Declined, In Review, Kyc Expired
Privilegewrite:sessions, sent as x-api-key or as a user-auth token
What you can changeDocument type and number, date of birth, issuing state, first and last name, gender, nationality, marital status, place of birth, address, parsed address, extra fields
What fires afterwardsA data.updated webhook, plus an audit entry with the old and new values
What it does not doIt does not change the session status and it does not re-run ID, liveness or face match
What it costsThe update endpoint has no published per-call price. No new ID, liveness, face match or IP line on the bill. A name, date of birth or nationality change can re-trigger AML at $0.20 per check if screening was still running

Start free in the sandbox at https://business.didit.me/, no sales call. The flow on this page is Free KYC by Didit. For developers, connect Didit to an AI assistant through the MCP server. The update endpoint is documented at Didit docs: Update Session Data API, every list price is on the pricing page, and the full product facts are at https://didit.me/llms-full.txt.

What the update endpoint actually changes

We store the OCR output of an ID document on the session, inside the KYC feature record. That record is what your systems read from GET /v3/session/{session_id}/decision/ and what the Business Console shows. When the document was read cleanly but one field landed wrong, you edit the field. You do not delete the session, you do not create a second one, and you do not ask the person to scan again.

Three things stay fixed. The biometric evidence from liveness and face match belongs to the captured session and is not re-run. The decision payload keeps its shape, so your downstream field mapping does not change. And the status is not touched: a correction is data, not a verdict.

Didit has 4,000+ active customers. The pattern is easy to recognize: the check is approved, the CRM shows a date of birth that cannot be right, and a full retake would cost more in drop-off than the field is worth.

Prerequisites

  • An API key holding the write:sessions privilege, sent in the x-api-key header, or a user-auth token for the same privilege.
  • The session_id of the finished session, as a UUID.
  • A session status of Approved, Declined, In Review or Kyc Expired. Those four are the documented gate.
  • A captured KYC feature record on that session. A session that only ran phone, email or questionnaire steps has no identity record to patch.
  • The node_id of the KYC instance when the workflow captured more than one document.
  • A webhook destination subscribed to data.updated, if your own systems need to hear about the correction.
Didit session lifecycle diagram with the statuses a data correction can be sent from
Only four statuses accept the correction: Approved, Declined, In Review and Kyc Expired. Everything else in this lifecycle sits outside the gate.

Read the session first with GET /v3/session/{session_id}/decision/ and the read:sessions privilege, so you correct values you have actually seen rather than values you assume.

Step by step

  1. Pull the decision and write down the wrong fields. The OCR values sit in id_verifications[]: document_type, document_number, date_of_birth, issuing_state, first_name, last_name, full_name, nationality, address. List only the fields that are wrong, because every field you send overwrites what is stored.

  2. Confirm the status and the record. Check the top-level status field and that the KYC array is populated. If the session is Not Started, In Progress, Expired, Abandoned or Awaiting User, it sits outside the gate and the PATCH is not the right move yet.

  3. Find the node. In a multi-step workflow the same session can hold several KYC instances. Read node_id on each item of id_verifications[] and keep the one whose values are wrong, for example feature_ocr_2.

  4. Put each wrong value into its documented format. date_of_birth as an ISO date, issuing_state as ISO 3166-1 alpha-3, country inside parsed_address as ISO 3166-1 alpha-2, document_type as one of P, ID, DL or RP. Do not send full_name; it is recomputed from the two name fields.

  5. Send the PATCH with only the fields that changed. The call is partial by design: omit a field and it stays as it is.

curl -X PATCH "https://verification.didit.me/v3/session/<SESSION_ID>/update-data/" \
  -H "x-api-key: <API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "first_name": "John",
    "last_name": "Doe",
    "date_of_birth": "1990-01-01",
    "issuing_state": "ESP",
    "extra_fields": { "municipality": "Madrid" }
  }'

For a multi-step workflow, target the instance by adding the node to the query string: PATCH https://verification.didit.me/v3/session/<SESSION_ID>/update-data/?node_id=feature_ocr_2.

  1. Compare the response with the original decision before you accept the correction. Keep the decision you read in step 1. Check that the returned record shows only the fields you meant to change, that full_name recomputed correctly, and that the session status is the same as before. If a field you did not send moved, stop and re-read GET /v3/session/{session_id}/decision/.

  2. Watch for data.updated. A successful update emits the event, and your destination receives it only if you subscribed to that family, because there is no wildcard. Update your own copy from the event or re-read the decision.

Expected output

On success the call returns the updated KYC record. first_name and last_name are stored as you sent them and full_name is rebuilt from them. extra_fields holds the keys you passed and drops any key you sent as null. Then a data.updated webhook fires carrying session_kind as "user" for a KYC session, and the audit trail records which fields changed, the previous and the new value, and the actor email when the call was made with a user-auth token.

Compare that returned record with the decision you saved before the call. The update itself does not change status, so an Approved session stays Approved, an In Review session stays in review, and a Declined session stays declined. If your own system stores a copy of the record, re-read GET /v3/session/{session_id}/decision/ after the update.

Fields you can change, and their formats

Mutable KYC fields on the update-data endpoint
FieldFormatNote
document_typeP, ID, DL, RPPassport, identity card, driver licence, residence permit
document_numberStringThe identifier printed on the document
personal_numberStringNational or personal identifier where the document carries one
date_of_birthISO date, for example 1990-01-01The usual OCR failure: day and month swapped
date_of_issue, expiration_dateISO dateCorrect both when the reader picked up the wrong line
issuing_stateISO 3166-1 alpha-3, for example ESPThree letters, not two
first_name, last_nameStringfull_name is recomputed automatically, do not send it
genderM, F or XSingle letter enum
nationalityStringA change here can re-trigger AML
marital_statusStringFree text as stored on the record
place_of_birthStringFree text
addressFree textTriggers asynchronous re-geocoding
parsed_addressNested object: address_type, city, region, street_1, street_2, postal_code, countrycountry is ISO 3166-1 alpha-2 here, two letters
extra_fieldsObjectSend null on a key to remove that key
Session lifecycle diagram showing that a data edit does not move the session between statuses
A data edit does not redraw any arrow in this lifecycle. A status move is a separate action, either a reviewer decision or PATCH /v3/session/{id}/update-status/.

Failure cases and recovery

HTTP error responses from the update-data endpoint, plus the separate out-of-gate status case in the last row
StatusWhat it meansFix
401Missing or invalid credentialsCheck the x-api-key header and that the key is active in the environment you are calling
403Caller lacks the privilegeThe body reads {"detail": "You do not have permission to perform this action."}. Use a key holding write:sessions
404Session, node_id or record not foundThe session id is wrong, the node does not exist, or that session carries no KYC record to patch. Re-read the decision
400Validation errorInvalid country code, an unknown parsed_address key, or extra_fields not sent as an object. The body returns the field and the message
Status outside the gateThe session is not in one of the four accepted statusesFinish or move the session first, or request a retake with PATCH /v3/session/{id}/update-status/ and new_status: "Resubmitted" when the document itself must be captured again

Side effects: AML and geocoding

Two things can move after a correction, and both are documented.

  • AML can re-run. A change to name, date of birth or nationality can re-trigger screening if AML was still running on that person. That produces a fresh AML result, and a fresh AML line at $0.20 per check on list, $0.192 on Growth and $0.18 on Scale.
  • Geocoding re-runs in the background. A change to address re-runs geocoding asynchronously. Failures there are swallowed, so they never fail the update itself. Re-read the record to see what resolved.

When the wrong field is not on the KYC record

The same correction pattern exists on separate endpoints and privileges for other records.

  • Proof of Address. PATCH /v3/session/{session_id}/update-poa-data/ uses the same status gate and write:sessions privilege. It patches POA fields such as issuing_state, document_type, poa_address and name_on_document.
  • KYB company data. PATCH /v3/session/{session_id}/kyb/{company_uuid}/update-data/ needs write:businesses, has no status gate, and edits both the canonical column and registry_data. Company updates carry the trigger console_registry_edit on data.updated.
  • Entity level data. If the wrong value lives on the user or business entity rather than the session, use /v3/users/{vendor_data}/ or /v3/businesses/{vendor_data}/.

Worked cost example

Take a team that approved 400 KYC sessions in a month and later found a misread field on every one. The instinct is to ask each person to verify again. Price that out at list prices from the live feed.

  • A full KYC check is $0.33, and it is four lines: ID document $0.15 + passive liveness $0.10 + face match 1:1 $0.05 + device and IP analysis $0.03.
  • 400 redos x $0.33 = $132.00.
  • On Growth the same check is $0.3168: 400 x $0.3168 = $126.72. On Scale it is $0.297: 400 x $0.297 = $118.80.
  • The correction path adds no ID, liveness, face match or IP line, because none of those checks run again. The avoided spend at list is $132.00.
  • If the edit touches name, date of birth or nationality while AML is still running, that screening is billed: 400 x $0.20 = $80.00 at list, 400 x $0.192 = $76.80 on Growth, 400 x $0.18 = $72.00 on Scale.

So on the correction path the only documented additional bill is the AML line, and whether that check is billed depends on whether AML was still running when the edit arrived. The endpoint itself carries no published price, so treat that line as the documented extra rather than a fixed ceiling.

The update endpoint itself has no published per-call price in the Didit price feed. The billing condition that matters is AML: if a name, date of birth or nationality edit re-triggers screening while it is still running, that check is billed at $0.20 list, $0.192 on Growth and $0.18 on Scale, the same unit prices used in the worked example above. Those two lines are the only ones the correction path can add, so the sections below do not repeat the table.

Where the review boundary sits matters as much as the price. Correcting a field is not a decision. An In Review session stays In Review until a reviewer opens it in the Console and approves, declines or requests a resubmission. A Declined session stays Declined after a correction, because the update endpoint returns data and not a verdict. To move the status, use PATCH /v3/session/{id}/update-status/ or let a reviewer decide. A Kyc Expired session is still expired after a correction, and correcting an expiry date field is not the same as a new verification.

That separation is deliberate. The audit trail shows a data edit with its old and new values, and it shows the reviewer decision as a separate event, so an auditor can tell which one happened.

Sources

The next step is small: create a sandbox session at https://business.didit.me/, approve it, then send one PATCH with a changed date of birth and watch the data.updated event arrive. Sandbox testing is free and nothing in that loop needs a sales call.

Try it

Try this in the sandbox

Run the check this guide describes, free.

ID Verification

The product this post is about, taken from its topic. Run it free in the sandbox.

$0.15 per checkStart free

Author

Alberto Rosas

Co-founder and CEO

Alberto Rosas

Alberto Rosas

Co-founder and CEO

About Didit

Questions

Frequently asked questions

Can I fix a wrong date of birth on a verified ID without asking the user to verify again?

Yes. Send date_of_birth in ISO format to PATCH /v3/session/{session_id}/update-data/ while the session is Approved, Declined, In Review or Kyc Expired. The stored KYC record is corrected in place, full_name stays consistent, and no document capture, liveness or face match runs again.

Which session statuses accept the update?

The documented gate is Approved, Declined, In Review and Kyc Expired. Sessions in Not Started, In Progress, Expired, Abandoned or Awaiting User fall outside it, so finish the session first or request a resubmission.

Does correcting OCR data change the session decision?

No. The update endpoint edits fields and fires data.updated, and it does not change the status. A Declined session stays declined and an In Review session still needs a human decision. Status changes go through PATCH /v3/session/{id}/update-status/ or a reviewer in the Console.

Do I have to send every field in the PATCH body?

No. The endpoint uses PATCH semantics: only the fields you send are updated, and anything you omit is left as it is. To delete a single key inside extra_fields, send null for that key rather than an empty object.

What happens to full_name when I change first_name or last_name?

It is recomputed automatically from the two name fields. Do not send full_name in the request body, and re-read the record if your own system stores a copy of the full name.

Which country format do I use for issuing_state and for the address?

issuing_state takes ISO 3166-1 alpha-3, so Spain is ESP. The nested country inside parsed_address takes ISO 3166-1 alpha-2, so Spain is ES. A wrong format comes back as a 400 with the field name in the body.

How do I target the right document in a multi-step workflow?

Pass node_id as a query parameter or body parameter, for example node_id=feature_ocr_2, taken from the matching item in id_verifications[]. A node that does not exist on that session returns 404.

Which webhook fires when session data is edited?

data.updated. For a KYC session the event carries session_kind: "user", and for a KYB session session_kind: "business". There is no wildcard on webhook subscriptions, so include that event family in your destination if you need it.

Will fixing a name, date of birth or nationality re-trigger AML?

It can, if AML screening was still running on that person. The new screening result is billed as a normal AML check at $0.20 list, $0.192 on Growth or $0.18 on Scale. If screening had already completed, the edit does not create another run.

Can a failing geocode make the address update fail?

No. Address changes re-run geocoding asynchronously and those failures are swallowed, so the update succeeds regardless. Re-read the record afterwards to see the resolved address.

Is there an audit trail for the correction?

Yes. The audit record lists the changed fields with their previous and new values, and for calls made with a user-auth token it also stores the actor email. That record sits next to the original session decision, so the correction does not erase the original read.

Does the same approach work for a misread utility bill or a registry entry?

Yes, on separate endpoints. Proof of Address uses PATCH /v3/session/{session_id}/update-poa-data/ with the same gate and privilege, and KYB company data uses PATCH /v3/session/{session_id}/kyb/{company_uuid}/update-data/, which has no status gate and needs write:businesses.

Compliance built in

Audited, certified and attested.

We hold the certifications and build each country's rules into your flows, so you can launch anywhere without worrying. Security and Compliance center

  • Regulation encoded into your flows

    Tell us what you do and where. Didit lists the rules that apply to you, with sources, and builds the checks each country needs into one workflow.

  • Ready for AMLR

    Every requirement of the new EU anti-money laundering rules, from checking customers to human review, is already covered by a Didit check.

  • Tested in Spain's Treasury sandbox

    Spain's Treasury published its supervised sandbox report on Didit's NFC plus active liveness onboarding; SEPBLAC took part and valued the added measures positively.

  • Audited, not self-declared

    iBeta Level 1 and Level 2. Liveness tested under ISO/IEC 30107-3.

Compliance assistant

Your obligations · 3 regions

EU · AMLRCustomer due diligence, human reviewCovered
Illinois, Texas, ColoradoExplicit biometric consentCovered
Germany · Youth protectionVerified adults only (JMStV)Covered
Workflow checked. Every obligation is met
  • SOC 2 Type 2
  • ISO 27001
  • iBeta Level 1 and Level 2
  • EU regulator attestation
  • FSM youth protection
  • GDPR
  • EBA remote onboarding
  • MiCA compatible
  • FIDO Alliance member
  • AMLREU AML Regulation ready

Integration · Didit MCP

Run Didit from your own AI agent

Connect Didit to Claude, Cursor, VS Code or ChatGPT and just ask in plain words. Your agent can do anything you can do in the console, with the same permissions you have.

Add to ClaudeChatGPT
Didit Academy · Lesson 04 · Use Didit with MCP
  • Build workflowsDescribe the checks you need. The agent creates and publishes the flow.
  • Run investigationsAsk why a session was declined, review cases, search people and companies.
  • Change rulesCreate payment rules, test them on past data and switch them on.
  • Pull reportsAsk for numbers, exports or the audit log.

Verify your first user today.

Start free

Free sandbox. Credit applies to work-email sign-ups.