Tirrell API Documentation

website·Indexed 32 days ago

https://docs.tirrell.com.br/

Documentation for the Tirrell API, focusing on the processing engine for analyzing documents and facial images.

Tokens
898
Snippets
4
Records
6
Agent score
0%

What's inside Tirrell

  1. Overview of Tirrell API processing workflow

    The Tirrell API processes documents and facial images in a two-step asynchronous workflow:

    1. Submission: The user sends images and parameters to the API.
    2. Acknowledgment: The system returns a ticket confirming the request has been received and processing has started.

    Final results are delivered asynchronously via a webhook to the URL specified in the request.

    Capabilities by category:

    • Documents: Supports Typification, OCR, and Documentoscopy for RG, CNH, DNI, CIN, and INE. For complete analysis, both front (Face A) and back (Face B) images must be sent.
    • Facial Comparison: Supports Facematch (comparing faces) and Facedoc (validating a selfie against a document).
    • Liveness & Biometrics: Processing types 13, 14, and 15 are exclusively available via SDK or the Tirrell interface, not via this API endpoint.
  2. Retrieve processing results via Webhook

    The Tirrell API uses an asynchronous processing model. After submitting images for processing, the API returns a confirmation ticket. The final processing results are sent to the pre-configured urlRetornoTicket endpoint via a Webhook once the analysis is complete.
  3. Understand the facial comparison processing response

    When processing facial comparisons (Types 16 and 20), the API returns a response containing the processing status, the base64 encoded images used for comparison, and the match result. The facematch.verificado field is the primary indicator of whether the faces correspond.
    {
      "status": {
        "id": 1,
        "nome": "Processado"
      },
      "baseComparacao": "base64_string...",
      "selfie": "base64_string...",
      "facematch": {
        "status": true,
        "verificado": true
      },
      "ticket": "uuid-string"
    }
  4. Understand the document processing response

    When submitting a document processing request (Types 1, 2, 4, 7), the API returns a ticket object. This response confirms the receipt of the images and provides initial identification of the document if available.
    {
      "id": 360681,
      "idExterno": "123",
      "ticket": "0c15af60-c69c-4223-b89d-db4712267dbe",
      "dtCriacao": "2022-11-23T19:10:53.7427443-03:00",
      "idCliente": "08d806f7-6c08-46b6-8455-c115d3ccb720",
      "idSubcliente": "00000000-0000-0000-0000-000000000000",
      "idUsuario": "08d905b4-653b-4842-8fa0-d400108b98fc",
      "statusProcessamento": 3,
      "dtStatusProcessamento": "2022-11-23T19:10:53.7427581-03:00",
      "idTipoProcessamento": 4,
      "urlRetornoTicket": "https://sua-url-webhook.com",
      "base64FaceA": "...",
      "base64FaceB": "...",
      "documentoEncontrado": true,
      "tipoDocumento": "CNH",
      "subtipoDocumento": "CNH 2022"
    }
  5. Submit documents for processing (Types 1, 2, 4, 7)

    To process documents (Typification, OCR, Documentoscopy), send a POST request with the document images encoded in base64. It is essential to provide both the front and back of the document for accurate analysis.
    curl -X POST https://ticketsentrypoint-api.spekter.com.br/Ticket \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer {your_token}" \
    -d '{
      "idExterno": "client_internal_id",
      "idTipoProcessamento": 4,
      "urlRetornoTicket": "https://your-webhook-url.com",
      "cpf": "12345678910",
      "arquivos": ["base64_front_image", "base64_back_image"]
    }'
  6. Submit facial comparison requests (Types 16, 20)

    To perform facial comparison (Facematch or Facedoc), send a POST request containing the base64 images of the registered face and the captured selfie.
    curl -X POST https://ticketsentrypoint-api.spekter.com.br/Ticket \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer {your_token}" \
    -d '{
      "idExterno": "client_internal_id",
      "idTipoProcessamento": 16,
      "arquivos": "base64_registered_face",
      "selfie": "base64_captured_selfie"
    }'