BeeL
Get StartedVeriFactuStripeAPI Reference
Invoices

Change status of multiple invoices

Changes the status of multiple invoices in a single operation.

Supported status changes:

  • SENT: Mark multiple invoices as sent (from ISSUED)
  • PAID: Mark multiple invoices as paid (from ISSUED, SENT, or OVERDUE)

Partial success: If some invoices cannot be updated, the operation continues with the others. The response includes details of failures.

Limits:

  • Maximum 50 invoices per request

Validations:

  • All invoices must belong to the authenticated user
  • Each invoice must be in a valid status for the requested transition
  • For PAID: payment_date is required

Try this endpoint with Claude
Copy the prompt for any assistant, or open it directly in Claude Code (needs it installed).
POST
/v1/invoices/bulk/status
AuthorizationBearer <token>

API Key authentication.

Format: Authorization: Bearer beel_sk_<key>

Scopes: API Keys use the same scopes as OAuth2 tokens. Each key is created with specific scopes that limit which endpoints it can access. The required scope for each endpoint is documented in the operation's security section under OAuth2.

Obtaining Keys: API Keys are managed from the BeeL dashboard

Security: API Keys are secret credentials. Do not share them or store them in source code

In: header

invoice_idsarray<UUID>

List of invoice IDs to update

Items1 <= items <= 50
new_statusstring

Target status for the invoices

Value in"SENT" | "PAID"
payment_date?string

Payment date (required when new_status is PAID)

Formatdate

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://app.beel.es/api/v1/invoices/bulk/status" \  -H "Content-Type: application/json" \  -d '{    "invoice_ids": [      "550e8400-e29b-41d4-a716-446655440001",      "550e8400-e29b-41d4-a716-446655440002"    ],    "new_status": "SENT"  }'
{
  "success": true,
  "data": {
    "total": 5,
    "successful": 4,
    "failed": 1,
    "failures": [
      {
        "invoice_id": "550e8400-e29b-41d4-a716-446655440000",
        "reason": "Cannot change from PAID to SENT"
      }
    ]
  },
  "meta": {
    "timestamp": "2025-01-15T10:30:00Z",
    "request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
  }
}
{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "The provided data is not valid",
    "details": {
      "field": "specific error message"
    }
  },
  "meta": {
    "timestamp": "2025-01-15T10:30:00Z",
    "request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
  },
  "type": "https://docs.beel.es/errors/INVOICE_NO_LINES",
  "title": "INVOICE_NO_LINES",
  "detail": "La factura debe tener al menos una línea",
  "instance": "/v1/invoices/abc-123"
}
{
  "success": false,
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Authentication required"
  },
  "meta": {
    "timestamp": "2025-01-15T10:30:00Z",
    "request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
  }
}
{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "The provided data is not valid",
    "details": {
      "field": "specific error message"
    }
  },
  "meta": {
    "timestamp": "2025-01-15T10:30:00Z",
    "request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
  },
  "type": "https://docs.beel.es/errors/INVOICE_NO_LINES",
  "title": "INVOICE_NO_LINES",
  "detail": "La factura debe tener al menos una línea",
  "instance": "/v1/invoices/abc-123"
}
{
  "success": false,
  "error": {
    "code": "INTERNAL_ERROR",
    "message": "Internal server error"
  },
  "meta": {
    "timestamp": "2025-01-15T10:30:00Z",
    "request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
  }
}

Convert a proforma into an invoice POST

Converts a proforma (a commercial quote accepted by the customer) into a real invoice. Only proformas in status `ISSUED` or `SENT` can be converted. The source proforma **survives intact** (keeping its `PRO-...` number and PDF as the record of what the customer accepted) and transitions to the terminal status `CONVERTED`. The result is a **new** `STANDARD` invoice in `DRAFT` status, linked back to the source proforma via `source_proforma_id`. Fine-tune the draft by editing it, then issue it through the normal issuance flow. **Status changes:** - Proforma: `ISSUED`/`SENT` → `CONVERTED` - New invoice: created as `STANDARD` / `DRAFT` (no definitive number yet) **Emit in the same act (`issue: true`):** the resulting invoice is emitted immediately — a definitive fiscal number is assigned and the quota, ledger and VeriFactu→PDF pipeline run through the normal issuance flow. The operation is **atomic**: if the emission fails (quota exhausted, unsigned NIF, misconfigured series…), the whole conversion is rolled back — no invoice is created, and the proforma stays `ISSUED`/`SENT` and convertible. When omitted or `false`, the invoice is left in `DRAFT` for you to fine-tune first. **Idempotency:** `CONVERTED` is terminal, so a second call returns a business error instead of creating another invoice. **Validations:** - The document must be a proforma (`CONVERSION_REQUIRES_PROFORMA` otherwise) - Must be in `ISSUED` or `SENT` status (`PROFORMA_NOT_CONVERTIBLE` otherwise) - Must not have been converted already (`PROFORMA_ALREADY_CONVERTED`)