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

# Sanções

> Sanções, restrições, processos administrativos e listas de observação.

Sanções, restrições, processos administrativos e listas de observação do documento. Cada item traz `tipo` (`sancao`, `restricao`, `processo_administrativo` ou `watchlist`), até 50 de cada tipo. Envie `"datasets": ["sancoes"]`; a chave precisa do escopo `dados:sancoes`.


## OpenAPI

````yaml dados/ref/sancoes.openapi.yaml POST /dados/consultar
openapi: 3.1.0
info:
  description: API de dados por documento (CPF/CNPJ).
  title: NL Labs API de Dados
  version: 0.1.0
servers:
  - url: https://api.nlbs.ai
security: []
paths:
  /dados/consultar:
    post:
      tags:
        - dados
      summary: Consultar Sanções
      operationId: consultar_dados_consultar_post
      parameters:
        - description: >-
            Opcional. Mesma chave em 24 h a partir da primeira chamada devolve a
            mesma resposta, sem repetir a leitura.
          in: header
          name: Idempotency-Key
          required: false
          schema:
            anyOf:
              - maxLength: 255
                minLength: 1
                pattern: ^[A-Za-z0-9._\-]+$
                type: string
              - type: 'null'
            description: >-
              Opcional. Mesma chave em 24 h a partir da primeira chamada devolve
              a mesma resposta, sem repetir a leitura.
            title: Idempotency-Key
      requestBody:
        content:
          application/json:
            example:
              datasets:
                - sancoes
              documento: '11222333000181'
            schema:
              $ref: '#/components/schemas/ConsultaRequisicao'
        required: true
      responses:
        '200':
          content:
            application/json:
              examples:
                com_dados:
                  summary: Com dados
                  value:
                    consultado_em: '2026-01-15T12:00:00Z'
                    datasets:
                      sancoes:
                        encontrado: true
                        itens:
                          - autoridade: Orgao Exemplo
                            categoria: administrative
                            data_decisao: '2024-05-01'
                            data_publicacao: '2024-05-10'
                            descricao: null
                            moeda: null
                            status: active
                            tipo: sancao
                            tipo_sancao: debarment
                            titulo: Inidoneidade
                            valor: null
                    documento: '11222333000181'
                    encontrado: true
                    tipo: cnpj
                sem_dados:
                  summary: Sem dados
                  value:
                    consultado_em: '2026-01-15T12:00:00Z'
                    datasets:
                      sancoes:
                        encontrado: false
                        itens: []
                    documento: '11222333000181'
                    encontrado: false
                    tipo: cnpj
              schema:
                $ref: '#/components/schemas/ConsultaResposta'
          description: Um bloco por dataset pedido.
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErroResposta'
          description: Chave invalida
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErroResposta'
          description: Escopo insuficiente ou sem acesso
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErroResposta'
          description: Entrada invalida, ubo com CPF ou identidade com CNPJ
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErroResposta'
          description: Cota esgotada
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErroResposta'
          description: Indisponivel
      security:
        - APIKeyHeader: []
