{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/buildworkpro-com/json-schema/buildworkpro-com-invoice-schema.json",
  "title": "Invoice",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/buildworkpro-com-invoices-api-openapi.yml#/components/schemas/Invoice",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer"
    },
    "tenantId": {
      "type": "integer"
    },
    "invoiceNumber": {
      "type": "string"
    },
    "projectId": {
      "type": [
        "integer",
        "null"
      ]
    },
    "contactId": {
      "type": [
        "integer",
        "null"
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "draft",
        "sent",
        "partial",
        "paid",
        "voided"
      ]
    },
    "issueDate": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "dueDate": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "subtotal": {
      "type": "string"
    },
    "taxAmount": {
      "type": "string"
    },
    "total": {
      "type": "string"
    },
    "amountPaid": {
      "type": "string"
    },
    "balanceDue": {
      "type": "string"
    },
    "notesToCustomer": {
      "type": [
        "string",
        "null"
      ]
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time"
    }
  },
  "required": [
    "id",
    "tenantId",
    "invoiceNumber",
    "projectId",
    "contactId",
    "status",
    "issueDate",
    "dueDate",
    "subtotal",
    "taxAmount",
    "total",
    "amountPaid",
    "balanceDue",
    "notesToCustomer",
    "createdAt",
    "updatedAt"
  ]
}