{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/lexiel-ai/json-schema/lexiel-ai-invoice-schema.json",
  "title": "Invoice",
  "x-generated": "2026-11-15",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/lexiel-ai-openapi.yml#/components/schemas/Invoice",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "number": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "draft",
        "sent",
        "paid",
        "overdue",
        "cancelled",
        "rectified",
        "refunded"
      ]
    },
    "clientId": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "subtotal": {
      "type": "number"
    },
    "tax": {
      "type": "number"
    },
    "total": {
      "type": "number"
    },
    "currency": {
      "type": "string",
      "default": "EUR"
    },
    "issueDate": {
      "type": "string",
      "format": "date"
    },
    "dueDate": {
      "type": [
        "string",
        "null"
      ],
      "format": "date"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    }
  }
}