{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aiven/json-schema/aiven-project-invoice-list-response-schema.json",
  "title": "ProjectInvoiceListResponse",
  "description": "ProjectInvoiceListResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aiven-project-billing-api-openapi.yml#/components/schemas/ProjectInvoiceListResponse",
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "description": "List of errors occurred during request processing",
      "items": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "Printable error message"
          },
          "more_info": {
            "type": "string",
            "description": "URL to the documentation of the error"
          },
          "status": {
            "type": "integer",
            "description": "HTTP error status code"
          }
        },
        "required": [
          "message",
          "status"
        ]
      }
    },
    "invoices": {
      "type": "array",
      "description": "List of project invoices",
      "items": {
        "type": "object",
        "properties": {
          "billing_group_id": {
            "type": "string",
            "minLength": 36,
            "maxLength": 36,
            "description": "Billing group ID"
          },
          "billing_group_name": {
            "type": "string",
            "maxLength": 128,
            "description": "Billing group name"
          },
          "billing_group_state": {
            "type": "string",
            "description": "Billing group state",
            "enum": [
              "active",
              "deleted"
            ]
          },
          "currency": {
            "type": "string",
            "description": "Billing currency",
            "enum": [
              "AUD",
              "CAD",
              "CHF",
              "DKK",
              "EUR",
              "GBP",
              "JPY",
              "NOK",
              "NZD",
              "SEK",
              "SGD",
              "USD"
            ]
          },
          "download_cookie": {
            "type": "string",
            "description": "Authentication cookie for downloads"
          },
          "due_date": {
            "type": "string",
            "description": "The time when the invoice is due"
          },
          "generated_at": {
            "type": "string",
            "description": "The time when the invoice was generated"
          },
          "invoice_number": {
            "type": "string",
            "maxLength": 128,
            "description": "Unique invoice reference code"
          },
          "issue_date": {
            "type": "string",
            "description": "The time when the invoice was issued"
          },
          "period_begin": {
            "type": "string",
            "maxLength": 36,
            "description": "Period begin"
          },
          "period_end": {
            "type": "string",
            "maxLength": 36,
            "description": "Period end"
          },
          "state": {
            "type": "string",
            "description": "State of this invoice",
            "enum": [
              "accrual",
              "consolidated",
              "due",
              "estimate",
              "failed_credit_card_charge",
              "failed_no_credit_card",
              "mailed",
              "no_payment_expected",
              "paid",
              "partner_metering",
              "uncollectible",
              "waived",
              "due_only_project_charges_calculated",
              "estimate_only_project_charges_calculated"
            ]
          },
          "total_inc_vat": {
            "type": "string",
            "description": "Total including taxes"
          },
          "total_vat_zero": {
            "type": "string",
            "description": "Total excluding taxes"
          }
        },
        "required": [
          "billing_group_id",
          "billing_group_name",
          "billing_group_state",
          "currency",
          "download_cookie",
          "invoice_number",
          "period_begin",
          "period_end",
          "state",
          "total_inc_vat",
          "total_vat_zero"
        ]
      }
    },
    "message": {
      "type": "string",
      "description": "Printable result of the request"
    }
  },
  "required": [
    "invoices"
  ]
}