Common API 2 - Address Labeling Detection
Where should I integrate?
To Use
Before sending any Travel Rule request, you should determine at least one vaspCode. This can be selected from the user interface, or the vaspCode can be detected using chain analysis tools. (We won't discuss these tools in detail; the primary recommendation is to provide a dropdown list for users in the withdraw/deposit questionnaire.)
The background of this API is that the vaspCode you selected in the VASP Brand List may have different regional access for verification. You need to check the correct target VASP code using this API. The vaspCode is still necessary, along with address, network, and tag to detect the correct VASP code.
Goal: Invoke this API to get the correct VASP before initiating a Travel Rule request.
POST /api/verify/v2/auto_address_vasp_detection
For further details of the API, refer to the API documentation for /api/verify/v2/auto_address_vasp_detection.
Before On Chain - Address Labeling Detection
In the Before On-Chain case, the txId is null and address is the beneficiary address.
curl --silent --location --request POST "/api/verify/v2/auto_address_vasp_detection" \
--cert-type P12 --cert ./certificate.p12:'[MY_PASSWORD_OF_CERT]' \
--header 'Content-Type: application/json' \
--header "Authorization: Bearer [YOUR LOGIN TOKEN]" \
--header "Connection: keep-alive"
--data-raw "{
\"vaspCode\": \"[VASP Code]\",
\"address\": \"[Beneficiary Address]\",
\"tag\": \"[Tag]\",
\"network\": \"[Network]\",
\"txId\": null
}"
You will get following response:
{
"data": {
"vaspCode": "[VASP Code]",
"publicKey": "[Public Key]"
},
"verifyMessage": "success",
"verifyStatus": 100000
}
After On Chain - Address Labeling Detection
In the After On-Chain case, the txId is required and address is the beneficiary address.
curl --silent --location --request POST "/api/verify/v3/auto_address_vasp_detection" \
--cert-type P12 --cert ./certificate.p12:'[MY_PASSWORD_OF_CERT]' \
--header 'Content-Type: application/json' \
--header "Authorization: Bearer [YOUR LOGIN TOKEN]" \
--header "Connection: keep-alive"
--data-raw "{
\"vaspCode\": \"[VASP Code]\",
\"address\": \"[Beneficiary Address]\",
\"tag\": \"[Tag]\",
\"network\": \"[Network]\",
\"txId\": \"[txId]\"
}"
You will get following response:
{
"data": {
"vaspCode": "[VASP Code]",
"publicKey": "[Public Key]"
},
"verifyMessage": "success",
"verifyStatus": 100000
}
You will receive the VASP Code and public key from this API result. Next, initiate a request to this target VASP. DO NOT use this API for address verification; this API is for optimization purposes only.
- This is a wrapper API that will always return a result.
- You still need to provide the VASP code selected from the dropdown. This will be the default result if this API doesn't correct anything for you.
Example of input:
- VASP:
VASP A - Public Key:
Public Key A
Case 1: Address belongs exact this correct VASP that you selected
Return the VASP A and Public Key A.
Case 2: Address not found in VASP A
Return the VASP A and Public Key A.
This means the address may not belong to VASP A at all, but since this API is not for verification, it will return the default result.
Case 3: Address found, but wrong VASP (Actual belongs to VASP B)
Return the VASP B and Public Key B.