{
  "type": "object",
  "properties": {
    "supplier": {
      "type": "string"
    },
    "invoiceNumber": {
      "type": "string"
    },
    "invoiceDate": {
      "type": "string",
      "description": "Invoice date exactly in YYYY-MM-DD format"
    },
    "currency": {
      "type": "string",
      "description": "Three-letter currency code printed on the invoice"
    },
    "subtotalCents": {
      "type": "integer",
      "minimum": 0,
      "description": "The named monetary amount in integer cents, not dollars"
    },
    "taxCents": {
      "type": "integer",
      "minimum": 0,
      "description": "The named monetary amount in integer cents, not dollars"
    },
    "totalCents": {
      "type": "integer",
      "minimum": 0,
      "description": "The named monetary amount in integer cents, not dollars"
    },
    "lineItems": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "quantity": {
            "type": "integer",
            "minimum": 1
          },
          "lineTotalCents": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "description",
          "quantity",
          "lineTotalCents"
        ]
      }
    }
  },
  "required": [
    "supplier",
    "invoiceNumber",
    "invoiceDate",
    "currency",
    "subtotalCents",
    "taxCents",
    "totalCents",
    "lineItems"
  ]
}
