{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/companydata-dk/json-schema/companydata-dk-app-routers-account-usage-response-schema.json",
  "title": "UsageResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/companydata-dk-account-api-openapi.yml#/components/schemas/app__routers__account__UsageResponse",
  "properties": {
    "data": {
      "$ref": "#/$defs/UsageStats",
      "description": "Usage statistics"
    },
    "meta": {
      "additionalProperties": true,
      "type": "object",
      "title": "Meta",
      "description": "Response metadata"
    }
  },
  "type": "object",
  "required": [
    "data"
  ],
  "$defs": {
    "UsageStats": {
      "properties": {
        "requests_this_month": {
          "type": "integer",
          "title": "Requests This Month",
          "description": "Number of requests made this month with this API key"
        },
        "requests_limit": {
          "type": "integer",
          "title": "Requests Limit",
          "description": "Monthly request limit of the plan"
        },
        "credits_remaining": {
          "type": "integer",
          "title": "Credits Remaining",
          "description": "Purchased credits still unspent. Credits are pooled per organisation and are drawn on automatically once the monthly limit is reached.",
          "default": 0
        },
        "requests_remaining": {
          "type": "integer",
          "title": "Requests Remaining",
          "description": "Requests the organisation can still make this month: what is left of the plan limit plus every unspent credit.",
          "default": 0
        },
        "last_request_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Last Request At",
          "description": "Timestamp of last request"
        }
      },
      "type": "object",
      "required": [
        "requests_this_month",
        "requests_limit"
      ],
      "title": "UsageStats"
    }
  }
}