Entity Document Renewal Guide

When the system generates a document update request for an entity document (business_registration) or an entity person document (identity_document), the integrating party must first upload the new document file and then complete the renewal through the query and submission endpoints.

📘

Current Scope

This guide covers business_registration (entity documents) and identity_document (entity person documents). Based on the current API definition, standalone personal entity documents are not included.


Expiry Reminder and Update Window 🔔

  • 30 calendar days before the document expiry date, the system sends one entity_document.expiry_approaching webhook.
  • The same document is notified only once per expiry cycle. Retries reuse the original event_id.
  • After the event is generated, the update request enters pending_submission with can_submit=true. The customer can upload and submit files immediately without waiting for the document to expire.
  • Customers cannot create update requests. They can only process update_request_id values returned by the query endpoint or webhook.

Core Interaction Flow 📊

sequenceDiagram
    autonumber
    actor User as User
    participant Partner as Partner
    participant DogPay as DogPay

    Note over DogPay, Partner: D−30 window opens
    DogPay->>Partner: Webhook: entity_document.expiry_approaching
    Partner->>DogPay: GET /v2/openapi/openapi/entity-document-update-requests
    DogPay-->>Partner: Return request list (with update_request_id)

    Note over Partner, DogPay: Upload and submit
    Partner->>DogPay: POST /open-api/v1/file/upload
    DogPay-->>Partner: Return file_id
    Partner->>DogPay: POST /v2/openapi/openapi/entity-document-update-requests/{id}/submit
    DogPay-->>Partner: 202, request status changes to in_review

    alt Review approved
        DogPay->>Partner: Webhook: entity_document.update_succeeded
    else Whole order rejected
        DogPay->>Partner: Webhook: entity_document.materials_required
        Partner->>DogPay: Re-upload the complete file set and submit
    end

    Partner->>DogPay: Re-query the request status (authoritative)
    DogPay-->>Partner: Return completed or rejected

    Note over DogPay, Partner: Expiry reached without completion
    DogPay->>Partner: Webhook: entity_document.expired

Standard Workflow ⚙️

  1. Query pending update requests: Call the query endpoint to retrieve the document update requests that need to be processed, then confirm document_type, status, and update_request_id.
  2. Upload the new document file: Call the upload file endpoint to obtain the file_id. Do not pass the local raw file directly to the submission endpoint.
  3. Submit the update information: Call the submission endpoint with update_request_id, files, and new_expiry_date.
  4. Wait for the review result: After a successful submission, the request enters in_review; once the review is completed, the status changes to completed, or to rejected if the whole order is rejected.
  5. Resubmit the complete file set after rejection: Re-upload the complete file set required by the current request and submit it again.

Query Document Update Requests 🔍

GET /v2/openapi/openapi/entity-document-update-requests
ParameterLocationRequiredDescription
AuthorizationheaderYesBearer Token
dgp-entity-idheaderNoSub-account (entity) ID. If provided, only requests under that sub-account are returned
statusqueryNoRequest status filter: pending_submission, in_review, rejected, completed

Results are sorted by expiry date in ascending order, with requests that do not have an expiry date placed last, and then by creation time in descending order. If the status filter is omitted, all document update requests for the current account are returned. data is an empty array when there are no matching requests.


Response Fields

FieldDescription
update_request_idDocument update request ID, which is the {id} of the submission endpoint
entity_idSub-account ID that owns the request
document_typeDocument type: business_registration or identity_document
statusRequest status: pending_submission, in_review, rejected, completed
expiry_dateCurrent document expiry date in YYYY-MM-DD format, read-only
can_submitWhether the current status allows submitting files
reject_reasonWhole-order rejection reason, returned only when status = rejected

Upload the New Document File 📤

Before submission, you must call the Upload File endpoint to obtain the file ID.

document_typeScenariofileUseType
business_registrationGeneral entity documentbusiness_license
business_registrationHong Kong entity documentcompany_business_registration_certificate
identity_documentEntity person documentother
💡

fileUseType Selection Rule

For identity_document (entity person documents), always use other as the fileUseType. The uploaded file content should preferably match the document type submitted during the member's initial registration; if it cannot be confirmed, follow the document type required by the current request.

After a successful upload, save the returned file ID and pass it into the files array of the submission endpoint. The files array can only contain file_id values returned by the upload endpoint. Local file paths are not accepted.


Submit Document Update Files 🚀

POST /v2/openapi/openapi/entity-document-update-requests/{id}/submit
ParameterLocationRequiredDescription
AuthorizationheaderYesBearer Token
dgp-entity-idheaderNoSub-account (entity) ID. If provided, the request only applies to that sub-account
idpathYesupdate_request_id from the query result
filesbodyYesArray of file_id values returned by the upload file endpoint
new_expiry_datebodyYesNew document expiry date in YYYY-MM-DD format

Request example:

{
  "files": [
    "9f1c6d2a-3b4e-4f7a-8c1d-2e5b7a9c0d31"
  ],
  "new_expiry_date": "2027-01-01"
}

On success, the endpoint returns 202, data contains the latest request state, and status is in_review.


Status Transitions

Current StatusSubmittableStatus After Submission
pending_submissionYesin_review
rejectedYesin_review
in_reviewNoNo transition; returns 409 REVIEW_IN_PROGRESS
completedNoNo transition; returns 409 UPDATE_ALREADY_COMPLETED

