### Update User Visual Face Credential (Alternative) Source: https://bs2api.biostar2.com/ This is an alternative example for updating user visual face credentials, demonstrating different template data. ```json template_ex_normalized_image": "/9j/4AAQSkZJRgABAQEASABIAAD/ Truncated", "templates": [ { "template_ex": "AAABAAEAgwFoAbgA6gBl8vryXUdWNip7hwAAnKA+uQBkcAAAOQAAAIZ7eX5/iX2CeH59iXuAgH1vfoWNdop8gIqAfoCIe4iAdYGFenmHgId7fH5+fHN/g3+GgICCgHmCe3mEc3tze4uGdH+IgYt5hIR4dYN4gn+AeoV8b4B8g3qAh4GFiId/f391gYp3foJ2iHp6gXuAg3uBgH+Jg4F8fneHgICEg4aMfH9/fISEgH17iHh4fnp1hIF/fXyBeYaAfn96hXZ8e3R+gX98hYOAf32GeX+Ie3x9d314fHyBgIR6fYKDeIWHf4KDiICFhnuAeoB7gXeEe4B8fnl/h3d5hIJ6fXR5f4aFfXyBe4B+hIRziYN6eYR7eH9/gYCEgHuCgHp4fYOHgoN/eomGh3Z7e4Vzf3qAjYt+gH16gX2Dgn6DfIOAfnZ6hYuAfISKgXiFgHV9d4uBf4iFgHZ5d3x9gXx5gn55hHSCfn6AfYSBhIKIhnSFhYGMen58gYd7gIN2fnl5h4SLgnmHfX2HgYV7gH2Fe4F7h4GBfn98iH+DfYl5gIJ9g319gIV/g4J8gYV/fHt5hIN9i4KEg35+h4eJg4B8fHp7gXl+hYJzf4V6gntxhn9+eoR/fHuDfHx7gIJ4f4SBfH9+doB9d4F/fXaFdHl9eoOEfoWEf3uEhoV0doCCjHt0hXl+coOAg4ODdYSGgIOHh3yBioCEeYx7eXyMf4l/hYF1foWD ``` ```json credential_bin_type": "5" } ] } ] } } } ``` -------------------------------- ### Update User Face Credentials Source: https://bs2api.biostar2.com/ Use this JSON payload to update a user's face credentials. It includes raw image data and multiple templates. Ensure the 'raw_image' value is acquired from a GET request to '/api/users/:id'. ```json { "User": { "credentials": { "faces": [ { "raw_image": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/ This is a truncated RAW Data", "templates": [ { "template": "AAAAgAAAAABq83b11/ Truncated" }, { "template": "AAAAgAAAAACs9nf9Ov5vAxz64gF2/ Truncated" }, { "template": "AAAAgAAAAABY+AP9VfxIB1T5zANF/ Truncated" }, { "template": "AAAAgAAAAABr9I79d/ Truncated" }, { "template": "AAAAgAAAAADM+FX9O/ Truncated" }, { "template": "AAAAgAAAAACZ90T6E/ Truncated" }, { "template": "AAAAgAAAAAAp+eAAtv4QBOz7MgJ5/ Truncated" }, { "template": "AAAAgAAAAAAm+OMHjP9OBZ/ Truncated" }, { "template": "AAAAgAAAAADZ9Un40fkJCKDzsv/ Truncated" }, { "template": "AAAAgAAAAACC9ET98/ Truncated" }, { "template": "AAAAgAAAAADv9jv6m/ Truncated" }, { "template": "AAAAgAAAAACL8834ZPf5B7XxmgLw+1kBifoSEMrp5PIDCx8acwKeCJ7a5gYSA5oDKAkB9UT6Ae17F18EWP1gAlDxW/ Truncated" }, { "template": "AAAAgAAAAAAh+Y8EXvwlAGD6+wOy/ Truncated" }, { "template": "AAAAgAAAAADU8nL8pvcyA6H1lP9P+AABqPw1Du/ Truncated" }, { "template": "AAAAgAAAAAB09TD+u/ Truncated" }, { "template": "AAAAgAAAAADZ/ Truncated" }, { "template": "AAAAgAAAAABi+U78LPkEAUH7LgPs/ Truncated" }, { "template": "AAAAgAAAAAAM/ Truncated" }, { "template": "AAAAgAAAAAD69iL9v/ Truncated" }, { "template": "AAAAgAAAAAAH+jcCd/ Truncated" }, { "template": "AAAAgAAAAAAl+f0ERADdBj/ Truncated" }, { "template": "AAAAgAAAAAAb+9MHIgKaBe36dwFm/ Truncated" }, { "template": "AAAAgAAAAAB6+HYH2P+QBYb42gA2/ Truncated" }, { "template": "AAAAgAAAAABG+gsHjQLuBaX7pf86/ Truncated" }, { "template": "AAAAgAAAAADE96kF5Pz4Bsb4Cv6S/ Truncated" } ] }, { "raw_image": "/9j/4AAQSkZJRgABAQAAAQABAAD/ Truncated", "templates": [ { "template": "AAAAgAAAAABu8qP+lPvSCAj2eQXHAnkBPfqWD/ Truncated" }, { "template": "AAAAgAAAAAA+9R733fQfCmn3UwVfAC0B4fgaEBPsWPJQB3IYmP+jB9ndMgcPCBAJvgp/ Truncated" }, { "template": "AAAAgAAAAACN93D/ Truncated" } ] } ] } } } ``` -------------------------------- ### Device Management Source: https://bs2api.biostar2.com/ Endpoints for managing devices, including retrieval and configuration. ```APIDOC ## GET /devices ### Description Retrieves a list of all registered devices. ### Method GET ### Endpoint /devices ### Parameters #### Query Parameters - **limit** (integer) - Optional - The maximum number of devices to return. - **offset** (integer) - Optional - The number of devices to skip before starting to collect the result set. ### Response #### Success Response (200) - **devices** (array) - A list of device objects. - **device_id** (integer) - The unique identifier for the device. - **name** (string) - The name of the device. - **ip_address** (string) - The IP address of the device. #### Response Example { "devices": [ { "device_id": 501, "name": "Main Entrance Door Device", "ip_address": "192.168.1.100" } ] } ``` -------------------------------- ### Update User Credential: Face Source: https://bs2api.biostar2.com/ Updates the face credentials for a user. It's recommended to retrieve existing credential data using GET /api/users/:id before updating to prevent data loss. To delete a face, omit the credential parameters. ```APIDOC ## PUT /api/users/:id/credentials/face ### Description Updates the face credentials for a specific user. ### Method PUT ### Endpoint /api/users/:id/credentials/face ### Parameters #### Path Parameters - **id** (integer) - Required - The ID of the user whose credentials will be updated. #### Request Body - **User** (object) - Required - Contains user data including credentials. - **credentials** (object) - Required - Contains credential information. - **faces** (array) - Required - A list of face credentials. - **raw_image** (string) - Optional - The raw image data of the face (Base64 encoded). - **templates** (array) - Optional - A list of face templates. - **template** (string) - Required - The template data for a face. ### Request Example ```json { "User": { "credentials": { "faces": [ { "raw_image": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/ This is a truncated RAW Data", "templates": [ { "template": "AAAAgAAAAABq83b11/ Truncated" }, { "template": "AAAAgAAAAACs9nf9Ov5vAxz64gF2/ Truncated" } ] } ] } } } ``` ### Response #### Success Response (200) - **message** (string) - Indicates the success of the operation. #### Response Example ```json { "message": "User credentials updated successfully." } ``` ``` -------------------------------- ### Login and Authorization Source: https://bs2api.biostar2.com/ Endpoints for user authentication and obtaining authorization tokens. ```APIDOC ## POST /login ### Description Authenticates a user and returns an authorization token (session ID). ### Method POST ### Endpoint /login ### Parameters #### Request Body - **username** (string) - Required - The username for authentication. - **password** (string) - Required - The password for authentication. ### Request Example { "username": "admin", "password": "password123" } ### Response #### Success Response (200) - **bs-session-id** (string) - The session ID used for subsequent authorized requests. #### Response Example { "bs-session-id": "a1b2c3d4e5f67890" } ``` -------------------------------- ### Exclude Device Default Authentication Mode Source: https://bs2api.biostar2.com/ Use this to configure specific authentication methods for a user, excluding others. Ensure all desired methods are explicitly defined with their modes and exclude flags. ```json { "User": { "pin": "", "security_level": 0, "private_operation_modes": [ { "operation_method": 2, "operation_mode": 0, "exclude": false }, { "operation_method": 0, "operation_mode": -1, "exclude": true }, { "operation_method": 1, "operation_mode": -1, "exclude": true }, { "operation_method": 3, "operation_mode": -1, "exclude": true } ] } } ``` -------------------------------- ### Upload Visual Face Image Check Source: https://bs2api.biostar2.com/ Use this endpoint to check if an uploaded image is suitable for use as a Visual Face credential. Image file size must be up to 10MB, and supported formats are JPG, JPEG, and PNG. ```json { "User": { "credentials": { "visualFaces": [{ "template_ex_picture": "/9j/4AAQSkZJRgABAQAAAQABAAD/ Truncated" }] } } } ``` -------------------------------- ### Update User with Card Assignment (cURL) Source: https://bs2api.biostar2.com/ This cURL command shows how to assign a card to a user by sending a PUT request with the card ID in the request body. ```curl curl --location --request PUT 'https://127.0.0.1/api/users/101' \ --data '{ "User": { "cards": [ { "id": "30" } ] } }' ``` -------------------------------- ### Update User Visual Face Credential Source: https://bs2api.biostar2.com/ Use this endpoint to update a user's visual face credential. Ensure the correct credential_bin_type is specified for the template data. ```json { "User": { "credentials": { "visualFaces": [ { "template_ex_normalized_image": "/9j/4AAQSkZJRgABAQEASABIAAD/ Truncated", "templates": [ { "credential_bin_type": "5", "template_ex": "AAABAAEAKgHyAaUA1wBj8vP2XEpVQSt0dQAAhQApwwBkcAAAOQAAAIR9eH6CiHmDeIJ+hHp/fX54eoOMdol5f4d9fYGHfoSAfHiAenuJgYZ8g3yAfXmBg36CgoGGhn6Ce3eDeXp3eIWGbnqGfJF4hIl4cX54gX+Ceod8cIJ9g32CgH+AhoeBgH12go57h4F4iXh6g31+gX+BdnyKhYKCfXqLeX2AgomMfYR/foKDgXt7hHp/fXh6g315dnp/f4N8f3h9g3Z+c3J7hH9/gYaFfoGKd3yHeXl/d3+AeXd+fYR8fn2Dd4OGfoF8hIGCgn+DfH+HhXp/e4V9fHiAhXeBgX94f3F6hIeBent8fYCAg4J1hnl+c4F6doZ9g32JhnuDg3l4fXyEg3uEfYmEh3yCf4Z2gH2BgoZ/g3p2hXuIhIOCfYKBfXd8hIeDdYSFfHSDg3R+d4eBeY98gXp1dH59fHyBhXl4hG+Aen2De4OCgIGKhXmFgnuHfH98hIl6fIZ0gIB2homJgHuFf4OKhYZ8hHqFgoB9jYeGgX57iYGCfIV6f4aBfnqAhoV9e4KBgYmDgH55g4Z8hoCDhIR8gIOHfniChIB5hXl/gIV4f4l+g3V5hn5/f45/fHmAgIB5gIR8fYiGeoKBdXZ+eIB+gneDenl+fIGBgIeEf4CCjIJ3eYKCiX13gHh9eIeChX6FdYGFfYSFhn6EhYCGf4h5e4OLfYl9gIN3fYR8 ``` ```json credential_bin_type": "9", "template_ex": "AAABAAEAVgHZAa8A4wAAAAAAWFVLREUAAAAAdVANMQFkcAAAOQAAAIWEdn+Din+Ed4GCg3eAhHl4gX6OdI56foZ7e3yGe4d7d4OIfnaFgYJ/goB7eniCgXx8gYSEhHqBfXp/eoJ2f4GFcYCAfYV7gYZ3d3l4hHqEfI94cYCDg3+Bf397iYyAgHx7gIp4hol2gnx7hYGAe4KGf4J+gYR+fneJd319gouMf4CAgoWKe3p/hH1/g3pygH57eYGCfop/eoCAi3l6c3d7hIaAiICCfnyIc3qCdXx9en2AeH6DgXp9e4CDe4yGfIKEfoKGgXiCgYOEhnl4foCDf3uFg3qBgIF2g3J8foSBeXh7gYOCgYB6iIR9enx7dYR/fX6AgoCCgXh8fXyAeXuAfYmGiXd9f4p2gXqBgoh7hXl8hXuCgoGCgYZ+e3p/hYSBgomLgnOBf3uCe4WEhIx6fnt4eYZ8gnt7hnp7gHqFfoF/fYCAhIKCgnaDenyJf3t+goh4hYV2goN7g4eNfYOBd4KLgoSBh3qAhn5/joGDgYF6gH6HfYlzhop9hH6AeYGAgH9/gIt/iYJ+god9jYOCgoR/g4WCg3WCg4B4hXl8fYR5iYGAg353g3R6fYd7d3WHgX1xf3t4gYWIeYKEe3h8eoOBf3WGdYCChIR7foiDgX56hYh+eX6AiXuBfXiAdomAeoB+doSCf4aFgXmDgX2AfYp9fH2KfIR6foJwfIOB ``` -------------------------------- ### PUT User Credential: Visual Face Source: https://bs2api.biostar2.com/ Manages user visual face credentials. Visual Face is captured with a visual camera and is distinct from infrared camera data. It's supported on devices with Visual Face capabilities. Users can enroll a visual face by scanning with an enrollment device or uploading an image. Up to two visual faces can be added per user. ```APIDOC ## PUT /api/users/:id ### Description Manages user visual face credentials. Visual Face is captured with a visual camera and is distinct from infrared camera data. It's supported on devices with Visual Face capabilities. Users can enroll a visual face by scanning with an enrollment device or uploading an image. Up to two visual faces can be added per user. ### Method PUT ### Endpoint /api/users/:id ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the user. ### Request Body - **credentials.visualFaces** (array) - Required - An array of visual face objects. - **template_ex_picture** (string) - Required - The base64 encoded image data for the visual face. ### Request Example ```json { "User": { "credentials": { "visualFaces": [ { "template_ex_picture": "/9j/4AAQSkZJRgABAQAAAQABAAD/ Truncated" } ] } } } ``` ### Response #### Success Response (200) No response body is returned for a successful request. #### Response Example No response body. ``` -------------------------------- ### User Credential: Face Source: https://bs2api.biostar2.com/ Adds a face credential to a user, provided the device supports face authentication. Follow on-screen instructions for optimal registration. ```APIDOC ## PUT /api/users/:id ### Description Adds a face credential to a user. This functionality is available on devices that support face authentication. It is recommended to follow specific guidelines regarding distance, expression, and appearance for successful registration. ### Method PUT ### Endpoint /api/users/:id ### Parameters #### Path Parameters - **id** (integer) - Required - The ID of the user to add the face credential to. #### Request Body - **User** (object) - Required - Container for user properties. - **faces** (array) - Required - Main container for face credentials. - **:raw_image** (Raw) - Required - Raw image data of the face scan. - **:templates** (array) - Required - Container for face templates. - **::template** (Raw) - Required - Face template data of the user. ### Response No response body. ``` -------------------------------- ### Assign Card Credential to User Source: https://bs2api.biostar2.com/ Use this JSON payload to assign an existing card to a user. The card must first be enrolled and its ID obtained. ```json { "User": { "cards": [ { "id": "30" } ] } } ``` -------------------------------- ### Update User Credentials with Face Data Source: https://bs2api.biostar2.com/ Use this PUT request to update a user's credentials, including their face templates. Ensure the raw_image is correctly formatted and templates are provided in the expected structure. ```curl curl --location --request PUT 'https://127.0.0.1/api/users/102' \ --data '{ \ "User": { \ "credentials": { \ "faces": [ \ { \ "raw_image": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/ This is a truncated RAW Data", \ "templates": [ \ { \ "template": "AAAAgAAAAABq83b11/ Truncated" \ }, \ { \ "template": "AAAAgAAAAACs9nf9Ov5vAxz64gF2/ Truncated" \ }, \ { \ "template": "AAAAgAAAAABY+AP9VfxIB1T5zANF/ Truncated" \ }, \ { \ "template": "AAAAgAAAAABr9I79d/ Truncated" \ }, \ { \ "template": "AAAAgAAAAADM+FX9O/ Truncated" \ }, \ { \ "template": "AAAAgAAAAACZ90T6E/ Truncated" \ }, \ { \ "template": "AAAAgAAAAAAp+eAAtv4QBOz7MgJ5/ Truncated" \ }, \ { \ "template": "AAAAgAAAAAAm+OMHjP9OBZ/ Truncated" \ }, \ { \ "template": "AAAAgAAAAADZ9Un40fkJCKDzsv/ Truncated" \ }, \ { \ "template": "AAAAgAAAAACC9ET98/ Truncated" \ }, \ { \ "template": "AAAAgAAAAADv9jv6m/ Truncated" \ } \ ] \ } \ ] \ } \ } \ }' ``` -------------------------------- ### Update User with Specific Authentication Modes (cURL) Source: https://bs2api.biostar2.com/ This cURL command demonstrates how to send a PUT request to update a user's authentication modes, excluding default device authentication. ```curl curl --location --request PUT 'https://127.0.0.1/api/users/101' \ --data '{ "User": { "pin": "", "security_level": 0, "private_operation_modes": [ { "operation_method": 2, "operation_mode": 0, "exclude": false }, { "operation_method": 0, "operation_mode": -1, "exclude": true }, { "operation_method": 1, "operation_mode": -1, "exclude": true }, { "operation_method": 3, "operation_mode": -1, "exclude": true } ] } }' ``` -------------------------------- ### User Credential: Card Source: https://bs2api.biostar2.com/ Assigns a card credential to a user. The card must be pre-enrolled using `POST /api/cards`. ```APIDOC ## PUT /api/users/:id ### Description Assigns a card credential to a specific user. The card must first be enrolled via the `POST /api/cards` endpoint and can be retrieved using `GET /api/cards` or `GET /api/cards/unassigned`. ### Method PUT ### Endpoint /api/users/:id ### Parameters #### Path Parameters - **id** (integer) - Required - The ID of the user to assign the card to. #### Request Body - **User** (object) - Required - Container for user properties. - **cards** (array) - Required - A list of cards to assign to the user. - **id** (string) - Required - The ID of the card to assign. ### Request Example ```json { "User": { "cards": [ { "id": "30" } ] } } ``` ### Response No response body. ``` -------------------------------- ### Update User Visual Face Credential Source: https://bs2api.biostar2.com/ Use this PUT request to update the visual face templates for a specific user. Ensure the user ID is correctly specified in the URL. ```curl curl --location --request PUT 'https://127.0.0.1/api/users/102' \ --data '{ "User": { "credentials": { "visualFaces": [ { "template_ex_normalized_image": "/9j/4AAQSkZJRgABAQEASABIAAD/ Truncated", "templates": [ { "credential_bin_type": "5", "template_ex": "AAABAAEAKgHyAaUA1wBj8vP2XEpVQSt0dQAAhQApwwBkcAAAOQAAAIR9eH6CiHmDeIJ+hHp/fX54eoOMdol5f4d9fYGHfoSAfHiAenuJgYZ8g3yAfXmBg36CgoGGhn6Ce3eDeXp3eIWGbnqGfJF4hIl4cX54gX+Ceod8cIJ9g32CgH+AhoeBgH12go57h4F4iXh6g31+gX+BdnyKhYKCfXqLeX2AgomMfYR/foKDgXt7hHp/fXh6g315dnp/f4N8f3h9g3Z+c3J7hH9/gYaFfoGKd3yHeXl/d3+AeXd+fYR8fn2Dd4OGfoF8hIGCgn+DfH+HhXp/e4V9fHiAhXeBgX94f3F6hIeBent8fYCAg4J1hnl+c4F6doZ9g32JhnuDg3l4fXyEg3uEfYmEh3yCf4Z2gH2BgoZ/g3p2hXuIhIOCfYKBfXd8hIeDdYSFfHSDg3R+d4eBeY98gXp1dH59fHyBhXl4hG+Aen2De4OCgIGKhXmFgnuHfH98hIl6fIZ0gIB2homJgHuFf4OKhYZ8hHqFgoB9jYeGgX57iYGCfIV6f4aBfnqAhoV9e4KBgYmDgH55g4Z8hoCDhIR8gIOHfniChIB5hXl/gIV4f4l+g3V5hn5/f45/fHmAgIB5gIR8fYiGeoKBdXZ+eIB+gneDenl+fIGBgIeEf4CCjIJ3eYKCiX13gHh9eIeChX6FdYGFfYSFhn6EhYCGf4h5e4OLfYl9gIN3fYR8" }, { "credential_bin_type": "9", "template_ex": "AAABAAEAVgHZAa8A4wAAAAAAWFVLREUAAAAAdVANMQFkcAAAOQAAAIWEdn+Din+Ed4GCg3eAhHl4gX6OdI56foZ7e3yGe4d7d4OIfnaFgYJ/goB7eniCgXx8gYSEhHqBfXp/eoJ2f4GFcYCAfYV7gYZ3d3l4hHqEfI94cYCDg3+Bf397iYyAgHx7gIp4hol2gnx7hYGAe4KGf4J+gYR+fneJd319gouMf4CAgoWKe3p/hH1/g3pygH57eYGCfop/eoCAi3l6c3d7hI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V7gH2Fe4F7h4GBfn98iH+DfYl5gIJ9g319gIV/g4J8gYV/fHt5hIN9i4KEg35+h4eJg4B8fHp7gXl+hYJzf4V6gntxhn9+eoR/fHuDfHx7gIJ4f4SBfH9+doB9d4F/fXaFdHl9eoOEfoWEf3uEhoV0doCCjHt0hXl+coOAg4ODdYSGgIOHh3yBioCEeYx7eXyMf4l/hYF1foWD" }, { "credential_bin_type": "5" } ] } ] } } }' ``` -------------------------------- ### Update User Visual Face Credentials Source: https://bs2api.biostar2.com/ This endpoint allows for the updating of visual face credentials for a specific user. It involves providing normalized image data and associated templates. ```APIDOC ## PUT /api/users/{id} ### Description Updates the visual face credentials for a user. ### Method PUT ### Endpoint /api/users/{id} ### Parameters #### Path Parameters - **id** (integer) - Required - The ID of the user to update. #### Request Body - **User** (object) - Required - Contains user-related data. - **credentials** (object) - Required - Contains credential data. - **visualFaces** (array) - Required - A list of visual face credentials. - **template_ex_normalized_image** (string) - Required - The normalized image data of the visual face. - **templates** (array) - Required - A list of template data for the visual face. - **credential_bin_type** (string) - Required - The type of the credential binary. - **template_ex** (string) - Required - The extended template data. ### Request Example ```json { "User": { "credentials": { "visualFaces": [ { "template_ex_normalized_image": "/9j/4AAQSkZJRgABAQEASABIAAD/ Truncated", "templates": [ { "credential_bin_type": "5", "template_ex": "AAABAAEAKgHyAaUA1wBj8vP2XEpVQSt0dQAAhQApwwBkcAAAOQAAAIR9eH6CiHmDeIJ+hHp/fX54eoOMdol5f4d9fYGHfoSAfHiAenuJgYZ8g3yAfXmBg36CgoGGhn6Ce3eDeXp3eIWGbnqGfJF4hIl4cX54gX+Ceod8cIJ9g32CgH+AhoeBgH12go57h4F4iXh6g31+gX+BdnyKhYKCfXqLeX2AgomMfYR/foKDgXt7hHp/fXh6g315dnp/f4N8f3h9g3Z+c3J7hH9/gYaFfoGKd3yHeXl/d3+AeXd+fYR8fn2Dd4OGfoF8hIGCgn+DfH+HhXp/e4V9fHiAhXeBgX94f3F6hIeBent8fYCAg4J1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ChIR7foiDgX56hYh+eX6AiXuBfXiAdomAeoB+doSCf4aFgXmDgX2AfYp9fH2KfIR6foJwfIOB" } ] }, { "template_ex_normalized_image": "/9j/4AAQSkZJRgABAQEASABIAAD/ Truncated", "templates": [ { "template_ex": "AAABAAEAgwFoAbgA6gBl8vryXUdWNip7hwAAnKA+uQBkcAAAOQAAAIZ7eX5/iX2CeH59iXuAgH1vfoWNdop8gIqAfoCIe4iAdYGFenmHgId7fH5+fHN/g3+GgICCgHmCe3mEc3tze4uGdH+IgYt5hIR4dYN4gn+AeoV8b4B8g3qAh4GFiId/f391gYp3foJ2iHp6gXuAg3uBgH+Jg4F8fneHgICEg4aMfH9/fISEgH17iHh4fnp1hIF/fXyBeYaAfn96hXZ8e3R+gX98hYOAf32GeX+Ie3x9d314fHyBgIR6fYKDeIWHf4KDiICFhnuAeoB7gXeEe4B8fnl/h3d5hIJ6fXR5f4aFfXyBe4B+hIRziYN6eYR7eH9/gYCEgHuCgHp4fYOHgoN/eomGh3Z7e4Vzf3qAjYt+gH16gX2Dgn6DfIOAfnZ6hYuAfISKgXiFgHV9d4uBf4iFgHZ5d3x9gXx5gn55hHSCfn6AfYSBhIKIhnSFhYGMen58gYd7gIN2fnl5h4SLgnmHfX2HgYV7gH2Fe4F7h4GBfn98iH+DfYl5gIJ9g319gIV/g4J8gYV/fHt5hIN9i4KEg35+h4eJg4B8fHp7gXl+hYJzf4V6gntxhn9+eoR/fHuDfHx7gIJ4f4SBfH9+doB9d4F/fXaFdHl9eoOEfoWEf3uEhoV0doCCjHt0hXl+coOAg4ODdYSGgIOHh3yBioCEeYx7eXyMf4l/hYF1foWD" }, { "credential_bin_type": "5" } ] } ] } } } ``` ### Response #### Success Response (200) No response body #### Response Example No response body ```