{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$ref": "#/definitions/Submission",
  "definitions": {
    "Submission": {
      "type": "object",
      "properties": {
        "resourceType": {
          "type": "string",
          "const": "Submission",
          "description": "Fixed resource type discriminator"
        },
        "id": {
          "type": "string",
          "description": "Logical id of this resource. Assigned by the server or originating system."
        },
        "meta": {
          "$ref": "#/definitions/Meta",
          "description": "Metadata about the resource"
        },
        "status": {
          "type": "string",
          "enum": [
            "draft",
            "submitted",
            "in-review",
            "quoted",
            "declined",
            "bound",
            "withdrawn",
            "expired"
          ],
          "description": "Current status of the submission in the workflow.\n\n- `draft` — Being prepared, not yet sent\n- `submitted` — Sent to carrier for review\n- `in-review` — Carrier is actively evaluating\n- `quoted` — Carrier has responded with a quote\n- `declined` — Carrier has declined to quote\n- `bound` — Coverage has been bound from this submission\n- `withdrawn` — Broker has withdrawn the submission\n- `expired` — Submission has expired without action"
        },
        "insured": {
          "$ref": "#/definitions/Reference",
          "description": "Reference to the insured entity"
        },
        "broker": {
          "$ref": "#/definitions/Reference",
          "description": "Reference to the submitting broker/agent organization"
        },
        "carrier": {
          "$ref": "#/definitions/Reference",
          "description": "Reference to the target carrier/underwriter organization"
        },
        "requestedEffective": {
          "$ref": "#/definitions/Period",
          "description": "Requested policy effective period"
        },
        "linesOfBusiness": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/CodeableConcept"
          },
          "description": "Lines of business being requested (GL, Property, Auto, WC, etc.)"
        },
        "targetPremium": {
          "$ref": "#/definitions/Money",
          "description": "Target premium range, if the broker has a budget in mind."
        },
        "submissionType": {
          "$ref": "#/definitions/CodeableConcept",
          "description": "Is this a new business submission or a renewal?"
        },
        "submittedDate": {
          "type": "string",
          "description": "Date/time the submission was sent to the carrier.",
          "format": "date-time"
        },
        "responseDeadline": {
          "type": "string",
          "description": "Date by which the carrier should respond.",
          "format": "date"
        },
        "supportingDocuments": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Attachment"
          },
          "description": "Supporting documents (applications, loss runs, SOVs, etc.)"
        },
        "notes": {
          "type": "string",
          "description": "Free-text notes or special instructions from the broker"
        },
        "expiringPolicy": {
          "$ref": "#/definitions/Reference",
          "description": "Reference to the expiring policy, if this is a renewal."
        },
        "resultingQuotes": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Reference"
          },
          "description": "Reference to the resulting quote(s), if any"
        },
        "risks": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Reference"
          },
          "description": "References to Risk resources included in this submission"
        },
        "lossHistory": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/LossHistory"
          },
          "description": "Historical loss experience for underwriting evaluation"
        },
        "questions": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/QuestionResponse"
          },
          "description": "Underwriting question responses"
        }
      },
      "required": [
        "insured",
        "resourceType",
        "status"
      ],
      "additionalProperties": false,
      "description": "A submission represents a request for insurance coverage sent from a broker to a carrier. This is the starting point of the insurance workflow.\n\nA submission contains the information needed for a carrier to evaluate risk and produce a quote, including the insured's details, requested coverages, and supporting documents.",
      "examples": [
        {
          "resourceType": "Submission",
          "id": "sub-2025-001",
          "status": "submitted",
          "insured": {
            "reference": "Insured/ins-001",
            "display": "Acme Manufacturing Corp"
          },
          "broker": {
            "reference": "Organization/broker-100",
            "display": "Marsh McLennan"
          },
          "carrier": {
            "reference": "Organization/carrier-200",
            "display": "Hartford Financial"
          },
          "requestedEffective": {
            "start": "2025-07-01",
            "end": "2026-07-01"
          },
          "linesOfBusiness": [
            {
              "coding": [
                {
                  "system": "https://bind.codes/lob",
                  "code": "GL",
                  "display": "General Liability"
                }
              ]
            }
          ],
          "submittedDate": "2025-04-15T09:00:00Z"
        }
      ]
    },
    "Meta": {
      "type": "object",
      "properties": {
        "versionId": {
          "type": "string",
          "description": "Version-specific identifier for this resource version. Changes each time the resource is updated."
        },
        "lastUpdated": {
          "type": "string",
          "description": "When this resource was last updated.",
          "format": "date-time"
        },
        "source": {
          "type": "string",
          "description": "URI identifying the originating system that created or last modified this resource.",
          "format": "uri"
        },
        "tag": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Coding"
          },
          "description": "Security or access control tags"
        }
      },
      "additionalProperties": false,
      "description": "Metadata about a resource instance. Tracks versioning, provenance, and timestamps."
    },
    "Coding": {
      "type": "object",
      "properties": {
        "system": {
          "type": "string",
          "description": "The code system URI that defines the code.",
          "format": "uri"
        },
        "code": {
          "type": "string",
          "description": "The code value from the code system"
        },
        "display": {
          "type": "string",
          "description": "Human-readable display text for the code"
        }
      },
      "required": [
        "code"
      ],
      "additionalProperties": false,
      "description": "A coded value from a defined code system. Used throughout BIND for standardized enumerations.",
      "examples": [
        {
          "system": "https://bind.codes/line-of-business",
          "code": "GL",
          "display": "General Liability"
        }
      ]
    },
    "Reference": {
      "type": "object",
      "properties": {
        "reference": {
          "type": "string",
          "description": "Relative or absolute reference to another resource. Format: `{ResourceType}/{id}` for relative references."
        },
        "type": {
          "type": "string",
          "description": "The resource type being referenced"
        },
        "display": {
          "type": "string",
          "description": "Text alternative for the reference (e.g. display name)"
        }
      },
      "additionalProperties": false,
      "description": "A reference from one BIND resource to another.",
      "examples": [
        {
          "reference": "Insured/ins-789",
          "display": "Acme Corp"
        }
      ]
    },
    "Period": {
      "type": "object",
      "properties": {
        "start": {
          "type": "string",
          "description": "Start of the period (inclusive).",
          "format": "date"
        },
        "end": {
          "type": "string",
          "description": "End of the period (inclusive).",
          "format": "date"
        }
      },
      "additionalProperties": false,
      "description": "A time period defined by a start and/or end date. Used for policy terms, coverage periods, etc.",
      "examples": [
        {
          "start": "2025-01-01",
          "end": "2026-01-01"
        }
      ]
    },
    "CodeableConcept": {
      "type": "object",
      "properties": {
        "coding": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Coding"
          },
          "description": "Code(s) from formal code systems"
        },
        "text": {
          "type": "string",
          "description": "Plain text representation of the concept"
        }
      },
      "additionalProperties": false,
      "description": "A concept with a coding and optional text. Wraps one or more Coding values with a human-readable summary."
    },
    "Money": {
      "type": "object",
      "properties": {
        "value": {
          "type": "number",
          "description": "Numeric amount. Represented as a number; precision should be maintained by the consuming system."
        },
        "currency": {
          "type": "string",
          "description": "ISO 4217 currency code.",
          "default": "USD"
        }
      },
      "required": [
        "value"
      ],
      "additionalProperties": false,
      "description": "A monetary amount with currency.",
      "examples": [
        {
          "value": 1000000,
          "currency": "USD"
        }
      ]
    },
    "Attachment": {
      "type": "object",
      "properties": {
        "contentType": {
          "type": "string",
          "description": "MIME type of the content.",
          "examples": [
            "application/pdf"
          ]
        },
        "url": {
          "type": "string",
          "description": "URI where the attachment data can be retrieved.",
          "format": "uri"
        },
        "title": {
          "type": "string",
          "description": "Human-readable title for the attachment"
        },
        "creation": {
          "type": "string",
          "description": "Date the attachment was created.",
          "format": "date-time"
        }
      },
      "additionalProperties": false,
      "description": "An attachment or document reference. Used for loss runs, applications, endorsement forms, etc."
    },
    "LossHistory": {
      "type": "object",
      "properties": {
        "period": {
          "$ref": "#/definitions/Period"
        },
        "carrier": {
          "$ref": "#/definitions/Reference"
        },
        "policyNumber": {
          "type": "string"
        },
        "lineOfBusiness": {
          "$ref": "#/definitions/CodeableConcept"
        },
        "totalClaims": {
          "type": "number"
        },
        "totalIncurred": {
          "$ref": "#/definitions/Money"
        },
        "totalPaid": {
          "$ref": "#/definitions/Money"
        },
        "openClaims": {
          "type": "number"
        },
        "largeLosses": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/LargeLoss"
          }
        },
        "lossRatio": {
          "$ref": "#/definitions/BindPercentage",
          "minimum": 0,
          "maximum": 100
        }
      },
      "required": [
        "period"
      ],
      "additionalProperties": false,
      "description": "Summary of historical loss experience for a specific period and line of business. Used in submissions and underwriting to evaluate risk quality.",
      "examples": [
        {
          "period": {
            "start": "2022-01-01",
            "end": "2023-01-01"
          },
          "carrier": {
            "reference": "Organization/carrier-200",
            "display": "Hartford"
          },
          "policyNumber": "CGL-2022-001",
          "lineOfBusiness": {
            "coding": [
              {
                "code": "GL",
                "display": "General Liability"
              }
            ]
          },
          "totalClaims": 3,
          "totalIncurred": {
            "value": 125000,
            "currency": "USD"
          },
          "totalPaid": {
            "value": 95000,
            "currency": "USD"
          }
        }
      ]
    },
    "LargeLoss": {
      "type": "object",
      "properties": {
        "dateOfLoss": {
          "type": "string",
          "format": "date"
        },
        "description": {
          "type": "string"
        },
        "lossType": {
          "$ref": "#/definitions/CodeableConcept"
        },
        "totalIncurred": {
          "$ref": "#/definitions/Money"
        },
        "status": {
          "type": "string",
          "enum": [
            "open",
            "closed",
            "reserved"
          ]
        }
      },
      "required": [
        "dateOfLoss",
        "description",
        "totalIncurred"
      ],
      "additionalProperties": false,
      "description": "A large individual loss event within a loss history period.",
      "examples": [
        {
          "dateOfLoss": "2023-03-15",
          "description": "Warehouse fire caused by electrical fault",
          "lossType": {
            "coding": [
              {
                "code": "fire",
                "display": "Fire"
              }
            ]
          },
          "totalIncurred": {
            "value": 450000,
            "currency": "USD"
          },
          "status": "closed"
        }
      ]
    },
    "BindPercentage": {
      "type": "number",
      "description": "A percentage value between 0 and 100. Used for commission percentages, coinsurance rates, and loss ratios.",
      "minimum": 0,
      "maximum": 100
    },
    "QuestionResponse": {
      "type": "object",
      "properties": {
        "questionCode": {
          "$ref": "#/definitions/CodeableConcept"
        },
        "questionText": {
          "type": "string"
        },
        "answer": {
          "type": "string"
        },
        "answeredDate": {
          "type": "string",
          "format": "date"
        },
        "lineOfBusiness": {
          "$ref": "#/definitions/CodeableConcept"
        },
        "notes": {
          "type": "string"
        }
      },
      "required": [
        "questionText",
        "answer"
      ],
      "additionalProperties": false,
      "description": "An underwriting question and its response.",
      "examples": [
        {
          "questionCode": {
            "coding": [
              {
                "code": "prior-claims",
                "display": "Prior Claims"
              }
            ]
          },
          "questionText": "Have you had any claims in the past 5 years?",
          "answer": "Yes - 2 minor property claims totaling $12,000",
          "answeredDate": "2025-04-10"
        }
      ]
    }
  },
  "$id": "https://bind-standard.org/schema/Submission",
  "title": "Submission"
}
