> ## 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.

# 2 - Search Multiperiod Simulation

Through this endpoint, the partner searches for and simulates data regarding the FGTS amounts available to the worker.

After the amounts are returned, the employee can take out loans with the guarantee of the Anniversary Withdrawal, which will later be included in a proposal.

This action precedes the inclusion and implementation of the proposal in the system.

Rules:

* If the “Balance” field is entered, we do not use the customer's real balance at Caixa Econômica Federal and the calculation will be based on the values ​​from our calculator.
* If the birthday month is incorrect, the system returns an error at the time of the simulation.
* If the CPF field is filled in, the query is performed at Caixa Econômica Federal

<Warning>
  When the value of the `ConsultaCache` field is `false`, the request will query the updated FGTS balance directly at **Caixa Econômica Federal (CEF)**; when it is `true`, the balance will be obtained from the BMP cache. This field is not mandatory. If it is not provided, the system assumes the value `true` as default.
</Warning>


## OpenAPI

````yaml post /FGTS/BuscarSimulacaoMultiPeriodo
openapi: 3.0.1
info:
  title: BMPDigitalCore.ApiExterna.FGTS.API
  version: '1.0'
servers:
  - url: https://api.bmpdigital.moneyp.dev.br/
    description: Localhost
security:
  - Bearer: []
paths:
  /FGTS/BuscarSimulacaoMultiPeriodo:
    post:
      tags:
        - FGTS
      parameters:
        - name: IdempotencyKey
          in: header
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FGTSSaqAnivSimulacaoMultiPeriodoCommand'
          text/json:
            schema:
              $ref: '#/components/schemas/FGTSSaqAnivSimulacaoMultiPeriodoCommand'
          application/*+json:
            schema:
              $ref: '#/components/schemas/FGTSSaqAnivSimulacaoMultiPeriodoCommand'
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/FGTSSaqAnivSimulacaoMultiPeriodoResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/FGTSSaqAnivSimulacaoMultiPeriodoResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/FGTSSaqAnivSimulacaoMultiPeriodoResponse'
        '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:
    FGTSSaqAnivSimulacaoMultiPeriodoCommand:
      type: object
      properties:
        dto:
          $ref: '#/components/schemas/FGTSSaqAnivSimulacaoMultiPeriodoDTO'
      additionalProperties: false
    FGTSSaqAnivSimulacaoMultiPeriodoResponse:
      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
        VlrDispSaque:
          type: number
          format: double
        PeriodoMin:
          type: integer
          format: int32
        PeriodoMax:
          type: integer
          format: int32
        Simulacoes:
          type: array
          items:
            $ref: '#/components/schemas/FGTSSaqAnivSimulacaoMultiPeriodo'
          nullable: true
        SimulacoesErro:
          type: array
          items:
            $ref: '#/components/schemas/SimulacaoErro'
          nullable: true
        Consulta:
          $ref: '#/components/schemas/FGTSConsultaSaldoResponse'
      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
    FGTSSaqAnivSimulacaoMultiPeriodoDTO:
      type: object
      properties:
        Saldo:
          type: number
          description: Saldo na CEF do solicitante
          format: double
          nullable: true
        VlrEmprestimo:
          type: number
          description: Valor solicitado de emprestimo
          format: double
          nullable: true
        TaxaMensal:
          type: number
          description: Taxa mensal a ser utilizada, quando não informada utiliza a padrão
          format: double
          nullable: true
        VlrTAC:
          type: number
          description: Valor TAC
          format: double
          nullable: true
        PercTAC:
          type: number
          description: Percentual TAC
          format: double
          nullable: true
        DtAniversario:
          type: string
          description: Data de aniversário do solicitante
          format: date-time
          nullable: true
        CpfTrabalhador:
          type: string
          description: Número do documento de CPF do solicitante
          nullable: true
        ConsultaCache:
          type: boolean
          description: Utiliza o cache caso esteja ativo na credencial do parceiro
        Periodos:
          type: array
          items:
            $ref: '#/components/schemas/FGTSSaqAnivSimulacaoPeriodosDTO'
          description: Lista de Períodos de repasses
          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
    FGTSSaqAnivSimulacaoMultiPeriodo:
      type: object
      properties:
        Saldo:
          type: number
          format: double
        Periodo:
          type: integer
          format: int32
        DtInicio:
          type: string
          format: date-time
        DtFim:
          type: string
          format: date-time
        TaxaMensal:
          type: number
          format: double
        TaxaCETMensal:
          type: number
          format: double
        TaxaCETAnual:
          type: number
          format: double
        TaxaJurosAnual:
          type: number
          format: double
        VlrEmprestimoCliente:
          type: number
          format: double
        VlrJuros:
          type: number
          format: double
        VlrIOF:
          type: number
          format: double
        VlrIOFAdicional:
          type: number
          format: double
        VlrLiberado:
          type: number
          format: double
        VlrOperacao:
          type: number
          format: double
        VlrTAC:
          type: number
          format: double
        VlrReserva:
          type: number
          format: double
        VlrAmortizacao:
          type: number
          format: double
        VlrTransferencia:
          type: number
          format: double
        VlrOutrasDespesas:
          type: number
          format: double
        TaxaCCB:
          type: number
          format: double
        SimulacaoParcelas:
          type: array
          items:
            $ref: '#/components/schemas/FGTSSaqAnivSimulacaoParcela'
          nullable: true
      additionalProperties: false
    SimulacaoErro:
      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
        Periodo:
          type: integer
          format: int32
      additionalProperties: false
    FGTSConsultaSaldoResponse:
      type: object
      properties:
        cpfTrabalhador:
          type: string
          nullable: true
        dataSaldo:
          type: string
          nullable: true
        existeSaldoDesconsiderado:
          type: boolean
        qtdPedidos:
          type: integer
          format: int32
        periodos:
          type: array
          items:
            $ref: '#/components/schemas/FGTSPeriodo'
          nullable: true
        Cache:
          type: boolean
      additionalProperties: false
    FGTSSaqAnivSimulacaoPeriodosDTO:
      type: object
      properties:
        DataRepasse:
          type: string
          description: Data do repasse
          format: date-time
          nullable: true
        VlrRepasse:
          type: number
          description: Valor do repasse
          format: double
          nullable: true
      additionalProperties: false
    ErrorType:
      enum:
        - 1
        - 2
        - 3
      type: integer
      format: int32
    FGTSSaqAnivSimulacaoParcela:
      type: object
      properties:
        VlrRepasse:
          type: number
          format: double
        DtRepasse:
          type: string
          format: date-time
        VlrPrincipal:
          type: number
          format: double
        VlrIOF:
          type: number
          format: double
        VlrIOFAdicional:
          type: number
          format: double
        VlrLiberado:
          type: number
          format: double
        VlrJuros:
          type: number
          format: double
      additionalProperties: false
    FGTSPeriodo:
      type: object
      properties:
        dataRepasse:
          type: string
          nullable: true
        valor:
          type: number
          format: double
      additionalProperties: false
  securitySchemes:
    Bearer:
      type: apiKey
      description: Informe o token
      name: Authorization
      in: header

````