{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/drillerdb-com/json-schema/drillerdb-com-invoice-list-response-schema.json",
  "title": "InvoiceListResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/drillerdb-com-invoices-api-openapi.yml#/components/schemas/InvoiceListResponse",
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Invoice"
      }
    },
    "meta": {
      "$ref": "#/$defs/ListMeta"
    },
    "links": {
      "$ref": "#/$defs/ListLinks"
    }
  },
  "required": [
    "data",
    "meta",
    "links"
  ],
  "$defs": {
    "Invoice": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "invoice_number": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "payment_status": {
          "type": "string"
        },
        "invoice_date": {
          "type": [
            "string",
            "null"
          ]
        },
        "due_date": {
          "type": [
            "string",
            "null"
          ],
          "format": "date"
        },
        "due_terms_raw": {
          "type": [
            "string",
            "null"
          ]
        },
        "invoice_total_cents": {
          "type": [
            "integer",
            "null"
          ]
        },
        "balance": {
          "type": [
            "number",
            "null"
          ]
        },
        "paid_amount": {
          "type": [
            "number",
            "null"
          ]
        },
        "created_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "paid_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "last_sent_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "project_id": {
          "type": [
            "integer",
            "null"
          ]
        }
      },
      "required": [
        "id",
        "invoice_number",
        "status",
        "payment_status"
      ]
    },
    "ListLinks": {
      "type": "object",
      "properties": {
        "self": {
          "type": "string"
        },
        "next": {
          "type": "string"
        }
      },
      "required": [
        "self"
      ]
    },
    "ListMeta": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        },
        "limit": {
          "type": "integer"
        },
        "has_more": {
          "type": "boolean"
        },
        "next_cursor": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "request_id",
        "limit",
        "has_more",
        "next_cursor"
      ]
    }
  }
}