← HomeFleetPay / API

Release an installment

Parameters, data structure and responses from the versioned contract.

POST/carriers/parcelas-repasse/liberar
liberarParcelaRepasseSandbox Base: https://api.fleetpay.site/v1

Technical descriptions are translated from the versioned contract. Original identifiers and JSON are preserved; data examples are omitted.

Declares that the installment's triggering event occurred in your system.

Under a MANUAL rule, releasing the installment only makes it eligible. It still has no due date or payment and waits for a payment order. This is intentional: in manual mode, you decide when funds should leave, and the due date is the moment of that decision, not a date derived from the event.

Under an AUTOMATIC rule, internal events already release installments automatically. This request can unblock a stuck installment: it records the due date (event date + the rule's term), and payment proceeds without another step.

ocorrido_em may be backdated — the event may have occurred before someone recorded it. Future dates are rejected: they would create a due date based on an event that has not occurred.

Releasing again is a no-op, not an error: a retry does not create a duplicate installment.

Authentication

[
  {
    "oauth2": []
  },
  {
    "chaveApi": []
  }
]
Availability depends on the environment, enabled scopes and provider. This reference does not execute requests or collect credentials.

Parameters

No parameters declared for this operation.

Request Body

Required

application/json

documentostringRequired

The same identifiers accepted by GET: FleetPay internal ID, document number (internal_id), or the 44-digit CT-e key; for counter-CT-e documents, also counter_cte_id, the leg's documento_financeiro (ROUTE:...), or the authorized counter-CT-e key.

maxLength64
posicaointegerRequired

1 scanning · 2 completion in the app · 3 submission of accounts.

minimum1
maximum3
ocorrido_emstring · dateRequired

When the event occurred. Past dates are allowed; future dates are rejected with data_no_futuro.

Responses

200 HTTP Response

Installment released (or already released; the call is idempotent)

application/json

401 HTTP Response

Unauthenticated (autenticacao): missing, invalid or expired credentials, including an API key used in the wrong environment. A sandbox key is not valid in production, nor a production key in the sandbox; the error message indicates the expected environment.

application/json

errorobjectOptional
403 HTTP Response

Credential does not have the operacao scope enabled.

application/json

errorobjectOptional
404 HTTP Response

Document not found or belongs to another carrier.

application/json

errorobjectOptional
422 HTTP Response

Release was rejected. The code is stable; use it to branch your logic:

codeWhat to do
sem_regra_parceladaThe document is not governed by an installment rule — there is nothing to release.
parcela_inexistenteThe rule has no installment at this position.
evento_fora_de_ordemRelease the previous installment first.
data_anterior_ao_evento_anteriorThe supplied date precedes the previous installment's event.
data_no_futuroUse a date no later than today.
parcela_canceladaThe CT-e was canceled at SEFAZ; this installment will not pay anything.
servico_ainda_nao_concluidoThe completion installment must come before the expense reconciliation installment.
regra_sem_prestacao_de_contasPosition 3 in a rule without an expense reconciliation installment.
data_anterior_a_conclusaoPosition 3 with a date before service completion.
falha_ao_liberarInternal failure when saving the release; repeat the request.

application/json

errorobjectOptional
429 HTTP Response

Request limit exceeded (limite_requisicoes). Wait for the interval specified in the Retry-After header before retrying. This may be a limit forwarded from the provider or FleetPay's own anti-abuse limit, counted per authenticated company and route group, with a short window for bursts and a long window for slower automated traffic. Limits are intentionally generous: genuine integrations, including large batches processed at once, should remain well below them. If yours reaches a limit, contact FleetPay.

application/json

errorobjectOptional
500 HTTP Response

Internal error (erro_interno)

application/json

errorobjectOptional
Complete Operation Definition
{
  "tags": [
    "Parcelas"
  ],
  "summary": "Liberar uma parcela",
  "operationId": "liberarParcelaRepasse",
  "description": "Declara que o evento âncora da parcela aconteceu no seu sistema.\n\n**Em regra MANUAL**, liberar deixa a parcela **apta** — e nada mais. Ela fica sem\nvencimento e sem pagamento, esperando a ordem de pagamento. Isso é deliberado: no modo\nmanual quem decide quando o dinheiro sai é você, e o vencimento é o momento dessa decisão,\nnão uma data derivada do evento.\n\n**Em regra AUTOMÁTICA**, os eventos internos já liberam sozinhos. Esta chamada serve como\ndestravamento de parcela presa, e aí ela grava o vencimento (evento + prazo da regra) e o\npagamento segue sem passo extra.\n\n`ocorrido_em` **pode ser retroativa** — o evento pode ter acontecido antes de alguém\nregistrar. Data futura é recusada: seria criar vencimento a partir de um evento que não\nocorreu.\n\nLiberar de novo é **no-op**, não erro: retry não vira parcela duplicada.\n",
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/LiberarParcelaRepasse"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Parcela liberada (ou já liberada — a chamada é idempotente)",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/RespostaParcelaRepasse"
          }
        }
      }
    },
    "401": {
      "$ref": "#/components/responses/Erro401"
    },
    "403": {
      "description": "Credencial sem o escopo `operacao` habilitado.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Erro"
          }
        }
      }
    },
    "404": {
      "description": "Documento não encontrado, ou de outra transportadora.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Erro"
          }
        }
      }
    },
    "422": {
      "description": "A liberação foi recusada. O `code` é estável e é por ele que você deve ramificar:\n\n| `code` | O que fazer |\n|---|---|\n| `sem_regra_parcelada` | O documento não está sob regra parcelada — não há o que liberar. |\n| `parcela_inexistente` | A regra não tem parcela nessa posição. |\n| `evento_fora_de_ordem` | Libere a parcela anterior primeiro. |\n| `data_anterior_ao_evento_anterior` | A data informada é anterior ao evento da parcela anterior. |\n| `data_no_futuro` | Use uma data até hoje. |\n| `parcela_cancelada` | O CT-e foi cancelado na SEFAZ; esta parcela não vai pagar nada. |\n| `servico_ainda_nao_concluido` | A parcela de conclusão precisa vir antes da prestação de contas. |\n| `regra_sem_prestacao_de_contas` | Posição 3 numa regra que não tem a parcela de prestação de contas. |\n| `data_anterior_a_conclusao` | Posição 3 com data anterior à conclusão do serviço. |\n| `falha_ao_liberar` | Falha interna ao gravar a liberação; repita a chamada. |\n",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Erro"
          }
        }
      }
    },
    "429": {
      "$ref": "#/components/responses/Erro429"
    },
    "500": {
      "$ref": "#/components/responses/Erro500"
    }
  },
  "method": "POST",
  "path": "/carriers/parcelas-repasse/liberar",
  "parameters": []
}