query
Important Notice:
- All request and response parameters are strictly subject to the official API documentation.
- The API response may contain fields not defined in the documentation. These fields are for internal debugging purposes only and are not guaranteed to be stable or compatible. Do not rely on these fields in production environments. ZOLOZ reserves the right to modify or remove these fields at any time without prior notice.
Overview
- API URL: POST /api/v1/zoloz/applicant/query
- API Description: This API is used to query the basic information of an applicant under the current merchant, as well as the document and face KYC data associated with the applicant. It supports querying by either
applicantIdoruserId, and optionally allows returning image data.
Notes:
- This API is a read-only query API and supports repeated calls with the same query criteria, meaning it is idempotent.
- Exactly one of
applicantIdoruserIdmust be provided. If both are provided or neither is provided, the API returnsINVALID_ARGUMENT. - When the KYC data source is Reusable RealID,
sourceis set toREUSEand thedonorClientIdthat provided the data is returned. - Document and face images are returned only when
isReturnImage=Yand the corresponding images exist.
Request Parameters
Field Name | Data Type | Max Length | Required | Default Value | Description | Example |
bizId | String | 32 | Yes | - | A unique business ID for tracing purposes. For example, the sequence ID from the merchant's business-related database. Note: The ZOLOZ server does not perform uniqueness checks on the value of this field. For better tracking, it is strongly recommended to enable the merchant server to guarantee the uniqueness of the business ID. | 2026053000011 |
applicantId | String | 50 | Yes | - | The ZOLOZ applicant ID. Either | APHK_a1b2c3d4e5f6 |
userId | String | 64 | Yes | - | The merchant-side user ID. Either | u_88001 |
isReturnImage | String | 1 | No | N | Whether to return Base64-encoded document and face images. Supported values:
| N |
Response Parameters
Field Name | Data Type | Always Returned | Description | Example |
result | Yes | The API request result, which contains the result status, result code, and result message. | { "resultStatus": "S", "resultCode": "SUCCESS", "resultMessage": "Success" } | |
transactionId | String | No | The transaction ID for this API call, which can be used for business tracking and troubleshooting. Note: The system will only return the
| G000000005FID2020030400000000000157**** |
applicantId | Applicant | No | The applicant's basic information and the associated document and face data. Returned only when | Refer to the Applicant Field Description section. |
Response Rules
Processing Result | Returned Content |
Query Successful | Returns |
Applicant Not Found | Returns |
Query Failed | Returns |
Applicant Field Description
Field Name | Data Type | Always Returned | Description | Example |
applicantId | String | No | The ZOLOZ applicant ID. | APHK_a1b2c3d4e5f6 |
userId | String | No | The merchant-side user ID. | u_88001 |
String | No | The user's email address. May not be returned or may be empty if not set. | user@example.com | |
phone | String | No | The user's phone number. May not be returned or may be empty if not set. | +85291234567 |
documents | List | No | The list of document data associated with the applicant. | Refer to the Document Field Description section. |
faces | List | No | The list of face data associated with the applicant. | Refer to the Face Field Description section. |
Document Field Description
Field Name | Data Type | Always Returned | Description | Example |
source | String | No | The data source. Supported values:
| KYC |
donorClientId | String | No | The Donor Client ID that provided this document data. Returned only when | donor_client_001 |
isShareable | Boolean | No | Whether this document data can be used to create a ShareToken. | true |
certType | String | No | The document type code. | 00000001003 |
certCategory | String | No | The document category.
| PASSPORT |
certNo | String | No | Document number. | P1234567 |
certName | String | No | Name on the document. Note: The OCR format may vary across different document types and may contain leading or trailing spaces. For exact matching, it is recommended to use the | ZHANG SAN |
certCountry | String | No | Issuing country or region name of the document. | Hong Kong |
certCountryCode | String | No | Issuing country or region code (ISO 3166-1 alpha-3 standard). | HKG |
ocrResult | Map | No | The document OCR result details. Different document types return different fields. For more information, see Document types supported and OCR results returned. | { "ID_NUMBER":"P1234567", "NAME":"ZHANG SAN" } |
frontPageImg | String | No | The front page image of the document, encoded in Base64. Returned only when | /9j/4AA..[omitted]..PxA= |
backPageImg | String | No | The back page image of the document, encoded in Base64. Returned only when | /9j/4AA..[omitted]..PxA= |
extraImages | Map<String, String> | No | Additional document images. Returned only when
| { "DOC_FRONT_FLASH":"/9j/4AA..[omitted]..PxA=" } |
Face Field Description
Field Name | Data Type | Always Returned | Description | Example |
| String | No | The data source. Supported values:
|
|
| String | No | The Donor Client ID that provided this face data. Returned only when |
|
| Boolean | No | Whether this face data can be used to create a ShareToken. |
|
| String | No | The face image, encoded in Base64. Returned only when |
|
| Integer | No | Face comparison score. |
|
| Number | No | Face quality score. |
|
| Map<String, String> | No | Face attribute detection results, such as whether a mask or glasses are worn. |
|
| Map<String, String> | No | Additional face images. Returned only when isReturnImage=Y and the relevant images exist.
|
|
Result
For different request results, different actions will be performed. See the following for details:
- When
result.resultCode = SUCCESS: The query was successful. Readapplicantto obtain the applicant and its associated KYC data. - When
result.resultCode = APPLICANT_NOT_FOUND: The applicant corresponding to the providedapplicantIdoruserIddoes not exist or does not belong to the current merchant. - When
result.resultStatus = F: The query failed. Check the returnedresultCodeandresultMessageto identify the specific cause.
Common error codes
For the full list of common error codes, see the Common error codes section in the Error handling topic.
API-specific error codes
The error codes specific to the Reusable RealID query API are listed in the table below.
resultCode | resultStatus | Description |
SUCCESS | S | Applicant query successful. |
APPLICANT_NOT_FOUND | F | The applicant corresponding to the provided |
INVALID_ARGUMENT | F | Invalid input parameters. Possible causes include missing required parameters, field length exceeded, invalid |
SYSTEM_ERROR | F | Internal system error. For error details, check the returned |
Sample
Request Sample
Query by applicantId (without returning images)
{
"bizId": "2026053000011",
"applicantId": "APHK_a1b2c3d4e5f6",
"isReturnImage": "N"
}Query by userId (returning images)
{
"bizId": "2026053000012",
"userId": "u_88001",
"isReturnImage": "Y"
}Response Sample
Successful Response
{
"result": {
"resultStatus": "S",
"resultCode": "SUCCESS",
"resultMessage": "Success"
},
"transactionId": "G000000005FID20200304000000000001570702",
"applicant": {
"applicantId": "APHK_a1b2c3d4e5f6",
"userId": "u_88001",
"email": "user@example.com",
"phone": "+85291234567",
"documents": [
{
"source": "KYC",
"isShareable": true,
"certType": "00000001003",
"certCategory": "PASSPORT",
"certNo": "P1234567",
"certName": "ZHANG SAN",
"certCountry": "Hong Kong",
"certCountryCode": "HKG",
"ocrResult": {
"ID_NUMBER": "P1234567",
"NAME": "ZHANG SAN"
},
"frontPageImg": "<base64-encoded document image>"
}
],
"faces": [
{
"source": "KYC",
"isShareable": true,
"faceScore": 95,
"faceQuality": 88,
"faceImg": "<base64-encoded face image>"
}
]
}
}Failure Response
{
"result": {
"resultStatus": "F",
"resultCode": "APPLICANT_NOT_FOUND",
"resultMessage": "Applicant does not exist."
},
"transactionId": "G000000005FID20200304000000000001570703"
}