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

# Listar falências e recuperações da entidade

> Lista anotações de falência e recuperação disponíveis para a entidade.



## OpenAPI

````yaml /api-reference/openapi.json get /v2/entities/{id}/bankruptcy
openapi: 3.1.0
info:
  title: Base39 API
  description: Base39 API
  version: 1.0.0
  contact:
    name: Base39 Team
    url: https://base39.com.br
    email: suporte@base39.com.br
  termsOfService: https://base39.com.br/termos
  license:
    name: Proprietary
    url: https://base39.com.br/termos
servers:
  - url: https://api.base39.com.br
    description: Production
  - url: https://api.dev.base39.cloud
    description: Development
  - url: http://localhost:3000
    description: Local
security:
  - OAuth2: []
tags:
  - name: Entidades
  - name: Pesquisa
  - name: Empresas
  - name: Cadastro
  - name: Endereços
  - name: Relacionamentos
  - name: Consultas
  - name: Crédito e finanças
  - name: Restrições
  - name: Cheques
  - name: Protestos
  - name: Dívidas com a União
  - name: SCR
  - name: Processos e falências
  - name: Conformidade
  - name: Certidões
  - name: Reputação
  - name: Benefícios sociais
  - name: Histórico cadastral
  - name: Arquivos
  - name: Regras
  - name: Monitoramento
    description: Eventos do histórico de empresas e atividades da organização.
paths:
  /v2/entities/{id}/bankruptcy:
    get:
      tags:
        - Processos e falências
      summary: Listar falências e recuperações da entidade
      description: Lista anotações de falência e recuperação disponíveis para a entidade.
      operationId: entities_get_bankruptcy
      parameters:
        - name: id
          required: true
          in: path
          description: CPF, CNPJ ou identificador da empresa (cmp_*).
          schema:
            type: string
        - name: asOf
          required: false
          in: query
          description: Data de referência (YYYY-MM-DD)
          schema:
            type: string
        - name: fields
          required: false
          in: query
          description: >-
            Campos opcionais separados por vírgula: "summary.short",
            "summary.long" e "summary.mdx". Sem summary.*, o campo
            metadata.summary é omitido.
          schema:
            type: string
      responses:
        '200':
          description: >-
            Consulta concluída. Verifique o status e a proveniência dos dados
            quando presentes.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EntityRestrictionRecordsOutput'
