{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/lexiel-ai/json-schema/lexiel-ai-invoice-create-schema.json",
  "title": "InvoiceCreate",
  "x-generated": "2026-11-15",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/lexiel-ai-openapi.yml#/components/schemas/InvoiceCreate",
  "type": "object",
  "required": [
    "clientId",
    "items"
  ],
  "properties": {
    "clientId": {
      "type": "string",
      "format": "uuid"
    },
    "issueDate": {
      "type": "string",
      "format": "date"
    },
    "dueDate": {
      "type": "string",
      "format": "date"
    },
    "notes": {
      "type": "string"
    },
    "items": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "required": [
          "description",
          "quantity",
          "unitPrice"
        ],
        "properties": {
          "description": {
            "type": "string"
          },
          "quantity": {
            "type": "number",
            "minimum": 0.01
          },
          "unitPrice": {
            "type": "number",
            "minimum": 0
          },
          "taxRate": {
            "type": "number",
            "default": 21
          }
        }
      }
    }
  }
}