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 ScopeThis guide covers
business_registration(entity documents) andidentity_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_approachingwebhook. - 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_submissionwithcan_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_idvalues 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 ⚙️
- Query pending update requests: Call the query endpoint to retrieve the document update requests that need to be processed, then confirm
document_type,status, andupdate_request_id. - 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. - Submit the update information: Call the submission endpoint with
update_request_id,files, andnew_expiry_date. - Wait for the review result: After a successful submission, the request enters
in_review; once the review is completed, the status changes tocompleted, or torejectedif the whole order is rejected. - 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
| Parameter | Location | Required | Description |
|---|---|---|---|
Authorization | header | Yes | Bearer Token |
dgp-entity-id | header | No | Sub-account (entity) ID. If provided, only requests under that sub-account are returned |
status | query | No | Request 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
| Field | Description |
|---|---|
update_request_id | Document update request ID, which is the {id} of the submission endpoint |
entity_id | Sub-account ID that owns the request |
document_type | Document type: business_registration or identity_document |
status | Request status: pending_submission, in_review, rejected, completed |
expiry_date | Current document expiry date in YYYY-MM-DD format, read-only |
can_submit | Whether the current status allows submitting files |
reject_reason | Whole-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_type | Scenario | fileUseType |
|---|---|---|
business_registration | General entity document | business_license |
business_registration | Hong Kong entity document | company_business_registration_certificate |
identity_document | Entity person document | other |
fileUseType Selection RuleFor
identity_document(entity person documents), always useotheras thefileUseType. 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
| Parameter | Location | Required | Description |
|---|---|---|---|
Authorization | header | Yes | Bearer Token |
dgp-entity-id | header | No | Sub-account (entity) ID. If provided, the request only applies to that sub-account |
id | path | Yes | update_request_id from the query result |
files | body | Yes | Array of file_id values returned by the upload file endpoint |
new_expiry_date | body | Yes | New 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 Status | Submittable | Status After Submission |
|---|---|---|
pending_submission | Yes | in_review |
rejected | Yes | in_review |
in_review | No | No transition; returns 409 REVIEW_IN_PROGRESS |
completed | No | No 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 Expiry | Account Frozen | Submission Still Allowed |
|---|---|---|
pending_submission | Yes | Yes |
in_review | Yes | No |
rejected | Yes | Yes |
completed | No | No |
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_reasonis the whole-order rejection reason. Ifcorrection_instructionis present in the query result or webhook, display it to the user and resubmit accordingly.
Complete Resubmission Is Required After a Whole-Order RejectionIf 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 🔔
| Event | Trigger | Customer Action |
|---|---|---|
entity_document.expiry_approaching | D−30 window opens | Query the request and start the update |
entity_document.expired | Expiry reached without completion and account frozen | Stop restricted business and continue processing the update |
entity_document.materials_required | Whole-order rejection by compliance | Show the reason and resubmit the complete file set |
entity_document.update_succeeded | New document takes effect | Close 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 StateWebhooks 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 📊
| Endpoint | HTTP Status | Business Error Code | Trigger | Customer Action |
|---|---|---|---|---|
| Query | 400 | None | status is not a valid enum value | Use a valid value or omit status |
| Submit | 400 | None | Invalid update_request_id, missing files or new_expiry_date, or invalid date format | Fix the request and retry |
| Both endpoints | 401 | None | Missing or invalid token | Provide a valid token |
| Submit | 404 | None | Update request not found, or the request belongs to another account | Verify update_request_id |
| Submit | 409 | 40901 (UPDATE_WINDOW_NOT_OPEN) | D−30 window is not open | Wait for the notification or query a valid request |
| Submit | 409 | 40902 (REVIEW_IN_PROGRESS) | Request is under review | Stop submitting and wait for the review result |
| Submit | 409 | 40904 (UPDATE_ALREADY_COMPLETED) | Request is completed | Close the local task and do not submit again |
| Submit | 422 | 42203 (FILE_VALIDATION_FAILED) | Files are empty, duplicated, not owned by the account, or invalid | Re-upload and submit |
| Both endpoints | 500 | None | Internal server error | Retry later; contact technical support if it persists |
Core Constraints and Rules 🛡️
KYC Information Is Read-OnlyThis 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_reviewandcompletedrequests cannot be submitted. Resubmitting a request under review returns409 REVIEW_IN_PROGRESS, and resubmitting a completed request returns409 UPDATE_ALREADY_COMPLETED.
The Submission Endpoint Is Not Replay-IdempotentThe request enters
in_reviewimmediately after a successful submission. If the request is already under review, resubmitting does not return the previous successful result; instead, it directly returns409 REVIEW_IN_PROGRESS.
files Must Be File IDs Returned by the Upload EndpointThe
filesarray can only containfile_idvalues 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 allfile_idvalues must belong to the current API customer.
Typical Scenarios 💡
| Scenario | Processing Flow | Expected Result |
|---|---|---|
| New D−30 update request | Receive the expiry reminder -> query pending_submission -> upload file -> submit | Returns 202, status changes to in_review |
| Resubmission after rejection | Query rejected -> resubmit the complete file set based on reject_reason and correction_instruction -> submit | Returns 202, status changes to in_review again |
| Duplicate submission under review | Submit again with the same update_request_id | Returns 409 REVIEW_IN_PROGRESS |
| Duplicate submission of a completed request | Submit a completed request again | Returns 409 UPDATE_ALREADY_COMPLETED |
| Incorrect file ownership | Submit a file_id owned by another account | Returns 422 FILE_VALIDATION_FAILED |
| Expiry reached without completion | Task status is pending_submission, in_review, or rejected at expiry | Account is frozen with DOCUMENT_EXPIRED; submittable statuses can still submit |
| Recovery after approval | DOCUMENT_EXPIRED is the account's only freeze reason | Account is automatically restored |
Updated 16 days ago
