# Retrieve debt details for a link

Retrieve debt reports information for a specific fiscal link.

Endpoint: POST /api/cl/debt-reports/
Version: 1.223.0
Security: basicAuth

## Header parameters:

  - `X-Belvo-Request-Mode` (string)
    Recommended header parameter to make your POST request asynchronous (thus preventing timeouts and improving your data flow).

When you make an asynchronous request, Belvo responds with a 202 - Accepted payload, including the request_id. Once we have retrieved the requested information, you will receive a webhook with the link and request IDs.
    Enum: "async"

## Query parameters:

  - `omit` (string)
    Omit certain fields from being returned in the response. For more information, see our Filtering responses DevPortal article.

  - `fields` (string)
    Return only the specified fields in the response. For more information, see our Filtering responses DevPortal article.

## Request fields (application/json):

  - `link` (string, required)
    The link.id you want to retrieve information for.
    Example: "c81a1dea-6dd6-4999-8b9f-541ee8197058"

  - `attach_pdf` (boolean)
    When set to true, you will receive the PDF in binary format in the response.
    Example: true

  - `save_data` (boolean)
    Indicates whether or not to persist the data in Belvo. By default, this is set to true and we return a 201 Created response.

When set to false, the data won't be persisted and we return a 200 OK response.
    Example: true

## Response 200 fields (application/json):

  - `id` (string)
    Belvo's unique identifier for the current item.
    Example: "0d3ffb69-f83b-456e-ad8e-208d0998d71d"

  - `link` (string,null)
    The link.id the data belongs to.
    Example: "30cb4806-6e00-48a4-91c9-ca55968576c8"

  - `collected_at` (string)
    The ISO-8601 timestamp when the data point was collected.
    Example: "2022-02-09T08:45:50.406032Z"

  - `created_at` (string)
    The ISO-8601 timestamp of when the data point was created in Belvo's database.
    Example: "2022-02-09T08:45:50.406032Z"

  - `personal_data` (object)

  - `personal_data.full_name` (string)
    The full name of the individual.
    Example: "Cabezas Pérez Martín Vicente "

  - `personal_data.document_id_type` (string)
    The type of document ID of the individual. For Chile, this will be always set to RUT.
    Enum: "RUT"

  - `personal_data.document_id_number` (string)
    The document ID number of the individual. For Chile, this will be the RUT number.
    Example: "12345678-9"

  - `debt_data_last_update` (string)
    The date when the debt data was last updated, in YYYY-MM-DD format.
    Example: "2023-07-02"

  - `currency` (string)
    The currency of the debts. For Chile, this will be the CLP.
    Example: "CLP"

  - `total` (number,null)
    The total amount of debt including current, delinquent, severely delinquent, and defaulted debts.
    Example: 6506000.02

  - `current` (number,null)
    The amount of debt that is currently outstanding but not past due.
    Example: 5350000.02

  - `delinquent` (number,null)
    The amount of debt that is 30-59 days past due.

  - `severely_delinquent` (number,null)
    The amount of debt that is 60-89 days past due.
    Example: 56000.02

  - `defaulted` (number,null)
    The amount of debt that is 90 days past due.
    Example: 1100000.02

  - `direct_debts` (array,null)
    A list of debts that are directly atttribued to the individual.

  - `direct_debts.financial_institution` (string)
    The name of the financial institution where the debt is held.
    Example: "Banco Santander"

  - `direct_debts.credit_type` (string)
    The type of credit issued by the financial institution. For example, Vivienda, Comercial, Consumo, or Otro.
    Example: "Vivienda"

  - `direct_debts.amount` (number)
    The total amount of the debt at the financial institution.
    Example: 5000000.02

  - `direct_debts.current` (number,null)
    The current outstanding amount of the debt at the financial institution.
    Example: 5000000.02

  - `direct_debts.delinquent` (number,null)
    The amount of debt that is 30-59 days past due.

  - `direct_debts.severely_delinquent` (number,null)
    The amount of debt that is 60-89 days past due.

  - `direct_debts.defaulted` (number,null)
    The amount of debt that is 90 days past due.

  - `indirect_debts` (array,null)
    List of indirect debts from financial institutions.

  - `indirect_debts.financial_institution` (string)
    Name of the financial institution providing the indirect debt.
    Example: "Banco BCI"

  - `indirect_debts.credit_type` (string)
    The type of credit issued by the financial institution. For example, Vivienda, Comercial, Consumo, or Otro.
    Example: "Consumo"

  - `indirect_debts.amount` (number)
    The total amount of the debt at the financial institution.
    Example: 200000.02

  - `indirect_debts.current` (number,null)
    The current outstanding amount of the debt at the financial institution.

  - `indirect_debts.delinquent` (number,null)
    The amount of debt that is 30-59 days past due.

  - `indirect_debts.severely_delinquent` (number,null)
    The amount of debt that is 60-89 days past due.

  - `indirect_debts.defaulted` (number,null)
    The amount of debt that is 90 days past due.
    Example: 200000.02

  - `credit_lines` (array,null)
    List of credit lines (such as credit cards) available to the individual.

  - `credit_lines.financial_institution` (string)
    The name of the financial institution providing the credit line.
    Example: "Banco BCI"

  - `credit_lines.direct_amount` (number,null)
    The amount of direct credit available.
    Example: 5000000.02

  - `credit_lines.indirect_amount` (number,null)
    The amount of indirect credit available.

  - `other_credits` (array,null)
    List of other credits (such as guarantee notes, foreign credit, and so on) available to the individual.

  - `other_credits.financial_institution` (string)
    The name of the financial institution providing the credit.
    Example: "Banco BCI"

  - `other_credits.direct_amount` (number,null)
    The amount of direct credit available.

  - `other_credits.indirect_amount` (number,null)
    The amount of indirect credit available.
    Example: 250000.02

