### Get Labels - Response Examples Source: https://docs.identia.pe/identiasign/identiasign Provides examples of successful responses when retrieving labels. A 206 Partial Content response includes a 'last_item' for further pagination, while a 200 OK indicates a full query result. ```json { "labels": [ // Lista parcial de procesos de firma ], "last_item": { "label": "etiqueta de ejemplo", "usr_id": "usr_id_example" } } ``` ```json { "labels": [ // Lista completa de procesos de firma ] } ``` -------------------------------- ### Callback Payload Example Source: https://docs.identia.pe/identiasign/identiasign An example of a payload sent to the urlCallback, detailing signer information, document status, and timestamps. ```json { "signers_search": ["PER:11111111"], "sign_order": false, "status": "signed", "expire": 1737298031, "documents": [ { "name": "Documento de firma de prueba-1.pdf", "id": "abc123", "pages": 1, "url": "http://example.com" } // Additional documents ], "signers": [ { "nat": "PER", "stampPositions": { "0": {} }, "contactInfo": { "type": "email", "value": "soporte@toc.pe", "tz": "-05:00", "notified": false }, "sign_data": { "signAction": "sign", "facial": { "result": true, "msg": "success", "id": "aaaaaaa.bbbbb.ccccc", "expire": 1734706137, "selfie": "PER_11111111" }, "date": 1734706127, "result": "sign" }, "pinfo": { "given_name": "", "family_name": "" }, "signatureType": "advanced", "signChallenges": ["facial", "signAction"], "doc_id": "11111111" } // Additional signers ], "date": 1734706031, "urlCallback": "", "labels": [], "readChallenges": ["signerId"], "description": "EJEMPLO", "id": "ddddd:eeeeee", "nat": "PER", "per_id": "11111111" } ``` -------------------------------- ### Identia PE GET Request Example Source: https://docs.identia.pe/biometria/api Example of a GET request to the /api/id_process endpoint with various query parameters to filter identification processes. This demonstrates how to specify date ranges, status, results, and last item for pagination. ```http GET /api/id_process?creation_start=20230101T12:00:00+00:00&result=true&last_item={"id":"abcxyz", "fecha_creac":" 20230122T11:43:53+00:00"}&description=["Aplicativo:PCDI"] HTTP/1.1 Host: api.identia.pe Authorization: Bearer YOUR_ACCESS_TOKEN ``` -------------------------------- ### Identia PE API Response Example (200 OK) Source: https://docs.identia.pe/biometria/api Example JSON response for a successful GET request to the /api/id_process endpoint. It includes details about identification processes such as access counter, challenges, client ID, confidence, and dates. ```json { "id_process": [ { "access_counter": 1, "challenges": [ ["liveness:selfie", "match:ocr:id", "match:portrait:selfie"] ], "challenges_retries": { "liveness:selfie": 0, "match:ocr:id": 0, "match:portrait:selfie": 0 }, "client_id": "2cf5Jc....N6Ghkyp", "confidence": 0.7178097, "date": "2024-11-28T18:25:04-05:00", "description": "Aplicativo:PCDI Canal:test", "details": { "liveness": { "selfie": { "confidence": 0.7178097, "result": true } }, "match": { "ocr": { "id": { "confidence": 1, "result": true } }, "portrait": { "selfie": { "confidence": 0.9734558868408203, "result": true } } } }, "doc_id": "11111111", "doc_type": "", "exp": "2024-11-28T18:40:04-05:00", "fec_result": "2024-11-28T18:25:51-05:00", "id": "dddddd.eeeeeee.ffffff", "max_tries": 3 } ] } ``` -------------------------------- ### Consume SignTimeStamp API with cURL Source: https://docs.identia.pe/firma/api_firma_jwt This snippet demonstrates how to use cURL to call the SignTimeStamp API. It includes the POST request, endpoint, headers, and the multipart/form-data for the 'tsq_file'. Note: The endpoint in the example seems to be for signing a PDF rather than timestamping, but it's presented as a consumption example. ```bash curl -X POST https://www.dactilar.toc.pe/api/v3/signPDF \ -H "Accept: application/json" \ -H "Authorization: Bearer tbx2XFgUKCbQs1iz0spaxe0NT…SBE5ymHrRPHIL30QeP9bWXhr1n" \ -H "Content-Type: multipart/form-data \ -F "tsq_file=@ request.tsq" \ ``` -------------------------------- ### Bad Request Example Source: https://docs.identia.pe/identiasign/identiasign An example of a 'Bad Request' response, indicating an incorrect or incomplete request. ```text bad request ``` -------------------------------- ### IdentiaPe API Request Example (JSON) Source: https://docs.identia.pe/identiasign/identiasign An example JSON payload demonstrating the structure of a request to the IdentiaPe API for signing PDF documents. This includes file uploads, signer details, and expiration settings. ```json { "pdfFiles": "archivo(s).pdf", "signers": [ { "nat": "PER", "doc_id": "12345678", "signatureType": "advanced", "signChallenges": ["facial"], "stampPositions": { "$fileIndex": { "$pageNumber": { "x":1, "y":1, "size":8, "orientation":"horizontal" } } }, "contactInfo":{ "type":"email", "value":"example@example.com", "tz":"-05:00" } } ], "expire": 3600, "link_expire": 3600, "description": "Example description" } ``` -------------------------------- ### Create/Modify Labels - Response Examples Source: https://docs.identia.pe/identiasign/identiasign Shows the expected responses for the create/modify labels endpoint. A 200 OK indicates success, while a 400 Bad Request signifies an issue with the request. ```text ok ``` ```text bad request ``` -------------------------------- ### Get Signed PDF (Async) Source: https://docs.identia.pe/firma/api_firma_jwt Retrieves a signed PDF document when the signing process was initiated asynchronously. ```APIDOC ## GET /getSignedPDF ### Description Retrieves the signed PDF document when the signing process was initiated asynchronously using the 'async' parameter in the sign endpoint. ### Method GET ### Endpoint /getSignedPDF ### Parameters #### Path Parameters None #### Query Parameters - **transaction_id** (string) - Required - The unique identifier for the signing transaction obtained from the initial sign request. - **binary_resp** (integer) - Optional - Set to 1 to receive the response as a binary file (.pdf). Default is 0 (base64 encoded). ### Request Example ``` GET /getSignedPDF?transaction_id=txn_abcdef1234567890&binary_resp=1 ``` ### Response #### Success Response (200) - **signed_pdf** (string/binary) - Base64 encoded signed PDF or binary PDF file, depending on the `binary_resp` parameter. #### Response Example ```json { "signed_pdf": "JVBERi0xLjQKJeHh..." } ``` ``` -------------------------------- ### Example Personal Info for Identification Source: https://docs.identia.pe/biometria/api This JSON string demonstrates how to provide personal information for an identification process when the integration requires data comparison against a source. It includes fields for given name and family name. ```json { "personal_info":{"given_name":"Nombre1 Nombre2", "family_name":"Apellido1 Apellido2"} } ``` -------------------------------- ### GET Facial Records with Parameters (JSON Example) Source: https://docs.identia.pe/biometria/api This snippet demonstrates how to construct a GET request to retrieve facial records from the Identia.pe API. It includes optional parameters like creation_start, nat, per_id, last_item, and limit for filtering and pagination. The response shows the structure of the returned facial data. ```json { "creation_start": "20230101T12:00:00+00:00", "nat": "PER", "per_id": 012345678, "last_item": {"id": "abcxyz"}, "limit": 10 } ``` -------------------------------- ### Authentication API - Get Token Source: https://docs.identia.pe/firma/api_firma_jwt Obtain a JWT token by providing user credentials. This token is required to authenticate subsequent API requests. ```APIDOC ## POST /api/v3/auth/token ### Description Authenticates a user and returns a JWT token. ### Method POST ### Endpoint https://www.dactilar.toc.pe/api/v3/auth/token ### Parameters #### Header Parameters - **Content-type** (string) - Required - `application/json` - **Accept** (string) - Required - `application/json` #### Request Body - **email** (string) - Required - The email address of the user. - **password** (string) - Required - The password of the user. ### Request Example ```json { "email": "usuario@correo.com", "password": "123456" } ``` ### Response #### Success Response (200) - **token** (string) - The JWT token for authentication. #### Response Example ```json { "token": "ge7WW1symmCfMTNwKJFafsdaiR….bQ1T5FAyzajRZlr6p7WqjOX" } ``` #### Error Response - **error** (string) - An error message if authentication fails. #### Response Example ```json { "error": "invalid_credentials" } ``` ``` -------------------------------- ### Query Activity Logs (GET /api/logs) Source: https://docs.identia.pe/biometria/api This snippet demonstrates how to query activity logs using the GET method of the /api/logs endpoint. It includes common parameters like creation_start, group, last_item, and limit, which are used to filter and paginate the log data. ```JSON { "creation_start": "20230101T12:00:00+00:00", "group": "reniec", "last_item": {"usr_id":"abcxyz", "date":12345678}, "limit": 10 } ``` -------------------------------- ### GET /api/labels Source: https://docs.identia.pe/identiasign/identiasign Retrieves a list of labels, optionally paginated. Use 'last_item' to continue listing from a specific point. ```APIDOC ## GET /api/labels ### Description Retrieves a list of labels. Supports pagination using `limit` and `last_item` query parameters. ### Method GET ### Endpoint /api/labels ### Parameters #### Query Parameters - **limit** (integer) - Optional - The number of labels to return. - **last_item** (string) - Optional - A JSON stringified object obtained from a partial label listing, used to continue the enumeration from that element. ### Response #### Success Response (206 Partial Content) Returned when a partial list of labels is successfully retrieved. The `last_item` can be used to continue the search. - **labels** (array) - A list of label objects. - **last_item** (object) - An object representing the last item in the partial list. - **label** (string) - The name of the label. - **usr_id** (string) - The user ID associated with the label. #### Success Response (200 OK) Returned when a complete list of labels is successfully retrieved. - **labels** (array) - A list of all label objects. #### Response Example (206 Partial Content) ```json { "labels": [ // Lista parcial de procesos de firma ], "last_item": { "label": "etiqueta de ejemplo", "usr_id": "usr_id_example" } } ``` #### Response Example (200 OK) ```json { "labels": [ // Lista completa de procesos de firma ] } ``` #### Error Response (400 Bad Request) Returned for incorrect or incomplete requests. ``` bad request ``` ``` -------------------------------- ### Get Labels - Request Query Parameters Source: https://docs.identia.pe/identiasign/identiasign Specifies the query parameters for fetching labels. 'limit' controls the number of labels returned, and 'last_item' allows for paginated retrieval of labels. ```json { "limit": 0 } ``` ```json { "last_item": { "label": "etiqueta de ejemplo", "usr_id": "usr_id_example" } } ``` -------------------------------- ### SignPDF Synchronous API Call with cURL Source: https://docs.identia.pe/firma/api_firma_v5_jwt This example demonstrates how to consume the SignPDF API in synchronous mode using cURL. It shows the necessary headers and form data fields for submitting a PDF file for signing. ```bash curl -X POST https://www.dactilar.toc.pe/api/v5/signPDF \ -H "Accept: application/json" \ -H "Authorization: Bearer tbx2XFgUKCbQs1iz0spaxe0NT…SBE5ymHrRPHIL30QeP9bWXhr1n" \ -H "Content-Type: multipart/form-data \ -F "pdf_file=@example.pdf" \ -F "image=@huella.png" \ -F "person_id=73712895" \ -F "names=Juan José" \ -F "last_names=Pérez Gomez" \ -F "toc_token=HeAG5mOp…eEvFXL34" \ -F "page=12" \ -F "position_x=50" \ -F "position_y=50" \ -F "async=0" ``` -------------------------------- ### Synchronous SignPDF Response (JSON) Source: https://docs.identia.pe/firma/api_firma_jwt Example JSON response for a successful synchronous SignPDF request. It includes a success status, message, transaction token, and the signed PDF encoded in Base64. ```json { "success": true, "message": "OK", "toc_token": "HeAG5mOp9BKSeEvFXLyxaHrlkANuHl6zEfcuxqGQdFbtR28VS4InEnHeSa1JYb9O", "signed_pdf": "JVBERi0xLjUKJeLjz9MKNTEgMCBvYmoKPDwgL0xpbmVhcml6ZWQgMSAvTCAzNzQ2NTQgL0ggWyAxMTE5IDI5MyBdIC9PIDU1IC9FIDYyMDExIC9OIDEyIC9UIDM3NDA3OSA+PgplbmRvYmoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg…" } ``` -------------------------------- ### Create Biometric Process Response (200 OK) Source: https://docs.identia.pe/biometria/api Example of a successful response (HTTP 200) after creating a biometric process. The response is in JSON format and contains a unique 'id' for the newly created identification process. ```json { "id": "aaa.111.bbb" } ``` -------------------------------- ### Example POST Data for Identification Process Source: https://docs.identia.pe/biometria/api This JSON object represents the data structure that might be sent in a POST request to a callback URL after an identification process concludes. It includes success status, results, descriptions, images, confidence scores, and detailed results from liveness checks. ```json { "id": "aaa.123.bbb", "msg": "success", "result": true, "description": "Aplicativo:1 Canal:2", "images": { "selfie": "base64", "doc": { "front": "base64", "back": "base64" } }, "confidence": 1.0, "details": { "liveness": { "selfie": { "confidence": 1.0, "result": true } } } } ``` -------------------------------- ### SignPDF Asynchronous API Call with cURL Source: https://docs.identia.pe/firma/api_firma_v5_jwt This cURL example shows how to use the SignPDF API in asynchronous mode, with the API automatically generating a 'toc_token' when none is provided. It's suitable for background processing. ```bash curl -X POST https://www.dactilar.toc.pe/api/v5/signPDF \ -H "Accept: application/json" \ -H "Authorization: Bearer tbx2XFgUKCbQs1iz0spaxe0NT…SBE5ymHrRPHIL30QeP9bWXhr1n" \ -H "Content-Type: multipart/form-data \ -F "pdf_file=@ example.pdf" \ -F "image=@huella.png" \ -F "person_id=73712895" \ -F "names=Juan José" \ -F "last_names=Pérez Gomez" \ -F "page=12" \ -F "position_x=50" \ -F "position_y=50" \ -F "async=1" ``` -------------------------------- ### Create Biometric Process Request (x-www-form-urlencoded) Source: https://docs.identia.pe/biometria/api Example of a PUT request to create a biometric identification process. It specifies headers for authorization and a JSON body containing document details, challenges, description, and callback URL. The response includes a unique ID for the process. ```http PUT x-www-form-urlencoded Headers: Authorization: jwt-bearer aaa.bbb.ccc Body: { "doc_id": 11111111, "nat": "PER", "challenges": ["liveness:selfie", "match:db:selfie"], "description": "Aplicativo:PCA Canal:WEB Proceso:SVIG", "urlCallback": "https://your.domain/login/callback" } ``` -------------------------------- ### Asynchronous SignPDF Request (cURL) Source: https://docs.identia.pe/firma/api_firma_jwt Example of an asynchronous request to the SignPDF API using cURL. It is similar to the synchronous request but with the `async` parameter set to 1. A `toc_token` can be auto-generated if not provided. ```bash curl -X POST https://www.dactilar.toc.pe/api/v3/signPDF \ -H "Accept: application/json" \ -H "Authorization: Bearer tbx2XFgUKCbQs1iz0spaxe0NT…SBE5ymHrRPHIL30QeP9bWXhr1n" \ -H "Content-Type: multipart/form-data \ -F "pdf_file=@ example.pdf" \ -F "image=@huella.png" \ -F "person_id=73712895" \ -F "names=Juan José" \ -F "last_names=Pérez Gomez" \ -F "page=12" \ -F "position_x=50" \ -F "position_y=50" \ -F "async=1" ``` -------------------------------- ### Synchronous SignPDF Request (cURL) Source: https://docs.identia.pe/firma/api_firma_jwt Example of a synchronous request to the SignPDF API using cURL. It includes parameters for PDF file, signature image, user details, and signing position. The `async` parameter is set to 0 for synchronous processing. ```bash curl -X POST https://www.dactilar.toc.pe/api/v3/signPDF \ -H "Accept: application/json" \ -H "Authorization: Bearer tbx2XFgUKCbQs1iz0spaxe0NT…SBE5ymHrRPHIL30QeP9bWXhr1n" \ -H "Content-Type: multipart/form-data \ -F "pdf_file=@ example.pdf" \ -F "image=@huella.png" \ -F "person_id=73712895" \ -F "names=Juan José" \ -F "last_names=Pérez Gomez" \ -F "toc_token=HeAG5mOp9BKSeEvFXLyxaHrlkANuHl6zEfcuxqGQdFbtR28VS4InEnHeSa1JYb9O" \ -F "page=12" \ -F "position_x=50" \ -F "position_y=50" \ -F "async=0" ``` -------------------------------- ### POST /api/auth/token - Obtener Token de Autenticación Source: https://docs.identia.pe/firma/api_firma Autentica a un usuario para obtener un token de acceso necesario para consumir otros servicios. Requiere email y contraseña en el cuerpo de la solicitud. ```APIDOC ## POST /api/auth/token ### Description Autentica al usuario y obtiene un token de acceso para consumir servicios. ### Method POST ### Endpoint https://www.dactilar.toc.pe/api/auth/token ### Parameters #### Header Parameters - **Content-Type** (string) - Required - `application/json` - **Accept** (string) - Required - `application/json` #### Request Body - **email** (string) - Required - Correo electrónico del usuario. - **password** (string) - Required - Contraseña del usuario. ### Request Example ```json { "email": "usuario@correo.com", "password": "123456" } ``` ### Response #### Success Response (200) - **status** (boolean) - Indica el estado de la operación (true para éxito). - **data** (object) - Contiene los datos de la respuesta. - **token** (string) - El token de autenticación generado. #### Response Example ```json { "data": { "token": "ge7WW1symmCfMTNwKJFafsdaiR….bQ1T5FAyzajRZlr6p7WqjOX" }, "status": 200 } ``` ``` -------------------------------- ### Respuesta de Autenticación API Source: https://docs.identia.pe/firma/api_firma Formato de la respuesta esperada tras una solicitud de autenticación exitosa, incluyendo el token de acceso. ```json { "data": { "token": "ge7WW1symmCfMTNwKJFafsdaiR….bQ1T5FAyzajRZlr6p7WqjOX" }, "status": 200 } ``` -------------------------------- ### GetSignedPDF Request (cURL) Source: https://docs.identia.pe/firma/api_firma_jwt Example of a GET request to the GetSignedPDF API using cURL to retrieve a signed document. It requires the `toc_token` obtained from a previous SignPDF request. The `binary_resp` parameter can be used to get the PDF as binary data. ```bash curl -X GET https://www.dactilar.toc.pe/api/v3/getSignedPDF? toc_token=HeAG5mOp9BKSeEvFXLyxaHrlkANuHl6zEfcuxqGQdFbtR28VS4InEnHeSa1JYb9O \ -H "Accept: application/json" \ -H "Authorization: Bearer tbx2XFgUKCbQs1iz0spaxe0NT…SBE5ymHrRPHIL30QeP9bWXhr1n" \ -H "Content-Type: application/json ``` -------------------------------- ### POST /api/v2/signPDF - Firmar Documento PDF Source: https://docs.identia.pe/firma/api_firma Firma un documento PDF electrónicamente utilizando un token de autenticación proporcionado en la cabecera. ```APIDOC ## POST /api/v2/signPDF ### Description Permite enviar un documento PDF para ser firmado electrónicamente. ### Method POST ### Endpoint https://www.dactilar.toc.pe/api/v2/signPDF ### Parameters #### Header Parameters - **Content-Type** (string) - Required - `multipart/form-data` - **Accept** (string) - Required - `application/json` - **Authorization** (string) - Required - `Bearer {token}` (El token obtenido del endpoint de autenticación) #### Request Body - **file** (file) - Required - El archivo PDF a firmar. ``` -------------------------------- ### Obtener Token de Autenticación (cURL) Source: https://docs.identia.pe/firma/api_firma Ejemplo de cómo solicitar un token de autenticación a la API de TOC enviando credenciales de correo electrónico y contraseña. ```bash curl --location --request POST 'https://www.dactilar.toc.pe/api/auth/token' \ --header 'Content-Type: application/json' \ --data-raw '{ "email": "usuario@correo.com", "password": "123456" }' ``` -------------------------------- ### GET Facial Records Response (JSON Example) Source: https://docs.identia.pe/biometria/api This snippet shows an example of a successful JSON response (HTTP 200) when querying the Identia.pe API for facial records. It includes a 'face_db' array containing facial record details and a 'last_item' field for pagination control. ```json { "face_db": [ { "date": "20230613T12:00:00+00:00", "nat": "PER", "per_id": "012345678", "face_id": " a1b2c3d4-a1b2-a1b2-a1b2-a1b2c3d4e5f6", "process_id": "98uy32h9u4irn" } ], "last_item": null } ``` -------------------------------- ### Generate TSQ File for Timestamping (OpenSSL) Source: https://docs.identia.pe/firma/api_firma This command uses OpenSSL to generate a timestamp query file (.tsq) from a given PDF file. This file is then used as input for timestamping services. ```bash openssl ts -query -data .pdf -no_nonce -sha256 -out request.tsq ``` -------------------------------- ### List Signature Processes (200 OK) Source: https://docs.identia.pe/identiasign/identiasign Retrieves a complete list of signature processes matching the query parameters. Includes details like dates, descriptions, documents, signers, and status. Document download URLs expire after 2 minutes. ```json { "signatureProcesses": [ { "date": "2024-12-20T15:10:31+00:00", "description": "Documento de firma de prueba-1.pdf", "documents": [ { "id": "abc123", "name": "Documento de firma de prueba-1.pdf", "pages": 1, "url": "http://example.com" } ], "expire": "2025-01-19T15:10:31+00:00", "id": "aaaaaa:bbbbbbb", "labels": [], "readChallenges": ["signerId"], "sign_order": false, "signers": [ { "contactInfo": { "notified": false, "type": "email", "tz": "-05:00", "value": "soporte@toc.pe" }, "doc_id": "11111111", "nat": "PER", "signChallenges": ["facial", "signAction"], "signatureType": "advanced", "signerAlias": "Otro Nombre", "stampPositions": { "0": { "0": { "orientation": "horizontal", "size": 8, "x": 50, "y": 50 } } } } ], "signers_search": ["PER:11111111"], "status": "signed", "urlCallback": "" } ], "last_item": null } ``` -------------------------------- ### Synchronous SignPDF Request with cURL Source: https://docs.identia.pe/firma/api_firma This cURL command demonstrates a synchronous request to the SignPDF API. It includes parameters for the PDF file, signature image, user information, and signing position. The `async` parameter is set to 0 for synchronous execution. ```bash curl -X POST https://www.dactilar.toc.pe/api/v2/signPDF \ -H "Accept: application/json" \ -H "Authorization: Bearer tbx2XFgUKCbQs1iz0spaxe0NT…SBE5ymHrRPHIL30QeP9bWXhr1n" \ -H "Content-Type: multipart/form-data \ -F "pdf_file=@ example.pdf" \ -F "image=@huella.png" \ -F "person_id=73712895" \ -F "names=Juan José" \ -F "last_names=Pérez Gomez" \ -F "toc_token=HeAG5mOp9BKSeEvFXLyxaHrlkANuHl6zEfcuxqGQdFbtR28VS4InEnHeSa1JYb9O" \ -F "page=12" \ -F "position_x=50" \ -F "position_y=50" \ -F "async=0" ``` -------------------------------- ### Configurar intentos para biometría (PUT) Source: https://docs.identia.pe/biometria/recomendacion Se recomienda configurar hasta 3 intentos para la operación PUT con el fin de reducir errores por parte del usuario. ```text max_tries: 3 ``` -------------------------------- ### Configuración de Gradle para SDK Identia Flow Source: https://docs.identia.pe/biometria/android Añade la dependencia del SDK Identia Flow y el repositorio Maven en el archivo build.gradle de tu módulo para poder utilizar la librería en tu proyecto Android. ```gradle dependencies { implementation 'identia:flow:0.0.6' } repositories { maven { url "https://repo.repsy.io/mvn/identia/identia" } } ``` -------------------------------- ### Inicializar SDK con Personalización Gráfica Source: https://docs.identia.pe/biometria/js Muestra cómo inicializar el SDK Web de Identia incluyendo un parámetro `styleId` para aplicar personalizaciones gráficas de la interfaz. ```javascript IdentiaVerification( document.getElementById("biometria"), "aa.12.bb", handler_function, "dev", styleId ); ``` -------------------------------- ### Get Identification Process Details Source: https://docs.identia.pe/biometria/api Retrieves the results of an identification process, without captured images. This is useful for checking the outcome of biometric validations. ```APIDOC ## GET /api/id_process ### Description Retrieves the results of a specific identification process. This endpoint provides validation outcomes but not the associated biometric images. ### Method GET ### Endpoint /api/id_process ### Parameters #### Query Parameters - **process_id** (string) - Required - The unique identifier for the identification process. ### Response #### Success Response (200) - **results** (object) - Contains the outcomes of various biometric challenges. - **msg** (string) - The message indicating the status of the process (e.g., "failed challenges", "expired"). #### Response Example ```json { "results": { "msg": "failed challenges" } } ``` ``` -------------------------------- ### GET /api/id_process Source: https://docs.identia.pe/biometria/api Retrieves identification process information. Requires an access token with the 'id_process:read' scope. Allows filtering by various parameters. ```APIDOC ## GET /api/id_process ### Description Retrieves information about one or more identification processes. Filtering can be done using query parameters. ### Method GET ### Endpoint `/api/id_process` ### Parameters #### Query Parameters - **creation_start** (string) - Optional - Start date for filtering processes by creation date. Format: `YYYYMMDDThh:mm:ss+HH:MM`. - **creation_end** (string) - Optional - End date for filtering processes by creation date. Format: `YYYYMMDDThh:mm:ss+HH:MM`. - **status** (string) - Optional - Filters processes by their status. Allowed values: `pending`, `finished`. - **result** (boolean) - Optional - Filters processes by their result. Allowed values: `true`, `false`. - **description** (array of strings) - Optional - Filters processes by text content in the `description` field. The values should be provided as a JSON string array. - **per_id** (string) - Optional - Filters processes by the national ID of a person. - **process_id** (string) - Optional - Filters for a specific identification process by its exact ID. If used, all other search parameters are ignored. - **limit** (integer) - Optional - Maximum number of identification processes to return. - **order** (boolean) - Optional - Orders processes by creation date. `false` for descending (newest first), `true` for ascending (oldest first). - **last_item** (string) - Optional - JSON string representation of the last identification process from which to start the search. Useful for pagination. - **tz** (string) - Optional - Timezone format for dates in the response. Example: `-05:00`. Defaults to `0:00` if not provided. ### Request Example ```json { "creation_start": "20230101T12:00:00+00:00", "result": true, "last_item": "{\"id\":\"abcxyz\", \"fecha_creac\":\" 20230122T11:43:53+00:00\"}", "description": ["Aplicativo:PCDI"] } ``` ### Response #### Success Response (200) - **id_process** (array) - An array of identification process objects. - **access_counter** (integer) - Number of access attempts. - **challenges** (array of arrays) - List of challenges performed. - **challenges_retries** (object) - Number of retries for each challenge. - **client_id** (string) - The client ID associated with the process. - **confidence** (number) - Confidence score of the identification. - **date** (string) - Date and time of the process. - **description** (string) - Description of the process. - **details** (object) - Detailed results of identification challenges. - **doc_id** (string) - Document ID. - **doc_type** (string) - Document type. - **exp** (string) - Expiration date. - **fec_result** (string) - Date of the result. - **id** (string) - Unique ID of the identification process. - **max_tries** (integer) - Maximum allowed tries for the process. #### Response Example ```json { "id_process": [ { "access_counter": 1, "challenges": [ ["liveness:selfie", "match:ocr:id", "match:portrait:selfie"] ], "challenges_retries": { "liveness:selfie": 0, "match:ocr:id": 0, "match:portrait:selfie": 0 }, "client_id": "2cf5Jc....N6Ghkyp", "confidence": 0.7178097, "date": "2024-11-28T18:25:04-05:00", "description": "Aplicativo:PCDI Canal:test", "details": { "liveness": { "selfie": { "confidence": 0.7178097, "result": true } }, "match": { "ocr": { "id": { "confidence": 1, "result": true } }, "portrait": { "selfie": { "confidence": 0.9734558868408203, "result": true } } } }, "doc_id": "11111111", "doc_type": "", "exp": "2024-11-28T18:40:04-05:00", "fec_result": "2024-11-28T18:25:51-05:00", "id": "dddddd.eeeeeee.ffffff", "max_tries": 3 } ] } ``` ``` -------------------------------- ### Incluir SDK Web Identia Source: https://docs.identia.pe/biometria/js Este snippet muestra cómo incluir la biblioteca JavaScript del SDK Web de Identia en tu aplicación HTML a través de un CDN. ```html ``` -------------------------------- ### GET /api/v3/getSignedPDF Source: https://docs.identia.pe/firma/api_firma_jwt Retrieves a signed PDF document using the transaction token. This is typically used after an asynchronous signing operation. ```APIDOC ## GET /api/v3/getSignedPDF ### Description Retrieves a signed PDF document using the provided transaction token (`toc_token`). This endpoint is essential for fetching the final signed PDF, especially after initiating the signing process asynchronously. ### Method GET ### Endpoint https://www.dactilar.toc.pe/api/v3/getSignedPDF ### Parameters #### Query Parameters - **toc_token** (string) - Required - The 64-character alphanumeric token identifying the transaction. - **binary_resp** (integer) - Optional - If `1`, the response will be a binary PDF file. If `0` or omitted, the PDF will be base64 encoded in the JSON response. Defaults to `0`. #### Header Parameters - **Accept** (string) - Required - `application/json` - **Authorization** (string) - Required - `Bearer {token}` - **Content-Type** (string) - Required - `application/json` ### Request Example ```json { "toc_token": "HeAG5mOp9BKSeEvFXLyxaHrlkANuHl6zEfcuxqGQdFbtR28VS4InEnHeSa1JYb9O", "binary_resp": 0 } ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the transaction was successful. - **message** (string) - Response message for the transaction. - **toc_token** (string) - Transaction identifier. - **signed_pdf** (string) - Base64 encoded signed PDF document. #### Response Example ```json { "success": true, "message": "OK", "toc_token": "HeAG5mOp9BKSeEvFXLyxaHrlkANuHl6zEfcuxqGQdFbtR28VS4InEnHeSa1JYb9O", "signed_pdf": "JVBERi0xLjUKJeLjz9MKNTEgMCBvYmoKPDwgL0xpbmVhcml6ZWQgMSAvTCAzNzQ2NTQgL0ggWyAxMTE5IDI5MyBdIC9PIDU1IC9FIDYyMDExIC9OIDEyIC9UIDM3NDA3OSA+PgplbmRvYmoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg…" } ``` ``` -------------------------------- ### GET /api/v2/getSignedPDF Source: https://docs.identia.pe/firma/api_firma Retrieves a signed PDF document using the transaction token (toc_token). This is typically used after an asynchronous signing operation. ```APIDOC ## GET /api/v2/getSignedPDF ### Description Retrieves a signed PDF document using the transaction token (toc_token). This is typically used after an asynchronous signing operation. ### Method GET ### Endpoint https://www.dactilar.toc.pe/api/v2/getSignedPDF ### Parameters #### Query Parameters - **toc_token** (string) - Required - The token identifying the transaction. Alphanumeric, 64 characters. - **binary_resp** (integer) - Optional - If 1, the response is a binary PDF file. If 0 or omitted, the response is Base64 encoded. #### Headers - **Accept**: application/json - **Authorization**: Bearer {token} - **Content-Type**: application/json ### Response #### Success Response (200) - **success** (boolean) - Indicates if the transaction was successful. - **message** (string) - The response message. - **toc_token** (string) - The transaction identifier. - **signed_pdf** (string) - The signed PDF document, Base64 encoded (if binary_resp is not 1). #### Response Example ```json { "success": true, "message": "OK", "toc_token": "HeAG5mOp9BKSeEvFXLyxaHrlkANuHl6zEfcuxqGQdFbtR28VS4InEnHeSa1JYb9O", "signed_pdf": "JVBERi0xLjUKJeLjz9MKNTEgMCBvYmoKPDwgL0xpbmVhcml6ZWQgMSAvTCAzNzQ2NTQgL0ggWyAxMTE5IDI5MyBdIC9PIDU1IC9FIDYyMDExIC9OIDEyIC9UIDM3NDA3OSA+PgplbmRvYmoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg…" } ``` ``` -------------------------------- ### Biometric Process Expired Error Source: https://docs.identia.pe/biometria/api Indicates that a biometric process did not start or expired before all challenges could be completed. This can occur if the user does not initiate the process or if it times out. ```JavaScript { msg: "expired"; } ``` -------------------------------- ### Inicializar SDK Web Identia Source: https://docs.identia.pe/biometria/js Ejemplo de inicialización del SDK Web de Identia, especificando el elemento div, ID del proceso, función de callback y ambiente. ```javascript IdentiaVerification( document.getElementById("biometria"), "aa.12.bb", handler_function, "dev" ); ```