> ## Documentation Index
> Fetch the complete documentation index at: https://docs.jelou.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# National Police of Colombia

> Background check.

<Update label="Version: 2.0">
  This tool allows querying disciplinary records in Colombia through the Attorney General's Office. Using the document type and number, it retrieves the full name and possible sanctions, disqualifications, and processes associated with the queried person.

  **Available countries:** 🇨🇴 Colombia
</Update>

## Configuration

<Tabs>
  <Tab title="Inputs">
    <AccordionGroup>
      <Accordion title="Identification type" icon="id-card">
        <ParamField body="Identification type" type="string" required>
          Variable: `documentType`. Type of identity document.

          **Available values:**

          * `CC`: Cédula de Ciudadanía (Colombian citizens)
          * `PEP`: Permiso Especial de Permanencia (foreigners, mainly Venezuelan)
          * `CE`: Cédula de Extranjería (foreign residents in Colombia)
        </ParamField>
      </Accordion>

      <Accordion title="Identification number" icon="hashtag">
        <ParamField body="Identification number" type="string" required>
          Variable: `documentNumber`. Identity document number of the person to query.
        </ParamField>
      </Accordion>
    </AccordionGroup>
  </Tab>

  <Tab title="Outputs">
    #### ✅ Success

    <AccordionGroup>
      <Accordion title="No disciplinary record" icon="circle-check">
        Indicates that the queried person **has no disciplinary records** at the Attorney General's Office.

        <Tip>
          The response delivered corresponds to the complete response from the Verifik provider.
        </Tip>

        **Response example:**

        ```json theme={null}
        {
          "data": {
            "documentType": "CC",
            "documentNumber": "XXXXXXXXXX",
            "fullName": "FIRST_NAME LAST_NAME",
            "firstName": "FIRST_NAME",
            "lastName": "LAST_NAME",
            "arrayName": [
              "FIRST_NAME",
              "LAST_NAME"
            ],
            "antecedentes": [],
            "isRequired": false,
            "legend": "Online query of Disciplinary Records, The Attorney General's Office certifies that at 15 hours on 31/08/2022 Mr./Ms. FIRST_NAME LAST_NAME identified with Citizenship Card Number XXXXXXXXXX The citizen has no criminal record.",
            "expeditionDate": "This information has been classified as semi-private and is not available for delivery on a temporary basis. - RNEC 2686",
            "expeditionPlace": "This information has been classified as semi-private and is not available for delivery on a temporary basis. - RNEC 2686",
            "dateOfBirth": "This information has been classified as semi-private and is not available for delivery on a temporary basis. - RNEC 2686"
          },
          "signature": {
            "dateTime": "August 31, 2022 3:53 PM",
            "message": "Certified by Verifik.co"
          }
        }
        ```

        **Key fields:**

        * `antecedentes`: Empty array indicates no criminal record
        * `isRequired`: Indicates whether there is a pending requirement
        * `legend`: Official certification from the Attorney General's Office
      </Accordion>
    </AccordionGroup>

    #### 🔴 Errors

    <AccordionGroup>
      <Accordion title="Has disciplinary record" icon="triangle-exclamation">
        Indicates that the person **does have disciplinary records** at the Attorney General's Office.

        <Warning>
          The information returned includes details of sanctions, disqualifications, crimes, and proceedings.
        </Warning>

        **Response example:**

        ```json theme={null}
        {
          "data": {
            "documentType": "CC",
            "documentNumber": "XXXXXXXXXX",
            "citizen": "FIRST_NAME LAST_NAME",
            "hasRecord": true,
            "isRequired": false,
            "legend": "Online query of Disciplinary Records, The Attorney General's Office certifies that at 9:46:41 PM on 2/8/2022 Mr./Ms. FIRST_NAME LAST_NAME identified with Citizenship Card Number XXXXXXXXXX The citizen does have a criminal record.",
            "antecedentes": [
              {
                "sanciones": [
                  {
                    "Sancion": "PRISON",
                    "Termino": "78 MONTHS",
                    "Clase": "PRINCIPAL",
                    "Suspendida": ""
                  },
                  {
                    "Sancion": "DISQUALIFICATION FROM EXERCISING RIGHTS AND PUBLIC FUNCTIONS",
                    "Termino": "78 MONTHS",
                    "Clase": "ACCESSORY",
                    "Suspendida": ""
                  }
                ],
                "instancias": [
                  {
                    "Nombre": "FIRST",
                    "Autoridad": "CRIMINAL CIRCUIT COURT - CITY (DEPARTMENT)",
                    "Fecha providencia": "30/06/2015",
                    "fecha efecto Juridicos": "13/06/2016"
                  }
                ],
                "delitos": [
                  {
                    "Descripcion del Delito": "CRIME DESCRIPTION (LAW 599 OF 2000)"
                  }
                ],
                "inhabilidades": [
                  {
                    "Módulo": "CRIMINAL",
                    "Inhabilidad legal": "DISQUALIFICATION FROM HOLDING PUBLIC OFFICE LAW 734 ART 38 NUM 1",
                    "Fecha de inicio": "13/06/2016",
                    "Fecha fin": "12/06/2026"
                  }
                ]
              }
            ]
          },
          "signature": {
            "dateTime": "August 2, 2022 4:46 PM",
            "message": "Certified by Verifik.co"
          }
        }
        ```

        **Important fields:**

        * `hasRecord`: `true` indicates the person has a criminal record
        * `antecedentes[]`: Array with detailed information on:
          * **sanciones**: Sanction type, term, and class
          * **instancias**: Authority that issued the sanction and dates
          * **delitos**: Description of crimes
          * **inhabilidades**: Disqualification period from holding public office
      </Accordion>

      <Accordion title="Missing data" icon="circle-xmark">
        Occurs when not all required parameters are sent to perform the query.

        **Response example:**

        ```json theme={null}
        {
          "code": "MissingParameter",
          "message": "missing documentType\n. missing documentNumber\n"
        }
        ```

        The `message` field indicates which specific parameters are missing in the request.
      </Accordion>

      <Accordion title="No record" icon="magnifying-glass">
        Occurs when the provider indicates that no record associated with the queried identification was found (Not Found).

        **Response example:**

        ```json theme={null}
        {
          "code": "NotFound",
          "message": "Record not found."
        }
        ```

        <Note>
          There is a difference between "no criminal record" and "no record". The first indicates the person was found and has no criminal record, while the second indicates no record of that person was found in the system.
        </Note>
      </Accordion>

      <Accordion title="Service down" icon="server">
        The provider server did not respond. Also occurs in cases where the submitted identification is not valid.

        **Response example:**

        ```json theme={null}
        {
          "code": "Conflict",
          "message": "Server_Not_Response_From_Procuraduria"
        }
        ```

        <Warning>
          This error may indicate connectivity issues with the provider or that the queried document has an invalid format.
        </Warning>
      </Accordion>

      <Accordion title="Unexpected error" icon="bug">
        Occurs when an unforeseen event happens during the query process.
      </Accordion>
    </AccordionGroup>
  </Tab>
