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

# 28 - Consultar

Por meio deste endpoint o parceiro consulta a proposta, obtendo o retorno dos campos principais

## Mensagens de erro

A tabela abaixo representa as mensagens de erro que podem ser retornadas ao tentar realizar uma requisição.

<Expandable title="Mensagens de requisições com erro">
  O retorno de uma requisição com status HTTP 400 (Bad Request) pode incluir as seguintes mensagens de erro:

  <Note>No exemplo de retorno ao lado, o campo `code` representa a coluna **Código** desta tabela; o campo `context` representa a coluna **Código Detalhado**; e o campo `message` representa a coluna **Mensagem**.</Note>

  | Categoria | Operação         | Ação      | Código | Código Detalhado | Mensagem                                     |
  | --------- | ---------------- | --------- | ------ | ---------------- | -------------------------------------------- |
  | Proposta  | ConsultaProposta | Consultar | C0019  | V0001            | Produto não configurado para esta integração |
  | Proposta  | ConsultaProposta | Consultar | C0113  | V0001            | Proposta não encontrada                      |
  | Proposta  | ConsultaProposta | Consultar | C0113  | V0002            | A Proposta não pertence à esta Integração    |
</Expandable>


## OpenAPI

````yaml post /Proposta/Consultar
openapi: 3.0.1
info:
  title: BMPDigitalCore.ApiExterna.Proposta.API
  version: '1.0'
servers:
  - url: https://api.bmpdigital.moneyp.dev.br
security:
  - Bearer: []
