
# Use the Check Type Vehicle

> **In simple terms:** This guide shows you how to run background checks on vehicles. You'll search public records to check vehicle information, owner identity, traffic fines, and criminal records.

Truora's Background Checks, referred to as "checks" from now on, is a tool that allows for swift inspection of public records across various categories. The tool offers three default check types. This guide provides information specifically on the Vehicle type.

The validation will provide detailed information about the vehicle, including the owner's identity, traffic fines, driver information, national and international criminal records, as well as information about vehicle permits.

It is important to note that the Check type ``Vehicle``, has a different [dataset](/guides/datasets_scores_types/) for each country. To access the configuration, please create a ``GET`` request using the following ```https://api.checks.truora.com/v1/config```. 

{{<code lang="json" lang_title="Response 200">}}
{   "vehicle": [
            {
                "data_set": "vehicle_information",
                "weight": 0.1
            },
            {
                "data_set": "personal_identity",
                "weight": 0.2
            },
            {
                "data_set": "traffic_fines",
                "weight": 0.1
            },
            {
                "data_set": "driving_licenses",
                "weight": 0.1
            },
            {
                "data_set": "criminal_record",
                "weight": 0.4
            },
            {
                "data_set": "international_background",
                "weight": 0.1
            }
        ]
}
{{</code>}}

<p class="inline"> Available only in some countries. If you would like to get more information, please contact us through WhatsApp {{<figure link="https://wa.link/8tdr7i" src="/images/illustrations/Logo_WhatsApp4.png" alt="Contact us" class="w-8 m-0 inline-flex" >}}.</p>

 - Vehicle Permits, weight 0 
 - Taxes and finances, weight 0

## Restrictions

The check type vehicle has different restrictions in each country, which are described below:

 - In **Chile**, to access vehicle information, it is necessary to enter the corresponding license plate number ``license_plate``. Please note that for driver's license inquiries, we only have access to licenses issued in Santiago through the license number ``certificate_folio``.

 - In **Colombia**, to access vehicle information, it is necessary to register the following data: the type of identification of the vehicle owner ``owner_document_type`` with their respective identification number ``owner_document_id``, as well as the vehicle's license plate ``license_plate``. There is another way to access vehicle information, by registering the Vehicle Identification Number (VIN) ``vehicle_id``.

 - In **Costa Rica**, to access vehicle information, it is necessary to register the type of identification of the vehicle owner ``national_id`` with their respective identification number, as well as the corresponding license plate ``license_plate``.

 - In **Mexico**, to access vehicle information, it is necessary to register both the vehicle registration ``license_plate`` and the Unique Population Registry Code (CURP) of the vehicle owner ``national_id`` with their respective identification number.

 - In **Peru**, to access traffic fines information, it is necessary to register the type of identification of the vehicle owner ``national_id`` with their respective identification number, as well as the corresponding vehicle license plate ``license_plate``.

## Create a New Check 

1. Create a ``POST`` request with the next **URL**: ``` https://api.checks.truora.com/v1/checks ```. You can also refer to our [API Reference.](/docs/#checks-api-section)

2. Add the next headers
    - ``Truora-API-Key``: ``<api key>`` Get an [API key](/guides/authentication/)
    - ``Content-Type``: ``application/x-www-form-urlencoded``

3. Add the following ``key : values`` params in the request ``body`` and ``x-www-form-urlencoded`` format:

    - ``type``: Background check type. In this case: ``Vehicle`` If you want to perform a custom check, please refer to this [guide](/guides/background_check_custom_type/)
	- ``force_creation``: Defines the behavior of the API when creating a background check with the same input values used for a recently created background check. When ``true``, forces the creation of a new background check; otherwise, it returns the result of the background check created earlier. **Recommended**: ``false``.
	- ``user_authorized``: [Required]  Must be ``true`` in order to proceed. Indicates that the person subject to the validation, authorizes the use and processing of their personal data, in the background check and/or Digital Identity validation processes. Must be true in order to proceed.
	- ``country``: [Required] The country where the validation is to be performed. Allowed: ``CL`` for Chile, ``CO`` for Colombia, ``CR`` for Costa Rica, ``MX`` for Mexico, ``PE`` for Peru.
	- ``national_id``: National Identification.
    - ``license_plate``: [Required] license plate number.

**Note** You can add more inputs for this validation. Please refer to our [API Reference.](/docs/#checks-api-section)


{{<code lang="json" lang_title="Response 200">}}
{
    "check": {
        "check_id": "CHK5975ca05ebdef2a1412a90480f64xxxx",
        "country": "CO",
        "creation_date": "2023-04-26T17:54:29.97067008Z",
        "name_score": 0,
        "id_score": 0,
        "score": -1,
        "status": "not_started",
        "update_date": "2023-04-26T17:54:29.982785756Z",
        "national_id": "xxxxxxxxxx",
        "type": "vehicle",
        "vehicle_id": "xxxxxx"
    },
    "details": "/v1/checks/CHK5975ca05ebdef2a1412a90480f64xxxx/details",
    "self": "/v1/checks/CHK5975ca05ebdef2a1412a90480f64xxxx"
}
{{</code>}}

## Get Check 

Returns the results of the check that matches the ``check_id`` provided, complete with a set of scores explained below.

1. Create a ``POST`` request with the next **URL**: ``` https://api.checks.truora.com/v1/checks/{{check_id}} ```. You can also refer to our [API Reference.](/docs/#checks-api-section)

2. Add the next headers
    - ``Truora-API-Key``: ``<api key>`` Get an [API key](/guides/authentication/)
    - ``Content-Type``: ``application/x-www-form-urlencoded``

3. To calculate the **scores**, a weighted average is considered with different weights allocated to each dataset. Scores can be customized using the config endpoints by assigning a weight to each dataset according to its relevance. For more information see this [guide](/guides/datasets_scores_types/).


## Get Check Details

Lists all details associated with a Check. It can be paginated.

1. Create a ``POST`` request with the next **URL**: ```https://api.checks.truora.com/v1/checks/{{check_id}}/details```. You can also refer to our [API Reference.](/docs/#checks-api-section)

2. Add the next headers
    - ``Truora-API-Key``: ``<api key>`` Get an [API key](/guides/authentication/)
    - ``Content-Type``: ``application/x-www-form-urlencoded``

3. Set the following ``key : values`` within the request ``Query Params``.
    - ``start_key``: start_key value for pagination. if you want to go to the previous or next page.


## Possible statuses for a database

- **not_started:** it’s the initial status 
- **in_progress:** it’s the status when a database response the result is pending, but this result can’t be set by collectors, so this status is not often used.
- **delayed:** it’s the status when the database is making the search but we are waiting for another service response, for instance: captcha service, a partner, etc.
- **skipped:** it’s the status when the check hasn’t all necessary inputs to search on the database.
- **error:** it’s the status when the check tried to be searched on the database, but we obtained an error.
- **expired:** it’s the status when the search couldn't be completed before timeout.
- **completed:** it’s the status when the check was searched on the database.

## Receive results of the checks performed on users

The results are reported using webhooks that are configured from the dashboard. The information in the webhook contains the results of the checks, and you can receive different events. Additionally, you can create labels to filter different rules depending on the values that check variables may take. For example, you may want to filter checks for only types 'person' or 'vehicle'. Please review this guide [Creating a rule to trigger actions](/guides/webhook_rule/) for more information.