initialize
Overview
- API URL: /api/v1/zoloz/location/initialize
- API Description: This API initializes the location detection process.
Note:
- Before calling the GeoTrust Locator API, ensure that the client has integrated the SDK for location detection functionality. For details, see App SDK-mode integration.
- This API does not support repeated calls and is therefore not idempotent.
Request Parameter
Field Name | Data Type | Max Length | Mandatory | Fault Value | Description | Sample |
bizId | String | 32 | Y | - | Business ID, the unique identifier of a business transaction, used for business tracking. For example, a serial number from the merchant's business-related database. | "2017839040588699" |
metaInfo | String | 512 | Y | - | Meta information from the SDK and user's device. The value of this field is returned by the ZOLOZ SDK in JSON string format. | { "deviceType": "android", "appVersion": "1.0.9", "osVersion": "9", "appName": "com.zoloz.atomic.client", "bioMetaInfo": "3.46.0:2916352,0", "apdidToken": "69b74bfe-bf7f-4d3b-ac59-907ee09e****", "deviceModel": "MI 6", "zimVer": "1.0.0" } |
userId | String | 64 | Y | - | A user ID provided by the merchant, or any other value that can be used to identify a specific user, such as a phone number or email address. | "123456abcd" |
detectMock | Boolean | - | N | true | Whether to enable simulated location detection. If enabled, the system will detect whether the user is using fake GPS or location spoofing software. Valid values:
| true |
detectVpn | Boolean | - | N | true | Whether to enable VPN connection detection. If enabled, the system will detect whether the user is connecting through a VPN. Valid values:
| true |
geoFenceMatch | List | - | N | - | A geofencing match list used to verify whether the user’s actual location falls within specified administrative regions.
| ["HK", "MO"] |
Response Parameter
Field Name | Data Type | Mandatory | Description | Sample |
result | Y | The result of the API request, including the operation status, result code, and message. | { "resultStatus": "S", "resultCode": "SUCCESS", "resultMessage": "Success" } | |
transactionId | String | N | The unique transaction ID generated by the ZOLOZ server for the location detection process. This ID must be used as an input parameter when calling the GeoTrust Locator Note: The
| "G000000005FID2020030400000000000157****" |
clientCfg | String | N | Client-side configuration data. The SDK will use this configuration to perform subsequent operations. This field must be passed unchanged to the client SDK. Note: It is only returned when | "{...}" |
Result
Perform the next action based on the request result, as follows:
- When the value of
result.resultStatusisS, it indicates that the call to the ZOLOZ GeoTrust Locator initialize API was successful, and a unique transaction ID has been returned. - When the value of
result.resultStatusisF, it indicates that the call to the ZOLOZ GeoTrust Locator initialize API failed. Please check the error code for more information about the error, and analyze the cause of the failure.
API-common Result codes
For the full list of common result codes, see the API common result code.
API-specific Result codes
The result codes for the GeoTrust Locator initialize API are listed in the table below.
resultCode | resultStatus | Description |
SUCCESS | S | API call succeeded. |
HIGH_RISK | F | High risk detected; the user account has been frozen by the risk engine. |
ACCOUNT_SERVICE_SUSPEND | F | The user account has been blacklisted by the risk engine. |
DEVICE_NOT_SUPPORT | F | The current device type is not supported. |
OS_NOT_SUPPORT | F | The operating system of the current device is not supported. |
INVALID_ARGUMENT | F | Invalid input parameters. For details, refer to the |
SYSTEM_ERROR | F | An internal error occurred. For details, refer to the |
METAINFO_NOT_SUPPORT | F | The client version does not support location detection. The 57th bit in |
INVALID_PARAM | F | Request parameter error. |
UNKNOWN | F | Uncategorized system error. |
CONFIG_EMPTY | F | Location configuration is empty. |
Sample
Request Sample
{
"bizId": "2017839040588699",
"metaInfo": "{\"deviceType\":\"android\",\"appVersion\":\"1.0.9\",\"osVersion\":\"9\",\"appName\":\"com.zoloz.atomic.client\",\"bioMetaInfo\":\"3.46.0:2916352,0\",\"apdidToken\":\"69b74bfe-bf7f-4d3b-ac59-907ee09e****\",\"deviceModel\":\"MI 6\",\"zimVer\":\"1.0.0\"}",
"userId": "user_123456",
"detectMock": true,
"detectVpn": true,
"geoFenceMatch": [
"HK",
"MO"
]
}Response Sample
{
"result": {
"resultStatus": "S",
"resultCode": "SUCCESS",
"resultMessage": "Success"
},
"transactionId": "G000000005FID2020030400000000000157****",
"clientCfg": "{\"protocol\":{\"timestamp\":\"1634567890123\",\"signature\":\"xxxxx\"}}"
}