paths:
  /Proposta/Consultar:
    post:
      tags:
        - Proposta
      parameters:
        - name: IdempotencyKey
          in: header
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConsultaPropostaCommand'
          text/json:
            schema:
              $ref: '#/components/schemas/ConsultaPropostaCommand'
          application/*+json:
            schema:
              $ref: '#/components/schemas/ConsultaPropostaCommand'
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ConsultaPropostaResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ConsultaPropostaResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ConsultaPropostaResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ResponseBase'
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseBase'
            text/json:
              schema:
                $ref: '#/components/schemas/ResponseBase'
components:
  schemas:
    ConsultaPropostaCommand:
      type: object
      properties:
        dto:
          $ref: '#/components/schemas/FindPropostaDTO'
      additionalProperties: false
    ConsultaPropostaResponse:
      type: object
      properties:
        msg:
          type: string
          nullable: true
        result:
          type: boolean
          writeOnly: true
        hasError:
          type: boolean
        messages:
          type: array
          items:
            $ref: '#/components/schemas/Message'
          nullable: true
        codigo:
          type: string
          format: uuid
        dtInclusao:
          type: string
          nullable: true
        situacao:
          type: integer
          format: int32
        vlrFinanciado:
          type: number
          format: double
          nullable: true
        qtdeParcelas:
          type: integer
          format: int32
          nullable: true
        vlrParcela:
          type: number
          format: double
          nullable: true
        vlrTAC:
          type: number
          format: double
          nullable: true
        vlrBoleto:
          type: number
          format: double
          nullable: true
        vlrSeguro:
          type: number
          format: double
          nullable: true
        vlrIOF:
          type: number
          format: double
          nullable: true
        vlrOutrasDespesas:
          type: number
          format: double
          nullable: true
        vlrOutrosServicos:
          type: number
          format: double
          nullable: true
        vlrTotalCredito:
          type: number
          format: double
          nullable: true
        vlrTotalDivida:
          type: number
          format: double
          nullable: true
        vlrDesembolso:
          type: number
          format: double
          nullable: true
        percCETMensal:
          type: number
          format: double
          nullable: true
        percCETAnual:
          type: number
          format: double
          nullable: true
        percJurosMensal:
          type: number
          format: double
          nullable: true
        percJurosAnual:
          type: number
          format: double
          nullable: true
        codigoOperacao:
          type: string
          nullable: true
        tipoContrato:
          type: string
          nullable: true
        dtPagamento:
          type: string
          format: date-time
          nullable: true
        codigoProposta:
          type: string
          nullable: true
        numeroCCB:
          type: string
          nullable: true
        motivoRejeicao:
          type: string
          nullable: true
        textoRetornoPagamento:
          type: string
          nullable: true
        autenticacaoBancaria:
          type: string
          nullable: true
        controleBancario:
          type: string
          nullable: true
        textoMotivoAnalise:
          type: string
          nullable: true
        propostaLancamentos:
          type: array
          items:
            $ref: '#/components/schemas/PropostaLancamentoResult'
          nullable: true
        propostaContaPagamento:
          $ref: '#/components/schemas/PropostaContaPagamentoDTO'
      additionalProperties: false
    ResponseBase:
      type: object
      properties:
        msg:
          type: string
          nullable: true
        result:
          type: boolean
          writeOnly: true
        hasError:
          type: boolean
        messages:
          type: array
          items:
            $ref: '#/components/schemas/Message'
          nullable: true
      additionalProperties: false
    FindPropostaDTO:
      type: object
      properties:
        codigoProposta:
          type: string
          description: Código identificador da proposta
          format: uuid
          nullable: true
        codigoOperacao:
          type: string
          description: Código da operação do parceiro
          nullable: true
        numeroProposta:
          type: integer
          description: Número sequencial da proposta
          format: int64
          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
    PropostaLancamentoResult:
      type: object
      properties:
        campoID:
          type: string
          nullable: true
        descricaoCampo:
          type: string
          nullable: true
        vlrTransacao:
          type: number
          format: double
          nullable: true
        dtPrevPagto:
          type: string
          format: date-time
          nullable: true
        dtPagamento:
          type: string
          format: date-time
          nullable: true
        situacao:
          type: integer
          format: int32
          nullable: true
        linhaDigitavel:
          type: string
          nullable: true
        dtVenctoBoleto:
          type: string
          format: date-time
          nullable: true
        vlrBoleto:
          type: number
          format: double
          nullable: true
        codigoBanco:
          type: integer
          format: int32
          nullable: true
        numeroBanco:
          type: string
          nullable: true
        tipoConta:
          type: integer
          format: int32
          nullable: true
        agencia:
          type: string
          nullable: true
        agenciaDig:
          type: string
          nullable: true
        conta:
          type: string
          nullable: true
        contaDig:
          type: string
          nullable: true
        documentoFederal:
          type: string
          nullable: true
        nomePagamento:
          type: string
          nullable: true
        textoRetornoPagamento:
          type: string
          nullable: true
        autenticacaoBancaria:
          type: string
          nullable: true
        controleBancario:
          type: string
          nullable: true
        descricaoOcorrencia:
          type: string
          nullable: true
      additionalProperties: false
    PropostaContaPagamentoDTO:
      required:
        - agencia
        - conta
        - tipoConta
      type: object
      properties:
        codigoBanco:
          type: integer
          description: Código do banco
          format: int32
          nullable: true
        tipoConta:
          type: integer
          description: Tipo de conta
          format: int32
          nullable: true
        agencia:
          maxLength: 4
          minLength: 0
          type: string
          description: Número da Agência
          nullable: true
        agenciaDig:
          maxLength: 1
          minLength: 0
          type: string
          description: Dígito da agência
          nullable: true
        conta:
          maxLength: 20
          minLength: 0
          type: string
          description: Número da conta
          nullable: true
        contaDig:
          maxLength: 1
          minLength: 0
          type: string
          description: Dígito da conta
          nullable: true
        numeroBanco:
          type: string
          description: Número do banco
          nullable: true
        documentoFederalPagamento:
          maxLength: 20
          minLength: 0
          type: string
          description: >-
            Numero do Cadastro de Pessoa Física (CPF) ou  do Cadastro Nacional
            de Pessoa Física (CNPJ) indicado para pagamento (quando difere do
            Titular)
          nullable: true
        nomePagamento:
          maxLength: 60
          minLength: 0
          type: string
          description: Nome do titular do pagamento.
          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

````