Create Account to link processes by user

The account identifies users in Truora’s system and is represented by the account_id. The account_id is a unique value assigned to each user, allowing for the distinction and access to information and processes.

You have three options to generate the account_id:

  • Use your user ID as account_id
  • Create an Account
  • Use an account_id generate by Truora’s system

These options are explained in the following sections. Choose the one that best suits your needs or use case.

Use your user ID as account_id

If your user already has an identifier in your system, you can use it as the account_id in the Truora’s system. This option will create an empty account initially, but it allows you the flexibility to update or add data to the account at a later time as required.

  • When generating the Web Token for your user processes or creating a Validation for your user, provide the user’s identifier in your system as the value for the account_id parameter. Please ensure to use the same account_id in all your user processes within the Truora’s system. This will help maintain consistency and association with the correct user account throughout the system.

Note:

  • Only Account IDs following the regex pattern [a-zA-Z0-9_.-]+ are supported.
  • If you want to do a Doc+Face flow or validation, we suggest adding a timestamp, or a random number that makes the account_id unique for each process or user validation.

Create an Account

This feature, in addition to providing you with an account_id, enables you to collect information from your users and store it within Truora’s system. This stored data can be utilized or accessed at your discretion, as per your requirements.

To create an account you must:

  1. Create a POST request to the endpoint: https://api.validations.truora.com/v1/accounts. You can also refer to our API Reference.
  2. Add the next headers
    • Truora-API-Key: <api key> Get an API key
    • Content-Type: application/x-www-form-urlencoded
  3. Add the following key : values params in the request body and x-www-form-urlencoded format:
    • email: Person e-mail address.
    • country: Country where this person is located.
    • document_type: Person document type.
    • document_number: Person document number.
    • first_name: Person first name.
    • last_name: Person last name.
    • document_expedition_date: Person document issue date. RFC3339 format.
    • phone_number: Person phone number.
    • facebook_user: Person Facebook username.
    • twitter_user: Person Twitter username.

Note:

  • Note that only Account IDs following the regex pattern [a-zA-Z0-9_.-]+ are supported.
  • All parameters are optional. If not provided, an empty account will be created, and you can modify it later.
  • Please save the account_id that will be provided by this request, as it will serve as the new identifier for your user in the Truora’s system. All identity-related processes performed on your user should be associated with this account_id.
Response 200

    {
        "account_id": "ACCff6ada8aa092b6409b4e3ee3132b1bc8",
        "creation_date": "2023-07-29T02:19:26.370985256Z",
        "validators_prepared": {
            "document-validation": false,
            "electronic-signature": false,
            "email-verification": false,
            "enterprise-data": false,
            "face-recognition": false,
            "face-search": false,
            "identity-questions": false,
            "phone-verification": false,
            "voice-recognition": false
        }
    }

Use an account_id generate by Truora’s system

This option will provide you with a unique and automatically generated account_id, which will create an empty account initially. However, you have the flexibility to update or add data to the account at a later time as needed.

  • When generating the Web Token for your user processes or creating a Validation for your user, please leave the “account_id” parameter empty. This will prompt the system to provide you with an auto-generated account_id. Please save this generated account_id and use it in all your user processes within the Truora’s system.

Additional endpoints that may be of interest

Get Accounts

Allows you to retrieve all the accounts that have been created for all users in the system.

  1. Create a GET request to the endpoint: https://api.validations.truora.com/v1/accounts. You can also refer to our API Reference.
  2. Add the next headers
    • Truora-API-Key: <api key> Get an API key
    • Content-Type: application/x-www-form-urlencoded
Response 200

  {
      "self": "/v1/accounts",
      "next": "/v1/accounts?start_key=ACC022194942a95a12c303ca5b3381c5de7",
      "accounts": 
          {
              "country": "CO",
              "account_id": "ACC00050860a0535c5ed3c51e12160f93ea",
              "creation_date": "2022-03-29T16:27:24.234383591Z",
              "validators_prepared": {
                  "document-validation": false,
                  "electronic-signature": false,
                  "email-verification": false,
                  "enterprise-data": false,
                  "face-recognition": false,
                  "face-search": false,
                  "identity-questions": false,
                  "phone-verification": false,
                  "voice-recognition": false
              }
          }
  }

Get Account

Allows you to retrieve an account identified by the provided account_id.

  1. Create a GET request to the endpoint: https://api.validations.truora.com/v1/accounts/{{account_id}}. You can also refer to our API Reference.
  2. Add the next headers
    • Truora-API-Key: <api key> Get an API key
    • Content-Type: application/x-www-form-urlencoded
Response 200

    {
        "account_id": "ACCff6ada8aa092b6409b4e3ee3132b1bc8",
        "creation_date": "2023-07-29T02:19:26.370985256Z",
        "validators_prepared": {
            "document-validation": false,
            "electronic-signature": false,
            "email-verification": false,
            "enterprise-data": false,
            "face-recognition": false,
            "face-search": false,
            "identity-questions": false,
            "phone-verification": false,
            "voice-recognition": false
        }
    }

Get Validations

Allows you to retrieve a list with all the validations performed on the account identified by the provided account_id.

  1. Create a GET request to the endpoint: https://api.validations.truora.com/v1/accounts/{{account_id}}/validations. You can also refer to our API Reference.
  2. Add the next headers
    • Truora-API-Key: <api key> Get an API key
    • Content-Type: application/x-www-form-urlencoded
