Follow the question structure recommended by Dev Bot before submitting your integration questions.
FacialPhotoRegistered webhook.NOTE. Available for use with a branch access key, a General ADM key and a branch-group key. See the scope rules below.
🚧 Attention! Facial recognition must be enabled for the unit. Otherwise, the API returns 400. The maximum request size is 5 MB. Above that, the API returns 413 (Payload Too Large). HEIC/HEIF files are not accepted. Convert them to JPEG or PNG before sending.
| Parameter | Type | Required | Description |
|---|---|---|---|
| personType | int32 | Yes | Person type: 1 = Member, 2 = Prospect, 3 = Employee, 4 = Personal trainer. Any other value is rejected. |
| idPerson | int32 | Yes | Person identifier. Must be greater than zero. The person must exist in a branch of the same company as the branch resolved by the key; otherwise, the API returns 400. |
| photo | string | Yes | Photo in base64, in PNG or JPEG format. The data:image/png;base64, and data:image/jpeg;base64, prefixes are accepted and removed before sending. Any content that is not valid base64 returns 400. Send the photo as captured, without reprocessing, whenever it fits within the 5 MB limit. Only if it exceeds the limit, resize it: apply the EXIF orientation first, keep the aspect ratio, use a high-quality resampler and save it as JPEG with quality 90, without removing the ICC color profile. |
| idBranch | int32 | Conditional | Identifier of the branch where the photo will be registered. Required for General ADM and branch-group keys; ignored for branch keys. |
| idRegisteringEmployee | int32 | No | Identifier of the employee who made the registration. If provided, must exist and not be deleted. |
| Key type | idBranch behavior |
|---|---|
| Branch | Uses the token's own branch. idBranch is ignored. |
| General ADM | Required, and only for branches of the same company. |
| Branch group | Required, and only for branches of the group the key has access to. |
idBranch is accepted, the record is saved to the informed unit, not to the key's unit.| Field | Type | Description |
|---|---|---|
| success | boolean | Indicates whether the photo was accepted in the validation. |
| message | string | Validation result (e.g., face not detected). |
mensagens field.| Code | Situation | Message in mensagens |
|---|---|---|
| 400 | idBranch not provided with a General ADM or branch-group key | Asks to provide idBranch. |
| 400 | idBranch from another company (General ADM) or without access (branch group) | No permission for the branch. |
| 400 | Branch not found | "Filial não encontrada" |
| 400 | Branch without facial integration | "Filial sem integração facial" |
| 400 | Facial recognition not enabled for the unit | "O reconhecimento facial não está ativado para esta unidade. Procure o suporte para ativar o facial." |
| 400 | personType outside 1 to 4, or idPerson less than or equal to zero | Message of the violated rule. |
| 400 | Empty photo, invalid base64 or prefix other than png or jpeg | "Formato da imagem inválido" |
| 400 | idRegisteringEmployee not found or deleted employee | Message of the violated rule. |
| 413 | Request larger than 5 MB | Payload Too Large |
Error messages are returned in pt-BR.