{
  "openapi": "3.1.0",
  "info": {
    "title": "Personal auto claims intake reference API",
    "version": "2026-11-02.1",
    "description": "Reference personal-auto intake only. Registering a notice does not determine coverage, liability, settlement or payment."
  },
  "servers": [
    {
      "url": "http://127.0.0.1:4317"
    }
  ],
  "paths": {
    "/actions/submit_loss_notice": {
      "post": {
        "operationId": "submit_loss_notice",
        "summary": "Register a notice of loss against an effective-dated policy, then route it for review.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "actorId",
                  "requestKey",
                  "expectedRevision",
                  "input"
                ],
                "properties": {
                  "actorId": {
                    "type": "string",
                    "enum": [
                      "operator",
                      "reviewer",
                      "outsider"
                    ]
                  },
                  "recordId": {
                    "type": "string",
                    "default": "record-001"
                  },
                  "itemId": {
                    "type": "string"
                  },
                  "input": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "lossDate",
                      "incidentType",
                      "documentRef"
                    ],
                    "properties": {
                      "lossDate": {
                        "type": "string",
                        "format": "date",
                        "example": "2026-06-15",
                        "description": "Loss date"
                      },
                      "incidentType": {
                        "type": "string",
                        "maxLength": 120,
                        "example": "collision",
                        "description": "Incident type"
                      },
                      "documentRef": {
                        "type": "string",
                        "maxLength": 120,
                        "example": "demo-doc-001",
                        "description": "Supporting document reference"
                      }
                    }
                  },
                  "requestKey": {
                    "type": "string",
                    "pattern": "^[-a-zA-Z0-9:._]{1,80}$"
                  },
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "fault": {
                    "type": "string",
                    "enum": [
                      "source-unavailable",
                      "event-delivery"
                    ],
                    "description": "Reference fault injection only"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Reference execution result"
          },
          "201": {
            "description": "Reference execution result"
          },
          "403": {
            "description": "Typed reference rejection; inspect code and trace"
          },
          "404": {
            "description": "Typed reference rejection; inspect code and trace"
          },
          "409": {
            "description": "Typed reference rejection; inspect code and trace"
          },
          "422": {
            "description": "Typed reference rejection; inspect code and trace"
          },
          "503": {
            "description": "Typed reference rejection; inspect code and trace"
          }
        }
      }
    },
    "/actions/get_context": {
      "post": {
        "operationId": "get_context",
        "summary": "Read permitted reference context",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "actorId"
                ],
                "properties": {
                  "actorId": {
                    "type": "string",
                    "enum": [
                      "operator",
                      "reviewer",
                      "outsider"
                    ]
                  },
                  "recordId": {
                    "type": "string",
                    "default": "record-001"
                  },
                  "itemId": {
                    "type": "string"
                  },
                  "input": {
                    "type": "object",
                    "additionalProperties": false
                  },
                  "requestKey": {
                    "type": "string",
                    "pattern": "^[-a-zA-Z0-9:._]{1,80}$"
                  },
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "fault": {
                    "type": "string",
                    "enum": [
                      "source-unavailable",
                      "event-delivery"
                    ],
                    "description": "Reference fault injection only"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Reference execution result"
          },
          "201": {
            "description": "Reference execution result"
          },
          "403": {
            "description": "Typed reference rejection; inspect code and trace"
          },
          "404": {
            "description": "Typed reference rejection; inspect code and trace"
          },
          "409": {
            "description": "Typed reference rejection; inspect code and trace"
          },
          "422": {
            "description": "Typed reference rejection; inspect code and trace"
          },
          "503": {
            "description": "Typed reference rejection; inspect code and trace"
          }
        }
      }
    },
    "/actions/review_item": {
      "post": {
        "operationId": "review_item",
        "summary": "Review an existing reference work item",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "actorId",
                  "requestKey",
                  "expectedRevision"
                ],
                "properties": {
                  "actorId": {
                    "type": "string",
                    "enum": [
                      "operator",
                      "reviewer",
                      "outsider"
                    ]
                  },
                  "recordId": {
                    "type": "string",
                    "default": "record-001"
                  },
                  "itemId": {
                    "type": "string"
                  },
                  "input": {
                    "type": "object",
                    "additionalProperties": false
                  },
                  "requestKey": {
                    "type": "string",
                    "pattern": "^[-a-zA-Z0-9:._]{1,80}$"
                  },
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "fault": {
                    "type": "string",
                    "enum": [
                      "source-unavailable",
                      "event-delivery"
                    ],
                    "description": "Reference fault injection only"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Reference execution result"
          },
          "201": {
            "description": "Reference execution result"
          },
          "403": {
            "description": "Typed reference rejection; inspect code and trace"
          },
          "404": {
            "description": "Typed reference rejection; inspect code and trace"
          },
          "409": {
            "description": "Typed reference rejection; inspect code and trace"
          },
          "422": {
            "description": "Typed reference rejection; inspect code and trace"
          },
          "503": {
            "description": "Typed reference rejection; inspect code and trace"
          }
        }
      }
    },
    "/actions/deliver_events": {
      "post": {
        "operationId": "deliver_events",
        "summary": "Retry pending reference events",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "actorId",
                  "requestKey",
                  "expectedRevision"
                ],
                "properties": {
                  "actorId": {
                    "type": "string",
                    "enum": [
                      "operator",
                      "reviewer",
                      "outsider"
                    ]
                  },
                  "recordId": {
                    "type": "string",
                    "default": "record-001"
                  },
                  "itemId": {
                    "type": "string"
                  },
                  "input": {
                    "type": "object",
                    "additionalProperties": false
                  },
                  "requestKey": {
                    "type": "string",
                    "pattern": "^[-a-zA-Z0-9:._]{1,80}$"
                  },
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "fault": {
                    "type": "string",
                    "enum": [
                      "source-unavailable",
                      "event-delivery"
                    ],
                    "description": "Reference fault injection only"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Reference execution result"
          },
          "201": {
            "description": "Reference execution result"
          },
          "403": {
            "description": "Typed reference rejection; inspect code and trace"
          },
          "404": {
            "description": "Typed reference rejection; inspect code and trace"
          },
          "409": {
            "description": "Typed reference rejection; inspect code and trace"
          },
          "422": {
            "description": "Typed reference rejection; inspect code and trace"
          },
          "503": {
            "description": "Typed reference rejection; inspect code and trace"
          }
        }
      }
    },
    "/acceptance": {
      "get": {
        "operationId": "read_reference_acceptance",
        "responses": {
          "200": {
            "description": "Reference gates and unverified customer acceptance"
          }
        }
      }
    },
    "/state": {
      "get": {
        "operationId": "read_sandbox",
        "responses": {
          "200": {
            "description": "Synthetic sandbox state"
          }
        }
      }
    },
    "/tests": {
      "post": {
        "operationId": "run_scenarios",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "caseId": {
                    "type": "string",
                    "enum": [
                      "happy-path",
                      "revoked-access",
                      "cross-scope",
                      "required-input",
                      "source-outage",
                      "duplicate-retry",
                      "conflicting-retry",
                      "stale-revision",
                      "review-authority",
                      "event-retry",
                      "review-context-change",
                      "broken-required-link",
                      "loss-before-period",
                      "document-mismatch",
                      "historical-policy-period"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Fresh-state reference scenario results"
          }
        }
      }
    },
    "/reset": {
      "post": {
        "operationId": "reset_sandbox",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "expectedRevision"
                ],
                "properties": {
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Reset state with an advanced revision"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "sandboxToken": {
        "type": "http",
        "scheme": "bearer",
        "description": "Hosted sandbox capability token; local server is loopback only"
      }
    }
  },
  "x-jextra-evidence": "reference-model-execution",
  "x-jextra-fixtures": {
    "synthetic": true,
    "clock": "2026-11-01"
  }
}