## Response 403 fields (application/json):

  - `code` (string)
    A unique error code (access_to_resource_denied) that allows you to classify and handle the error programmatically.


ℹ️ Check our DevPortal for more information on how to handle 403 access_to_resource_denied.
    Example: "access_to_resource_denied"

  - `message` (string)
    A short description of the error. 


For access_to_resource_denied errors, the description is:
  
  - You don't have access to this resource..
    Example: "You don't have access to this resource."

  - `request_id` (string)
    A 32-character unique ID of the request (matching a regex pattern of: [a-f0-9]{32}). Provide this ID when contacting the Belvo support team to accelerate investigations.
    Example: "9e7b283c6efa449c9c028a16b5c249fb"

## Response 404 fields (application/json):

  - `code` (string)
    A unique error code (not_found) that allows you to classify and handle the error programmatically.
    Example: "not_found"

  - `message` (string)
    A short description of the error.


For not_found errors, the description is:

  - Not found
    Example: "Not found"

  - `request_id` (string)
    A 32-character unique ID of the request (matching a regex pattern of: [a-f0-9]{32}). Provide this ID when contacting the Belvo support team to accelerate investigations.
    Example: "9e7b283c6efa449c9c028a16b5c249fb"

## Response 408 fields (application/json):

  - `code` (string)
    A unique error code (request_timeout) that allows you to classify and handle the error programmatically.


ℹ️ Check our DevPortal for more information on how to handle 408 request_timeout errors.
    Example: "request_timeout"

  - `message` (string)
    A short description of the error. 


For request_timeout errors, the description is:
  
  - The request timed out, you can retry asking for less data by changing your query parameters.
    Example: "The request timed out, you can retry asking for less data by changing your query parameters"

  - `request_id` (string)
    A 32-character unique ID of the request (matching a regex pattern of: [a-f0-9]{32}). Provide this ID when contacting the Belvo support team to accelerate investigations.
    Example: "9e7b283c6efa449c9c028a16b5c249fb"

## Response 500 fields (application/json):

  - `code` (string)
    A unique error code (unexpected_error) that allows you to classify and handle the error programmatically.


ℹ️ Check our DevPortal for more information on how to handle 500 unexpected_error errors.
    Example: "unexpected_error"

  - `message` (string)
    A short description of the error. 


For unexpected_error errors, the description is:
  
  - Belvo is unable to process the request due to an internal system issue or to an unsupported response from an institution.
    Example: "Belvo is unable to process the request due to an internal system issue or to an unsupported response from an institution"

  - `request_id` (string)
    A 32-character unique ID of the request (matching a regex pattern of: [a-f0-9]{32}). Provide this ID when contacting the Belvo support team to accelerate investigations.
    Example: "9e7b283c6efa449c9c028a16b5c249fb"