components:
  schemas:
    ConsultaRequisicao:
      additionalProperties: false
      properties:
        datasets:
          default:
            - sancoes
          description: Sempre ["sancoes"] nesta página.
          items:
            enum:
              - sancoes
            type: string
          maxItems: 1
          minItems: 1
          title: Datasets
          type: array
        documento:
          description: CPF ou CNPJ, com ou sem pontuacao.
          title: Documento
          type: string
      required:
        - documento
        - datasets
      title: ConsultaRequisicao
      type: object
    ConsultaResposta:
      properties:
        consultado_em:
          description: Instante da consulta, ISO 8601 em UTC (sufixo Z).
          examples:
            - '2026-01-15T12:00:00Z'
          format: date-time
          title: Consultado Em
          type: string
        datasets:
          properties:
            sancoes:
              $ref: '#/components/schemas/DatasetSancoes'
          required:
            - sancoes
          title: Datasets
          type: object
        documento:
          title: Documento
          type: string
        encontrado:
          title: Encontrado
          type: boolean
        tipo:
          enum:
            - cpf
            - cnpj
          title: Tipo
          type: string
      required:
        - documento
        - tipo
        - encontrado
        - consultado_em
        - datasets
      title: ConsultaResposta
      type: object
    ErroResposta:
      properties:
        erro:
          $ref: '#/components/schemas/ErroDetalhe'
      required:
        - erro
      title: ErroResposta
      type: object
    DatasetSancoes:
      properties:
        encontrado:
          title: Encontrado
          type: boolean
        itens:
          description: >-
            Sancoes, restricoes, processos administrativos e watchlist; ate 50
            de cada tipo.
          items:
            discriminator:
              mapping:
                processo_administrativo: '#/components/schemas/ItemProcessoAdministrativo'
                restricao: '#/components/schemas/ItemRestricao'
                sancao: '#/components/schemas/ItemSancao'
                watchlist: '#/components/schemas/ItemWatchlist'
              propertyName: tipo
            oneOf:
              - $ref: '#/components/schemas/ItemSancao'
              - $ref: '#/components/schemas/ItemRestricao'
              - $ref: '#/components/schemas/ItemProcessoAdministrativo'
              - $ref: '#/components/schemas/ItemWatchlist'
          title: Itens
          type: array
      required:
        - encontrado
        - itens
      title: DatasetSancoes
      type: object
    ErroDetalhe:
      properties:
        codigo:
          title: Codigo
          type: string
        mensagem:
          title: Mensagem
          type: string
      required:
        - codigo
        - mensagem
      title: ErroDetalhe
      type: object
    ItemProcessoAdministrativo:
      properties:
        acordo:
          anyOf:
            - type: boolean
            - type: 'null'
          description: 'Se houve acordo (ex.: leniencia).'
          title: Acordo
        data_abertura:
          anyOf:
            - format: date
              type: string
            - type: 'null'
          title: Data Abertura
        data_decisao:
          anyOf:
            - format: date
              type: string
            - type: 'null'
          title: Data Decisao
        data_encerramento:
          anyOf:
            - format: date
              type: string
            - type: 'null'
          title: Data Encerramento
        descricao:
          anyOf:
            - type: string
            - type: 'null'
          description: Truncada em 500 caracteres.
          title: Descricao
        numero:
          anyOf:
            - type: string
            - type: 'null'
          title: Numero
        orgao_julgador:
          anyOf:
            - type: string
            - type: 'null'
          title: Orgao Julgador
        origem:
          anyOf:
            - type: string
            - type: 'null'
          title: Origem
        resultado:
          anyOf:
            - type: string
            - type: 'null'
          title: Resultado
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
        tipo:
          const: processo_administrativo
          description: Sempre processo_administrativo.
          title: Tipo
          type: string
        tipo_processo:
          anyOf:
            - type: string
            - type: 'null'
          title: Tipo Processo
        titulo:
          anyOf:
            - type: string
            - type: 'null'
          title: Titulo
      required:
        - tipo
        - numero
        - tipo_processo
        - status
        - titulo
        - descricao
        - data_abertura
        - data_encerramento
        - data_decisao
        - origem
        - resultado
        - acordo
        - orgao_julgador
      title: ItemProcessoAdministrativo
      type: object
    ItemRestricao:
      properties:
        descricao:
          anyOf:
            - type: string
            - type: 'null'
          description: Truncada em 500 caracteres.
          title: Descricao
        escopo:
          anyOf:
            - type: string
            - type: 'null'
          description: Abrangencia da restricao.
          title: Escopo
        fim:
          anyOf:
            - format: date
              type: string
            - type: 'null'
          description: Fim da restricao; null se sem prazo.
          title: Fim
        inicio:
          anyOf:
            - format: date
              type: string
            - type: 'null'
          title: Inicio
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
        tipo:
          const: restricao
          description: Sempre restricao.
          title: Tipo
          type: string
        tipo_restricao:
          anyOf:
            - type: string
            - type: 'null'
          title: Tipo Restricao
      required:
        - tipo
        - tipo_restricao
        - escopo
        - status
        - descricao
        - inicio
        - fim
      title: ItemRestricao
      type: object
    ItemSancao:
      properties:
        autoridade:
          anyOf:
            - type: string
            - type: 'null'
          description: Orgao sancionador.
          title: Autoridade
        categoria:
          anyOf:
            - type: string
            - type: 'null'
          description: 'Categoria (ex.: administrative).'
          title: Categoria
        data_decisao:
          anyOf:
            - format: date
              type: string
            - type: 'null'
          title: Data Decisao
        data_publicacao:
          anyOf:
            - format: date
              type: string
            - type: 'null'
          title: Data Publicacao
        descricao:
          anyOf:
            - type: string
            - type: 'null'
          description: Truncada em 500 caracteres.
          title: Descricao
        moeda:
          anyOf:
            - type: string
            - type: 'null'
          title: Moeda
        status:
          anyOf:
            - type: string
            - type: 'null'
          description: 'Situacao da sancao (ex.: active).'
          title: Status
        tipo:
          const: sancao
          description: Sempre sancao.
          title: Tipo
          type: string
        tipo_sancao:
          anyOf:
            - type: string
            - type: 'null'
          description: 'Tipo da sancao (ex.: debarment).'
          title: Tipo Sancao
        titulo:
          anyOf:
            - type: string
            - type: 'null'
          title: Titulo
        valor:
          anyOf:
            - type: string
            - type: 'null'
          description: Valor da multa como texto decimal.
          title: Valor
      required:
        - tipo
        - tipo_sancao
        - categoria
        - status
        - titulo
        - descricao
        - autoridade
        - data_decisao
        - data_publicacao
        - valor
        - moeda
      title: ItemSancao
      type: object
    ItemWatchlist:
      properties:
        data_inclusao:
          anyOf:
            - format: date
              type: string
            - type: 'null'
          title: Data Inclusao
        data_remocao:
          anyOf:
            - format: date
              type: string
            - type: 'null'
          title: Data Remocao
        data_ultima_aparicao:
          anyOf:
            - format: date
              type: string
            - type: 'null'
          description: Ultima vez visto na lista.
          title: Data Ultima Aparicao
        motivo:
          anyOf:
            - type: string
            - type: 'null'
          description: Truncado em 500 caracteres.
          title: Motivo
        nivel_risco:
          anyOf:
            - type: string
            - type: 'null'
          title: Nivel Risco
        nome_na_fonte:
          anyOf:
            - type: string
            - type: 'null'
          description: Nome como aparece na lista.
          title: Nome Na Fonte
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
        tipo:
          const: watchlist
          description: Sempre watchlist.
          title: Tipo
          type: string
        tipo_entrada:
          anyOf:
            - type: string
            - type: 'null'
          title: Tipo Entrada
      required:
        - tipo
        - tipo_entrada
        - status
        - nivel_risco
        - nome_na_fonte
        - data_inclusao
        - data_ultima_aparicao
        - data_remocao
        - motivo
      title: ItemWatchlist
      type: object
  securitySchemes:
    APIKeyHeader:
      in: header
      name: X-API-Key
      type: apiKey

````

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