{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/beel-es/json-schema/beel-es-create-invoice-batch-request-schema.json",
  "title": "CreateInvoiceBatchRequest",
  "description": "Applies one operation to a set of invoices of this company. Only the operations that share\na result shape live here; downloading PDFs, sending email and exporting have their own\nsibling sub-resources because each returns something different.\n",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/beel-es-companyinvoicedelivery-api-openapi.yml#/components/schemas/CreateInvoiceBatchRequest",
  "type": "object",
  "required": [
    "operation",
    "invoice_ids"
  ],
  "properties": {
    "operation": {
      "type": "string",
      "enum": [
        "ISSUE",
        "STATUS"
      ],
      "description": "- **ISSUE**: issue the draft invoices, each one assigned its definitive number.\n- **STATUS**: change the status of the invoices; requires `new_status`.\n"
    },
    "invoice_ids": {
      "type": "array",
      "minItems": 1,
      "maxItems": 50,
      "items": {
        "$ref": "#/$defs/UUID"
      }
    },
    "new_status": {
      "type": "string",
      "enum": [
        "SENT",
        "PAID"
      ],
      "description": "Target status. Required when `operation` is `STATUS`."
    },
    "payment_date": {
      "type": "string",
      "format": "date",
      "description": "Payment date. Required when `new_status` is `PAID`."
    }
  },
  "$defs": {
    "UUID": {
      "type": "string",
      "format": "uuid",
      "description": "Universally Unique Identifier (UUID v4)"
    }
  }
}