{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/arcnautical-com/json-schema/arcnautical-com-usage-summary-schema.json",
  "title": "UsageSummary",
  "x-generated": "2026-11-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/arcnautical-com-openapi.json#/components/schemas/UsageSummary",
  "type": "object",
  "required": [
    "product_code",
    "environment",
    "assessments",
    "batches",
    "monitors"
  ],
  "properties": {
    "product_code": {
      "type": "string"
    },
    "environment": {
      "type": "string",
      "enum": [
        "live",
        "test"
      ]
    },
    "assessments": {
      "type": "object",
      "required": [
        "live",
        "test"
      ],
      "properties": {
        "live": {
          "$ref": "#/$defs/UsageBucket"
        },
        "test": {
          "$ref": "#/$defs/UsageBucket"
        }
      }
    },
    "batches": {
      "type": "object",
      "required": [
        "live_max_routes",
        "test_max_routes"
      ],
      "properties": {
        "live_max_routes": {
          "type": "integer"
        },
        "test_max_routes": {
          "type": "integer"
        }
      }
    },
    "monitors": {
      "type": "object",
      "required": [
        "limit",
        "used",
        "remaining",
        "cadence_hours",
        "history_days"
      ],
      "properties": {
        "limit": {
          "type": "integer"
        },
        "used": {
          "type": "integer"
        },
        "remaining": {
          "type": "integer"
        },
        "cadence_hours": {
          "type": "integer"
        },
        "history_days": {
          "type": "integer"
        }
      }
    },
    "concurrency": {
      "type": "object",
      "description": "How many requests you may have IN FLIGHT, as opposed to how many you may consume in a month. Everything else in this response is a quota; this is the ceiling a fan-out actually hits, and it was previously undocumented — an integrator reading this endpoint could only see the per-minute rate limit and reasonably concluded it was the only limit there was.\n\n`enriched_screenings_global` is the one that governs a screening integration. It is SHARED across all accounts, so it can refuse you with your rate budget almost untouched and nothing you change on your side will clear it. Past that ceiling a graded screening is not refused immediately: it waits up to `enriched_queue_max_wait_ms` for a slot, served round-robin between accounts, so you are never queued behind another customer's entire batch. `include_vetting: false` skips that queue entirely, and POST /api/v1/screening-batches is not subject to it at all.",
      "required": [
        "screenings_per_customer",
        "screenings_global",
        "enriched_screenings_global",
        "enriched_queue_max_wait_ms",
        "enriched_queue_per_customer",
        "assessments_per_customer",
        "requests_per_minute_per_key"
      ],
      "properties": {
        "screenings_per_customer": {
          "type": "integer"
        },
        "screenings_global": {
          "type": "integer"
        },
        "enriched_screenings_global": {
          "type": "integer"
        },
        "enriched_queue_max_wait_ms": {
          "type": "integer"
        },
        "enriched_queue_per_customer": {
          "type": "integer"
        },
        "assessments_per_customer": {
          "type": "integer"
        },
        "requests_per_minute_per_key": {
          "type": "integer"
        }
      }
    }
  },
  "$defs": {
    "UsageBucket": {
      "type": "object",
      "properties": {
        "limit": {
          "type": "integer"
        },
        "used": {
          "type": "integer",
          "description": "Completed units: this UTC month, or since the start of a one-time allowance."
        },
        "reserved": {
          "type": "integer"
        },
        "remaining": {
          "type": "integer"
        },
        "reset": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "When the allowance resets. null on a one-time live screening allowance, which does not reset."
        }
      }
    }
  }
}