{
  "openapi": "3.1.0",
  "info": {
    "title": "People's Court Partner API",
    "version": "2026-07-23",
    "description": "Operator-provisioned, tenant-scoped API for fee and rules discovery, claimant-side case access, guarded dispute filing, and evidence submission. This contract does not expose adjudication, award signoff or service, settlement execution, funds movement, credential management, or administrative actions."
  },
  "servers": [
    {
      "url": "https://example.invalid",
      "description": "Replace with the operator-provided People's Court API origin."
    }
  ],
  "tags": [
    {
      "name": "Public"
    },
    {
      "name": "Cases"
    },
    {
      "name": "Filings"
    },
    {
      "name": "Evidence"
    }
  ],
  "webhooks": {
    "caseNotification": {
      "post": {
        "operationId": "receiveCaseNotification",
        "summary": "Receive an informational agent case event",
        "description": "Sent at least once to the registered agent endpoint. Use x-arb-event-id as the idempotency key, return a 2xx response promptly, and fetch authenticated case state before acting. Delivery may be duplicated or arrive out of order. HTTP 408, 425, 429, and 5xx responses are retried with bounded backoff; other 4xx responses are terminal. The payload intentionally excludes filings, evidence, restatements, messages, and decision text.",
        "parameters": [
          {
            "name": "x-arb-event-id",
            "in": "header",
            "required": true,
            "description": "Stable identifier reused for every retry of this logical event.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CaseNotificationWebhookV1"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Event accepted"
          }
        }
      }
    }
  },
  "paths": {
    "/api/v1/fees/quote": {
      "get": {
        "tags": [
          "Public"
        ],
        "operationId": "quoteFilingFee",
        "summary": "Quote the current filing fee",
        "security": [],
        "parameters": [
          {
            "name": "amount",
            "in": "query",
            "required": true,
            "schema": {
              "type": "number",
              "minimum": 0
            }
          },
          {
            "name": "declaratoryOnly",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Fee quote",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeeQuoteEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/rules/current": {
      "get": {
        "tags": [
          "Public"
        ],
        "operationId": "getCurrentRules",
        "summary": "Get the current public rules stamp",
        "security": [],
        "responses": {
          "200": {
            "description": "Current rules version and hashes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RulesEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cases/{caseId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/CaseId"
        }
      ],
      "get": {
        "tags": [
          "Cases"
        ],
        "operationId": "getCase",
        "summary": "Get a claimant-scoped case summary",
        "security": [
          {
            "partnerBearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Party-safe case summary",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaseEnvelope"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/cases/{caseId}/docket": {
      "parameters": [
        {
          "$ref": "#/components/parameters/CaseId"
        }
      ],
      "get": {
        "tags": [
          "Cases"
        ],
        "operationId": "getDocket",
        "summary": "Get the claimant-visible docket",
        "security": [
          {
            "partnerBearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Party-visible docket",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocketEnvelope"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/cases/{caseId}/award": {
      "parameters": [
        {
          "$ref": "#/components/parameters/CaseId"
        }
      ],
      "get": {
        "tags": [
          "Cases"
        ],
        "operationId": "getServedAward",
        "summary": "Get a formally served award",
        "description": "An unserved award is never returned.",
        "security": [
          {
            "partnerBearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Served party-facing award",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AwardEnvelope"
                }
              }
            }
          },
          "409": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/cases/{caseId}/award/artifacts/{kind}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/CaseId"
        },
        {
          "name": "kind",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "enum": [
              "pdf",
              "docx",
              "json"
            ]
          }
        }
      ],
      "get": {
        "tags": [
          "Cases"
        ],
        "operationId": "downloadAwardArtifact",
        "summary": "Download an exact immutable served-award artifact",
        "description": "Returns bytes only for a served recipe-v3 award. Verify the digest and detached signature using artifactAttestation from getServedAward.",
        "security": [
          {
            "partnerBearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Exact bytes referenced by the signed award manifest",
            "headers": {
              "x-award-artifact-sha256": {
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{64}$"
                }
              },
              "x-award-manifest-id": {
                "schema": {
                  "type": "string"
                }
              },
              "x-award-revision": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/vnd.openxmlformats-officedocument.wordprocessingml.document": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/json": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "409": {
            "$ref": "#/components/responses/Problem"
          },
          "500": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/cases/{caseId}/record-bundle": {
      "parameters": [
        {
          "$ref": "#/components/parameters/CaseId"
        },
        {
          "name": "format",
          "in": "query",
          "required": false,
          "schema": {
            "type": "string",
            "enum": [
              "bundle",
              "manifest"
            ],
            "default": "bundle"
          }
        }
      ],
      "get": {
        "tags": [
          "Cases"
        ],
        "operationId": "downloadCaseRecordBundle",
        "summary": "Get the authenticated party-scoped portable case record",
        "description": "The server fixes the visibility profile and party side from the tenant-bound case credential. Callers cannot select another side or an operator/court profile. The bundle is canonical JSON with base64 file entries and can be verified offline.",
        "security": [
          {
            "partnerBearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Bundle bytes or its integrity manifest",
            "headers": {
              "x-case-record-bundle-id": {
                "schema": {
                  "type": "string"
                }
              },
              "x-case-record-bundle-hash": {
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{64}$"
                }
              },
              "x-case-record-artifact-sha256": {
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{64}$"
                }
              },
              "x-case-record-profile": {
                "schema": {
                  "const": "party"
                }
              },
              "x-case-record-party-side": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "claimant",
                    "respondent"
                  ]
                }
              }
            },
            "content": {
              "application/vnd.peoplescourt.case-record+json": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaseRecordBundleManifestEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "413": {
            "$ref": "#/components/responses/Problem"
          },
          "500": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/filings/prepare": {
      "post": {
        "tags": [
          "Filings"
        ],
        "operationId": "prepareFiling",
        "summary": "Prepare a guarded filing",
        "description": "Validates a registered policy, delegated authority grant, and two distinct pre-registered consent artifacts. This operation reserves case identifiers but does not open a dispute.",
        "security": [
          {
            "partnerBearer": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PrepareFilingRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Prepared filing requiring a separate exact confirmation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PreparedFilingEnvelope"
                }
              }
            }
          },
          "409": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/filings/{draftId}/confirm": {
      "parameters": [
        {
          "name": "draftId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^pfd_[0-9a-f-]{36}$"
          }
        }
      ],
      "post": {
        "tags": [
          "Filings"
        ],
        "operationId": "confirmFiling",
        "summary": "Confirm and open one prepared dispute",
        "description": "This is a hard-to-undo protocol act. The server revalidates authority, consent, policy, rules, fee, expiry, revocation, digest, and exact confirmation text before opening the case.",
        "security": [
          {
            "partnerBearer": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfirmFilingRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Case opened",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConfirmedFilingEnvelope"
                }
              }
            }
          },
          "409": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/cases/{caseId}/submissions": {
      "parameters": [
        {
          "$ref": "#/components/parameters/CaseId"
        }
      ],
      "post": {
        "tags": [
          "Evidence"
        ],
        "operationId": "submitEvidence",
        "summary": "File claimant-side evidence in the open phase",
        "description": "Accepts a bounded text brief and optional direct file uploads. The server derives party, actor, principal, provenance, and protocol certification from tenant and authority records. These fields are not accepted from the request. An otherwise valid upload is rejected with 413 before persistence if its escaped atomic database transaction would exceed the safe transport envelope.",
        "security": [
          {
            "partnerBearer": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "brief": {
                    "type": "string"
                  },
                  "challenges": {
                    "type": "string",
                    "description": "JSON array of evidenceId and ground objects."
                  },
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Submission sealed in the current phase",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubmissionEnvelope"
                }
              }
            }
          },
          "409": {
            "$ref": "#/components/responses/Problem"
          },
          "413": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "partnerBearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "opaque",
        "description": "Operator-issued pk_test or pk_live credential. Never put this value in an MCP tool argument, URL, log, or source file."
      }
    },
    "parameters": {
      "CaseId": {
        "name": "caseId",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "pattern": "^pcase_[A-Za-z0-9_-]{1,96}$"
        }
      },
      "IdempotencyKey": {
        "name": "Idempotency-Key",
        "in": "header",
        "required": true,
        "schema": {
          "type": "string",
          "minLength": 8,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9._:-]+$"
        }
      }
    },
    "responses": {
      "Problem": {
        "description": "Stable problem response",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Problem"
            }
          }
        }
      }
    },
    "schemas": {
      "RequestId": {
        "type": "string",
        "pattern": "^req_"
      },
      "Problem": {
        "type": "object",
        "required": [
          "type",
          "title",
          "status",
          "code",
          "detail",
          "requestId"
        ],
        "properties": {
          "type": {
            "type": "string",
            "format": "uri"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "code": {
            "type": "string"
          },
          "detail": {
            "type": "string"
          },
          "requestId": {
            "type": "string"
          },
          "request_id": {
            "type": "string"
          },
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "details": {}
            }
          }
        }
      },
      "FeeQuote": {
        "type": "object",
        "required": [
          "currency",
          "amountInDispute",
          "feeUsd",
          "waived"
        ],
        "properties": {
          "currency": {
            "const": "USD"
          },
          "amountInDispute": {
            "type": "number"
          },
          "declaratoryOnly": {
            "type": "boolean"
          },
          "mode": {
            "enum": [
              "off",
              "waived",
              "collect"
            ]
          },
          "feeUsd": {
            "type": "number"
          },
          "feeDisplay": {
            "type": "string"
          },
          "explanation": {
            "type": "string"
          },
          "waived": {
            "type": "boolean"
          }
        }
      },
      "FeeQuoteEnvelope": {
        "type": "object",
        "required": [
          "data",
          "requestId"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/FeeQuote"
          },
          "requestId": {
            "type": "string"
          }
        }
      },
      "Rules": {
        "type": "object",
        "required": [
          "rulesVersion",
          "rulesHash",
          "rulesetId",
          "dynamicRulesetId"
        ],
        "properties": {
          "rulesVersion": {
            "type": "string"
          },
          "rulesHash": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "rulesetId": {
            "type": "string"
          },
          "dynamicRulesetId": {
            "type": "string"
          }
        }
      },
      "RulesEnvelope": {
        "type": "object",
        "required": [
          "data",
          "requestId"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Rules"
          },
          "requestId": {
            "type": "string"
          }
        }
      },
      "CaseNotificationEventTypeV1": {
        "type": "string",
        "enum": [
          "case_docketed",
          "case_notice_sent",
          "answer_filed",
          "filing_received",
          "opponent_filed",
          "phase_advanced",
          "phase_forfeited",
          "respondent_defaulted",
          "joint_reveal",
          "restatement_ready",
          "restatement_response",
          "testimony_session_directed",
          "testimony_session_held",
          "testimony_session_vacated",
          "neutrality_disclosed",
          "arbitrator_recused",
          "message_received",
          "procedural_direction",
          "decision_served",
          "award_finalized",
          "award_executed",
          "award_corrected",
          "appeal_filed",
          "appeal_docketed",
          "appeal_decided",
          "additional_award_issued",
          "settlement_action_required",
          "settlement_completed"
        ]
      },
      "CaseNotificationWebhookV1": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schemaVersion",
          "type",
          "disputeId",
          "occurredAt",
          "actionRequired",
          "caseUrl"
        ],
        "properties": {
          "schemaVersion": {
            "const": "case-notification-v1"
          },
          "type": {
            "$ref": "#/components/schemas/CaseNotificationEventTypeV1"
          },
          "disputeId": {
            "type": "string"
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "actionRequired": {
            "type": "boolean"
          },
          "deadlineAt": {
            "type": "string",
            "format": "date-time"
          },
          "caseUrl": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "PartnerCaseStatusV1": {
        "type": "string",
        "enum": [
          "awaiting_party_response",
          "evidence_open",
          "adjudicating",
          "review_required",
          "decision_served",
          "settlement_required",
          "settlement_pending",
          "award_final",
          "settled",
          "service_hold",
          "closed"
        ]
      },
      "CaseSummary": {
        "type": "object",
        "required": [
          "caseId",
          "externalCaseId",
          "status",
          "accessSide"
        ],
        "properties": {
          "caseId": {
            "type": "string"
          },
          "externalCaseId": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/PartnerCaseStatusV1"
          },
          "accessSide": {
            "const": "claimant"
          },
          "revision": {
            "type": "integer"
          },
          "summary": {
            "type": "string"
          },
          "amount": {
            "$ref": "#/components/schemas/CaseAmount"
          },
          "claimant": {
            "$ref": "#/components/schemas/CasePartySummary"
          },
          "respondent": {
            "$ref": "#/components/schemas/CasePartySummary"
          },
          "rulesVersion": {
            "type": "string"
          },
          "rulesHash": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "claims": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PleadedClaim"
            }
          },
          "juridicalSeat": {
            "$ref": "#/components/schemas/JuridicalSeat"
          },
          "substantiveLawSelection": {
            "type": "object",
            "properties": {
              "value": {
                "type": "string"
              },
              "source": {
                "type": "string"
              },
              "method": {
                "type": "string"
              }
            }
          },
          "tribunal": {
            "$ref": "#/components/schemas/PublicTribunalIdentity"
          },
          "appeal": {
            "$ref": "#/components/schemas/AppealSummary"
          },
          "representatives": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "representativeUserId": {
                  "type": "string"
                },
                "scopes": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "acceptedAt": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          },
          "publicOpinions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "citation": {
                  "type": "string"
                },
                "slug": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "AppealSummary": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "filedBy",
          "filedAt",
          "status"
        ],
        "properties": {
          "filedBy": {
            "type": "string",
            "enum": [
              "claimant",
              "respondent"
            ]
          },
          "filedAt": {
            "type": "string",
            "format": "date-time"
          },
          "answerDueAt": {
            "type": "string",
            "format": "date-time"
          },
          "briefingClosedAt": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string",
            "enum": [
              "payment_pending",
              "briefing",
              "under_review",
              "decided"
            ]
          },
          "outcome": {
            "type": "string",
            "enum": [
              "affirmed",
              "modified",
              "vacated",
              "substituted"
            ]
          }
        }
      },
      "CaseEnvelope": {
        "type": "object",
        "required": [
          "data",
          "requestId"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/CaseSummary"
          },
          "requestId": {
            "type": "string"
          }
        }
      },
      "DocketEnvelope": {
        "type": "object",
        "required": [
          "data",
          "requestId"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "docket"
            ],
            "properties": {
              "docket": {
                "type": "object",
                "required": [
                  "caseId",
                  "entries"
                ],
                "properties": {
                  "caseId": {
                    "type": "string"
                  },
                  "entries": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "requestId": {
            "type": "string"
          }
        }
      },
      "AwardEnvelope": {
        "type": "object",
        "required": [
          "data",
          "requestId"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "caseId",
              "externalCaseId",
              "award"
            ],
            "properties": {
              "caseId": {
                "type": "string"
              },
              "externalCaseId": {
                "type": "string"
              },
              "award": {
                "$ref": "#/components/schemas/ServedAwardDecision"
              }
            }
          },
          "requestId": {
            "type": "string"
          }
        }
      },
      "ServedAwardDecision": {
        "type": "object",
        "required": [
          "id",
          "fundsInstructions",
          "dispositionLabel",
          "posture",
          "determinations",
          "awardHash",
          "awardRevision",
          "artifactAttestation"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "fundsInstructions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ServedFundsInstruction"
            }
          },
          "dispositionLabel": {
            "type": "string",
            "enum": [
              "claimant_prevails",
              "respondent_prevails",
              "split",
              "conditional"
            ]
          },
          "posture": {
            "type": "string",
            "enum": [
              "escrow_allocation",
              "money_obligation",
              "liability_only",
              "declaratory",
              "procedural_hold"
            ]
          },
          "determinations": {
            "$ref": "#/components/schemas/AwardDeterminations"
          },
          "claimDispositions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClaimDisposition"
            }
          },
          "signatureAttributions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AwardSignatureAttribution"
            }
          },
          "awardHash": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "awardHashVersion": {
            "type": "integer",
            "enum": [
              1,
              2,
              3
            ]
          },
          "awardRevision": {
            "type": "integer",
            "minimum": 1
          },
          "artifactAttestation": {
            "$ref": "#/components/schemas/AwardArtifactAttestation"
          },
          "releasedToParties": {
            "type": "boolean"
          },
          "releasedAt": {
            "type": "string",
            "format": "date-time"
          },
          "rulesVersion": {
            "type": "string"
          }
        },
        "additionalProperties": true
      },
      "AwardArtifactAttestation": {
        "type": "object",
        "required": [
          "recipeVersion",
          "awardRevision",
          "awardHash",
          "signature",
          "manifest",
          "artifacts"
        ],
        "properties": {
          "recipeVersion": {
            "const": 3
          },
          "awardRevision": {
            "type": "integer",
            "minimum": 1
          },
          "awardHash": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "signature": {
            "type": "object",
            "required": [
              "signerAddress",
              "signature",
              "algorithm",
              "signedHash",
              "signedAt"
            ],
            "properties": {
              "signerAddress": {
                "type": "string"
              },
              "signature": {
                "type": "string"
              },
              "algorithm": {
                "type": "string",
                "const": "eip191"
              },
              "signedHash": {
                "type": "string"
              },
              "signedAt": {
                "type": "string",
                "format": "date-time"
              }
            }
          },
          "manifest": {
            "$ref": "#/components/schemas/AwardArtifactManifest"
          },
          "artifacts": {
            "type": "array",
            "minItems": 3,
            "maxItems": 3,
            "items": {
              "type": "object",
              "required": [
                "artifactId",
                "kind",
                "mediaType",
                "byteLength",
                "sha256",
                "canonical",
                "downloadPath"
              ],
              "properties": {
                "artifactId": {
                  "type": "string"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "pdf",
                    "docx",
                    "json"
                  ]
                },
                "mediaType": {
                  "type": "string"
                },
                "byteLength": {
                  "type": "integer",
                  "minimum": 0
                },
                "sha256": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{64}$"
                },
                "canonical": {
                  "type": "boolean"
                },
                "downloadPath": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "AwardArtifactManifest": {
        "type": "object",
        "required": [
          "recipeVersion",
          "manifestId",
          "awardRevision",
          "rulesVersion",
          "disputeId",
          "dispositionId",
          "createdAt",
          "artifacts"
        ],
        "properties": {
          "recipeVersion": {
            "const": 3
          },
          "manifestId": {
            "type": "string"
          },
          "awardRevision": {
            "type": "integer",
            "minimum": 1
          },
          "rulesVersion": {
            "type": "string"
          },
          "disputeId": {
            "type": "string",
            "description": "Opaque internal identifier included only because it is part of the signed recipe-v3 proof."
          },
          "dispositionId": {
            "type": "string",
            "description": "Opaque internal identifier included only because it is part of the signed recipe-v3 proof."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "tribunalDesignation": {
            "type": "string"
          },
          "juridicalSeat": {
            "$ref": "#/components/schemas/JuridicalSeat"
          },
          "signatureAttributions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AwardSignatureAttribution"
            }
          },
          "artifacts": {
            "type": "array",
            "minItems": 3,
            "maxItems": 3,
            "items": {
              "$ref": "#/components/schemas/AwardArtifactManifestEntry"
            }
          }
        }
      },
      "PleadedClaim": {
        "type": "object",
        "required": [
          "claimId",
          "party",
          "title",
          "statement",
          "reliefIds"
        ],
        "properties": {
          "claimId": {
            "type": "string"
          },
          "party": {
            "type": "string",
            "enum": [
              "claimant",
              "respondent"
            ]
          },
          "title": {
            "type": "string"
          },
          "statement": {
            "type": "string"
          },
          "reliefIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "JuridicalSeat": {
        "type": "object",
        "required": [
          "city",
          "state",
          "country",
          "arbitrationLaw",
          "source"
        ],
        "properties": {
          "city": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "arbitrationLaw": {
            "type": "string",
            "const": "FAA"
          },
          "excludesStateArbitrationAct": {
            "type": "string"
          },
          "source": {
            "type": "string"
          }
        }
      },
      "PublicTribunalIdentity": {
        "type": "object",
        "required": [
          "designation",
          "kind",
          "assignedAt"
        ],
        "properties": {
          "designation": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "ai",
              "human",
              "hybrid"
            ]
          },
          "assignedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ClaimDisposition": {
        "type": "object",
        "required": [
          "claimId",
          "status",
          "relief",
          "reasons"
        ],
        "properties": {
          "claimId": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "granted",
              "granted_in_part",
              "denied",
              "dismissed",
              "outside_jurisdiction",
              "withdrawn"
            ]
          },
          "relief": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "reliefId",
                "status",
                "description"
              ],
              "properties": {
                "reliefId": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "granted",
                    "granted_in_part",
                    "denied",
                    "dismissed",
                    "outside_jurisdiction",
                    "withdrawn"
                  ]
                },
                "description": {
                  "type": "string"
                }
              }
            }
          },
          "reasons": {
            "type": "string"
          }
        }
      },
      "AwardSignatureAttribution": {
        "type": "object",
        "required": [
          "signerId",
          "displayName",
          "title",
          "kind",
          "signedAt"
        ],
        "properties": {
          "signerId": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "title": {
            "type": "string",
            "enum": [
              "People's Court Tribunal (AI)",
              "Arbitrator"
            ]
          },
          "kind": {
            "type": "string",
            "enum": [
              "ai",
              "human"
            ]
          },
          "signedAt": {
            "type": "string",
            "format": "date-time"
          },
          "manifestSignerAddress": {
            "type": "string"
          }
        }
      },
      "AwardArtifactManifestEntry": {
        "type": "object",
        "required": [
          "artifactId",
          "kind",
          "mediaType",
          "byteLength",
          "sha256",
          "canonical"
        ],
        "properties": {
          "artifactId": {
            "type": "string",
            "description": "Opaque immutable-artifact identifier included because it is part of the signed proof."
          },
          "kind": {
            "type": "string",
            "enum": [
              "pdf",
              "docx",
              "json"
            ]
          },
          "mediaType": {
            "type": "string"
          },
          "byteLength": {
            "type": "integer",
            "minimum": 0
          },
          "sha256": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "canonical": {
            "type": "boolean"
          }
        }
      },
      "CaseRecordBundleManifestEnvelope": {
        "type": "object",
        "required": [
          "data",
          "requestId"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "manifest",
              "artifactSha256",
              "byteLength",
              "verification"
            ],
            "properties": {
              "manifest": {
                "$ref": "#/components/schemas/CaseRecordBundleManifest"
              },
              "artifactSha256": {
                "type": "string",
                "pattern": "^[0-9a-f]{64}$"
              },
              "byteLength": {
                "type": "integer",
                "minimum": 1
              },
              "verification": {
                "type": "object",
                "required": [
                  "ok",
                  "mode",
                  "bundleId",
                  "bundleHash"
                ],
                "properties": {
                  "ok": {
                    "const": true
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "persisted_snapshot_reuse",
                      "verified_at_creation"
                    ]
                  },
                  "bundleId": {
                    "type": "string",
                    "pattern": "^crb_[0-9a-f]{64}$"
                  },
                  "bundleHash": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$"
                  }
                }
              }
            }
          },
          "requestId": {
            "type": "string"
          }
        }
      },
      "CaseRecordBundleManifest": {
        "type": "object",
        "required": [
          "schemaVersion",
          "recipe",
          "disputeId",
          "caseRevision",
          "profile",
          "partySide",
          "sourceSnapshotHash",
          "rules",
          "snapshotAt",
          "files",
          "exclusions",
          "bundleId",
          "bundleHash"
        ],
        "properties": {
          "schemaVersion": {
            "const": "case-record-bundle-v1"
          },
          "recipe": {
            "const": "sha256-canonical-json-v1"
          },
          "disputeId": {
            "type": "string"
          },
          "dispositionId": {
            "type": "string"
          },
          "caseRevision": {
            "type": "integer",
            "minimum": 1
          },
          "awardRevision": {
            "type": "integer",
            "minimum": 1
          },
          "profile": {
            "const": "party"
          },
          "partySide": {
            "type": "string",
            "enum": [
              "claimant",
              "respondent"
            ]
          },
          "sourceSnapshotHash": {
            "type": "string",
            "description": "SHA-256 identity of the repeatable-read source snapshot and visibility profile from which this immutable bundle was built.",
            "pattern": "^[0-9a-f]{64}$"
          },
          "rules": {
            "type": "object",
            "properties": {
              "version": {
                "type": "string"
              },
              "sha256": {
                "type": "string",
                "pattern": "^[0-9a-f]{64}$"
              }
            }
          },
          "snapshotAt": {
            "type": "string",
            "format": "date-time"
          },
          "files": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "path",
                "mediaType",
                "byteLength",
                "sha256",
                "category"
              ],
              "properties": {
                "path": {
                  "type": "string"
                },
                "mediaType": {
                  "type": "string"
                },
                "byteLength": {
                  "type": "integer"
                },
                "sha256": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{64}$"
                },
                "sourceSha256": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{64}$"
                },
                "sourceId": {
                  "type": "string"
                },
                "category": {
                  "type": "string",
                  "enum": [
                    "case",
                    "rules",
                    "docket",
                    "submission",
                    "evidence_metadata",
                    "evidence_original",
                    "evidence_considered_text",
                    "award",
                    "transition_certificate",
                    "model_provenance",
                    "opinion",
                    "decision_integrity",
                    "reviewer_record",
                    "execution_record",
                    "run_summary",
                    "review_package"
                  ]
                }
              }
            }
          },
          "exclusions": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "code",
                "detail"
              ],
              "properties": {
                "code": {
                  "type": "string",
                  "enum": [
                    "not_disclosed",
                    "not_considered",
                    "operator_private",
                    "secret",
                    "hidden_reasoning",
                    "missing_source_bytes",
                    "source_hash_mismatch"
                  ]
                },
                "sourceId": {
                  "type": "string"
                },
                "detail": {
                  "type": "string"
                }
              }
            }
          },
          "bundleId": {
            "type": "string"
          },
          "bundleHash": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          }
        }
      },
      "ServedFundsInstruction": {
        "type": "object",
        "required": [
          "recipient",
          "amount",
          "timing",
          "rationale",
          "supportingFindings"
        ],
        "properties": {
          "recipient": {
            "type": "string",
            "enum": [
              "claimant",
              "respondent",
              "escrow"
            ]
          },
          "amount": {
            "type": "number"
          },
          "timing": {
            "type": "string",
            "enum": [
              "immediate",
              "conditional",
              "deferred"
            ]
          },
          "condition": {
            "type": "string"
          },
          "deadline": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "fallbackRecipient": {
            "type": "string",
            "enum": [
              "claimant",
              "respondent",
              "split",
              "manual"
            ]
          },
          "rationale": {
            "type": "string"
          },
          "supportingFindings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "AwardDeterminations": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/AvailableAwardDeterminations"
          },
          {
            "$ref": "#/components/schemas/UnavailableAwardDeterminations"
          }
        ],
        "discriminator": {
          "propertyName": "status",
          "mapping": {
            "available": "#/components/schemas/AvailableAwardDeterminations",
            "unavailable": "#/components/schemas/UnavailableAwardDeterminations"
          }
        }
      },
      "AvailableAwardDeterminations": {
        "type": "object",
        "required": [
          "status",
          "form",
          "findingsOfFact",
          "issues",
          "burdenFindings",
          "sourceOpinionRole"
        ],
        "properties": {
          "status": {
            "const": "available"
          },
          "form": {
            "type": "string",
            "enum": [
              "full_opinion",
              "memorandum"
            ]
          },
          "findingsOfFact": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "issues": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AwardIssueFinding"
            }
          },
          "burdenFindings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AwardBurdenFinding"
            }
          },
          "sourceOpinionRole": {
            "type": "string",
            "enum": [
              "operative_single_arbiter",
              "operative_panel_member",
              "fast_memorandum",
              "deterministic_oracle"
            ]
          }
        }
      },
      "UnavailableAwardDeterminations": {
        "type": "object",
        "required": [
          "status",
          "reason"
        ],
        "properties": {
          "status": {
            "const": "unavailable"
          },
          "reason": {
            "type": "string",
            "enum": [
              "legacy_award",
              "reviewer_edited_opinion",
              "reviewer_substitution",
              "appellate_substitution",
              "no_merits_determination"
            ]
          }
        }
      },
      "AwardIssueFinding": {
        "type": "object",
        "required": [
          "issue",
          "finding",
          "confidence"
        ],
        "properties": {
          "issue": {
            "type": "string"
          },
          "finding": {
            "type": "string"
          },
          "confidence": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          }
        }
      },
      "AwardBurdenFinding": {
        "type": "object",
        "required": [
          "issue",
          "burdenOn",
          "standard",
          "met"
        ],
        "properties": {
          "issue": {
            "type": "string"
          },
          "burdenOn": {
            "type": "string",
            "enum": [
              "claimant",
              "respondent"
            ]
          },
          "standard": {
            "type": "string",
            "enum": [
              "preponderance",
              "clear_and_convincing"
            ]
          },
          "met": {
            "type": "string",
            "enum": [
              "yes",
              "no",
              "partially"
            ]
          }
        }
      },
      "Amount": {
        "type": "object",
        "required": [
          "value",
          "currency"
        ],
        "properties": {
          "value": {
            "type": "number",
            "exclusiveMinimum": 0
          },
          "currency": {
            "const": "USD"
          }
        }
      },
      "CaseAmount": {
        "type": "object",
        "required": [
          "value",
          "currency"
        ],
        "properties": {
          "value": {
            "type": "string",
            "pattern": "^[0-9]+(?:\\.[0-9]+)?$"
          },
          "currency": {
            "type": "string"
          }
        }
      },
      "PartySummary": {
        "type": "object",
        "required": [
          "externalId",
          "name"
        ],
        "properties": {
          "externalId": {
            "type": "string",
            "maxLength": 200
          },
          "name": {
            "type": "string",
            "maxLength": 200
          }
        }
      },
      "CasePartySummary": {
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "properties": {
          "id": {
            "type": "string",
            "maxLength": 200
          },
          "name": {
            "type": "string",
            "maxLength": 200
          }
        }
      },
      "PrepareFilingRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "externalCaseId",
          "transactionId",
          "policyVersion",
          "authorityGrantId",
          "consentArtifactIds",
          "summary",
          "amount",
          "parties",
          "claim"
        ],
        "properties": {
          "externalCaseId": {
            "type": "string",
            "maxLength": 200
          },
          "transactionId": {
            "type": "string",
            "maxLength": 200
          },
          "policyVersion": {
            "type": "string",
            "maxLength": 100
          },
          "authorityGrantId": {
            "type": "string"
          },
          "consentArtifactIds": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "claimant",
              "respondent"
            ],
            "properties": {
              "claimant": {
                "type": "string"
              },
              "respondent": {
                "type": "string"
              }
            }
          },
          "summary": {
            "type": "string",
            "maxLength": 2000
          },
          "backgroundFacts": {
            "type": "string",
            "maxLength": 20000
          },
          "amount": {
            "$ref": "#/components/schemas/Amount"
          },
          "parties": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "claimant",
              "respondent"
            ],
            "properties": {
              "claimant": {
                "$ref": "#/components/schemas/PartySummary"
              },
              "respondent": {
                "$ref": "#/components/schemas/PartySummary"
              }
            }
          },
          "claim": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "statement",
              "requestedOutcome"
            ],
            "properties": {
              "statement": {
                "type": "string",
                "maxLength": 20000
              },
              "requestedOutcome": {
                "enum": [
                  "refund",
                  "release",
                  "split",
                  "other"
                ]
              }
            }
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "maxLength": 1000
            },
            "maxProperties": 50
          }
        }
      },
      "PreparedFilingEnvelope": {
        "type": "object",
        "required": [
          "data",
          "requestId"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "draftId",
              "reservedCaseId",
              "draftDigest",
              "confirmationStatement",
              "expiresAt",
              "rules",
              "fee"
            ],
            "properties": {
              "draftId": {
                "type": "string"
              },
              "reservedCaseId": {
                "type": "string"
              },
              "draftDigest": {
                "type": "string",
                "pattern": "^[0-9a-f]{64}$"
              },
              "confirmationStatement": {
                "type": "string"
              },
              "expiresAt": {
                "type": "string",
                "format": "date-time"
              },
              "rules": {
                "type": "object"
              },
              "fee": {
                "type": "object"
              }
            }
          },
          "requestId": {
            "type": "string"
          }
        }
      },
      "ConfirmFilingRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "draftDigest",
          "confirmationStatement",
          "actorId",
          "principalId",
          "confirmationMethod",
          "confirmationReference"
        ],
        "properties": {
          "draftDigest": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "confirmationStatement": {
            "type": "string",
            "maxLength": 1000
          },
          "actorId": {
            "type": "string",
            "maxLength": 200
          },
          "principalId": {
            "type": "string",
            "maxLength": 200
          },
          "confirmationMethod": {
            "const": "protocol_act"
          },
          "confirmationReference": {
            "type": "string",
            "maxLength": 500
          }
        }
      },
      "ConfirmedFilingEnvelope": {
        "type": "object",
        "required": [
          "data",
          "requestId"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "caseId",
              "externalCaseId",
              "status",
              "accessSide"
            ],
            "properties": {
              "caseId": {
                "type": "string"
              },
              "externalCaseId": {
                "type": "string"
              },
              "status": {
                "type": "string"
              },
              "accessSide": {
                "const": "claimant"
              },
              "rulesVersion": {
                "type": "string"
              },
              "rulesHash": {
                "type": "string"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              }
            }
          },
          "requestId": {
            "type": "string"
          }
        }
      },
      "SubmissionEnvelope": {
        "type": "object",
        "required": [
          "data",
          "requestId"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "submission",
              "evidence",
              "security",
              "sealed"
            ],
            "properties": {
              "submission": {
                "type": "object"
              },
              "evidence": {
                "type": "array",
                "items": {
                  "type": "object"
                }
              },
              "security": {
                "type": "object"
              },
              "phase": {
                "type": "string"
              },
              "sealed": {
                "type": "boolean"
              }
            }
          },
          "requestId": {
            "type": "string"
          }
        }
      }
    }
  }
}