components:
  schemas:
    EntityRestrictionRecordsOutput:
      type: object
      properties:
        object:
          type: string
          description: Identificador do tipo do objeto
          default: list
        results:
          description: Lista de resultados da página atual
          type: array
          items:
            $ref: '#/components/schemas/CompanyRestrictionRecordsOutput'
        next_cursor:
          type: string
          description: Cursor da próxima página; nulo quando não há mais resultados.
          nullable: true
        has_more:
          type: boolean
          description: Indica se há mais resultados após esta página
        type:
          type: string
          description: Tipo dos resultados
        metadata:
          description: >-
            Status e proveniência do domínio. Uma lista vazia deve ser
            interpretada junto com esses metadados.
          allOf:
            - $ref: '#/components/schemas/EntityDomainMetadataOutput'
      required:
        - object
        - results
        - has_more
        - metadata
    CompanyRestrictionRecordsOutput:
      type: object
      properties:
        datasets:
          type: array
          items:
            $ref: '#/components/schemas/CompanyRestrictionDatasetOutput'
        summaryRow:
          $ref: '#/components/schemas/CompanyRestrictionSummaryRowOutput'
        section:
          $ref: '#/components/schemas/CompanyRestrictionRecordSectionOutput'
      required:
        - datasets
        - summaryRow
        - section
    EntityDomainMetadataOutput:
      type: object
      properties:
        status:
          type: string
          description: >-
            Estado da consulta: NOT_QUERIED (não consultada), QUERY_SUCCEEDED
            (concluída), QUERY_OUTDATED (desatualizada), QUERY_FAILED (falha) ou
            QUERY_PARTIALLY_SUCCEEDED (parcial).
          enum:
            - NOT_QUERIED
            - QUERY_SUCCEEDED
            - QUERY_OUTDATED
            - QUERY_FAILED
            - QUERY_PARTIALLY_SUCCEEDED
        summary:
          description: >-
            Resumo do domínio em Markdown ou MDX, solicitado por
            ?fields=summary.short, summary.long e/ou summary.mdx. Um formato
            retorna texto. Vários formatos retornam um objeto { short, long, mdx
            }.
          oneOf:
            - type: string
            - type: object
              properties:
                short:
                  type: string
                long:
                  type: string
                mdx:
                  type: string
        provenance:
          description: Proveniência dos dados retornados por fonte.
          allOf:
            - $ref: '#/components/schemas/EntityDomainProvenanceOutput'
      required:
        - status
        - provenance
    CompanyRestrictionDatasetOutput:
      type: object
      properties:
        slug:
          type: string
        name:
          type: string
          nullable: true
        queryId:
          type: string
          nullable: true
        createdAt:
          type: string
          format: date-time
          nullable: true
        status:
          type: string
          nullable: true
        cacheStatus:
          type: string
          nullable: true
        cost:
          type: number
          nullable: true
        recordCount:
          type: number
        hasData:
          type: boolean
        description:
          type: string
          nullable: true
        score:
          type: number
          nullable: true
        riskLabel:
          type: string
          nullable: true
        kpis:
          type: array
          items:
            $ref: '#/components/schemas/CompanyRestrictionDatasetKpiOutput'
      required:
        - slug
        - recordCount
        - hasData
        - kpis
    CompanyRestrictionSummaryRowOutput:
      type: object
      properties:
        key:
          type: string
        label:
          type: string
        cells:
          type: array
          items:
            $ref: '#/components/schemas/CompanyRestrictionSummaryCellOutput'
      required:
        - key
        - label
        - cells
    CompanyRestrictionRecordSectionOutput:
      type: object
      properties:
        key:
          type: string
        label:
          type: string
        records:
          type: array
          items:
            $ref: '#/components/schemas/CompanyRestrictionProtestOutput'
      required:
        - key
        - label
        - records
    EntityDomainProvenanceOutput:
      type: object
      properties:
        datasets:
          description: Fontes consultadas, com status e datas de observação.
          type: array
          items:
            $ref: '#/components/schemas/EntityDatasetProvenanceOutput'
      required:
        - datasets
    CompanyRestrictionDatasetKpiOutput:
      type: object
      properties:
        key:
          type: string
        label:
          type: string
        amount:
          type: number
          nullable: true
        count:
          type: number
          nullable: true
      required:
        - key
        - label
    CompanyRestrictionSummaryCellOutput:
      type: object
      properties:
        datasetSlug:
          type: string
        applies:
          type: boolean
        confirmed:
          type: boolean
        count:
          type: number
          nullable: true
        amount:
          type: number
          nullable: true
        description:
          type: string
          nullable: true
      required:
        - datasetSlug
        - applies
        - confirmed
    CompanyRestrictionProtestOutput:
      type: object
      properties:
        key:
          type: string
        category:
          type: string
        date:
          type: string
          nullable: true
        dueDate:
          type: string
          nullable: true
        value:
          type: number
          nullable: true
        creditor:
          type: string
          nullable: true
        institution:
          type: string
          nullable: true
        contract:
          type: string
          nullable: true
        modality:
          type: string
          nullable: true
        document:
          type: string
          nullable: true
        notary:
          type: string
          nullable: true
        city:
          type: string
          nullable: true
        state:
          type: string
          nullable: true
        status:
          type: string
          nullable: true
        type:
          type: string
          nullable: true
        origin:
          type: string
          nullable: true
        maturity:
          type: string
          nullable: true
        sources:
          type: array
          items:
            $ref: '#/components/schemas/CompanyRestrictionSourceOutput'
        sourceRecords:
          type: array
          items:
            $ref: '#/components/schemas/CompanyRestrictionSourceRecordOutput'
      required:
        - key
        - category
        - sources
        - sourceRecords
    EntityDatasetProvenanceOutput:
      type: object
      properties:
        queryId:
          type: string
          description: >-
            Identificador da consulta de origem; nulo quando não há consulta
            associada.
          nullable: true
        datasetSlug:
          type: string
          description: Identificador da fonte de dados consultada.
        requirement:
          type: string
          description: >-
            Indica se a fonte é obrigatória (required) ou opcional (optional)
            para o domínio.
          enum:
            - required
            - optional
        visible:
          type: boolean
          description: Indica se a fonte está configurada para exibição.
        onRefresh:
          type: boolean
          description: Indica se a fonte está configurada para atualização.
        sourcePriority:
          type: number
          description: Prioridade da fonte na consolidação dos dados.
        observedAt:
          type: string
          description: Data e hora de observação dos dados na fonte.
          nullable: true
        recordedAt:
          type: string
          description: Data e hora de registro da proveniência.
          nullable: true
        status:
          type: string
          description: >-
            Estado da consulta: NOT_QUERIED (não consultada), QUERY_SUCCEEDED
            (concluída), QUERY_OUTDATED (desatualizada), QUERY_FAILED (falha) ou
            QUERY_PARTIALLY_SUCCEEDED (parcial).
          enum:
            - NOT_QUERIED
            - QUERY_SUCCEEDED
            - QUERY_OUTDATED
            - QUERY_FAILED
            - QUERY_PARTIALLY_SUCCEEDED
        errorCode:
          type: string
          description: Código da falha da consulta, quando disponível.
          enum:
            - upstream_error
            - upstream_unauthorized
            - upstream_not_found
            - upstream_rate_limit
            - upstream_invalid_request
            - upstream_unavailable
            - upstream_timeout
            - upstream_invalid_response
            - mock_response_missing
            - provider_execution_failed
            - query_persistence_failed
            - workflow_failed
          nullable: true
      required:
        - datasetSlug
        - requirement
        - visible
        - onRefresh
        - sourcePriority
        - status
    CompanyRestrictionSourceOutput:
      type: object
      properties:
        slug:
          type: string
        label:
          type: string
        queryId:
          type: string
          nullable: true
      required:
        - slug
        - label
    CompanyRestrictionSourceRecordOutput:
      type: object
      properties:
        key:
          type: string
        category:
          type: string
        date:
          type: string
          nullable: true
        dueDate:
          type: string
          nullable: true
        value:
          type: number
          nullable: true
        creditor:
          type: string
          nullable: true
        institution:
          type: string
          nullable: true
        contract:
          type: string
          nullable: true
        modality:
          type: string
          nullable: true
        document:
          type: string
          nullable: true
        notary:
          type: string
          nullable: true
        city:
          type: string
          nullable: true
        state:
          type: string
          nullable: true
        status:
          type: string
          nullable: true
        type:
          type: string
          nullable: true
        origin:
          type: string
          nullable: true
        maturity:
          type: string
          nullable: true
        source:
          $ref: '#/components/schemas/CompanyRestrictionSourceOutput'
      required:
        - key
        - category
        - source
  securitySchemes:
    OAuth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://id.local.base39.cloud/oauth2/authorize
          tokenUrl: https://id.local.base39.cloud/oauth2/token
          scopes:
            profile: Read user profile
            email: Read user email
            openid: OpenID authentication
      description: OAuth2 Authorization Code flow

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.