---
title: "PGFN Debtor"
method: POST
path: "/br/pgfn/debtor/v1"
tags: ["Brazil", "Procuradoria-Geral da Fazenda Nacional (PGFN)"]
---

# PGFN Debtor

`POST /br/pgfn/debtor/v1`

## Request

- Base URL: `https://api.croma.run`
- URL: `https://api.croma.run/br/pgfn/debtor/v1`
- Auth: HTTP bearer

Total what one Brazilian company owes the Union in the dívida ativa (Procuradoria-Geral da Fazenda Nacional), by CNPJ or by its 8-character root for every establishment: the number of debts, the amount owed as principal debtor, the part in court, a breakdown by regime (federal taxes, social security, FGTS), and the 50 largest debts. `found: false` when PGFN has inscribed nothing. Served by Croma (`as_of` says how current the data is), refreshed with each quarterly release.

**Dataset endpoint**: answers from the whole source in milliseconds and carries `as_of`.

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `document_number` string, required: CNPJ de la empresa, con o sin puntuación, p. ej. `12.345.678/0001-90`, o su raíz de 8 caracteres para sumar todos sus establecimientos.

## Response `200`

Successful response

- PgfnDebtorResponse
  - `data` PgfnDebtorData, required
    - `found` boolean, required: false when the company owes the Union nothing PGFN has inscribed.
    - `document_number` string, required: The CNPJ or root queried, echoed back.
    - `as_of` string, nullable, required: How current the data in this response is.
    - `reference_month` string, nullable, required: `yyyy-mm` of PGFN's release the answer comes from.
    - `debtor_name` string, nullable, required
    - `totals` object, nullable, required
      - `debts` number, required: Every debt the company appears on, as principal or co-responsible.
      - `principal_debts` number, required: Debts on which the company is the principal debtor.
      - `principal_amount` number, required: What the company owes as principal debtor, reais. Co-responsible debts are left out, since they repeat another debtor's amount.
      - `in_court_amount` number, required: The part of `principal_amount` being enforced in court.
      - `by_regime` object, required
        - `nao_previdenciario` object, required
          - `debts` number, required: Debts on which the company is the principal debtor.
          - `amount` number, required: Their consolidated amount, reais.
        - `previdenciario` object, required
          - `debts` number, required: Debts on which the company is the principal debtor.
          - `amount` number, required: Their consolidated amount, reais.
        - `fgts` object, required
          - `debts` number, required: Debts on which the company is the principal debtor.
          - `amount` number, required: Their consolidated amount, reais.
      - `complete` boolean, required: false when the company has more debts than one answer sums; the totals then cover the largest ones.
    - `debts` object[], required: The company's largest debts first, up to 50.
      - `id` string, required: The regime, the inscription number and the company's CNPJ, joined by colons: the key.
      - `regime` 'nao_previdenciario' | 'previdenciario' | 'fgts', required: `nao_previdenciario` (federal taxes and other non-social-security debt), `previdenciario` (social security contributions) or `fgts` (the workers' severance fund).
      - `inscription_number` string, required: The inscription's number in the dívida ativa, as PGFN publishes it.
      - `document_number` string, required: The company's CNPJ, 14 characters, no punctuation.
      - `document` string, required: The CNPJ as it is written, `12.345.678/0001-90`.
      - `cnpj_root` string, required: The CNPJ's first 8 characters: the same for every establishment of one company.
      - `debtor_name` string, required: The company's name as PGFN records it.
      - `debtor_type` 'principal' | 'co_responsible' | 'joint', required: The company's role in the debt: `principal`, `co_responsible` or `joint`. An inscription with several debtors has a row for each.
      - `state` string, nullable, required: Two-letter state (UF) of the company.
      - `responsible_unit` string, nullable, required: The PGFN unit in charge, e.g. `3ª REGIÃO`.
      - `registering_unit` string, nullable, required: The unit that registered an FGTS debt.
      - `collecting_entity` 'pgfn' | 'caixa', required: Who collects the debt: PGFN, or Caixa for part of the FGTS.
      - `status_type` 'in_collection' | 'tax_benefit' | 'guaranteed' | 'suspended_by_court' | 'in_negotiation', nullable, required: `in_collection`, `tax_benefit`, `guaranteed`, `suspended_by_court` or `in_negotiation`.
      - `status` string, nullable, required: The inscription's detailed status, as PGFN words it.
      - `revenue_type` string, nullable, required: What the debt is for, as PGFN words it, e.g. `Receita da dívida ativa - PIS`, `Simples Nacional`.
      - `registered_on` string, nullable, required: `yyyy-mm-dd` the debt was inscribed.
      - `in_court` boolean, required: true when the debt is being enforced in court (ajuizada).
      - `amount` number, required: The consolidated amount in reais, with legal charges, as of PGFN's extraction. The whole inscription's amount: repeated on each debtor's row.
      - `reference_month` string, required: `yyyy-mm`: the month PGFN's quarterly release refers to.

## Other responses

- `400`: Invalid request body
- `401`: Missing or invalid API key
- `429`: Rate limit exceeded
- `500`: Internal error
- `502`: Upstream source returned an error

---

[API](https://skmtc.dev/usecroma/apis/croma-marketplace-api.md) · [All operations](https://skmtc.dev/usecroma/apis/croma-marketplace-api/llms.txt) · [OpenAPI document](https://skmtc.dev/usecroma/apis/croma-marketplace-api/revisions/df016cdb29d7?raw)
