{
  "openapi": "3.1.0",
  "info": {
    "title": "ZemleRadar LO + PiterScope SPb B2B Geo-Ecosystem API",
    "version": "18.5.0",
    "description": "Jubilee Gate #180 Release (v18.5.0) Public, X-API-Key, and strict header-only X-Partner-Key (master & TTL-scoped team tokens + fail-closed universal CIDR IP Allowlist) REST + 29 Binary ISO A4 PDF API for St. Petersburg and Leningrad Region real-estate analytics, RGIS/KGIOP/FKR checks, municipal auctions (159-FZ / 39.18), IP-pinned HTTPS Reserve-Before-Send Weekly Digest Runner (auto-catchup after quiet/maintenance windows, X-ZemleRadar-Idempotency-Key, non-delivery-confirmed Ack-Unknown), Partner Maintenance Windows & 29th Maintenance Cert PDF, PG Idle-in-Tx & Caddy p95 Latency SLA telemetry. Zero secrets in query strings."
  },
  "servers": [
    {
      "url": "https://nspd.cyberdub.su",
      "description": "Production HTTPS (Caddy TLS 1.3 + HSTS + nosniff)"
    }
  ],
  "components": {
    "securitySchemes": {
      "ApiKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key"
      },
      "PartnerKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Partner-Key",
        "description": "Strict header-only partner master key or scoped team token (read_only / leads_export). Query string key parameters are rejected with HTTP 401."
      }
    }
  },
  "paths": {
    "/api/public/sla-status": {
      "get": {
        "summary": "Public SLA, 17-PDF p95 history, DR-Restore E2E, Backup Row-Diff & active lots status",
        "responses": { "200": { "description": "OK" } }
      }
    },
    "/api/public/partner-brand/{slug}": {
      "get": {
        "summary": "Public read-only White-Label Brand Kit display fields for embed_widget & PDF hydration (zero secrets/PII)",
        "responses": { "200": { "description": "OK" }, "404": { "description": "Not Found" } }
      }
    },
    "/api/public/b2b/request-trial": {
      "post": {
        "summary": "Self-Service 7-day B2B Trial X-API-Key issuer (25 req/day, rate-limited 429)",
        "responses": { "200": { "description": "OK" }, "422": { "description": "Validation Error" }, "429": { "description": "Rate Limit Exceeded" } }
      }
    },
    "/api/public/widget-lead": {
      "post": {
        "summary": "Inline lead capture from White-Label embed_widget.html with auto HMAC-SHA256 CRM dispatch",
        "responses": { "200": { "description": "OK" }, "422": { "description": "Validation Error" }, "429": { "description": "Rate Limit Exceeded" } }
      }
    },
    "/api/spb/lookup": {
      "get": {
        "summary": "PiterScope SPb RGIS/KGIOP/UNESCO/FKR & 73-metro lookup",
        "security": [{ "ApiKeyHeader": [] }],
        "responses": { "200": { "description": "OK" }, "429": { "description": "Quota Exceeded" } }
      }
    },
    "/api/spb/dossier.pdf": {
      "get": {
        "summary": "White-Label PiterScope SPb A4 PDF dossier",
        "security": [{ "ApiKeyHeader": [] }],
        "responses": { "200": { "description": "application/pdf" } }
      }
    },
    "/api/spb/torgi": {
      "get": {
        "summary": "Live SPb municipal auctions (region 78) with PostGIS lat/lon & metro",
        "security": [{ "ApiKeyHeader": [] }],
        "responses": { "200": { "description": "OK" } }
      }
    },
    "/api/spb/torgi/analytics": {
      "get": {
        "summary": "18-district SPb auctions price median, competition & yield",
        "responses": { "200": { "description": "OK" } }
      }
    },
    "/api/spb/torgi/analytics.pdf": {
      "get": {
        "summary": "18-district SPb analytical review A4 PDF (X-PDF-Cache)",
        "responses": { "200": { "description": "application/pdf" } }
      }
    },
    "/api/spb/heatmap_report.pdf": {
      "get": {
        "summary": "11th PDF: 36-District SPb+LO GeoAnalytics Heatmap Report A4 PDF",
        "responses": { "200": { "description": "application/pdf" } }
      }
    },
    "/api/spb/compare_districts.pdf": {
      "get": {
        "summary": "12th PDF: White-Label Side-by-Side 2-District Comparator A4 PDF",
        "responses": { "200": { "description": "application/pdf" } }
      }
    },
    "/api/spb/pitch_deck.pdf": {
      "get": {
        "summary": "14th PDF: 3-Page ISO A4 Landscape Investor Pitch Deck (supports ?partner=<slug> Brand Kit hydration)",
        "responses": { "200": { "description": "application/pdf" } }
      }
    },
    "/api/spb/amortization_memo.pdf": {
      "post": {
        "summary": "16th PDF: 159-FZ vs Commercial Mortgage Amortization Investment Memorandum A4 PDF",
        "responses": { "200": { "description": "application/pdf" } }
      }
    },
    "/api/spb/portfolio.pdf": {
      "post": {
        "summary": "Multi-lot SPb+LO portfolio A4 PDF with blended ROI",
        "security": [{ "ApiKeyHeader": [] }],
        "responses": { "200": { "description": "application/pdf" } }
      }
    },
    "/api/spb/b2b_offer.pdf": {
      "post": {
        "summary": "Personalized B2B commercial proposal A4 PDF",
        "security": [{ "ApiKeyHeader": [] }],
        "responses": { "200": { "description": "application/pdf" } }
      }
    },
    "/api/spb/b2b_invoice.pdf": {
      "post": {
        "summary": "B2B legal entity invoice A4 PDF by INN/KPP + optional X-API-Key",
        "responses": { "200": { "description": "application/pdf" }, "429": { "description": "Rate Limit Exceeded" } }
      }
    },
    "/api/b2b/keys/issue": {
      "post": {
        "summary": "Issue B2B X-API-Key (Pro 200 / Agency 1000 / Enterprise 5000 req/day)",
        "responses": { "200": { "description": "OK" } }
      }
    },
    "/api/b2b/keys/verify": {
      "post": {
        "summary": "Verify X-API-Key quota & remaining daily requests",
        "security": [{ "ApiKeyHeader": [] }],
        "responses": { "200": { "description": "OK" } }
      }
    },
    "/api/smetaiq/partner/{slug}/brand-kit": {
      "get": {
        "summary": "Read persisted B2B White-Label Brand Kit (strict X-Partner-Key, read_only allowed)",
        "security": [{ "PartnerKeyHeader": [] }],
        "responses": { "200": { "description": "OK" }, "401": { "description": "Missing Header" }, "403": { "description": "Forbidden" } }
      },
      "put": {
        "summary": "Update persisted B2B White-Label Brand Kit (master X-Partner-Key only, HEX & XSS validated)",
        "security": [{ "PartnerKeyHeader": [] }],
        "responses": { "200": { "description": "OK" }, "401": { "description": "Missing Header" }, "403": { "description": "Forbidden" }, "422": { "description": "Invalid HEX" } }
      }
    },
    "/api/smetaiq/partner/{slug}/audit-log": {
      "get": {
        "summary": "Read isolated 180-day partner security & config audit log (master X-Partner-Key)",
        "security": [{ "PartnerKeyHeader": [] }],
        "responses": { "200": { "description": "OK" }, "401": { "description": "Missing Header" }, "403": { "description": "Forbidden" } }
      }
    },
    "/api/smetaiq/partner/{slug}/rotate-key": {
      "post": {
        "summary": "Atomically rotate master X-Partner-Key with immediate old-key revocation",
        "security": [{ "PartnerKeyHeader": [] }],
        "responses": { "200": { "description": "OK" }, "401": { "description": "Missing Header" }, "403": { "description": "Forbidden" } }
      }
    },
    "/api/smetaiq/partner/{slug}/tokens": {
      "get": {
        "summary": "List partner team tokens metadata (master X-Partner-Key only, never returns raw token)",
        "security": [{ "PartnerKeyHeader": [] }],
        "responses": { "200": { "description": "OK" }, "401": { "description": "Missing Header" }, "403": { "description": "Forbidden" } }
      },
      "post": {
        "summary": "Create scoped partner team token (read_only or leads_export, SHA-256 hashed in DB, shown once)",
        "security": [{ "PartnerKeyHeader": [] }],
        "responses": { "200": { "description": "OK" }, "401": { "description": "Missing Header" }, "403": { "description": "Forbidden" } }
      }
    },
    "/api/smetaiq/partner/{slug}/tokens/{token_id}": {
      "delete": {
        "summary": "Immediately revoke partner team token by ID (master X-Partner-Key only)",
        "security": [{ "PartnerKeyHeader": [] }],
        "responses": { "200": { "description": "OK" }, "401": { "description": "Missing Header" }, "403": { "description": "Forbidden" } }
      }
    },
    "/api/smetaiq/partner/{slug}/monthly_report.pdf": {
      "get": {
        "summary": "13th PDF: Partner Monthly Efficiency Report A4 PDF (strict X-Partner-Key)",
        "security": [{ "PartnerKeyHeader": [] }],
        "responses": { "200": { "description": "application/pdf" }, "401": { "description": "Missing Header" }, "403": { "description": "Forbidden" } }
      }
    },
    "/api/smetaiq/partner/{slug}/executive_digest.pdf": {
      "get": {
        "summary": "15th PDF: White-Label Partner Executive Digest A4 PDF with Brand Kit & vector chart",
        "security": [{ "PartnerKeyHeader": [] }],
        "responses": { "200": { "description": "application/pdf" }, "401": { "description": "Missing Header" }, "403": { "description": "Forbidden" } }
      }
    },
    "/api/smetaiq/partner/{slug}/price_sheet.pdf": {
      "get": {
        "summary": "17th PDF: White-Label Partner Price Sheet A4 PDF (Brand Kit + custom_rates_json, read_only token allowed)",
        "security": [{ "PartnerKeyHeader": [] }],
        "responses": { "200": { "description": "application/pdf" }, "401": { "description": "Missing Header" }, "403": { "description": "Forbidden" } }
      }
    },
    "/api/smetaiq/partner/{slug}/team-usage": {
      "get": {
        "summary": "Master-only per-token request counters and TTL status for partner team tokens (zero secrets/hashes)",
        "security": [{ "PartnerKeyHeader": [] }],
        "responses": { "200": { "description": "OK" }, "401": { "description": "Missing Header" }, "403": { "description": "Forbidden" } }
      }
    },
    "/api/smetaiq/partner/{slug}/compliance_pack.pdf": {
      "get": {
        "summary": "18th PDF: White-Label Partner Team Access & Compliance Pack A4 PDF (Brand Kit + active/revoked tokens summary + audit log, zero secrets/hashes)",
        "security": [{ "PartnerKeyHeader": [] }],
        "responses": { "200": { "description": "application/pdf" }, "401": { "description": "Missing Header" }, "403": { "description": "Forbidden" } }
      }
    },
    "/api/smetaiq/partner/{slug}/webhook/dlq": {
      "get": {
        "summary": "Master-only Dead-Letter Queue (DLQ) of failed partner webhook deliveries (zero secrets)",
        "security": [{ "PartnerKeyHeader": [] }],
        "responses": { "200": { "description": "OK" }, "401": { "description": "Missing Header" }, "403": { "description": "Forbidden" } }
      }
    },
    "/api/smetaiq/partner/{slug}/webhook/replay/{log_id}": {
      "post": {
        "summary": "Master-only idempotent replay of failed webhook delivery (dry_run zero-mutation mode + atomic retry_count, rejects already-delivered or unknown-outcome with HTTP 409)",
        "security": [{ "PartnerKeyHeader": [] }],
        "responses": { "200": { "description": "OK" }, "401": { "description": "Missing Header" }, "403": { "description": "Forbidden" }, "409": { "description": "Conflict" } }
      }
    },
    "/api/smetaiq/partner/{slug}/integration_cert.pdf": {
      "get": {
        "summary": "19th PDF: White-Label Partner Webhook & SLA Integration Certificate A4 PDF (auth before cache, zero secrets/hashes)",
        "security": [{ "PartnerKeyHeader": [] }],
        "responses": { "200": { "description": "application/pdf" }, "401": { "description": "Missing Header" }, "403": { "description": "Forbidden" } }
      }
    },
    "/api/smetaiq/partner/{slug}/webhook/worker-status": {
      "get": {
        "summary": "Master-only status of the Webhook Exponential Backoff Worker (5m->15m->30m, max 3 retries, zero secrets)",
        "security": [{ "PartnerKeyHeader": [] }],
        "responses": { "200": { "description": "OK" }, "401": { "description": "Missing Header" }, "403": { "description": "Forbidden" } }
      }
    },
    "/api/smetaiq/partner/{slug}/annual_roi_review.pdf": {
      "get": {
        "summary": "20th Jubilee PDF: White-Label Partner 12-Month Annual ROI Review A4 PDF (Brand Kit + 12m leads/ROI/SLA formula, auth before cache, zero secrets/hashes)",
        "security": [{ "PartnerKeyHeader": [] }],
        "responses": { "200": { "description": "application/pdf" }, "401": { "description": "Missing Header" }, "403": { "description": "Forbidden" } }
      }
    },
    "/api/smetaiq/partner/{slug}/webhook/rotate-secret": {
      "post": {
        "summary": "Master-only Webhook HMAC Dual-Secret Rotation with 24-hour grace window for previous secret (returns new secret once, zero secret in audit log)",
        "security": [{ "PartnerKeyHeader": [] }],
        "responses": { "200": { "description": "OK" }, "401": { "description": "Missing Header" }, "403": { "description": "Forbidden" } }
      }
    },
    "/api/smetaiq/partner/{slug}/webhook/test-ping": {
      "post": {
        "summary": "Master-only SSRF-hardened HTTPS webhook test-ping (DNS + IP check blocks loopback/private/link-local/metadata, no redirects, dry_run zero-send mode)",
        "security": [{ "PartnerKeyHeader": [] }],
        "responses": { "200": { "description": "OK" }, "401": { "description": "Missing Header" }, "403": { "description": "Forbidden" }, "422": { "description": "SSRF / Invalid HTTPS URL" } }
      }
    },
    "/api/smetaiq/partner/{slug}/security_passport.pdf": {
      "get": {
        "summary": "21st PDF: White-Label Partner B2B Security & RBAC Audit Passport A4 PDF (auth before cache, zero secrets/hashes, updates on brand & security state)",
        "security": [{ "PartnerKeyHeader": [] }],
        "responses": { "200": { "description": "application/pdf" }, "401": { "description": "Missing Header" }, "403": { "description": "Forbidden" } }
      }
    },
    "/api/smetaiq/partner/{slug}/security-policy": {
      "get": {
        "summary": "Master-only read of Partner CIDR IP Allowlist & Webhook Event-Type Subscriptions (zero secrets)",
        "security": [{ "PartnerKeyHeader": [] }],
        "responses": { "200": { "description": "OK" }, "401": { "description": "Missing Header" }, "403": { "description": "Forbidden" } }
      },
      "put": {
        "summary": "Master-only update of Partner CIDR IP Allowlist (with self-lockout guard) & Webhook Event-Type Subscriptions (smetaiq_lead, widget_lead, torgi_alert)",
        "security": [{ "PartnerKeyHeader": [] }],
        "responses": { "200": { "description": "OK" }, "401": { "description": "Missing Header" }, "403": { "description": "Forbidden" }, "422": { "description": "Invalid CIDR / Self-Lockout" } }
      }
    },
    "/api/smetaiq/partner/{slug}/sla_uptime_cert.pdf": {
      "get": {
        "summary": "22nd PDF: White-Label Quarterly SLA & Uptime Certificate A4 PDF (auth before cache, live p95/DR/TLS telemetry with explicit missing-data handling, zero secrets/hashes)",
        "security": [{ "PartnerKeyHeader": [] }],
        "responses": { "200": { "description": "application/pdf" }, "401": { "description": "Missing Header" }, "403": { "description": "Forbidden" } }
      }
    },
    "/api/smetaiq/partner/{slug}/quota-policy": {
      "get": {
        "summary": "Master-only read of Partner Quota Alert Thresholds (50 <= warn < crit <= 99) & private billing preferences (zero secrets)",
        "security": [{ "PartnerKeyHeader": [] }],
        "responses": { "200": { "description": "OK" }, "401": { "description": "Missing Header" }, "403": { "description": "Forbidden" } }
      },
      "put": {
        "summary": "Master-only update of Partner Quota Alert Thresholds (50 <= warn < crit <= 99) & private billing contact (excluded from audit log & public endpoints)",
        "security": [{ "PartnerKeyHeader": [] }],
        "responses": { "200": { "description": "OK" }, "401": { "description": "Missing Header" }, "403": { "description": "Forbidden" }, "422": { "description": "Invalid Threshold Bounds" } }
      }
    },
    "/api/smetaiq/partner/{slug}/webhook_sla_report.pdf": {
      "get": {
        "summary": "23rd PDF: White-Label Partner Webhook Delivery SLA, DLQ & Retry Report A4 PDF (auth before cache, real DB delivery/DLQ/unknown aggregates, zero secrets/hashes/contacts)",
        "security": [{ "PartnerKeyHeader": [] }],
        "responses": { "200": { "description": "application/pdf" }, "401": { "description": "Missing Header" }, "403": { "description": "Forbidden" } }
      }
    },
    "/api/smetaiq/partner/{slug}/routing-rules": {
      "get": {
        "summary": "Master-only read of Partner Lead Geo-Routing Rules (target_districts SPb/LO + min_quote_rub >= 0)",
        "security": [{ "PartnerKeyHeader": [] }],
        "responses": { "200": { "description": "OK" }, "401": { "description": "Missing Header" }, "403": { "description": "Forbidden" } }
      },
      "put": {
        "summary": "Master-only update of Partner Lead Geo-Routing Rules (target_districts <= 36 + min_quote_rub >= 0, secret-free audit)",
        "security": [{ "PartnerKeyHeader": [] }],
        "responses": { "200": { "description": "OK" }, "401": { "description": "Missing Header" }, "403": { "description": "Forbidden" }, "422": { "description": "Validation Error" } }
      }
    },
    "/api/smetaiq/partner/{slug}/district_conversion_report.pdf": {
      "get": {
        "summary": "24th PDF: White-Label Partner District Lead Conversion & Geo-Routing Report A4 PDF (auth before cache, real DB district aggregates + conversion denominator, zero secrets/PII)",
        "security": [{ "PartnerKeyHeader": [] }],
        "responses": { "200": { "description": "application/pdf" }, "401": { "description": "Missing Header" }, "403": { "description": "Forbidden" } }
      }
    },
    "/api/smetaiq/partner/{slug}/digest-schedule": {
      "get": {
        "summary": "Master-only read of Partner Weekly B2B Digest Schedule (digest_enabled, weekday 0..6, hour_utc 0..23)",
        "security": [{ "PartnerKeyHeader": [] }],
        "responses": { "200": { "description": "OK" }, "401": { "description": "Missing Header" }, "403": { "description": "Forbidden" } }
      },
      "put": {
        "summary": "Master-only update of Partner Weekly B2B Digest Schedule (strict bounds 0..6 & 0..23, secret-free audit)",
        "security": [{ "PartnerKeyHeader": [] }],
        "responses": { "200": { "description": "OK" }, "401": { "description": "Missing Header" }, "403": { "description": "Forbidden" }, "422": { "description": "Invalid Schedule Bounds" } }
      }
    },
    "/api/smetaiq/partner/{slug}/executive_scorecard.pdf": {
      "get": {
        "summary": "25th Jubilee PDF: White-Label Executive Partner Scorecard A4 PDF (unified quotas, fail-closed CIDR, routing, webhook SLA, conversion denominator & digest schedule; auth before cache, zero secrets/PII)",
        "security": [{ "PartnerKeyHeader": [] }],
        "responses": { "200": { "description": "application/pdf" }, "401": { "description": "Missing Header" }, "403": { "description": "Forbidden" } }
      }
    },
    "/api/smetaiq/partner/{slug}/digest-runs": {
      "get": {
        "summary": "Master-only history of Weekly Digest Runner executions (idempotent per ISO week, zero secrets/PII)",
        "security": [{ "PartnerKeyHeader": [] }],
        "responses": { "200": { "description": "OK" }, "401": { "description": "Missing Header" }, "403": { "description": "Forbidden" } }
      }
    },
    "/api/smetaiq/partner/{slug}/digest-runs/dry-run": {
      "post": {
        "summary": "Master-only dry-run preview of Weekly Digest payload & ISO-week anti-duplicate check (no external HTTP calls, zero secrets/PII)",
        "security": [{ "PartnerKeyHeader": [] }],
        "responses": { "200": { "description": "OK" }, "401": { "description": "Missing Header" }, "403": { "description": "Forbidden" } }
      }
    },
    "/api/smetaiq/partner/{slug}/quarterly_board_pack.pdf": {
      "get": {
        "summary": "26th PDF: White-Label Quarterly B2B Board Pack A4 PDF (executive quarterly KPIs, conversion & digest delivery ratios with explicit denominators, zero secrets/PII, auth before cache)",
        "security": [{ "PartnerKeyHeader": [] }],
        "responses": { "200": { "description": "application/pdf" }, "401": { "description": "Missing Header" }, "403": { "description": "Forbidden" } }
      }
    },
    "/api/smetaiq/partner/{slug}/sla-targets": {
      "get": {
        "summary": "Master-only read of Partner SLA Targets (min_webhook_sla_pct 80..100, alert_window_hours 1..168)",
        "security": [{ "PartnerKeyHeader": [] }],
        "responses": { "200": { "description": "OK" }, "401": { "description": "Missing Header" }, "403": { "description": "Forbidden" } }
      },
      "put": {
        "summary": "Master-only update of Partner SLA Targets (strict bounds 80..100 & 1..168, secret-free audit log)",
        "security": [{ "PartnerKeyHeader": [] }],
        "responses": { "200": { "description": "OK" }, "401": { "description": "Missing Header" }, "403": { "description": "Forbidden" }, "422": { "description": "Validation Error" } }
      }
    },
    "/api/smetaiq/partner/{slug}/incident-summary": {
      "get": {
        "summary": "Master-only unified SLA Incident Summary (real DB webhook failures, DLQ, unknown/failed digest runs & target vs actual ratio, zero secrets/PII)",
        "security": [{ "PartnerKeyHeader": [] }],
        "responses": { "200": { "description": "OK" }, "401": { "description": "Missing Header" }, "403": { "description": "Forbidden" } }
      }
    },
    "/api/smetaiq/partner/{slug}/risk_governance_audit.pdf": {
      "get": {
        "summary": "27th PDF: White-Label Partner Risk & Governance Audit A4 PDF (SLA targets vs actual, fail-closed CIDR, SSRF guard & digest idempotency posture, zero secrets/PII, auth before cache)",
        "security": [{ "PartnerKeyHeader": [] }],
        "responses": { "200": { "description": "application/pdf" }, "401": { "description": "Missing Header" }, "403": { "description": "Forbidden" } }
      }
    },
    "/api/smetaiq/partner/{slug}/quiet-hours": {
      "get": {
        "summary": "Master-only read of Partner Notification Quiet Hours UTC (quiet_hours_enabled, start_utc 0..23, end_utc 0..23)",
        "security": [{ "PartnerKeyHeader": [] }],
        "responses": { "200": { "description": "OK" }, "401": { "description": "Missing Header" }, "403": { "description": "Forbidden" } }
      },
      "put": {
        "summary": "Master-only update of Partner Notification Quiet Hours UTC (0..23 bounds, secret-free audit log)",
        "security": [{ "PartnerKeyHeader": [] }],
        "responses": { "200": { "description": "OK" }, "401": { "description": "Missing Header" }, "403": { "description": "Forbidden" }, "422": { "description": "Validation Error" } }
      }
    },
    "/api/smetaiq/partner/{slug}/digest-runs/{run_id}/ack-unknown": {
      "post": {
        "summary": "Master-only controlled resolution of an 'unknown' weekly digest run -> 'acknowledged_failed' (with secret-free audit log, freeing ISO week for clean re-arm)",
        "security": [{ "PartnerKeyHeader": [] }],
        "responses": { "200": { "description": "OK" }, "401": { "description": "Missing Header" }, "403": { "description": "Forbidden" }, "404": { "description": "Run Not Found" } }
      }
    },
    "/api/smetaiq/partner/{slug}/operations_cert.pdf": {
      "get": {
        "summary": "28th PDF: White-Label Partner Enterprise Operations Certificate A4 PDF (quiet hours, IP-pinned TLS transport, digest ack posture & SLA ratios; auth before cache, zero secrets/PII)",
        "security": [{ "PartnerKeyHeader": [] }],
        "responses": { "200": { "description": "application/pdf" }, "401": { "description": "Missing Header" }, "403": { "description": "Forbidden" } }
      }
    },
    "/api/smetaiq/partner/{slug}/maintenance-window": {
      "get": {
        "summary": "Master-only read of Partner Maintenance Window (maintenance_enabled, maintenance_until_utc, maintenance_reason)",
        "security": [{ "PartnerKeyHeader": [] }],
        "responses": { "200": { "description": "OK" }, "401": { "description": "Missing Header" }, "403": { "description": "Forbidden" } }
      },
      "put": {
        "summary": "Master-only update of Partner Maintenance Window (valid ISO UTC & reason <= 160 chars, secret-free audit log; defers digests during window)",
        "security": [{ "PartnerKeyHeader": [] }],
        "responses": { "200": { "description": "OK" }, "401": { "description": "Missing Header" }, "403": { "description": "Forbidden" }, "422": { "description": "Validation Error" } }
      }
    },
    "/api/smetaiq/partner/{slug}/maintenance_cert.pdf": {
      "get": {
        "summary": "29th PDF: White-Label Partner Maintenance & Operational Readiness Certificate A4 PDF (maintenance windows, quiet-hours catch-up & idempotency posture; auth before cache, zero secrets/PII)",
        "security": [{ "PartnerKeyHeader": [] }],
        "responses": { "200": { "description": "application/pdf" }, "401": { "description": "Missing Header" }, "403": { "description": "Forbidden" } }
      }
    }
  }
}
