Remote Enrollment - Fingerprint, Face, or Card

Performs fingerprint, face, or proximity card enrollment remotely. The HTTP method used is POST.

POST /remote_enroll.fcgi

Parameters

  • type (string): Parameter that defines how the registration will be done, being "card", "face" or "biometry" (required).
  • user_id (int): The "user_id" parameter gets the user ID number (Required when "save" is "true").
  • save (boolean): The "save" parameter indicates whether the object (card, face, or fingerprint) should be saved in the device or not. If "save" is "false", the object will be sent to the registered server (if the device is in any online mode). If save is "true", the parameter user_id must be sent in the request and must contain the identification number of an existing user. Default: "false".
  • panic_finger (int): The "panic_finger" parameter receives whether the finger to be registered is a panic finger, with the parameters being 0 or 1.
  • registration (string): The "registration" parameter corresponds to the registration number of the person being registered.
  • msg (string): The "message" parameter is the message that will be shown to the user during registration. When empty, the default message is shown.
  • sync (bool): The "sync" parameter determines whether the remote biometric or facial enrollment will be synchronous or asynchronous. When the enrollment required from the device is synchronous, the return will come as a response and will contain the template of the fingerprint or the picture of the face enrolled in base64 format. When the required registration is asynchronous, the device will send the result as a new POST request with the parameter structure described above, which makes it necessary to configure an endpoint on your server to receive it.
  • auto (bool): The "auto" parameter determines whether remote facial registration will be automatic or manual. When the registration required from the device is automatic, it is not necessary to use the display buttons to confirm the photo registration. After the face is detected and when it is centered, a countdown will start and, when it is finished, the photo will be automatically confirmed. By default, the input value of this parameter is "false".
  • countdown (int): The "countdown" parameter determines the countdown time, in seconds, used for automatic photo registration. By factory default, the input value of this parameter is "5", which corresponds to 5 seconds.

Response

  • When the "type" parameter (above) has the value "biometry", the return will allways consist of success, user_id and device_id. If the enrollment is successful, the return will also have finger_type and the list of fingerprints, containing width, height and image of the fingerprint from each registration step. If the registration fails, the return contains the element error.
  • When the "type" parameter (above) has the value "face" the return will consist of success, user_id, device_id and user_image (if registration is successful) or error (if the registration fails).
  • When the "type" parameter (above) has the value "card" the return will consist of success, user_id, device_id and card_value (if the registration is successful) or error (if the registration fails).

Recommendations of use

  • To perform remote card, face, or fingerprint enrollment asynchronously ("sync" is sent as "false"), the monitor must be previously configured in the device and the corresponding endpoints, implemented in the server.
  • When remote enrollment is required in asynchronous mode with "save" being "true", saving the enrolled face does not generate image data return to the remote server. In this case, retrieving the registered image can be done through the API Face registration, as described in the section Get user picture. Due to the lack of direct result feedback, it is not recommended to perform remote enrollment with this setting.
  • In facial recognition devices, when performing asynchronous remote enrollment, it is recommended to expect the enrollment data through the response sent to the monitor, by the /api/notications/user_image endpoint. Although the /face_create.fcgi endpoint serves the same purpose, its use is restricted to when the device is operating in online mode, which can confuse obtaining the data.

Request Example

Starts remote biometrics enrollment:

$.ajax({
    url: "/remote_enroll.fcgi?session=" + session,
    type: 'POST',
    contentType: 'application/json',
    data: JSON.stringify({
        type:"biometry",
        user_id:123,
        message:"Teste",
        save:true
    })
});

Starts synchronous remote face enrollment:

$.ajax({
    url: "/remote_enroll.fcgi?session=" + session,
    type: 'POST',
    contentType: 'application/json',
    data: JSON.stringify({
        type:"face",
        user_id:123,
        save: true,
        sync: true
    })
});

Starts remote synchronous face enrollment, with automatic photo enrollment with a 3-second countdown:

$.ajax({
    url: "/remote_enroll.fcgi?session=" + session,
    type: 'POST',
    contentType: 'application/json',
    data: JSON.stringify({
        type:"face",
        user_id:123,
        save: true,
        sync: true,
        auto: true,
        countdown: 3
    })
});

POST /cancel_remote_enroll.fcgi

Cancel Remote Enrollment in Progress: This command can be used at any time that it is necessary to interrupt the registration process described above (remote_enroll). The HTTP method used is POST.

Parameters

  • This request has no parameters.

Response

  • This request has no responses.

Request Example

Cancels remote biometrics or card enrollment in progress:

$.ajax({
    url: "/cancel_remote_enroll.fcgi?session=" + session,
    type: 'POST', contentType: 'application/json'
});

POST /card_create.fcgi

When remote card registration occurs in some online mode, the result will come through this endpoint. The HTTP method used is POST and the contentType is application/json.

Parameters

  • user_id (int 64): This number represents the user's id.
  • card_value (int 64): Card number.
  • device_id (int 64): This number represents the id of the device.

Response

  • This request has no response.

Request Example

Example Message:

{
    "user_id": 1,
    "card_value": 132456789,
    "device_id": 935107
}

POST /fingerprint_create.fcgi

When remote biometrics enrollment occurs in some online mode, the result will come through this endpoint and must contain the images (pictures) of the finger captured by the device. The HTTP method used is POST and the contentType is application/json.

Parameters

  • user_id (int 64): This number represents the user's id.
  • finger_type (int): Where 1 if panic finger, or 0 otherwise.
  • device_id (int 64): This number represents the id of the device where the remote card enrollment is taking place.
  • fingerprints (array of JSON objects): List with the captured fingerprint images
  • image (string): This is the binary of the image converted to base64. This binary is a single color bitmap where each byte represents one pixel. Therefore, an image must contain width*height bytes.
  • width (int): Image width.
  • height (int): Image height.

Response

  • This request has no response.

Request Example

Example Message:

{
    "user_id": 1,
    "finger_type": 0,
    "device_id": 935107,
    "fingerprints": [
        {
            "image": "/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAY ... QK5JP3FQw2eE1oQf/9k=",
            "width": 300,
            "height": 200
        },
        {
            "image": "/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAo ... D1odQIroECBAgQIJ/9k=",
            "width": 300,
            "height": 200
        },
        {
            "image": "/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAE ... 8kP5Tl+u4uesqtj/2Q==",
            "width": 300,
            "height": 200
        }
    ]
}

Note: If the terminal is configured to extract templates, the endpoint called will be template_create.fcgi which contains the templates extracted by the terminal.

POST /face_create.fcgi

When remote face registration occurs in some online mode, the result will come through this endpoint and must contain the image of the face captured by the terminal. The HTTP method used is POST and the contentType is application/json.

Parameters

  • user_id (int 64): This number represents the user's id.
  • device_id (int 64): This number represents the id of the device where remote enrollment is taking place.
  • face (array of JSON objects): Object with the data of the registered photo.
  • image (string): It is the binary of the image converted to base64.
  • width (int): Image width.
  • height (int): Image height.

Response

  • This request has no response.

Request Example

Example Message:

{
    "user_id": 1,
    "device_id": 935107,
    "face": {
        "image": "/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAY ... QK5JP3FQw2eE1oQf/9k=",
        "width": 300,
        "height": 300
    }
}