{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/agentdrives-com/json-schema/agentdrives-com-claim-schema.json",
  "title": "Claim",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/agentdrives-com-claims-api-openapi.yml#/components/schemas/Claim",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "domain": {
      "type": "string"
    },
    "tool_slug": {
      "type": [
        "string",
        "null"
      ]
    },
    "status": {
      "enum": [
        "pending",
        "verified"
      ]
    },
    "token": {
      "type": "string"
    },
    "listed": {
      "type": "boolean",
      "description": "GET /api/me: the product is in the directory"
    },
    "directory": {
      "$ref": "#/$defs/DirectoryPlace",
      "description": "GET /api/me, a proved product only: its place in the directory now"
    },
    "report": {
      "type": "object",
      "description": "GET /api/me, a proved product only: the product's drive report, listed in the directory or not. GET /api/me/reports/{slug} previews it",
      "required": [
        "slug",
        "name",
        "domain"
      ],
      "properties": {
        "slug": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "domain": {
          "type": "string"
        }
      }
    },
    "check": {
      "type": "object",
      "description": "GET /api/me, a proved domain only: its latest finished free check when another account ran it. You read its result at GET /api/orders/{order_id}/report",
      "properties": {
        "order_id": {
          "type": "string"
        },
        "checked_at": {
          "type": "string",
          "format": "date-time"
        },
        "next_free_at": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "plan_hint": {
      "type": [
        "object",
        "null"
      ],
      "description": "GET /api/me: the product's cheapest paid plan from its pricing page as we last read it (checked), a suggestion for an order's plan; price_cents null when it isn't billed monthly",
      "properties": {
        "plan": {
          "type": "string"
        },
        "price_cents": {
          "type": [
            "integer",
            "null"
          ]
        },
        "per_seat": {
          "type": "boolean"
        },
        "monthly": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "source": {
          "type": "string"
        },
        "checked": {
          "type": "string",
          "format": "date"
        }
      }
    }
  },
  "$defs": {
    "DirectoryPlace": {
      "type": "object",
      "required": [
        "state",
        "since",
        "until"
      ],
      "description": "Where a product stands in our directory, as its owner sees it: audited (a valid certificate, until its date), in_audit (an Audit year runs, shown since its date), hidden (an Audit runs, kept private until it is Audited), lapsed (its certificate ended on until, as ended says), none (not in the directory)",
      "properties": {
        "state": {
          "enum": [
            "audited",
            "in_audit",
            "hidden",
            "lapsed",
            "none"
          ]
        },
        "since": {
          "type": [
            "string",
            "null"
          ],
          "format": "date"
        },
        "until": {
          "type": [
            "string",
            "null"
          ],
          "format": "date"
        },
        "order_id": {
          "type": [
            "string",
            "null"
          ],
          "description": "Your running Audit the switch acts on (POST /api/claims/{id}/directory)"
        },
        "listed": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Whether that Audit shows as In Audit"
        },
        "ended": {
          "enum": [
            "lapsed",
            "withdrawn",
            "expired"
          ],
          "description": "state lapsed: how the certificate ended (lapsed: a lower level and no fix in time; withdrawn: we took it back; expired: its year ran out)"
        }
      }
    }
  }
}