{
  "swagger": "2.0",
  "info": {
    "title": "Court-data REST API",
    "version": "1.0.0",
    "description": "Read-only public case, document, and enforcement metadata with source links for documents, plus the API-key owner's tracked cases, saved hearings, tasks, unreviewed and favorite document metadata, and tracked enforcement; no document text. Active Pro includes 5,000 operations per UTC calendar month, shared with MCP. One successful data operation costs one unit. List operations accept limit (default 20, max 50) and zero-based offset (default 0); responses include next_offset only when has_more is true. Repeat filters on each page; changing data can shift results. Public data and tracked cases require court_data:read; saved personal hearings, tasks, unread document selections, favorites, and tracked enforcement require explicit personal_data:read. Usage inspection requires usage:read, is uncharged, and does not require active Pro. Missing or invalid document URLs are null. Internal IDs, refresh timestamps, notification preferences, and source-link failure reasons are not returned. REST accepts customer API keys; MCP supports browser OAuth."
  },
  "schemes": [
    "https"
  ],
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "paths": {
    "/api/v1/case-sessions": {
      "get": {
        "security": [
          {
            "CustomerBearer": []
          }
        ],
        "description": "Requires court_data:read and active Pro. Returns court sessions for an exact case number, newest first. Each successful page, including an empty page, costs one unit.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "paid-court-data"
        ],
        "summary": "List case sessions",
        "parameters": [
          {
            "maxLength": 100,
            "type": "string",
            "description": "Exact case number, up to 100 Unicode characters",
            "name": "case_number",
            "in": "query",
            "required": true
          },
          {
            "maximum": 50,
            "minimum": 0,
            "type": "integer",
            "default": 20,
            "description": "Page size, default 20; 0 also uses the default",
            "name": "limit",
            "in": "query"
          },
          {
            "maximum": 2147483596,
            "minimum": 0,
            "type": "integer",
            "default": 0,
            "description": "Zero-based row offset, default 0",
            "name": "offset",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/paiddata.CaseSessionPage"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          },
          "429": {
            "description": "Too Many Requests",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          },
          "503": {
            "description": "Service Unavailable",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          }
        }
      }
    },
    "/api/v1/cases": {
      "get": {
        "security": [
          {
            "CustomerBearer": []
          }
        ],
        "description": "Requires court_data:read and active Pro. Search by a partial case number of at least three characters. Broad searches consider at most 1,000 matching rows per source and may omit matches. An empty result costs one unit.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "paid-court-data"
        ],
        "summary": "Search public court cases",
        "parameters": [
          {
            "maxLength": 100,
            "minLength": 3,
            "type": "string",
            "description": "Partial case number, 3 to 100 Unicode characters",
            "name": "case_number",
            "in": "query",
            "required": true
          },
          {
            "maximum": 50,
            "minimum": 0,
            "type": "integer",
            "default": 20,
            "description": "Page size, default 20; 0 also uses the default",
            "name": "limit",
            "in": "query"
          },
          {
            "maximum": 2001,
            "minimum": 0,
            "type": "integer",
            "default": 0,
            "description": "Zero-based row offset, default 0",
            "name": "offset",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/paiddata.CasePage"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          },
          "429": {
            "description": "Too Many Requests",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          },
          "503": {
            "description": "Service Unavailable",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          }
        }
      }
    },
    "/api/v1/documents": {
      "get": {
        "security": [
          {
            "CustomerBearer": []
          }
        ],
        "description": "Requires court_data:read and active Pro. Returns active document metadata and source URLs, ordered by adjudication date descending with undated documents last. No matching documents returns an empty page, not 404. Each successful page costs one shared operation.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "paid-court-data"
        ],
        "summary": "List case documents",
        "parameters": [
          {
            "maxLength": 100,
            "type": "string",
            "description": "Exact case number, up to 100 Unicode characters",
            "name": "case_number",
            "in": "query",
            "required": true
          },
          {
            "maximum": 50,
            "minimum": 0,
            "type": "integer",
            "default": 20,
            "description": "Page size, default 20; 0 also uses the default",
            "name": "limit",
            "in": "query"
          },
          {
            "maximum": 2147483596,
            "minimum": 0,
            "type": "integer",
            "default": 0,
            "description": "Zero-based row offset, default 0",
            "name": "offset",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/paiddata.DocumentPage"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          },
          "429": {
            "description": "Too Many Requests",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          },
          "503": {
            "description": "Service Unavailable",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          }
        }
      }
    },
    "/api/v1/documents/{source_document_id}": {
      "get": {
        "security": [
          {
            "CustomerBearer": []
          }
        ],
        "description": "Requires court_data:read and active Pro. Looks up the source registry identifier returned as source_document_id, never an internal database ID. Missing or inactive records return 404. A successful lookup costs one shared operation. source_url is null when missing or invalid; document text is not returned.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "paid-court-data"
        ],
        "summary": "Get document metadata",
        "parameters": [
          {
            "maxLength": 100,
            "minLength": 1,
            "type": "string",
            "description": "Source registry document ID from source_document_id, 1 to 100 Unicode characters after trimming",
            "name": "source_document_id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/paiddata.Document"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          },
          "429": {
            "description": "Too Many Requests",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          },
          "503": {
            "description": "Service Unavailable",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          }
        }
      }
    },
    "/api/v1/enforcement-proceedings": {
      "get": {
        "security": [
          {
            "CustomerBearer": []
          }
        ],
        "description": "Requires court_data:read and active Pro. Exact trimmed case-insensitive debtor name, optional calendar birthdate. One successful page costs one shared Pro operation, including an empty page. Data is imported, not live.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "paid-court-data"
        ],
        "summary": "Search public enforcement proceedings",
        "parameters": [
          {
            "maxLength": 255,
            "minLength": 3,
            "type": "string",
            "description": "Exact debtor name, 3 to 255 Unicode characters after trimming",
            "name": "debtor_name",
            "in": "query",
            "required": true
          },
          {
            "type": "string",
            "format": "date",
            "description": "Calendar birthdate YYYY-MM-DD",
            "name": "debtor_birthdate",
            "in": "query"
          },
          {
            "maximum": 50,
            "minimum": 0,
            "type": "integer",
            "default": 20,
            "description": "Page size, default 20; 0 also uses the default",
            "name": "limit",
            "in": "query"
          },
          {
            "maximum": 2147483596,
            "minimum": 0,
            "type": "integer",
            "default": 0,
            "description": "Zero-based row offset, default 0",
            "name": "offset",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/paiddata.EnforcementPage"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          },
          "429": {
            "description": "Too Many Requests",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          },
          "503": {
            "description": "Service Unavailable",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          }
        }
      }
    },
    "/api/v1/enforcement-proceedings/{vp_ordernum}": {
      "get": {
        "security": [
          {
            "CustomerBearer": []
          }
        ],
        "description": "Requires court_data:read and active Pro. Positive registry number, distinct from a court case number. A found record costs one shared Pro operation; status and freshness are not live registry claims.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "paid-court-data"
        ],
        "summary": "Get a public enforcement proceeding",
        "parameters": [
          {
            "maximum": 2147483647,
            "minimum": 1,
            "type": "integer",
            "description": "Positive registry proceeding number",
            "name": "vp_ordernum",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/paiddata.EnforcementProceeding"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          },
          "429": {
            "description": "Too Many Requests",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          },
          "503": {
            "description": "Service Unavailable",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          }
        }
      }
    },
    "/api/v1/usage": {
      "get": {
        "security": [
          {
            "CustomerBearer": []
          }
        ],
        "description": "Requires usage:read. Returns allowance, consumed operations, UTC period bounds, and subscription expiry when present. Does not charge an operation or require active Pro; rate and concurrency limits still apply.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "paid-court-data"
        ],
        "summary": "Get court-data API usage",
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/paiddata.Usage"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          },
          "429": {
            "description": "Too Many Requests",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          },
          "503": {
            "description": "Service Unavailable",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          }
        }
      }
    },
    "/api/v1/user-cases": {
      "get": {
        "security": [
          {
            "CustomerBearer": []
          }
        ],
        "description": "Requires court_data:read and active Pro. Returns the API-key owner's tracked cases in every status, newest first. Items contain case_number, case_name, status, and the optional category name; category is omitted when unassigned. Each successful page, including an empty page, costs one shared Pro operation. The API key determines the user.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "paid-court-data"
        ],
        "summary": "List your tracked court cases",
        "parameters": [
          {
            "maximum": 50,
            "minimum": 0,
            "type": "integer",
            "default": 20,
            "description": "Page size, default 20; 0 also uses the default",
            "name": "limit",
            "in": "query"
          },
          {
            "maximum": 2147483596,
            "minimum": 0,
            "type": "integer",
            "default": 0,
            "description": "Zero-based row offset, default 0",
            "name": "offset",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/paiddata.UserCasePage"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          },
          "429": {
            "description": "Too Many Requests",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          },
          "503": {
            "description": "Service Unavailable",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          }
        }
      }
    },
    "/api/v1/user-documents/favorites": {
      "get": {
        "security": [
          {
            "CustomerBearer": []
          }
        ],
        "description": "Returns active document metadata saved by the API-key owner, newest internal document ID first. Following the document's case is not required. Duplicate favorites return a single document; inactive and missing documents are omitted. Does not fetch document text. Each successful page, including an empty page, costs one shared Pro operation. Requires personal_data:read.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "paid-personal-data"
        ],
        "summary": "List your favorite documents",
        "parameters": [
          {
            "maxLength": 100,
            "type": "string",
            "description": "Optional exact case number, up to 100 Unicode characters",
            "name": "case_number",
            "in": "query"
          },
          {
            "maximum": 50,
            "minimum": 0,
            "type": "integer",
            "default": 20,
            "description": "Page size, default 20; 0 also uses the default",
            "name": "limit",
            "in": "query"
          },
          {
            "maximum": 2147483596,
            "minimum": 0,
            "type": "integer",
            "default": 0,
            "description": "Zero-based row offset, default 0",
            "name": "offset",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/paiddata.DocumentPage"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          },
          "429": {
            "description": "Too Many Requests",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          },
          "503": {
            "description": "Service Unavailable",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          }
        }
      }
    },
    "/api/v1/user-documents/unreviewed": {
      "get": {
        "security": [
          {
            "CustomerBearer": []
          }
        ],
        "description": "Returns active document metadata from the API-key owner's followed cases in every status, newest internal document ID first. Missing, null, or false own review rows are unread; any true own review wins conflicting duplicate rows. Other users' reviews are ignored. Does not fetch document text. Every successful page, including an empty page, costs one shared Pro operation. Requires personal_data:read.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "paid-personal-data"
        ],
        "summary": "List your unreviewed documents",
        "parameters": [
          {
            "maxLength": 100,
            "type": "string",
            "description": "Optional exact case number, up to 100 Unicode characters",
            "name": "case_number",
            "in": "query"
          },
          {
            "maximum": 50,
            "minimum": 0,
            "type": "integer",
            "default": 20,
            "description": "Page size, default 20; 0 also uses the default",
            "name": "limit",
            "in": "query"
          },
          {
            "maximum": 2147483596,
            "minimum": 0,
            "type": "integer",
            "default": 0,
            "description": "Zero-based row offset, default 0",
            "name": "offset",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/paiddata.DocumentPage"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          },
          "429": {
            "description": "Too Many Requests",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          },
          "503": {
            "description": "Service Unavailable",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          }
        }
      }
    },
    "/api/v1/user-enforcement-proceedings": {
      "get": {
        "security": [
          {
            "CustomerBearer": []
          }
        ],
        "description": "Requires personal_data:read and active Pro. Flat rows contain tracked debtors with associated imported proceedings, debtors with no imported match, and pending number follows. Debtors match by exact name and exact nullable birthdate. Debtor follows precede pending follows, newest follow and proceeding IDs first. Pending follows contain no imported metadata until resolved by the application. Each successful page, including empty, costs one shared operation.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "paid-court-data"
        ],
        "summary": "List your tracked enforcement proceedings",
        "parameters": [
          {
            "maximum": 50,
            "minimum": 0,
            "type": "integer",
            "default": 20,
            "description": "Page size, default 20; 0 also uses the default",
            "name": "limit",
            "in": "query"
          },
          {
            "maximum": 2147483596,
            "minimum": 0,
            "type": "integer",
            "default": 0,
            "description": "Zero-based row offset, default 0",
            "name": "offset",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/paiddata.UserEnforcementPage"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          },
          "429": {
            "description": "Too Many Requests",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          },
          "503": {
            "description": "Service Unavailable",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          }
        }
      }
    },
    "/api/v1/user-sessions": {
      "get": {
        "security": [
          {
            "CustomerBearer": []
          }
        ],
        "description": "Requires personal_data:read and active Pro. Returns saved hearings for nonarchived tracked cases, ordered by date with an internal ID tie-breaker. Internal IDs are not returned. Without date filters, omitted or active status returns only active sessions at or after the current request time on every page. Sessions that have started since a previous page are excluded. Explicit date filters disable the upcoming and default-status restrictions; omitted status then includes all statuses. Explicit completed or canceled status without dates includes history. Inclusive calendar dates use Europe/Kyiv. Pagination uses limit and offset. Changes between requests can shift rows between pages. A successful empty page costs one shared operation.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "paid-court-data"
        ],
        "summary": "List your saved hearings",
        "parameters": [
          {
            "maxLength": 100,
            "type": "string",
            "description": "Exact case number, up to 100 Unicode characters",
            "name": "case_number",
            "in": "query"
          },
          {
            "enum": [
              "active",
              "completed",
              "canceled"
            ],
            "type": "string",
            "description": "active, completed, or canceled; defaults to active only without date filters",
            "name": "status",
            "in": "query"
          },
          {
            "type": "string",
            "format": "date",
            "description": "Inclusive Kyiv calendar date YYYY-MM-DD",
            "name": "date_from",
            "in": "query"
          },
          {
            "type": "string",
            "format": "date",
            "description": "Inclusive Kyiv calendar date YYYY-MM-DD",
            "name": "date_to",
            "in": "query"
          },
          {
            "maximum": 50,
            "minimum": 0,
            "type": "integer",
            "default": 20,
            "description": "Page size, default 20; 0 also uses the default",
            "name": "limit",
            "in": "query"
          },
          {
            "maximum": 2147483596,
            "minimum": 0,
            "type": "integer",
            "default": 0,
            "description": "Zero-based row offset, default 0",
            "name": "offset",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/paiddata.UserSessionPage"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          },
          "429": {
            "description": "Too Many Requests",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          },
          "503": {
            "description": "Service Unavailable",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          }
        }
      }
    },
    "/api/v1/user-tasks": {
      "get": {
        "security": [
          {
            "CustomerBearer": []
          }
        ],
        "description": "Requires personal_data:read and active Pro. Returns stored tasks on your non-archived tracked cases, ordered by deadline ascending with undated tasks last, then an internal ID tie-breaker. Internal IDs are not returned. Date filters are inclusive Europe/Kyiv calendar dates. Each successful page, including an empty page, costs one shared Pro operation.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "paid-court-data"
        ],
        "summary": "List your tasks",
        "parameters": [
          {
            "maxLength": 100,
            "type": "string",
            "description": "Optional exact case number, up to 100 Unicode characters",
            "name": "case_number",
            "in": "query"
          },
          {
            "enum": [
              "active",
              "done"
            ],
            "type": "string",
            "description": "Optional task status: active or done",
            "name": "status",
            "in": "query"
          },
          {
            "type": "string",
            "format": "date",
            "description": "Inclusive Kyiv calendar date YYYY-MM-DD",
            "name": "deadline_from",
            "in": "query"
          },
          {
            "type": "string",
            "format": "date",
            "description": "Inclusive Kyiv calendar date YYYY-MM-DD",
            "name": "deadline_to",
            "in": "query"
          },
          {
            "maximum": 50,
            "minimum": 0,
            "type": "integer",
            "default": 20,
            "description": "Page size, default 20; 0 also uses the default",
            "name": "limit",
            "in": "query"
          },
          {
            "maximum": 2147483596,
            "minimum": 0,
            "type": "integer",
            "default": 0,
            "description": "Zero-based row offset, default 0",
            "name": "offset",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/paiddata.UserTaskPage"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          },
          "429": {
            "description": "Too Many Requests",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          },
          "503": {
            "description": "Service Unavailable",
            "schema": {
              "$ref": "#/definitions/paidDataController.apiError"
            }
          }
        }
      }
    }
  },
  "definitions": {
    "paiddata.CaseSessionPage": {
      "type": "object",
      "properties": {
        "has_more": {
          "type": "boolean"
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/paiddata.CaseSession"
          }
        },
        "next_offset": {
          "type": "integer"
        }
      }
    },
    "paiddata.CaseSession": {
      "type": "object",
      "properties": {
        "case_description": {
          "type": "string",
          "x-nullable": true
        },
        "case_involved": {
          "type": "string",
          "x-nullable": true
        },
        "case_number": {
          "type": "string"
        },
        "court_name": {
          "type": "string",
          "x-nullable": true
        },
        "court_room": {
          "type": "string",
          "x-nullable": true
        },
        "date": {
          "type": "string",
          "format": "date-time",
          "x-nullable": true
        },
        "judges": {
          "type": "string",
          "x-nullable": true
        }
      }
    },
    "paidDataController.apiError": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "period_end": {
          "type": "string",
          "format": "date-time"
        },
        "request_id": {
          "type": "string"
        },
        "retry_after_seconds": {
          "type": "integer"
        }
      }
    },
    "paiddata.CasePage": {
      "type": "object",
      "properties": {
        "has_more": {
          "type": "boolean"
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/paiddata.Case"
          }
        },
        "next_offset": {
          "type": "integer"
        }
      }
    },
    "paiddata.Case": {
      "type": "object",
      "properties": {
        "case_number": {
          "type": "string"
        },
        "court_name": {
          "type": "string",
          "x-nullable": true
        },
        "last_event_date": {
          "type": "string",
          "format": "date-time",
          "x-nullable": true
        },
        "latest_stage": {
          "type": "string",
          "x-nullable": true
        }
      }
    },
    "paiddata.DocumentPage": {
      "type": "object",
      "properties": {
        "has_more": {
          "type": "boolean"
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/paiddata.Document"
          }
        },
        "next_offset": {
          "type": "integer"
        }
      }
    },
    "paiddata.Document": {
      "type": "object",
      "properties": {
        "adjudication_date": {
          "type": "string",
          "format": "date-time",
          "x-nullable": true
        },
        "case_number": {
          "type": "string"
        },
        "court_name": {
          "type": "string",
          "x-nullable": true
        },
        "judgment_form": {
          "type": "string",
          "x-nullable": true
        },
        "publication_date": {
          "type": "string",
          "format": "date-time",
          "x-nullable": true
        },
        "source_document_id": {
          "type": "string",
          "x-nullable": true
        },
        "source_url": {
          "type": "string",
          "x-nullable": true
        }
      }
    },
    "paiddata.EnforcementPage": {
      "type": "object",
      "properties": {
        "has_more": {
          "type": "boolean"
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/paiddata.EnforcementProceeding"
          }
        },
        "next_offset": {
          "type": "integer"
        }
      }
    },
    "paiddata.EnforcementProceeding": {
      "type": "object",
      "properties": {
        "creditor_name": {
          "type": "string",
          "x-nullable": true
        },
        "debtor_birthdate": {
          "type": "string",
          "format": "date",
          "x-nullable": true
        },
        "debtor_name": {
          "type": "string",
          "x-nullable": true
        },
        "org_name": {
          "type": "string",
          "x-nullable": true
        },
        "vp_begindate": {
          "type": "string",
          "x-nullable": true
        },
        "vp_ordernum": {
          "type": "integer"
        },
        "vp_state": {
          "type": "string",
          "x-nullable": true
        }
      }
    },
    "paiddata.Usage": {
      "type": "object",
      "properties": {
        "allowance": {
          "type": "integer"
        },
        "consumed": {
          "type": "integer"
        },
        "period_end": {
          "type": "string",
          "format": "date-time"
        },
        "period_start": {
          "type": "string",
          "format": "date-time"
        },
        "subscription_expires_at": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "paiddata.UserCasePage": {
      "type": "object",
      "properties": {
        "has_more": {
          "type": "boolean"
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/paiddata.UserCase"
          }
        },
        "next_offset": {
          "type": "integer"
        }
      }
    },
    "paiddata.UserCase": {
      "type": "object",
      "properties": {
        "case_name": {
          "type": "string"
        },
        "case_number": {
          "type": "string"
        },
        "category": {
          "type": "string"
        },
        "status": {
          "type": "string"
        }
      }
    },
    "paiddata.UserEnforcementPage": {
      "type": "object",
      "properties": {
        "has_more": {
          "type": "boolean"
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/paiddata.UserEnforcementItem"
          }
        },
        "next_offset": {
          "type": "integer"
        }
      }
    },
    "paiddata.UserEnforcementItem": {
      "type": "object",
      "properties": {
        "creditor_name": {
          "type": "string"
        },
        "debtor_birthdate": {
          "type": "string"
        },
        "debtor_name": {
          "type": "string"
        },
        "org_name": {
          "type": "string"
        },
        "pending": {
          "type": "boolean"
        },
        "vp_begindate": {
          "type": "string"
        },
        "vp_ordernum": {
          "type": "integer"
        },
        "vp_state": {
          "type": "string"
        }
      }
    },
    "paiddata.UserSessionPage": {
      "type": "object",
      "properties": {
        "has_more": {
          "type": "boolean"
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/paiddata.UserSession"
          }
        },
        "next_offset": {
          "type": "integer"
        }
      }
    },
    "paiddata.UserSession": {
      "type": "object",
      "properties": {
        "case_name": {
          "type": "string"
        },
        "case_number": {
          "type": "string"
        },
        "comment": {
          "type": "string"
        },
        "court_name": {
          "type": "string"
        },
        "court_room": {
          "type": "string"
        },
        "date": {
          "type": "string",
          "format": "date-time"
        },
        "judge": {
          "type": "string"
        },
        "report": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "type": {
          "type": "string"
        }
      }
    },
    "paiddata.UserTaskPage": {
      "type": "object",
      "properties": {
        "has_more": {
          "type": "boolean"
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/paiddata.UserTask"
          }
        },
        "next_offset": {
          "type": "integer"
        }
      }
    },
    "paiddata.UserTask": {
      "type": "object",
      "properties": {
        "case_name": {
          "type": "string"
        },
        "case_number": {
          "type": "string"
        },
        "deadline": {
          "type": "string",
          "format": "date-time"
        },
        "status": {
          "type": "string"
        },
        "text": {
          "type": "string"
        },
        "title": {
          "type": "string"
        }
      }
    }
  },
  "securityDefinitions": {
    "CustomerBearer": {
      "description": "REST customer API key in Authorization: Bearer pdc_...; create and manage it in API access. OAuth tokens are for the /mcp resource.",
      "type": "apiKey",
      "name": "Authorization",
      "in": "header"
    }
  }
}
