Saltar al contenido principal

/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

  1. userId: Unique identifier for the user, persisted and associated with the corresponding biometric template (oldRegisteredTemplateRaw). Needs to be at least two digits.
  2. image (Optional): Base64 formatted image obtained from the civil registry for authentication. Becomes mandatory if the registered biometric template (registeredTemplateRaw) is not provided.
  3. oldRegisteredTemplateRaw: Currently registered template associated with the userId.
  4. 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:

ParameterType (Content)RequiredDescription
userIdStringYesUnique identifier for the user. Must be persisted and associated with the corresponding biometric template. Needs to be at least two digits.
oldRegisteredTemplateRawString (Base64)YesCurrently registered template associated with the userId.
newRegisteredTemplateRawString (Base64)YesNew template to be associated with the userId. Must be persisted for future authentications.
extraDataString (Base64)NoToken generated by Mobile/Web SDK. Contains tokenized tracking information.
operationIdString (Base64)NoOperation 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:

IdentifierTypeDescription
timestampStringTimestamp (UTC) of the response in the format: YYYY-MM-DDThh:mm:ss.SSSZ
transactionIdStringTransaction identifier associated with the request processed by the API.
serviceResultCodeIntegerCode indicating the overall result of the service execution. See Table 1 - Service Result Code
serviceResultLogStringDescriptive field of the execution result when there is an error or exception. If successful, it indicates the result code description.