Call this API to enroll a face for a user.
Request Example:
Bash
curl -X POST \
https://sg-api.advance.ai/intl/openapi/identity-risk/idvs-h5/ekyc/v1/face-authentication/enroll \
-H 'Content-Type: application/json' \
-H 'X-ACCESS-TOKEN:{Your Access Token}' \
-d '{
"faceImage": "7ac66c0f148de9519b8bd264312c4d64",
"userId":"8e44f0089b076e18a718eb9ca3d94674",
"region":"PHL"
}'
Indonesia Singapore Philippines Thailand Malaysia Vietnam
https://api.advance.ai/intl/openapi/identity-risk/idvs-h5/ekyc/v1/face-authentication/enroll
POST (application/json)https://sg-api.advance.ai/intl/openapi/identity-risk/idvs-h5/ekyc/v1/face-authentication/enroll
POST (application/json)https://ph-api.advance.ai/intl/openapi/identity-risk/idvs-h5/ekyc/v1/face-authentication/enroll
POST (application/json)https://th-api.advance.ai/intl/openapi/identity-risk/idvs-h5/ekyc/v1/face-authentication/enroll
POST (application/json)https://my-api.advance.ai/intl/openapi/identity-risk/idvs-h5/ekyc/v1/face-authentication/enroll
POST (application/json)https://vn-api.advance.ai/intl/openapi/identity-risk/idvs-h5/ekyc/v1/face-authentication/enroll
POST (application/json)
Parameter Description faceImage string a http url of a image or a string generated by base64 encoding of image bytes.
Refer to Image Requirements region string The region of the user belongs to. Refer to ISO ALPHA-3 Country Code userId string The unique userId to identify the face.
Parameter Description code Status Code transactionId The request id, the max length is 64 pricingStrategy Deprecated, Always return FREEmessage Status Code Explanation data Always null for this API expiredTime Expiration timestampextra Extra response info (Exception Message)
Status Code Message SUCCESS OK PARAMETER_ERROR Parameter error, please check your input. UserId is invalid Face image is empty The Image is null Face image cannot download Face image cannot decode The Image file length is zero Invalid image size, max image size should be less than 2M, and image dimension should be between 256 x 256 and 4096 x 4096 Invalid image format, image format should be one of jpeg/jpg/png, and request content type should be image/jpeg or image/png Region is wrong Too many faces detected No face detected Face quality is too low in the uploaded picture ENROLL_FAILED Enroll failed ERROR Server error
JSON
{
"code": "SUCCESS",
"message": "OK",
"data": null,
"extra": null,
"transactionId": "ed8b21c0c87ad617",
"pricingStrategy": "FREE"
}
JSON
{
"code":"REGION_WRONG",
"message":"Region is wrong",
"data":null,
"extra":null,
"transactionId":"0f74aeb4dd3f1d48",
"pricingStrategy":"FREE"
}
JSON
{
"code":"PARAMETER_ERROR",
"message":"Parameter error,please check you input.",
"data":null,
"extra":null,
"transactionId":"ba134d6112c57a4c",
"pricingStrategy":"FREE"
}
JSON
{
"code":"PARAMETER_ERROR",
"message":"Parameter should not be empty",
"data":null,
"extra":null,
"transactionId":"dfcdc346a81f404f",
"pricingStrategy":"FREE"
}
JSON
{
"code":"ERROR",
"message":"Server error",
"data":null,
"extra":null,
"transactionId":"1deae5a13ef2bd5e",
"pricingStrategy":"FREE"
}