{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/meetadmiral-com/json-schema/meetadmiral-com-subscription-patch-schema.json",
  "title": "SubscriptionPatch",
  "description": "Complimentary access, trial extensions, tier moves on unbilled plans,\nand cancellation: the things that used to need psql.\n\n`reason` is for us and is kept in the admin log. `note` is for the\ncustomer: the product shows it in Settings, so a comped workspace is\nnever a mystery to them either.",
  "x-generated": "2026-11-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/meetadmiral-com-openapi.json#/components/schemas/SubscriptionPatch",
  "properties": {
    "tier": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^(business|max)$"
        },
        {
          "type": "null"
        }
      ],
      "title": "Tier"
    },
    "status": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^(trialing|active|past_due|cancelled|comped)$"
        },
        {
          "type": "null"
        }
      ],
      "title": "Status"
    },
    "band": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Band"
    },
    "seats": {
      "anyOf": [
        {
          "type": "integer",
          "maximum": 1000.0,
          "minimum": 1.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Seats"
    },
    "note": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 500
        },
        {
          "type": "null"
        }
      ],
      "title": "Note"
    },
    "ends_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Ends At"
    },
    "reason": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 1000
        },
        {
          "type": "null"
        }
      ],
      "title": "Reason"
    }
  },
  "type": "object"
}