</Tabs>

## Integration

<Steps>
  <Step title="Capture the user's data">
    Collect the document type and identification number from the user in your flow.

    <Tip>
      Use the [Question node](/guides/nodos/pregunta) or [user variables](/guides/variables/user) to capture this information.
    </Tip>
  </Step>

  <Step title="Configure the parameters">
    Assign the captured values to the tool's required parameters:

    * `documentType`: Document type (CC, PEP, CE)
    * `documentNumber`: Identification number
  </Step>

  <Step title="Handle the outputs">
    Implement different flows based on the result:

    * **✅ No criminal record:** Continue the normal process
    * **🔴 Errors:** Implement retries, validations, or notify the user according to the error type (missing data, no record, service down, etc.)
  </Step>

  <Step title="Store and process the results">
    Save the response in [memory variables](/guides/variables/memory) to use in subsequent flow decisions.

    ```javascript theme={null}
    // Example: Check whether the person has a criminal record
    if (response.data.hasRecord === true) {
      // Flow for persons with criminal record
      // You can access details: sanctions, disqualifications, crimes
    } else {
      // Flow for persons without criminal record
    }
    ```
  </Step>
</Steps>

<CardGroup cols={2}>
  <Card title="Provider response" icon="server">
    The query result depends directly on the information returned by the Verifik provider and the Attorney General's Office.
  </Card>

  <Card title="Result interpretation" icon="circle-info">
    It is important to distinguish between "no criminal record" (person verified without a criminal record) and "no record" (person not found in the system).
  </Card>

  <Card title="Sensitive information" icon="shield-halved">
    Data on expedition date, expedition place, and date of birth are classified as semi-private information and are not temporarily available according to the RNEC.
  </Card>
</CardGroup>
