For the complete documentation index, see llms.txt. This page is also available as Markdown.

Document update

Updates the metadata of an existing customer document.

This endpoint allows you to modify the document type and description without changing the actual file content. Useful for correcting document categorization or adding additional context.

Endpoint

POST/v2/customer/{customerId}/file/{id}

Link

Request

Path Parameters

Parameter

Type

Description

Required

Example

customerId

string

Customer ID that owns the document.

Yes

"cust_12345"

id

string

Document unique ID to update.

Yes

"doc_abc123"

Headers

Key

Value

Required

Authorization

123

Yes

Content-Type

application/json

Yes

Accept

application/json

Yes

Request Body

All fields are optional - only include fields that need to be updated.

json


Request Fields

Document Update Fields

Field

Type

Required

Description

Example

docType

string

No

Updated document type/category.

"PASSPORT"

info

string

No

Updated description/notes about the document.

"Primary identification document"


Response (200 OK)

Returns the updated document metadata with all current information.

Response Fields

Document Object

Field

Type

Description

Example

id

string

Unique document identifier.

"doc_abc123"

customerId

string

Customer ID who owns the document.

"cust_12345"

fileName

string

Original filename.

"passport_scan.pdf"

size

integer

File size in bytes.

2048576

mime

string

MIME type of the document.

"application/pdf"

docType

string

Updated document type.

"PASSPORT"

info

string

Updated description/notes.

"Primary identification document"

isLock

boolean

Whether document is locked from modifications.

false

createAt

string

Original document creation timestamp.

"2024-05-15T10:30:00Z"

status

string

Current verification status.

"DST_SUBMITTED"

Example Response:

json


Field Details

Document Type Values

Document Type

Description

Common Use

PASSPORT

Passport document

Identity verification

DRIVERS_LICENCE_FRONT

Driver's license (front)

Identity verification

DRIVERS_LICENCE_BACK

Driver's license (back)

Identity verification

GOVERNMENT_ID_FRONT

Government ID (front)

Identity verification

GOVERNMENT_ID_BACK

Government ID (back)

Identity verification

UTILITY_BILL

Utility bill

Address verification

BANK_STATEMENT

Bank statement

Financial verification

INCORPORATION_DOCUMENTS

Business incorporation

Business verification

ARTICLES_OF_INCORPORATION

Articles of incorporation

Business verification

FINANCIAL_STATEMENT

Financial statements

Financial verification

LEASE_AGREEMENT

Lease agreement

Address verification

PAYSLIP

Payslip

Income verification

OPERATION_DOCUMENT

Operation-related

Transaction support

OTHER_1, OTHER_2, OTHER_3

Miscellaneous

Various purposes

Document Status Values

Status

Description

Meaning

DST_APPROVED

Document approved

Verified and accepted

DST_SUBMITTED

Document submitted

Awaiting review

DST_CHANGES_REQUESTED

Changes requested

Requires modifications

DST_REJECTED

Document rejected

Failed verification

DST_MISSING

Document missing

Required document not provided


Examples

Request

bash

Programming Language Examples

Python Update Example

python

JavaScript/Node.js Update Example

javascript

Java Update Example

java

Common Update Scenarios

1. Correct Document Type Example

Scenario: Fix incorrectly categorized document type.

Request:

json

Response:

json

2. Add Detailed Description Example

Scenario: Add more context to a document description.

Request:

json

Response:

json

3. Update Business Document Example

Scenario: Update business incorporation documents with specific details.

Request:

json

Response:

json

4. Minimal Update Example

Scenario: Update only the description without changing document type.

Request:

json

Response:

json

Bulk Update Script Example

Python script for updating multiple documents:

python


Error Responses

  1. Document Not Found:

    json

  2. Customer Not Found:

    json

  3. Unauthorized:

    json

  4. Document Locked:

    json

  5. Invalid Document Type:

    json


Notes

  • Partial Updates: Only include fields that need to be changed

  • Locked Documents: Documents with isLock: true cannot be updated

  • Status Impact: Updating document metadata may affect verification status

  • Audit Trail: Document updates are typically logged for compliance

  • File Content: This endpoint only updates metadata, not the actual file content

Restrictions:

  • ❌ Cannot update locked documents (isLock: true)

  • ❌ Cannot change the actual file content (use upload for replacement)

  • ❌ Cannot modify fileName, size, mime, or createAt fields

  • ✅ Can update docType and info fields for unlocked documents

  • ✅ Can update documents with any status except when locked

Best Practices:

  1. Verify Before Update: Check document status and lock status before updating

  2. Clear Descriptions: Use descriptive info fields for better document management

  3. Consistent Categorization: Use appropriate document types for compliance

  4. Error Handling: Handle all possible error responses gracefully

  5. User Confirmation: Implement confirmation for significant metadata changes

Last updated