Face · Standard API · eKYC Core
Delete faces
POST/v1/delete_faces
Deletes the given image ids out of a face collection's index and returns the id of the request.
Request
| Name | Type | Required | Description |
|---|---|---|---|
image_ids | []string | Required | image IDs in DB. Should use indexed image |
collection | string | Optional | index faces to this collection |
- If not set collection, default collection will be used.
{
"image_ids": []string,
"collection": string,
}
Sample request
curl -X POST \
https://tv-staging.trustingsocial.com/api/v1/delete_faces \
-H 'Authorization: TV <YOUR ACCESS KEY>:<CREATED SIGNATURE>' \
-H 'X-TV-Timestamp: 2019-04-21T18:00:15+07:00' \
-H 'Content-Type: application/json' \
-d \
'
{
"image_ids": [
"a4facba3-334b-41fb-97e3-4766cb70ae29",
"7db00808-0416-45cf-a5cb-3b6dfbd7bb74"
]
}
'
Response
In case of success, the HTTP status code will be 200, and the data will be an object containing following fields:
| field | type | description |
|---|---|---|
request_id | string | ID of the request (UUID) |
{
"data": {
"request_id": string,
},
"errors": [
{
"code": string,
"message": string,
"detail": {
"field": string, // optional, which parameter is invalid.
... // any other information that can be useful for client
},
},
... // other errors
]
}
A successful delete comes back like this:
{
"data": {
"request_id": "d4493ff5-e41f-4d10-a291-6a9727050b4c"
}
}
Failure codes
In case of error, the data will be empty, and server sends following HTTP status code and error information:
| HTTP code | Error code | Description |
|---|---|---|
401 | access_denied_exception | You are not authorized to perform the action. |
400 | invalid_parameter_exception | Input parameter violates a constraint. |
400 | request_time_too_skewed | The X-TV-Timestamp header is expired, need a newer one. |
404 | image_not_found_exception | The image ID is not found in DB. |
408 | request_timeout_exception | Request takes too long to process |
429 | rate_limit_exception | The number of requests exceeded your throughput limit. |
500 | internal_server_error | Some unexpected error occurs while processing the request |
The codes above are the ones documented for this endpoint. Response errors on the Overview lists the codes for the eKYC Core surface as a whole — the two lists do not match on every endpoint.