Response 200

    {
        "self": "/v1/accounts/ACC00050860a0535c5ed3c51e12160f93ea/validations",
        "next": "",
        "history": [
            {
                "validation_id": "VLD8219259158b636385a115c945cdb13a2",
                "ip_address": "186.86.52.90",
                "account_id": "ACC00050860a0535c5ed3c51e12160f93ea",
                "type": "document-validation",
                "validation_status": "pending",
                "creation_date": "2023-07-29T16:12:02.497364018Z",
                "attachment_status": "pending",
                "attachment_validations": [
                    {
                        "validation_name": "Validation of face detection",
                        "validation_type": "face-detection-validation",
                        "attachment_type": "document-front",
                        "result": "pending"
                    },
                    {
                        "validation_name": "Validation of document text legibility",
                        "validation_type": "ocr-validation",
                        "attachment_type": "document-front",
                        "result": "pending"
                    },
                    {
                        "validation_name": "Validation of document text legibility",
                        "validation_type": "ocr-validation",
                        "attachment_type": "document-reverse",
                        "result": "pending"
                    }
                ]
            }
        ]
    }

Get Processes

Allows you to search for processes based on the account_id or flow_id with which the processes were created.

  1. Create a GET request to the endpoint: https://api.identity.truora.com/v1/processes/. You can also refer to our API Reference.
  2. Add the next headers
    • Truora-API-Key: <api key> Get an API key
    • Content-Type: application/x-www-form-urlencoded
  3. Add the next query-string parameters
    • account_id: Account ID used to create process
Response 200

 {
    "self": "/v1/processes?account_id=1234567_client",
    "next": "",
    "identity_processes": [
        {
            "process_id": "IDP0000000000",
            "account_id": "1234567_client",
            "client_id": "client_id",
            "flow_id": "client_id",
            "country": "CO",
            "status": "pending",
            "geolocalization": "geolocalization",
            "city": "city",
            "time_to_live": 120,
            "config": {
                "redirect_urls": {
                    "failure": "https://truora.com",
                    "pending": "https://truora.com",
                    "success": "https://truora.com"
                },
                "continue_flow_in_new_device": true,
                "enable_desktop_flow": true,
                "time_to_live": 120,
                "follow_up_delay": 120,
                "follow_up_message": "Tienes un proceso activo en curso",
                "start_business_hours": "2021-01-01T13:00:00Z",
                "end_business_hours": "2021-01-01T00:00:00Z"
            },
            "redirect_url": "https://dev.truora.com",
            "creation_date": "2023-07-31T14:34:43.019112173Z",
            "update_date": "2023-07-31T14:34:43.024034634Z",
            "steps": [
                {
                    "step_id": "IPS4875ea2d66671dba45448bdc93158459",
                    "type": "enter_document_type",
                    "verification_output": null,
                    "redirect_url": "",
                    "config": {
                        "allowed_document_types": [
                            {
                                "country": "CO",
                                "documents": [
                                    {
                                        "document_type": "national-id"
                                    }
                                ]
                            }
                        ],
                        "retries": 2,
                        "timeout": 300
                    },
                    "expected_inputs": [
                        {
                            "type": "select",
                            "value": "CO",
                            "name": "country",
                            "placeholder": "Ingresa el pais",
                            "description": "¿Cuál es el país de tu documento de identificación?",
                            "length": 0,
                            "read_only": true
                        },
                        {
                            "type": "select",
                            "value": "national-id",
                            "name": "document_type",
                            "placeholder": "Selecciona el tipo de documento",
                            "description": "¿Cuál es el tipo de tu documento de identificación?",
                            "length": 0,
                            "read_only": true
                        }
                    ],
                    "files_upload_urls": null,
                    "remaining_retries": 0,
                    "async_step": null
                },
                {
                    "step_id": "IPSf5f33655b81fc53e1b052615b5e800b4",
                    "type": "take_document_photo",
                    "verification_output": null,
                    "redirect_url": "",
                    "config": {
                        "allowed_document_types": [
                            {
                                "country": "CO",
                                "documents": [
                                    {
                                        "document_type": "national-id"
                                    }
                                ]
                            }
                        ],
                        "retries": 2,
                        "timeout": 300
                    },
                    "expected_inputs": null,
                    "files_upload_urls": [
                        {
                            "name": "document_front",
                            "url": "",
                            "description": "Envía una foto de *la parte de adelante* de tu documento de identidad: en la imagen puedes ver un ejemplo de cómo debería quedar. 👀\n\nAsegúrate que *los 4 bordes del documento sean visibles*, dejando espacio alrededor.\n\n¡Busca un lugar con luz para que la información sea legible y nítida! 📸"
                        },
                        {
                            "name": "document_back",
                            "url": "",
                            "description": "Envía una foto de *la parte de atrás* de tu documento de identidad: en la imagen puedes ver un ejemplo de cómo debería quedar. 👀\n\nAsegúrate que *los 4 bordes del documento sean visibles*, dejando espacio alrededor.\n\n¡Busca un lugar con luz para que la información sea legible y nítida! 📸"
                        }
                    ],
                    "remaining_retries": 2,
                    "async_step": true
                }
            ],
            "current_step_type": "enter_document_type",
            "variables": {
                "document_validation": {}
            },
            "created_via": "web"
        }
    ]
}