{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/xestando-com/json-schema/xestando-com-expense-v1-schema.json",
  "title": "ExpenseV1",
  "x-generated": "2026-11-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/xestando-com-openapi.json#/components/schemas/ExpenseV1",
  "type": "object",
  "properties": {
    "attachment": {
      "type": "string"
    },
    "baseAmount": {
      "type": "number",
      "format": "double"
    },
    "category": {
      "type": "string"
    },
    "date": {
      "type": "string",
      "format": "date"
    },
    "documentClass": {
      "type": "string"
    },
    "documentNumber": {
      "type": "string"
    },
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "lines": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/LineV1"
      }
    },
    "supplier": {
      "$ref": "#/$defs/PartyV1"
    },
    "taxAmount": {
      "type": "number",
      "format": "double"
    },
    "taxWithheld": {
      "type": "number",
      "format": "double"
    },
    "total": {
      "type": "number",
      "format": "double"
    }
  },
  "$defs": {
    "LineV1": {
      "type": "object",
      "properties": {
        "baseAmount": {
          "type": "number",
          "format": "double"
        },
        "description": {
          "type": "string"
        },
        "quantity": {
          "type": "number",
          "format": "double"
        },
        "taxAmount": {
          "type": "number",
          "format": "double"
        },
        "taxRate": {
          "type": "number",
          "format": "double"
        },
        "total": {
          "type": "number",
          "format": "double"
        },
        "unitPrice": {
          "type": "number",
          "format": "double"
        }
      }
    },
    "PartyV1": {
      "type": "object",
      "properties": {
        "address": {
          "type": "string"
        },
        "countryCode": {
          "type": "string"
        },
        "email": {
          "type": "string"
        },
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "name": {
          "type": "string"
        },
        "phone": {
          "type": "string"
        },
        "postCode": {
          "type": "string"
        },
        "province": {
          "type": "string"
        },
        "role": {
          "type": "string"
        },
        "taxId": {
          "type": "string"
        },
        "town": {
          "type": "string"
        },
        "tradeName": {
          "type": "string"
        }
      }
    }
  }
}