{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/propraven-com/json-schema/propraven-com-account-usage-schema.json",
  "title": "AccountUsage",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/propraven-com-account-api-openapi.yml#/components/schemas/AccountUsage",
  "type": "object",
  "required": [
    "tier",
    "period",
    "period_start",
    "period_end",
    "calls_used",
    "calls_included",
    "calls_remaining",
    "rate_limit",
    "hard_cap_enabled",
    "auth_source"
  ],
  "properties": {
    "tier": {
      "type": "string",
      "enum": [
        "free",
        "starter",
        "pro",
        "scale",
        "api_100k"
      ]
    },
    "period": {
      "type": "string"
    },
    "period_start": {
      "type": "string"
    },
    "period_end": {
      "type": "string"
    },
    "calls_used": {
      "type": "integer"
    },
    "calls_included": {
      "type": "integer",
      "description": "Plan allotment for the current period."
    },
    "calls_remaining": {
      "type": "integer"
    },
    "rate_limit": {
      "type": "object",
      "required": [
        "per_minute",
        "per_day"
      ],
      "properties": {
        "per_minute": {
          "type": "number"
        },
        "per_day": {
          "type": "number"
        }
      }
    },
    "hard_cap_enabled": {
      "type": "boolean"
    },
    "auth_source": {
      "type": "string"
    },
    "hard_capped": {
      "type": "boolean",
      "description": "Whether further calls will be hard-rejected vs allowed-and-billed."
    },
    "lookups": {
      "type": [
        "object",
        "null"
      ],
      "description": "The account's monthly LOOKUP cap — a separate counter from API calls. A record view and each people-data response (owner card, /owner, permits carrying owner/applicant names or contacts, tax-delinquency records, person licensees) spends one lookup for an account without a paid entitlement; a paid plan includes them. `limit: null` = unlimited. Null when the counter could not be read (never reported as 0).",
      "required": [
        "used",
        "limit",
        "remaining",
        "plan"
      ],
      "properties": {
        "used": {
          "type": "integer"
        },
        "limit": {
          "type": [
            "integer",
            "null"
          ]
        },
        "remaining": {
          "type": [
            "integer",
            "null"
          ]
        },
        "plan": {
          "type": "string"
        }
      }
    }
  },
  "additionalProperties": false
}