Expiry Freeze and Recovery ❄️

When expiry_date is reached and the update request has not entered completed, the account is automatically frozen with the freeze reason DOCUMENT_EXPIRED.

Task Status at ExpiryAccount FrozenSubmission Still Allowed
pending_submissionYesYes
in_reviewYesNo
rejectedYesYes
completedNoNo

The freeze does not close the document update request. Requests in pending_submission and rejected can still be submitted, while a request in in_review continues to wait for compliance review. After review approval, the account is automatically restored only when DOCUMENT_EXPIRED is the account's only freeze reason.

The exact timezone and time when the freeze takes effect, the specific capabilities disabled during the freeze, and the handling of existing funds are subject to the platform's later announcements. You may also contact platform support or your account manager for assistance.


Whole-Order Review and Complete Resubmission 📋

  • Compliance supports only whole-order approval or whole-order rejection. Partial approval or partial rejection is not supported.
  • After a whole-order rejection, the request enters rejected, and the customer must re-upload and submit the complete file set required by the current request.
  • After rejection, the customer cannot replace only a single file or reuse files treated as "approved" in a previous round.
  • reject_reason is the whole-order rejection reason. If correction_instruction is present in the query result or webhook, display it to the user and resubmit accordingly.
❗

Complete Resubmission Is Required After a Whole-Order Rejection

If any file does not meet the requirements, none of the files in the current round take effect. The customer must re-upload and submit the complete required file set.


Async Notifications 🔔

EventTriggerCustomer Action
entity_document.expiry_approachingD−30 window opensQuery the request and start the update
entity_document.expiredExpiry reached without completion and account frozenStop restricted business and continue processing the update
entity_document.materials_requiredWhole-order rejection by complianceShow the reason and resubmit the complete file set
entity_document.update_succeededNew document takes effectClose the local task and query the latest status

Webhooks use the existing HMAC signature verification mechanism and at-least-once delivery. Delivery may be duplicated and order is not guaranteed. Use event_id for idempotent processing.

⚠️

Webhooks Are Not the Authoritative State

Webhooks are only status hints. The latest status returned by the query endpoint is the authoritative state for a document update request.

Event payload fields follow the actual live response.


Error Code Summary 📊

EndpointHTTP StatusBusiness Error CodeTriggerCustomer Action
Query400Nonestatus is not a valid enum valueUse a valid value or omit status
Submit400NoneInvalid update_request_id, missing files or new_expiry_date, or invalid date formatFix the request and retry
Both endpoints401NoneMissing or invalid tokenProvide a valid token
Submit404NoneUpdate request not found, or the request belongs to another accountVerify update_request_id
Submit40940901 (UPDATE_WINDOW_NOT_OPEN)D−30 window is not openWait for the notification or query a valid request
Submit40940902 (REVIEW_IN_PROGRESS)Request is under reviewStop submitting and wait for the review result
Submit40940904 (UPDATE_ALREADY_COMPLETED)Request is completedClose the local task and do not submit again
Submit42242203 (FILE_VALIDATION_FAILED)Files are empty, duplicated, not owned by the account, or invalidRe-upload and submit
Both endpoints500NoneInternal server errorRetry later; contact technical support if it persists

Core Constraints and Rules 🛡️

❗

KYC Information Is Read-Only

This flow can only replace the specified document files and update the expiry date. Other KYC fields, including company name, registration number, country or region of registration, business address, director information, and UBO information, cannot be modified through this flow.

❗

Only pending_submission and rejected Can Be Submitted

in_review and completed requests cannot be submitted. Resubmitting a request under review returns 409 REVIEW_IN_PROGRESS, and resubmitting a completed request returns 409 UPDATE_ALREADY_COMPLETED.

⚠️

The Submission Endpoint Is Not Replay-Idempotent

The request enters in_review immediately after a successful submission. If the request is already under review, resubmitting does not return the previous successful result; instead, it directly returns 409 REVIEW_IN_PROGRESS.

🚧

files Must Be File IDs Returned by the Upload Endpoint

The files array can only contain file_id values returned by the upload file endpoint. Local file paths are not accepted. The array must be non-empty, contain no duplicates or blank values, and all file_id values must belong to the current API customer.


Typical Scenarios 💡

ScenarioProcessing FlowExpected Result
New D−30 update requestReceive the expiry reminder -> query pending_submission -> upload file -> submitReturns 202, status changes to in_review
Resubmission after rejectionQuery rejected -> resubmit the complete file set based on reject_reason and correction_instruction -> submitReturns 202, status changes to in_review again
Duplicate submission under reviewSubmit again with the same update_request_idReturns 409 REVIEW_IN_PROGRESS
Duplicate submission of a completed requestSubmit a completed request againReturns 409 UPDATE_ALREADY_COMPLETED
Incorrect file ownershipSubmit a file_id owned by another accountReturns 422 FILE_VALIDATION_FAILED
Expiry reached without completionTask status is pending_submission, in_review, or rejected at expiryAccount is frozen with DOCUMENT_EXPIRED; submittable statuses can still submit
Recovery after approvalDOCUMENT_EXPIRED is the account's only freeze reasonAccount is automatically restored

Did this page help you?