Text Compare - Compare API
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: /api/v1/zoloz/textcompare/compare
API Description: Provides the capability to compare two texts and return a similarity score.
Request Parameters
Field Name | Type | Max Length | Default Value | Description | Example |
bizId | String | 32 | - | Required. 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. | "1759743058709" |
textData1 | String | 512 | - | Required. Text 1 for comparison. | "fff" |
textData2 | String | 512 | - | Required. Text 2 for comparison. | "fff" |
Response Parameters
Field Name | Type | Description | Example |
result | Required. The API request result, which contains information about the result of the API request, such as status and error codes. | { "resultStatus": "S", "resultCode": "SUCCESS", "resultMessage": "Success" } | |
transactionId | String | Optional. Transaction ID Note: The system will only return the
| "G000000006FTC2025100600000014509101****" |
score | Double | Optional. Text comparison score. The score ranges from 0 to 100. Higher scores indicate higher similarity. | "88.2" |
Result
Field Name | Type | Description | Example |
resultCode | String | Required. Result codes:
| "SUCCESS" |
resultStatus | String | Required. Result status:
| "S" |
resultMessage | String | Required. Result message. | "Success" |
Sample
Request sample
POST /api/v1/zoloz/textcompare/compare HTTP/1.1
Content-Type: application/json; charset=UTF-8
Client-Id: 5X67656YXXXXXX
Request-Time: 2025-10-06T21:56:11-0800
Signature: algorithm=RSA256, signature=xxxxxxxxxxxx
{
"bizId": "1759743058709",
"textData2": "fff",
"textData1": "fff"
}Response Sample
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Response-Time: 2025-10-06T21:56:15-0800
Signature: algorithm=RSA256, signature=xxxxxxxxxxxxxxxxxx
{
"result": {
"resultCode": "SUCCESS",
"resultMessage": "Success",
"resultStatus": "S"
},
"score": 88.2,
"transactionId": "G000000006FTC2025100600000014509101****"
}