{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/specstream-ai/json-schema/specstream-ai-capacity-quote-data-schema.json",
  "title": "CapacityQuoteData",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/specstream-ai-openapi.json#/components/schemas/CapacityQuoteData",
  "additionalProperties": false,
  "properties": {
    "pricing_version": {
      "const": "capacity.v1",
      "default": "capacity.v1",
      "title": "Pricing Version",
      "type": "string"
    },
    "quote_id": {
      "title": "Quote Id",
      "type": "string"
    },
    "quote_hash": {
      "title": "Quote Hash",
      "type": "string"
    },
    "currency": {
      "default": "USD",
      "enum": [
        "USD",
        "EUR"
      ],
      "title": "Currency",
      "type": "string"
    },
    "maximum_cents": {
      "minimum": 0,
      "title": "Maximum Cents",
      "type": "integer"
    },
    "expires_at": {
      "format": "date-time",
      "title": "Expires At",
      "type": "string"
    },
    "scope": {
      "additionalProperties": true,
      "title": "Scope",
      "type": "object"
    },
    "terms": {
      "additionalProperties": true,
      "properties": {
        "settlement": {
          "description": "How the charge is counted: per delivered result (units) or as one price for the whole request (whole_scope).",
          "enum": [
            "units",
            "whole_scope"
          ],
          "type": "string"
        },
        "minimum_units": {
          "description": "The fewest results the quote covers.",
          "minimum": 1,
          "type": "integer"
        },
        "maximum_units": {
          "description": "The most results the quote covers; maximum_cents is priced on this count.",
          "minimum": 1,
          "type": "integer"
        },
        "unit_cents": {
          "minimum": 0,
          "type": "integer"
        },
        "accepted_outcomes": {
          "description": "The result outcomes that are charged under this quote.",
          "items": {
            "enum": [
              "matched",
              "verified",
              "unchanged",
              "no_longer_matches"
            ],
            "type": "string"
          },
          "type": "array"
        },
        "required_facts_included": {
          "description": "Whether the price covers every fact the request marks as required.",
          "type": "boolean"
        },
        "below_minimum_cents": {
          "description": "Charge when fewer results than minimum_units are delivered.",
          "minimum": 0,
          "type": "integer"
        },
        "retry_cents": {
          "description": "Charge for a retry of the same work.",
          "minimum": 0,
          "type": "integer"
        },
        "retained_work_cents": {
          "description": "Charge for results the caller already owns.",
          "minimum": 0,
          "type": "integer"
        },
        "contact_unit_cents": {
          "description": "Rate for a result delivered with a requested email (or a phone when no phone rate is set); the maximum assumes every result has a contact.",
          "minimum": 0,
          "type": "integer"
        },
        "contact_phone_unit_cents": {
          "description": "Rate for a result delivered with a requested phone.",
          "minimum": 0,
          "type": "integer"
        },
        "check_unit_cents": {
          "description": "Charge per imported row resolved and checked, matched or not.",
          "minimum": 0,
          "type": "integer"
        },
        "required_check_unit_cents": {
          "description": "Quotes on rates before scope-rates.2026-10-26 only: charge per company checked for a detail marked as needed that met every condition but lacked it.",
          "minimum": 0,
          "type": "integer"
        },
        "required_check_allowance": {
          "description": "How many such companies the maximum covers.",
          "minimum": 0,
          "type": "integer"
        },
        "unchanged_unit_cents": {
          "description": "Refresh only: charge per result that comes back unchanged or no longer matches. A result with a new or updated value bills its own rate.",
          "minimum": 0,
          "type": "integer"
        },
        "related_block_cents": {
          "description": "Charge per ten related records past related_included_records in one collection on one result.",
          "minimum": 0,
          "type": "integer"
        },
        "undelivered_unit_cents": {
          "description": "Missing-result shortfall refund per unit, excluding unused contact contingency.",
          "minimum": 0,
          "type": "integer"
        },
        "retail_rate": {
          "additionalProperties": true,
          "properties": {
            "version": {
              "type": "string"
            },
            "recheck": {
              "type": "boolean"
            },
            "contact_unit_cents": {
              "type": [
                "integer",
                "null"
              ]
            }
          },
          "type": "object"
        }
      },
      "title": "Terms",
      "type": "object"
    },
    "cost_basis": {
      "enum": [
        "estimated",
        "measured"
      ],
      "title": "Cost Basis",
      "type": "string"
    },
    "cost_profile_version": {
      "title": "Cost Profile Version",
      "type": "string"
    },
    "retained_work_cents": {
      "const": 0,
      "default": 0,
      "title": "Retained Work Cents",
      "type": "integer"
    },
    "existing_execution": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Existing Execution"
    },
    "can_authorize": {
      "default": true,
      "title": "Can Authorize",
      "type": "boolean"
    },
    "whole_set": {
      "default": false,
      "title": "Whole Set",
      "type": "boolean"
    }
  },
  "required": [
    "quote_id",
    "quote_hash",
    "maximum_cents",
    "expires_at",
    "scope",
    "terms",
    "cost_basis",
    "cost_profile_version"
  ],
  "type": "object"
}