> ## Documentation Index
> Fetch the complete documentation index at: https://bmpmoneyplus-sandbox.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 8 - Consulta QSA por CNPJ

Utilize este endpoint para realizar uma consulta de Quadro de Sócios e Administradores (QSA), que retorna quem são os sócios e administradores de uma empresa, suas qualificações e informações relevantes sobre sua participação na empresa. Mas não apresenta os documentos dos sócios.

**Exemplo de retorno completo**

O exemplo de retorno, mostrado no lado direito desta tela, está resumido. Na linha `"json": "<string>"` o retorno do Bureau vem de forma serializada, sendo necessário deserializar para melhor visualização. Aqui está um exemplo do retorno deserializado que vem no campo `"json":`.

```json theme={null}
{
    \"Erro": false,
    \"MensagemOperador": "OK",
    \"ResultadoConsulta": {
        \"InformacoesAdicionais": {
            \"OptanteSimples": "SIM",
            \"OptanteMei": "SIM",
            \"ListaPeriodosSimples": [
                {
                    \"DataInicio": "2024-03-23",
                    \"DataFim": ""
                }
            ]
        },
        \"Socios": null,
        \"Ni": "11222333000110",
        \"TipoEstabelecimento": "1",
        \"DescricaoTipoEstabelecimento": "Matriz",
        \"NomeEmpresarial": "Empresa de teste LTDA",
        \"NomeFantasia": "",
        \"SituacaoCadastral": {
            \"Codigo": "2",
            \"Data": "2024-03-23",
            \"Motivo": "",
            \"Descricao": "Ativa"
        },
        \"NaturezaJuridica": {
            \"Codigo": "2135",
            \"Descricao": "Empresário (Individual)"
        },
        \"DataAbertura": "2024-03-23",
        \"CnaePrincipal": {
            \"Codigo": "6399200",
            \"Descricao": "Outras atividades de prestação de serviços de informação não especificadas anteriormente"
        },
        \"CnaeSecundarias": [
            {
                \"Codigo": "8599699",
                \"Descricao": "Outras atividades de ensino não especificadas anteriormente"
            }
        ],
        \"Endereco": {
            \"TipoLogradouro": "RUA",
            \"Logradouro": "FOGO",
            \"Numero": "65",
            \"Complemento": "",
            \"Cep": "31270999",
            \"Bairro": "LIBERDADE",
            \"Municipio": {
                \"Codigo": "4123",
                \"Descricao": "BELO HORIZONTE"
            },
            \"Uf": "MG",
            \"Pais": {
                \"Codigo": "105",
                \"Descricao": "BRASIL"
            }
        },
        \"MunicipioJurisdicao": {
            \"Codigo": "0610100",
            \"Descricao": "BELO HORIZONTE"
        },
        \"Telefones": [
            {
                \"DDD": "31",
                \"Numero": "97453444"
            }
        ],
        \"CorreioEletronico": "empresaL@GMAIL.COM",
        \"CapitalSocial": 100000,
        \"Porte": "01",
        \"DescricaoPorte": "Microempresa - ME",
        \"SituacaoEspecial": "",
        \"DataSituacaoEspecial": ""
    }
}
```

**Tabela de dados fictícios para testes**

| CNPJ | SITUAÇÃO |
| - | - |
| 34238864000168 | ATIVO |
| 54447820000155 | SUSPENSO |
| 46768703000165 | INAPTO |
| 31151791000184 | BAIXADO |
| 34428654000132 | NULO |


## OpenAPI

````yaml post /Bureau/ConsultarReceitaQSACNPJ
openapi: 3.0.1
info:
  title: BMPDigitalCore.ApiExterna.Bureau.API
  version: '1.0'
servers:
  - url: https://api.bmpdigital.moneyp.dev.br/
    description: Localhost
security:
  - Bearer: []
paths:
  /Bureau/ConsultarReceitaQSACNPJ:
    post:
      tags:
        - BureauSync
      parameters:
        - name: IdempotencyKey
          in: header
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConsultaSerproReceitaCommand'
          text/json:
            schema:
              $ref: '#/components/schemas/ConsultaSerproReceitaCommand'
          application/*+json:
            schema:
              $ref: '#/components/schemas/ConsultaSerproReceitaCommand'
      responses:
        '200':
          description: Success
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ConsultaSerproReceitaResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ConsultaSerproReceitaResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ConsultaSerproReceitaResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ConsultaSerproReceitaResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ConsultaSerproReceitaResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ConsultaSerproReceitaResponse'
components:
  schemas:
    ConsultaSerproReceitaCommand:
      type: object
      properties:
        consulta:
          $ref: '#/components/schemas/SerproReceitaConsultarRequest'
      additionalProperties: false
    ConsultaSerproReceitaResponse:
      type: object
      properties:
        msg:
          type: string
          nullable: true
        result:
          type: boolean
          writeOnly: true
        messages:
          type: array
          items:
            $ref: '#/components/schemas/Message'
          nullable: true
        hasError:
          type: boolean
        falha:
          type: boolean
        json:
          type: string
          nullable: true
      additionalProperties: false
    SerproReceitaConsultarRequest:
      type: object
      properties:
        documento:
          type: string
          nullable: true
      additionalProperties: false
    Message:
      type: object
      properties:
        messageType:
          $ref: '#/components/schemas/ErrorType'
        code:
          type: string
          nullable: true
        context:
          type: string
          nullable: true
        description:
          type: string
          nullable: true
        field:
          type: string
          nullable: true
      additionalProperties: false
    ErrorType:
      enum:
        - 1
        - 2
        - 3
      type: integer
      format: int32
  securitySchemes:
    Bearer:
      type: apiKey
      description: Informe o token
      name: Authorization
      in: header

````