Documentation

Get Face API

Call this API to get the info of a face by id.

Request Example:

curl -X GET \
  https://sg-api.advance.ai/intl/openapi/face-search/facereferences?id=1 \
  -H 'X-ACCESS-TOKEN:{Your Access Token}'

Request Url

https://sg-api.advance.ai/intl/openapi/face-search/facereferences
GET
ParameterDescription
X-ACCESS-TOKENstring Please use Token Authentication API to get your access token.

Request Parameters

ParameterDescription
idstring the unique id of the face.

Response Description

ParameterDescription
codeenum Status Code.
transactionIdstring The request id, the max length is 64.
pricingStrategyenum Whether the request will be charged, enum type: FREE, PAY
messagestring The error message used to debug.
dataobject The face info. Refer to faceSet.
extraobject Extra response info (Exception Message).

face

ParameterDescription
idstring The unique id of face.
createdAtstring The create time of the faceSet. in the format of ISO 8601 .
lastUpdatedAtstring The last update time of the faceSet. in the format of ISO 8601 .
deletedAtstring The deleted time of the faceSet. in the format of ISO 8601 .
faceImageIdstring The id of face image.
faceImageUrlstring The url of face image. The url will expire in one hour.
externalReferenceIdstring The unique id used to track this request.
idNumberstring The identity number of face.
idCardTypestring The identity card type of face.
countrystring The alpha-2 country code. Refer to ISO ALPHA-2 Country Code .
namestring The name of this face.

Response Code

Status CodeMessage
SUCCESSfree OK.
PARAMETER_ERRORfree Parameter error, please check your request whether has illegal parameters.
ERRORfree Server error.

Response Examples

SUCCESS

{
    "code": "SUCCESS",
    "message": "OK",
    "data": {
        "id": "1",
        "createdAt": "2024-08-08T03:36:48.89",
        "lastUpdatedAt": "2024-08-08T03:36:49.297",
        "deletedAt": null,
        "faceImageId": "66b43d50d5f270562e9f0021.jpg",
        "faceImageUrl": "https://i.pinimg.com/236x/b5/78/1c/b5781c2dc5d552d3764b103987eb2fa6.jpg",
        "externalReferenceId": "8c028f02-7117-4af5-860f-b45c1a8b225a",
        "idNumber": "948",
        "idCardType": "y",
        "country": "BF",
        "name": "Mr. Alyce"
    },
    "extra": null
}

PARAMETER_ERROR

{
    "code": "PARAMETER_ERROR",
    "message": "Face not found, id: 1",
    "data": null,
    "extra": null,
    "pricingStrategy": "FREE"
}