{"openapi":"3.1.0","info":{"title":"Tinvex Backoffice BFF","version":"0.0.0","description":"surface-specific composition for Backoffice; no critical domain ownership."},"components":{"schemas":{"ErrorResponse":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"correlationId":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","correlationId"]}},"required":["error"]},"HealthResponse":{"type":"object","properties":{"status":{"type":"string","enum":["ok","degraded","down"]},"service":{"type":"string"},"version":{"type":"string"},"timestamp":{"type":"string","format":"date-time"}},"required":["status","service","version","timestamp"]}},"parameters":{}},"paths":{"/users/search":{"post":{"tags":["backoffice"],"description":"Original human cookie token forwarded; trusted browser origin required. Owner reauthorizes and audits. No-store; personal detail and Didit require manager and fresh MFA.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"search":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["uuid"]},"value":{"type":"string","format":"uuid"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["email"]},"value":{"type":"string","maxLength":254,"format":"email"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["nickname"]},"value":{"type":"string","pattern":"^[A-Za-z0-9_]{3,20}$"}},"required":["kind","value"],"additionalProperties":false}]},"afterId":{"type":"string","format":"uuid"},"hideAnonymous":{"type":"boolean"},"kycStatus":{"type":"string","enum":["not_started","in_progress","awaiting_user","in_review","approved","declined","resubmitted","expired","kyc_expired","abandoned","manually_approved"]}},"additionalProperties":false}}}},"responses":{"200":{"description":"Owner-projected read","content":{"application/json":{"schema":{"type":"object","properties":{"users":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","format":"uuid"},"kycVerified":{"type":"boolean"},"relationships":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["available"]},"followedIssuers":{"type":"integer","minimum":0,"maximum":9007199254740991},"issuerSubscriptions":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["status","followedIssuers","issuerSubscriptions"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["unavailable"]}},"required":["status"],"additionalProperties":false}]}},"required":["userId","kycVerified","relationships"],"additionalProperties":false},"maxItems":50},"nextCursor":{"type":["string","null"],"format":"uuid"}},"required":["users","nextCursor"],"additionalProperties":false}}}},"400":{"description":"Invalid consultation"},"401":{"description":"Session or recent MFA required"},"403":{"description":"Origin or role denied"},"404":{"description":"Record unavailable"},"429":{"description":"Rate limited"},"503":{"description":"Dependency unavailable"}}}},"/users/inspection":{"post":{"tags":["backoffice"],"description":"Original human cookie token forwarded; trusted browser origin required. Owner reauthorizes and audits. No-store; personal detail and Didit require manager and fresh MFA.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","format":"uuid"},"dataset":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$"},"cursor":{"type":"string","minLength":1,"maxLength":1024},"source":{"type":"string","enum":["identity","community","xp","benefits","notifications","ai-channel","membership","content","media","sharing","flash-actions","campaigns","analytics"]}},"required":["userId","source"],"additionalProperties":false}}}},"responses":{"200":{"description":"Owner-projected read","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"datasets":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"}},"required":["key","label"],"additionalProperties":false},"maxItems":100}},"required":["datasets"],"additionalProperties":false},{"type":"object","properties":{"records":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"fields":{"type":"object","additionalProperties":{"anyOf":[{"type":"string","maxLength":131072},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"required":["id","fields"],"additionalProperties":false},"maxItems":50},"nextCursor":{"type":["string","null"],"maxLength":1024}},"required":["records","nextCursor"],"additionalProperties":false}]}}}},"400":{"description":"Invalid consultation"},"401":{"description":"Session or recent MFA required"},"403":{"description":"Origin or role denied"},"404":{"description":"Record unavailable"},"429":{"description":"Rate limited"},"503":{"description":"Dependency unavailable"}}}},"/users/didit":{"post":{"tags":["backoffice"],"description":"Original human cookie token forwarded; trusted browser origin required. Owner reauthorizes and audits. No-store; personal detail and Didit require manager and fresh MFA.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","format":"uuid"},"verificationId":{"type":"string","format":"uuid"}},"required":["userId","verificationId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Owner-projected read","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"createdAt":{"type":["string","null"]},"updatedAt":{"type":["string","null"]},"documents":{"type":"array","items":{"type":"object","properties":{"position":{"type":"integer"},"fields":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"null"}]}},"front":{"type":"boolean"},"back":{"type":"boolean"}},"required":["position","fields","front","back"],"additionalProperties":false},"maxItems":10},"selfies":{"type":"array","items":{"type":"object","properties":{"position":{"type":"integer"},"available":{"type":"boolean"},"status":{"type":["string","null"]}},"required":["position","available","status"],"additionalProperties":false},"maxItems":10}},"required":["status","createdAt","updatedAt","documents","selfies"],"additionalProperties":false}}}},"400":{"description":"Invalid consultation"},"401":{"description":"Session or recent MFA required"},"403":{"description":"Origin or role denied"},"404":{"description":"Record unavailable"},"429":{"description":"Rate limited"},"503":{"description":"Dependency unavailable"}}}},"/users/didit/media":{"post":{"tags":["backoffice"],"description":"Original human cookie token forwarded; trusted browser origin required. Owner reauthorizes and audits. No-store; personal detail and Didit require manager and fresh MFA.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","format":"uuid"},"verificationId":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["document-front","document-back","selfie"]},"position":{"type":"integer","minimum":0,"maximum":9}},"required":["userId","verificationId","kind","position"],"additionalProperties":false}}}},"responses":{"200":{"description":"Owner-projected read","content":{"application/json":{"schema":{"type":"object","properties":{"contentType":{"type":"string","enum":["image/jpeg","image/png","image/webp"]},"base64":{"type":"string","maxLength":12582912,"pattern":"^[A-Za-z0-9+/]+={0,2}$"}},"required":["contentType","base64"],"additionalProperties":false}}}},"400":{"description":"Invalid consultation"},"401":{"description":"Session or recent MFA required"},"403":{"description":"Origin or role denied"},"404":{"description":"Record unavailable"},"429":{"description":"Rate limited"},"503":{"description":"Dependency unavailable"}}}},"/product-analytics/history":{"get":{"description":"Owner-authorized aggregate read. Original Backoffice cookie token forwarded unchanged; unavailable data is not zero.","parameters":[{"schema":{"type":"integer","minimum":7,"maximum":90},"required":false,"name":"historyDays","in":"query"},{"schema":{"type":"string","format":"date"},"required":false,"name":"fromDay","in":"query"},{"schema":{"type":"string","format":"date"},"required":false,"name":"toDay","in":"query"}],"responses":{"200":{"description":"Owner aggregate","content":{"application/json":{"schema":{"type":"object","properties":{"scope":{"type":"string","enum":["global"]},"mode":{"type":"string","enum":["captured_history"]},"asOf":{"type":"string","format":"date-time"},"capturedAt":{"type":["string","null"],"format":"date-time"},"firstFullDay":{"type":["string","null"],"format":"date"},"range":{"type":"object","properties":{"fromDay":{"type":"string","format":"date"},"toDay":{"type":"string","format":"date"}},"required":["fromDay","toDay"]},"population":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","format":"date"},"computedAt":{"type":"string","format":"date-time"},"total":{"type":["integer","null"],"minimum":0,"maximum":9007199254740991},"registered":{"type":["integer","null"],"minimum":0,"maximum":9007199254740991},"guests":{"type":["integer","null"],"minimum":0,"maximum":9007199254740991},"unknownStatus":{"type":"integer","minimum":0,"maximum":9007199254740991},"unknownExistence":{"type":"integer","minimum":0,"maximum":9007199254740991},"coverage":{"type":"string","enum":["complete","partial"]}},"required":["day","computedAt","total","registered","guests","unknownStatus","unknownExistence","coverage"]},"maxItems":91},"cohorts":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","format":"date"},"observedAt":{"type":"string","format":"date-time"},"started":{"type":"integer","minimum":0,"maximum":9007199254740991},"converted7":{"type":["integer","null"],"minimum":0,"maximum":9007199254740991},"converted30":{"type":["integer","null"],"minimum":0,"maximum":9007199254740991},"unknownRegistrationTimes":{"type":"integer","minimum":0,"maximum":9007199254740991},"mature7":{"type":"boolean"},"mature30":{"type":"boolean"}},"required":["day","observedAt","started","converted7","converted30","unknownRegistrationTimes","mature7","mature30"]},"maxItems":91},"state":{"type":"string","enum":["not_started","capturing"]}},"required":["scope","mode","asOf","capturedAt","firstFullDay","range","population","cohorts","state"]}}}},"400":{"description":"Unsupported filter"},"401":{"description":"Session required"},"403":{"description":"Live authorization denied"},"503":{"description":"Dependency unavailable"}}}},"/product-analytics/population":{"get":{"description":"Owner-authorized aggregate read. Original Backoffice cookie token forwarded unchanged; unavailable data is not zero.","parameters":[{"schema":{"type":"integer","minimum":7,"maximum":90},"required":false,"name":"historyDays","in":"query"},{"schema":{"type":"string","format":"date"},"required":false,"name":"fromDay","in":"query"},{"schema":{"type":"string","format":"date"},"required":false,"name":"toDay","in":"query"}],"responses":{"200":{"description":"Owner aggregate","content":{"application/json":{"schema":{"type":"object","properties":{"observations":{"type":"object","properties":{"mode":{"type":"string","enum":["observed_daily_samples"]},"range":{"type":"object","properties":{"fromDay":{"type":"string","format":"date"},"toDay":{"type":"string","format":"date"}},"required":["fromDay","toDay"]},"points":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","format":"date"},"observedAt":{"type":["string","null"],"format":"date-time"},"provisional":{"type":"boolean"},"values":{"type":["object","null"],"additionalProperties":{"type":["integer","null"],"minimum":0,"maximum":9007199254740991}}},"required":["day","observedAt","provisional","values"]},"maxItems":91}},"required":["mode","range","points"]},"asOf":{"type":"string","format":"date-time"},"mode":{"type":"string","enum":["current_state"]},"scope":{"type":"string","enum":["global"]},"population":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"registered":{"type":"integer","minimum":0,"maximum":9007199254740991},"guests":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","registered","guests"]},"email":{"type":"object","properties":{"denominator":{"type":"integer","minimum":0,"maximum":9007199254740991},"verified":{"type":"integer","minimum":0,"maximum":9007199254740991},"unverified":{"type":"integer","minimum":0,"maximum":9007199254740991},"missing":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["denominator","verified","unverified","missing"]},"kyc":{"type":"object","properties":{"denominator":{"type":"integer","minimum":0,"maximum":9007199254740991},"notStarted":{"type":"integer","minimum":0,"maximum":9007199254740991},"pending":{"type":"integer","minimum":0,"maximum":9007199254740991},"inReview":{"type":"integer","minimum":0,"maximum":9007199254740991},"approved":{"type":"integer","minimum":0,"maximum":9007199254740991},"rejected":{"type":"integer","minimum":0,"maximum":9007199254740991},"expired":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["denominator","notStarted","pending","inReview","approved","rejected","expired"]},"registrationTimestampCoverage":{"type":"object","properties":{"known":{"type":"integer","minimum":0,"maximum":9007199254740991},"unknown":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["known","unknown"]}},"required":["asOf","mode","scope","population","email","kyc","registrationTimestampCoverage"]}}}},"400":{"description":"Unsupported filter"},"401":{"description":"Session required"},"403":{"description":"Live authorization denied"},"503":{"description":"Dependency unavailable"}}}},"/product-analytics/permissions":{"get":{"description":"Owner-authorized aggregate read. Original Backoffice cookie token forwarded unchanged; unavailable data is not zero.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":false,"name":"issuerId","in":"query"},{"schema":{"type":"string","enum":["all_followers","following_only","subscribers"]},"required":false,"name":"relationship","in":"query"}],"responses":{"200":{"description":"Owner aggregate","content":{"application/json":{"schema":{"type":"object","properties":{"scope":{"type":"string","enum":["global","issuer"]},"issuerId":{"type":"string","format":"uuid"},"relationship":{"type":"string","enum":["all_followers","following_only","subscribers"]},"audienceProjection":{"type":"object","properties":{"mode":{"type":"string","enum":["last_known"]},"lastFullSweepAt":{"type":"string","format":"date-time"},"unresolvedUsers":{"type":"integer","minimum":0,"maximum":9007199254740991},"deactivatedUsers":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["mode","lastFullSweepAt","unresolvedUsers","deactivatedUsers"]},"mode":{"type":"string","enum":["last_reported"]},"asOf":{"type":"string","format":"date-time"},"population":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"registered":{"type":"integer","minimum":0,"maximum":9007199254740991},"guests":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","registered","guests"]},"permission":{"type":"object","properties":{"usersWithGrantedDevice":{"type":"integer","minimum":0,"maximum":9007199254740991},"usersWithDeniedDevice":{"type":"integer","minimum":0,"maximum":9007199254740991},"usersWithUnsupportedDevice":{"type":"integer","minimum":0,"maximum":9007199254740991},"usersWithoutKnownPermission":{"type":"integer","minimum":0,"maximum":9007199254740991},"neverReportedUsers":{"type":"integer","minimum":0,"maximum":9007199254740991},"oldestCheckAt":{"type":["string","null"],"format":"date-time"},"newestCheckAt":{"type":["string","null"],"format":"date-time"},"latestReceiptAt":{"type":["string","null"],"format":"date-time"}},"required":["usersWithGrantedDevice","usersWithDeniedDevice","usersWithUnsupportedDevice","usersWithoutKnownPermission","neverReportedUsers","oldestCheckAt","newestCheckAt","latestReceiptAt"]},"usersWithActiveTokenAssociation":{"type":"integer","minimum":0,"maximum":9007199254740991},"preferenceEligibility":{"type":"string","enum":["not_available"]},"deliveryReach":{"type":"string","enum":["not_available"]}},"required":["scope","mode","asOf","population","permission","usersWithActiveTokenAssociation","preferenceEligibility","deliveryReach"]}}}},"400":{"description":"Unsupported filter"},"401":{"description":"Session required"},"403":{"description":"Live authorization denied"},"503":{"description":"Dependency unavailable"}}}},"/product-analytics/memberships":{"get":{"description":"Owner-authorized aggregate read. Original Backoffice cookie token forwarded unchanged; unavailable data is not zero.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":false,"name":"issuerId","in":"query"},{"schema":{"type":"integer","minimum":7,"maximum":90},"required":false,"name":"historyDays","in":"query"},{"schema":{"type":"string","format":"date"},"required":false,"name":"fromDay","in":"query"},{"schema":{"type":"string","format":"date"},"required":false,"name":"toDay","in":"query"}],"responses":{"200":{"description":"Owner aggregate","content":{"application/json":{"schema":{"type":"object","properties":{"observations":{"type":"object","properties":{"mode":{"type":"string","enum":["observed_daily_samples"]},"range":{"type":"object","properties":{"fromDay":{"type":"string","format":"date"},"toDay":{"type":"string","format":"date"}},"required":["fromDay","toDay"]},"points":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","format":"date"},"observedAt":{"type":["string","null"],"format":"date-time"},"provisional":{"type":"boolean"},"values":{"type":["object","null"],"additionalProperties":{"type":["integer","null"],"minimum":0,"maximum":9007199254740991}}},"required":["day","observedAt","provisional","values"]},"maxItems":91}},"required":["mode","range","points"]},"asOf":{"type":"string","format":"date-time"},"mode":{"type":"string","enum":["current_state"]},"issuerId":{"type":["string","null"],"format":"uuid"},"scope":{"type":"string","enum":["global","issuer"]},"populationScope":{"type":"string","enum":["membership_links"]},"usersWithLinkedNonRevokedPasses":{"type":"integer","minimum":0,"maximum":9007199254740991},"linkedNonRevokedPasses":{"type":"integer","minimum":0,"maximum":9007199254740991},"unassignedNonRevokedPasses":{"type":"integer","minimum":0,"maximum":9007199254740991},"nonRevokedPasses":{"type":"integer","minimum":0,"maximum":9007199254740991},"currentAccountIntersection":{"type":"object","properties":{"mode":{"type":"string","enum":["last_known"]},"registeredUsers":{"type":"integer","minimum":0,"maximum":9007199254740991},"guestUsers":{"type":"integer","minimum":0,"maximum":9007199254740991},"deactivatedUsers":{"type":"integer","minimum":0,"maximum":9007199254740991},"unresolvedUsers":{"type":"integer","minimum":0,"maximum":9007199254740991},"registeredPasses":{"type":"integer","minimum":0,"maximum":9007199254740991},"oldestObservationAt":{"type":["string","null"],"format":"date-time"},"newestObservationAt":{"type":["string","null"],"format":"date-time"}},"required":["mode","registeredUsers","guestUsers","deactivatedUsers","unresolvedUsers","registeredPasses","oldestObservationAt","newestObservationAt"]}},"required":["asOf","mode","issuerId","scope","populationScope","usersWithLinkedNonRevokedPasses","linkedNonRevokedPasses","unassignedNonRevokedPasses","nonRevokedPasses"]}}}},"400":{"description":"Unsupported filter"},"401":{"description":"Session required"},"403":{"description":"Live authorization denied"},"503":{"description":"Dependency unavailable"}}}},"/product-analytics/audience":{"get":{"description":"Owner-authorized aggregate read. Original Backoffice cookie token forwarded unchanged; unavailable data is not zero.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":false,"name":"issuerId","in":"query"},{"schema":{"type":"integer","minimum":7,"maximum":90},"required":false,"name":"historyDays","in":"query"},{"schema":{"type":"string","format":"date"},"required":false,"name":"fromDay","in":"query"},{"schema":{"type":"string","format":"date"},"required":false,"name":"toDay","in":"query"}],"responses":{"200":{"description":"Owner aggregate","content":{"application/json":{"schema":{"type":"object","properties":{"observations":{"type":"object","properties":{"mode":{"type":"string","enum":["observed_daily_samples"]},"range":{"type":"object","properties":{"fromDay":{"type":"string","format":"date"},"toDay":{"type":"string","format":"date"}},"required":["fromDay","toDay"]},"points":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","format":"date"},"observedAt":{"type":["string","null"],"format":"date-time"},"provisional":{"type":"boolean"},"values":{"type":["object","null"],"additionalProperties":{"type":["integer","null"],"minimum":0,"maximum":9007199254740991}}},"required":["day","observedAt","provisional","values"]},"maxItems":91}},"required":["mode","range","points"]},"asOf":{"type":"string","format":"date-time"},"mode":{"type":"string","enum":["current_state"]},"issuerId":{"type":["string","null"],"format":"uuid"},"scope":{"type":"string","enum":["global","issuer"]},"populationBreakdown":{"type":"string","enum":["not_available"]},"projectedPopulation":{"type":"object","properties":{"mode":{"type":"string","enum":["last_known"]},"followers":{"type":"object","properties":{"registered":{"type":"integer","minimum":0,"maximum":9007199254740991},"guests":{"type":"integer","minimum":0,"maximum":9007199254740991},"unknown":{"type":"integer","minimum":0,"maximum":9007199254740991},"deactivated":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["registered","guests","unknown","deactivated"]},"subscribers":{"type":"object","properties":{"registered":{"type":"integer","minimum":0,"maximum":9007199254740991},"guests":{"type":"integer","minimum":0,"maximum":9007199254740991},"unknown":{"type":"integer","minimum":0,"maximum":9007199254740991},"deactivated":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["registered","guests","unknown","deactivated"]},"oldestObservationAt":{"type":["string","null"],"format":"date-time"},"newestObservationAt":{"type":["string","null"],"format":"date-time"},"lastSweepCompletedAt":{"type":["string","null"],"format":"date-time"}},"required":["mode","followers","subscribers","oldestObservationAt","newestObservationAt","lastSweepCompletedAt"]},"followers":{"type":"integer","minimum":0,"maximum":9007199254740991},"subscribers":{"type":"integer","minimum":0,"maximum":9007199254740991},"relationships":{"type":"integer","minimum":0,"maximum":9007199254740991},"followingOnlyRelationships":{"type":"integer","minimum":0,"maximum":9007199254740991},"subscribedRelationships":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["asOf","mode","issuerId","scope","populationBreakdown","followers","subscribers","relationships","followingOnlyRelationships","subscribedRelationships"]}}}},"400":{"description":"Unsupported filter"},"401":{"description":"Session required"},"403":{"description":"Live authorization denied"},"503":{"description":"Dependency unavailable"}}}},"/product-analytics/reach":{"get":{"description":"Owner-authorized aggregate read. Original Backoffice cookie token forwarded unchanged; unavailable data is not zero.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":false,"name":"issuerId","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z0-9_.-]+$"},"required":false,"name":"category","in":"query"},{"schema":{"type":"string","enum":["followers","subscribers"]},"required":false,"name":"relationship","in":"query"}],"responses":{"200":{"description":"Owner aggregate","content":{"application/json":{"schema":{"type":"object","properties":{"issuerId":{"type":["string","null"],"format":"uuid"},"scope":{"type":"string","enum":["global","issuer"]},"mode":{"type":"string","enum":["cache_based_estimate"]},"asOf":{"type":"string","format":"date-time"},"category":{"type":["string","null"]},"relationship":{"type":"string","enum":["followers","subscribers"]},"populationScope":{"type":"string","enum":["notifications_issuer_audience_cache"]},"combination":{"type":"string","enum":["any_selected_issuer_category"]},"selectedCategories":{"type":"integer","minimum":0,"maximum":9007199254740991},"categoryOptions":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":100},"description":{"type":["string","null"]}},"required":["key","description"]},"maxItems":500},"categoryOptionsTruncated":{"type":"boolean"},"audienceUsers":{"type":"integer","minimum":0,"maximum":9007199254740991},"usersWithActiveToken":{"type":"integer","minimum":0,"maximum":9007199254740991},"usersAllowedByPreferences":{"type":"integer","minimum":0,"maximum":9007199254740991},"estimatedReachableUsers":{"type":"integer","minimum":0,"maximum":9007199254740991},"usersBlockedByPreferences":{"type":"integer","minimum":0,"maximum":9007199254740991},"usersWithoutCategoryContext":{"type":"integer","minimum":0,"maximum":9007199254740991},"usersAllowedWithoutActiveToken":{"type":"integer","minimum":0,"maximum":9007199254740991},"permissionObservation":{"type":"string","enum":["not_joined"]},"audienceCache":{"type":"object","properties":{"oldestRowUpdatedAt":{"type":["string","null"],"format":"date-time"},"newestRowUpdatedAt":{"type":["string","null"],"format":"date-time"}},"required":["oldestRowUpdatedAt","newestRowUpdatedAt"]},"excludedSendTimeChecks":{"type":"array","prefixItems":[{"type":"string","enum":["os_permission"]},{"type":"string","enum":["live_device_association"]},{"type":"string","enum":["current_content_access"]},{"type":"string","enum":["pressure"]},{"type":"string","enum":["quiet_hours"]},{"type":"string","enum":["provider_delivery"]}]}},"required":["issuerId","scope","mode","asOf","category","relationship","populationScope","combination","selectedCategories","audienceUsers","usersWithActiveToken","usersAllowedByPreferences","estimatedReachableUsers","usersBlockedByPreferences","usersWithoutCategoryContext","usersAllowedWithoutActiveToken","permissionObservation","audienceCache","excludedSendTimeChecks"]}}}},"400":{"description":"Unsupported filter"},"401":{"description":"Session required"},"403":{"description":"Live authorization denied"},"503":{"description":"Dependency unavailable"}}}},"/product-analytics/activity":{"get":{"description":"Owner-authorized aggregate read. Original Backoffice cookie token forwarded unchanged; unavailable data is not zero.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":false,"name":"issuerId","in":"query"},{"schema":{"type":"string","enum":["24h","7d","30d"]},"required":false,"name":"windowType","in":"query"},{"schema":{"type":"string","enum":["all","registered","guests"]},"required":false,"name":"population","in":"query"},{"schema":{"type":"string","enum":["within_issuer","issuer_audience_anywhere"]},"required":false,"name":"activityScope","in":"query"},{"schema":{"type":"string","enum":["all_followers","following_only","subscribers"]},"required":false,"name":"audienceRelationship","in":"query"},{"schema":{"type":"integer","minimum":7,"maximum":90},"required":false,"name":"historyDays","in":"query"},{"schema":{"type":"string","format":"date"},"required":false,"name":"fromDay","in":"query"},{"schema":{"type":"string","format":"date"},"required":false,"name":"toDay","in":"query"}],"responses":{"200":{"description":"Owner aggregate","content":{"application/json":{"schema":{"type":"object","properties":{"observations":{"type":"object","properties":{"mode":{"type":"string","enum":["observed_daily_samples"]},"range":{"type":"object","properties":{"fromDay":{"type":"string","format":"date"},"toDay":{"type":"string","format":"date"}},"required":["fromDay","toDay"]},"points":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","format":"date"},"observedAt":{"type":["string","null"],"format":"date-time"},"provisional":{"type":"boolean"},"values":{"type":["object","null"],"additionalProperties":{"type":["integer","null"],"minimum":0,"maximum":9007199254740991}}},"required":["day","observedAt","provisional","values"]},"maxItems":91}},"required":["mode","range","points"]},"windowType":{"type":"string","enum":["24h","7d","30d"]},"issuerId":{"type":["string","null"],"format":"uuid"},"activityScope":{"type":"string","enum":["global","within_issuer","issuer_audience_anywhere"]},"audienceProjection":{"type":"object","properties":{"mode":{"type":"string","enum":["last_known"]},"coverage":{"type":"string","enum":["initializing","last_known"]},"lastFullSweepAt":{"type":["string","null"],"format":"date-time"}},"required":["mode","coverage","lastFullSweepAt"]},"populationScope":{"type":"string","enum":["activity_event_fans"]},"population":{"type":"string","enum":["all","registered","guests"]},"populationClassification":{"type":"object","properties":{"mode":{"type":"string","enum":["last_known"]},"current":{"type":["object","null"],"properties":{"registered":{"type":"integer","minimum":0,"maximum":9007199254740991},"guests":{"type":"integer","minimum":0,"maximum":9007199254740991},"unknown":{"type":"integer","minimum":0,"maximum":9007199254740991},"deactivated":{"type":"integer","minimum":0,"maximum":9007199254740991},"oldestObservationAt":{"type":["string","null"],"format":"date-time"},"newestObservationAt":{"type":["string","null"],"format":"date-time"}},"required":["registered","guests","unknown","deactivated","oldestObservationAt","newestObservationAt"]},"preceding":{"type":["object","null"],"properties":{"registered":{"type":"integer","minimum":0,"maximum":9007199254740991},"guests":{"type":"integer","minimum":0,"maximum":9007199254740991},"unknown":{"type":"integer","minimum":0,"maximum":9007199254740991},"deactivated":{"type":"integer","minimum":0,"maximum":9007199254740991},"oldestObservationAt":{"type":["string","null"],"format":"date-time"},"newestObservationAt":{"type":["string","null"],"format":"date-time"}},"required":["registered","guests","unknown","deactivated","oldestObservationAt","newestObservationAt"]}},"required":["mode","current","preceding"]},"populationBreakdown":{"type":"string","enum":["not_available"]},"missingActivitySources":{"type":"array","items":{"type":"string","enum":["platform_ai"]},"maxItems":1},"asOf":{"type":"string","format":"date-time"},"windowStart":{"type":"string","format":"date-time"},"coverageStartedAt":{"type":["string","null"],"format":"date-time"},"currentCoverage":{"type":"string","enum":["complete","incomplete","unavailable"]},"precedingCoverage":{"type":"string","enum":["complete","incomplete","unavailable"]},"current":{"type":["integer","null"],"minimum":0,"maximum":9007199254740991},"preceding":{"type":["integer","null"],"minimum":0,"maximum":9007199254740991},"history":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","format":"date"},"distinctFanCount":{"type":["integer","null"],"minimum":0,"maximum":9007199254740991},"coverage":{"type":"string","enum":["complete","incomplete","unavailable"]}},"required":["day","distinctFanCount","coverage"]},"maxItems":91}},"required":["windowType","issuerId","activityScope","populationScope","populationBreakdown","missingActivitySources","asOf","windowStart","coverageStartedAt","currentCoverage","precedingCoverage","current","preceding","history"]}}}},"400":{"description":"Unsupported filter"},"401":{"description":"Session required"},"403":{"description":"Live authorization denied"},"503":{"description":"Dependency unavailable"}}}},"/product-analytics/kyc":{"get":{"description":"Owner-authorized aggregate read. Original Backoffice cookie token forwarded unchanged; unavailable data is not zero.","responses":{"200":{"description":"Owner aggregate","content":{"application/json":{"schema":{"type":"object","properties":{"coverageStartedAt":{"type":["string","null"],"format":"date-time"},"asOf":{"type":"string","format":"date-time"},"speed":{"type":"object","properties":{"startedFans":{"type":"integer","minimum":0,"maximum":9007199254740991},"registrationTimestampCoverage":{"type":"object","properties":{"withTimestamp":{"type":"integer","minimum":0,"maximum":9007199254740991},"total":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["withTimestamp","total"]},"medianSecondsRegistrationToStart":{"type":["number","null"],"minimum":0},"medianSecondsStartToDecision":{"type":["number","null"],"minimum":0},"decidedAttempts":{"type":"integer","minimum":0,"maximum":9007199254740991},"registrationToStartBuckets":{"type":"object","properties":{"sameDay":{"type":"integer","minimum":0,"maximum":9007199254740991},"oneToThreeDays":{"type":"integer","minimum":0,"maximum":9007199254740991},"fourToSevenDays":{"type":"integer","minimum":0,"maximum":9007199254740991},"oneToFourWeeks":{"type":"integer","minimum":0,"maximum":9007199254740991},"overOneMonth":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["sameDay","oneToThreeDays","fourToSevenDays","oneToFourWeeks","overOneMonth"]}},"required":["startedFans","registrationTimestampCoverage","medianSecondsRegistrationToStart","medianSecondsStartToDecision","decidedAttempts","registrationToStartBuckets"]},"quality":{"type":"object","properties":{"finishedFans":{"type":"integer","minimum":0,"maximum":9007199254740991},"approvedFirstAttempt":{"type":"integer","minimum":0,"maximum":9007199254740991},"approvedAfterRepeat":{"type":"integer","minimum":0,"maximum":9007199254740991},"declined":{"type":"integer","minimum":0,"maximum":9007199254740991},"manualReview":{"type":"object","properties":{"openAttempts":{"type":"integer","minimum":0,"maximum":9007199254740991},"resolvedAttempts":{"type":"integer","minimum":0,"maximum":9007199254740991},"medianSecondsToResolution":{"type":["number","null"],"minimum":0}},"required":["openAttempts","resolvedAttempts","medianSecondsToResolution"]}},"required":["finishedFans","approvedFirstAttempt","approvedAfterRepeat","declined","manualReview"]},"recovery":{"type":"object","properties":{"lapsedFans":{"type":"integer","minimum":0,"maximum":9007199254740991},"cameBackApproved":{"type":"integer","minimum":0,"maximum":9007199254740991},"cameBackInProgress":{"type":"integer","minimum":0,"maximum":9007199254740991},"cameBackDeclined":{"type":"integer","minimum":0,"maximum":9007199254740991},"stillLapsed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["lapsedFans","cameBackApproved","cameBackInProgress","cameBackDeclined","stillLapsed"]}},"required":["coverageStartedAt","asOf","speed","quality","recovery"]}}}},"400":{"description":"Unsupported filter"},"401":{"description":"Session required"},"403":{"description":"Live authorization denied"},"503":{"description":"Dependency unavailable"}}}},"/operations/overview":{"get":{"tags":["backoffice"],"description":"Read-only operations overview for any active Backoffice admin. No-store; sections degrade independently and missing data is never zero.","parameters":[{"schema":{"type":"string","enum":["dev","prod"]},"required":false,"name":"environment","in":"query"},{"schema":{"type":"string","enum":["1h","6h","24h","7d"],"default":"1h"},"required":false,"name":"period","in":"query"},{"schema":{"type":"string","enum":["identity","community","content","xp","benefits","ai-channel","notifications","analytics","sharing","media","membership","flash-actions","campaigns","fan-bff","console-bff","backoffice-bff","wallet-bff"]},"required":false,"name":"service","in":"query"}],"responses":{"200":{"description":"Operations overview","content":{"application/json":{"schema":{"type":"object","properties":{"environment":{"type":"string","enum":["dev","prod"]},"period":{"type":"string","enum":["1h","6h","24h","7d"]},"service":{"type":["string","null"],"maxLength":60},"generatedAt":{"type":"string","format":"date-time"},"refreshIntervalSeconds":{"type":"integer","exclusiveMinimum":0},"versions":{"type":"object","properties":{"state":{"type":"string","enum":["ok","no_activity","no_data","not_instrumented","source_unreachable","stale","not_configured"]},"reason":{"type":["string","null"],"maxLength":300},"marker":{"type":"object","properties":{"state":{"type":"string","enum":["available","absent","unavailable","invalid","not_configured"]},"sha":{"type":["string","null"],"pattern":"^[0-9a-f]{40}$"},"previousSha":{"type":["string","null"],"pattern":"^[0-9a-f]{40}$"},"deployedAt":{"type":["string","null"],"format":"date-time"},"reason":{"type":["string","null"],"maxLength":300}},"required":["state","sha","previousSha","deployedAt","reason"]},"services":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":60},"kind":{"type":"string","enum":["service","public_bff"]},"evidence":{"type":"object","properties":{"state":{"type":"string","enum":["ok","source_unreachable","not_configured"]},"reason":{"type":["string","null"],"maxLength":300},"checkedAt":{"type":["string","null"],"format":"date-time"}},"required":["state","reason","checkedAt"]},"observedVersion":{"type":["string","null"],"maxLength":100},"classification":{"type":"string","enum":["matches_marker","differs_from_marker","missing_version","unrecognized_version","unreachable","no_marker"]},"matchesPreviousMarker":{"type":"boolean"},"digest":{"type":"object","properties":{"state":{"type":"string","enum":["not_available"]}},"required":["state"]}},"required":["name","kind","evidence","observedVersion","classification","matchesPreviousMarker","digest"]},"maxItems":20}},"required":["state","reason","marker","services"]},"metrics":{"type":"object","properties":{"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["traffic","errors","latency","cpu","memory","outbox_backlog"]},"title":{"type":"string","maxLength":120},"unit":{"type":["string","null"],"maxLength":80},"state":{"type":"string","enum":["ok","no_activity","no_data","not_instrumented","source_unreachable","stale","not_configured"]},"reason":{"type":["string","null"],"maxLength":300},"source":{"type":"object","properties":{"name":{"type":"string","maxLength":120},"kind":{"type":"string","enum":["cloud_monitoring","none"]}},"required":["name","kind"]},"freshness":{"type":"object","properties":{"observedAt":{"type":["string","null"],"format":"date-time"},"windowSeconds":{"type":["integer","null"],"exclusiveMinimum":0}},"required":["observedAt","windowSeconds"]},"stepSeconds":{"type":"integer","exclusiveMinimum":0},"truncated":{"type":"boolean"},"series":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","maxLength":200},"label":{"type":"string","maxLength":200},"service":{"type":["string","null"],"maxLength":60},"instance":{"type":["string","null"],"maxLength":160},"points":{"type":"array","items":{"type":"object","properties":{"t":{"type":"string","format":"date-time"},"value":{"type":["number","null"]}},"required":["t","value"]},"maxItems":200}},"required":["key","label","points"]},"maxItems":64},"threshold":{"type":["object","null"],"properties":{"text":{"type":"string","maxLength":200},"reference":{"type":"string","maxLength":200}},"required":["text","reference"]}},"required":["id","title","unit","state","reason","source","freshness","stepSeconds","series","threshold"]},"maxItems":8}},"required":["sections"]},"alerts":{"type":"object","properties":{"state":{"type":"string","enum":["ok","no_activity","no_data","not_instrumented","source_unreachable","stale","not_configured"]},"reason":{"type":["string","null"],"maxLength":300},"source":{"type":"object","properties":{"name":{"type":"string","maxLength":120},"kind":{"type":"string","enum":["cloud_monitoring","none"]}},"required":["name","kind"]},"checkedAt":{"type":["string","null"],"format":"date-time"},"truncated":{"type":"boolean"},"items":{"type":"array","items":{"type":"object","properties":{"trackingKey":{"type":"string","pattern":"^[a-f0-9]{64}$"},"policyName":{"type":"string","maxLength":200},"severity":{"type":["string","null"],"maxLength":40},"openedAt":{"type":["string","null"],"format":"date-time"}},"required":["policyName","severity","openedAt"]},"maxItems":50}},"required":["state","reason","source","checkedAt","truncated","items"]},"capabilities":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["trace","profiler"]},"state":{"type":"string","enum":["ok","no_activity","no_data","not_instrumented","source_unreachable","stale","not_configured"]},"reason":{"type":["string","null"],"maxLength":300},"configured":{"type":"boolean"},"verification":{"type":"string","enum":["not_checked"]}},"required":["id","state","reason"]},"maxItems":4},"links":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logs","logs_outbox","monitoring_metrics","alert_policies","alert_incidents","trace","profiler"]},"label":{"type":"string","maxLength":120},"available":{"type":"boolean"},"url":{"type":["string","null"],"format":"uri"},"reason":{"type":["string","null"],"maxLength":300}},"required":["id","label","available","url","reason"]},"maxItems":10}},"required":["environment","period","service","generatedAt","refreshIntervalSeconds","versions","metrics","alerts","capabilities","links"]}}}},"400":{"description":"Unsupported filter"},"401":{"description":"Session required or inactive"},"503":{"description":"Authorization unavailable"}}}},"/operations/detail":{"get":{"tags":["backoffice"],"description":"Same-environment sanitized operational metadata for an active Backoffice session. No-store; source access independently gated.","parameters":[{"schema":{"type":"string","enum":["dev","prod"]},"required":false,"name":"environment","in":"query"},{"schema":{"type":"string","enum":["1h","6h","24h","7d"],"default":"1h"},"required":false,"name":"period","in":"query"},{"schema":{"type":"string","enum":["identity","community","content","xp","benefits","ai-channel","notifications","analytics","sharing","media","membership","flash-actions","campaigns","fan-bff","console-bff","backoffice-bff","wallet-bff"]},"required":true,"name":"service","in":"query"}],"responses":{"200":{"description":"Bounded service metadata","content":{"application/json":{"schema":{"type":"object","properties":{"environment":{"type":"string","enum":["dev","prod"]},"service":{"type":"string","enum":["identity","community","content","xp","benefits","ai-channel","notifications","analytics","sharing","media","membership","flash-actions","campaigns","fan-bff","console-bff","backoffice-bff","wallet-bff"]},"period":{"type":"string","enum":["1h","6h","24h","7d"]},"checkedAt":{"type":"string","format":"date-time"},"sections":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["logs","traces","profiles"]},"state":{"type":"string","enum":["ok","no_activity","no_data","not_instrumented","source_unreachable","stale","not_configured"]},"reason":{"type":["string","null"],"maxLength":300},"truncated":{"type":"boolean"},"sourceUrl":{"type":["string","null"],"format":"uri"},"items":{"type":"array","items":{"type":"object","properties":{"timestamp":{"type":["string","null"],"format":"date-time"},"errorCode":{"type":["string","null"],"enum":["23503","23505","40001","57014","AUDIENCE_FACTS_INCOMPLETE","OPERATOR_AUTHORIZATION_UNAVAILABLE","ANALYTICS_OPERATOR_AUTHORIZATION_UNAVAILABLE","CAMPAIGN_DEPENDENCY_UNAVAILABLE","RATE_LIMITED","INTERNAL_ERROR","40P01",null]},"category":{"type":["string","null"],"enum":["authorization","dependency","database","rate_limit","internal",null]},"operation":{"type":["string","null"],"enum":["internal","server","client","producer","consumer",null]},"sourceUrl":{"type":["string","null"],"format":"uri"},"severity":{"type":["string","null"],"enum":["DEFAULT","DEBUG","INFO","NOTICE","WARNING","ERROR","CRITICAL","ALERT","EMERGENCY",null]},"traceId":{"type":["string","null"],"pattern":"^[a-f0-9]{32}$"},"instance":{"type":["string","null"],"pattern":"^[a-z0-9.-]{1,160}$"},"durationMs":{"type":["number","null"],"minimum":0},"httpStatus":{"type":["integer","null"],"minimum":100,"maximum":599},"method":{"type":["string","null"],"enum":["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS",null]},"profileType":{"type":["string","null"],"enum":["CPU","WALL","HEAP","THREADS","CONTENTION","PEAK_HEAP","HEAP_ALLOC",null]}},"required":["timestamp","severity","traceId","instance","durationMs","profileType"]},"maxItems":20}},"required":["kind","state","reason","truncated","items"]},"maxItems":3}},"required":["environment","service","period","checkedAt","sections"]}}}},"400":{"description":"Unsupported filter or environment"},"401":{"description":"Session required or inactive"},"503":{"description":"Authorization unavailable"}}}},"/raffles":{"get":{"tags":["backoffice","benefits"],"description":"Raffle oversight via service identity. No-store. Raffle list by endsAt desc, optional status filter.","responses":{"200":{"description":"Raffle data"},"401":{"description":"Session required or inactive"},"403":{"description":"Role denied"},"404":{"description":"Raffle not found"}}}},"/raffles/{benefitId}":{"get":{"tags":["backoffice","benefits"],"description":"Raffle oversight via service identity. No-store. Result for any active admin.","responses":{"200":{"description":"Raffle data"},"401":{"description":"Session required or inactive"},"403":{"description":"Role denied"},"404":{"description":"Raffle not found"}}}},"/raffles/{benefitId}/contact":{"get":{"tags":["backoffice","benefits"],"description":"Raffle oversight via service identity. No-store. Winner contact PII; any active admin, audited by Benefits.","responses":{"200":{"description":"Raffle data"},"401":{"description":"Session required or inactive"},"403":{"description":"Role denied"},"404":{"description":"Raffle not found"}}}},"/raffles/{benefitId}/evidence":{"get":{"tags":["backoffice","benefits"],"description":"Raffle oversight via service identity. No-store. Evidence chain and verification; any active admin, audited.","responses":{"200":{"description":"Raffle data"},"401":{"description":"Session required or inactive"},"403":{"description":"Role denied"},"404":{"description":"Raffle not found"}}}},"/issuers/{id}":{"get":{"tags":["backoffice","community"],"description":"Forwards the Backoffice session to Community. Mutations require trusted browser origin.","responses":{"200":{"description":"Issuer profile","content":{"application/json":{"schema":{"type":"object","properties":{"publicationStatus":{"type":"string","enum":["draft","published"]},"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"category":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}},"required":["id","name","slug"]},"description":{"type":["string","null"]},"avatarUrl":{"type":["string","null"]}},"required":["id","slug","name","category","description","avatarUrl"]}}}},"401":{"description":"Invalid session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Issuer not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authorization unavailable or rollout pending","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["backoffice","community"],"description":"Proxies Community's PATCH /admin/issuers/:id.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"slug":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[a-z0-9]+(-[a-z0-9]+)*$"},"categoryId":{"type":"string","format":"uuid"},"description":{"type":["string","null"],"minLength":1,"maxLength":2000},"avatarUrl":{"type":["string","null"],"maxLength":2000,"format":"uri"}}}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object","properties":{"publicationStatus":{"type":"string","enum":["draft","published"]},"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"category":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}},"required":["id","name","slug"]},"description":{"type":["string","null"]},"avatarUrl":{"type":["string","null"]}},"required":["id","slug","name","category","description","avatarUrl"]}}}},"401":{"description":"No valid backoffice session (relayed from Community)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not authorized (relayed from Community)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found (relayed from Community — never revealed to an unauthorized caller)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"ISSUER_SLUG_ALREADY_EXISTS (relayed from Community)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/issuers/{id}/publish":{"post":{"tags":["backoffice","community"],"description":"Forwards the Backoffice session to Community. Mutations require trusted browser origin.","responses":{"200":{"description":"Issuer profile","content":{"application/json":{"schema":{"type":"object","properties":{"publicationStatus":{"type":"string","enum":["draft","published"]},"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"category":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}},"required":["id","name","slug"]},"description":{"type":["string","null"]},"avatarUrl":{"type":["string","null"]}},"required":["id","slug","name","category","description","avatarUrl"]}}}},"401":{"description":"Invalid session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Issuer not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authorization unavailable or rollout pending","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/health/live":{"get":{"tags":["health"],"responses":{"200":{"description":"Process is running","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/session":{"post":{"tags":["backoffice","identity"],"description":"Session-exchange — proxies Identity's POST /backoffice/sessions and sets this BFF's own httpOnly __Host-backoffice_at cookie. The access token is never returned in the body.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"idToken":{"type":"string","minLength":1,"description":"A GCIP ID token from the backoffice tenant, freshly obtained client-side."}},"required":["idToken"]}}}},"responses":{"200":{"description":"Session issued","content":{"application/json":{"schema":{"type":"object","properties":{"admin":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"role":{"type":"string","enum":["admin","admin_manager"]},"status":{"type":"string","enum":["pending_email_verification","pending_mfa_enrollment","active"]},"displayName":{"type":["string","null"]},"phoneNumber":{"type":["string","null"]}},"required":["id","email","role","status","displayName","phoneNumber"]}},"required":["admin"]}}}},"401":{"description":"The provided credential could not be verified (relayed from Identity)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"EMAIL_VERIFICATION_REQUIRED or MFA_ENROLLMENT_REQUIRED (relayed from Identity)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/session/refresh":{"post":{"tags":["backoffice","identity"],"description":"SESSION-DURATION-001 — sliding-session auto-refresh, mirroring bffs/console's own POST /operators/sessions/refresh. Proxies Identity's POST /backoffice/sessions/refresh and replaces this BFF's own cookie on success.","responses":{"200":{"description":"Session refreshed","content":{"application/json":{"schema":{"type":"object","properties":{"admin":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"role":{"type":"string","enum":["admin","admin_manager"]},"status":{"type":"string","enum":["pending_email_verification","pending_mfa_enrollment","active"]},"displayName":{"type":["string","null"]},"phoneNumber":{"type":["string","null"]}},"required":["id","email","role","status","displayName","phoneNumber"]}},"required":["admin"]}}}},"401":{"description":"SESSION_REFRESH_NOT_ELIGIBLE, or no backoffice cookie presented at all","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/session/revoke":{"post":{"tags":["backoffice","identity"],"description":"Proxies Identity's POST /backoffice/sessions/revoke and clears this BFF's own cookie.","responses":{"204":{"description":"Revoked"},"401":{"description":"No valid backoffice session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/session/mfa-reset/confirm":{"post":{"tags":["backoffice","identity"],"description":"Proxies Identity's POST /backoffice/mfa-reset/confirm. No backoffice cookie is read or required — by design, no Tinvex credential exists during this window.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"idToken":{"type":"string","minLength":1,"description":"The target admin's own GCIP ID token from the backoffice tenant."},"challenge":{"type":"string","minLength":1,"description":"The raw challenge value delivered to the admin's verified email."}},"required":["idToken","challenge"]}}}},"responses":{"200":{"description":"Confirmed","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["confirmed"]}},"required":["status"]}}}},"401":{"description":"The reset challenge could not be confirmed (relayed from Identity)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/session/step-up":{"post":{"tags":["backoffice","identity"],"description":"Proxies Identity's POST /internal/backoffice/sessions/:id/step-up — the :id is derived from this BFF's own cookie, never accepted from the client. A fresh, live per-sign-in re-assertion (docs/adr/0017 §6), never inferred from MFA enrollment alone.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"idToken":{"type":"string","minLength":1,"description":"A FRESH GCIP ID token from the backoffice tenant, re-obtained client-side for this step-up."}},"required":["idToken"]}}}},"responses":{"200":{"description":"Stepped up","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["stepped_up"]},"mfaVerifiedAt":{"type":"string","format":"date-time"}},"required":["status","mfaVerifiedAt"]}}}},"401":{"description":"No valid backoffice session, session_not_found, or uid_mismatch (relayed from Identity)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"SECOND_FACTOR_REQUIRED — the fresh token carries no genuine second-factor sign-in (relayed from Identity)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/pending-actions":{"post":{"tags":["backoffice","identity"],"description":"Proxies Identity's POST /backoffice/pending-actions. Requires the requester's own live capability and a fresh step-up (checked by Identity, never this BFF). Five action types as of BACKOFFICE-001's final-review Fix 1: create_admin, reset_operator_mfa, reset_admin_mfa, change_admin_role, disable_admin — for the latter two, the requester may never target their own admin id (self-target rejected by Identity).","requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"actionType":{"type":"string","enum":["create_admin"]},"target":{"type":"object","properties":{"email":{"type":"string","format":"email"},"role":{"type":"string","enum":["admin","admin_manager"]}},"required":["email","role"]}},"required":["actionType","target"]},{"type":"object","properties":{"actionType":{"type":"string","enum":["reset_operator_mfa"]},"target":{"type":"object","properties":{"operatorUserId":{"type":"string","format":"uuid"}},"required":["operatorUserId"]}},"required":["actionType","target"]},{"type":"object","properties":{"actionType":{"type":"string","enum":["reset_admin_mfa"]},"target":{"type":"object","properties":{"targetAdminId":{"type":"string","format":"uuid"}},"required":["targetAdminId"]}},"required":["actionType","target"]},{"type":"object","properties":{"actionType":{"type":"string","enum":["change_admin_role"]},"target":{"type":"object","properties":{"targetAdminId":{"type":"string","format":"uuid"},"newRole":{"type":"string","enum":["admin","admin_manager"]}},"required":["targetAdminId","newRole"]}},"required":["actionType","target"]},{"type":"object","properties":{"actionType":{"type":"string","enum":["disable_admin"]},"target":{"type":"object","properties":{"targetAdminId":{"type":"string","format":"uuid"},"reason":{"type":"string","minLength":1}},"required":["targetAdminId","reason"]}},"required":["actionType","target"]}]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"actionType":{"type":"string","enum":["create_admin","reset_operator_mfa","reset_admin_mfa","change_admin_role","disable_admin"]},"status":{"type":"string","enum":["pending","rejected","expired","executed","failed","cancelled"]},"requestedBy":{"type":"string"},"target":{"type":"object","additionalProperties":{}},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"decidedBy":{"type":["string","null"]},"decidedAt":{"type":["string","null"],"format":"date-time"},"decisionReason":{"type":["string","null"]},"executedAt":{"type":["string","null"],"format":"date-time"}},"required":["id","actionType","status","requestedBy","target","createdAt","expiresAt","decidedBy","decidedAt","decisionReason","executedAt"]}}}},"401":{"description":"No valid session, or STEP_UP_REQUIRED — passed through distinctly, never collapsed into a generic 401/403 (relayed from Identity)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Missing the required capability, or a self-target attempt for change_admin_role/disable_admin (relayed from Identity)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"PENDING_ACTION_ALREADY_EXISTS (relayed from Identity)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"get":{"tags":["backoffice","identity"],"description":"Proxies Identity's GET /backoffice/pending-actions. Capability-scoped server-side — the caller's own live role decides which action types are visible, never a client-supplied filter. Query params: cursor, limit.","responses":{"200":{"description":"Pending actions visible to the caller's own live role","content":{"application/json":{"schema":{"type":"object","properties":{"actions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"actionType":{"type":"string","enum":["create_admin","reset_operator_mfa","reset_admin_mfa","change_admin_role","disable_admin"]},"status":{"type":"string","enum":["pending","rejected","expired","executed","failed","cancelled"]},"requestedBy":{"type":"string"},"target":{"type":"object","additionalProperties":{}},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"decidedBy":{"type":["string","null"]},"decidedAt":{"type":["string","null"],"format":"date-time"},"decisionReason":{"type":["string","null"]},"executedAt":{"type":["string","null"],"format":"date-time"}},"required":["id","actionType","status","requestedBy","target","createdAt","expiresAt","decidedBy","decidedAt","decisionReason","executedAt"]}},"nextCursor":{"type":["string","null"]}},"required":["actions","nextCursor"]}}}},"401":{"description":"No valid backoffice session (relayed from Identity)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/pending-actions/{id}/approve":{"post":{"tags":["backoffice","identity"],"description":"Proxies Identity's POST /backoffice/pending-actions/:id/approve — a DIFFERENT admin than the requester, checked server-side, with fresh step-up.","responses":{"200":{"description":"Executed (or a guarded failed transition)","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"actionType":{"type":"string","enum":["create_admin","reset_operator_mfa","reset_admin_mfa","change_admin_role","disable_admin"]},"status":{"type":"string","enum":["pending","rejected","expired","executed","failed","cancelled"]},"requestedBy":{"type":"string"},"target":{"type":"object","additionalProperties":{}},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"decidedBy":{"type":["string","null"]},"decidedAt":{"type":["string","null"],"format":"date-time"},"decisionReason":{"type":["string","null"]},"executedAt":{"type":["string","null"],"format":"date-time"}},"required":["id","actionType","status","requestedBy","target","createdAt","expiresAt","decidedBy","decidedAt","decisionReason","executedAt"]}}}},"401":{"description":"No valid session, or STEP_UP_REQUIRED (relayed from Identity)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Missing capability, or the requester approving their own request (relayed from Identity)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Pending action not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"ALREADY_DECIDED or EXPIRED (relayed from Identity)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/pending-actions/{id}/reject":{"post":{"tags":["backoffice","identity"],"description":"Proxies Identity's POST /backoffice/pending-actions/:id/reject. No step-up required — rejection isn't privilege-granting.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1}},"required":["reason"]}}}},"responses":{"200":{"description":"Rejected","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"actionType":{"type":"string","enum":["create_admin","reset_operator_mfa","reset_admin_mfa","change_admin_role","disable_admin"]},"status":{"type":"string","enum":["pending","rejected","expired","executed","failed","cancelled"]},"requestedBy":{"type":"string"},"target":{"type":"object","additionalProperties":{}},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"decidedBy":{"type":["string","null"]},"decidedAt":{"type":["string","null"],"format":"date-time"},"decisionReason":{"type":["string","null"]},"executedAt":{"type":["string","null"],"format":"date-time"}},"required":["id","actionType","status","requestedBy","target","createdAt","expiresAt","decidedBy","decidedAt","decisionReason","executedAt"]}}}},"401":{"description":"No valid session (relayed from Identity)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Missing capability, or the requester rejecting their own request (relayed from Identity)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Pending action not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"ALREADY_DECIDED or EXPIRED (relayed from Identity)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/pending-actions/{id}/cancel":{"post":{"tags":["backoffice","identity"],"description":"Forwards requester withdrawal to Identity; preserves CSRF and session policy.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":500}},"required":["reason"],"additionalProperties":false}}}},"responses":{"200":{"description":"Cancelled, including an idempotent repeat","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"actionType":{"type":"string","enum":["create_admin","reset_operator_mfa","reset_admin_mfa","change_admin_role","disable_admin"]},"status":{"type":"string","enum":["pending","rejected","expired","executed","failed","cancelled"]},"requestedBy":{"type":"string"},"target":{"type":"object","additionalProperties":{}},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"decidedBy":{"type":["string","null"]},"decidedAt":{"type":["string","null"],"format":"date-time"},"decisionReason":{"type":["string","null"]},"executedAt":{"type":["string","null"],"format":"date-time"}},"required":["id","actionType","status","requestedBy","target","createdAt","expiresAt","decidedBy","decidedAt","decisionReason","executedAt"]}}}},"400":{"description":"Invalid reason or CSRF","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"No valid session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not requester or missing capability","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Request not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Already decided or expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/operators":{"get":{"tags":["backoffice","identity"],"description":"Proxies Identity's GET /backoffice/operators. Query params: q, cursor, limit.","responses":{"200":{"description":"Matching operators","content":{"application/json":{"schema":{"type":"object","properties":{"operators":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"status":{"type":"string","enum":["pending_email_verification","pending_mfa_enrollment","active"]},"disabledAt":{"type":["string","null"],"format":"date-time"},"disabledReason":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"}},"required":["id","email","status","disabledAt","disabledReason","createdAt"]}},"nextCursor":{"type":["string","null"]}},"required":["operators","nextCursor"]}}}},"401":{"description":"No valid backoffice session (relayed from Identity)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["backoffice","identity"],"description":"Proxies Identity's POST /backoffice/operators — provisions a real operator (and its first membership) via a real GCIP call, exposed here as an authenticated, audited HTTP route rather than a CLI script only.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"},"memberships":{"type":"array","items":{"type":"object","properties":{"issuerId":{"type":"string","format":"uuid"},"role":{"type":"string","enum":["issuer_admin","account_manager","benefits_validator"]}},"required":["issuerId","role"]},"minItems":1},"reason":{"type":"string","minLength":1},"password":{"type":"string","minLength":8}},"required":["email","memberships"]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"status":{"type":"string","enum":["pending_email_verification","pending_mfa_enrollment","active"]},"disabledAt":{"type":["string","null"],"format":"date-time"},"disabledReason":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"memberships":{"type":"array","items":{"type":"object","properties":{"issuerId":{"type":"string"},"role":{"type":"string","enum":["issuer_admin","account_manager","benefits_validator"]}},"required":["issuerId","role"]}}},"required":["id","email","status","disabledAt","disabledReason","createdAt","memberships"]}}}},"401":{"description":"No valid backoffice session (relayed from Identity)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Issuer not found (relayed from Identity)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"MEMBERSHIP_ROLE_CONFLICT (relayed from Identity)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/operators/{id}":{"get":{"tags":["backoffice","identity"],"description":"Proxies Identity's GET /backoffice/operators/:id.","responses":{"200":{"description":"Operator detail, including current memberships","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"status":{"type":"string","enum":["pending_email_verification","pending_mfa_enrollment","active"]},"disabledAt":{"type":["string","null"],"format":"date-time"},"disabledReason":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"memberships":{"type":"array","items":{"type":"object","properties":{"issuerId":{"type":"string"},"role":{"type":"string","enum":["issuer_admin","account_manager","benefits_validator"]}},"required":["issuerId","role"]}}},"required":["id","email","status","disabledAt","disabledReason","createdAt","memberships"]}}}},"401":{"description":"No valid backoffice session (relayed from Identity)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Operator not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/operators/{id}/disable":{"post":{"tags":["backoffice","identity"],"description":"Proxies Identity's POST /backoffice/operators/:id/disable.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1}},"required":["reason"]}}}},"responses":{"200":{"description":"Disabled","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"status":{"type":"string","enum":["pending_email_verification","pending_mfa_enrollment","active"]},"disabledAt":{"type":["string","null"],"format":"date-time"},"disabledReason":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"memberships":{"type":"array","items":{"type":"object","properties":{"issuerId":{"type":"string"},"role":{"type":"string","enum":["issuer_admin","account_manager","benefits_validator"]}},"required":["issuerId","role"]}}},"required":["id","email","status","disabledAt","disabledReason","createdAt","memberships"]}}}},"401":{"description":"No valid backoffice session (relayed from Identity)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Operator not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/operators/{id}/reenable":{"post":{"tags":["backoffice","identity"],"description":"Proxies Identity's POST /backoffice/operators/:id/reenable.","responses":{"200":{"description":"Re-enabled","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"status":{"type":"string","enum":["pending_email_verification","pending_mfa_enrollment","active"]},"disabledAt":{"type":["string","null"],"format":"date-time"},"disabledReason":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"memberships":{"type":"array","items":{"type":"object","properties":{"issuerId":{"type":"string"},"role":{"type":"string","enum":["issuer_admin","account_manager","benefits_validator"]}},"required":["issuerId","role"]}}},"required":["id","email","status","disabledAt","disabledReason","createdAt","memberships"]}}}},"401":{"description":"No valid backoffice session (relayed from Identity)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Operator not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/operators/{id}/memberships":{"get":{"tags":["backoffice","identity"],"description":"Proxies Identity's GET /backoffice/operators/:id/memberships.","responses":{"200":{"description":"This operator's current issuer memberships","content":{"application/json":{"schema":{"type":"object","properties":{"memberships":{"type":"array","items":{"type":"object","properties":{"issuerId":{"type":"string"},"role":{"type":"string","enum":["issuer_admin","account_manager","benefits_validator"]}},"required":["issuerId","role"]}}},"required":["memberships"]}}}},"401":{"description":"No valid backoffice session (relayed from Identity)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Operator not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["backoffice","identity"],"description":"Proxies Identity's POST /backoffice/operators/:id/memberships.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"issuerId":{"type":"string","format":"uuid"},"role":{"type":"string","enum":["issuer_admin","account_manager","benefits_validator"]},"reason":{"type":"string","minLength":1}},"required":["issuerId","role","reason"]}}}},"responses":{"200":{"description":"Already granted with this exact role (idempotent)","content":{"application/json":{"schema":{"type":"object","properties":{"issuerId":{"type":"string"},"role":{"type":"string","enum":["issuer_admin","account_manager","benefits_validator"]}},"required":["issuerId","role"]}}}},"201":{"description":"Granted (new)","content":{"application/json":{"schema":{"type":"object","properties":{"issuerId":{"type":"string"},"role":{"type":"string","enum":["issuer_admin","account_manager","benefits_validator"]}},"required":["issuerId","role"]}}}},"401":{"description":"No valid backoffice session (relayed from Identity)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Operator or issuer not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"MEMBERSHIP_ROLE_CONFLICT — a different role already exists for this pair (relayed from Identity)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/operators/{id}/memberships/{issuerId}":{"patch":{"tags":["backoffice","identity"],"description":"Proxies Identity's PATCH /backoffice/operators/:id/memberships/:issuerId.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","enum":["issuer_admin","account_manager","benefits_validator"]},"reason":{"type":"string","minLength":1}},"required":["role","reason"]}}}},"responses":{"200":{"description":"Changed (or unchanged, if already this role)","content":{"application/json":{"schema":{"type":"object","properties":{"issuerId":{"type":"string"},"role":{"type":"string","enum":["issuer_admin","account_manager","benefits_validator"]}},"required":["issuerId","role"]}}}},"401":{"description":"No valid backoffice session (relayed from Identity)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Membership not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["backoffice","identity"],"description":"Proxies Identity's DELETE /backoffice/operators/:id/memberships/:issuerId — a hard delete, deliberately (docs/adr/0017 §9). `reason` is optional here but REQUIRED by Identity when the target's current role is benefits_validator (REDEMPTION-VALIDATOR-001 phase 3) — this BFF never re-derives that decision, only relays it.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1}}}}}},"responses":{"204":{"description":"Revoked"},"400":{"description":"MEMBERSHIP_REVOKE_REASON_REQUIRED — missing reason while revoking benefits_validator (relayed from Identity)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"No valid backoffice session (relayed from Identity)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Membership not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/admins":{"get":{"tags":["backoffice","identity"],"description":"Proxies Identity's GET /backoffice/admins. Query params: cursor, limit. The ONLY route in this section — BACKOFFICE-001's final-review Fix 1 (SECURITY-001 remediation) removed the old PATCH /admins/{id} and POST /admins/{id}/disable routes entirely: role-change and disable are now EXCLUSIVELY the change_admin_role/disable_admin dual-control pending-action types (POST /pending-actions, POST /pending-actions/{id}/approve), same as create_admin/reset_admin_mfa. No creation route either — admin creation stays exclusively behind the dual-control create_admin flow.","responses":{"200":{"description":"Backoffice admins","content":{"application/json":{"schema":{"type":"object","properties":{"admins":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"role":{"type":"string","enum":["admin","admin_manager"]},"status":{"type":"string","enum":["pending_email_verification","pending_mfa_enrollment","active"]},"displayName":{"type":["string","null"]},"phoneNumber":{"type":["string","null"]}},"required":["id","email","role","status","displayName","phoneNumber"]}},"nextCursor":{"type":["string","null"]}},"required":["admins","nextCursor"]}}}},"401":{"description":"No valid backoffice session (relayed from Identity)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/audit":{"get":{"tags":["backoffice","identity"],"description":"Composes Identity's two separate GET /backoffice/audit/operators and GET /backoffice/audit/admins routes into one chronologically-merged, paginated view (auditMerge.ts) — real composition logic, zero authorization logic: both source calls carry the caller's own forwarded token and are independently, live-authorized by Identity. Query params: from, to (ISO 8601, optional — default last 7 days, max 31, clamped the same way both source routes clamp), cursor, limit.","responses":{"200":{"description":"Merged audit entries, most recent first","content":{"application/json":{"schema":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"actor":{"type":"object","additionalProperties":{}},"target":{"type":"object","additionalProperties":{}},"action":{"type":"string"},"outcome":{"type":"string","enum":["success","failure"]},"reason":{"type":["string","null"]},"correlationId":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"source":{"type":"string","enum":["operator","admin"]}},"required":["id","actor","target","action","outcome","reason","correlationId","createdAt","source"]}},"nextCursor":{"type":["string","null"]}},"required":["entries","nextCursor"]}}}},"401":{"description":"No valid backoffice session (relayed from Identity)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/issuers":{"get":{"tags":["backoffice","community"],"description":"Proxies Community's authorized issuer catalog, including optional cursor-based ID pagination; preserves the array response.","parameters":[{"schema":{"type":"string","description":"Optional case-insensitive name filter."},"required":false,"description":"Optional case-insensitive name filter.","name":"q","in":"query"},{"schema":{"type":"string","description":"Integer text parsed and clamped server-side: default 20, maximum 50; unparseable or non-positive values use the default."},"required":false,"description":"Integer text parsed and clamped server-side: default 20, maximum 50; unparseable or non-positive values use the default.","name":"limit","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":[""]},{"type":"string","format":"uuid"}],"description":"Omit for name/ID ordering. Empty starts an ID-ordered scan; a UUID selects strictly later IDs. Continue with the last returned ID until fewer than the requested (maximum 50) rows are returned. This is a live catalog, not a snapshot."},"required":false,"description":"Omit for name/ID ordering. Empty starts an ID-ordered scan; a UUID selects strictly later IDs. Continue with the last returned ID until fewer than the requested (maximum 50) rows are returned. This is a live catalog, not a snapshot.","name":"cursor","in":"query"}],"responses":{"200":{"description":"Matching issuers","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"publicationStatus":{"type":"string","enum":["draft","published"]},"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"category":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}},"required":["id","name","slug"]},"description":{"type":["string","null"]},"avatarUrl":{"type":["string","null"]}},"required":["id","slug","name","category","description","avatarUrl"]}}}}},"400":{"description":"Invalid cursor: expected an empty string or UUID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"No valid backoffice session (relayed from Community)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not authorized (relayed from Community)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["backoffice","community"],"description":"Proxies Community's POST /admin/issuers.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"slug":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[a-z0-9]+(-[a-z0-9]+)*$"},"categoryId":{"type":"string","format":"uuid"},"description":{"type":["string","null"],"minLength":1,"maxLength":2000},"avatarUrl":{"type":["string","null"],"maxLength":2000,"format":"uri"}},"required":["name","slug","categoryId"]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"publicationStatus":{"type":"string","enum":["draft","published"]},"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"category":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}},"required":["id","name","slug"]},"description":{"type":["string","null"]},"avatarUrl":{"type":["string","null"]}},"required":["id","slug","name","category","description","avatarUrl"]}}}},"401":{"description":"No valid backoffice session (relayed from Community)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not authorized (relayed from Community)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"ISSUER_SLUG_ALREADY_EXISTS (relayed from Community)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/issuers/{id}/audit":{"get":{"tags":["backoffice","community"],"description":"Proxies Community's GET /admin/issuers/:id/audit.","responses":{"200":{"description":"This issuer's admin audit log, most recent first","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"actor":{"type":"object","properties":{"type":{"type":"string","enum":["backoffice_admin"]},"adminId":{"type":["string","null"]},"role":{"type":["string","null"],"enum":["admin","admin_manager",null]}},"required":["type","adminId","role"]},"target":{"type":"object","properties":{"type":{"type":"string","enum":["issuer"]},"id":{"type":["string","null"]},"slug":{"type":["string","null"]}},"required":["type","id"]},"action":{"type":"string","enum":["create","update"]},"operation":{"type":"string","enum":["publish"]},"outcome":{"type":"string","enum":["success","failure"]},"reason":{"type":["string","null"]},"correlationId":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"}},"required":["id","actor","target","action","outcome","reason","correlationId","createdAt"]}}}}},"401":{"description":"No valid backoffice session (relayed from Community)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not authorized (relayed from Community)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Issuer not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/categories":{"get":{"tags":["backoffice","community"],"description":"Proxies Community's GET /admin/categories.","responses":{"200":{"description":"All issuer categories","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}},"required":["id","name","slug"]}}}}},"401":{"description":"No valid backoffice session (relayed from Community)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not authorized (relayed from Community)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["backoffice","community"],"description":"Proxies Community's POST /admin/categories.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200}},"required":["name"]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}},"required":["id","name","slug"]}}}},"401":{"description":"No valid backoffice session (relayed from Community)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not authorized (relayed from Community)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"CATEGORY_SLUG_ALREADY_EXISTS (relayed from Community)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/categories/{id}":{"patch":{"tags":["backoffice","community"],"description":"Proxies Community's PATCH /admin/categories/:id.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200}},"required":["name"]}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}},"required":["id","name","slug"]}}}},"401":{"description":"No valid backoffice session (relayed from Community)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not authorized (relayed from Community)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found (relayed from Community)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"CATEGORY_SLUG_ALREADY_EXISTS (relayed from Community)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["backoffice","community"],"description":"Proxies Community's DELETE /admin/categories/:id.","responses":{"204":{"description":"Deleted"},"401":{"description":"No valid backoffice session (relayed from Community)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not authorized (relayed from Community)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found (relayed from Community)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"CATEGORY_IN_USE (relayed from Community)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/xp/triggers":{"get":{"tags":["backoffice","xp"],"description":"Proxies services/xp's admin GET /xp/triggers.","responses":{"200":{"description":"Every XP trigger key with its current amount","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"amount":{"type":"integer","exclusiveMinimum":0,"maximum":10000},"active":{"type":"boolean"},"description":{"type":["string","null"]},"updatedAt":{"type":"string"}},"required":["key","amount"]}}}}},"401":{"description":"No valid backoffice session (relayed from XP)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not authorized (relayed from XP)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/xp/triggers/{key}":{"patch":{"tags":["backoffice","xp"],"description":"Proxies services/xp's admin PATCH /xp/triggers/:key. Only retunes an existing, code-referenced key — never creates or deletes one.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"integer","exclusiveMinimum":0,"maximum":10000}},"required":["amount"]}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string"},"amount":{"type":"integer","exclusiveMinimum":0,"maximum":10000},"active":{"type":"boolean"},"description":{"type":["string","null"]},"updatedAt":{"type":"string"}},"required":["key","amount"]}}}},"400":{"description":"Invalid amount (relayed from XP)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"No valid backoffice session (relayed from XP)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not authorized (relayed from XP)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown trigger key (relayed from XP)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/xp/config/kyc-booster":{"get":{"tags":["backoffice","xp"],"description":"Reads the global KYC-approved XP booster percentage.","responses":{"200":{"description":"Current configuration","content":{"application/json":{"schema":{"type":"object","properties":{"percent":{"type":"integer","minimum":0,"maximum":100}},"required":["percent"]}}}},"401":{"description":"No valid backoffice session (relayed from XP)"},"403":{"description":"Not authorized (relayed from XP)"}}},"patch":{"tags":["backoffice","xp"],"description":"Updates the global KYC booster and every existing KYC booster grant.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"percent":{"type":"integer","minimum":0,"maximum":100}},"required":["percent"]}}}},"responses":{"200":{"description":"Updated configuration","content":{"application/json":{"schema":{"type":"object","properties":{"percent":{"type":"integer","minimum":0,"maximum":100},"affectedBoosters":{"type":"integer","minimum":0}},"required":["percent","affectedBoosters"]}}}},"400":{"description":"Invalid percentage (relayed from XP)"},"401":{"description":"No valid backoffice session (relayed from XP)"},"403":{"description":"Not authorized (relayed from XP)"}}}},"/ai/platform-config/draft":{"post":{"tags":["backoffice","ai-channel"],"description":"Proxies AI-Channel's POST /admin/ai/platform-config/draft. Allow-listed model/provider only — a 422 relayed unchanged for anything else.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"generationProvider":{"type":"string"},"generationModel":{"type":"string"},"embeddingModel":{"type":"string"},"verifierModel":{"type":["string","null"]},"promptVersion":{"type":"string"},"temperature":{"type":"number","minimum":0,"maximum":2},"maxOutputTokens":{"type":"integer","exclusiveMinimum":0},"retrievalTopK":{"type":"integer","exclusiveMinimum":0},"citationCap":{"type":"integer","exclusiveMinimum":0},"environmentCostCeilingUsd":{"type":["number","null"],"exclusiveMinimum":0},"costCeilingAccountingWindow":{"type":["string","null"],"enum":["daily","monthly",null]}}}}}},"responses":{"200":{"description":"Draft created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"contentFingerprint":{"type":"string"}},"required":["id","contentFingerprint"]}}}},"401":{"description":"No valid backoffice session (relayed from AI-Channel)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not authorized (relayed from AI-Channel)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"AI_PLATFORM_CONFIG_MODEL_NOT_ALLOWED (relayed from AI-Channel)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/ai/platform-config":{"get":{"tags":["backoffice","ai-channel"],"description":"Proxies AI-Channel's GET /admin/ai/platform-config — the active version id plus full version history.","responses":{"200":{"description":"Active version id plus version history","content":{"application/json":{"schema":{"type":"object","properties":{"activeVersionId":{"type":["string","null"]},"versions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["draft","active","superseded"]},"createdAt":{"type":"string"},"createdByAdminId":{"type":"string"},"rolledBackFromVersionId":{"type":["string","null"]},"generationProvider":{"type":"string"},"generationModel":{"type":"string"},"embeddingModel":{"type":"string"},"verifierModel":{"type":["string","null"]},"promptVersion":{"type":"string"},"temperature":{"type":"number"},"maxOutputTokens":{"type":"number"},"retrievalTopK":{"type":"number"},"citationCap":{"type":"number"},"environmentCostCeilingUsd":{"type":["number","null"]},"costCeilingAccountingWindow":{"type":["string","null"]},"requiredEvalsRunId":{"type":["string","null"]},"requiredEvalsPassedAt":{"type":["string","null"]},"contentFingerprint":{"type":"string"}},"required":["id","status","createdAt","createdByAdminId","rolledBackFromVersionId","generationProvider","generationModel","embeddingModel","verifierModel","promptVersion","temperature","maxOutputTokens","retrievalTopK","citationCap","environmentCostCeilingUsd","costCeilingAccountingWindow","requiredEvalsRunId","requiredEvalsPassedAt","contentFingerprint"]}}},"required":["activeVersionId","versions"]}}}},"401":{"description":"No valid backoffice session (relayed from AI-Channel)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/ai/platform-config/{versionId}/activate":{"post":{"tags":["backoffice","ai-channel"],"description":"Proxies AI-Channel's POST /admin/ai/platform-config/:versionId/activate. Requires a FRESH step-up (POST /session/step-up) — a genuine STEP_UP_REQUIRED (401) is expected and must be relayed distinctly, never a generic error.","responses":{"200":{"description":"Activated","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["activated"]},"versionId":{"type":"string"},"previousActiveVersionId":{"type":["string","null"]},"isRollback":{"type":"boolean"}},"required":["status","versionId","previousActiveVersionId","isRollback"]}}}},"401":{"description":"No valid session, or STEP_UP_REQUIRED (relayed from AI-Channel)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Version not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"AI_PLATFORM_CONFIG_ALREADY_ACTIVE, AI_PLATFORM_CONFIG_EVAL_GATE_NOT_PASSED, or AI_PLATFORM_CONFIG_FINGERPRINT_MISMATCH (relayed from AI-Channel)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/ai/platform-config/{versionId}/rollback":{"post":{"tags":["backoffice","ai-channel"],"description":"Proxies AI-Channel's POST /admin/ai/platform-config/:versionId/rollback. NO step-up required — a disclosed, deliberate asymmetry vs. activation.","responses":{"200":{"description":"Rolled back","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["activated"]},"versionId":{"type":"string"},"previousActiveVersionId":{"type":["string","null"]},"isRollback":{"type":"boolean"}},"required":["status","versionId","previousActiveVersionId","isRollback"]}}}},"401":{"description":"No valid backoffice session (relayed from AI-Channel)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Version not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"AI_PLATFORM_CONFIG_ALREADY_ACTIVE, AI_PLATFORM_CONFIG_EVAL_GATE_NOT_PASSED, or AI_PLATFORM_CONFIG_FINGERPRINT_MISMATCH (relayed from AI-Channel)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/ai/kill-switch/trip":{"post":{"tags":["backoffice","ai-channel"],"description":"Proxies AI-Channel's POST /admin/ai/kill-switch/trip. Single-actor, immediate, NO step-up — must remain instantly available.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":500}},"required":["reason"]}}}},"responses":{"200":{"description":"Tripped","content":{"application/json":{"schema":{"type":"object","properties":{"trippedAt":{"type":"string"}},"required":["trippedAt"]}}}},"401":{"description":"No valid backoffice session (relayed from AI-Channel)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not authorized (relayed from AI-Channel)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/ai/kill-switch/clear":{"post":{"tags":["backoffice","ai-channel"],"description":"Proxies AI-Channel's POST /admin/ai/kill-switch/clear. This does NOT clear anything itself — it only REQUESTS a dual-control action (this service's own ai_dual_control_actions mechanism, never Identity's pending-actions). The response is {status: \"pending\", id} for a pending row a DIFFERENT admin must approve via /ai/dual-control-actions.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":500}}}}}},"responses":{"201":{"description":"Dual-control request created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"actionType":{"type":"string","enum":["clear_kill_switch","expand_rollout","raise_cost_ceiling"]},"status":{"type":"string","enum":["pending","rejected","expired","executed","failed"]},"requestedByAdminId":{"type":"string"},"requestedAt":{"type":"string"},"payload":{},"resolvedByAdminId":{"type":["string","null"]},"resolvedAt":{"type":["string","null"]},"resolutionReason":{"type":["string","null"]}},"required":["id","actionType","status","requestedByAdminId","requestedAt","resolvedByAdminId","resolvedAt","resolutionReason"]}}}},"401":{"description":"No valid backoffice session (relayed from AI-Channel)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not authorized (relayed from AI-Channel)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"DUAL_CONTROL_ACTION_ALREADY_PENDING (relayed from AI-Channel)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/ai/rollout/{versionId}/allowlist":{"post":{"tags":["backoffice","ai-channel"],"description":"Proxies AI-Channel's POST /admin/ai/rollout/:versionId/allowlist. Returns EITHER {status: \"applied\", issuerIds} OR {status: \"pending_dual_control\", dualControlActionId} depending on whether the target crosses the configurable threshold — both outcomes must be handled distinctly.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"issuerIds":{"type":"array","items":{"type":"string"}}},"required":["issuerIds"]}}}},"responses":{"200":{"description":"Applied immediately, or a dual-control request was created","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["applied"]},"issuerIds":{"type":"array","items":{"type":"string"}}},"required":["status","issuerIds"]},{"type":"object","properties":{"status":{"type":"string","enum":["pending_dual_control"]},"dualControlActionId":{"type":"string"}},"required":["status","dualControlActionId"]}]}}}},"401":{"description":"No valid backoffice session (relayed from AI-Channel)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not authorized (relayed from AI-Channel)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Version not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"DUAL_CONTROL_ACTION_ALREADY_PENDING (relayed from AI-Channel)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"get":{"tags":["backoffice","ai-channel"],"description":"Proxies AI-Channel's GET /admin/ai/rollout/:versionId/allowlist.","responses":{"200":{"description":"Current allowlist","content":{"application/json":{"schema":{"type":"object","properties":{"platformConfigVersionId":{"type":"string"},"issuerIds":{"type":"array","items":{"type":"string"}}},"required":["platformConfigVersionId","issuerIds"]}}}},"401":{"description":"No valid backoffice session (relayed from AI-Channel)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/ai/rollout/threshold":{"patch":{"tags":["backoffice","ai-channel"],"description":"Proxies AI-Channel's PATCH /admin/ai/rollout/threshold — the dual-control threshold percent, capped server-side at 90.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"thresholdPercent":{"type":"integer","minimum":1,"maximum":100}},"required":["thresholdPercent"]}}}},"responses":{"200":{"description":"Set","content":{"application/json":{"schema":{"type":"object","properties":{"thresholdPercent":{"type":"integer"}},"required":["thresholdPercent"]}}}},"401":{"description":"No valid backoffice session (relayed from AI-Channel)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not authorized (relayed from AI-Channel)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"AI_ROLLOUT_THRESHOLD_EXCEEDS_MAX (relayed from AI-Channel)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/ai/cost/ceiling":{"post":{"tags":["backoffice","ai-channel"],"description":"Proxies AI-Channel's POST /admin/ai/cost/ceiling. Lowering applies immediately; raising returns {status: \"pending_dual_control\", dualControlActionId} — both outcomes must be handled distinctly.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"costCeilingUsd":{"type":"number","exclusiveMinimum":0},"accountingWindow":{"type":"string","enum":["daily","monthly"]}},"required":["costCeilingUsd","accountingWindow"]}}}},"responses":{"200":{"description":"Set immediately, or a dual-control request was created","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["set"]},"costCeilingUsd":{"type":"number"},"accountingWindow":{"type":"string","enum":["daily","monthly"]}},"required":["status","costCeilingUsd","accountingWindow"]},{"type":"object","properties":{"status":{"type":"string","enum":["pending_dual_control"]},"dualControlActionId":{"type":"string"}},"required":["status","dualControlActionId"]}]}}}},"401":{"description":"No valid backoffice session (relayed from AI-Channel)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not authorized (relayed from AI-Channel)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"DUAL_CONTROL_ACTION_ALREADY_PENDING (relayed from AI-Channel)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/ai/cost":{"get":{"tags":["backoffice","ai-channel"],"description":"Proxies AI-Channel's GET /admin/ai/cost — platform + per-issuer, the REAL-TIME authoritative source for ceiling enforcement (never /ai/health's own historical trend rollup).","responses":{"200":{"description":"Platform-wide and per-issuer spend/ceiling","content":{"application/json":{"schema":{"type":"object","properties":{"platform":{"type":"object","properties":{"accountingWindow":{"type":["string","null"],"enum":["daily","monthly",null]},"windowStartAt":{"type":["string","null"]},"spendUsd":{"type":"number"},"ceilingUsd":{"type":["number","null"]}},"required":["accountingWindow","windowStartAt","spendUsd","ceilingUsd"]},"issuers":{"type":"array","items":{"type":"object","properties":{"issuerId":{"type":"string"},"ceilingUsd":{"type":["number","null"]},"accountingWindow":{"type":["string","null"],"enum":["daily","monthly",null]},"spendUsd":{"type":"number"}},"required":["issuerId","ceilingUsd","accountingWindow","spendUsd"]}}},"required":["platform","issuers"]}}}},"401":{"description":"No valid backoffice session (relayed from AI-Channel)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/ai/issuers/{issuerId}/suspend":{"post":{"tags":["backoffice","ai-channel"],"description":"Proxies AI-Channel's POST /admin/ai/issuers/:issuerId/suspend. Requires a FRESH step-up.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":500}},"required":["reason"]}}}},"responses":{"200":{"description":"Suspended","content":{"application/json":{"schema":{"type":"object","properties":{"suspendedByBackofficeAt":{"type":["string","null"]},"suspendedByBackofficeReason":{"type":["string","null"]}},"required":["suspendedByBackofficeAt","suspendedByBackofficeReason"]}}}},"401":{"description":"No valid session, or STEP_UP_REQUIRED (relayed from AI-Channel)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not authorized (relayed from AI-Channel)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/ai/issuers/{issuerId}/reactivate":{"post":{"tags":["backoffice","ai-channel"],"description":"Proxies AI-Channel's POST /admin/ai/issuers/:issuerId/reactivate. Requires a FRESH step-up.","responses":{"200":{"description":"Reactivated","content":{"application/json":{"schema":{"type":"object","properties":{"suspendedByBackofficeAt":{"type":["string","null"]},"suspendedByBackofficeReason":{"type":["string","null"]}},"required":["suspendedByBackofficeAt","suspendedByBackofficeReason"]}}}},"401":{"description":"No valid session, or STEP_UP_REQUIRED (relayed from AI-Channel)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not authorized (relayed from AI-Channel)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/ai/dual-control-actions":{"get":{"tags":["backoffice","ai-channel"],"description":"Proxies AI-Channel's GET /admin/ai/dual-control-actions — this service's OWN, structurally separate dual-control subsystem (clear_kill_switch/expand_rollout/raise_cost_ceiling), never Identity's /pending-actions above. A genuinely different screen, deliberately never folded into that one.","responses":{"200":{"description":"Dual-control requests","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"actionType":{"type":"string","enum":["clear_kill_switch","expand_rollout","raise_cost_ceiling"]},"status":{"type":"string","enum":["pending","rejected","expired","executed","failed"]},"requestedByAdminId":{"type":"string"},"requestedAt":{"type":"string"},"payload":{},"resolvedByAdminId":{"type":["string","null"]},"resolvedAt":{"type":["string","null"]},"resolutionReason":{"type":["string","null"]}},"required":["id","actionType","status","requestedByAdminId","requestedAt","resolvedByAdminId","resolvedAt","resolutionReason"]}}}}},"401":{"description":"No valid backoffice session (relayed from AI-Channel)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/ai/dual-control-actions/{id}/approve":{"post":{"tags":["backoffice","ai-channel"],"description":"Proxies AI-Channel's POST /admin/ai/dual-control-actions/:id/approve — a DIFFERENT admin than the requester, with fresh step-up.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"resolutionReason":{"type":["string","null"],"maxLength":500}}}}}},"responses":{"200":{"description":"Executed (or a guarded failed transition)","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"actionType":{"type":"string","enum":["clear_kill_switch","expand_rollout","raise_cost_ceiling"]},"status":{"type":"string","enum":["pending","rejected","expired","executed","failed"]},"requestedByAdminId":{"type":"string"},"requestedAt":{"type":"string"},"payload":{},"resolvedByAdminId":{"type":["string","null"]},"resolvedAt":{"type":["string","null"]},"resolutionReason":{"type":["string","null"]}},"required":["id","actionType","status","requestedByAdminId","requestedAt","resolvedByAdminId","resolvedAt","resolutionReason"]}}}},"401":{"description":"No valid session, or STEP_UP_REQUIRED (relayed from AI-Channel)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Missing capability, same approver as requester, or approver session not active (relayed from AI-Channel)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Dual-control action not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"DUAL_CONTROL_ACTION_NOT_PENDING or DUAL_CONTROL_ACTION_EFFECT_FAILED (relayed from AI-Channel)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/ai/dual-control-actions/{id}/reject":{"post":{"tags":["backoffice","ai-channel"],"description":"Proxies AI-Channel's POST /admin/ai/dual-control-actions/:id/reject. No step-up required — rejection isn't privilege-granting.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"resolutionReason":{"type":["string","null"],"maxLength":500}}}}}},"responses":{"200":{"description":"Rejected","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"actionType":{"type":"string","enum":["clear_kill_switch","expand_rollout","raise_cost_ceiling"]},"status":{"type":"string","enum":["pending","rejected","expired","executed","failed"]},"requestedByAdminId":{"type":"string"},"requestedAt":{"type":"string"},"payload":{},"resolvedByAdminId":{"type":["string","null"]},"resolvedAt":{"type":["string","null"]},"resolutionReason":{"type":["string","null"]}},"required":["id","actionType","status","requestedByAdminId","requestedAt","resolvedByAdminId","resolvedAt","resolutionReason"]}}}},"401":{"description":"No valid backoffice session (relayed from AI-Channel)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Missing capability (relayed from AI-Channel)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Dual-control action not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"DUAL_CONTROL_ACTION_NOT_PENDING (relayed from AI-Channel)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/ai/audit":{"get":{"tags":["backoffice","ai-channel"],"description":"Proxies AI-Channel's GET /admin/ai/audit — decision 26.5's dedicated, platform-scoped AI audit read. A genuinely separate screen from GET /audit above; never composed with it.","responses":{"200":{"description":"Platform AI audit log entries","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"actor":{},"issuerId":{"type":["string","null"]},"action":{"type":"string"},"resourceId":{"type":["string","null"]},"versionId":{"type":["string","null"]},"outcome":{"type":"string","enum":["success","denied"]},"denialReason":{"type":["string","null"]},"correlationId":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","issuerId","action","resourceId","versionId","outcome","denialReason","correlationId","createdAt"]}}}}},"401":{"description":"No valid backoffice session (relayed from AI-Channel)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/ai/health":{"get":{"tags":["backoffice","analytics"],"description":"Proxies Analytics's GET /admin/ai-channel/health. Bounded date range (query params from/to, ISO 8601, optional — default last 7 days, max 31, clamped server-side). Does NOT cover reconciliation drift or safety-scan blocks — no real producer signal for either exists anywhere in services/ai-channel today (disclosed, honest scope gap, mirrored from the owning route).","responses":{"200":{"description":"Cross-issuer AI-channel health and platform cost trend","content":{"application/json":{"schema":{"type":"object","properties":{"range":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"]},"platform":{"type":"object","properties":{"totalCount":{"type":"integer","minimum":0},"deliveredCount":{"type":"integer","minimum":0},"groundedCount":{"type":"integer","minimum":0},"partialCount":{"type":"integer","minimum":0},"insufficientInformationCount":{"type":"integer","minimum":0},"generalConversationalCount":{"type":"integer","minimum":0},"costCeilingBlockedCount":{"type":"integer","minimum":0},"providerUnavailableCount":{"type":"integer","minimum":0},"timeoutCount":{"type":"integer","minimum":0},"rateLimitedCount":{"type":"integer","minimum":0},"knowledgeIndexUnavailableCount":{"type":"integer","minimum":0},"malformedModelOutputCount":{"type":"integer","minimum":0},"postGenerationDependencyFailureCount":{"type":"integer","minimum":0},"sumLatencyMs":{"type":"integer","minimum":0},"latencySampleCount":{"type":"integer","minimum":0},"sumEstimatedCostUsd":{"type":"number","minimum":0},"costSampleCount":{"type":"integer","minimum":0}},"required":["totalCount","deliveredCount","groundedCount","partialCount","insufficientInformationCount","generalConversationalCount","costCeilingBlockedCount","providerUnavailableCount","timeoutCount","rateLimitedCount","knowledgeIndexUnavailableCount","malformedModelOutputCount","postGenerationDependencyFailureCount","sumLatencyMs","latencySampleCount","sumEstimatedCostUsd","costSampleCount"]},"byIssuer":{"type":"array","items":{"type":"object","properties":{"totalCount":{"type":"integer","minimum":0},"deliveredCount":{"type":"integer","minimum":0},"groundedCount":{"type":"integer","minimum":0},"partialCount":{"type":"integer","minimum":0},"insufficientInformationCount":{"type":"integer","minimum":0},"generalConversationalCount":{"type":"integer","minimum":0},"costCeilingBlockedCount":{"type":"integer","minimum":0},"providerUnavailableCount":{"type":"integer","minimum":0},"timeoutCount":{"type":"integer","minimum":0},"rateLimitedCount":{"type":"integer","minimum":0},"knowledgeIndexUnavailableCount":{"type":"integer","minimum":0},"malformedModelOutputCount":{"type":"integer","minimum":0},"postGenerationDependencyFailureCount":{"type":"integer","minimum":0},"sumLatencyMs":{"type":"integer","minimum":0},"latencySampleCount":{"type":"integer","minimum":0},"sumEstimatedCostUsd":{"type":"number","minimum":0},"costSampleCount":{"type":"integer","minimum":0},"issuerId":{"type":"string"}},"required":["totalCount","deliveredCount","groundedCount","partialCount","insufficientInformationCount","generalConversationalCount","costCeilingBlockedCount","providerUnavailableCount","timeoutCount","rateLimitedCount","knowledgeIndexUnavailableCount","malformedModelOutputCount","postGenerationDependencyFailureCount","sumLatencyMs","latencySampleCount","sumEstimatedCostUsd","costSampleCount","issuerId"]}}},"required":["range","platform","byIssuer"]}}}},"401":{"description":"No valid backoffice session (relayed from Analytics)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not authorized (relayed from Analytics)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/fans/{fanId}/account-deletion-status":{"get":{"tags":["backoffice","identity","ai-channel"],"description":"This BFF's OWN composition (never a plain proxy) of Identity's GET /internal/fans/:fanId/account-deletion-status and AI-Channel's GET /internal/ai/fan-redactions/:fanId, both service-identity-authenticated calls this BFF makes on its own behalf. A single, explicit fanId lookup ONLY — there is no list/search/browse route anywhere in this BFF for fans, by design. Requires an active backoffice admin session (either role — same gate as GET /audit); the admin's own live session is checked via a fresh POST /internal/backoffice/authorization-check call, since neither downstream internal route itself authenticates the calling admin. A fan that was never deleted returns a fully-formed 200 (deactivated: false, auditEntries: [], externalIdentityCleanup: null, aiRedaction.status: not_applicable) — never a 404.","responses":{"200":{"description":"Composed account-deletion status","content":{"application/json":{"schema":{"type":"object","properties":{"fanId":{"type":"string"},"deactivated":{"type":"boolean"},"auditEntries":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string"},"reauthMethod":{"type":"string"},"correlationId":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"}},"required":["action","reauthMethod","correlationId","createdAt"]}},"externalIdentityCleanup":{"type":["object","null"],"properties":{"status":{"type":"string","enum":["pending","complete","dead_letter"]},"attempts":{"type":"integer","minimum":0}},"required":["status","attempts"]},"aiRedaction":{"type":"object","properties":{"status":{"type":"string","enum":["not_applicable","pending","complete","dead_letter"]},"attempts":{"type":"integer","minimum":0},"completedAt":{"type":["string","null"]}},"required":["status","attempts","completedAt"]}},"required":["fanId","deactivated","auditEntries","externalIdentityCleanup","aiRedaction"]}}}},"400":{"description":"fanId is not a well-formed identifier","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"No valid backoffice session, or the session is no longer active","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/issuers/{issuerId}/membership/integrations":{"get":{"tags":["backoffice","membership"],"description":"Proxies Membership's GET /backoffice/issuers/{issuerId}/integrations. A platform-wide admin/admin_manager manages ANY issuer here — no per-issuer membership is required or checked anywhere (Membership's own live Identity backoffice authorization-check is the only gate). An issuer with no integration returns items: []. Never returns the provider API key or its Secret Manager reference.","responses":{"200":{"description":"The issuer's membership provider integrations","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","enum":["t2v"]},"status":{"type":"string","enum":["enabled","disabled"]},"config":{"type":["object","null"],"properties":{"baseUrl":{"type":"string"},"pavilionId":{"type":"string"},"apiId":{"type":"string"}},"required":["baseUrl","pavilionId","apiId"]},"hasSecret":{"type":"boolean"},"health":{"type":["object","null"],"properties":{"lastSuccessfulProviderSyncAt":{"type":["string","null"],"format":"date-time"},"lastProviderSyncAttemptAt":{"type":["string","null"],"format":"date-time"},"lastProviderSyncErrorAt":{"type":["string","null"],"format":"date-time"},"lastProviderSyncErrorCode":{"type":["string","null"]},"consecutiveProviderSyncFailures":{"type":"integer","minimum":0},"lastSuccessfulAttendanceSyncAt":{"type":["string","null"],"format":"date-time"},"lastAttendanceSyncErrorAt":{"type":["string","null"],"format":"date-time"},"lastAttendanceSyncErrorCode":{"type":["string","null"]}},"required":["lastSuccessfulProviderSyncAt","lastProviderSyncAttemptAt","lastProviderSyncErrorAt","lastProviderSyncErrorCode","consecutiveProviderSyncFailures","lastSuccessfulAttendanceSyncAt","lastAttendanceSyncErrorAt","lastAttendanceSyncErrorCode"]},"disabledAt":{"type":["string","null"],"format":"date-time"},"disabledReason":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["provider","status","config","hasSecret","health","disabledAt","disabledReason","createdAt","updatedAt"]}}},"required":["items"]}}}},"403":{"description":"No active backoffice admin session (relayed from Membership)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/issuers/{issuerId}/membership/integrations/{provider}/config":{"put":{"tags":["backoffice","membership"],"description":"Proxies Membership's PUT /backoffice/issuers/{issuerId}/integrations/{provider}/config. The raw provider apiKey is forwarded byte-for-byte and never logged, persisted or echoed back. Does not enable the integration.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"baseUrl":{"type":"string","format":"uri"},"pavilionId":{"type":"string","minLength":1,"maxLength":200},"apiId":{"type":"string","minLength":1,"maxLength":200},"apiKey":{"type":"string","minLength":1,"maxLength":4000}},"required":["baseUrl","pavilionId","apiId","apiKey"]}}}},"responses":{"200":{"description":"The updated integration","content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","enum":["t2v"]},"status":{"type":"string","enum":["enabled","disabled"]},"config":{"type":["object","null"],"properties":{"baseUrl":{"type":"string"},"pavilionId":{"type":"string"},"apiId":{"type":"string"}},"required":["baseUrl","pavilionId","apiId"]},"hasSecret":{"type":"boolean"},"health":{"type":["object","null"],"properties":{"lastSuccessfulProviderSyncAt":{"type":["string","null"],"format":"date-time"},"lastProviderSyncAttemptAt":{"type":["string","null"],"format":"date-time"},"lastProviderSyncErrorAt":{"type":["string","null"],"format":"date-time"},"lastProviderSyncErrorCode":{"type":["string","null"]},"consecutiveProviderSyncFailures":{"type":"integer","minimum":0},"lastSuccessfulAttendanceSyncAt":{"type":["string","null"],"format":"date-time"},"lastAttendanceSyncErrorAt":{"type":["string","null"],"format":"date-time"},"lastAttendanceSyncErrorCode":{"type":["string","null"]}},"required":["lastSuccessfulProviderSyncAt","lastProviderSyncAttemptAt","lastProviderSyncErrorAt","lastProviderSyncErrorCode","consecutiveProviderSyncFailures","lastSuccessfulAttendanceSyncAt","lastAttendanceSyncErrorAt","lastAttendanceSyncErrorCode"]},"disabledAt":{"type":["string","null"],"format":"date-time"},"disabledReason":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["provider","status","config","hasSecret","health","disabledAt","disabledReason","createdAt","updatedAt"]}}}},"400":{"description":"VALIDATION_ERROR — malformed body, or a baseUrl rejected by Membership's own SSRF check (relayed with its deliberately non-leaky message)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown provider (relayed from Membership)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/issuers/{issuerId}/membership/integrations/{provider}/enable":{"post":{"tags":["backoffice","membership"],"description":"Proxies Membership's POST /backoffice/issuers/{issuerId}/integrations/{provider}/enable.","responses":{"200":{"description":"The enabled integration","content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","enum":["t2v"]},"status":{"type":"string","enum":["enabled","disabled"]},"config":{"type":["object","null"],"properties":{"baseUrl":{"type":"string"},"pavilionId":{"type":"string"},"apiId":{"type":"string"}},"required":["baseUrl","pavilionId","apiId"]},"hasSecret":{"type":"boolean"},"health":{"type":["object","null"],"properties":{"lastSuccessfulProviderSyncAt":{"type":["string","null"],"format":"date-time"},"lastProviderSyncAttemptAt":{"type":["string","null"],"format":"date-time"},"lastProviderSyncErrorAt":{"type":["string","null"],"format":"date-time"},"lastProviderSyncErrorCode":{"type":["string","null"]},"consecutiveProviderSyncFailures":{"type":"integer","minimum":0},"lastSuccessfulAttendanceSyncAt":{"type":["string","null"],"format":"date-time"},"lastAttendanceSyncErrorAt":{"type":["string","null"],"format":"date-time"},"lastAttendanceSyncErrorCode":{"type":["string","null"]}},"required":["lastSuccessfulProviderSyncAt","lastProviderSyncAttemptAt","lastProviderSyncErrorAt","lastProviderSyncErrorCode","consecutiveProviderSyncFailures","lastSuccessfulAttendanceSyncAt","lastAttendanceSyncErrorAt","lastAttendanceSyncErrorCode"]},"disabledAt":{"type":["string","null"],"format":"date-time"},"disabledReason":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["provider","status","config","hasSecret","health","disabledAt","disabledReason","createdAt","updatedAt"]}}}},"409":{"description":"MEMBERSHIP_INTEGRATION_NOT_CONFIGURED, or another provider is already enabled (relayed from Membership)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/issuers/{issuerId}/membership/integrations/{provider}/disable":{"post":{"tags":["backoffice","membership"],"description":"Proxies Membership's POST /backoffice/issuers/{issuerId}/integrations/{provider}/disable. An operational stop only — DELETES NOTHING: every membership, ticket, attendance record and sync-status row the integration ever produced is permanent.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":500}}}}}},"responses":{"200":{"description":"The disabled integration","content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","enum":["t2v"]},"status":{"type":"string","enum":["enabled","disabled"]},"config":{"type":["object","null"],"properties":{"baseUrl":{"type":"string"},"pavilionId":{"type":"string"},"apiId":{"type":"string"}},"required":["baseUrl","pavilionId","apiId"]},"hasSecret":{"type":"boolean"},"health":{"type":["object","null"],"properties":{"lastSuccessfulProviderSyncAt":{"type":["string","null"],"format":"date-time"},"lastProviderSyncAttemptAt":{"type":["string","null"],"format":"date-time"},"lastProviderSyncErrorAt":{"type":["string","null"],"format":"date-time"},"lastProviderSyncErrorCode":{"type":["string","null"]},"consecutiveProviderSyncFailures":{"type":"integer","minimum":0},"lastSuccessfulAttendanceSyncAt":{"type":["string","null"],"format":"date-time"},"lastAttendanceSyncErrorAt":{"type":["string","null"],"format":"date-time"},"lastAttendanceSyncErrorCode":{"type":["string","null"]}},"required":["lastSuccessfulProviderSyncAt","lastProviderSyncAttemptAt","lastProviderSyncErrorAt","lastProviderSyncErrorCode","consecutiveProviderSyncFailures","lastSuccessfulAttendanceSyncAt","lastAttendanceSyncErrorAt","lastAttendanceSyncErrorCode"]},"disabledAt":{"type":["string","null"],"format":"date-time"},"disabledReason":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["provider","status","config","hasSecret","health","disabledAt","disabledReason","createdAt","updatedAt"]}}}},"404":{"description":"No such integration for this issuer (relayed from Membership)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/issuers/{issuerId}/membership/memberships":{"get":{"tags":["backoffice","membership"],"description":"MEMBERSHIP-LIST-001 — proxies Membership's GET /backoffice/issuers/{issuerId}/memberships: the paginated, filterable, searchable listing of that issuer's memberships of EVERY source (provider, manual, csv_import). Query params (source — a comma-separated subset of provider,manual,csv_import — plus userId, search, cursor, limit) are forwarded unchanged; filtering, searching, ordering and cursor semantics are entirely Membership's. The { items, nextCursor } body is relayed verbatim.","parameters":[{"schema":{"type":"string"},"required":false,"name":"source","in":"query"},{"schema":{"type":"string"},"required":false,"name":"userId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"search","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string"},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"The page of memberships, exactly as Membership returned it","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"403":{"description":"Not an active Backoffice admin (relayed from Membership)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/issuers/{issuerId}/membership/manual-memberships":{"post":{"tags":["backoffice","membership"],"description":"Proxies Membership's POST /backoffice/issuers/{issuerId}/memberships/manual — the operator/admin fallback for a failing or wrong-data provider. A platform-wide admin/admin_manager does this for ANY issuer; the fan must already be verified, and Membership decides matching and duplicate detection. The response row is relayed verbatim.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"userMatch":{"type":"object","properties":{"verifiedEmail":{"type":"string","minLength":1},"verifiedDocumentIdentifier":{"type":"object","properties":{"type":{"type":"string","minLength":1},"value":{"type":"string","minLength":1}},"required":["type","value"]}}},"holderName":{"type":"string","minLength":1},"zone":{"type":"string","minLength":1},"section":{"type":"string","minLength":1},"row":{"type":"string","minLength":1},"seat":{"type":"string","minLength":1},"barcode":{"type":"object","properties":{"value":{"type":"string","minLength":1},"symbology":{"type":"string","enum":["code128","qr"]}},"required":["value","symbology"]},"tariff":{"type":"string"},"price":{"type":"string"},"requireApprovedKyc":{"type":"boolean"}},"required":["userMatch","holderName","zone","section","row","seat","barcode"]}}}},"responses":{"201":{"description":"The created manual membership, exactly as Membership returned it","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"404":{"description":"No verified fan matches the supplied userMatch (relayed from Membership)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Duplicate assignment (relayed from Membership)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/issuers/{issuerId}/membership/manual-memberships/{membershipId}":{"patch":{"tags":["backoffice","membership"],"description":"Proxies Membership's PATCH /backoffice/issuers/{issuerId}/memberships/manual/{membershipId}. Manually-sourced rows only — a provider-sourced row, a row of another issuer, or a nonexistent one is a 404 by design, relayed unchanged. A revoked row is an immutable historical record: Membership answers 409 MEMBERSHIP_REVOKED_IMMUTABLE for ANY field change, relayed unchanged — the Backoffice UI should never offer edit on such a row in the first place (see isMembershipEditable), so reaching this in practice means a race with a concurrent revoke.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"holderName":{"type":"string","minLength":1},"zone":{"type":"string","minLength":1},"section":{"type":"string","minLength":1},"row":{"type":"string","minLength":1},"seat":{"type":"string","minLength":1},"barcode":{"type":"object","properties":{"value":{"type":"string","minLength":1},"symbology":{"type":"string","enum":["code128","qr"]}},"required":["value","symbology"]},"tariff":{"type":"string"},"price":{"type":"string"},"requireApprovedKyc":{"type":"boolean"}}}}}},"responses":{"200":{"description":"The updated manual membership","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"404":{"description":"Not found, not manually sourced, or belongs to another issuer (relayed from Membership)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Already revoked — an immutable historical record. Membership's MEMBERSHIP_REVOKED_IMMUTABLE, relayed unchanged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["backoffice","membership"],"description":"Proxies Membership's DELETE /backoffice/issuers/{issuerId}/memberships/manual/{membershipId} — revokes a manually-assigned membership. Manually-sourced rows only, same 404 semantics as the edit route. Revocation is a state transition, not a delete — the revoked row (with revokedAt set) is returned, never an empty 204. An already-revoked row is immutable: Membership answers 409 MEMBERSHIP_REVOKED_IMMUTABLE, relayed unchanged.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","enum":["manual","csv_correction","provider_sync","duplicate","other"]}}}}}},"responses":{"200":{"description":"Revoked — the row itself, with revokedAt set","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"404":{"description":"Not found, not manually sourced, or belongs to another issuer (relayed from Membership)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Already revoked — an immutable historical record. Membership's MEMBERSHIP_REVOKED_IMMUTABLE, relayed unchanged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/issuers/{issuerId}/membership/csv-import/preview":{"post":{"tags":["backoffice","membership"],"description":"Proxies Membership's POST /backoffice/issuers/{issuerId}/memberships/csv-import/preview — multipart/form-data, field name `file`. A pure DRY RUN: nothing is imported. The report (rows to create/update plus duplicates, unknown users, invalid rows and warnings) is Membership's own shape and is relayed verbatim.","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{}}}}}},"responses":{"200":{"description":"The dry-run import report","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"No file supplied, or a CSV Membership refuses (relayed unchanged)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/issuers/{issuerId}/membership/csv-import/confirm":{"post":{"tags":["backoffice","membership"],"description":"Proxies Membership's POST /backoffice/issuers/{issuerId}/memberships/csv-import/confirm — the SAME multipart file is uploaded again plus confirmed=true, because Membership re-validates from scratch instead of trusting a cached preview token. Returns the report of what was actually imported.","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{}}}}}},"responses":{"200":{"description":"The applied import report","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"No file supplied, or a CSV Membership refuses (relayed unchanged)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/mobile-releases":{"get":{"tags":["backoffice","mobile"],"responses":{"200":{"description":"Mobile release policies","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"platform":{"type":"string","enum":["ios","android"]},"minimumSupportedBuild":{"type":["integer","null"],"exclusiveMinimum":0},"minimumSupportedVersion":{"type":["string","null"]},"latestAvailableBuild":{"type":["integer","null"],"exclusiveMinimum":0},"latestAvailableVersion":{"type":["string","null"]},"storeUrl":{"type":["string","null"],"format":"uri"},"updateMessage":{"type":["string","null"]},"updatedAt":{"type":["string","null"],"format":"date-time"},"updatedBy":{"type":["string","null"],"format":"uuid"},"blockedBuilds":{"type":"array","items":{"type":"object","properties":{"platform":{"type":"string","enum":["ios","android"]},"build":{"type":"integer","exclusiveMinimum":0},"appVersion":{"type":["string","null"]},"reason":{"type":"string"},"userMessage":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string","format":"uuid"}},"required":["platform","build","appVersion","reason","userMessage","createdAt","createdBy"]}}},"required":["platform","minimumSupportedBuild","minimumSupportedVersion","latestAvailableBuild","latestAvailableVersion","storeUrl","updateMessage","updatedAt","updatedBy","blockedBuilds"]}}},"required":["items"]}}}}}}},"/mobile-releases/{platform}":{"put":{"tags":["backoffice","mobile"],"parameters":[{"schema":{"type":"string","enum":["ios","android"]},"required":true,"name":"platform","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"minimumSupportedBuild":{"type":["integer","null"],"exclusiveMinimum":0},"minimumSupportedVersion":{"type":["string","null"],"minLength":1,"maxLength":50},"latestAvailableBuild":{"type":"integer","exclusiveMinimum":0},"latestAvailableVersion":{"type":"string","minLength":1,"maxLength":50},"storeUrl":{"type":"string","format":"uri"},"reason":{"type":"string","minLength":10,"maxLength":500},"storeAvailabilityConfirmed":{"type":"boolean"}},"required":["minimumSupportedBuild","minimumSupportedVersion","latestAvailableBuild","latestAvailableVersion","storeUrl","reason","storeAvailabilityConfirmed"]}}}},"responses":{"200":{"description":"Updated policy","content":{"application/json":{"schema":{"type":"object","properties":{"platform":{"type":"string","enum":["ios","android"]},"minimumSupportedBuild":{"type":["integer","null"],"exclusiveMinimum":0},"minimumSupportedVersion":{"type":["string","null"]},"latestAvailableBuild":{"type":["integer","null"],"exclusiveMinimum":0},"latestAvailableVersion":{"type":["string","null"]},"storeUrl":{"type":["string","null"],"format":"uri"},"updateMessage":{"type":["string","null"]},"updatedAt":{"type":["string","null"],"format":"date-time"},"updatedBy":{"type":["string","null"],"format":"uuid"},"blockedBuilds":{"type":"array","items":{"type":"object","properties":{"platform":{"type":"string","enum":["ios","android"]},"build":{"type":"integer","exclusiveMinimum":0},"appVersion":{"type":["string","null"]},"reason":{"type":"string"},"userMessage":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string","format":"uuid"}},"required":["platform","build","appVersion","reason","userMessage","createdAt","createdBy"]}}},"required":["platform","minimumSupportedBuild","minimumSupportedVersion","latestAvailableBuild","latestAvailableVersion","storeUrl","updateMessage","updatedAt","updatedBy","blockedBuilds"]}}}}}}},"/mobile-releases/{platform}/blocked-builds":{"post":{"tags":["backoffice","mobile"],"parameters":[{"schema":{"type":"string","enum":["ios","android"]},"required":true,"name":"platform","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"build":{"type":"integer","exclusiveMinimum":0},"appVersion":{"type":"string","minLength":1,"maxLength":50},"reason":{"type":"string","minLength":10,"maxLength":500},"storeAvailabilityConfirmed":{"type":"boolean"}},"required":["build","reason","storeAvailabilityConfirmed"]}}}},"responses":{"201":{"description":"Blocked build","content":{"application/json":{"schema":{"type":"object","properties":{"platform":{"type":"string","enum":["ios","android"]},"minimumSupportedBuild":{"type":["integer","null"],"exclusiveMinimum":0},"minimumSupportedVersion":{"type":["string","null"]},"latestAvailableBuild":{"type":["integer","null"],"exclusiveMinimum":0},"latestAvailableVersion":{"type":["string","null"]},"storeUrl":{"type":["string","null"],"format":"uri"},"updateMessage":{"type":["string","null"]},"updatedAt":{"type":["string","null"],"format":"date-time"},"updatedBy":{"type":["string","null"],"format":"uuid"},"blockedBuilds":{"type":"array","items":{"type":"object","properties":{"platform":{"type":"string","enum":["ios","android"]},"build":{"type":"integer","exclusiveMinimum":0},"appVersion":{"type":["string","null"]},"reason":{"type":"string"},"userMessage":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string","format":"uuid"}},"required":["platform","build","appVersion","reason","userMessage","createdAt","createdBy"]}}},"required":["platform","minimumSupportedBuild","minimumSupportedVersion","latestAvailableBuild","latestAvailableVersion","storeUrl","updateMessage","updatedAt","updatedBy","blockedBuilds"]}}}}}}},"/mobile-releases/{platform}/blocked-builds/{build}":{"delete":{"tags":["backoffice","mobile"],"parameters":[{"schema":{"type":"string","enum":["ios","android"]},"required":true,"name":"platform","in":"path"},{"schema":{"type":"string"},"required":true,"name":"build","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":10,"maxLength":500}},"required":["reason"]}}}},"responses":{"200":{"description":"Unblocked build","content":{"application/json":{"schema":{"type":"object","properties":{"platform":{"type":"string","enum":["ios","android"]},"minimumSupportedBuild":{"type":["integer","null"],"exclusiveMinimum":0},"minimumSupportedVersion":{"type":["string","null"]},"latestAvailableBuild":{"type":["integer","null"],"exclusiveMinimum":0},"latestAvailableVersion":{"type":["string","null"]},"storeUrl":{"type":["string","null"],"format":"uri"},"updateMessage":{"type":["string","null"]},"updatedAt":{"type":["string","null"],"format":"date-time"},"updatedBy":{"type":["string","null"],"format":"uuid"},"blockedBuilds":{"type":"array","items":{"type":"object","properties":{"platform":{"type":"string","enum":["ios","android"]},"build":{"type":"integer","exclusiveMinimum":0},"appVersion":{"type":["string","null"]},"reason":{"type":"string"},"userMessage":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string","format":"uuid"}},"required":["platform","build","appVersion","reason","userMessage","createdAt","createdBy"]}}},"required":["platform","minimumSupportedBuild","minimumSupportedVersion","latestAvailableBuild","latestAvailableVersion","storeUrl","updateMessage","updatedAt","updatedBy","blockedBuilds"]}}}}}}},"/xp/fans/{fanId}/corrections":{"post":{"tags":["xp"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"fanId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"Idempotency-Key","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"integer","minimum":-2147483647,"maximum":2147483647},"reasonCode":{"type":"string","enum":["incorrect_award","missing_award","support_adjustment"]}},"required":["amount","reasonCode"],"additionalProperties":false}}}},"responses":{"200":{"description":"Available balance corrected","content":{"application/json":{"schema":{"type":"object","properties":{"correctionId":{"type":"string","format":"uuid"},"ledgerEntryId":{"type":"string","format":"uuid"},"availableBefore":{"type":"integer","minimum":0},"availableAfter":{"type":"integer","minimum":0},"amount":{"type":"integer"},"reasonCode":{"type":"string","enum":["incorrect_award","missing_award","support_adjustment"]}},"required":["correctionId","ledgerEntryId","availableBefore","availableAfter","amount","reasonCode"]}}}},"400":{"description":"Invalid adjustment or insufficient balance"},"401":{"description":"Session or fresh MFA required"},"403":{"description":"Administrator authorization required"},"404":{"description":"Fan balance not found"},"409":{"description":"Idempotency conflict"}}}}},"webhooks":{}}