{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/entur/main/json-schema/entur-quota-response-v1-schema.json",
  "title": "QuotaResponseV1",
  "x-generated": "2026-10-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/entur-inventory-openapi.yml#/components/schemas/QuotaResponseV1",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "format": "int64"
    },
    "quota": {
      "type": "integer",
      "format": "int32"
    },
    "products": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "ods": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/OdResponse"
      }
    },
    "quotaConfigurationId": {
      "type": "integer",
      "format": "int32"
    },
    "datedServiceJourneyId": {
      "type": "string"
    },
    "purchaseWindowStart": {
      "type": "string",
      "format": "date-time"
    },
    "purchaseWindowStop": {
      "type": "string",
      "format": "date-time"
    },
    "useStoplist": {
      "type": "boolean"
    }
  },
  "required": [
    "datedServiceJourneyId",
    "id",
    "ods",
    "products",
    "quota",
    "useStoplist"
  ],
  "$defs": {
    "OdResponse": {
      "type": "object",
      "properties": {
        "origin": {
          "type": "string"
        },
        "destination": {
          "type": "string"
        }
      },
      "required": [
        "destination",
        "origin"
      ]
    }
  }
}