{
  "openapi": "3.1.0",
  "info": {
    "title": "acords.co: the loss notice as typed data",
    "version": "1.0.0",
    "description": "An independent reference to the data fields on the industry-standard insurance forms, starting with the loss notice that opens every claim. A free typed field model, checks and an MCP server for agents. Not affiliated with ACORD Corporation. The schema, example, validation and MCP tools are keyless; parsing documents needs an access key (request one at https://acords.co/#access)."
  },
  "servers": [
    {
      "url": "https://acords.co"
    }
  ],
  "paths": {
    "/schema.json": {
      "get": {
        "operationId": "getLossNoticeSchema",
        "summary": "The LossNotice JSON Schema (2020-12)",
        "responses": {
          "200": {
            "description": "The JSON Schema.",
            "content": {
              "application/schema+json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/example.json": {
      "get": {
        "operationId": "getLossNoticeExample",
        "summary": "A complete, valid LossNotice with fictional values",
        "responses": {
          "200": {
            "description": "An example LossNotice.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LossNotice"
                }
              }
            }
          }
        }
      }
    },
    "/validate": {
      "post": {
        "operationId": "validateLossNotice",
        "summary": "Check a LossNotice against the schema and the document's own checks",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LossNotice"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The result. Nothing is stored.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationResult"
                }
              }
            }
          },
          "400": {
            "description": "The body is not JSON."
          }
        }
      }
    },
    "/parse": {
      "post": {
        "operationId": "parseLossNotice",
        "summary": "Parse a document into a LossNotice",
        "security": [
          {
            "accessKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "document"
                ],
                "properties": {
                  "document": {
                    "type": "string",
                    "format": "binary",
                    "description": "The document: PDF, image or a native data file."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The typed LossNotice.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LossNotice"
                }
              }
            }
          },
          "401": {
            "description": "An access key is required. Request one at the request_access URL in the body."
          }
        }
      }
    },
    "/mcp": {
      "post": {
        "operationId": "mcp",
        "summary": "MCP server (Streamable HTTP, JSON-RPC 2.0). Keyless, read-only tools.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC response."
          },
          "202": {
            "description": "Notification accepted."
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "LossNotice": {
        "type": "object",
        "description": "The typed field model of a first notice of loss (FNOL): the data fields commonly found on the industry-standard loss-notice forms. An original field model; not a reproduction of any ACORD form.",
        "required": [
          "form",
          "reported_at",
          "carrier",
          "policy_number",
          "named_insured",
          "date_of_loss",
          "loss_type"
        ],
        "properties": {
          "form": {
            "type": "string",
            "enum": [
              "property",
              "auto",
              "liability"
            ],
            "description": "Which loss-notice family the record maps to."
          },
          "reported_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the notice was filed. The claim's clocks start here."
          },
          "reported_by": {
            "type": "string",
            "description": "Who filed it: the insured, the agent of record, a broker."
          },
          "carrier": {
            "type": "string",
            "description": "Carrier the notice is addressed to."
          },
          "policy_number": {
            "type": "string",
            "description": "Policy the loss is claimed under."
          },
          "term_start": {
            "type": "string",
            "format": "date"
          },
          "term_end": {
            "type": "string",
            "format": "date"
          },
          "named_insured": {
            "type": "string"
          },
          "contact": {
            "$ref": "#/components/schemas/NoticeContact"
          },
          "date_of_loss": {
            "type": "string",
            "format": "date"
          },
          "time_of_loss": {
            "type": "string",
            "description": "Local time of the loss, when known."
          },
          "loss_type": {
            "type": "string",
            "description": "Peril, e.g. wind_hail, fire, water, collision, theft, liability."
          },
          "loss_location": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "description": "Plain-language account of the loss."
          },
          "authorities_contacted": {
            "type": "string",
            "description": "Police or fire department and report number, if any."
          },
          "remarks": {
            "type": "string"
          }
        }
      },
      "NoticeContact": {
        "type": "object",
        "description": "The person the adjuster should reach.",
        "properties": {
          "name": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email"
          }
        }
      },
      "Issue": {
        "type": "object",
        "required": [
          "path",
          "message"
        ],
        "properties": {
          "path": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ValidationResult": {
        "type": "object",
        "required": [
          "valid",
          "consistent",
          "errors",
          "warnings"
        ],
        "properties": {
          "valid": {
            "type": "boolean",
            "description": "The record matches the schema."
          },
          "consistent": {
            "type": "boolean",
            "description": "It also passes every check: sums, dates, codes."
          },
          "schema": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Issue"
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Issue"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "accessKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "An access key issued on request at https://acords.co/#access."
      }
    }
  }
}