/updateUserTemplate
Description
The service allows the updating of the biometric template associated with a specific user. Its main function is to synchronize the user's most recent facial template stored in the client's data repository with a new template registered for the user.
Functionality
- userId: Unique identifier for the user, persisted and associated with the corresponding biometric template (oldRegisteredTemplateRaw). Needs to be at least two digits.
- image (Optional): Base64 formatted image obtained from the civil registry for authentication. Becomes mandatory if the registered biometric template (registeredTemplateRaw) is not provided.
- oldRegisteredTemplateRaw: Currently registered template associated with the userId.
- registeredTemplateRaw: New template to be associated with the userId. Must be persisted for future authentications.
Request:
curl --location '{IDENTITY_API_BASE_URL}/services/updateUserTemplate' \
--header 'x-api-key: {API_KEY}' \
--header 'Content-Type: application/json' \
--data '{
"userId": "001",
"oldRegisteredTemplateRaw": "BAIBAQFpWL...",
"newRegisteredTemplateRaw": "BAIBAQG0NRm0d...",
"tracking": {
"extraData": "BQABAQG2gBNjuHN...",
"operationId": "xxxxx-xxxxx-xxxxx-xxxxx-xxxxx"
}
}'
Request parameters:
| Parameter | Type (Content) | Required | Description |
|---|---|---|---|
| userId | String | Yes | Unique identifier for the user. Must be persisted and associated with the corresponding biometric template. Needs to be at least two digits. |
| oldRegisteredTemplateRaw | String (Base64) | Yes | Currently registered template associated with the userId. |
| newRegisteredTemplateRaw | String (Base64) | Yes | New template to be associated with the userId. Must be persisted for future authentications. |
| extraData | String (Base64) | No | Token generated by Mobile/Web SDK. Contains tokenized tracking information. |
| operationId | String (Base64) | No | Operation identifier generated by Mobile/Web SDK. |
Example Response:
{
"timestamp": "2023-05-01T12:34:56.789Z",
"transactionId": "123e4567-e89b-12d3-a456-426614174000",
"serviceResultCode": 0,
"serviceResultLog": "Service request successfully processed"
}
Response fields:
| Identifier | Type | Description |
|---|---|---|
| timestamp | String | Timestamp (UTC) of the response in the format: YYYY-MM-DDThh:mm:ss.SSSZ |
| transactionId | String | Transaction identifier associated with the request processed by the API. |
| serviceResultCode | Integer | Code indicating the overall result of the service execution. See Table 1 - Service Result Code |
| serviceResultLog | String | Descriptive field of the execution result when there is an error or exception. If successful, it indicates the result code description. |