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

# 5 - Gerar Múltiplas Cobranças de Parcela

Este endpoint possibilita a emissão simultânea de múltiplas cobranças, sendo ideal para contratos que possuem várias parcelas ou quando há necessidade de gerar diversas cobranças ao mesmo tempo.

Ele automatiza o processo de emissão de cobrança para múltiplas parcelas, tornando o processo mais ágil e reduzindo o tempo gasto com operações manuais.

Assim como o endpoint `AgendaRecebivelGerarUnicaCobranca`, este também suporta os seguintes tipos de cobrança:

* Boleto;
* Boleto Híbrido (com PIX);
* PIX Cobrança.

Este recurso é útil especialmente para parceiros que precisam gerar faturas em massa de forma simples e eficiente, com as mesmas opções de pagamento.

<Warning>O campo `codigoLiquidacao`, gerado na resposta deste endpoint, precisa ser salvo. Esse valor é necessário para solicitar o cancelamento das cobranças emitidas para as parcelas, no endpoint [6 - Cancelar Cobranças de Parcela](https://bmpmoneyplus-sandbox.mintlify.app/gestao-contratos/api-reference/post-agendarecebivelcancelarcobrancas).</Warning>


## OpenAPI

````yaml post /AgendaRecebivel/GerarMultiplasCobrancas
openapi: 3.0.1
info:
  title: BMPDigitalCore.ApiExterna.AgendaRecebivel.API
  version: '1.0'
servers:
  - url: https://api.bmpdigital.moneyp.dev.br/
    description: Localhost
security:
  - Bearer: []
paths:
  /AgendaRecebivel/GerarMultiplasCobrancas:
    post:
      tags:
        - AgendaRecebivel
      parameters:
        - name: IdempotencyKey
          in: header
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/AgendaRecebivelGerarMultiplasCobrancasCommand
          text/json:
            schema:
              $ref: >-
                #/components/schemas/AgendaRecebivelGerarMultiplasCobrancasCommand
          application/*+json:
            schema:
              $ref: >-
                #/components/schemas/AgendaRecebivelGerarMultiplasCobrancasCommand
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/AgendaRecebivelInclusaoCobrancaResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/AgendaRecebivelInclusaoCobrancaResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/AgendaRecebivelInclusaoCobrancaResponse'
        '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:
    AgendaRecebivelGerarMultiplasCobrancasCommand:
      type: object
      properties:
        dto:
          $ref: '#/components/schemas/FindAgendaRecebivelDTO'
        dtoGerarMultiplasLiquidacoes:
          $ref: '#/components/schemas/AgendaRecebivelGerarMultiplasLiquidacoesDTO'
      additionalProperties: false
    AgendaRecebivelInclusaoCobrancaResponse:
      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
        cobrancas:
          type: array
          items:
            $ref: '#/components/schemas/CobrancaGeradaDTO'
          nullable: true
      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
    FindAgendaRecebivelDTO:
      type: object
      properties:
        codigoProposta:
          type: string
          description: Código identificador da proposta na BMP.
          format: uuid
          nullable: true
        codigoOperacao:
          maxLength: 50
          minLength: 0
          type: string
          description: Código identificador da proposta (valor exclusivo do integrador).
          nullable: true
      additionalProperties: false
    AgendaRecebivelGerarMultiplasLiquidacoesDTO:
      required:
        - descricaoLiquidacao
      type: object
      properties:
        descricaoLiquidacao:
          maxLength: 200
          minLength: 1
          type: string
          description: Define uma descrição para a cobrança gerada.
          nullable: true
        notificarCliente:
          type: boolean
          description: >-
            Indica se o cliente deve ser notificado sobre as cobranças gerados
            (disponível apenas para boletos).
        tipoRegistro:
          type: integer
          description: 'Define a modalidade de registro automático: 1 - Online; 2 - Offline.'
          format: int32
          nullable: true
        pagamentoViaBoleto:
          type: boolean
          description: Define se a cobrança gerada será um boleto.
          nullable: true
        pagamentoViaPIX:
          type: boolean
          description: Define se a cobrança gerada será um Pix Cobrança.
          nullable: true
        parcelas:
          type: array
          items:
            $ref: >-
              #/components/schemas/AgendaRecebivelGerarMultiplasLiquidacoesParcela
          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
    CobrancaGeradaDTO:
      type: object
      properties:
        codigoLiquidacao:
          type: string
          format: uuid
        parcelas:
          type: array
          items:
            type: integer
            format: int32
          nullable: true
      additionalProperties: false
    AgendaRecebivelGerarMultiplasLiquidacoesParcela:
      required:
        - dtVencimento
        - nroParcela
      type: object
      properties:
        nroParcela:
          type: integer
          description: Número da parcela.
          format: int32
        dtVencimento:
          type: string
          description: Data de vencimento da cobrança.
          format: date-time
          nullable: true
        dtExpiracao:
          type: string
          description: Define a data limite de pagamento da cobrança.
          format: date-time
          nullable: true
        vlrDesconto:
          type: number
          description: Define um valor de desconto para a cobrança.
          format: double
          nullable: true
        permiteDescapitalizacao:
          type: boolean
          description: >-
            Define se o valor da parcela deve ser descapitalizado para a data 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

````