Factuarea APIDevelopers
Contract

Annual document limit across API and MCP

The annual document limit, the affected API operations (14 in total), MCP errors and automatic issuance.

30 September 2026

Production currently measures document usage without blocking interactive creation. The rejection responses and recovery steps below apply when document-limit enforcement is enabled.

What changes

Interactive creation of sales documents counts toward the company’s annual document limit across the app, v1 API, MCP, assistant, imports, duplication and conversion. When enforcement is enabled and the limit is exhausted, v1 returns HTTP 402 with error.type: payment_required_error and error.code: plan_limit_exceeded. MCP returns JSON-RPC -32004 with message: plan_limit_exceeded and data.http_status: 402; it does not use the REST error body.

Sales invoices, corrective and substitute invoices, quotes, delivery notes and pro-forma invoices count when created. A conversion counts its new invoice as well as the source document that already counted. Issuing, sending or cancelling an existing document does not add or return a unit. Deleting an eligible draft returns one unit to the current annual window. Supplier invoices do not count.

The affected API operations (14 in total) and their MCP tools

These existing operations can reject interactive creation at the limit. Their URLs, request fields and tool names remain the same.

v1 operationMCP tool
POST /v1/invoicescreate_invoice
POST /v1/invoices/{invoice}/duplicateduplicate_invoice
POST /v1/invoices/{invoice}/correctivecreate_corrective_invoice
POST /v1/invoices/substitute-simplifiedsubstitute_simplified_invoice
POST /v1/quotescreate_quote
POST /v1/quotes/{quote}/duplicateduplicate_quote
POST /v1/quotes/{quote}/convertconvert_quote
POST /v1/delivery_notescreate_delivery_note
POST /v1/delivery_notes/{delivery_note}/duplicateduplicate_delivery_note
POST /v1/delivery_notes/{delivery_note}/convertconvert_delivery_note
POST /v1/proformascreate_proforma
POST /v1/proformas/{proforma}/duplicateduplicate_proforma
POST /v1/proformas/{proforma}/convertconvert_proforma
POST /v1/recurring_invoices/{recurring_invoice}/generate—

The manual recurring-invoice generation operation currently has no MCP tool counterpart.

POST /v1/invoices/bulk-create and bulk_create_invoices report quota rejections per row through failures[]. The REST batch keeps its 200/207 response; it is not part of that group of 14 with a top-level 402.

Read the error details

The v1 error exposes error.details. Handle the stable error.code; the human-facing error.message is in Spanish and may change. This example comes from the invoice response contract:

{
  "error": {
    "type": "payment_required_error",
    "code": "plan_limit_exceeded",
    "message": "Has alcanzado el límite anual de documentos de tu plan (7/7). El periodo termina el 2027-03-14; amplía el plan para seguir creando documentos ahora.",
    "param": null,
    "details": {
      "resource": "documents_year",
      "current": 7,
      "limit": 7,
      "period_end": "2027-03-14T23:59:59+01:00"
    },
    "doc_url": "https://docs.factuarea.com/guides/errors#plan_limit_exceeded",
    "request_id": "req_01HKQS5NDOCUMENTQUOTA01"
  }
}
FieldMeaning
resourceThe exhausted resource: documents_year.
currentDocuments already counted in the current window; the rejected creation does not consume a unit.
limitThe fixed annual document limit applied to the company.
period_endThe actual end of the annual window, as a full ISO 8601 timestamp with its offset. Wait until this instant has passed, rather than assuming a calendar-year reset.

For MCP, these same four fields are in error.data, together with http_status, code and the Spanish hint:

{
  "jsonrpc": "2.0",
  "id": "req-42",
  "error": {
    "code": -32004,
    "message": "plan_limit_exceeded",
    "data": {
      "http_status": 402,
      "code": "plan_limit_exceeded",
      "resource": "documents_year",
      "current": 7,
      "limit": 7,
      "period_end": "2027-03-14T23:59:59+01:00",
      "hint": "Has alcanzado el límite anual de documentos de tu plan (7/7). El periodo termina el 2027-03-14; amplía el plan para seguir creando documentos ahora."
    }
  }
}

Automatic issuance continues and counts

Scheduled recurring invoices, invoices from payment, store-order and subscription-cycle integrations, integration refund corrections and subscription self-invoices continue to be issued when the document limit is exhausted. They count and can take usage above the limit. Manually requesting “generate now” for a recurring invoice is interactive and can be rejected. A manual quota rejection does not record a recurring-generation failure.

Enterprise document usage is governed by your contract; this change does not introduce an automatic document cap for that plan. Usage continues to be counted.

Anticipate the limit

Review your plan with GET /v1/account/billing and monitor the app’s document usage. The account holder receives notices when usage crosses 80 %, reaches 100 % and first exceeds the limit through automatic issuance, once per annual window and threshold. Act on the warnings before interactive creation stops.

After plan_limit_exceeded, upgrade your plan to create documents now or wait until the actual period_end has passed. Repeated immediate retries will not free document quota. Keep honouring Retry-After for the separate rate-limit errors.

Updated endpoints14

EndpointDescription
POST/v1/invoicesCreate an invoice
POST/v1/invoices/{invoice}/duplicateDuplicate an invoice
POST/v1/invoices/{invoice}/correctiveGenerate corrective invoice
POST/v1/invoices/substitute-simplifiedSubstitute simplified invoices with full invoice
POST/v1/quotesCreate a quote
POST/v1/quotes/{quote}/duplicateDuplicate a quote
POST/v1/quotes/{quote}/convertConvert quote to invoice
POST/v1/delivery_notesCreate a delivery note
POST/v1/delivery_notes/{delivery_note}/duplicateDuplicate a delivery note
POST/v1/delivery_notes/{delivery_note}/convertConvert delivery note to invoice
POST/v1/proformasCreate a proforma
POST/v1/proformas/{proforma}/duplicateDuplicate a proforma
POST/v1/proformas/{proforma}/convertConvert proforma to invoice
POST/v1/recurring_invoices/{recurring_invoice}/generateGenerate an invoice from a recurring template

On this page

Need a hand?Contact support