{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/subcenter-io/json-schema/subcenter-io-invoice-schema.json",
  "title": "Invoice",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/subcenter-io-openapi.json#/components/schemas/Invoice",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "pending_review",
        "confirmed",
        "duplicate",
        "rejected"
      ]
    },
    "vendor": {
      "type": "string"
    },
    "invoice_number": {
      "type": [
        "string",
        "null"
      ]
    },
    "issued_on": {
      "type": [
        "string",
        "null"
      ],
      "format": "date"
    },
    "currency": {
      "type": [
        "string",
        "null"
      ]
    },
    "total_cents": {
      "type": [
        "integer",
        "null"
      ]
    },
    "total": {
      "type": [
        "string",
        "null"
      ]
    },
    "structured": {
      "type": "boolean",
      "description": "Read exactly from an e-invoice rather than by AI"
    },
    "credit_note": {
      "type": "boolean"
    },
    "avoidable_vat": {
      "type": "boolean",
      "description": "A vendor in another country charged VAT that a VAT-registered EU business usually shouldn't pay (it likely lacks the business's VAT number)"
    },
    "has_file": {
      "type": "boolean"
    },
    "tool": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        }
      }
    },
    "suggested_tool": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        }
      }
    }
  }
}