{
  "openapi": "3.1.0",
  "info": {
    "title": "BriteCore",
    "version": "2.0.0"
  },
  "paths": {
    "/api/v1/contacts/lookupContactByName": {
      "post": {
        "summary": "lookupContactByName",
        "tags": [
          "contacts"
        ],
        "description": "Method to lookup contacts by name.\n\n    Searches for contacts by name for a particular role and contact type.\n    Returns all the contacts matching that criteria.\n\n    Parameters\n    ----------\n    name : string\n        Required. The name of the contact to look up. Example: 'John'.\n    role : string\n        Required. Role name of the contact to look up. Example: 'Agent'.\n    role_type : string\n        Required. Type of the contact to look up. Example: 'individual' or 'organization'.\n\n    Returns\n    -------\n    list:\n        Returns list of dict containing Contact's data that matched the lookup criteria.\n\n        Example contact dict:\n            {\n                id: UUID,\n                name: str,\n                extra: {\n                    agencyGroupNumber: str\n                    addresses: [dict],\n                    emailAddresses: [dict],\n                    phoneNumbers: [dict],\n                    company: dict,\n                    isWholeSaleModeAgency: boolean\n                }\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "role": {
                    "type": "string"
                  },
                  "role_type": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/contacts/retrieveAddressInfoFromZip": {
      "post": {
        "summary": "retrieveAddressInfoFromZip",
        "tags": [
          "contacts"
        ],
        "description": "Method to get address details.\n\n    Takes zip code and optionally text address info and returns the Cities, Counties,\n    and State Abbr related to that Zip Code as determined by the Geography table.\n\n    Parameters\n    ----------\n    zip : string\n        Required. Zip code to look up. Example: '73401'.\n    addressLine1 : string\n        Optional. Address to look up. Example: '123, White Lamp Boulevard'.\n\n    Returns\n    -------\n    valid : bool\n        Whether or not the provided info is valid.\n    cities : list\n        List of city names for the provided info.\n    counties : list\n        List of county names for the provided info.\n    stateAbbr : string\n        State abbreviation for the provided info.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "zip": {
                    "type": "string"
                  },
                  "addressLine1": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/contacts/retrieveAspectData": {
      "post": {
        "summary": "retrieveAspectData",
        "tags": [
          "contacts"
        ],
        "description": "Method to get Contact's aspect data.\n\n    Takes contact id and role id for which aspects needs to be returned.\n    Most aspects are only returned in the response dict if applicable (or available).\n\n    Parameters\n    ----------\n    id : UUID\n        Required. Id of the contact to retrieve aspect data for.\n    roleId : UUID\n        Required. Id of the role to retrieve aspect data for.\n    hasPermissions : boolean\n        Required. Expected by internal processing. Must be set to true when called via API key.\n    all: boolean\n        Optional. Retrieve all contact roles aspect data. Defaulted to false.\n\n    Returns\n    -------\n    disallowE2Val : boolean\n        This flag shows if E2Value is disabled for the contact.\n    agencyInactive : boolean\n        This flag shows if contact (which is agency) is inactive.\n    paycommissionto : string\n        To whom comission will be paid to. Example: 'Agency'.\n    pagePermissionsExist : string\n        Boolean in string format, used internally by the system.\n    mvrReports : list\n        Motor vehicle reports for the contact. Only sent if MVR reports are active.\n    creditScoreAccountEnabled : boolean\n        This flag suggests whether the creditScoreAccount aspect field should be considered.\n    creditReports : list\n        Credit reports for the contact. Only sent if there is an active credit score vendor.\n    e2ValOn : boolean\n        Flag for E2Value. Only sent if E2Value on vendor is enabled.\n    agencyGroupNumber : string\n        Agency group number of the contact. Only sent if set.\n    agencyNumber : string\n        Agency number of the contact. Only sent if set.\n    creditScoreAccount : string\n        Credit score account of the contact. Only sent if set.\n    naicNumber : string\n        NAIC number of the contact. Only sent if set.\n    producerNumber : string\n        Producer number of the contact. Only sent if set.\n    vendorNumber : string\n        Venfor number of the contact. Only sent if set.\n    is1099Reportable : boolean\n        This flag suggests if 1099 is reportable, false by default. Only sent if set.\n    policies : list\n        List of policies or apps associated with the contact for the passed role. Only sent if set.\n    associatedInfo : list\n        List of policies or apps associated with the contact (not for the passed role).\n    agencyDates : dict\n        Contains agencyInceptionDate and agencyTerminationDate. Only sent if set.\n    agencies : list\n        List containing agencies to which contact is attached to. Only sent if set.\n    agencyGroup : dict\n        Dict containing agency group information. Only sent if set.\n    defaultSurplusLinesProducer : dict\n        Dict containing default_surplus_lines_producer details. Only set if set.\n    claims : list\n        List containing all the claims that reference the contact as a claimant. Only sent if set.\n    commissionPayment : dict\n        Dict containing information about commission payments issued by the contact. Only sent if set.\n    commissionStructure : dict\n        Dict containing information about the contact's commission structure. Only sent if set.\n    surplusLinesProducerLicense: dict\n        Dict containing information about surplus_lines_producer aspect. Only sent if set.\n    interestContent: dict\n        Dict containing mortgagee statement used in dec page content. Only sent if set.\n    loginInformation : dict\n        Dict containing the contact's login information (username, confirmation email, and permission level).\n    notices : dict\n        Dict containing information about email notices for a contact. Only sent if set.\n    paymentsIssued: dict\n        Dict containing information about payments issued to a contact. Only sent if set.\n    personalInformation : dict\n        Dict containing a contact's personal information. Only sent if set.\n    sweepAccount: get_sweep_account,\n        Dict containing information about the contact's sweep account. Only sent if set.\n    termination : dict\n        Dict containing the terminated status and termination reason for the contact. Only sent if set.\n    quotingRestriction : dict\n        Dict containing the contacts followAgencyQuotingRestriction flag. Only sent if set.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "roleId": {
                    "type": "string"
                  },
                  "hasPermissions": {
                    "type": "string"
                  },
                  "all": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/contacts/retrieveContactList": {
      "post": {
        "summary": "retrieveContactList",
        "tags": [
          "contacts"
        ],
        "description": "Method to get contacts list.\n\n    Filters the contacts by search string and role filter along with pagination.\n    Returns all the contacts matching that criteria.\n\n    Parameters\n    ----------\n    searchString : string\n        Required. The search string to look up.\n    filter : string\n        Required. The name of the role to filter against. Example: 'Agent'.\n    currentPage : string\n        Required. The number of current page (stringified). Example: '1'.\n    pageSize : string\n        Required. The size of page (stringified). Example: '10'.\n\n    Returns\n    -------\n    activePage : int\n        Current page number. Example: 2\n    maxPages : int\n        Total number of pages. Example: 17\n    maxRecords : int\n        Total number of records matching the criteria. Example: 419\n    records : list\n        List of dictionaries containing contact data.\n\n        Example contact dict:\n            {\n                \"flag\": str,\n                \"type\": str,\n                \"id\": UUID,\n                \"details\": {\n                    \"name\": str,\n                    \"raw_addresses\": list[dict],\n                    \"phone\": str,\n                    \"role\": str,\n                    \"is_approved_vendor\": boolean,\n                    \"address\": str,\n                    \"email\": str\n                }\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "searchString": {
                    "type": "string"
                  },
                  "filter": {
                    "type": "string"
                  },
                  "currentPage": {
                    "type": "string"
                  },
                  "pageSize": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/contacts/storeNewContact": {
      "post": {
        "summary": "storeNewContact",
        "tags": [
          "contacts"
        ],
        "description": "Method to create new contact.\n\n    Used by the simple contact popup used throughout the policies\n    and claims module. Creates a new contact and adds address, phone, and\n    email records. Sends back a JSON string containing the contact's id.\n    If applicable, a relationship is set up between a given revision\n    and the contact.\n\n    Parameters\n    ----------\n    role : string\n        Optional. The name of the role to add the new contact to. Example: 'Agent'.\n    content : dict\n        Required. The following keys are expected:\n            {\n                'name': str,\n                'type': str,\n                'confirmationEmail': str,\n                'legalEntityType': str,\n                'website': str,\n                'username': str,\n                'isGod': boolean,\n                'cognitoUsername': str,\n                'dba': '2020-04-14',\n                'purchaseDate': '2020-04-14',\n                'riskIdNumber': str,\n                'agencyId': UUID,\n                'stateId': UUID,\n                'licenseNumber': str,\n                'ssn': 'str',\n                'addedBy': str,\n                'roles': [str],\n\n                # Date of birth can be set via following 3 keys\n                'dobMonth': '04',\n                'dobYear': '2020',\n                'dobDay': '14',\n                # Alternatively, can be set directly via following key in the given format\n                'dob': '2020-04-14',\n\n                # Date business started can be set via following 3 keys\n                'dbsYear': '2020',\n                'dbsMonth': '04',\n                'dbsDay': '14',\n                # Alternatively, can be set directly via following key in the given format\n                'dbs': '2020-04-14',\n                # Or via following key\n                'dateBusinessStarted': '2020-04-14',\n\n                # Agency inception/termination date can be set via following 3 keys\n                'agencyInceptionDateYear': '2019',\n                'agencyInceptionDateMonth': '02',\n                'agencyInceptionDateDay': '03',\n                'agencyTerminationDateYear': '2020',\n                'agencyTerminationDateMonth': '05',\n                'agencyTerminationDateDay': '06',\n                # Or directly via following key in the given format\n                'agencyInceptionDate': '2019-02-03',\n                'agencyTerminationDate': '2020-05-06',\n\n                # Either of the following keys can be used to set FeinTax\n                'feinTaxId': str,\n                'feinTax': str,\n\n                # following key can be alternatively passed as 'emails'\n                'emailAddresses': [\n                    {\n                        'email': str,\n                        # following key can be alternatively passed as 'type'\n                        'emailType': str\n                    }\n                ],\n\n                # following key can be alternatively passed as 'phones'\n                'phoneNumbers': [\n                    {\n                        'email': str,\n                        # following key can be alternatively passed as 'type'\n                        'phoneType': str\n                    }\n                ],\n\n                'addresses': [\n                    {\n                        'addressLine1': str,\n                        'addressCity': str,\n                        'addressState': str,\n                        'addressZip': str,\n                        'addressCountry': str,\n                        'addressCityOther': str,   # optional when country is not USA/Canada\n                        'addressCountyOther': str, # optional when country is not USA/Canada\n                        'addressStateOther': str,  # optional when country is not USA/Canada\n                        'addressStateCanada': str, # optional when address provider is not google\n\n                        # following key can be alternatively passed as 'type'\n                        'addressType': str\n\n                    }\n                ],\n            }\n\n    Returns\n    -------\n    success : bool\n        Whether or not the contact could be created.\n    id : UUID\n        Id of the newly created contact\n    address_ids : list of UUID\n        List containing id of created addresses\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "role": {
                    "type": "string"
                  },
                  "content": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/contacts/storeRoles": {
      "post": {
        "summary": "storeRoles",
        "tags": [
          "contacts"
        ],
        "description": "Method to update Contact's aspect data for a given role.\n\n    Updates all aspects passed in the JSON belonging to the passed contact id.\n\n    Parameters\n    ----------\n    contactId : UUID\n        Required. The contact to update.\n    roleId : UUID\n        Required. The role to update.\n    agencyInactive : boolean\n        Optional.\n    e2ValDisallow : boolean\n        Optional.\n    defaultAgency : UUID\n        Optional. For setting an Agent Contact's default agency.\n    agencies : dict\n        Optional. The following keys should be passed for updating Agency Relations.\n            {\n                'toDelete': [UUID,],  # Agency ids to remove\n                'toAdd': [UUID,]      # Agency ids to add\n            }\n    agencyDates : dict\n        Optional. The following keys should be passed for updating Agency's dates.\n        If both dates are provided, the termination date must not predate the inception.\n            {\n                'agencyInceptionDateYear': '2019',\n                'agencyInceptionDateMonth': '02',\n                'agencyInceptionDateDay': '03',\n                'agencyTerminationDateYear': '2020',\n                'agencyTerminationDateMonth': '05',\n                'agencyTerminationDateDay': '06'\n            }\n    agencyGroup : dict\n        Optional. The following keys should be passed for updating Contact's Agency Group Relations.\n            {\n                'agencyGroupId': str,\n                'belongsTo': boolean  # Whether or not contact belongs to an agency group\n            }\n    agencyNumber : dict\n        Optional. The following keys should be passed for setting Contact's Agency number.\n            {\n                'agencyNumber': str\n            }\n    agencyGroupNumber : dict\n        Optional. The following keys should be passed for setting Contact's Agency Group number.\n            {\n                'agencyGroupNumber': str\n            }\n    creditScoreAccount : dict\n        Optional. The following keys should be passed for setting Contact's Agency credit score integration account\n        number.\n            {\n                'creditScoreAccount': str\n            }\n    commissionPayment : dict\n        Optional. The following keys should be passed for setting Contact's commission payment information.\n            {\n                'issueComPaymentsElectronically': boolean,\n                'chosenCommissionAccount': UUID\n            }\n    commissionStructure : dict\n        Optional. The following keys should be passed for setting Contact's commission structure information.\n            {\n                'chosenStructure': str\n            }\n    defaultSurplusLinesProducer : dict\n        Optional. The following keys should be passed for setting Contact's default surplus lines producer.\n            {\n                'defaultSurplusLineProducerId': UUID\n            }\n    interestContent : dict\n        Optional. The following keys should be passed for setting Contact's interest content information.\n            {\n                'mortgageeStatement': str\n            }\n    loginInformation : dict\n        Optional. The following keys should be passed for setting Contact's login information.\n            {\n                'roleLoginUsername': str,\n                'roleLoginPassword': str,\n                'roleLoginRetypePassword': str,\n                'roleLoginEmail': str,\n                'roleLoginAccessLevel': UUID,\n                'defaultState': UUID,\n                'timezone': str,\n                'oops': str\n            }\n    naicNumber : dict\n        Optional. The following keys should be passed for setting Contact's Agency NAIC number.\n            {\n                'naicNumber': str\n            }\n    notices : dict\n        Optional. The following keys should be passed for setting Contact's electronic notice information.\n            {\n                'directApplicationActivityOn': boolean,\n                'acceptNoticesByEmail': boolean,\n                'notifyOfOverdueInvoices': boolean,\n                'emailPrintList': boolean,\n                'displayAgencyGroupInfoOnDec': boolean,\n                'ccEmail': str\n                'directApplicationActivityTo': str,\n                'sendCommissionsElectronically': boolean,\n\n                # The following keys are optional\n                'chosenEmail': UUID,\n                'commStatementChosenEmail': UUID,\n                'claimActivityChosenEmail': UUID,\n                'ccClaimEmail': str,\n                'agencyBillingEnabled': boolean,\n                'doNotPrintWhenBillWhom': boolean\n            }\n    paymentsIssued : dict\n        Optional. The following keys should be passed for setting Contact's payments issued information.\n            {\n                'issuePaymentsElectronically': boolean,\n                'chosenAccount': UUID\n            }\n    personalInformation : dict\n        Optional. The following keys should be passed for setting Contact's personal information.\n            {\n                'ssn': str,\n                'ssnGroup': str,\n                'dobMonth': '02',\n                'dobDay': '10',\n                'dobYear': '1990',\n                'dbsMonth': '08',\n                'dbsDay': '14',\n                'dbsYear': '2013',\n                'sameAsSsn': boolean, # driver license same as ssn\n                'driversLicense': str,\n                'legalEntityType': str,\n                'riskIdNumber': str,\n                'dba': str\n            }\n    producerNumber : dict\n        Optional. The following keys should be passed for setting Agent Contact's producer number.\n            {\n                'producerNumber': str\n            }\n    quotingRestriction : dict\n        Optional. The following keys should be passed for setting Agent Contact's quoting restriction settings.\n            {\n                'followAgencyQuotingRestriction': boolean\n            }\n    sweepAccount : dict\n        Optional. The following keys should be passed for setting Contact's sweep account information.\n            {\n                'hasSweepAccount': boolean,\n                'chosenSweepAccount': UUID\n            }\n    termination : dict\n        Optional. The following keys should be passed for setting Agent Contact's termination status & reason.\n            {\n                'reasonTerminated': str,\n                'isTerminated': boolean\n            }\n    vendorNumber : dict\n        Optional. The following keys should be passed for setting Contact's vendor number.\n            {\n                'vendorNumber': str\n            }\n\n    Returns\n    -------\n    A list containing error messages; empty if there are no errors.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contactId": {
                    "type": "string"
                  },
                  "roleId": {
                    "type": "string"
                  },
                  "agencyInactive": {
                    "type": "string"
                  },
                  "e2ValDisallow": {
                    "type": "string"
                  },
                  "defaultAgency": {
                    "type": "string"
                  },
                  "agencies": {
                    "type": "object"
                  },
                  "agencyDates": {
                    "type": "object"
                  },
                  "agencyGroup": {
                    "type": "object"
                  },
                  "agencyNumber": {
                    "type": "object"
                  },
                  "agencyGroupNumber": {
                    "type": "object"
                  },
                  "creditScoreAccount": {
                    "type": "object"
                  },
                  "commissionPayment": {
                    "type": "object"
                  },
                  "commissionStructure": {
                    "type": "object"
                  },
                  "defaultSurplusLinesProducer": {
                    "type": "object"
                  },
                  "interestContent": {
                    "type": "object"
                  },
                  "loginInformation": {
                    "type": "object"
                  },
                  "naicNumber": {
                    "type": "object"
                  },
                  "notices": {
                    "type": "object"
                  },
                  "paymentsIssued": {
                    "type": "object"
                  },
                  "personalInformation": {
                    "type": "object"
                  },
                  "producerNumber": {
                    "type": "object"
                  },
                  "quotingRestriction": {
                    "type": "object"
                  },
                  "sweepAccount": {
                    "type": "object"
                  },
                  "termination": {
                    "type": "object"
                  },
                  "vendorNumber": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/custom_ui/createURLOverride": {
      "post": {
        "summary": "createURLOverride",
        "tags": [
          "custom_ui"
        ],
        "description": "Creates a URL override of one BriteCore URL path with an external one\n\n    Parameters\n    ----------\n    json_obj : dict\n        A JSON Object containing:\n\n            * url: The BriteCore URL you wish to replace.\n            * override: The External URL of the content you want to display instead.\n            * http_method (optional): The appropriate HTTP method of the override URL (only GET or\n                                      POST supported). \"GET\" is the default.\n            * shared_secret (optional): An optional \"secret\" value that will be sent back to the\n                                        override URL upon request. This can act as a security\n                                        layer to ensure authentic BriteCore requests.\n            * category (optional): Sets a category for easy manipulation of multiple overrides.\n\n            ::\n\n                {\"url\": \"/britecore/policies/list\",\n                 \"override\": \"http://britecore-customui.s3-website-us-east-1.amazonaws.com/\",\n                 \"http_method\": \"POST\",\n                 \"shared_secret\": \"2bc13c35e9e8fd15c2cfd3a1dcf71ff014d3579c038b4645855ad902\",\n                 \"category\": \"Custom Policies\"}\n\n    Returns\n    -------\n    json_obj : dict\n        A JSON Object containing:\n\n        * success: true/false based on the success of the addition.\n        * message (optional): Returned if something goes wrong.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "json_obj": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/custom_ui/deleteURLOverride": {
      "post": {
        "summary": "deleteURLOverride",
        "tags": [
          "custom_ui"
        ],
        "description": "Deletes a URL override of one BriteCore URL paths\n\n    Parameters\n    ----------\n    json_obj : dict\n        A JSON object containing:\n\n            * url: The Override URL you wish to url.\n\n            ::\n\n                {\"url\": \"/britecore/policies/list\"}\n\n    Returns\n    -------\n    json_obj : dict\n        A JSON Object containing:\n\n            * success: true/false based on the success of the deletion.\n            * message (optional): Returned if something goes wrong.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "json_obj": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/custom_ui/retrieveURLOverrides": {
      "post": {
        "summary": "retrieveURLOverrides",
        "tags": [
          "custom_ui"
        ],
        "description": "Retrieves all External URL overrides\n\n    Parameters\n    ----------\n\n    Returns\n    -------\n    json_obj : list\n        A JSON List containing JSON Objects:\n\n            * success: true/false based on the success of the deletion.\n            * message (optional): Returned if something goes wrong.\n\n            ::\n\n                [{\"url\": \"/britecore/policies/list\",\n                  \"override\": \"http://britecore-customui.s3-website-us-east-1.amazonaws.com/\",\n                  \"http_method\": \"POST\",\n                  \"enabled\": true,\n                  \"shared_secret\": \"2bc13c35e9e8fd15c2cfd3a1dcf71ff014d3579c038b4645855ad902\",\n                  \"category\": null},\n                 {\"url\": \"/britecore/claims/list\",\n                  \"override\": \"http://google.com/\",\n                  \"http_method\": \"GET\",\n                  \"enabled\": false,\n                  \"shared_secret\": null,\n                  \"category\": \"Claims\"}]\n        ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/custom_ui/updateURLOverride": {
      "post": {
        "summary": "updateURLOverride",
        "tags": [
          "custom_ui"
        ],
        "description": "Update an existing URL override of one BriteCore URL paths\n\n    Parameters\n    ----------\n    json_obj : dict\n        A JSON object containing:\n\n            * url: The Override URL you wish to update.\n            * override (optional): External override URL\n            * enabled (optional): Whether or not to enable the given URL. If disabled,\n                                  the BriteCore URL will operate normally and will not\n                                  be overridden.\n            * http_method (optional): The appropriate HTTP method of the override URL (only GET or\n                                      POST supported). \"GET\" is the default.\n            * shared_secret (optional): An optional \"secret\" value that will be sent back to the\n                                        override URL upon request. This can act as a security\n                                        layer to ensure authentic BriteCore requests.\n            * category (optional): Sets a category for easy manipulation of multiple overrides.\n\n            ::\n\n                {\"url\": \"/britecore/policies/list\",\n                 \"enabled\": false}\n\n    Returns\n    -------\n    json_obj : dict\n        A JSON Object containing:\n\n            * success: true/false based on the success of the update.\n            * message (optional): Returned if something goes wrong.\n        ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "json_obj": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/deliverables/create_deliverable": {
      "post": {
        "summary": "create_deliverable",
        "tags": [
          "deliverables"
        ],
        "description": "Generates the requested deliverable for the requested revision or claim.\n\n    Parameters\n    ----------\n    revision_id : uuid\n        Required. The database identifier of the revision for which a deliverable should be generated\n    deliverable_type : str\n        Required. The name of the deliverable that should be generated\n    go_date : str\n        Effective date for the deliverable (bill date, print date, etc.)\n    reference_type : str\n        Either 'policies' or 'claims', depending on the type of deliverable being requested\n    proc_date : str\n        Date that will be recorded as the generation date of the deliverable\n    location_id : uuid\n        Specifies the business location whose version of the requested deliverable should be generated\n        (were multiple copies of like-named deliverables to exist). Can differ from the specified revision's\n        location at the caller's own risk. If not specified, will be inferred to be the location of the\n        specified revision\n    invoice_id : uuid\n        For deliverables that utilize a \"last invoice\" for content population, serves as an override to\n        render off a known invoice's data\n    reason : str\n        Reason for generating a deliverable. Can have an impact on print date, based on deliverable type\n    claim_number : str\n        Number of the claim that should be used for populating the content of the requested deliverable\n    return_premium_id : uuid\n        For deliverables that utilize a \"return premium\" for content population, serves as an override to\n        render off a known return premium's data\n    filepath : str\n        Filepath under which the new deliverable should be stored\n    claim_id : uuid\n        Database identifier of the claim that should be used for populating the content of the requested\n        deliverable\n    claim_loss_date : str\n        For deliverables that utilize a \"loss date\" for content population, serves as that value\n    delay_print_days : int\n        Number of days that the print date should be delayed from its typical assignment\n    print_state : str\n        Print state to be given to the deliverable\n\n    Returns\n    -------\n    success : bool\n        Whether or not the deliverable was generated\n    messages : list of str\n        List of human-readable success or error messages\n    data : dict\n        An object of the following format, pointing to the location of the folder containing the\n        generated deliverable.\n\n        ::\n\n            {\n                \"deliverable_url\": {\n                    \"url\": \"uploads/...\",\n                    \"path\": \"/srv/www/britecore/uploads/...\"\n                }\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "revision_id": {
                    "type": "string"
                  },
                  "deliverable_type": {
                    "type": "string"
                  },
                  "go_date": {
                    "type": "string"
                  },
                  "reference_type": {
                    "type": "string"
                  },
                  "proc_date": {
                    "type": "string"
                  },
                  "location_id": {
                    "type": "string"
                  },
                  "invoice_id": {
                    "type": "string"
                  },
                  "reason": {
                    "type": "string"
                  },
                  "claim_number": {
                    "type": "string"
                  },
                  "return_premium_id": {
                    "type": "string"
                  },
                  "filepath": {
                    "type": "string"
                  },
                  "claim_id": {
                    "type": "string"
                  },
                  "claim_loss_date": {
                    "type": "string"
                  },
                  "delay_print_days": {
                    "type": "integer"
                  },
                  "print_state": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/notes/removeNote": {
      "post": {
        "summary": "removeNote",
        "tags": [
          "notes"
        ],
        "description": "Removes a record from notes using the passed id\n    and returns success = True.\n\n    Parameters\n    ----------\n    json_dict : dict\n        The json_dict dict have the format\n        ::\n        {\n            'id': '7949c689-42b2-4aef-8579-e70662b582e6'\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "json_dict": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/payments/makeManualPolicyPayment": {
      "post": {
        "summary": "makeManualPolicyPayment",
        "tags": [
          "payments"
        ],
        "description": "Make a payment on a single policy.\n\n    This is intended to be used when the payment DOES NOT need to be ran through a vendor,\n    but instead has already been collected and is simply being posted to the policy.\n\n    Parameters\n    ----------\n    json_dict : dict\n        The json_dict dict have the format\n        {\n            'paymentType': 'Cash',\n            'depositDate': '2020-04-13',\n            \"policyNumber\": \"10-2015-36\",\n            'amount': '100.00'\n        }\n\n    Returns\n    -------\n    success : bool\n        True if completely successful, false if not\n    messages : list\n        empty\n    data : dict\n        empty\n\n    Raises\n    ------\n    UserWarning\n        You must submit a policy_number.\n        You must submit an amount.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "json_dict": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/policies/getInspection": {
      "post": {
        "summary": "getInspection",
        "tags": [
          "policies"
        ],
        "description": "\n    Parameters\n    ----------\n    json_dict : dict\n        The json_dict dict have the format\n        ::\n        {\n            'revisionId': '9759c689-72b2-5aef-7579-f90662b583f1',\n            'propertyId': '9759c689-72b2-5aef-7579-f90662b583f1',\n            'vendor': 'MIB',\n            'primaryCoverageId': '',\n            'supplements': '',\n            'additionalComments': '',\n            'reportType': '',\n            'specialInstructions': '',\n            'commercial': ''\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "json_dict": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/policies/getInspectionPrimaryCoverageOptions": {
      "post": {
        "summary": "getInspectionPrimaryCoverageOptions",
        "tags": [
          "policies"
        ],
        "description": "Get dictionary of available primary coverage options with limits.\n\n    Parameters\n    ----------\n    json_dict : dict\n        The json_dict dict have the format\n        ::\n        {\n            'propertyId': '9759c689-72b2-5aef-7579-f90662b583f1'\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "json_dict": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/policies/newCustomDeliverable": {
      "post": {
        "summary": "newCustomDeliverable",
        "tags": [
          "policies"
        ],
        "description": "Creates the custom deliverable specified by \"deliverableName\" and indexes the file in\n    Policies > Attachments.\n\n    Parameters\n    ----------\n    json_dict : dict\n        The json_dict dict have the format\n        ::\n        {\n            'revisionId': '9759c689-72b2-5aef-7579-f90662b583f1',\n            'deliverableName': 'Declaration',\n            'prebuiltHTML': '',\n            'generateHTML': 'true'\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "json_dict": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/policies/retrievePropertyInfoFromZip": {
      "post": {
        "summary": "retrievePropertyInfoFromZip",
        "tags": [
          "policies"
        ],
        "description": "Given a zip code and a business state, looks up and returns the Cities and Counties\n    related to that Zip Code as determined by the Geography table, and a flag to determine\n    if the zip code is valid in our data set.\n    Counties are then cross-referenced with business locations\n\n    Parameters\n    ----------\n    json_dict : dict\n        The json_dict dict have the format\n        ::\n        {\n            'stateAbbr': 'MA',\n            'zip': '01915',\n            'propId': '9759c689-72b2-5aef-7579-f90662b583f1'\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "json_dict": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/policies/storeNSF": {
      "post": {
        "summary": "storeNSF",
        "tags": [
          "policies"
        ],
        "description": "Mark a payment as having non-sufficient funds; debit or waive NSF fee;\n    allow or postpone canceling a policy.\n\n    Parameters\n    ----------\n    json_dict : dict\n        The json_dict dict have the format\n        ::\n        {\n            'paymentId': '9759c689-72b2-5aef-7579-f90662b583f1',\n            'dueMonth': '04',\n            'dueDay': '15',\n            'dueYear': '2020',\n            'assessFee': '100.00',\n            'allowCancel': 'false',\n            'policyId': '7949c689-42b2-4aef-8579-e70662b582e6',\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "json_dict": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/printing/getAttachment": {
      "post": {
        "summary": "getAttachment",
        "tags": [
          "printing"
        ],
        "description": "Given the file id (a db table uuid), it pushes the file\n    (using the db row's url column) to the client.\n\n    Parameters\n    ----------\n    json_dict : dict\n        The json_dict dict have the format\n        ::\n        {\n            'id': '7949c689-42b2-4aef-8579-e70662b582e6',\n            'delete_on_view': 'true',\n            'resized': 'true'\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "json_dict": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/printing/getToBePrinted": {
      "post": {
        "summary": "getToBePrinted",
        "tags": [
          "printing"
        ],
        "description": "Get all the deliverables and associated deliverables to print.\n\n    This is a sane, backwards incompatible re-implementation of retrieveToBePrinted.\n\n    Arguments:\n        from_date : The earliest date to retrieve files from. Should be formatted\n                   like \"YYYY-MM-DD\". Defaults to the client's live date.\n        to_date : The latest date to retrieve files from. Should be formatted\n                 like \"YYYY-MM-DD\". Defaults to today's date.\n        ignore_state : (optional) Ignore the file's print state. Defaults to False.\n        exclude_electronic_delivery : Default False, excludes documents that should\n                                     be delivered electronically.\n        only_electronic_delivery : Default False, only returns documents that should\n                                  be delivered electronically.\n        include_claims : Default False, if passed as true any claim deliverables\n                        with tbd print state get returned within the same batch.\n                        fields for claim deliverables are exactly the same for policy.\n        disable_edelivery_filtering : Default False, if passed as true no edelivery\n                                     filtering will occur\n        include_address_fields : Default False, if passed as true the address fields\n                                will be included in the output\n\n    Returns:\n        An JSON string containing an object with two members, consistent ordering\n        not guaranteed:\n\n           processing: Whether or not nightly processing for the to_date\n                         is processing, done, or not started.\n           files: A list of objects with the policy number, file id, date it\n                  should print, label, and title, parent id or children ids.\n                  For example:\n\n                    {'processing': 'done',\n                    'files': [{'policy_number': '10-2013-42',\n                                'file_id': 'f6b8f1b0-e4b0-4738-b96d-51c270c76580',\n                                'contact_id': 'c4e448ea-6494-439f-94eb-829a05f8f9f2',\n                                'print_date': '2013-05-21',\n                                'print_state': 'tbd',\n                                'label': 'Declaration',\n                                'title': '10-2013-42 - Declaration',\n                                'batch': page_range(1,5)},\n                            {'policy_number': '10-2013-42',\n                                'file_id': '774f0b38-2b49-4d7c-ae0f-19541841fbeb',\n                                'contact_id': 'c7404bb5-3d07-43c1-bc7b-2caffde84330',\n                                'print_date': '2013-05-21',\n                                'print_state': 'tbd',\n                                'label': null,\n                                'title': 'form-m01a32ll.pdf',\n                                'parent': 'f6b8f1b0-e4b0-4738-b96d-51c270c76580',\n                                'batch': ''}\n                             ]\n                    }\n\n                  To retrieve the file, the file_id item of each object in the list\n                  can be passed to core.uploads.getAttachment as the GET parameter \"id\".\n\n    # This should be in a wiki article or other client-facing documentation\n    Developer Reference For Using the BritePrint API:\n\n      * A normal day's job consists of simply fetching the result of getToBePrinted,\n        downloading the files, printing them as desired, and then marking them as\n        printed in BriteCore to prevent duplicate print jobs. The result SHOULD be\n        parsed as JSON.\n\n      * The \"processing\" member should be checked for the value \"done\". Any other value\n        indicates that processing for today is either \"incomplete\" or \"not started\".\n        Implementations SHOULD wait until that value becomes \"done\" before starting a\n        day's printing to ensure all files needing to be printed for that day are listed.\n\n      * The \"files\" member contains an array of objects, one for each file.\n        Stable ordering is not guaranteed, though it should be correct for most use-cases.\n\n      * The \"policy_number\" member in the file object may be used to group and\n        sort the files by policy number.\n\n      * The \"revision_id\" member in the file object may be used to group and sort\n        the files by revision id.\n\n      * The \"file_id\" member contains the id to send to the getAttachment method\n        in BriteCore.\n\n      * The \"contact_id\" member contains the BriteCore contact id of the recipient.\n\n      * The \"print_date\" member may be used to sort by the file's desired print date.\n\n      * The \"print_state\" member is a hint as to whether or not the file has been\n        printed or not. Possible values are:\n            - \"tbd\" (to be determined, that is, not printed yet)\n            - \"do not print\" (Never print this.)\n            - \"printed\" (already printed at least once.)\n            - \"failed\" (marked as a failed print job.)\n            - \"void\"\n            - \"silenced\"\n            - \"sent\"\n            - \"not mailed\"\n\n      * The \"label\" member is the type of document. For example, \"Declaration\" or\n        \"Notice of Cancellation\". For forms, this is null.\n\n      * The \"title\" member is the document's title. For regular deliverables, it will\n        usually be the policy number and label. For forms, this might be something\n        like \"form-m01a3dll.pdf\" or \"C0A63\".\n\n      * The \"parent\" member indicates that this file should be printed in addition to\n        its parent. This is for additional forms for Declarations, for example.\n        This will not be present if there is no parent document.\n\n      * The \"children\" member indicates that this file is a composite of the documents\n        listed under that key.\n\n      * The \"batch\" member indicates the batch, if any, that this document was classified\n        under by `merge_mailings`. This will always be empty for forms (if parent is present)\n        or if the `merge_docs_by_recipient_and_pol` setting is not in use.\n\n      * Sometimes print jobs get backlogged, for example, over weekends or holidays.\n\n      * After sorting the deliverables as desired, you should pull down the PDF files\n        themselves by calling getAttachment, and passing it the file_id of a file.\n        From there, it can be printed as desired.\n\n      * After they've been sent to the printer, you MUST call markAsPrinted with the\n        file_ids of the files you've printed. Failing to do so can result in processing\n        errors later, and will not cause the file to appear in the list of files when\n        reprinting later.\n\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "json_dict": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/printing/markAsPrinted": {
      "post": {
        "summary": "markAsPrinted",
        "tags": [
          "printing"
        ],
        "description": "Marks all files mentioned by id in the json_dict as 'printed'.\n\n    This is a sane, backwards incompatible re-implementation of markAsSuccessful.\n\n    Arguments:\n        file_ids: A list of file ids to mark as printed as given by getToBePrinted.\n    Returns:\n        An JSON string containing an object with one member:\n        \"num_marked\": The number of documents marked as printed.\n            {'num_marked': 27}\n\n        There are additional forms that print with some deliverables,\n        so 'num_marked' may be higher than the number of files requested to be marked.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "json_dict": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/printing/sendPrintHawk": {
      "post": {
        "summary": "sendPrintHawk",
        "tags": [
          "printing"
        ],
        "description": "New version that allows a date and email list to be passed in.\n\n    Parameters\n    ----------\n    json_dict : dict\n        The json_dict dict have the format\n        ::\n        {\n            'date': '2020-04-01'\n        }\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    messages : list of str\n        List of human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "json_dict": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/printing/sendPrintHawkEmail": {
      "post": {
        "summary": "sendPrintHawkEmail",
        "tags": [
          "printing"
        ],
        "description": "sendPrintHawkEmail",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/reports/buildXLSReport": {
      "post": {
        "summary": "buildXLSReport",
        "tags": [
          "reports"
        ],
        "description": "Generate the report and send it either through email or\n    through an instant save file interface\n\n    Parameters\n    ----------\n    json_dict : dict\n        The json_dict dict have the format\n        ::\n        {\n            'reportName': 'Losses Incurred',\n            'searchParameters': '',\n            'deliveryType': 'saveFile'\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "json_dict": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/accounting/export_account_histories": {
      "post": {
        "summary": "export_account_histories",
        "tags": [
          "accounting"
        ],
        "description": "Exports account history entries for the given policy term ids.\n\n    Parameters\n    ----------\n    policy_term_ids : list of str\n        List of policy term ids for which account history entries are to be exported. Required.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The data response containing the exported billing summary.\n        ::\n            {\n                \"account_histories\": [\n                    {...}\n                ]\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "policy_term_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/accounting/get_accounting_deliverable": {
      "post": {
        "summary": "get_accounting_deliverable",
        "tags": [
          "accounting"
        ],
        "description": "Retrieves all values necessary to generate deliverables related to\n       the account history in a policy term.\n\n    Parameters\n    ----------\n    account_history_id : str\n        Account history id from which values are to be filtered.\n    deliverable_date : str\n        Process date of the deliverable in the format YYYY-MM-DD\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The data response containing queried values for the deliverable.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "account_history_id": {
                    "type": "string"
                  },
                  "deliverable_date": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/accounting/get_invoices": {
      "post": {
        "summary": "get_invoices",
        "tags": [
          "accounting"
        ],
        "description": "Retrieves paginated invoices list related to policy\n\n    Parameters\n    ----------\n    policy_id : str\n        Filter payments by policy_id\n    bill_from_date : date\n        Filter invoices with bill date > bill_from_date\n    bill_to_date : date\n        Filter invoices with bill date < bill_to_date\n    due_from_date : date\n        Filter invoices with due date > due_from_date\n    due_to_date : date\n        Filter invoices with due date < due_to_date\n    sorting_order : str\n        Ascending/descending order. Choices {'asc', 'desc'}\n    page_number : int\n        Page number,starting from 1\n    page_size : int\n        Page size, must be >0\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The data response having the form:\n        ::\n            {\n                \"due_to_date\": \"06/06/2017\",\n                \"page_number\": 1,\n                \"bill_to_date\": null,\n                \"invoices\": [\n                  {}\n                ],\n                \"sorting_order\": \"asc\",\n                \"bill_from_date\": null,\n                \"total_pages\": 2,\n                \"due_from_date\": null,\n                \"page_size\": 2,\n                \"policy_id\": \"f855df19-ff58-4bc8-92e2-93efa35059d7\"\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_invoices"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_invoices"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/accounting/retrieve_outstanding_invoices": {
      "post": {
        "summary": "retrieve_outstanding_invoices",
        "tags": [
          "accounting"
        ],
        "description": "\n    Retrieves outstanding invoices, the querying criteria being that the entry in the account_history table\n    is not paidInFull, transactionDateTime is between transaction_date_time_from and today, and dueDate is not NULL.\n    You must provide in a transaction_date_time_from.\n\n    Parameters\n    ----------\n    transaction_date_time_from : str, required\n        Filter invoices with transaction date > transaction_date_time_from and transaction_date_time < today.\n        The date should be in the format YYYY-MM-DD HH:MM:SS\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        Contains the data retrieved from the account_history table or None if none found.\n        It has the following form:\n        ::\n            {\n            \"outstanding_invoices\": [{\n                \"account_history_id\": ,\n                \"revision_id\": ,\n                \"policy_term_id\": ,\n                \"file_id\": ,\n                \"payment_id\": ,\n                \"waive_id\": ,\n                \"credit_transfer_id\": ,\n                \"debit_transfer_id\": ,\n                \"transaction_date_time\": ,\n                \"transaction_type\": ,\n                \"generated_by\": ,\n                \"description\": ,\n                \"due_date\": ,\n                \"cancel_date\": ,\n                \"day_zero_date\": ,\n                \"back_cancel_date\": ,\n                \"payment_amount\": ,\n                \"debit_premium_fully_billed\": ,\n                \"debit_premium_fully_earned\": ,\n                \"debit_premium_pro_rata\": ,\n                \"debit_custom_fee_fully_billed\": ,\n                \"debit_custom_fee_fully_earned\": ,\n                \"debit_custom_fee_pro_rata\": ,\n                \"debit_system_fee\": ,\n                \"account_balance\": ,\n                \"deleted\": ,\n                \"voided\": ,\n                \"dirty\": ,\n                \"snapshot\": ,\n                \"date_added\": ,\n                \"date_added_micro\": ,\n                \"date_updated\": ,\n                \"date_deleted\": ,\n                \"date_voided\": ,\n                \"cancellation_revision_id\": ,\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "transaction_date_time_from": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/accounting/run_rescind_underwriting_cancellation_pending_logic": {
      "post": {
        "summary": "run_rescind_underwriting_cancellation_pending_logic",
        "tags": [
          "accounting"
        ],
        "description": "run_rescind_underwriting_cancellation_pending_logic",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "revision_id": {},
                  "old_status": {},
                  "date_cursor": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/accounting/set_return_premium_to_export": {
      "post": {
        "summary": "set_return_premium_to_export",
        "tags": [
          "accounting"
        ],
        "description": "\n    Set a return premium toExport value\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/additional_interests/create_additional_interest": {
      "post": {
        "summary": "create_additional_interest",
        "tags": [
          "additional_interests"
        ],
        "description": "create_additional_interest",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-create_additional_interest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-create_additional_interest"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/additional_interests/delete_additional_interest": {
      "post": {
        "summary": "delete_additional_interest",
        "tags": [
          "additional_interests"
        ],
        "description": "delete_additional_interest",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-delete_additional_interest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-delete_additional_interest"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/additional_interests/get_additional_interest": {
      "post": {
        "summary": "get_additional_interest",
        "tags": [
          "additional_interests"
        ],
        "description": "get_additional_interest",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_additional_interest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_additional_interest"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/additional_interests/list_additional_interests": {
      "post": {
        "summary": "list_additional_interests",
        "tags": [
          "additional_interests"
        ],
        "description": "list_additional_interests",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-list_additional_interests"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-list_additional_interests"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/additional_interests/list_interest_type_labels_by_code": {
      "post": {
        "summary": "list_interest_type_labels_by_code",
        "tags": [
          "additional_interests"
        ],
        "description": "Return the code -> label lookup for ADDITIONAL_INTEREST_TYPES, including\n    inactive rows. Frontends resolve the display label for historical AIs whose\n    stored code has since been deactivated (dropdowns keep using\n    list_interest_type_options for the picker itself).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-list_interest_type_labels_by_code"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-list_interest_type_labels_by_code"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/additional_interests/list_interest_type_options": {
      "post": {
        "summary": "list_interest_type_options",
        "tags": [
          "additional_interests"
        ],
        "description": "list_interest_type_options",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-list_interest_type_options"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-list_interest_type_options"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/additional_interests/update_additional_interest": {
      "post": {
        "summary": "update_additional_interest",
        "tags": [
          "additional_interests"
        ],
        "description": "update_additional_interest",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-update_additional_interest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-update_additional_interest"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/additional_interests/update_additional_interest_associations": {
      "post": {
        "summary": "update_additional_interest_associations",
        "tags": [
          "additional_interests"
        ],
        "description": "update_additional_interest_associations",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-update_additional_interest_associations"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-update_additional_interest_associations"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/agentcy/get_agentcies": {
      "post": {
        "summary": "get_agentcies",
        "tags": [
          "agentcy"
        ],
        "description": "get_agentcies",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/agentcy/get_assign_agentcy": {
      "post": {
        "summary": "get_assign_agentcy",
        "tags": [
          "agentcy"
        ],
        "description": "get_assign_agentcy",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/agents/agent_config": {
      "post": {
        "summary": "agent_config",
        "tags": [
          "agents"
        ],
        "description": "Handler for POST /api/v2/agents/agent_config - Per-agent UI config.\n\n    Returns runtime UI configuration for an agent so the frontend can gate\n    features on the agent's real capabilities: whether the chat-history surface\n    should be shown (``history_enabled``) and whether the Jobs/Ingestion surface\n    should be shown (``jobs_enabled``).\n\n    Both flags are derived from a single read of the agent's behavior block\n    (see ``AIAgentService.get_ui_capabilities``).\n\n    ``history_enabled`` reflects **durable** conversation memory, not just\n    recording. It is the AND of the agent's behavior flags:\n\n    - ``use_memory`` (env ``USE_MEMORY``) -- the agent records conversation\n      turns at all; and\n    - ``ai_db_available`` -- DB-backed persistent storage is actually active,\n      which on the agent side requires ``USE_PERSISTENT_STORAGE`` enabled AND a\n      reachable ``AI_DB_HOST`` (the agent reports the effective storage state,\n      not merely the config intent).\n\n    Recording without persistence is ephemeral (history would reset on restart),\n    so the drawer is hidden in that case as well.\n\n    ``jobs_enabled`` reflects the agent's ``JOBS_ENABLED`` env (whether the async\n    job routes are mounted on the pod), so the frontend hides the\n    Jobs/Ingestion entry points instead of surfacing controls that would 404.\n\n    Both checks fail OPEN: a transient error, a partial config, or an older\n    agent that doesn't expose these flags yet leaves the features enabled; only\n    an explicit ``false`` from a reachable agent hides them.\n\n    Parameters\n    ----------\n    agent : str, required\n        Frontend agent key (e.g. 'lines', 'rules', 'insured').\n\n    Returns\n    -------\n    success : bool\n        True if successful\n    data : dict\n        {'history_enabled': bool, 'jobs_enabled': bool}\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-agents_agent_config"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-agents_agent_config"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/agents/agent_create_job": {
      "post": {
        "summary": "agent_create_job",
        "tags": [
          "agents"
        ],
        "description": "Handler for POST /api/v2/agents/agent_create_job - Create an async job.\n\n    Parameters\n    ----------\n    agent : str, required\n        Frontend agent key ('lines' or 'rules').\n    job_name : str, required\n    prompt : str, required\n    context : dict, optional\n    files : list, optional\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-agents_agent_create_job"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-agents_agent_create_job"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/agents/agent_delete_job": {
      "post": {
        "summary": "agent_delete_job",
        "tags": [
          "agents"
        ],
        "description": "Handler for POST /api/v2/agents/agent_delete_job - Delete a job.\n\n    Soft-deletes a terminal job (completed/failed/stopped) so it no longer\n    appears in the Jobs list. Active jobs must be stopped first (the agent\n    returns 409 otherwise).\n\n    Parameters\n    ----------\n    agent : str, required\n        Frontend agent key ('lines' or 'rules').\n    job_id : str, required\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "agent": {
                    "type": "string"
                  },
                  "job_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/agents/agent_delete_session": {
      "post": {
        "summary": "agent_delete_session",
        "tags": [
          "agents"
        ],
        "description": "Handler for POST /api/v2/agents/agent_delete_session - Delete a session.\n\n    Parameters\n    ----------\n    agent : str, required\n        Frontend agent key (e.g. 'lines', 'rules', 'quote').\n    session_id : str, required\n        The session ID to delete\n\n    Returns\n    -------\n    success : bool\n        True if successful\n    data : dict\n        Deletion result\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-agents_agent_delete_session"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-agents_agent_delete_session"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/agents/agent_get_job": {
      "post": {
        "summary": "agent_get_job",
        "tags": [
          "agents"
        ],
        "description": "Handler for POST /api/v2/agents/agent_get_job - Fetch a single job.\n\n    Parameters\n    ----------\n    agent : str, required\n        Frontend agent key ('lines' or 'rules').\n    job_id : str, required\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-agents_agent_get_job"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-agents_agent_get_job"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/agents/agent_list_jobs": {
      "post": {
        "summary": "agent_list_jobs",
        "tags": [
          "agents"
        ],
        "description": "Handler for POST /api/v2/agents/agent_list_jobs - List jobs.\n\n    Parameters\n    ----------\n    agent : str, required\n        Frontend agent key ('lines' or 'rules').\n    status : str, optional\n    limit : int, optional (default 100)\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-agents_agent_list_jobs"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-agents_agent_list_jobs"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/agents/agent_rename_session": {
      "post": {
        "summary": "agent_rename_session",
        "tags": [
          "agents"
        ],
        "description": "Handler for POST /api/v2/agents/agent_rename_session - Rename a session.\n\n    Parameters\n    ----------\n    agent : str, required\n        Frontend agent key (e.g. 'lines', 'rules', 'quote').\n    session_id : str, required\n        The session ID to rename\n    title : str, required\n        New title; stripped, must be non-empty (length bounded upstream)\n\n    Returns\n    -------\n    success : bool\n        True if successful\n    data : dict\n        Echo payload ``{session_id, title}``\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "agent": {
                    "type": "string"
                  },
                  "session_id": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/agents/agent_resume_job": {
      "post": {
        "summary": "agent_resume_job",
        "tags": [
          "agents"
        ],
        "description": "Handler for POST /api/v2/agents/agent_resume_job - Resume a paused job.\n\n    Parameters\n    ----------\n    agent : str, required\n        Frontend agent key ('lines' or 'rules').\n    job_id : str, required\n    message : str, optional\n    selected_option : str, optional\n    data : dict, optional\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-agents_agent_resume_job"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-agents_agent_resume_job"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/agents/agent_session_messages": {
      "post": {
        "summary": "agent_session_messages",
        "tags": [
          "agents"
        ],
        "description": "Handler for POST /api/v2/agents/agent_session_messages - Get session messages.\n\n    Parameters\n    ----------\n    agent : str, required\n        Frontend agent key (e.g. 'lines', 'rules', 'quote').\n    session_id : str, required\n        The session ID to retrieve messages for\n\n    Returns\n    -------\n    success : bool\n        True if successful\n    data : list\n        Array of message objects\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-agents_agent_session_messages"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-agents_agent_session_messages"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/agents/agent_sessions": {
      "post": {
        "summary": "agent_sessions",
        "tags": [
          "agents"
        ],
        "description": "Handler for POST /api/v2/agents/agent_sessions - List chat sessions.\n\n    When ``claim_id`` is supplied the listing is scoped to sessions tagged\n    with that claim (entity_type='claim'), so the Claims Copilot history is\n    filtered to the claim the adjuster is viewing. Omitting it returns the\n    user's unscoped history, leaving all other agents unaffected.\n\n    Parameters\n    ----------\n    agent : str, required\n        Frontend agent key (e.g. 'lines', 'rules', 'quote', 'adjuster').\n    limit : int, optional\n        Maximum number of sessions to return (default 100)\n    claim_id : str, optional\n        Claim id to scope the listing to (Claims Copilot only).\n\n    Returns\n    -------\n    success : bool\n        True if successful\n    data : list\n        Array of session objects\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-agents_agent_sessions"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-agents_agent_sessions"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/agents/agent_status": {
      "post": {
        "summary": "agent_status",
        "tags": [
          "agents"
        ],
        "description": "Handler for POST /api/v2/agents/agent_status.\n\n    Whether ``agent`` is turned on for the carrier and permitted for this user,\n    so a page can decide whether to draw it. Ungated: it reports only the\n    caller's own access.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-agents_agent_status"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-agents_agent_status"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/agents/agent_stop_job": {
      "post": {
        "summary": "agent_stop_job",
        "tags": [
          "agents"
        ],
        "description": "Handler for POST /api/v2/agents/agent_stop_job - Stop an active job.\n\n    Transitions a pending/running/paused job to 'stopped'. Terminal jobs\n    (completed/failed/stopped) get a 409 from the agent. Returns the updated\n    job so the UI can reflect the new status without a follow-up fetch.\n\n    Parameters\n    ----------\n    agent : str, required\n        Frontend agent key ('lines' or 'rules').\n    job_id : str, required\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "agent": {
                    "type": "string"
                  },
                  "job_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/agents/claims": {
      "post": {
        "summary": "claims",
        "tags": [
          "agents"
        ],
        "description": "Handler for POST /api/v2/agents/claims - Non-streaming chat.\n\n    Authentication is handled by the @requires_permission decorator.\n    The api_key should be passed for authentication (typically via header or form).\n\n    Parameters\n    ----------\n    prompt : str, required\n        The user's message/question\n    session_id : str, optional\n        Session ID for conversation continuity\n    context : str, optional\n        Additional context information\n    files : list, optional\n        Files to upload (multipart form data)\n\n    Returns\n    -------\n    success : bool\n        True if successful\n    messages : list[str]\n        List of human-readable messages\n    data : dict\n        Response from AI agent with 'response' and 'session_id'\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-claims"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-claims"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/agents/claims_analytics": {
      "post": {
        "summary": "claims_analytics",
        "tags": [
          "agents"
        ],
        "description": "Handler for POST /api/v2/agents/claims_analytics - Non-streaming chat.\n\n    Claims Analytics is the Claims Analytics Copilot that provides insights\n    and analysis based on claims data.\n\n    Parameters\n    ----------\n    prompt : str, required\n        The user's message/question\n    session_id : str, optional\n        Session ID for conversation continuity\n    context : str, optional\n        Context data (JSON string with metrics, filters, claims data, etc.)\n    files : list, optional\n        Files to upload (multipart form data)\n\n    Returns\n    -------\n    success : bool\n        True if successful\n    messages : list[str]\n        List of human-readable messages\n    data : dict\n        Response from AI agent with 'response', 'session_id', and 'metadata'\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-claims_analytics"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-claims_analytics"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/agents/claims_analytics_stream": {
      "post": {
        "summary": "claims_analytics_stream",
        "tags": [
          "agents"
        ],
        "description": "Handler for POST /api/v2/agents/claims_analytics_stream - SSE streaming chat.\n\n    Claims Analytics is the Claims Analytics Copilot that provides streaming\n    insights and analysis based on claims data.\n\n    Parameters\n    ----------\n    prompt : str, required\n        The user's message/question\n    session_id : str, optional\n        Session ID for conversation continuity\n    context : str, optional\n        Context data (JSON string with metrics, filters, claims data, etc.)\n\n    Returns\n    -------\n    SSE stream with events: start, content, metadata, done, error\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-claims_analytics_stream"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/agents/claims_stream": {
      "post": {
        "summary": "claims_stream",
        "tags": [
          "agents"
        ],
        "description": "Handler for POST /api/v2/agents/claims_stream - SSE streaming chat.\n\n    Authentication is handled by the @requires_permission decorator.\n    The api_key should be passed for authentication (typically via header or form).\n\n    Parameters\n    ----------\n    prompt : str, required\n        The user's message/question\n    session_id : str, optional\n        Session ID for conversation continuity\n    context : str, optional\n        Additional context information\n\n    Returns\n    -------\n    SSE stream with events: start, content, metadata, done, error\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-claims_stream"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/agents/documents_templates": {
      "post": {
        "summary": "documents_templates",
        "tags": [
          "agents"
        ],
        "description": "Handler for POST /api/v2/agents/documents_templates - Non-streaming chat.\n\n    Parameters\n    ----------\n    prompt : str, required\n        The user's message/question\n    session_id : str, optional\n        Session ID for conversation continuity\n    context : str, optional\n        Additional context information\n    files : list, optional\n        Files to upload (multipart form data)\n\n    Returns\n    -------\n    success : bool\n        True if successful\n    messages : list[str]\n        List of human-readable messages\n    data : dict\n        Response from AI agent with 'response' and 'session_id'\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-documents_templates"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-documents_templates"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/agents/documents_templates_carbone_context": {
      "post": {
        "summary": "documents_templates_carbone_context",
        "tags": [
          "agents"
        ],
        "description": "Handler for POST /api/v2/agents/documents_templates_carbone_context.\n\n    Returns the Carbone context the Documents and Forms Copilot should reason\n    over. Used by the bc-documents-templates MCP server's get_carbone_context\n    tool - the MCP is a thin proxy; this endpoint is the source of truth for\n    both the data shape and the calculated-field schema.\n\n    Authenticated via the standard `api_key` parameter; the MCP authenticates\n    using its service key (MCP_BRITECORE_API_KEY / MCP_CONTACT_API_KEY) wired\n    through bc_common.britecore_client.\n\n    Behavior:\n    - If `entity_number` is provided: live mode. The same SQLRunner-derived\n      context that would be used at production render time is returned,\n      with `apply_calculated_fields()` already applied.\n    - If `entity_number` is absent: example mode. The canonical example\n      context shipped with BriteCore is returned, also with calculated\n      fields applied so values appear under `calculated.*`. When a policy\n      type is selected (`policy_type_name` [+ `location_id`]), the fixture's\n      static line items are replaced by items generated from that policy\n      type's configured items - real names, sections, limit/deductible\n      columns, rating categories and rate variables, with synthesized\n      amounts - so the copilot maps against coverages the site actually has.\n\n    In both modes, a `_schema` map is attached describing fields whose\n    meaning isn't obvious from their key name (date zoo, display/raw money\n    pairs, dec/status family, calculated fields). Calc-field descriptions\n    are merged on top of the static BriteCore context schema and keyed by\n    path (e.g. `calculated.tax_total`, `drivers[i].calculated.age`).\n\n    Parameters\n    ----------\n    entity_number : str, optional\n        Policy or claim number. When present, fetches live data.\n    entity_type : str, optional\n        'policy' or 'claim'. Defaults to 'policy'. Only used in live mode.\n    deliverable_id : str, optional\n        XReportLocation id of the deliverable being authored. Drives the\n        calculated-field scope; falls back to globals only when missing.\n    policy_type_name : str, optional\n        The Carbone-template page's policy-type dropdown selection. Resolves\n        the policy type when no `entity_number` is given, which is what\n        drives both the item-name catalog and the generated example items.\n    location_id : str, optional\n        The business-location dropdown selection, narrowing\n        `policy_type_name` to one location. Without it, a name matching\n        several locations resolves to all of them.\n\n    Returns\n    -------\n    dict\n        success : bool\n        data : dict\n            context : dict (Carbone context with `calculated.*` populated)\n            _schema : dict (path-to-description map; static + calc-field\n                descriptions merged)\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-documents_templates_carbone_context"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-documents_templates_carbone_context"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/agents/documents_templates_download": {
      "post": {
        "summary": "documents_templates_download",
        "tags": [
          "agents"
        ],
        "description": "Handler for GET /api/v2/agents/documents_templates_download - File download proxy.\n\n    Fetches a file generated by the Documents and Forms Copilot and streams it\n    back to the browser. Used to download generated DOCX templates and rendered PDFs.\n\n    Authentication is handled by the @requires_permission decorator.\n    The api_key should be passed for authentication (typically via query parameter).\n\n    Parameters\n    ----------\n    session_id : str, required\n        The agent session ID (returned in the SSE start event)\n    filename : str, required\n        The file to download (e.g., 'document_template.docx')\n\n    Returns\n    -------\n    bytes\n        Binary file content with Content-Type and Content-Disposition headers\n\n    Raises\n    ------\n    BCServiceError\n        If session_id or filename is missing, contains path traversal characters,\n        or the agent is unreachable\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-documents_templates_download"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/agents/documents_templates_stream": {
      "post": {
        "summary": "documents_templates_stream",
        "tags": [
          "agents"
        ],
        "description": "Handler for POST /api/v2/agents/documents_templates_stream - SSE streaming chat.\n\n    Parameters\n    ----------\n    prompt : str, required\n        The user's message/question\n    session_id : str, optional\n        Session ID for conversation continuity\n    context : str, optional\n        Additional context information\n\n    Returns\n    -------\n    SSE stream with events: start, token/content, tool_execution, interrupt (HITL), metadata, done, error\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-documents_templates_stream"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/agents/fnol": {
      "post": {
        "summary": "fnol",
        "tags": [
          "agents"
        ],
        "description": "Handler for POST /api/v2/agents/fnol - Non-streaming chat.\n\n    Authentication is handled by the @requires_permission decorator.\n    The api_key should be passed for authentication (typically via header or form).\n\n    Parameters\n    ----------\n    prompt : str, required\n        The user's message/question\n    session_id : str, optional\n        Session ID for conversation continuity\n    context : str, optional\n        Additional context information\n    files : list, optional\n        Files to upload (multipart form data)\n\n    Returns\n    -------\n    success : bool\n        True if successful\n    messages : list[str]\n        List of human-readable messages\n    data : dict\n        Response from AI agent with 'response' and 'session_id'\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-fnol"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-fnol"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/agents/fnol_stream": {
      "post": {
        "summary": "fnol_stream",
        "tags": [
          "agents"
        ],
        "description": "Handler for POST /api/v2/agents/fnol_stream - SSE streaming chat.\n\n    Authentication is handled by the @requires_permission decorator.\n    The api_key should be passed for authentication (typically via header or form).\n\n    Parameters\n    ----------\n    prompt : str, required\n        The user's message/question\n    session_id : str, optional\n        Session ID for conversation continuity\n    context : str, optional\n        Additional context information\n\n    Returns\n    -------\n    SSE stream with events: start, content, metadata, done, error\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-fnol_stream"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/agents/init_quote_session": {
      "post": {
        "summary": "init_quote_session",
        "tags": [
          "agents"
        ],
        "description": "Handler for POST /api/v2/agents/init_quote_session - Initialize quote session.\n\n    Proxies to AIAgents POST /quote/sessions/init, which creates the session,\n    seeds the agent workspace with the form data, stores the uploads, and\n    schedules the background turns that read the documents and rate the quote.\n\n    Create Quote sends this once, as multipart form data: the form fields JSON\n    under ``data``, and the agent's documents as repeated ``files`` parts.\n\n    Parameters\n    ----------\n    state : str, required\n        US state or Canadian province abbreviation (e.g. 'TX')\n    policy_type_id : str, required\n        UUID of the selected policy type\n    policy_type_name : str, optional\n        Display name of the selected policy type (e.g. 'Standard Auto Policy')\n    policy_type_kind : str, optional\n        The policy type's kind: 'Property', 'Auto' or 'Umbrella'\n    underlying_policy_ids : list[str], optional\n        Umbrella only: the one policy the quote sits on. Forwarded with an\n        ``underlying`` summary of what linking it copies into the quote.\n    line_name : str, optional\n        Name of the selected line/product group (e.g. 'Personal Auto')\n    effective_date : str, required\n        Policy effective date in YYYY-MM-DD format\n    term_type : str, optional\n        Policy term selected by agent (e.g. '1 Year', '6 Months')\n    knockout_answers : list, optional\n        List of underwriting question answers [{questionId, yesNoAnswer, explanation}]\n\n    Returns\n    -------\n    success : bool\n        True if successful\n    data : dict\n        session_id: str - UUID of the created session\n        filenames: list[str] - the documents stored by this call\n        pdf_filename: str - the first PDF stored, when there is one\n        file_errors: list[str] - per-file failures; the session still opens\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "state": {
                    "type": "string"
                  },
                  "policy_type_id": {
                    "type": "string"
                  },
                  "policy_type_name": {
                    "type": "string"
                  },
                  "policy_type_kind": {
                    "type": "string"
                  },
                  "underlying_policy_ids": {
                    "type": "string"
                  },
                  "line_name": {
                    "type": "string"
                  },
                  "effective_date": {
                    "type": "string"
                  },
                  "term_type": {
                    "type": "string"
                  },
                  "knockout_answers": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/agents/lines": {
      "post": {
        "summary": "lines",
        "tags": [
          "agents"
        ],
        "description": "Handler for POST /api/v2/agents/lines - Non-streaming chat.\n\n    Parameters\n    ----------\n    prompt : str, required\n        The user's message/question\n    session_id : str, optional\n        Session ID for conversation continuity\n    context : str, optional\n        Additional context information\n    files : list, optional\n        Files to upload (multipart form data)\n\n    Returns\n    -------\n    success : bool\n        True if successful\n    messages : list[str]\n        List of human-readable messages\n    data : dict\n        Response from AI agent with 'response' and 'session_id'\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "prompt": {
                    "type": "string"
                  },
                  "session_id": {
                    "type": "string"
                  },
                  "context": {
                    "type": "string"
                  },
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/agents/lines_stream": {
      "post": {
        "summary": "lines_stream",
        "tags": [
          "agents"
        ],
        "description": "Handler for POST /api/v2/agents/lines_stream - SSE streaming chat.\n\n    Parameters\n    ----------\n    prompt : str, required\n        The user's message/question\n    session_id : str, optional\n        Session ID for conversation continuity\n    context : str, optional\n        Additional context information\n\n    Returns\n    -------\n    SSE stream with events: start, content, metadata, done, error\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "prompt": {
                    "type": "string"
                  },
                  "session_id": {
                    "type": "string"
                  },
                  "context": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/agents/quote": {
      "post": {
        "summary": "quote",
        "tags": [
          "agents"
        ],
        "description": "Handler for POST /api/v2/agents/quote - Non-streaming chat.\n\n    Parameters\n    ----------\n    prompt : str, required\n        The user's message/question\n    session_id : str, optional\n        Session ID for conversation continuity\n    context : str, optional\n        Additional context information\n    files : list, optional\n        Files to upload (multipart form data)\n\n    Returns\n    -------\n    success : bool\n        True if successful\n    messages : list[str]\n        List of human-readable messages\n    data : dict\n        Response from AI agent with 'response' and 'session_id'\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-quote"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/agents/quote_context": {
      "post": {
        "summary": "quote_context",
        "tags": [
          "agents"
        ],
        "description": "Handler for GET /api/v2/agents/quote_context - Fetch the live quote preview for a session.\n\n    Proxies to AIAgents ``GET {quote-endpoint}/quote/sessions/{session_id}/context``, which returns\n    the extracted-quote context plus a ``preview`` projection (named insured, drivers, vehicles,\n    coverages, estimated premium) of the session's ``quote.json``.\n\n    The Create-Quote left-side live preview (BC-23114) is fed from this request/response endpoint\n    rather than SSE: the extraction/\"present\" turns run in the background (the UI polls for them), so\n    no streaming ``quote_preview`` event reaches the browser. Fetching the projected context on demand\n    (after background processing and after each turn) keeps the preview in sync regardless of how a\n    given turn was delivered.\n\n    Parameters\n    ----------\n    session_id : str, required\n        UUID of the quote Copilot session.\n\n    Returns\n    -------\n    dict\n        The AIAgents context payload, including ``preview`` (None until ``quote.json`` exists).\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "session_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/agents/quote_processing_status": {
      "post": {
        "summary": "quote_processing_status",
        "tags": [
          "agents"
        ],
        "description": "Handler for GET /api/v2/agents/quote_processing_status - Check background processing.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/agents/quote_stream": {
      "post": {
        "summary": "quote_stream",
        "tags": [
          "agents"
        ],
        "description": "Handler for POST /api/v2/agents/quote_stream - SSE streaming chat.\n\n    Parameters\n    ----------\n    prompt : str, required\n        The user's message/question\n    session_id : str, optional\n        Session ID for conversation continuity\n    context : str, optional\n        Additional context information\n\n    Returns\n    -------\n    SSE stream with events: start, content, metadata, done, error\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-quote_stream"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/agents/report_copilot": {
      "post": {
        "summary": "report_copilot",
        "tags": [
          "agents"
        ],
        "description": "Handler for POST /api/v2/agents/report_copilot - Non-streaming chat.\n\n    Pattern parity with the other agents. The Report Copilot frontend uses\n    the streaming variant (``report_copilot_stream``); this endpoint is\n    available for non-streaming clients and follows the canonical multipart\n    file-upload shape (plural ``files``).\n\n    Parameters\n    ----------\n    prompt : str, required\n        The user's message/question\n    session_id : str, optional\n        Session ID for conversation continuity\n    context : str, optional\n        Additional context information (sheet query + last error)\n    files : list, optional\n        Files to upload (canonical multipart form-data with plural ``files``)\n\n    Returns\n    -------\n    success : bool\n        True if successful\n    messages : list[str]\n        List of human-readable messages\n    data : dict\n        Response from AI agent with 'response', 'session_id', and 'metadata'\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "prompt": {
                    "type": "string"
                  },
                  "session_id": {
                    "type": "string"
                  },
                  "context": {
                    "type": "string"
                  },
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/agents/report_copilot_attach_entity": {
      "post": {
        "summary": "report_copilot_attach_entity",
        "tags": [
          "agents"
        ],
        "description": "Handler for POST /api/v2/agents/report_copilot_attach_entity.\n\n    Attach an opaque ``(entity_type, entity_id)`` tag to an existing\n    Report Copilot conversation. Idempotent on the AIAgents side via\n    ``INSERT IGNORE``: re-attaching the same triple is a no-op.\n\n    Used by ``sqlEditor.js`` after a brand-new report is saved to wire\n    the session that started before the save (orphan conversation) to\n    the freshly-minted report id.\n\n    Parameters\n    ----------\n    session_id : str, required\n        The session id to attach to.\n    entity_type : str, required\n        Opaque entity type (e.g. ``'report'``).\n    entity_id : str, required\n        Opaque entity id (e.g. the BriteCore report uuid).\n\n    Returns\n    -------\n    success : bool\n        True on a 201 response from the agent service.\n    data : dict\n        Echo payload ``{session_id, entity_type, entity_id, inserted}``.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-agents_report_copilot_attach_entity"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-agents_report_copilot_attach_entity"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/agents/report_copilot_capabilities": {
      "post": {
        "summary": "report_copilot_capabilities",
        "tags": [
          "agents"
        ],
        "description": "Handler for POST /api/v2/agents/report_copilot_capabilities.\n\n    Returns the report-agent runtime capabilities so the SQL Editor can adapt\n    its UI to whichever agent the site is actually running: the deep-agent\n    Report Copilot (a single unified answer/build flow, a machine-readable\n    delivery envelope, a plan-approval interrupt) or the classic orchestrated\n    agent (explicit Explore/Build modes). The frontend reads this once at init\n    rather than assuming from a deployment env var it cannot see.\n\n    Proxies the agent's ``GET /`` capability block; any failure degrades to\n    ``classic`` so a slow or unreachable agent never hides UI controls.\n\n    Returns\n    -------\n    success : bool\n        True (the probe always resolves; failures fall back to ``classic``).\n    data : dict\n        ``{report_agent_kind, unified_explore_build, delivers_report_envelope,\n        uses_plan_interrupt}``.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-agents_report_copilot_capabilities"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-agents_report_copilot_capabilities"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/agents/report_copilot_client_error": {
      "post": {
        "summary": "report_copilot_client_error",
        "tags": [
          "agents"
        ],
        "description": "Handler for POST /api/v2/agents/report_copilot_client_error.\n\n    Counts an error the Report Copilot UI displayed.\n\n    A missing ``error_class`` is a 400: the caller is required to say what it\n    rendered, and coercing that away would hide a frontend bug. An *unrecognised*\n    one is recorded as ``other``, so a frontend that adds a site before the\n    backend knows about it still counts.\n\n    Returns the tags actually recorded, which differ from those sent when a value\n    is coerced.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-agents_report_copilot_client_error"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-agents_report_copilot_client_error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/agents/report_copilot_delete_session": {
      "post": {
        "summary": "report_copilot_delete_session",
        "tags": [
          "agents"
        ],
        "description": "Handler for POST /api/v2/agents/report_copilot_delete_session - Delete a session.\n\n    Parameters\n    ----------\n    session_id : str, required\n        The session ID to delete\n\n    Returns\n    -------\n    success : bool\n        True if successful\n    data : dict\n        Deletion result\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-agents_report_copilot_delete_session"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-agents_report_copilot_delete_session"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/agents/report_copilot_rename_session": {
      "post": {
        "summary": "report_copilot_rename_session",
        "tags": [
          "agents"
        ],
        "description": "Handler for POST /api/v2/agents/report_copilot_rename_session - Rename a session.\n\n    Replaces the auto-generated title with a user-supplied one. Proxies\n    ``PATCH {report-copilot-endpoint}/sessions/{session_id}`` body\n    ``{\"title\": ...}``; ownership enforced upstream. Called by ``sqlEditor.js``\n    inline rename in the history drawer.\n\n    Parameters\n    ----------\n    session_id : str, required\n        The session id to rename.\n    title : str, required\n        New title; stripped, must be non-empty (length bounded upstream).\n\n    Returns\n    -------\n    success : bool\n        True on a 200 response from the agent service.\n    data : dict\n        Echo payload ``{session_id, title}``.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "session_id": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/agents/report_copilot_session_messages": {
      "post": {
        "summary": "report_copilot_session_messages",
        "tags": [
          "agents"
        ],
        "description": "Handler for POST /api/v2/agents/report_copilot_session_messages - Get session messages.\n\n    Parameters\n    ----------\n    session_id : str, required\n        The session ID to retrieve messages for\n\n    Returns\n    -------\n    success : bool\n        True if successful\n    data : list\n        Array of message objects\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-agents_report_copilot_session_messages"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-agents_report_copilot_session_messages"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/agents/report_copilot_session_state": {
      "post": {
        "summary": "report_copilot_session_state",
        "tags": [
          "agents"
        ],
        "description": "Handler for POST /api/v2/agents/report_copilot_session_state - Get UI-restore state.\n\n    Proxies ``GET {report-copilot-endpoint}/sessions/{session_id}/state`` so\n    the sqlEditor.js frontend can redraw the Report Copilot UI (phase pills,\n    report plan, per-sheet SQL, validation flags) when a user reloads or\n    switches conversations. Without this the only thing the UI gets on\n    resume is the message list, and the timeline / SQL state stays empty\n    until the next user-initiated message produces fresh SSE chunks.\n\n    Parameters\n    ----------\n    session_id : str, required\n        The session ID to retrieve UI state for.\n\n    Returns\n    -------\n    success : bool\n        True on a 200 response from the agent service.\n    data : dict\n        Pass-through of the agent service envelope:\n        ``{session_id, agent_name, state, source}``. ``source`` is\n        ``\"extractor\"`` when the Report Agent's ``aget_state_for_request``\n        hook returned the variant-A2 payload, or ``\"fallback\"`` when only\n        conversation metadata is available.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-agents_report_copilot_session_state"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-agents_report_copilot_session_state"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/agents/report_copilot_sessions": {
      "post": {
        "summary": "report_copilot_sessions",
        "tags": [
          "agents"
        ],
        "description": "Handler for POST /api/v2/agents/report_copilot_sessions - List chat sessions.\n\n    Parameters\n    ----------\n    limit : int, optional\n        Maximum number of sessions to return (default 100)\n    entity_type : str, optional\n        Restrict listing to conversations attached to ``(entity_type,\n        entity_id)`` (e.g. ``'report'``). Must be supplied with\n        ``entity_id``; supplying only one is silently treated as no filter.\n    entity_id : str, optional\n        Paired with ``entity_type``; the opaque external entity id (e.g.\n        a saved report's id).\n\n    Returns\n    -------\n    success : bool\n        True if successful\n    data : list\n        Array of session objects (each with an inline ``entities`` array)\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-agents_report_copilot_sessions"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-agents_report_copilot_sessions"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/agents/report_copilot_stream": {
      "post": {
        "summary": "report_copilot_stream",
        "tags": [
          "agents"
        ],
        "description": "Handler for POST /api/v2/agents/report_copilot_stream - SSE streaming chat.\n\n    Accepts the three request shapes the SQL editor frontend sends:\n\n    - JSON body, no file (plain chat / sheet context).\n    - JSON body with ``file_base64`` (file plus sheet context).\n    - Multipart ``FormData`` with singular ``file`` field (file, no sheet).\n\n    Emits the SSE event types the ``sqlEditor.js`` frontend consumes:\n    ``start``, ``content``, ``tool_execution``, ``planning_complete`` (with\n    ``report_plan``), ``agent_state`` (with ``agent_mode`` and\n    ``current_phase``), ``done``, and ``error``.\n\n    Parameters\n    ----------\n    prompt : str, required (or file)\n        The user's message/question\n    session_id : str, optional\n        Session ID for conversation continuity\n    context : str, optional\n        Additional context (sheet query + last error)\n    initial_state_params : dict or JSON string, optional\n        Structured per-agent state seed (e.g. ``{\"agent_mode\": \"build\"}``)\n    file_base64 : str, optional (JSON requests only)\n        Base64-encoded file payload, with or without ``data:`` URL prefix\n    file_name : str, optional (JSON requests only)\n        Filename for the base64 upload (default ``uploaded_file``)\n    file_type : str, optional (JSON requests only)\n        MIME type for the base64 upload (default ``application/octet-stream``)\n\n    Returns\n    -------\n    SSE stream with events: start, content, tool_execution, planning_complete,\n    agent_state, done, error\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "prompt": {
                    "type": "string"
                  },
                  "session_id": {
                    "type": "string"
                  },
                  "context": {
                    "type": "string"
                  },
                  "initial_state_params": {
                    "type": "string"
                  },
                  "file_base64": {
                    "type": "string"
                  },
                  "file_name": {
                    "type": "string"
                  },
                  "file_type": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/agents/rules": {
      "post": {
        "summary": "rules",
        "tags": [
          "agents"
        ],
        "description": "Handler for POST /api/v2/agents/rules - Non-streaming chat.\n\n    Parameters\n    ----------\n    prompt : str, required\n        The user's message/question\n    session_id : str, optional\n        Session ID for conversation continuity\n    context : str, optional\n        Additional context information\n    files : list, optional\n        Files to upload (multipart form data)\n\n    Returns\n    -------\n    success : bool\n        True if successful\n    messages : list[str]\n        List of human-readable messages\n    data : dict\n        Response from AI agent with 'response' and 'session_id'\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "prompt": {
                    "type": "string"
                  },
                  "session_id": {
                    "type": "string"
                  },
                  "context": {
                    "type": "string"
                  },
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/agents/rules_stream": {
      "post": {
        "summary": "rules_stream",
        "tags": [
          "agents"
        ],
        "description": "Handler for POST /api/v2/agents/rules_stream - SSE streaming chat.\n\n    Parameters\n    ----------\n    prompt : str, required\n        The user's message/question\n    session_id : str, optional\n        Session ID for conversation continuity\n    context : str, optional\n        Additional context information\n\n    Returns\n    -------\n    SSE stream with events: start, content, metadata, done, error\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "prompt": {
                    "type": "string"
                  },
                  "session_id": {
                    "type": "string"
                  },
                  "context": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/ai/check_enhancement_status": {
      "post": {
        "summary": "check_enhancement_status",
        "tags": [
          "ai"
        ],
        "description": "Check if text enhancement is enabled and configured.\n\n    Returns\n    -------\n    dict\n        {\"success\": True, \"enabled\": bool, \"configured\": bool}\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/ai/enhance_text": {
      "post": {
        "summary": "enhance_text",
        "tags": [
          "ai"
        ],
        "description": "Enhance text using AI.\n\n    Supports three enhancement modes:\n    - improve: Transform vague text into clear, actionable content\n    - simplify: Reduce complexity while keeping core intent\n    - summarize: Create concise summary of longer text\n\n    Parameters\n    ----------\n    original_text : str, required\n        The text to enhance\n    enhancement_mode : str, required\n        The enhancement mode ('improve', 'simplify', or 'summarize')\n    preset : str, optional\n        OpenRouter preset for model selection ('quick', 'balanced', 'quality', etc.)\n        If not provided, uses the recommended preset for the enhancement mode.\n    context : str, optional\n        Additional context for the enhancement (e.g., \"The intent is to build specs for report creation\")\n\n    Returns\n    -------\n    dict\n        On success: {\"success\": True, \"enhancedText\": str}\n        On error: {\"success\": False, \"error\": str}\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "original_text": {
                    "type": "string"
                  },
                  "enhancement_mode": {
                    "type": "string"
                  },
                  "preset": {
                    "type": "string"
                  },
                  "context": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/ai/get_enhancement_modes": {
      "post": {
        "summary": "get_enhancement_modes",
        "tags": [
          "ai"
        ],
        "description": "Get available text enhancement modes.\n\n    Returns\n    -------\n    dict\n        {\"success\": True, \"modes\": [{\"id\": str, \"label\": str, \"description\": str}, ...]}\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/ai/list_uw_ai_analyses": {
      "post": {
        "summary": "list_uw_ai_analyses",
        "tags": [
          "ai"
        ],
        "description": "List UW AI analyses for a given revision.\n\n    Parameters\n    ----------\n    revision_id : str, required\n        The revision UUID to list analyses for.\n\n    Returns\n    -------\n    dict\n        On success: {\"success\": True, \"analyses\": [...]}\n        On error: {\"success\": False, \"error\": str}\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "revision_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/ai/validate_uw_ai_analysis_prompt": {
      "post": {
        "summary": "validate_uw_ai_analysis_prompt",
        "tags": [
          "ai"
        ],
        "description": "Validate a user-submitted AI Analysis prompt for safety and relevance.\n\n    Uses an LLM to determine whether the prompt is safe (no injection) and\n    relevant to the available underwriting data context.\n\n    Parameters\n    ----------\n    prompt : str, required\n        The analysis prompt text to validate.\n    category_scope : str, required\n        The rule's category scope (e.g. 'policy', 'vehicle').\n\n    Returns\n    -------\n    dict\n        {\"success\": True, \"valid\": bool, \"reason\": str}\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "prompt": {
                    "type": "string"
                  },
                  "category_scope": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/alerts/send_scheduled_alerts": {
      "post": {
        "summary": "send_scheduled_alerts",
        "tags": [
          "alerts"
        ],
        "description": "\n    Manually trigger sending of scheduled alerts.\n    Uses current datetime to determine which alerts are ready to be sent.\n    This matches the behavior of the scheduled cron job.\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        Statistics about the operation:\n        - sent_count: Number of alerts successfully sent\n        - skipped_count: Number of alerts skipped (missing note, invalid email, etc.)\n        - error_count: Number of alerts that failed to send\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-send_scheduled_alerts"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-send_scheduled_alerts"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/attachments/create_folder_in_user_folder": {
      "post": {
        "summary": "create_folder_in_user_folder",
        "tags": [
          "attachments"
        ],
        "description": "Create subfolder in user folder.\n\n    Parameters\n    ----------\n    folder_name : str\n        Folder name\n    reference_id : str\n        Reference id\n    reference_type : str\n        Reference type\n    parent_folder_id : str\n        Parent folder id\n\n    Returns\n    -------\n    success : bool\n        True if completely successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        A dict containing the following data representation. ::\n            {'folder_id': folder_id}\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "folder_name": {
                    "type": "string"
                  },
                  "reference_id": {
                    "type": "string"
                  },
                  "reference_type": {
                    "type": "string"
                  },
                  "parent_folder_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/attachments/delete_photo": {
      "post": {
        "summary": "delete_photo",
        "tags": [
          "attachments"
        ],
        "description": "Removes a photo from the file table and also\n    deletes the photo on the filesystem.\n\n    Parameters\n    ----------\n    file_id : str, required\n        The UUID for the file\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "file_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/attachments/edit_attachment": {
      "post": {
        "summary": "edit_attachment",
        "tags": [
          "attachments"
        ],
        "description": "\n    Gets the new attachment definition and updates the existing attachment with the new definition.\n    Parameters:\n        attachment: dict\n            title: str - The attchment name\n            description: str - The attachment description\n            tag: str - The attachment tag\n            id: str - The attachment id\n        claim_id: str, optional\n            Legacy claim ownership hint (same as reference_id for claims).\n        reference_type: str, optional\n            Expected attachment type (claims/policies/contacts).\n        reference_id: str, optional\n            Expected owning entity id.\n    Returns:\n        dict: The updated attachment definition\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-edit_attachment"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-edit_attachment"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/attachments/get_attachments_file_list": {
      "post": {
        "summary": "get_attachments_file_list",
        "tags": [
          "attachments"
        ],
        "description": "Get Folder's file list.\n\n    Parameters\n    ----------\n    folder_id : str\n        Folder id\n    reference_id : str, required\n        Reference id\n    reference_type : str, required\n        Reference type\n    order_by : str\n        Column name to sort by\n    ascending : bool\n        Asc/Desc\n    page : int\n        Page number\n    include_forms : bool\n        Includes forms in response\n        Removes \"fake forms\" which were generated when the setting `printing.include-forms-as-attachments` was enabled.\n        `getToBePrinted` does the same.\n\n    Returns\n    -------\n    success : bool\n        True if completely successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        A dict containing the following data representation. ::\n        {\n            \"folders\": [],\n            \"records\": [\n                {\n                    \"isdir\": true,\n                    \"actualPrintDate\": null,\n                    \"printState\": \"Do Not Print\",\n                    \"folderId\": null,\n                    \"emailed\": false,\n                    \"uploadingToS3\": false,\n                    \"emailOnly\": false,\n                    \"url\": \"/gateway?file=core.uploads&method=getAttachment&id=a5ba0c19-776a-4cab-aaef-6987784b84a4\",\n                    \"title\": \"Continuation of Coverage - NonPay\",\n                    \"mimeType\": null,\n                    \"printDateFmt\": null,\n                    \"folderName\": null,\n                    \"readOnly\": true,\n                    \"private\": false,\n                    \"dateAddedFmt\": \"12/06/2017 03:34 PM\",\n                    \"itemCount\": 1,\n                    \"id\": \"a5ba0c19-776a-4cab-aaef-6987784b84a4\",\n                    \"size\": \"0.0 bytes\",\n                    \"label\": \"Continuation of Coverage - NonPay\"\n                },...\n            ],\n            \"activePage\": 1,\n            \"maxPages\": 1,\n            \"folderName\": null\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "folder_id": {
                    "type": "string"
                  },
                  "reference_id": {
                    "type": "string"
                  },
                  "reference_type": {
                    "type": "string"
                  },
                  "order_by": {
                    "type": "string"
                  },
                  "ascending": {
                    "type": "boolean"
                  },
                  "page": {
                    "type": "integer"
                  },
                  "include_forms": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/attachments/get_file_metadata": {
      "post": {
        "summary": "get_file_metadata",
        "tags": [
          "attachments"
        ],
        "description": "Gets the reference ID and receivedMetadata fields associated with the given file ID.\n\n    Parameters\n    ----------\n    file_id : str, required\n        The UUID for the file\n\n    Returns\n    -------\n    success : bool\n        True if completely successful, false otherwise\n    messages : list of str\n        Human readable error messages, if any\n    data : dict\n        The metadata portion of the data is of variable format, depending on the type of file.\n        It is returned as it is stored in the database. Broadly it will either be a\n        dictionary, or a list of dictionaries:\n        ::\n            {\n                \"reference_id\": \"alpha_numeric_file_reference_id\",\n                \"metadata\": [\n                    {\n                        \"relatedToBillWhom\": bool,\n                        \"contactId\": [\n                            \"alpha_numeric_contact_id\",\n                            \"alpha_numeric_contact_id\"\n                        ],\n                        \"type\": \"namedInsured,agent,etc...\",\n                        \"name\": [\n                            \"Full Name 1\",\n                            \"Full Name 2\"\n                        ],\n                        \"address\": \"Street Address <br /> with HTML inclusions\"\n                    },\n                    {\n                        ...\n                    }\n                ]\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "file_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/attachments/get_resource_photos": {
      "post": {
        "summary": "get_resource_photos",
        "tags": [
          "attachments"
        ],
        "description": "Exposure of 'api.v2.insured._get_photos_for_entity'\n\n    Parameters\n    ----------\n    reference_id : str\n        id of resourse\n\n    Returns\n    -------\n    success : bool\n        True if completely successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        A dict containing the following data ::\n            {\n                insured=[{\n                    caption='',\n                    id='d023b562-e618-4130-96e8-c085cb9265c6',\n                    date_added='2020-11-10 03:33:33'\n                }],\n                carrier=[],\n                preferred='d023b562-e618-4130-96e8-c085cb9265c6'\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reference_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/attachments/move_user_file": {
      "post": {
        "summary": "move_user_file",
        "tags": [
          "attachments"
        ],
        "description": "Move file\n\n    Parameters\n    ----------\n    file_id : str\n        Moved file id\n    to_folder_id : str\n        New folder's id\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "file_id": {
                    "type": "string"
                  },
                  "to_folder_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/attachments/remove_attachments": {
      "post": {
        "summary": "remove_attachments",
        "tags": [
          "attachments"
        ],
        "description": "Removes attachments.\n\n    Parameters\n    ----------\n    attachment_ids : list of str\n        List of attachment ids to remove\n\n    Returns\n    -------\n    success : bool\n        True if completely successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        A dict containing the following data representation. ::\n            {'returnById': {\n                'id1': True,\n                'id2': False\n                ....\n                }\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "attachment_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/attachments/rename_user_file": {
      "post": {
        "summary": "rename_user_file",
        "tags": [
          "attachments"
        ],
        "description": "Rename file\n\n    Parameters\n    ----------\n    file_id : str\n        Renamed file id\n    file_name : str\n        New title for the file. Named file_name to keep the API signature; the\n        value is stored on File.title.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "file_id": {
                    "type": "string"
                  },
                  "file_name": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/attachments/retrieve_attachments": {
      "post": {
        "summary": "retrieve_attachments",
        "tags": [
          "attachments"
        ],
        "description": "\n    Retrieves all attachments that the user is privileged to see from\n    the `files` table with the reference id equal to one passed in as an\n    argument. The JSON string represents the same hierarchical structure\n    as the filesystem.\n\n    Parameters\n    ----------\n    reference_id : str, required\n        The ID of the related policies, claims, etc.\n    reference_type : str, required\n        The associated BriteCore module\n    folder_id : str\n        The ID of the folder to retrieve\n        None, if at the root.\n    search_string : str | None\n        An optional search string to search by on the File.title column.\n    list_view : bool\n        Display contents of attachments without directories\n        but in a paginated list sorted by dateAdded by default.\n    display_original_print_state: bool\n        Return the original value of the print_state field instead of\n        consolidating the values of email and print states\n    page : int\n        Page number, 1 or greater (defaults to 1).\n    page_size : int\n        Size of the page, 1 or greater, capped at 100 (defaults to 10).\n    order_by : str\n        One of `domain.file.ATTACHMENT_SORT_COLUMNS`, in either spelling\n        (defaults to 'dateAdded').\n    ascending : bool\n        Boolean option representing ascending or\n        descending (defaults to False).\n\n    Returns\n    -------\n    success : bool\n        True if completely successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        A dict containing the following data representation.\n        ``recipientName`` is the Declaration recipient's contact name for\n        ``label='Form'`` attachments and ``null`` for every other row.\n        {\n            \"folders\": [],\n            \"activePage\": 1,\n            \"folderName\": null,\n            \"records\": [\n                {\n                    \"isdir\": false,\n                    \"actualPrintDate\": null,\n                    \"printState\": \"Do Not Print or Email\",\n                    \"folderId\": null,\n                    \"mimeType\": \"image/jpeg\",\n                    \"uploadingToS3\": false,\n                    \"emailOnly\": false,\n                    \"title\": \"1616576475555.jpeg\",\n                    \"recipientName\": null,\n                    \"folderIsPrivate\": null,\n                    \"printDateFmt\": null,\n                    \"id\": \"0af756d7-7b35-439e-a9e4-53e8830050d7\",\n                    \"edeliveryState\": null,\n                    \"readOnly\": false,\n                    \"folderName\": null,\n                    \"private\": false,\n                    \"dateAddedFmt\": \"04/26/2021 05:07 AM\",\n                    \"itemCount\": 0,\n                    \"certifiedMail\": null,\n                    \"size\": \"86.9 KB\"\n                }\n            ],\n            \"maxPages\": 1,\n            \"canMakePrivate\": true\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reference_id": {
                    "type": "string"
                  },
                  "reference_type": {
                    "type": "string"
                  },
                  "folder_id": {
                    "type": "string"
                  },
                  "search_string": {
                    "type": "string"
                  },
                  "list_view": {
                    "type": "boolean"
                  },
                  "display_original_print_state": {
                    "type": "string"
                  },
                  "page": {
                    "type": "integer"
                  },
                  "page_size": {
                    "type": "integer"
                  },
                  "order_by": {
                    "type": "string"
                  },
                  "ascending": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/attachments/upload_attachment_to_user_folder": {
      "post": {
        "summary": "upload_attachment_to_user_folder",
        "tags": [
          "attachments"
        ],
        "description": "Upload attachment to user folder.\n\n    Parameters\n    ----------\n    file_data_base64 : str\n        Base64 encoded data\n    file_type : str\n        File MIME type\n    file_name : str\n        Filename\n    reference_id : str\n        Reference id\n    reference_type : str\n        Reference type\n    folder_id : str\n        Folder id (optional)\n\n    Returns\n    -------\n    success : bool\n        True if completely successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        A dict containing the following data representation. ::\n            {'folder_id': folder_id}\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "file_data_base64": {
                    "type": "string"
                  },
                  "file_type": {
                    "type": "string"
                  },
                  "file_name": {
                    "type": "string"
                  },
                  "reference_id": {
                    "type": "string"
                  },
                  "reference_type": {
                    "type": "string"
                  },
                  "folder_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/attachments/upload_attachment_unified": {
      "post": {
        "summary": "upload_attachment_unified",
        "tags": [
          "attachments"
        ],
        "description": "Upload attachment to user folder.\n\n    Parameters\n    ----------\n    file_data_base64 : str\n        Base64 encoded data\n    file_type : str\n        File MIME type\n    file_name : str\n        Filename\n    reference_id : str\n        Reference id\n    reference_type : str\n        Reference type\n    folder_id : str\n        Folder id (oprtional)\n    revisionId : str\n        Revision Id (optional)\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "file_data_base64": {
                    "type": "string"
                  },
                  "file_type": {
                    "type": "string"
                  },
                  "file_name": {
                    "type": "string"
                  },
                  "reference_id": {
                    "type": "string"
                  },
                  "reference_type": {
                    "type": "string"
                  },
                  "folder_id": {
                    "type": "string"
                  },
                  "revisionId": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/auth/retrieve_my_permissions": {
      "post": {
        "summary": "retrieve_my_permissions",
        "tags": [
          "auth"
        ],
        "description": "Return the calling user's effective BriteCore permissions.\n\n    Designed for external MCP / OAuth consumers (notably the bc-public\n    server) that need to project the caller's BriteCore RBAC\n    state into their own authorization layer (e.g. populating\n    ``principal.scopes`` for FastMCP's per-tool ``auth=`` checks).\n\n    The projection itself is owned by\n    ``service.permission_projection.PermissionProjectionService``, which\n    iterates ``get_mapped_permissions()`` and calls ``check_permissions``\n    per path -- the same dispatcher pattern as\n    ``settings.retrieve_permissions``. This is the only path\n    that works consistently across ``PermissionEngineV1`` (returns a\n    permission tree dict) and ``PermissionEngineV2`` (returns\n    ``PermissionPolicy`` tuples) without us re-implementing engine\n    semantics. See ``docs/api/auth-me-permissions-spec.md`` section 2.\n    This handler only delegates, sets the Cache-Control transport header,\n    and returns the service payload.\n\n    Returns\n    -------\n    success : bool\n        True if the request was successful.\n    messages : list of str\n        Error messages.\n    data : dict\n        permissions : list of str\n            Effective permission strings in ``{path}:{access}`` form\n            (e.g. ``\"britecore/tasks:r\"``). Each path appears at most\n            once: ``:rw`` when the user has read+write, ``:r`` when\n            read-only, omitted when neither. Sorted alphabetically. The\n            enumerated registry includes the auto-discovered\n            ``api/v2/{module}/{function}`` paths on every tenant,\n            regardless of the v2-permission enforcement setting.\n        engine_version : str\n            The active permission engine version (``\"v1\"`` or ``\"v2\"``,\n            from the ``permissions/engine-version`` setting).\n        default_allow : bool\n            True when the active engine allows paths that no rule\n            matches: for V1 (open-world), and for V2 when\n            ``permissions/permission-v2-restriction`` is off. False for\n            restrictive V2 and for any unrecognized engine version\n            (fail closed). Scope: this flag describes paths OUTSIDE the\n            enumerated registry. A registered path is emitted whenever\n            the engine allows it, so its absence means the engine denied\n            it (or its evaluation failed and it was omitted) regardless\n            of this flag; consumers should treat a missing registered\n            path as a denial, and apply ``default_allow`` only to claims\n            the registry does not cover. Because every ``api/v2/...``\n            path is registered, an absent ``api/v2/...`` claim must\n            never be authorized from this flag. Even for unregistered\n            paths the flag is only the no-rule fallback: a parent or\n            wildcard ``none`` rule still denies the children it matches.\n        role_id : str or None\n            The selected role id.\n        role : str or None\n            The role name the session selected (``chosenRole`` from\n            ``web.ctx.uinfo``). Echoed for the consumer's audit log; the\n            permission evaluation itself reads session context directly\n            via ``check_permissions``, not this field.\n        role_selection_required : bool\n            True when a multi-role OAuth user has not selected a role.\n        as_of : str\n            ISO 8601 UTC timestamp at which the permission list was\n            computed; trailing ``Z``.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-retrieve_my_permissions"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-retrieve_my_permissions"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/auth/retrieve_my_roles": {
      "post": {
        "summary": "retrieve_my_roles",
        "tags": [
          "auth"
        ],
        "description": "Return roles available to the current OAuth grant.\n\n    The caller identity and OAuth grant are read from ``web.ctx.uinfo``;\n    clients do not supply contact, client, or grant identifiers.\n\n    Returns\n    -------\n    success : bool\n        True if the request was successful.\n    messages : list of str\n        Error messages.\n    data : dict\n        roles : list of dict\n            Login-capable roles assigned to the authenticated contact. Each\n            item contains string ``id`` and ``name`` fields.\n        selected_role : dict or None\n            The role already selected for this OAuth grant, with string\n            ``id`` and ``name`` fields, or None when no role is selected.\n        selection_required : bool\n            True when the caller has multiple eligible roles and this OAuth\n            grant has not selected one.\n        selection_status : str\n            One of ``selected``, ``selection_required``, or\n            ``no_eligible_role``.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-retrieve_my_roles"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-retrieve_my_roles"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/auth/retrieve_permission_levels": {
      "post": {
        "summary": "retrieve_permission_levels",
        "tags": [
          "auth"
        ],
        "description": "Return a list of all permission levels.\n\n    Returns\n    -------\n    success: bool\n        True if the request was successful\n    messages: list of str\n        Error messages\n    data: list of dict\n        id: str, id of the permission level\n        name: str, name of the permission level\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/auth/select_my_role": {
      "post": {
        "summary": "select_my_role",
        "tags": [
          "auth"
        ],
        "description": "Bind one eligible role to the current OAuth grant.\n\n    Parameters\n    ----------\n    role_id : str\n        Exact role identifier returned by ``retrieve_my_roles``.\n\n    Returns\n    -------\n    success : bool\n        True if the role was selected.\n    messages : list of str\n        Empty on success. Validation failures are returned by\n        ``@api_request`` as a message dict containing ``_base_`` and ``code``.\n    data : dict\n        selected_role : dict\n            Selected role with string ``id`` and ``name`` fields.\n        selection_status : str\n            ``created`` for a new binding or ``matched`` when the same\n            role was selected previously.\n\n    Raises\n    ------\n    McpRoleSelectionError\n        ``OAUTH_GRANT_REQUIRED`` when OAuth grant context is missing,\n        ``ROLE_NOT_ASSIGNED`` when the role is not eligible for the caller,\n        or ``ROLE_ALREADY_SELECTED`` when the immutable grant binding points\n        to a different role. ``@api_request`` converts these into\n        ``success: false`` response envelopes.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-select_my_role"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-select_my_role"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/auth/session": {
      "post": {
        "summary": "session",
        "tags": [
          "auth"
        ],
        "description": "Issue a persisted session cookie to a contact authenticated by api key.\n\n    The caller must be authenticated with an api key and hold an explicit\n    ``rw`` grant on ``auth/apiKeySession`` through its contact, one of its\n    user groups or its role. isGod, IWS usernames and engine defaults do not\n    bypass it; any other authenticated caller gets a 403 ``permissionDenied``\n    body and no session. That grant is the only gate: the auto-discovered\n    ``api/v2/auth/session`` rule is not required, even on tenants that enforce\n    api.v2 permissions for the caller's level. A BriteAuth bearer token is refused too, although\n    the gateway marks it ``api_key_validated`` to spare it the CSRF check. Any\n    parameter besides the gateway's ``api_key`` is refused. The\n    session token carries ``api_key_validated``, so replaying the cookie\n    against ``/gateway`` endpoints skips their CSRF token check. Each\n    cookieless call mints exactly one session that expires on the site's\n    ``login``/``session-timeout``; a call presenting the caller's own session\n    cookie reuses it, and a cookie of another identity is rotated to a new\n    session. The session ID is returned only in the ``Set-Cookie`` header,\n    never in the body, so it stays out of the ``@api_request`` result log.\n\n    Parameters\n    ----------\n    **payload : dict\n        Must be empty: the gateway consumes ``api_key`` before dispatch.\n\n    Returns\n    -------\n    success : bool\n        True if the session was issued.\n    messages : list of str\n        Error messages.\n    data : dict\n        contact_id : str\n            Id of the api-key contact the session belongs to.\n        username : str\n            Username of that contact.\n        expires_in : int\n            Session lifetime in seconds.\n        created : bool\n            True when this call minted a new session; False when it reused\n            the presented session cookie.\n\n    Raises\n    ------\n    BCValidationError\n        When a parameter is passed. ``@api_request`` answers with the\n        standard error envelope.\n    BCApiRequestPermissionDeniedError\n        When the caller is not authenticated with an api key or holds no\n        explicit ``rw`` grant on ``auth/apiKeySession``. ``@api_request``\n        answers with the ``permissionDenied`` body under a 403 status.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-auth_session"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-auth_session"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/authority_limits/create_authority_limit": {
      "post": {
        "summary": "create_authority_limit",
        "tags": [
          "authority_limits"
        ],
        "description": "create_authority_limit",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/authority_limits/delete_authority_limit": {
      "post": {
        "summary": "delete_authority_limit",
        "tags": [
          "authority_limits"
        ],
        "description": "delete_authority_limit",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/authority_limits/get_authority_limit": {
      "post": {
        "summary": "get_authority_limit",
        "tags": [
          "authority_limits"
        ],
        "description": "get_authority_limit",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/authority_limits/list_authority_limits": {
      "post": {
        "summary": "list_authority_limits",
        "tags": [
          "authority_limits"
        ],
        "description": "list_authority_limits",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/authority_limits/update_all_authority_limits": {
      "post": {
        "summary": "update_all_authority_limits",
        "tags": [
          "authority_limits"
        ],
        "description": "update_all_authority_limits",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/authority_limits/update_authority_limit": {
      "post": {
        "summary": "update_authority_limit",
        "tags": [
          "authority_limits"
        ],
        "description": "update_authority_limit",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/background_jobs/execute_dummy_task": {
      "post": {
        "summary": "execute_dummy_task",
        "tags": [
          "background_jobs"
        ],
        "description": "\n    Execute a dummy celery task for testing purposes.\n\n    This endpoint allows testing different celery scenarios:\n    - Normal execution\n    - Task failure\n    - Race condition simulation (transaction not committed when worker picks up task)\n\n    Parameters\n    ----------\n    message : str, optional\n        Message to pass to the task (default: \"Hello from API\")\n    fail_task : bool, optional\n        If True, the task will raise an exception (default: False)\n    hold_transaction_seconds : int, optional\n        If > 0, holds the transaction open for this many seconds before committing.\n        This simulates the race condition where a task is queued inside atomic_operation\n        but the BackgroundJob is not yet visible to the worker. (default: 0)\n\n    Returns\n    -------\n    dict\n        Task ID and execution details\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-execute_dummy_task"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-execute_dummy_task"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/background_jobs/get_status": {
      "post": {
        "summary": "get_status",
        "tags": [
          "background_jobs"
        ],
        "description": "\n    Get status of a background job by task_id.\n\n    Parameters\n    ----------\n    task_id : str\n        The task ID to check\n\n    Returns\n    -------\n    dict\n        Background job status information\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_status"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_status"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/background_jobs/search": {
      "post": {
        "summary": "search",
        "tags": [
          "background_jobs"
        ],
        "description": "search",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/billing/get_installments_preview": {
      "post": {
        "summary": "get_installments_preview",
        "tags": [
          "billing"
        ],
        "description": "Returns all the installments upcoming for a given Billing Schedule\n\n    Parameters\n    ----------\n    billing_schedule_ids : List, required\n        List of UUIDs ofexisting Billing Schedules\n    effective_date : str, required\n        The effective date for the policy/quote in date format 'YYYY-MM-DD'\n    premium : float, required\n        Premium of the policy/quote\n    payment_method : str, optional\n        The payment method used (CC, ACH)\n        will be used to get the payment method fee\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : list\n        List of schedules and having installments associated with each schedule provided\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "billing_schedule_ids": {
                    "type": "string"
                  },
                  "effective_date": {
                    "type": "string"
                  },
                  "premium": {
                    "type": "number"
                  },
                  "payment_method": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/billing/get_installments_preview_mid_term": {
      "post": {
        "summary": "get_installments_preview_mid_term",
        "tags": [
          "billing"
        ],
        "description": "Returns all the installments upcoming for a given Billing Schedule\n\n    Parameters\n    ----------\n    billing_schedule_ids : List, required\n        List of UUIDs ofexisting Billing Schedules\n    policy_id : str, required\n        The policy id of the quote\n    revision_effective_date : str, required\n        The effective date for the quote in date format 'YYYY-MM-DD'\n    prorated_premium : float, required\n        Premium of the quote\n    payment_method : str, optional\n        The payment method used (CC, ACH)\n        will be used to get the payment method fee\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : list\n        List of schedules and having installments associated with each schedule provided\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "billing_schedule_ids": {
                    "type": "string"
                  },
                  "policy_id": {
                    "type": "string"
                  },
                  "revision_effective_date": {
                    "type": "string"
                  },
                  "prorated_premium": {
                    "type": "number"
                  },
                  "payment_method": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/billing/get_renewal_installments_preview": {
      "post": {
        "summary": "get_renewal_installments_preview",
        "tags": [
          "billing"
        ],
        "description": "Returns all the installments upcoming for a given Billing Schedule for Renewals\n\n    Parameters\n    ----------\n    billing_schedule_ids : List, required\n        List of UUIDs of existing Billing Schedules\n    effective_date : str, required\n        The effective date for the policy/quote in date format 'YYYY-MM-DD'\n    premium : float, required\n        Premium of the policy/quote\n    payment_method : str, optional\n        The payment method used (CC, ACH)\n        will be used to get the payment method fee\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : list\n        List of schedules and having installments associated with each schedule provided\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "billing_schedule_ids": {
                    "type": "string"
                  },
                  "effective_date": {
                    "type": "string"
                  },
                  "premium": {
                    "type": "number"
                  },
                  "payment_method": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/billing/rating_factors": {
      "post": {
        "summary": "rating_factors",
        "tags": [
          "billing"
        ],
        "description": "Returns the billing rating factors related to a Policy\n\n    Parameters\n    ----------\n    policy_id : str, required\n        The policy id of the policy\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        A dictionary containing:\n        - The policy ID\n        - The current outstanding balance\n        - A list of policy terms each with\n            - The policy term ID\n            - The number of non-pays\n            - The number of nsf fees\n            - The number of late fees\n            - The effective date\n            - The expiration date\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "policy_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/brands/add_brand": {
      "post": {
        "summary": "add_brand",
        "tags": [
          "brands"
        ],
        "description": "\n    Create a new brand\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-add_brand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-add_brand"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/brands/assign_business_location": {
      "post": {
        "summary": "assign_business_location",
        "tags": [
          "brands"
        ],
        "description": "\n    Assign a business location to a brand\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-assign_business_location"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-assign_business_location"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/brands/assign_policy_type_definition": {
      "post": {
        "summary": "assign_policy_type_definition",
        "tags": [
          "brands"
        ],
        "description": "\n    Assign a policy type definition to a brand\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-assign_policy_type_definition"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-assign_policy_type_definition"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/brands/attach_file": {
      "post": {
        "summary": "attach_file",
        "tags": [
          "brands"
        ],
        "description": "\n    Attach a logo or signature file to a brand\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-attach_file"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-attach_file"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/brands/delete_brand": {
      "post": {
        "summary": "delete_brand",
        "tags": [
          "brands"
        ],
        "description": "\n    Delete a brand\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-delete_brand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-delete_brand"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/brands/get_brand": {
      "post": {
        "summary": "get_brand",
        "tags": [
          "brands"
        ],
        "description": "\n    Get a specific brand by ID\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_brand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_brand"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/brands/list_brand_associations": {
      "post": {
        "summary": "list_brand_associations",
        "tags": [
          "brands"
        ],
        "description": "\n    List all brand associations\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-list_brand_associations"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-list_brand_associations"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/brands/list_brands": {
      "post": {
        "summary": "list_brands",
        "tags": [
          "brands"
        ],
        "description": "\n    List all brands\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-list_brands"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-list_brands"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/brands/unassign_business_location": {
      "post": {
        "summary": "unassign_business_location",
        "tags": [
          "brands"
        ],
        "description": "\n    Unassign a business location from a brand\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-unassign_business_location"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-unassign_business_location"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/brands/unassign_policy_type_definition": {
      "post": {
        "summary": "unassign_policy_type_definition",
        "tags": [
          "brands"
        ],
        "description": "\n    Unassign a policy type definition from a brand\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-unassign_policy_type_definition"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-unassign_policy_type_definition"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/brands/update_brand": {
      "post": {
        "summary": "update_brand",
        "tags": [
          "brands"
        ],
        "description": "\n    Update an existing brand\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-update_brand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-update_brand"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/business_locations/enable_business_location_with_all_counties": {
      "post": {
        "summary": "enable_business_location_with_all_counties",
        "tags": [
          "business_locations"
        ],
        "description": "Enable a business location and auto-populate all counties for that state.\n    Parameters\n    ----------\n    locationId : str, required\n        The ID of the business location to enable\n    country : str, optional\n        Country code ('US' or 'CA'), defaults to 'US'\n    Returns\n    -------\n    success : bool\n        True if successful\n    message : str\n        Success or error message\n    data : dict\n        Updated location with counties\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-enable_business_location_with_all_counties"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-enable_business_location_with_all_counties"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_adjuster_assignment_configs/create_adjuster_assignment_config": {
      "post": {
        "summary": "create_adjuster_assignment_config",
        "tags": [
          "claim_adjuster_assignment_configs"
        ],
        "description": " Create Adjuster Assignment Configuration ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-create_adjuster_assignment_config"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-create_adjuster_assignment_config"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_adjuster_assignment_configs/get_adjuster_assignment_config": {
      "post": {
        "summary": "get_adjuster_assignment_config",
        "tags": [
          "claim_adjuster_assignment_configs"
        ],
        "description": " Get Adjuster Assignment Configuration ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_adjuster_assignment_config"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_adjuster_assignment_config"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_adjuster_assignment_configs/update_adjuster_assignment_config": {
      "post": {
        "summary": "update_adjuster_assignment_config",
        "tags": [
          "claim_adjuster_assignment_configs"
        ],
        "description": " Update Adjuster Assignment Configuration ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-update_adjuster_assignment_config"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-update_adjuster_assignment_config"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_catastrophes/create_catastrophe": {
      "post": {
        "summary": "create_catastrophe",
        "tags": [
          "claim_catastrophes"
        ],
        "description": "create_catastrophe",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_catastrophes/delete_catastrophe": {
      "post": {
        "summary": "delete_catastrophe",
        "tags": [
          "claim_catastrophes"
        ],
        "description": "delete_catastrophe",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_catastrophes/get_applicable_catastrophes": {
      "post": {
        "summary": "get_applicable_catastrophes",
        "tags": [
          "claim_catastrophes"
        ],
        "description": "Get catastrophes applicable to a claim based on date, perils, and location restrictions.\n\n    ``loss_date`` is optional. During FNOL the claim's ``loss_date`` column may\n    not be persisted yet when the dialog is opened (the form auto-saves with a\n    debounce); callers pass the form's current value so results do not depend\n    on the save race. When omitted, the persisted ``claim.loss_date`` is used.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_catastrophes/get_catastrophe": {
      "post": {
        "summary": "get_catastrophe",
        "tags": [
          "claim_catastrophes"
        ],
        "description": "get_catastrophe",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_catastrophes/list_catastrophes": {
      "post": {
        "summary": "list_catastrophes",
        "tags": [
          "claim_catastrophes"
        ],
        "description": "list_catastrophes",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_catastrophes/update_catastrophe": {
      "post": {
        "summary": "update_catastrophe",
        "tags": [
          "claim_catastrophes"
        ],
        "description": "update_catastrophe",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_changes/list_claim_changes": {
      "post": {
        "summary": "list_claim_changes",
        "tags": [
          "claim_changes"
        ],
        "description": "\n    Retrieves a list of claim changes.\n\n    Parameters:\n        params (dict): A dictionary containing the request data.\n            - id (str): The ID of the claim.\n            - from_date (str, optional): The start date for the date range filter.\n            - to_date (str, optional): The end date for the date range filter.\n\n    Returns:\n        list: A list of serialized claim changes.\n\n    Raises:\n        BCValidationError: If the claim ID is not provided in the request data.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-list_claim_changes"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-list_claim_changes"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_contacts/create_claim_contact": {
      "post": {
        "summary": "create_claim_contact",
        "tags": [
          "claim_contacts"
        ],
        "description": "create_claim_contact",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_contacts/delete_claim_contact": {
      "post": {
        "summary": "delete_claim_contact",
        "tags": [
          "claim_contacts"
        ],
        "description": "delete_claim_contact",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_contacts/list_importable_contacts": {
      "post": {
        "summary": "list_importable_contacts",
        "tags": [
          "claim_contacts"
        ],
        "description": "list_importable_contacts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_contacts/update_claim_contact": {
      "post": {
        "summary": "update_claim_contact",
        "tags": [
          "claim_contacts"
        ],
        "description": "update_claim_contact",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_dates/create_claim_date": {
      "post": {
        "summary": "create_claim_date",
        "tags": [
          "claim_dates"
        ],
        "description": "create_claim_date",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_dates/delete_claim_date": {
      "post": {
        "summary": "delete_claim_date",
        "tags": [
          "claim_dates"
        ],
        "description": "delete_claim_date",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_dates/list_claim_dates": {
      "post": {
        "summary": "list_claim_dates",
        "tags": [
          "claim_dates"
        ],
        "description": "list_claim_dates",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_dates/update_claim_date": {
      "post": {
        "summary": "update_claim_date",
        "tags": [
          "claim_dates"
        ],
        "description": "update_claim_date",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_estimations/cancel_claim_estimation": {
      "post": {
        "summary": "cancel_claim_estimation",
        "tags": [
          "claim_estimations"
        ],
        "description": "Cancel an estimation.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-cancel_claim_estimation"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-cancel_claim_estimation"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_estimations/get_claim_estimation": {
      "post": {
        "summary": "get_claim_estimation",
        "tags": [
          "claim_estimations"
        ],
        "description": "Get a specific estimation.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_claim_estimation"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_claim_estimation"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_estimations/list_claim_estimations": {
      "post": {
        "summary": "list_claim_estimations",
        "tags": [
          "claim_estimations"
        ],
        "description": "List all estimations for a claim.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-list_claim_estimations"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-list_claim_estimations"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_estimations/request_claim_estimation": {
      "post": {
        "summary": "request_claim_estimation",
        "tags": [
          "claim_estimations"
        ],
        "description": "Create a new estimation for a claim.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-request_claim_estimation"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-request_claim_estimation"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_estimations/update_claim_estimation": {
      "post": {
        "summary": "update_claim_estimation",
        "tags": [
          "claim_estimations"
        ],
        "description": "Update an existing estimation.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-update_claim_estimation"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-update_claim_estimation"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_exposures/add_recovery": {
      "post": {
        "summary": "add_recovery",
        "tags": [
          "claim_exposures"
        ],
        "description": "\n    Adds a recovery transaction to a claim or exposure.\n\n    Request Payload\n    ---------------\n    recovery_details : dict\n        {\n            \"api_key\": str,\n            \"recovery_details\": {\n                \"exposure_id\": str | null if claim_id is provided\n                \"claim_id\": str | null if exposure_id is provided\n                \"category\": str,\n                \"amount\": number,\n                \"description\": str,\n                \"date\": str (date \"YYYY-MM-DD\", stored as-is, or date-time,\n                       whose America/Chicago calendar day is stored)\n            }\n        }\n\n    Returns\n    -------\n    success : bool\n        True if successful, false otherwise.\n    messages : list of str | dict\n        List of human-readable error or success messages.\n    data : dict\n        {\n            \"amount\": number,\n            \"category\": str,\n            \"claim_id\": str | null if exposure_id is provided\n            \"date\": str (date),\n            \"description\": str,\n            \"exposure_id\": str | null if claim_id is provided\n            \"id\": str,\n            \"reinsuranceContractContactId\": str | null\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-add_recovery"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-add_recovery"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_exposures/add_recovery_reserve": {
      "post": {
        "summary": "add_recovery_reserve",
        "tags": [
          "claim_exposures"
        ],
        "description": "\n    Adds a recovery reserve to a claim or exposure.\n\n    Request Payload\n    ---------------\n    recovery_reserve_details : dict\n        {\n            \"api_key\": str,\n            \"recovery_reserve_details\": {\n                \"exposure_id\": str | null,\n                \"claim_id\": str | null,\n                \"reinsurance_amount\": number,\n                \"reinsurancelae_amount\": number,\n                \"salvage_amount\": number,\n                \"subrogation_amount\": number,\n                \"transaction_date\": str (date \"YYYY-MM-DD\", stored as-is, or date-time,\n                       whose America/Chicago calendar day is stored)\n            }\n        }\n\n    Returns\n    -------\n    success : bool\n        True if successful, false otherwise.\n    messages : list of str | dict\n        List of human-readable error or success messages.\n    data : dict\n        {\n            \"claim_id\": str | null,\n            \"exposure_id\": str | null,\n            \"reinsurance_amount\": number,\n            \"reinsurancelae_amount\": number,\n            \"salvage_amount\": number,\n            \"subrogation_amount\": number,\n            \"transaction_date\": str (date)\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-add_recovery_reserve"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-add_recovery_reserve"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_exposures/add_reserve": {
      "post": {
        "summary": "add_reserve",
        "tags": [
          "claim_exposures"
        ],
        "description": "\n    Add or update reserve values for an exposure.\n\n    Request Payload\n    ---------------\n    reserve_details : dict\n        {\n            \"exposure_id\": str,\n            \"loss_amount\": number,\n            \"adjusting_amount\": number,\n            \"legal_amount\": number,\n            \"transaction_date\": str (date \"YYYY-MM-DD\", stored as-is, or date-time,\n                   whose America/Chicago calendar day is stored)\n        }\n\n    Returns\n    -------\n    dict\n        On success, the reserve values (``validate_data`` / ``warning``\n        envelope fields are added by the decorator)::\n\n            {\n                \"exposure_id\": str,\n                \"loss_amount\": number,\n                \"adjusting_amount\": number,\n                \"legal_amount\": number,\n                \"transaction_date\": \"YYYY-MM-DD\"\n            }\n\n        If authority limits are exceeded::\n\n            {\"brokenLimits\": [...], \"adminData\": {...}}\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_exposures/create_exposures": {
      "post": {
        "summary": "create_exposures",
        "tags": [
          "claim_exposures"
        ],
        "description": "\n    Create a claim exposure record.\n\n    Request Payload\n    ---------------\n    claim_exposure : dict\n        {\n            \"claim_id\": str,\n            \"coverage_id\": str,\n            \"loss_type\": \"property\" | \"vehicle\" | \"injury\",   # optional but recommended\n            \"loss_id\": str,                                    # optional\n            \"claimant_id\": str,                                # optional\n            \"representative\": {                                # optional\n                \"contact_id\": str,\n                \"start_date\": \"YYYY-MM-DD\"\n            }\n        }\n\n    Returns\n    -------\n    dict\n        {\n            \"id\": str,\n            \"claim_id\": str,\n            \"coverage_id\": str,\n            \"coverage_type_id\": str,\n            \"loss_id\": str,\n            \"loss_type\": \"property\" | \"vehicle\" | \"injury\",\n            \"claimant_id\": str,\n            \"representative\": {\n                \"contact_id\": str,\n                \"start_date\": \"YYYY-MM-DD\",\n                \"name\": str\n            },\n            \"loss\": {\"id\": str, \"name\": str},\n            \"coverage\": {\"id\": str, \"name\": str, \"deductible\": number, ...},\n            \"claimant\": {\"id\": str, \"name\": str, \"type\": str, ...},\n            \"coverage_deductible\": number,\n            \"override\": bool,\n            \"is_borrowed\": bool,\n            \"date_updated\": str (datetime),\n            \"is_liability\": bool\n        }\n\n    Notes\n    -----\n    - ``claim_id`` and ``coverage_id`` are required by service validation.\n    - Duplicate exposures (same claimant + coverage + claim + loss) are rejected.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-create_exposures"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-create_exposures"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_exposures/delete_exposure": {
      "post": {
        "summary": "delete_exposure",
        "tags": [
          "claim_exposures"
        ],
        "description": "\n    Delete a claim exposure by ID.\n\n    Parameters\n    ----------\n    id : str\n        Exposure ID.\n\n    Returns\n    -------\n    None\n        Successful deletion returns an empty standard API response.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_exposures/get_accounting_data": {
      "post": {
        "summary": "get_accounting_data",
        "tags": [
          "claim_exposures"
        ],
        "description": "\n    Retrieve accounting summary for all exposures on a claim.\n\n    Parameters\n    ----------\n    claim_id : str\n        Claim ID.\n\n    Returns\n    -------\n    dict\n        {\n            \"exposure_summaries\": [<exposure_accounting_summary>, ...],\n            \"summary\": <exposure_accounting_summary>\n        }\n\n        Each ``<exposure_accounting_summary>`` has the shape documented in\n        ``get_exposure_accounting_data``.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "claim_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_exposures/get_accounting_loss_details": {
      "post": {
        "summary": "get_accounting_loss_details",
        "tags": [
          "claim_exposures"
        ],
        "description": "\n    Retrieves detailed loss accounting data for a claim, including exposure-level\n    and total loss details. Provides comprehensive breakdown of loss, legal, and\n    adjusting reserves and payments for financial analysis and reporting.\n    Uses pagination for exposure data.\n\n    Permissions\n    -----------\n    Requires read access to at least one of:\n        - 'britecore/claims/exposures'\n        - 'britecore/claims/accounting'\n        - 'agent/claims'\n\n    Parameters\n    ----------\n    claim_id : str\n        The ID of the claim for which to retrieve loss details.\n    page : int, optional\n        The page number for paginated exposures (default: 1).\n    page_size : int, optional\n        The number of exposures per page (default: 100).\n\n    Returns\n    -------\n    dict\n        {\n            'exposure_loss_details': [\n                {\n                    'id': str,                    # Exposure/claim item UUID\n                    'claimant_name': str|null,    # Name of the claimant\n                    'coverage_name': str,         # Insurance coverage name\n                    'loss_name': str,             # Description of the loss/damage\n                    'loss_details': {\n                        'loss_reserve': float,        # Current loss reserve amount\n                        'loss_paid': float,           # Total loss payments made\n                        'legal_reserve': float,       # Current legal reserve amount\n                        'legal_paid': float,          # Total legal payments made\n                        'adjusting_reserve': float,   # Current adjusting reserve amount\n                        'adjusting_paid': float       # Total adjusting payments made\n                    }\n                },\n                ...\n            ],\n            'total_loss_details': {\n                'loss_reserve': float,        # Sum of all exposure loss reserves\n                'loss_paid': float,           # Sum of all exposure loss payments\n                'legal_reserve': float,       # Sum of all exposure legal reserves\n                'legal_paid': float,          # Sum of all exposure legal payments\n                'adjusting_reserve': float,   # Sum of all exposure adjusting reserves\n                'adjusting_paid': float       # Sum of all exposure adjusting payments\n            },\n            'total_records': int            # Total number of exposures for pagination\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_accounting_loss_details"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_accounting_loss_details"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_exposures/get_accounting_overview": {
      "post": {
        "summary": "get_accounting_overview",
        "tags": [
          "claim_exposures"
        ],
        "description": "\n    Retrieves comprehensive accounting overview data for a claim,\n    including claim-level overview, exposure-level overviews, and total summaries.\n    This endpoint provides financial data for reserves, payments, incurred amounts,\n    recoveries, and net incurred calculations. Uses pagination for exposure data.\n\n    Permissions\n    -----------\n    Requires read access to at least one of:\n        - 'britecore/claims/exposures'\n        - 'britecore/claims/accounting'\n        - 'agent/claims'\n\n    Parameters\n    ----------\n    claim_id : str\n        The ID of the claim for which to retrieve accounting overview data.\n    page : int, optional\n        The page number for paginated exposures (default: 1).\n    page_size : int, optional\n        The number of exposures per page (default: 100).\n\n    Returns\n    -------\n    dict\n        {\n            'claim_level_overview': {\n                'total_reserve': float,      # Always 0.0 at claim level\n                'total_payment': float,      # Always 0.0 at claim level\n                'total_incurred': float,     # Always 0.0 at claim level\n                'total_recovery': float,     # Sum of all recovery reserves + recovered amounts\n                'net_incurred': float        # total_incurred - total_recovery (always negative)\n            },\n            'exposure_level_overview': [\n                {\n                    'id': str,                    # Exposure/claim item UUID\n                    'claimant_name': str|null,    # Name of the claimant\n                    'coverage_name': str,         # Insurance coverage name\n                    'loss_name': str,             # Description of the loss/damage\n                    'overview': {\n                        'total_reserve': float,    # Sum of loss, legal, and adjusting reserves\n                        'total_payment': float,    # Sum of all payments made\n                        'total_incurred': float,   # total_reserve + total_payment\n                        'total_recovery': float,   # Sum of recovery reserves + recovered amounts\n                        'net_incurred': float      # total_incurred - total_recovery\n                    }\n                },\n                ...\n            ],\n            'total_overview': {\n                'total_reserve': float,      # Sum of all exposure reserves\n                'total_payment': float,      # Sum of all exposure payments\n                'total_incurred': float,     # total_reserve + total_payment\n                'total_recovery': float,     # Sum of all recovery data (claim + exposure level)\n                'net_incurred': float        # total_incurred - total_recovery\n            },\n            'total_records': int            # Total number of exposures for pagination\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_accounting_overview"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_accounting_overview"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_exposures/get_accounting_recoveries_data": {
      "post": {
        "summary": "get_accounting_recoveries_data",
        "tags": [
          "claim_exposures"
        ],
        "description": "\n    Retrieves accounting recoveries summary data for a claim,\n    including claim-level, exposure-level recoveries and total recoveries.\n    This endpoint uses pagination to return the data.\n\n    Permissions\n    -----------\n    Requires read access to at least one of:\n        - 'britecore/claims/exposures'\n        - 'britecore/claims/accounting'\n        - 'agent/claims'\n\n    Parameters\n    ----------\n    claim_id : str\n        The ID of the claim for which to retrieve recoveries data.\n    page : int, optional\n        The page number for paginated exposures (default: 1).\n    page_size : int, optional\n        The number of exposures per page (default: 100).\n\n    Returns\n    -------\n    dict\n        {\n            'claim_level_recoveries': {\n                'reinsurance_summary': {\n                    'total_recovery_reserve': Decimal,\n                    'total_recovered': Decimal\n                },\n                'reinsurancelae_summary': {\n                    'total_recovery_reserve': Decimal,\n                    'total_recovered': Decimal\n                },\n                'salvage_summary': {\n                    'total_recovery_reserve': Decimal,\n                    'total_recovered': Decimal\n                },\n                'subrogation_summary': {\n                    'total_recovery_reserve': Decimal,\n                    'total_recovered': Decimal\n                }\n            },\n            'exposure_level_recoveries': [\n                {\n                    'id': str,\n                    'claimant_name': str,\n                    'coverage_name': str,\n                    'loss_name': str,\n                    'recoveries': {\n                        'reinsurance_summary': {\n                            'total_recovery_reserve': Decimal,\n                            'total_recovered': Decimal\n                        },\n                        'reinsurancelae_summary': {\n                            'total_recovery_reserve': Decimal,\n                            'total_recovered': Decimal\n                        },\n                        'salvage_summary': {\n                            'total_recovery_reserve': Decimal,\n                            'total_recovered': Decimal\n                        },\n                        'subrogation_summary': {\n                            'total_recovery_reserve': Decimal,\n                            'total_recovered': Decimal\n                        }\n                    }\n                },\n                ...\n            ],\n            'total_recoveries': {\n                'reinsurance_summary': {\n                    'total_recovery_reserve': Decimal,\n                    'total_recovered': Decimal\n                },\n                'reinsurancelae_summary': {\n                    'total_recovery_reserve': Decimal,\n                    'total_recovered': Decimal\n                },\n                'salvage_summary': {\n                    'total_recovery_reserve': Decimal,\n                    'total_recovered': Decimal\n                },\n                'subrogation_summary': {\n                    'total_recovery_reserve': Decimal,\n                    'total_recovered': Decimal\n                }\n            }\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_accounting_recoveries_data"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_accounting_recoveries_data"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_exposures/get_broken_limits": {
      "post": {
        "summary": "get_broken_limits",
        "tags": [
          "claim_exposures"
        ],
        "description": "get_broken_limits",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance": {},
                  "type": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_exposures/get_coverage_accounting_data": {
      "post": {
        "summary": "get_coverage_accounting_data",
        "tags": [
          "claim_exposures"
        ],
        "description": "\n    Retrieve claim accounting summary filtered to one coverage.\n\n    Parameters\n    ----------\n    claim_id : str\n        Claim ID.\n    coverage_id : str\n        Coverage ID.\n\n    Returns\n    -------\n    dict\n        Same shape as ``get_accounting_data`` (``exposure_summaries`` list +\n        ``summary``), filtered to exposures matching *coverage_id*.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "claim_id": {
                    "type": "string"
                  },
                  "coverage_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_exposures/get_exposure_accounting_data": {
      "post": {
        "summary": "get_exposure_accounting_data",
        "tags": [
          "claim_exposures"
        ],
        "description": "\n    Retrieve accounting summary for a single exposure.\n\n    Parameters\n    ----------\n    exposure_id : str\n        Exposure ID.\n\n    Returns\n    -------\n    dict\n        Exposure accounting summary.  Reserve-category summaries (``loss_summary``,\n        ``adjusting_summary``, ``legal_summary``) each contain::\n\n            {\"id\", \"reserve_category_type\", \"total_reserve\", \"total_payments\",\n             \"total_recovery\", \"total_incurred\", \"net_incurred\"}\n\n        Recovery-category summaries (``reinsurance_summary``,\n        ``reinsurancelae_summary``, ``salvage_summary``,\n        ``subrogation_summary``) each contain::\n\n            {\"id\", \"recovery_category_type\", \"total_recovery_reserve\",\n             \"total_recovered\", \"total_recovery\"}\n\n        Top-level aggregates::\n\n            {\n                \"id\": str,\n                \"exposure\": <exposure object>,\n                \"loss_summary\": <reserve_category>,\n                \"adjusting_summary\": <reserve_category>,\n                \"legal_summary\": <reserve_category>,\n                \"reinsurance_summary\": <recovery_category>,\n                \"reinsurancelae_summary\": <recovery_category>,\n                \"salvage_summary\": <recovery_category>,\n                \"subrogation_summary\": <recovery_category>,\n                \"total_recovered\": number,\n                \"total_recovery_reserve\": number,\n                \"total_recovery\": number,\n                \"total_reserve\": number,\n                \"total_payments\": number,\n                \"total_incurred\": number,\n                \"net_incurred\": number\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "exposure_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_exposures/get_exposure_edit_status": {
      "post": {
        "summary": "get_exposure_edit_status",
        "tags": [
          "claim_exposures"
        ],
        "description": "\n    Returns whether an exposure is editable.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_exposure_edit_status"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_exposure_edit_status"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_exposures/get_exposure_transactions": {
      "post": {
        "summary": "get_exposure_transactions",
        "tags": [
          "claim_exposures"
        ],
        "description": "\n    Get transactions for an exposure with optional filtering and sorting.\n\n    This endpoint returns all accounting transactions for a specific exposure.\n    When no filter parameters are provided, returns all transactions sorted by\n    date (newest first).\n\n    Permissions\n    -----------\n    Requires read access to at least one of:\n        - 'britecore/claims/accounting/transactions'\n        - 'agent/claims'\n\n    Parameters\n    ----------\n    exposure_id : str\n        UUID of the exposure\n    transaction_types : str (optional)\n        Filter by transaction type(s): reserve, payment, recovery, recovery_reserve\n    categories : List[str] (optional)\n        Filter by category(ies): loss, adjuster, legal, reinsurance, subrogation,\n        salvage, reinsurancelae\n    statuses : List[str] (optional)\n        Filter by status(es): voided\n    payment_methods : List[str] (optional)\n        Filter by payment method(s): NoAuth, CC, ACH\n    date_from : str (optional)\n        Filter transactions on or after this date (YYYY-MM-DD format)\n    date_to : str (optional)\n        Filter transactions on or before this date (YYYY-MM-DD format)\n    sort_by : str (optional, default: \"transaction_datetime\")\n        Field to sort by: transaction_datetime, amount, payee, transaction_category\n    sort_order : str (optional, default: \"desc\")\n        Sort order: asc, desc\n\n    Returns\n    -------\n        List of serialized ClaimExposureAccountingTransactionWithExposureDetailsModel\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_exposure_transactions"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_exposure_transactions"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_exposures/get_payment": {
      "post": {
        "summary": "get_payment",
        "tags": [
          "claim_exposures"
        ],
        "description": "\n    Retrieve a payment by its id (claim transaction id).\n\n    Parameters\n    ----------\n    payment_id : str\n        Claim transaction ID.\n\n    Returns\n    -------\n    dict\n        Payment object (same shape as ``make_payment`` response).\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_payment"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_payment"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_exposures/list_exposures": {
      "post": {
        "summary": "list_exposures",
        "tags": [
          "claim_exposures"
        ],
        "description": "\n    List all exposures for a claim.\n\n    Parameters\n    ----------\n    claim_id : str\n        Claim ID.\n\n    Returns\n    -------\n    list[dict]\n        List of exposure objects.  Each element has the same shape as the\n        ``create_exposure`` response (see its docstring for the full schema).\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "claim_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_exposures/make_multi_exposures_payment": {
      "post": {
        "summary": "make_multi_exposures_payment",
        "tags": [
          "claim_exposures"
        ],
        "description": "\n    Create a single payment distributed across multiple exposures.\n\n    Request Payload\n    ---------------\n    payment_details : dict\n        {\n            \"claim_id\": str,\n            \"exposures\": [\n                {\"id\": str, \"loss_paid\": number, \"adjusting_paid\": number, \"legal_paid\": number}\n            ],\n            \"payee_ids\": [str, ...],\n            \"date\": \"YYYY-MM-DD\",\n            \"display_on_check\": str,\n            \"payment_method\": str,\n            \"memo\": str                         # optional\n        }\n\n    Returns\n    -------\n    dict\n        On success, the created multi-exposure payment::\n\n            {\n                \"id\": str,\n                \"claim_id\": str,\n                \"exposures\": [\n                    {\"id\": str, \"loss_paid\": number,\n                     \"adjusting_paid\": number, \"legal_paid\": number}\n                ],\n                \"payee_ids\": [str, ...],\n                \"date\": \"YYYY-MM-DD\",\n                \"display_on_check\": str,\n                \"payment_method\": str,\n                \"payment_classification\": str,\n                \"address_id\": str,\n                \"deductible_amount\": number,\n                \"memo\": str,\n                \"system_tags\": dict,\n                \"amount\": number\n            }\n\n        If authority limits are exceeded::\n\n            {\"brokenLimits\": [...], \"adminData\": {...}}\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_exposures/make_payment": {
      "post": {
        "summary": "make_payment",
        "tags": [
          "claim_exposures"
        ],
        "description": "\n    Create a payment transaction for an exposure.\n\n    Request Payload\n    ---------------\n    payment_details : dict\n        {\n            \"exposure_id\": str,\n            \"payee_ids\": [str, ...],\n            \"date\": \"YYYY-MM-DD\",\n            \"display_on_check\": str,\n            \"payment_method\": str,\n            \"loss_paid\": number,\n            \"adjusting_paid\": number,\n            \"legal_paid\": number,\n            \"deductible_amount\": number,      # optional\n            \"memo\": str,                      # optional\n            \"payment_classification\": str,    # optional\n            \"address_id\": str                 # optional\n        }\n\n    Returns\n    -------\n    dict\n        On success, the created payment::\n\n            {\n                \"id\": str,\n                \"exposure_id\": str,\n                \"payee_ids\": [str, ...],\n                \"date\": \"YYYY-MM-DD\",\n                \"display_on_check\": str,\n                \"payment_method\": str,\n                \"payment_classification\": str,\n                \"address_id\": str,\n                \"loss_paid\": number,\n                \"adjusting_paid\": number,\n                \"legal_paid\": number,\n                \"deductible_amount\": number,\n                \"memo\": str,\n                \"system_tags\": dict,\n                \"amount\": number\n            }\n\n        If authority limits are exceeded::\n\n            {\"brokenLimits\": [...], \"adminData\": {...}}\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_exposures/update_exposure": {
      "post": {
        "summary": "update_exposure",
        "tags": [
          "claim_exposures"
        ],
        "description": "\n    Updates an existing exposure's claimant, coverage, or loss/risk.\n    Blocked when payments exist on the exposure.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-update_exposure"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-update_exposure"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_exposures/update_payment": {
      "post": {
        "summary": "update_payment",
        "tags": [
          "claim_exposures"
        ],
        "description": "\n    Update an existing payment transaction.\n\n    Request Payload\n    ---------------\n    payment_details : dict\n        Partial payment payload that includes ``id`` and one or more\n        updatable fields from ``make_payment``.\n\n    Returns\n    -------\n    dict\n        On success, the updated payment object (same shape as\n        ``make_payment`` response).\n\n        If authority limits are exceeded::\n\n            {\"brokenLimits\": [...], \"adminData\": {...}}\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-update_payment"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-update_payment"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_exposures/void_transaction": {
      "post": {
        "summary": "void_transaction",
        "tags": [
          "claim_exposures"
        ],
        "description": "\n    Void a claim accounting transaction.\n\n    Parameters\n    ----------\n    transaction_id : str\n        Transaction ID.\n\n    Returns\n    -------\n    str\n        The voided transaction ID.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "transaction_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_injuries/create_injury": {
      "post": {
        "summary": "create_injury",
        "tags": [
          "claim_injuries"
        ],
        "description": "\n        Applied here 2 permissions since we need it both for \"britecore/...\" and \"agent/...\" users\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_injuries/delete_injury": {
      "post": {
        "summary": "delete_injury",
        "tags": [
          "claim_injuries"
        ],
        "description": "\n        Applied here 2 permissions since we need it both for \"britecore/...\" and \"agent/...\" users\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_injuries/get_injuries": {
      "post": {
        "summary": "get_injuries",
        "tags": [
          "claim_injuries"
        ],
        "description": "\n        Applied here 2 permissions since we need it both for \"britecore/...\" and \"agent/...\" users\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_injuries/get_injury": {
      "post": {
        "summary": "get_injury",
        "tags": [
          "claim_injuries"
        ],
        "description": "\n        Applied here 2 permissions since we need it both for \"britecore/...\" and \"agent/...\" users\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_injuries/update_injury": {
      "post": {
        "summary": "update_injury",
        "tags": [
          "claim_injuries"
        ],
        "description": "\n        Applied here 2 permissions since we need it both for \"britecore/...\" and \"agent/...\" users\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_properties/create_claim_property": {
      "post": {
        "summary": "create_claim_property",
        "tags": [
          "claim_properties"
        ],
        "description": "\n        Applied here 2 permissions since we need it both for \"britecore/...\" and \"agent/...\" users\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_properties/delete_claim_property": {
      "post": {
        "summary": "delete_claim_property",
        "tags": [
          "claim_properties"
        ],
        "description": "\n        Applied here 2 permissions since we need it both for \"britecore/...\" and \"agent/...\" users\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_properties/get_claim_properties": {
      "post": {
        "summary": "get_claim_properties",
        "tags": [
          "claim_properties"
        ],
        "description": "\n        Applied here 2 permissions since 2 separate tabs use this endpoint - Exposures and Damage Properties\n        Also it should be accessible in agent mode\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_properties/get_claim_property": {
      "post": {
        "summary": "get_claim_property",
        "tags": [
          "claim_properties"
        ],
        "description": "get_claim_property",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_properties/update_claim_property": {
      "post": {
        "summary": "update_claim_property",
        "tags": [
          "claim_properties"
        ],
        "description": "\n        Applied here 2 permissions since we need it both for \"britecore/...\" and \"agent/...\" users\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_vehicles/create_claim_vehicle": {
      "post": {
        "summary": "create_claim_vehicle",
        "tags": [
          "claim_vehicles"
        ],
        "description": "\n        Applied here 2 permissions since we need it both for \"britecore/...\" and \"agent/...\" users\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_vehicles/delete_claim_vehicle": {
      "post": {
        "summary": "delete_claim_vehicle",
        "tags": [
          "claim_vehicles"
        ],
        "description": "\n        Applied here 2 permissions since we need it both for \"britecore/...\" and \"agent/...\" users\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_vehicles/get_claim_vehicle": {
      "post": {
        "summary": "get_claim_vehicle",
        "tags": [
          "claim_vehicles"
        ],
        "description": "\n        Applied here 2 permissions since we need it both for \"britecore/...\" and \"agent/...\" users\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_vehicles/get_claim_vehicles": {
      "post": {
        "summary": "get_claim_vehicles",
        "tags": [
          "claim_vehicles"
        ],
        "description": "\n        Applied here 2 permissions since we need it both for \"britecore/...\" and \"agent/...\" users\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_vehicles/run_claim_vehicle_valuation": {
      "post": {
        "summary": "run_claim_vehicle_valuation",
        "tags": [
          "claim_vehicles"
        ],
        "description": "run_claim_vehicle_valuation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claim_vehicles/update_claim_vehicle": {
      "post": {
        "summary": "update_claim_vehicle",
        "tags": [
          "claim_vehicles"
        ],
        "description": "\n        Applied here 2 permissions since we need it both for \"britecore/...\" and \"agent/...\" users\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claims/auto_assign_claim": {
      "post": {
        "summary": "auto_assign_claim",
        "tags": [
          "claims"
        ],
        "description": " Auto-Assign an adjuster to a Claim ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-auto_assign_claim"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-auto_assign_claim"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claims/bifurcate_claim": {
      "post": {
        "summary": "bifurcate_claim",
        "tags": [
          "claims"
        ],
        "description": " Bifurcates a Claim ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-bifurcate_claim"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-bifurcate_claim"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claims/bulk_assign": {
      "post": {
        "summary": "bulk_assign",
        "tags": [
          "claims"
        ],
        "description": "Bulk assign claim parties to claims.\n\n    Parameters\n    ----------\n    params : list[dict], required\n        Payload matching ``ClaimBulkReassignmentRequestSchema`` with one or\n        more claim/contact assignments to create.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not.\n    messages : list[str]\n        List of human-readable messages.\n    data : str\n        Human-readable status string returned by\n        ``ClaimContactService.bulk_assign``.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "params": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claims/bulk_reassign": {
      "post": {
        "summary": "bulk_reassign",
        "tags": [
          "claims"
        ],
        "description": "Bulk reassign claim parties on claims.\n\n    Parameters\n    ----------\n    params : list[dict], required\n        Payload matching ``ClaimBulkReassignmentRequestSchema`` with one or\n        more claim/contact assignment updates.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not.\n    messages : list[str]\n        List of human-readable messages.\n    data : str\n        Human-readable status string returned by\n        ``ClaimContactService.bulk_reassign``.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "params": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claims/bulk_unassign": {
      "post": {
        "summary": "bulk_unassign",
        "tags": [
          "claims"
        ],
        "description": "Bulk unassign claim parties from claims.\n\n    Parameters\n    ----------\n    params : dict, required\n        Payload matching ``ClaimBulkUnassignmentRequestSchema``.\n        Includes one or more claim/contact assignments to remove.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not.\n    messages : list[str]\n        List of human-readable messages.\n    data : str\n        Human-readable status string returned by\n        ``ClaimContactService.bulk_unassign``.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "params": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claims/claimsearch_sso_data": {
      "post": {
        "summary": "claimsearch_sso_data",
        "tags": [
          "claims"
        ],
        "description": "\n    Generate ClaimSearch SSO data via Tray.io.\n\n    Collects the authenticated user's contact attributes, calls Tray.io\n    to produce SSO payload data, and returns it for the frontend to\n    open ClaimSearch's ACS endpoint.\n\n    Parameters\n    ----------\n    claim_id : str, required\n        UUID of the claim\n    vendor_reference_id : str, optional\n        ISO file number for deep-linking to a specific match report.\n        If provided, Tray builds a RelayState for the report page.\n        If omitted, lands on ClaimSearch home page.\n\n    Returns\n    -------\n    success : bool\n    data : dict\n        - acs_url: ClaimSearch ACS endpoint URL\n        - saml_response: base64-encoded signed SAML Response, if provided\n        - relay_state: RelayState for deep-linking (empty for home page)\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-claimsearch_sso_data"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-claimsearch_sso_data"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claims/create_claim_date": {
      "post": {
        "summary": "create_claim_date",
        "tags": [
          "claims"
        ],
        "description": "Create a claim date\n\n    Parameters\n    ----------\n    claim_id : str, required\n        the claim id\n    claim_date_type : str, required\n        the claim date type\n    claim_date : str, required\n        the claim date (format: YYYY-mm-dd)\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list[str]\n        List of human-readable error messages\n    data: dict\n        The claim date.\n        ::\n        {\n            \"dateId\": \"<uuid>\",\n            \"type\": \"<claim-date-type>\",\n            \"dateString\": \"<mm/dd/YYYY>\",\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "claim_id": {
                    "type": "string"
                  },
                  "claim_date_type": {
                    "type": "string"
                  },
                  "claim_date": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claims/export_batch_claims": {
      "post": {
        "summary": "export_batch_claims",
        "tags": [
          "claims"
        ],
        "description": "\n    Batch retrieve all data points specific to claims given claim ids\n\n    Parameters\n    ----------\n    claim_ids : list of str, required\n        List of claims ids\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        Human-readable messages.\n    data :\n        Contains the data points for claims in the following format:\n        [\n            {\n                \"claim\": {\n                    \"id\": str,\n                    \"active\": boolean,\n                    \"additional_information\": {\n                        \"Best Contact Phone\": str,\n                        \"Reported To\": str,\n                        \"Police/Fire Dept to Which Reported\": str,\n                        \"Best Contact Email\": str,\n                        \"Reported By\": str,\n                        \"Additional Information\": str\n                    },\n                    \"cat_id\": str,\n                    \"claim_number\": str,\n                    \"claim_number_origin\": str,\n                    \"county\": str,\n                    \"county_specify\": str,\n                    \"date_added\": str,\n                    \"description\": str,\n                    \"flag\": str,\n                    \"iso_transaction_type\": str,\n                    \"last_modified\": str,\n                    \"last_rein_report_date\": str,\n                    \"loss_address_city\": str,\n                    \"loss_address_id\": str,\n                    \"loss_address_line1\": str,\n                    \"loss_address_line2\": str,\n                    \"loss_address_listed\": boolean,\n                    \"loss_address_state\": str,\n                    \"loss_address_zip\": str,\n                    \"loss_date\": str,\n                    \"policy_id\": str,\n                    \"reinsurance_reserve\": float,\n                    \"reinsurancelae_reserve\": float,\n                    \"reinsurance_monitor_status\": str,\n                    \"salvage_reserve\": float,\n                    \"status\": str,\n                    \"subrogation_reserve\": float,\n                    \"dual_masthead\": boolean,\n                    \"system_tags\": str,\n                    \"type\": str,\n                    \"type_manual\": boolean,\n                    \"loss_address_latitude\": float,\n                    \"loss_address_longitude\": float,\n                    \"reported_method\": str,\n                    \"fnol_number\": str,\n                    \"no_vehicles\": int,\n                    \"hit_and_run\": boolean,\n                    \"revision_id\": str,\n                    \"date_updated\": str\n                },\n                \"revision_id\": str,\n                \"claim_items\": [\n                    {\n                        \"id\": str,\n                        \"description\": str,\n                        \"item_id\": str,\n                        \"adjusting_reserve\": float,\n                        \"claim_id\": str,\n                        \"loss_id\": str,\n                        \"loss_type\": str,\n                        \"coverage_deductible\": float,\n                        \"legal_reserve\": float,\n                        \"loss_reserve\": float,\n                        \"override\": boolean,\n                        \"deleted\": boolean,\n                        \"date_updated\": str\n                    }\n                ],\n                \"claim_change_logs\": [\n                    {\n                        \"id\": str,\n                        \"claim_id\": str,\n                        \"claim_number\": str,\n                        \"claim_status\": str,\n                        \"claim_item_id\": str,\n                        \"date_cursor\": str,\n                        \"date_stamp\": str,\n                        \"transaction\": str,\n                        \"changed_from\": str,\n                        \"changed_to\": str,\n                        \"deleted\": boolean,\n                        \"date_updated\": str\n                    }\n                ],\n                \"claim_properties\": [],\n                \"claim_dates\": [\n                    {\n                        \"id\": str,\n                        \"claim_id\": str,\n                        \"date\": str,\n                        \"type\": str,\n                        \"date_updated\": str\n                    }\n                ],\n                \"claim_contacts\": [\n                    {\n                        \"id\": str,\n                        \"claim_id\": str,\n                        \"contact_id\": str,\n                        \"adjuster\": boolean,\n                        \"public_adjuster\": boolean,\n                        \"claimant\": boolean,\n                        \"contractor\": boolean,\n                        \"contractor_description\": str,\n                        \"date_added\": str,\n                        \"defendant_attorney\": boolean,\n                        \"plaintiff_attorney\": boolean,\n                        \"named_insured\": boolean,\n                        \"producer\": boolean,\n                        \"supervisor\": boolean,\n                        \"police_department\": boolean,\n                        \"public_claims_adjuster\": boolean,\n                        \"fire_department\": boolean,\n                        \"medical_provider\": boolean,\n                        \"driver\": boolean,\n                        \"passenger\": boolean,\n                        \"pedestrian\": boolean,\n                        \"witness\": boolean,\n                        \"owner\": boolean,\n                        \"other\": boolean,\n                        \"date_updated\": str,\n                        \"contact\": {\n                            \"id\": str,\n                            \"accept_electronic_comm_statement\": boolean,\n                            \"active\": boolean,\n                            \"agency_inactive\": boolean,\n                            \"agency_inactive_timestamp\": str,\n                            \"agency_group_number\": str,\n                            \"agency_number\": str,\n                            \"background\": str,\n                            \"date_added\": str,\n                            \"added_by\": str,\n                            \"commission_account_id\": str,\n                            \"comm_statement_email_id\": str,\n                            \"cc_email_notices\": str,\n                            \"commission_structure\": str,\n                            \"confirmation_email\": str,\n                            \"default_state_id\": str,\n                            \"direct_application_activity_to\": str,\n                            \"display_agency_group_info_on_dec\": boolean,\n                            \"dob\": str,\n                            \"drivers_license\": str,\n                            \"email_notices\": boolean,\n                            \"email_print_list\": boolean,\n                            \"fein_tax\": str,\n                            \"legal_entity_type\": str,\n                            \"date_business_started\": str,\n                            \"risk_id_number\": str,\n                            \"dba\": str,\n                            \"flag\": str,\n                            \"has_sweep_account\": boolean,\n                            \"issue_commission_payments\": boolean,\n                            \"issue_payments\": boolean,\n                            \"issue_payments_account_id\": str,\n                            \"last_login\": str,\n                            \"mortgagee_statement\": str,\n                            \"naic_number\": str,\n                            \"vendor_number\": str,\n                            \"name\": \"Test Agency\",\n                            \"notice_email_id\": str,\n                            \"claim_activity_email_id\": str,\n                            \"cc_claim_email_notices\": str,\n                            \"notify_of_overdue_invoices\": boolean,\n                            \"photo_id\": str,\n                            \"permission_level_id\": str,\n                            \"position\": str,\n                            \"website\": str,\n                            \"producer_number\": str,\n                            \"same_as_ssn\": boolean,\n                            \"ssn\": str,\n                            \"ssn_group\": str,\n                            \"sweep_account_id\": str,\n                            \"system_tags\": {\n                                <id>: str\n                            },\n                            \"terminated\": boolean,\n                            \"termination_reason\": str,\n                            \"timezone\": str,\n                            \"type\": str,\n                            \"username\": str,\n                            \"disallow_e2_val\": boolean,\n                            \"is_approved_vendor\": boolean,\n                            \"is1099_reportable\": boolean,\n                            \"oops_email\": str,\n                            \"do_not_print_when_bill_whom\": boolean,\n                            \"agency_billing_enabled\": boolean,\n                            \"credit_score_account\": str,\n                            \"date_updated\": str,\n                            \"terms_conditions_accepted\": boolean,\n                            \"follow_agency_quoting_restriction\": boolean,\n                            \"purchase_date\": str,\n                            \"cognito_username\": str,\n                            \"default_agency_id\": str,\n                            \"gender\": str,\n                            \"agency_inception_date\": str,\n                            \"agency_termination_date\": str,\n                            \"driver_license_date\": str,\n                            \"license_state\": str,\n                            \"previous_address_id\": str\n                        }\n                    }\n                ],\n                \"recovery_history\": [\n                    {\n                        \"id\": str,\n                        \"change_in_reserve\": float,\n                        \"claim_id\": str,\n                        \"claim_item_id\": str,\n                        \"claim_transaction_id\": str,\n                        \"date_created\": str,\n                        \"modified_by\": str,\n                        \"received\": float,\n                        \"snapshot\": str,\n                        \"total_received\": float,\n                        \"total_reserves\": float,\n                        \"historical\": boolean,\n                        \"change_reason\": str,\n                        \"date_updated\": str\n                    }\n                ],\n                \"losses_incurred\": [\n                    {\n                        \"id\": str,\n                        \"change_in_reserve\": float,\n                        \"claim_id\": str,\n                        \"date_created\": str,\n                        \"date_created_micro\": int,\n                        \"losses_incurred\": float,\n                        \"losses_paid\": float,\n                        \"modified_by\": str,\n                        \"snapshot\": str,\n                        \"historical\": boolean,\n                        \"claim_transaction_id\": str,\n                        \"date_updated\": str,\n                        \"loss_items\": [\n                            {\n                                \"id\": str,\n                                \"losses_incurred_id\": str,\n                                \"claim_item_id\": str,\n                                \"claim_item_name\": str,\n                                \"loss_reserve\": float,\n                                \"adjusting_reserve\": float,\n                                \"legal_reserve\": float,\n                                \"change_in_loss_reserve\": float,\n                                \"change_in_adjusting_reserve\": float,\n                                \"change_in_legal_reserve\": float,\n                                \"loss_paid\": float,\n                                \"adjusting_paid\": float,\n                                \"legal_paid\": float,\n                                \"total_loss_paid\": float,\n                                \"total_adjusting_paid\": float,\n                                \"total_legal_paid\": float,\n                                \"date_updated\": str\n                            }\n                        ]\n                    }\n                ],\n                \"perils\": [\n                    {\n                        \"id\": str,\n                        \"aplus_code\": str,\n                        \"lexis_nexis_code\": str,\n                        \"code\": str,\n                        \"date_updated\": str,\n                        \"name\": str\n                    }\n                ],\n                \"claim_transactions\": [\n                    {\n                        \"id\": str,\n                        \"address_id\": str,\n                        \"amount\": float,\n                        \"check_display\": str,\n                        \"check_number\": str,\n                        \"claim_id\": str,\n                        \"claim_item_id\": str,\n                        \"cleared_date\": str,\n                        \"contact_id\": str,\n                        \"description\": str,\n                        \"deductible\": float,\n                        \"exported\": boolean,\n                        \"item_amounts\": str,\n                        \"memo\": str,\n                        \"payment_method_id\": str,\n                        \"recovery_category\": str,\n                        \"reinsurance_contract_contact_id\": str,\n                        \"selected_payees\": str,\n                        \"transaction_date\": str,\n                        \"type\": str,\n                        \"voided\": boolean,\n                        \"voided_date\": str,\n                        \"historical\": boolean,\n                        \"check_date\": str,\n                        \"date_updated\": str,\n                        \"contact\": {\n                            \"id\": str,\n                            \"accept_electronic_comm_statement\": boolean,\n                            \"active\": boolean,\n                            \"agency_inactive\": boolean,\n                            \"agency_inactive_timestamp\": str,\n                            \"agency_group_number\": str,\n                            \"agency_number\": str,\n                            \"background\": str,\n                            \"date_added\": str,\n                            \"added_by\": str,\n                            \"commission_account_id\": str,\n                            \"comm_statement_email_id\": str,\n                            \"cc_email_notices\": str,\n                            \"commission_structure\": str,\n                            \"confirmation_email\": str,\n                            \"default_state_id\": str,\n                            \"direct_application_activity_to\": str,\n                            \"display_agency_group_info_on_dec\": boolean,\n                            \"dob\": str,\n                            \"drivers_license\": str,\n                            \"email_notices\": boolean,\n                            \"email_print_list\": boolean,\n                            \"fein_tax\": str,\n                            \"legal_entity_type\": str,\n                            \"date_business_started\": str,\n                            \"risk_id_number\": str,\n                            \"dba\": str,\n                            \"flag\": str,\n                            \"has_sweep_account\": boolean,\n                            \"issue_commission_payments\": boolean,\n                            \"issue_payments\": boolean,\n                            \"issue_payments_account_id\": str,\n                            \"last_login\": str,\n                            \"mortgagee_statement\": str,\n                            \"naic_number\": str,\n                            \"vendor_number\": str,\n                            \"name\": \"Test Agency\",\n                            \"notice_email_id\": str,\n                            \"claim_activity_email_id\": str,\n                            \"cc_claim_email_notices\": str,\n                            \"notify_of_overdue_invoices\": boolean,\n                            \"photo_id\": str,\n                            \"permission_level_id\": str,\n                            \"position\": str,\n                            \"website\": str,\n                            \"producer_number\": str,\n                            \"same_as_ssn\": boolean,\n                            \"ssn\": str,\n                            \"ssn_group\": str,\n                            \"sweep_account_id\": str,\n                            \"system_tags\": {\n                                <id>: str\n                            },\n                            \"terminated\": boolean,\n                            \"termination_reason\": str,\n                            \"timezone\": str,\n                            \"type\": str,\n                            \"username\": str,\n                            \"disallow_e2_val\": boolean,\n                            \"is_approved_vendor\": boolean,\n                            \"is1099_reportable\": boolean,\n                            \"oops_email\": str,\n                            \"do_not_print_when_bill_whom\": boolean,\n                            \"agency_billing_enabled\": boolean,\n                            \"credit_score_account\": str,\n                            \"date_updated\": str,\n                            \"terms_conditions_accepted\": boolean,\n                            \"follow_agency_quoting_restriction\": boolean,\n                            \"purchase_date\": str,\n                            \"cognito_username\": str,\n                            \"default_agency_id\": str,\n                            \"gender\": str,\n                            \"agency_inception_date\": str,\n                            \"agency_termination_date\": str,\n                            \"driver_license_date\": str,\n                            \"license_state\": str,\n                            \"previous_address_id\": str\n                        }\n                    }\n                ],\n                \"injuries\": [\n                    {\n                        \"id\": str,\n                        \"claim_id\": str,\n                        \"contact_id\": str,\n                        \"description\": str,\n                        \"fatality\": boolean,\n                        \"transferred_to_hospital\": boolean,\n                        \"head_injury\": boolean,\n                        \"loss_of_consciousness\": boolean,\n                        \"loss_of_limb\": boolean,\n                        \"prior_injuries\": boolean,\n                        \"prior_medical_conditions\": str,\n                        \"current_medical_conditions\": str,\n                        \"hicn\": str,\n                        \"date_added\": str,\n                        \"date_updated\": str,\n                        \"contact\": {\n                            {\n                                \"id\": str,\n                                \"accept_electronic_comm_statement\": boolean,\n                                \"active\": boolean,\n                                \"agency_inactive\": boolean,\n                                \"agency_inactive_timestamp\": str,\n                                \"agency_group_number\": str,\n                                \"agency_number\": str,\n                                \"background\": str,\n                                \"date_added\": str,\n                                \"added_by\": str,\n                                \"commission_account_id\": str,\n                                \"comm_statement_email_id\": str,\n                                \"cc_email_notices\": str,\n                                \"commission_structure\": str,\n                                \"confirmation_email\": str,\n                                \"default_state_id\": str,\n                                \"direct_application_activity_to\": str,\n                                \"display_agency_group_info_on_dec\": boolean,\n                                \"dob\": str,\n                                \"drivers_license\": str,\n                                \"email_notices\": boolean,\n                                \"email_print_list\": boolean,\n                                \"fein_tax\": str,\n                                \"legal_entity_type\": str,\n                                \"date_business_started\": str,\n                                \"risk_id_number\": str,\n                                \"dba\": str,\n                                \"flag\": str,\n                                \"has_sweep_account\": boolean,\n                                \"issue_commission_payments\": boolean,\n                                \"issue_payments\": boolean,\n                                \"issue_payments_account_id\": str,\n                                \"last_login\": str,\n                                \"mortgagee_statement\": str,\n                                \"naic_number\": str,\n                                \"vendor_number\": str,\n                                \"name\": \"Test Agency\",\n                                \"notice_email_id\": str,\n                                \"claim_activity_email_id\": str,\n                                \"cc_claim_email_notices\": str,\n                                \"notify_of_overdue_invoices\": boolean,\n                                \"photo_id\": str,\n                                \"permission_level_id\": str,\n                                \"position\": str,\n                                \"website\": str,\n                                \"producer_number\": str,\n                                \"same_as_ssn\": boolean,\n                                \"ssn\": str,\n                                \"ssn_group\": str,\n                                \"sweep_account_id\": str,\n                                \"system_tags\": {\n                                    <id>: str\n                                },\n                                \"terminated\": boolean,\n                                \"termination_reason\": str,\n                                \"timezone\": str,\n                                \"type\": str,\n                                \"username\": str,\n                                \"disallow_e2_val\": boolean,\n                                \"is_approved_vendor\": boolean,\n                                \"is1099_reportable\": boolean,\n                                \"oops_email\": str,\n                                \"do_not_print_when_bill_whom\": boolean,\n                                \"agency_billing_enabled\": boolean,\n                                \"credit_score_account\": str,\n                                \"date_updated\": str,\n                                \"terms_conditions_accepted\": boolean,\n                                \"follow_agency_quoting_restriction\": boolean,\n                                \"purchase_date\": str,\n                                \"cognito_username\": str,\n                                \"default_agency_id\": str,\n                                \"gender\": str,\n                                \"agency_inception_date\": str,\n                                \"agency_termination_date\": str,\n                                \"driver_license_date\": str,\n                                \"license_state\": str,\n                                \"previous_address_id\": str\n                            }\n                        }\n                    }\n                ]\n            }\n        ]\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "claim_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claims/export_claim_payments": {
      "post": {
        "summary": "export_claim_payments",
        "tags": [
          "claims"
        ],
        "description": "Exports claim payments and optionally assigns a check number to them. The optional check\n    number can be manually or automatically assigned.\n\n    In case any payment in the request is not exported there are two possible individual payment\n    response detail messages:\n    #. payment not found\n    #. payment already exported\n\n    Parameters\n    ----------\n    payments : list, required\n        List of dictionaries containing the following data representation. ::\n            [\n                {\n                    'id': string (uuid), ClaimTransaction.id\n                    'check_number': int/string, check number (int), 'auto_assign', or None\n                },\n                ...\n            ]\n    assign_check_date : bool\n        If true, assign today's date to all payments.\n\n    Returns\n    -------\n    success : bool\n        True if all exports were successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        List of dictionaries containing the following data representation. ::\n            [\n                {\n                    'id': string (uuid), ClaimTransaction.id,\n                    'check_date': date string, i.e. 2017-01-31,\n                    'check_number': int, The number if one was assigned, or None if not,\n                    'status': string, 'success' if succesfully exported, or 'error' if not,\n                    'detail': string, error message or None\n                },\n                ...\n            ]\n\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "payments": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "assign_check_date": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claims/get_all_associated_claims_parties": {
      "post": {
        "summary": "get_all_associated_claims_parties",
        "tags": [
          "claims"
        ],
        "description": "Retrieve all parties associated with a claim.\n\n    Parameters\n    ----------\n    claim_id : str, required\n        UUID of the claim.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not.\n    messages : list[str]\n        List of human-readable messages.\n    data : list[dict]\n        Serialized claim parties. Most rows are persisted claim-contact\n        associations; when ``claims.pull-current-mortgagees`` is enabled,\n        current-only mortgagees may appear as virtual parties (``id`` is null)\n        with an optional ``mortgagee_status`` tag.\n\n    Request and response schemas are located at\n    ``lib/api/api_specs/request-get_all_associated_claims_parties.json`` and\n    ``lib/api/api_specs/response-get_all_associated_claims_parties.json``,\n    respectively.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_all_associated_claims_parties"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_all_associated_claims_parties"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claims/get_all_catastrophes": {
      "post": {
        "summary": "get_all_catastrophes",
        "tags": [
          "claims"
        ],
        "description": "Retrieve all storms/catastrophes.\n\n    Parameters\n    ----------\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : list\n        A list of catastrophe dicts having the form:\n        ::\n            [\n                {\n                    \"date_time\": \"2020-01-15 15:53:42\",\n                    \"date_updated\": \"2020-01-15 15:53:42\",\n                    \"end_date_time\": \"2020-01-15 15:53:42\",\n                    \"id\": str,\n                    \"location\": str,\n                    \"pcs\": int,\n                    \"title\": str,\n                }\n            ]\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claims/get_all_claim_transactions": {
      "post": {
        "summary": "get_all_claim_transactions",
        "tags": [
          "claims"
        ],
        "description": "\n    This endpoint returns a comprehensive list of all accounting transactions associated with a specific claim.\n    The transactions include:\n\n    - **Payments**: Loss, adjusting, and legal payments made against the claim\n    - **Reserves**: Loss, adjusting, and legal reserves established for the claim\n    - **Recoveries**: Reinsurance, subrogation, salvage, and reinsurance LAE recoveries\n    - **Recovery Reserves**: Reserves established for potential recoveries\n\n    Transactions are sorted by date in descending order (most recent first) and include detailed\n    information about exposures, payees, and payment methods.\n    This endpoint supports filtering and pagination.\n\n    Permissions\n    -----------\n    Requires read access to at least one of:\n        - 'britecore/claims/accounting'\n        - 'agent/claims'\n\n    Parameters\n    ----------\n    claim_id : str (required)\n        The ID of the claim for which to retrieve transactions data.\n    page : int, optional\n        The page number for paginated exposures (default: 1).\n    page_size : int, optional\n        The number of exposures per page (default: 100, null for all).\n    transaction_types : list of str (optional)\n        Filter by transaction type(s): reserve, payment, recovery, recovery_reserve\n    categories : list of str (optional)\n        Filter by category(ies): loss, adjuster, legal, reinsurance, subrogation,\n        salvage, reinsurancelae\n    statuses : list of str (optional)\n        Filter by status(es): voided\n    payment_methods : list of str (optional)\n        Filter by payment method(s): NoAuth, CC, ACH\n    date_from : str (optional)\n        Filter transactions on or after this date (YYYY-MM-DD format)\n    date_to : str (optional)\n        Filter transactions on or before this date (YYYY-MM-DD format)\n    sort_by : str (optional, default: \"transaction_datetime\")\n        Field to sort by: transaction_datetime, amount, payee, transaction_category\n    sort_order : str (optional, default: \"desc\")\n        Sort order: asc, desc\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        Human-readable messages.\n    data : dict\n        Contains the transactions objects in the following format. Some fields could be missing if not relevant ::\n            {\n                'transactions': [\n                    {\n                        'id': str,\n                        'transaction_type': str,\n                        'transaction_category': str,\n                        'amount': Decimal,\n                        'new_amount': Decimal,\n                        'previous_amount': Decimal,\n                        'exported': bool,\n                        'exported_datetime': datetime,\n                        'voided': bool,\n                        'voided_datetime': datetime,\n                        'transaction_datetime': datetime,\n                        'modified_by_username': str,\n                        'description': str,\n                        'memo': str,\n                        'recovery_category': str,\n                        'contact_id': str,\n                        'address_id': str,\n                        'exposure_id': str,\n                        'payee_ids': list of str,\n                        'payment_classification': str,\n                        'payment_method_account_name': str,\n                        'payment_method_masked_number': str,\n                        'payment_method': str,\n                        'check_number': int,\n                        'payees': [\n                            {\n                                'id': str,\n                                'name': str\n                            },\n                            ...\n                        ],\n                        'modified_by': str,\n                        'claim_level_transaction': bool,\n                        'exposure_details': {\n                            'id': str,\n                            'claimant_name': str,\n                            'coverage_name': str,\n                            'loss_name': str,\n                            'reinsurance_reserve': Decimal,\n                            'reinsurancelae_reserve': Decimal,\n                            'salvage_reserve': Decimal,\n                            'subrogation_reserve': Decimal\n                        }\n                    },\n                    ...\n                ],\n                \"total_records\": int\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_all_claim_transactions"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_all_claim_transactions"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claims/get_all_perils": {
      "post": {
        "summary": "get_all_perils",
        "tags": [
          "claims"
        ],
        "description": "Get a list of all perils\n\n    Parameters\n    ----------\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : list\n        A list of peril dicts having the form:\n        ::\n            [\n                {'aplus_code': str,\n                 'code': str,\n                 'date_updated': '2020-01-15 15:53:42',\n                 'id': str,\n                 'name': str}\n            ]\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claims/get_claim": {
      "post": {
        "summary": "get_claim",
        "tags": [
          "claims"
        ],
        "description": "Retrieve claim.\n\n    Parameters\n    ----------\n    claim_id : str\n        The claim id\n    claim_number: str\n        The claim number\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data: dict containing claim\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "claim_id": {
                    "type": "string"
                  },
                  "claim_number": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claims/get_claim_change_logs": {
      "post": {
        "summary": "get_claim_change_logs",
        "tags": [
          "claims"
        ],
        "description": "Lists Claim Change log trails.\n\n    Parameters\n    ----------\n    from_date_time : datetime, optional\n        Datetime range filter. Format: YYYY-MM-DD HH:MM:SS\n    to_date_time : datetime, optional\n        Datetime range filter. Format: YYYY-MM-DD HH:MM:SS\n    transaction : str\n        Transaction filter option\n        Available Options [loss_reserve, claim_payment, status, loss_address,\n                           policy, claimant, loss_cause, adjuster, date_reported,\n                           loss_date, adjustment_reserve, coverage, legal_reserve, active,\n                           named_insured, agent]\n    Raises\n    ------\n    standard_error\n        If from_date_time is incorrectly formatted\n        If to_date_time is incorrectly formatted\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list\n        List of human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "from_date_time": {
                    "type": "string"
                  },
                  "to_date_time": {
                    "type": "string"
                  },
                  "transaction": {
                    "type": "string"
                  },
                  "Raises": {
                    "type": "string"
                  },
                  "------": {
                    "type": "string"
                  },
                  "standard_error": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claims/get_claim_contacts": {
      "post": {
        "summary": "get_claim_contacts",
        "tags": [
          "claims"
        ],
        "description": "Gets contacts for a given claim.\n\n    Parameters\n    ----------\n    claim_id : str, required\n        The claim id.\n\n    Returns\n    -------\n    success : bool\n        True if completely successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n    {\n        \"publicClaimsAdjusters\": [],\n        \"plaintiffAttorneys\": [],\n        \"reinsurers\": [],\n        \"publicAdjusters\": [],\n        \"contractors\": [],\n        \"selectedCoverage\": str,\n        \"adjusters\": [],\n        \"supervisors\": [],\n        \"namedInsureds\": [],\n        \"agents\": [],\n        \"fireDepartments\": [],\n        \"policeDepartments\": [],\n        \"claimants\": [],\n        \"mortgagees\": [],\n        \"defendantAttorneys\": [],\n        \"additionalInterests\": [],\n        \"id\": str,\n        \"medicalProviders\": []\n    }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "claim_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claims/get_claim_date_types": {
      "post": {
        "summary": "get_claim_date_types",
        "tags": [
          "claims"
        ],
        "description": "Get claim date types\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list[str]\n        List of human-readable error messages\n    data: dict\n        One or more claim date types.\n        ::\n        {\n            \"<claim-date-type-name>\": \"<claim-date-type-label>\",\n            ...\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "claim_id": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claims/get_claim_dates": {
      "post": {
        "summary": "get_claim_dates",
        "tags": [
          "claims"
        ],
        "description": "Get claim dates\n\n    Parameters\n    ----------\n    claim_id : str, required\n        the claim id\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list[str]\n        List of human-readable error messages\n    data: list[dict]\n        One or more claim dates.\n        ::\n        [\n            {\n                \"dateId\": \"<uuid>\",\n                \"type\": \"<claim-date-type>\",\n                \"dateString\": \"<mm/dd/YYYY>\",\n            },\n            ...\n        ]\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "claim_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claims/get_claim_payments": {
      "post": {
        "summary": "get_claim_payments",
        "tags": [
          "claims"
        ],
        "description": "Get a list of claims payments, including each payment's classification name as\n    `classification_type` as well as selected payee names and addresses.\n\n    Parameters\n    ----------\n    include_exported : bool, (Defaults to False)\n        Set to True to include exported payments.\n    include_voided : bool, (Defaults to False)\n        Set to True to include voided payments.\n    classification_types : list, optional\n        A list strings. Each string is the name of a claims payment\n        classification to filter the results by. Defaults to all payment\n        classifications (including null).\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : list\n        A list of claim payment dicts having the form:\n        ::\n            [\n                {\n                    'id': str,\n                    'address': {\n                        \"type\": str,\n                        \"type_label\": str or null,\n                        \"attention\": str or null,\n                        \"address_line1\": str,\n                        \"address_line2\": str or null,\n                        \"address_city\": str,\n                        \"address_county\": str,\n                        \"address_state\": str,\n                        \"address_country\": str,\n                        \"address_zip\": str\n                    }, # or null\n                    'amount': float,\n                    'check_date': str or null,\n                    'check_display': str or null,\n                    'check_number': int or null,\n                    'claim_id': str,\n                    'claim_number': str,\n                    'date_updated': str,\n                    'deductible': int,\n                    'description': str or null,\n                    'exported': bool,\n                    'classification_type': str or null,\n                    'payment_method_id': str,\n                    'type': 'payment',\n                    'historical': bool,\n                    'item_amounts': [\n                        {\n                            'legalPaid': str (Decimal),\n                            'claimItemId': str,\n                            'lineItemName': str,\n                            'lossPaid': str (Decimal),\n                            'adjustingPaid': str (Decimal)\n                        },\n                        ...\n                    ],\n                    'memo': str or null,\n                    'policy_number': str,\n                    'recovery_category': str or null,\n                    'reinsurance_contract_contact_id': str or null,\n                    'selected_payees': [\n                        {\n                            'name': str,\n                            'addresses': [\n                                {\n                                    \"type\": str,\n                                    \"type_label\": str or null,\n                                    \"attention\": str or null,\n                                    \"address_line1\": str,\n                                    \"address_line2\": str or null,\n                                    \"address_city\": str,\n                                    \"address_county\": str,\n                                    \"address_state\": str,\n                                    \"address_country\": str,\n                                    \"address_zip\": str\n                                },\n                                ...\n                            ],  # or []\n                        ...\n                    ],  # or []\n                    'transaction_date': str,\n                    'voided': bool,\n                    'voided_date': str or null,\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "include_exported": {
                    "type": "boolean"
                  },
                  "include_voided": {
                    "type": "boolean"
                  },
                  "classification_types": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claims/get_claim_snapshot": {
      "post": {
        "summary": "get_claim_snapshot",
        "tags": [
          "claims"
        ],
        "description": "Return the structured claim snapshot for the Claims Copilot.\n\n    Projects the deterministic claim data the summary and insights\n    operations consume in one call: header, policy context, parties with\n    their roles, coverages filed against, recorded losses (properties,\n    injuries, vehicles), estimation assignments, notes, tasks, exposure\n    accounting, and document / note counts. No role-based redaction\n    (consumed via API key).\n\n    Parameters\n    ----------\n    params : dict\n        Request payload. Must contain ``claim_id`` (str).\n\n    Returns\n    -------\n    dict\n        ``{\"claim_id\": <str>, \"facts\": {<grouped sections>}}`` where the\n        grouped sections are ``claim``, ``policy``, ``parties``,\n        ``coverages``, ``losses``, ``estimations``, ``notes``, ``tasks``,\n        ``accounting``, and ``documents``.\n\n    Raises\n    ------\n    NotFound\n        When no claim exists for ``claim_id``.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "params": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claims/get_claims_stats": {
      "post": {
        "summary": "get_claims_stats",
        "tags": [
          "claims"
        ],
        "description": "Get comprehensive claims statistics and analytics.\n\n    Returns statistics including:\n    - Summary metrics (active claims, percentages, averages)\n    - Claims by status (pie chart data - excludes Closed claims)\n    - Claims with open tasks summary\n    - Open tasks per assignee\n    - Tasks closed per day (last 30 days - histogram)\n    - Open vs closed claims per day (last month - histogram)\n    - Oldest open claims (risky claims)\n\n    This endpoint provides claims statistics that can be used by:\n    - AI agents (e.g., Claims Analytics) for analytics and insights\n    - Dashboard components for visualization\n    - Reporting and monitoring tools\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list[str]\n        List of human-readable error messages\n    data : dict\n        Claims statistics data containing:\n        - summary: {active_claims, open_claims, open_claims_percentage,\n                   total_open_tasks, tasks_completed_30d, avg_tasks_per_day}\n        - claims_by_status: [{status, count}, ...]\n        - claims_with_open_tasks: [{claim_id, claim_number, open_task_count,\n                                    oldest_task_date, assignee}, ...]\n        - tasks_per_assignee: [{assignee, open_task_count}, ...]\n        - tasks_closed_per_day: [{date, count}, ...]\n        - claims_flow_per_day: [{date, opened, closed}, ...]\n        - oldest_open_claims: [{claim_id, claim_number, created_at,\n                               age_days, open_tasks, adjuster}, ...]\n        - metadata: {generated_at, date_range_tasks, date_range_claims_flow}\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claims/get_claims_tabs_visibility": {
      "post": {
        "summary": "get_claims_tabs_visibility",
        "tags": [
          "claims"
        ],
        "description": "Retrieve claims UI tab visibility for a claim.\n\n    Parameters\n    ----------\n    claim_id : str, required\n        UUID of the claim.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not.\n    messages : list[str]\n        List of human-readable messages.\n    data : dict\n        Visibility configuration for claims tabs.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_claims_tabs_visibility"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_claims_tabs_visibility"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claims/get_contacts_claims": {
      "post": {
        "summary": "get_contacts_claims",
        "tags": [
          "claims"
        ],
        "description": "Get claims summary for given contact IDs or contact external references.\n\n    Parameters\n    ----------\n    contact_ids : list of str, optional\n        List of contact UUIDs\n    contact_external_refs : list of str, optional\n        List of contact external system references\n    active : bool, optional\n        Filter for active claims (default: True)\n    page : int, optional\n        Page number (default: 1)\n    page_size : int, optional\n        Number of records per page (default: 20)\n\n    Returns\n    -------\n    dict\n        Dictionary containing claims list\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contact_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "contact_external_refs": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "active": {
                    "type": "boolean"
                  },
                  "page": {
                    "type": "integer"
                  },
                  "page_size": {
                    "type": "integer"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claims/get_contacts_claims_count": {
      "post": {
        "summary": "get_contacts_claims_count",
        "tags": [
          "claims"
        ],
        "description": "Get claims count for given contact IDs or contact external references.\n\n    Parameters\n    ----------\n    contact_ids : list of str, optional\n        List of contact UUIDs\n    contact_external_refs : list of str, optional\n        List of contact external system references\n    active : bool, optional\n        Filter for active claims (default: True)\n\n    Returns\n    -------\n    dict\n        Dictionary containing claims count\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contact_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "contact_external_refs": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "active": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claims/list_claims_search_requests": {
      "post": {
        "summary": "list_claims_search_requests",
        "tags": [
          "claims"
        ],
        "description": "\n    Return persisted Claims Search request/response history for a claim.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claims/new_claim": {
      "post": {
        "summary": "new_claim",
        "tags": [
          "claims"
        ],
        "description": "Create new claim by claim number\n\n    Parameters\n    ----------\n    claim_number : str, required\n        the claim number\n    claim_number_origin : str\n        the claim number origin. refer to the enum for more details.\n    policy_number : str\n        the policy number\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list[str]\n        List of human-readable error messages\n    data: dict\n        UUID of the created or existing claim entry.\n        ::\n        {\n            \"id\": \"<uuid>\"\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "claim_number": {
                    "type": "string"
                  },
                  "claim_number_origin": {
                    "type": "string"
                  },
                  "policy_number": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claims/remove_claim": {
      "post": {
        "summary": "remove_claim",
        "tags": [
          "claims"
        ],
        "description": "Remove claim.\n\n    Parameters\n    ----------\n    claim_id : str, required\n        the claim id\n    hard_delete : bool\n        True if hard delete, False if soft delete\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "claim_id": {
                    "type": "string"
                  },
                  "hard_delete": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claims/request_claims_search": {
      "post": {
        "summary": "request_claims_search",
        "tags": [
          "claims"
        ],
        "description": "\n    Trigger a manual Claims Search request.\n\n    This endpoint initiates a search against the installed integration for prior-loss\n    matching. The request is sent to Tray.io, which handles communication.\n    Results are returned asynchronously via the store_claims_search callback.\n\n    Automatically determines submission type: if a successful Initial request\n    already exists for this claim, submits a Research request; otherwise\n    submits an Initial request.\n\n    Parameters\n    ----------\n    claim_id : str, required\n        UUID of the claim to search\n\n    Returns\n    -------\n    success : bool\n        True if the request was successfully scheduled\n    messages : list of str\n        Human-readable messages\n    data : dict\n        Response containing:\n        - request_id: UUID for tracking/correlation\n        - status: 'Scheduled' or 'Failed'\n        - message: Human-readable status message (optional)\n        - error_code: Error code if failed (optional)\n        - error_message: Error details if failed (optional)\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-request_claims_search"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-request_claims_search"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claims/retrieve_claim_change_logs": {
      "post": {
        "summary": "retrieve_claim_change_logs",
        "tags": [
          "claims"
        ],
        "description": "\n    Retrieve Claim Change Log entries.\n\n    Parameters\n    ----------\n    filter_by : str, required\n        The date field to filter by. One of the following:\n            'date_stamp' - The date the change was made (in CST timezone).\n            Supports time-based filtering if 'allow_timestamp' is set to True.\n            'date_cursor' - The calculated date in effect. This typically equals to the date_stamp, except that:\n                - It might be NULL when transaction=loss_date;\n                - It might be different from date_stamp when transaction=status and changed_to is 'Closed', reflecting\n            Does not support time-based filtering.\n    from_date : str, required\n        The start date of the search.\n        If allow_timestamp is True, includes the start time (format YYYY-mm-dd or YYYY-mm-dd HH:MM:SS)\n    to_date : str, required\n        The end date of the search.\n        If allow_timestamp is True, includes the end time (format YYYY-mm-dd or YYYY-mm-dd HH:MM:SS)\n    allow_timestamp : bool, optional\n        If True and 'filter_by' is set to 'date_stamp', the 'from_date' and 'to_date' arguments\n        will be treated as datetime with format 'YYYY-mm-dd HH:MM:SS'.\n        If False or not provided, or if 'filter_by' is 'date_cursor', the 'from_date' and 'to_date'\n        arguments will be treated as date with format 'YYYY-mm-dd'.\n    transactions : list of str, optional\n        Limit the search to the specified transactions. Possible values include:\n            {'policy', 'status', 'loss_date', 'loss_cause', 'loss_address', 'date_reported',\n            'adjuster', 'claimant', 'active', 'coverage',\n            'loss_reserve', 'adjustment_reserve', 'legal_reserve', 'claim_payment', 'transaction'}\n    policy_type_ids : list of str, optional\n        Limit the search to the specified policy types, based on the revision the claim is linked to.\n    claim_ids : list of str, optional\n        Limit the search to the specified claims\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    data : dict\n        Contains claim change log info\n    message : str\n        Human-readable messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "filter_by": {
                    "type": "string"
                  },
                  "from_date": {
                    "type": "string"
                  },
                  "to_date": {
                    "type": "string"
                  },
                  "allow_timestamp": {
                    "type": "boolean"
                  },
                  "transactions": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "policy_type_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "claim_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claims/retrieve_claim_payments": {
      "post": {
        "summary": "retrieve_claim_payments",
        "tags": [
          "claims"
        ],
        "description": "\n    Given a valid transaction_date_from and transaction_date_to, return all claim payments that\n    match the given parameters.\n\n    Parameters\n    ----------\n    policy_type_ids : list of str, optional\n        List of policy type ids to filter the claim payments.\n        The function will return only the claim payments that have a policy type id in this list.\n    transaction_date_from : str, required\n        The start date for the transaction date range.\n        The date should be in the format 'YYYY-mm-dd HH:MM:SS'.\n    transaction_date_to : str, required\n        The end date for the transaction date range.\n        The date should be in the format 'YYYY-mm-dd HH:MM:SS'.\n    exported : bool, optional\n        If provided, the function will return only the claim payments that have the exported flag set to this value.\n    voided : bool, optional\n        If provided, the function will return only the claim payments that have the voided flag set to this value.\n    historical : bool, optional\n        If provided, the function will return only the claim payments that have the historical flag set to this value.\n\n    Returns\n    -------\n    success : bool\n        True if the function executed successfully, false if there was an error.\n    messages : list of str\n        List of human-readable error messages. If the function executed successfully, this list will be empty.\n    data : list of dict\n        List of claim payment dictionaries, each containing all ClaimTransaction fields including:\n        - system_tags: list of formatted system tag objects with 'id', 'name', and 'value' keys\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-retrieve_claim_payments"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-retrieve_claim_payments"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claims/set_claim_loss_address": {
      "post": {
        "summary": "set_claim_loss_address",
        "tags": [
          "claims"
        ],
        "description": "Adds an address to a claim. This can be a property based address, or a non listed full address.\n\n    Parameters\n    ----------\n    claim_id : str, required\n        UUID of the claim to add address. Format: YYYY-MM-DD HH:MM:SS\n    property_address_id: str, optional. If passed, set the address of the passed property id.\n    address : dict, optional\n        dict containing address information.\n        Data available to be sent:\n            {\n                'addressLine1': 'sample', 'addressLine2':  'sample',\n                'addressCity': 'sample', 'addressState':  'MA',\n                'addressZip': '01569'\", 'addressCountyId': 'county UUID',\n                'addressLatitude': 80.2,'addressLongitude': 70.1\n            }\n    Raises\n    ------\n    not found\n        if claim is not found\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    data : json\n        The updated claim\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "claim_id": {
                    "type": "string"
                  },
                  "property_address_id": {
                    "type": "string"
                  },
                  "address": {
                    "type": "object"
                  },
                  "Raises": {
                    "type": "string"
                  },
                  "------": {
                    "type": "string"
                  },
                  "not found": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claims/store_claims_search": {
      "post": {
        "summary": "store_claims_search",
        "tags": [
          "claims"
        ],
        "description": "\n    Callback endpoint for receiving Claims Search results from Tray.io.\n\n    This endpoint receives asynchronous results from the Tray.io workflow\n    after Claims Search has processed the request. Results include\n    prior-loss matches that can be used for fraud detection.\n\n    Note: Phase 1 - Results are logged but not persisted to database.\n    Persistence will be added in Phase 3.\n\n    Parameters\n    ----------\n    result : dict\n        Callback data from Tray.io containing:\n        - request_id: Correlation ID (matches original request)\n        - status: 'Success', 'Failed', or 'Timeout'\n        - vendor_reference_id: Claims Search file number (optional)\n        - matches: List of prior-loss match records (optional)\n        - error_code: Error code if failed (optional)\n        - error_message: Error details if failed (optional)\n\n    Returns\n    -------\n    success : bool\n        True if callback was processed successfully\n    messages : list of str\n        Human-readable messages\n    data : dict\n        Processing result with status and match count\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-store_claims_search"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-store_claims_search"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claims/trigger_scheduled_claims_research": {
      "post": {
        "summary": "trigger_scheduled_claims_research",
        "tags": [
          "claims"
        ],
        "description": "\n    Find claims eligible for scheduled ISO ClaimSearch re-search, create\n    request records, and dispatch celery tasks to execute each one.\n\n    Called by Tray.io on a schedule.\n\n    Parameters\n    ----------\n    integration_instance_id : str\n        External ID of the integration instance as known by Tray.io (required)\n    research_interval_days : int\n        Minimum days since last successful search (required)\n\n    Returns\n    -------\n    success : bool\n    data : dict\n        triggered: int - number of research requests dispatched\n        claims: list[dict] - {request_id, claim_id, claim_number} per request\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-trigger_scheduled_claims_research"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-trigger_scheduled_claims_research"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claims/update_claim": {
      "post": {
        "summary": "update_claim",
        "tags": [
          "claims"
        ],
        "description": "Updates various fields on a claim.\n\n    Parameters\n    ----------\n    claim_id : UUID, required\n        UUID of the Claim\n    status : str\n        Status of the claim, Example: `Open, Subrogation`, `Open, Salvage` etc\n    perils : list\n        List of peril UUIDs\n    catastrophe_id : UUID\n        UUID of the Catastrophe\n    coverages : list\n        List of coverages UUIDs\n\n    Raises\n    ------\n    standard_error\n        If claim_id is missing\n        If claim_id is invalid\n        If catastrophe_id is invalid\n        If coverages has non zero reserve amounts\n        If coverages has a payment has been applied against it\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list\n        List of human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "claim_id": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string"
                  },
                  "perils": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "catastrophe_id": {
                    "type": "string"
                  },
                  "coverages": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claims/update_claim_date": {
      "post": {
        "summary": "update_claim_date",
        "tags": [
          "claims"
        ],
        "description": "Update a claim date\n\n    Parameters\n    ----------\n    claim_id : str, required\n        the claim id\n    claim_date_id : str, required\n        the claim date id\n    claim_date_type : str, required\n        the claim date type\n    claim_date : str, required\n        the claim date (format: YYYY-mm-dd)\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list[str]\n        List of human-readable error messages\n    data: dict\n        The claim date.\n        ::\n        {\n            \"dateId\": \"<uuid>\",\n            \"type\": \"<claim-date-type>\",\n            \"dateString\": \"<mm/dd/YYYY>\",\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "claim_id": {
                    "type": "string"
                  },
                  "claim_date_id": {
                    "type": "string"
                  },
                  "claim_date_type": {
                    "type": "string"
                  },
                  "claim_date": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/claims/validate_claims_search": {
      "post": {
        "summary": "validate_claims_search",
        "tags": [
          "claims"
        ],
        "description": "\n    Validate claim data for ClaimSearch submission without sending a request.\n\n    Builds the request payload and runs business-rule and schema validation,\n    returning any errors found. Use this endpoint to show the user what data\n    is missing before they attempt a manual search.\n\n    Parameters\n    ----------\n    claim_id : str, required\n        UUID of the claim to validate\n\n    Returns\n    -------\n    success : bool\n        True if the request was processed (even if validation errors exist)\n    data : dict\n        - valid: bool - True if the claim passes all validation rules\n        - errors: list of str - human-readable validation messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "claim_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/commissions/batch_export_payments": {
      "post": {
        "summary": "batch_export_payments",
        "tags": [
          "commissions"
        ],
        "description": "\n    Mark multiple commission payments as exported with timestamp.\n\n    Permission (BC-22436): commission export is a money-moving action -- when an\n    active ACH_ISSUANCE instance is configured it creates disbursement attempts\n    and dispatches ACH issuance through the engine. Guard it with the same\n    resources that expose the export UI (the pending-commission-payments and\n    agency-commissions surfaces); a user needs `rw` on EITHER to export.\n\n    Args:\n        commission_payment_ids (Union[list, str]): List of commission payment IDs or \"all\"\n        is_electronic_payment (bool): Optional filter for electronic vs manual payments\n        commission_month (str): Optional YYYY-MM filter (only used when\n            commission_payment_ids == \"all\"; scopes \"Process All Eligible\" to the\n            operator's filtered grid view).\n        status (str): Optional status filter (\"all\" export only).\n        search (dict): Optional {type, value} search filter (\"all\" export only).\n\n    Returns:\n        dict: Operation result with the total number of payments processed, the\n            number the funding gate blocked, the number left in the queue\n            unissued (``total_deferred``) and the operator-facing reasons for\n            those (``messages``) -- an export that issues nothing is a success\n            response, so the UI needs the reasons to avoid reporting it as a\n            completed payment run (BC-25115).\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-batch_export_payments"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-batch_export_payments"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/commissions/batch_review_payments": {
      "post": {
        "summary": "batch_review_payments",
        "tags": [
          "commissions"
        ],
        "description": "\n    Mark multiple commission payments as reviewed with timestamp.\n\n    Args:\n        commission_payment_ids (list): List of commission payment ID strings\n\n    Returns:\n        dict: Operation results containing success/failure counts and details.\n        Data includes total_processed, total_succeeded, and total_failed counts.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/commissions/batch_update_payment_methods": {
      "post": {
        "summary": "batch_update_payment_methods",
        "tags": [
          "commissions"
        ],
        "description": "\n    Update payment method for multiple commission payments.\n\n    Args:\n        payments (list): List of payment dictionaries with keys:\n            - commission_payment_id (str): ID of the commission payment\n            - is_electronic_payment (bool): Payment method type\n\n    Returns:\n        dict: Operation results containing success/failure counts and details.\n        Data includes total_processed, total_succeeded, and total_failed counts.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/commissions/create_adjustment": {
      "post": {
        "summary": "create_adjustment",
        "tags": [
          "commissions"
        ],
        "description": "\n    Create a single commission accounting adjustment.\n\n    Supports two shapes (BC-23072):\n    - source-ful: pass ``source_accounting_id`` to copy from an existing\n      accounting record (existing behavior).\n    - source-less: omit ``source_accounting_id`` and instead supply\n      ``agency_id`` + ``agent_id`` + ``adjustment_amount`` + ``period_start`` /\n      ``period_end`` + a non-blank ``adjustment_reason`` (``reason_code``\n      optional) for an agency-level commission chargeback.\n\n    Permission (BC-23072): the source-less shape books money against a\n    caller-supplied agency/agent, so the endpoint requires `rw` on EITHER\n    `britecore/policies/pendingCommissionPayments` or\n    `britecore/policies/agency-commissions` -- the same resource pair that\n    guards the sibling batch_export_payments commission write surface.\n\n    Args:\n        source_accounting_id (str): ID of the source accounting record to copy from\n        adjustment_reason (str): Reason for the adjustment, stored in\n            commission_accounting.why; REQUIRED for a source-less adjustment\n            (must be non-blank and at most 150 characters, measured on the\n            submitted value and rejected rather than truncated when longer),\n            optional on the source-ful path\n        adjustment_amount (float): Amount of the adjustment\n        reason_code (str): Quick-code reason (COMMISSION_ADJUSTMENT_REASONS) to stamp;\n            optional (defaults to the quick-code default on the source-less path)\n        agency_id (str): Agency (payee); REQUIRED for a source-less adjustment,\n            ignored on the source-ful path\n        agent_id (str): Agent; REQUIRED for a source-less adjustment,\n            ignored on the source-ful path\n        period_start (str): Period start (ISO datetime); REQUIRED for a source-less adjustment\n        period_end (str): Period end (ISO datetime); REQUIRED for a source-less\n            adjustment. Snapped to the END OF ITS MONTH (last day, 23:59:59) and\n            the snapped value is stored as the row's transaction date. The month\n            is chosen AFTER conversion to America/Chicago, so a UTC instant just\n            past midnight on the 1st (e.g. 2026-08-01T00:00:00Z) lands in the\n            PREVIOUS month (July 31, not August 31).\n\n    Returns:\n        dict: Operation results containing adjustment details.\n        If new commission payments are created due to policy calculation,\n        data will also include 'new_payment_ids' list.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-create_adjustment"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-create_adjustment"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/commissions/delete_batch_payments": {
      "post": {
        "summary": "delete_batch_payments",
        "tags": [
          "commissions"
        ],
        "description": "Deletes commission payments in batch\n\n    Parameters\n    ----------\n    payment_ids : list\n        BriteCore commission_payment id UUIDs\n\n    Returns\n    -------\n    success : bool\n        True if completely successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "payment_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/commissions/delete_payment": {
      "post": {
        "summary": "delete_payment",
        "tags": [
          "commissions"
        ],
        "description": "Deletes single commission payment\n\n    Parameters\n    ----------\n    payment_id : str, required\n        A BriteCore commission_payment id UUID\n\n    Returns\n    -------\n    success : bool\n        True if completely successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "payment_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/commissions/download_commission_report": {
      "post": {
        "summary": "download_commission_report",
        "tags": [
          "commissions"
        ],
        "description": "\n    Download commission PDF reports for agencies and agency groups.\n\n    Automatically rebuilds any reports that are determined to be out of date\n    before delivering them to the user. For agency group contacts, retrieves\n    reports for all agencies in the group.\n\n    Parameters\n    ----------\n    contacts : list, required\n        List of dictionaries each containing an 'id' and a 'role' key.\n        Role must be either 'agency' or 'agency_group'.\n        Example: [{\"id\": 123, \"role\": \"agency\"}, {\"id\": 456, \"role\": \"agency_group\"}]\n    report : str, required\n        Type of report to retrieve. Must be 'standard' or 'negative'.\n        'standard' requires year and month parameters.\n        'negative' uses current date automatically.\n    year : str, optional\n        Required for 'standard' reports only. The year for which the report was generated.\n        Example: \"2024\"\n    month : str, optional\n        Required for 'standard' reports only. The month for which the report was generated.\n        Must be full month name (e.g., \"January\", \"February\", etc.)\n\n    Returns\n    -------\n    dict\n        Response with success status and delivery information.\n        For download method: includes download URL.\n        For email method: includes success confirmation message.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contacts": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "report": {
                    "type": "string"
                  },
                  "year": {
                    "type": "string"
                  },
                  "month": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/commissions/download_commission_report_via_email": {
      "post": {
        "summary": "download_commission_report_via_email",
        "tags": [
          "commissions"
        ],
        "description": "\n    Zip commission PDF reports and email a presigned download link to the admin.\n\n    Args:\n        payload (dict)\n    Returns:\n        dict: Response with success status and queued confirmation message.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/commissions/email_commission_report": {
      "post": {
        "summary": "email_commission_report",
        "tags": [
          "commissions"
        ],
        "description": "\n    Email commission PDF reports for agencies and agency groups.\n\n    Args:\n        payload (dict)\n    Returns:\n        dict: Operation results containing email confirmation.\n        Response with success status and email confirmation message.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/commissions/get_commission_accounting_entries": {
      "post": {
        "summary": "get_commission_accounting_entries",
        "tags": [
          "commissions"
        ],
        "description": "\n    Get commission accounting entries with optional filtering.\n\n    Args:\n        agent_id (str): Optional agent ID filter\n        policy_id (str): Optional policy ID filter\n        item_id: Optional item ID filter (can be None or NOT_PROVIDED)\n        commission_payment_id (str): Optional commission payment ID filter\n        page (int): Optional page number for pagination (default: 1)\n        page_size (int): Optional page size for pagination (default: 25)\n\n    Returns:\n        dict: Commission accounting entries data with pagination and totals\n\n    Special item_id handling:\n        - If item_id is not provided: no filtering on item_id\n        - If item_id is provided as null: filter for records where item_id IS NULL\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/commissions/get_commission_payees": {
      "post": {
        "summary": "get_commission_payees",
        "tags": [
          "commissions"
        ],
        "description": "Retrieves a list of payees agency numbers\n\n    Returns\n    -------\n    success : bool\n        True if completely successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : list of str\n        Contains agency numbers of valid commission payees\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/commissions/get_commission_payment_composition": {
      "post": {
        "summary": "get_commission_payment_composition",
        "tags": [
          "commissions"
        ],
        "description": "\n    Get commission payment composition aggregated by agent_id, policy_id, and item_id.\n\n    Args:\n        commission_payment_id (str): Optional commission payment ID filter\n        agency_id (str): Optional agency ID filter\n        filters (dict): Optional additional filters\n        page (int): Optional page number for pagination (default: 1)\n        page_size (int): Optional page size for pagination (default: 25)\n\n    Returns:\n        dict: Commission payment composition data with agencies and aggregated entries\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/commissions/get_commission_payments": {
      "post": {
        "summary": "get_commission_payments",
        "tags": [
          "commissions"
        ],
        "description": "\n    Get commission payments with filtering and pagination.\n\n    Args:\n        commission_month (str): Filter by commission month in YYYY-MM format\n        status (str): Filter by status - 'pending', 'reviewed', or 'exported'\n        is_electronic_payment (bool): Filter by electronic payment flag\n        search (dict): Search parameters with 'type' and 'value' keys\n        page (int): Page number for pagination (default: 1)\n        page_size (int): Number of items per page (default: 20)\n\n    Returns:\n        dict: Commission payments data with pagination and summary\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/commissions/get_delayed_commission_accounting_entries": {
      "post": {
        "summary": "get_delayed_commission_accounting_entries",
        "tags": [
          "commissions"
        ],
        "description": "\n    Get detailed delayed commission accounting entries (with commission_payment_id=NULL).\n\n    Returns:\n        dict: Detailed delayed commission entries including:\n            - entries: List of delayed commission accounting entries\n            - total_entries: Total count of delayed entries\n            - total_commissionable_amount: Sum of all commissionable amounts\n            - total_amount_to_be_paid: Sum of all amounts to be paid\n            - inserted_by_contacts: Contact identifiers for inserted_by fields\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_delayed_commission_accounting_entries"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_delayed_commission_accounting_entries"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/commissions/get_delayed_commission_entries_summary": {
      "post": {
        "summary": "get_delayed_commission_entries_summary",
        "tags": [
          "commissions"
        ],
        "description": "\n    Get summary of delayed commission accounting entries (with commission_payment_id=NULL).\n\n    Returns:\n        dict: Summary of delayed commission entries including:\n            - total_entries: Total count of delayed entries\n            - delayed_breakdown: Count by delayed column value\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/commissions/get_payment": {
      "post": {
        "summary": "get_payment",
        "tags": [
          "commissions"
        ],
        "description": "Gets a commission payment record.\n\n    Parameters\n    ----------\n    commission_payment_id : str, required\n        A BriteCore commission_payment id UUID\n\n    Returns\n    -------\n    success : bool\n        True if completely successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        A dict containing the following data representation. ::\n            {\n                commission_payments.pay_amount (DECIMAL)\n                commission_payments.date_updated (TIMESTAMP)\n                commission_payments.is_electronic_payment (BOOLEAN)\n                commission_payments.payee_id (CHAR(36))\n                commission_payments.reviewed (BOOLEAN)\n                commission_payments.date_reviewed (DATETIME)\n                commission_payments.transaction_date (DATETIME)\n                commission_payments.exported (BOOLEAN)\n                commission_payments.date_added (DATETIME)\n                commission_payments.date_exported (DATETIME)\n                commission_payments.id (CHAR(36))\n                commission_payments.payment_method_id (CHAR(36))\n                commission_payments.check_number (INT, nullable)\n                commission_payments.check_date (DATETIME, nullable)\n                commission_payments.cleared_date (DATETIME, nullable)\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_payment"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_payment"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/commissions/get_regenerate_statements_status": {
      "post": {
        "summary": "get_regenerate_statements_status",
        "tags": [
          "commissions"
        ],
        "description": "\n    Poll the status of an async commission statements regeneration job\n    started via ``regenerate_statements``. Identified by the target\n    report month, which is all the server needs -- the reference_id\n    that ``regenerate_statements`` returns is a deterministic hash of\n    the month, so exposing it on the poll endpoint would be redundant\n    (and an extra piece of client-side state to manage across page\n    reloads).\n\n    Args:\n        year (int, optional): See ``regenerate_statements``. Must be\n            supplied together with ``month``.\n        month (int, optional): See ``regenerate_statements``. Must be\n            supplied together with ``year``.\n\n        When both ``year`` and ``month`` are omitted, defaults to the\n        month immediately preceding the current month -- the natural\n        \"what's running right now for the normal use case?\" query used\n        by the page-refresh recovery path.\n\n    Returns:\n        dict: ``{'success': bool, 'async_status': str, 'async_result': any,\n                 'reference_id': <uuid>, 'year': int, 'month': int}``.\n            ``async_status`` is one of ``'in_progress'``, ``'success'``,\n            ``'failure'``, or ``'not_found'``. ``success`` is ``False``\n            only when the job reached a terminal failure state. The\n            echoed ``year`` / ``month`` let the caller preserve the\n            resolved month across the start-then-poll handoff -- this\n            prevents a month-rollover race for clicks that land\n            seconds before midnight on the last day of the month.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_regenerate_statements_status"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_regenerate_statements_status"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/commissions/get_unexported_commissions": {
      "post": {
        "summary": "get_unexported_commissions",
        "tags": [
          "commissions"
        ],
        "description": "\n    Retrieve all commissions that are not exported\n\n    Parameters\n    ----------\n\n    Returns\n    -------\n    success : bool\n    data : a list of dicts\n    {\n      \"pay_amount\": decimal,\n      \"payment_method\": {\n        \"address_line2\": str,\n        \"masked_routing\": str,\n        \"address_line1\": str,\n        \"vendor\": str,\n        \"address_city\": str,\n        \"masked_number\": str,\n        \"name_on_account\": str,\n        \"account_description\": str,\n        \"method\": str,\n        \"address_state\": str,\n        \"account_type\": str,\n        \"address_country\": str,\n        \"account_name\": str,\n        \"address_zip\": str\n      },\n      \"id\": str,\n      \"payee\": {\n        \"phones\": [\n          {\n            \"phone\": str,\n            \"type\": str\n          }\n        ],\n        \"producer_number\": str,\n        \"agency_number\": str,\n        \"agency_group_number\": str,\n        \"confirmation_email\": str,\n        \"addresses\": [\n          {\n            \"address_line2\": str,\n            \"address_city\": str,\n            \"address_line1\": str,\n            \"type\": str,\n            \"address_state\": str,\n            \"address_country\": str,\n            \"address_zip\": str\n          }\n        ],\n        \"name\": str\n      },\n      \"transaction_date\": datetime,\n      \"composition\": [\n        {\n          \"commission_rate\": decimal,\n          \"commissionable_amount\": decimal,\n          \"amount_to_be_paid\": decimal,\n          \"policy\": {\n            \"policy_number_normalized\": str,\n            \"policy_number\": str\n          },\n          \"revision\": {\n            \"policy_status\": str,\n            \"primary_property\": {\n              \"address_line2\": str,\n              \"address_city\": str,\n              \"address_line1\": str,\n              \"name\": str,\n              \"address_state\": str,\n              \"address_country\": str,\n              \"address_zip\": str\n            },\n            \"revision_state\": str\n          }\n        }\n      ]\n    }\n    messages : list\n        empty\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/commissions/regenerate_statements": {
      "post": {
        "summary": "regenerate_statements",
        "tags": [
          "commissions"
        ],
        "description": "\n    Asynchronously regenerate all monthly commission statements for the\n    specified month. Replaces the synchronous\n    ``/gateway?file=policies.commissions&method=reRunCommissionStatements``\n    call made by the *Regenerate Statement* button on\n    *Policies > Payments > Pending Commission Payments*, which blocks the\n    HTTP worker for the full duration of every agency's PDF render and is\n    prone to timeouts on carriers with hundreds of agencies.\n\n    The heavy work runs in a Celery task\n    (``RegenerateCommissionStatementsAsyncView``). The caller receives a\n    ``reference_id`` immediately and polls ``get_regenerate_statements_status``\n    to drive the UI. Repeat clicks for the same month collapse onto the\n    same in-flight BackgroundJob row rather than queueing duplicates.\n\n    Args:\n        year (int, optional): Four-digit calendar year of the report\n            month (e.g. ``2026``). Must be supplied together with\n            ``month``.\n        month (int, optional): Calendar month of the report\n            month, 1-12. Must be supplied together with ``year``.\n\n        When both ``year`` and ``month`` are omitted, defaults to the\n        month immediately preceding the current month (the normal\n        \"regenerate last month's statements\" flow).\n\n    Returns:\n        dict: ``{'success': True, 'async_status': 'in_progress',\n                 'async_result': None, 'reference_id': <uuid>,\n                 'year': int, 'month': int}``.\n            The ``reference_id`` is a deterministic UUID derived from the\n            report month so it is stable across retries and page reloads;\n            it surfaces in logs / Datadog / the BackgroundJob row and is\n            useful for support investigations but not required for\n            polling (the status endpoint identifies the job by\n            ``year`` + ``month``). The echoed ``year`` / ``month`` let\n            the caller preserve the resolved month across the start-then-\n            poll handoff even around month-rollover boundaries.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-regenerate_statements"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-regenerate_statements"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/commissions/save_batch_payments": {
      "post": {
        "summary": "save_batch_payments",
        "tags": [
          "commissions"
        ],
        "description": "Saves commission payments in batch\n\n    Parameters\n    ----------\n    payments : list\n        A list of dicts with the keys ``agency_number`` and ``amount``.\n\n        ``agency_number`` should correspond with a single BriteCore agency.\n\n        ``amount`` should be a decimal representation of a monetary amount to be paid.\n\n    Returns\n    -------\n    success : bool\n        True if completely successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : list of dict\n        Contains important information about the inserted records.\n        ::\n\n            {\n                'commission_payment_id': commission_payment.id,\n                'payment_method_id': commission_payment.payment_method_id,\n                'agency_id': commission_payment.payee_id,\n                'amount': commission_payment.pay_amount\n            }\n\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "payments": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/commissions/save_batch_payments_csv": {
      "post": {
        "summary": "save_batch_payments_csv",
        "tags": [
          "commissions"
        ],
        "description": "Saves commission payments in batch\n\n    Parameters\n    ----------\n    data : str, required\n        A string representation of a csv file. Entries should map agency_number\n        to a respective amount used to create a commission payment record.\n        Agency numbers can appear more than once on the input csv, and must\n        refer to one and only one contact (i.e. an agency number cannot be used\n        on the csv if two contacts can be reached by this number). Any value\n        convertible to a python float is acceptable., including 0.\n\n        Example 1 (with csv header row):\n            agency_number,amount\n            T34514,11207.12\n            T34515,15000.00\n            T34516,12120.55\n            T34514,720.00\n            T34516,720.00\n\n        Example 2 (without csv header row):\n            A0001,0.00\n            A0002,14.00\n\n    Returns\n    -------\n    success : bool\n        True if completely successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : list of dict\n        Contains important information about the inserted records.\n        ::\n\n            {\n                'commission_payment_id': commission_payment.id,\n                'payment_method_id': commission_payment.payment_method_id,\n                'agency_id': commission_payment.payee_id,\n                'amount': commission_payment.pay_amount\n            }\n\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/commissions/save_payment": {
      "post": {
        "summary": "save_payment",
        "tags": [
          "commissions"
        ],
        "description": "Saves commission payment\n\n    Parameters\n    ----------\n    agency_number : str\n        A BriteCore agency contact id UUID\n    amount : decimal\n        Should be a decimal representation of a monetary amount to be paid\n\n    Returns\n    -------\n    success : bool\n        True if completely successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data: list of dict\n        Contains important information about the inserted record. ::\n\n            {\n                'commission_payment_id': commission_payment.id,\n                'payment_method_id': commission_payment.payment_method_id,\n                'agency_number': commission_payment.payee_id,\n                'amount': commission_payment.pay_amount\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "agency_number": {
                    "type": "string"
                  },
                  "amount": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/commissions/update_commission_payments_complete": {
      "post": {
        "summary": "update_commission_payments_complete",
        "tags": [
          "commissions"
        ],
        "description": "Clear a select list of payments from the commission queue\n\n    Parameters\n    ----------\n    commission_payment_ids : list, required\n        Pass a list of CommissionPayment IDs. These CommissionPayments will be marked as\n        exported and reviewed\n\n    Returns\n    -------\n    success : bool\n        True if completely successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "commission_payment_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/commissions/write_off_agency_commissions": {
      "post": {
        "summary": "write_off_agency_commissions",
        "tags": [
          "commissions"
        ],
        "description": "\n    Write off all delayed negative commission accounting entries for an entire agency.\n    Creates one offsetting entry per policy (aggregating amounts across items).\n\n    This API addresses delayed commission entries by agency. It:\n    1. Finds all entries with delayed='neg_amt' and comm_pay_id=NULL for the agency\n    2. Groups entries by policy\n    3. Creates one offsetting commission accounting entry per policy (aggregated)\n    4. Creates a single $0 commission payment for the entire agency write-off\n    5. Links all entries to the commission payment\n    6. Updates all entries' delayed status to 'not_delayed'\n    7. Records the write-off reason on all entries\n\n    Args:\n        agency_id (str): The agency ID to write off all negative entries for\n        write_off_reason (str): The reason for write-off:\n            - 'collected_from_agency': Balance was collected from the agency\n            - 'forgiven': Balance was forgiven/written off\n        why (str): User-provided description/reason for the write-off (stored in commission_accounting.why)\n\n    Returns:\n        dict: Write-off result with agency info, payment ID, totals, and per-policy results\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-write_off_agency_commissions"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-write_off_agency_commissions"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/configurations/create_custom_error_code": {
      "post": {
        "summary": "create_custom_error_code",
        "tags": [
          "configurations"
        ],
        "description": "\n    Create a new custom error code.\n\n    Parameters\n    ----------\n    custom_error_code : dict\n        The custom error code to create\n\n    Returns\n    -------\n    dict\n        Created error code with the form:\n        {\n            'id': str,\n            'module': str,\n            'code': str,\n            'description': str\n        }\n\n    Raises\n    ------\n    ValidationError\n        If validation fails or code already exists for the type\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-create_custom_error_code"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/configurations/delete_custom_error_code": {
      "post": {
        "summary": "delete_custom_error_code",
        "tags": [
          "configurations"
        ],
        "description": "\n    Delete a custom error code.\n\n    Parameters\n    ----------\n    id : str\n        The error code ID to delete\n\n    Returns\n    -------\n    dict\n        Success response with the form:\n        {\n            'success': True,\n            'message': str\n        }\n\n    Raises\n    ------\n    NotFound\n        If the custom error code doesn't exist\n    ValidationError\n        If validation fails or the error code is in use\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-delete_custom_error_code"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/configurations/list_custom_error_codes": {
      "post": {
        "summary": "list_custom_error_codes",
        "tags": [
          "configurations"
        ],
        "description": "\n    Retrieve all error codes or filter by type.\n\n    Parameters\n    ----------\n    module : str, optional\n        Filter error codes by module (e.g., 'stp')\n\n    Returns\n    -------\n    list of dict\n        List of error codes with the form:\n        [\n            {\n                'id': str,\n                'module': str,\n                'code': str,\n                'description': str\n            }\n        ]\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-list_custom_error_codes"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/configurations/update_custom_error_code": {
      "post": {
        "summary": "update_custom_error_code",
        "tags": [
          "configurations"
        ],
        "description": "\n    Update an existing error code.\n\n    Parameters\n    ----------\n    custom_error_code : dict\n        The custom error code to update\n\n    Returns\n    -------\n    dict\n        Updated error code with the form:\n        {\n            'id': str,\n            'module': str,\n            'code': str,\n            'description': str\n        }\n\n    Raises\n    ------\n    NotFound\n        If the error code doesn't exist\n    ValidationError\n        If validation fails\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-update_custom_error_code"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/add_contact_to_role": {
      "post": {
        "summary": "add_contact_to_role",
        "tags": [
          "contacts"
        ],
        "description": "Adds a specified contact to the given role.\n\n    Parameters\n    ----------\n    contact_id : str\n        UUID of the contact\n    role_name : str\n        Role name to be associated with the contact\n\n    Returns\n    -------\n    success : bool\n        Whether or not the role could appropriately be applied to the contact\n    messages : list\n        List of human-readable error messages\n    data : dict\n        Object with the following format.\n        ::\n\n            {\n                \"contact_id\": \"\",\n                \"role_id\": \"\",\n                \"role_name\": \"\"\n            }\n\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-add_contact_to_role"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-add_contact_to_role"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/add_member_to_agency": {
      "post": {
        "summary": "add_member_to_agency",
        "tags": [
          "contacts"
        ],
        "description": "Method to add agents to an agency\n\n    Parameters\n    ----------\n    member_id : str\n        Required. contact id of Agent\n    agency_id : str\n        Required. contact id of Agency\n    set_member_company: bool\n        Optional. If true, set Agent's company field as the Agency as well. Default to false.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list or str\n        List of human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "member_id": {
                    "type": "string"
                  },
                  "agency_id": {
                    "type": "string"
                  },
                  "set_member_company": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/assign_policy_contact": {
      "post": {
        "summary": "assign_policy_contact",
        "tags": [
          "contacts"
        ],
        "description": "assign_policy_contact",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-assign_policy_contact"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-assign_policy_contact"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/assign_quote_contact": {
      "post": {
        "summary": "assign_quote_contact",
        "tags": [
          "contacts"
        ],
        "description": "assign_quote_contact",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-assign_quote_contact"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-assign_quote_contact"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/assign_risk_contact": {
      "post": {
        "summary": "assign_risk_contact",
        "tags": [
          "contacts"
        ],
        "description": "assign_risk_contact",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-assign_risk_contact"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-assign_risk_contact"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/check_username_availability": {
      "post": {
        "summary": "check_username_availability",
        "tags": [
          "contacts"
        ],
        "description": "Return true if the requested username is not taken by any contact.\n\n    Parameters\n    ----------\n    username : str\n        Required.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data: dict containing availability status\n        {\n            available: bool\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "username": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/create_adjuster_license": {
      "post": {
        "summary": "create_adjuster_license",
        "tags": [
          "contacts"
        ],
        "description": "Create a new adjuster license record.\n\n    Parameters\n    ----------\n    contact_id : str\n        UUID of the contact\n    business_location_id : str\n        UUID of the business location (state)\n    license_number : str\n        License number (max 64 characters)\n    effective_date : str, optional\n        Effective date in YYYY-MM-DD format\n    expiration_date : str, optional\n        Expiration date in YYYY-MM-DD format\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        Created license record\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-create_adjuster_license"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-create_adjuster_license"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/create_contact": {
      "post": {
        "summary": "create_contact",
        "tags": [
          "contacts"
        ],
        "description": "\n    Creates a new contact.\n\n    The input and output formats of this function are defined by the JSON schemas\n    located at 'lib/api/api_specs/request-create_contact.json' and\n    'lib/api/api_specs/response-create_contact.json', respectively.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-create_contact"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-create_contact"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/create_credit_report_for_contact": {
      "post": {
        "summary": "create_credit_report_for_contact",
        "tags": [
          "contacts"
        ],
        "description": "Get the current credit report for a given contact\n\n    Parameters\n    ----------\n    contact_id : UUID\n        Required. Id of the contact\n    policy_type_id : UUID\n        Optional. Specify the Policy Type currently quoted.\n        If not provided, defaults to the Policy Type of one of the contact's active Policies.\n        If not available, the integration point may not run.\n    revision_id : UUID\n        Optional. The quote/revision the report is being pulled for. When the contact\n        is a named insured or additional interest on a live revision, that revision\n        decides which agency the vendor bills (BC-18273);\n        a revision that fails that check is UNRESOLVED_AGENCY so billing stops at\n        the carrier rather than falling through to the session. Callers without a\n        quote context (for example the generic contacts screen) omit it and billing\n        does not use a revision.\n    policy_id : UUID\n        Optional. The policy that revision belongs to. The wizard sends it so a\n        revision from another policy the same contact sits on cannot decide\n        billing. Same bind Policy Setup uses. Omit it when there is no policy\n        in context.\n\n    Returns\n    -------\n    data: A dictionary with credit report, if successfully created. Fields may be null.\n        ::\n\n            {\n                'id': UUID,\n                'contact_id': UUID,\n                'content': str,\n                'date_added': date,\n                'report_number': str,\n                'score': str,\n                'warning': str,\n                'error': bool,\n                'vendor_id': UUID\n            }\n\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contact_id": {
                    "type": "string"
                  },
                  "policy_type_id": {
                    "type": "string"
                  },
                  "revision_id": {
                    "type": "string"
                  },
                  "policy_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/credit_score_threshold_details": {
      "post": {
        "summary": "credit_score_threshold_details",
        "tags": [
          "contacts"
        ],
        "description": "Get the credit score threshold data on contacts that have existing credit reports\n\n    Parameters\n    -----------\n    contact_ids : list\n        Required. List of contact ids to validate credit score reports on.\n    ref_contact_id : str\n        Required. UUID of the associate contact assigned with a limited score allowed\n\n    Returns\n    --------\n    success: bool\n        True if successful, false if not\n    messages: list of str:\n        List of human-readable error messages\n    data : dict\n        Object with threshold information\n        ::\n\n            {\n                \"success\" : bool\n                    True if all the given contacts pass the threshold\n                \"warnings\": list\n                    A list of dictionaries consisting of `message` and `contact_id`\n                    [{\n                        \"message\" : str\n                            Failure message\n                        \"contact_id\" : uuid\n                            Contact ID\n                    }]\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contact_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "ref_contact_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/delete_adjuster_license": {
      "post": {
        "summary": "delete_adjuster_license",
        "tags": [
          "contacts"
        ],
        "description": "Delete an adjuster license record.\n\n    Parameters\n    ----------\n    license_id : str\n        UUID of the license to delete\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-delete_adjuster_license"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-delete_adjuster_license"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/enable_or_disable_contact": {
      "post": {
        "summary": "enable_or_disable_contact",
        "tags": [
          "contacts"
        ],
        "description": "Enable or disable contact by archiving/un-archiving based on active flag.\n\n    Parameters\n    ----------\n    contact_id : UUID\n        Required. ID of the contact\n    active : bool\n        Optional. False by default. Flag to update contact active column accordingly\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    message : list of str\n        List of human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contact_id": {
                    "type": "string"
                  },
                  "active": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/find_contact_by_params": {
      "post": {
        "summary": "find_contact_by_params",
        "tags": [
          "contacts"
        ],
        "description": "Find insured using given params\n\n    Parameters\n    ----------\n    name : str\n        Optional. Contact name (full or partial). If not provided, searches all contacts\n    role_name : str\n        One of contact's roles (optional param, if None passed - won't filter)\n    dob : str\n        Contact's DOB. Format is mm/dd/yyyy  (optional param, if None passed - won't filter)\n    exclude_roles : list of str\n        Optional. List of role names to exclude from results\n    exclude_empty_usernames : bool\n        Optional. If True, excludes contacts with empty usernames\n    requires_login_information : bool\n        Optional. If True, only returns contacts whose roles have loginInformation aspect\n    page_size : int\n        Optional. Maximum number of results to return (default: no limit)\n    use_database_search : bool\n        Optional. If True, uses direct database LIKE query instead of ElasticSearch (default: False)\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : list of dict\n        List of contacts that meet search criteria\n        ::\n            [{\n                \"ssn_exist\": true,\n                \"name\": \"John Doe\",\n                \"roles\": [\n                    \"Insured Portal User\",\n                    \"Named Insured\"\n                ],\n                \"phones\": [\n                    {\n                        \"date_updated\": \"2018-10-08 02:35:57\",\n                        \"phone\": \"(111) 111-1111\",\n                        \"type\": \"Home\",\n                        \"id\": \"14aef33b-9fff-4b27-b139-d8d9dcd93c07\",\n                        \"contact_id\": \"02a40e00-c72c-4fef-be3c-c46bc71910df\"\n                    }\n                ],\n                \"emails\": [\n                    {\n                        \"date_updated\": \"2018-10-04 03:09:41\",\n                        \"type\": \"Home\",\n                        \"id\": \"da79df01-0bf1-464a-8a1c-61226823ca12\",\n                        \"contact_id\": \"02a40e00-c72c-4fef-be3c-c46bc71910df\",\n                        \"email\": \"a@a.com\"\n                    }\n                ],\n                \"id\": \"02a40e00-c72c-4fef-be3c-c46bc71910df\"\n            }]\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-find_contact_by_params"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-find_contact_by_params"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/generate_contact_number": {
      "post": {
        "summary": "generate_contact_number",
        "tags": [
          "contacts"
        ],
        "description": "generate_contact_number",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/get_aspect_data": {
      "post": {
        "summary": "get_aspect_data",
        "tags": [
          "contacts"
        ],
        "description": "Get aspect data\n\n    Parameters\n    ----------\n    id : UUID\n        Required. Id of the contact to retrieve aspect data for.\n    role_id : UUID\n        Required. Id of the role to retrieve aspect data for.\n    has_permissions : boolean\n        Required. Expected by internal processing. Must be set to true when called via API key.\n    all: boolean\n        Optional. Retrieve all contact roles aspect data. Defaulted to false.\n\n    Returns\n    -------\n    success : bool\n        Whether or not aspect data settings are found\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        Dict containing aspect data settings.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "role_id": {
                    "type": "string"
                  },
                  "has_permissions": {
                    "type": "string"
                  },
                  "all": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/get_aspect_data_settings": {
      "post": {
        "summary": "get_aspect_data_settings",
        "tags": [
          "contacts"
        ],
        "description": "Get all aspect data settings\n\n    Returns\n    -------\n    success : bool\n        Whether or not aspect data settings are found\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        Dict containing aspect data settings.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/get_contact": {
      "post": {
        "summary": "get_contact",
        "tags": [
          "contacts"
        ],
        "description": "Retrieve contact_id by id.\n\n    Parameters\n    ----------\n    contact_id : str\n        Required. Contact id to retrieve\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data: dict containing contact\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contact_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/get_contact_associations": {
      "post": {
        "summary": "get_contact_associations",
        "tags": [
          "contacts"
        ],
        "description": "\n    Retrieve associations of contacts with revisions and properties,\n    filtered by contact IDs and optionally by policy type IDs.\n\n    This API allows consumers to look up revision and property associations for a list of contact IDs,\n    potentially restricted by policy types.\n\n    Parameters\n    ----------\n    contact_ids : list of str, required\n        A list of contact IDs to retrieve associations for.\n    policy_type_ids : list of str, optional\n        Optional list of policy type IDs to restrict queried revisions and properties.\n\n    Returns\n    -------\n    success : bool\n        True if the query was successful, False otherwise.\n    messages : list of str\n        List of messages detailing any errors encountered during execution.\n    data : dict\n        A nested dictionary containing associations under keys \"contacts\" and \"properties\",\n        with detailed information for each.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contact_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "policy_type_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/get_contact_by_agency": {
      "post": {
        "summary": "get_contact_by_agency",
        "tags": [
          "contacts"
        ],
        "description": "get_contact_by_agency",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_contact_by_agency"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_contact_by_agency"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/get_contact_by_agency_group": {
      "post": {
        "summary": "get_contact_by_agency_group",
        "tags": [
          "contacts"
        ],
        "description": "get_contact_by_agency_group",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_contact_by_agency_group"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_contact_by_agency_group"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/get_contact_by_agent": {
      "post": {
        "summary": "get_contact_by_agent",
        "tags": [
          "contacts"
        ],
        "description": "get_contact_by_agent",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_contact_by_agent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_contact_by_agent"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/get_contact_by_cognito_username": {
      "post": {
        "summary": "get_contact_by_cognito_username",
        "tags": [
          "contacts"
        ],
        "description": "Retrieve contact by cognito username.\n\n    Parameters\n    ----------\n    cognito_username : str\n        Required. Cognito username to search for.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data: dict containing contact data that corresponds with the referred cognito_username\n        Example contact data:\n            {\n                contact: {\n                    contactId: UUID,\n                    name: str,\n                    roles: [str],\n                    addresses: dict,\n                    phones: dict,\n                    emails: dict,\n                    website: str,\n                    dob: str,\n                    agencies: [dict]\n                }\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "cognito_username": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/get_contact_by_credentials": {
      "post": {
        "summary": "get_contact_by_credentials",
        "tags": [
          "contacts"
        ],
        "description": "Returns contact data of which credentials are passed.\n\n    Parameters\n    ----------\n    username : str\n        Required. The username of the contact to be migrated.\n    password : str\n        Required. The password of the contact to be migrated.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data: dict containing contact data\n        Example contact data:\n            {\n                contact: {\n                    contactId: UUID,\n                    name: str,\n                    confirmationEmail: str,\n                    phoneNumber: str, # (the first phone number from the contact)\n                    roles: [str], # (only the roles names)\n                    timezone: str,\n                    photoId: str,\n                    username: str,\n                    cognitoUsername: str\n                }\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "username": {
                    "type": "string"
                  },
                  "password": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/get_contact_for_migration": {
      "post": {
        "summary": "get_contact_for_migration",
        "tags": [
          "contacts"
        ],
        "description": "Return contact data of a contact with matching username or email id for migration to BriteAuth.\n\n    This endpoint is used in following couple of scenarios:\n        - During \"Forgot Password\" flow of BriteAuth user migration\n        - During \"User Invite\" to find existing contact by confirmation email\n\n    Consider using a generic contact search endpoint for other use cases.\n\n    Parameters\n    ----------\n    search_str : str\n        Required. Username or email id of the contact to be migrated.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data: dict containing contact data\n        Example contact data:\n            {\n                contact: {\n                    contactId: UUID,\n                    name: str,\n                    confirmationEmail: str,\n                    phoneNumber: str, # (the first phone number from the contact)\n                    roles: [str], # (only the roles names)\n                    timezone: str,\n                    photoId: str,\n                    username: str,\n                    cognitoUsername: str\n                }\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "search_str": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/get_contacts_by_ids": {
      "post": {
        "summary": "get_contacts_by_ids",
        "tags": [
          "contacts"
        ],
        "description": "Retrieve contacts by id.\n\n    Parameters\n    ----------\n    contact_id_list: list\n        Required. List of Contact ids to retrieve\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data: dict containing contacts\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contact_id_list": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/get_payment_methods": {
      "post": {
        "summary": "get_payment_methods",
        "tags": [
          "contacts"
        ],
        "description": "Retrieve payment methods by id.\n\n    Parameters\n    ----------\n    payment_method_ids: list\n        Required. List of payment method ids to retrieve\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data: list of dict\n        List of dictionaries containing payment method data\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "payment_method_ids": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/get_resource_producer_id": {
      "post": {
        "summary": "get_resource_producer_id",
        "tags": [
          "contacts"
        ],
        "description": "Get a resource's producer id.\n\n    The producer of a resource can be an agent or an agency depending on the `policy-go-to` advanced setting.\n\n    Parameters\n    ----------\n    revision_id : UUID\n        Optional. Id of the revisions whose producer is required.\n    policy_id : UUID\n        Optional. Id of the policy whose latest revision's producer is required.\n\n    Returns\n    -------\n    success : bool\n        Whether or not a producer could be found\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        Dict containing producer id.\n        Example :\n            {\n                \"producer_id\": \"CONTACT-UUID\"\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "revision_id": {
                    "type": "string"
                  },
                  "policy_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/get_screening_history": {
      "post": {
        "summary": "get_screening_history",
        "tags": [
          "contacts"
        ],
        "description": "\n    Get screening history for a contact.\n\n    Returns screening check results, plus a lookup of contacts that have applied overrides.\n\n    Parameters\n    ----------\n    contact_id : str\n        ID of the contact\n\n    Returns\n    -------\n    dict\n        Dictionary with 'contact_screening_check_results' (list of screening records) and\n        'override_contacts' (list of contacts that have applied overrides)\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_screening_history"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_screening_history"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/link_contact_to_cognito_user": {
      "post": {
        "summary": "link_contact_to_cognito_user",
        "tags": [
          "contacts"
        ],
        "description": "Links the given contact to the Cognito username specified in the request.\n\n    This endpoint also sets contact username if its not set.\n\n    Parameters\n    ----------\n    contact_id : str\n        Required. ID of the contact to be linked.\n    cognito_username : str or None\n        Required. Cognito username to which contact will be linked. If it is None, the contact will be unlinked.\n\n    Returns\n    -------\n    success : bool\n        Whether or not the contact could be linked.\n    messages : list of str\n        List of human-readable error messages.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contact_id": {
                    "type": "string"
                  },
                  "cognito_username": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/list_all_contacts": {
      "post": {
        "summary": "list_all_contacts",
        "tags": [
          "contacts"
        ],
        "description": "list_all_contacts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/list_contacts_by_role_code": {
      "post": {
        "summary": "list_contacts_by_role_code",
        "tags": [
          "contacts"
        ],
        "description": "List contacts by partial role code using prefix matching.\n\n    Supports partial lookup on agency_number, agency_group_number,\n    or producer_number with a minimum 5-character filter.\n\n    Parameters\n    ----------\n    payload : dict\n        role : str\n            The role type to search. One of 'agency', 'agency_group', 'agent'.\n        filter : str\n            The prefix to match against the role code.\n            Minimum 5 characters after trimming whitespace.\n        limit : int, optional\n            Maximum number of results to return (1-50). Defaults to 50.\n\n    Returns\n    -------\n    list[dict]\n        List of matching contacts with id, name, and role code fields.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-list_contacts_by_role_code"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-list_contacts_by_role_code"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/list_credit_reports_for_contact": {
      "post": {
        "summary": "list_credit_reports_for_contact",
        "tags": [
          "contacts"
        ],
        "description": "List credit reports available for the given contact\n\n    Parameters\n    ----------\n    contact_id : UUID\n        Required. Id of the contact\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : list of dict\n        A list of dictionary entries, of the following format:\n        ::\n            {\n                'id': UUID,\n                'score': str,  # score value\n                'warning': str,  # warning value\n                'date': str,  # (representation of a date MM-DD-YYYY),\n                'has_content': bool  # Indicates whether the content (pdf report) is available\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contact_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/list_emails_for_contact": {
      "post": {
        "summary": "list_emails_for_contact",
        "tags": [
          "contacts"
        ],
        "description": "List emails available for the given contact\n\n    Parameters\n    ----------\n    contact_id : UUID\n        Required. Id of the contact\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : list of dict\n        A list of dictionary entries, of the following format:\n        ::\n            {\n                'id': UUID,\n                'email': str,\n                'type': str,  # Home, Work, Other\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contact_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/modify_contact": {
      "post": {
        "summary": "modify_contact",
        "tags": [
          "contacts"
        ],
        "description": "\n    Updates an existing contact.\n\n    The input and output formats of this function are defined by the JSON schemas\n    located at 'lib/api/api_specs/request-modify_contact.json' and\n    'lib/api/api_specs/response-modify_contact.json', respectively.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-modify_contact"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-modify_contact"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/new_contact": {
      "post": {
        "summary": "new_contact",
        "tags": [
          "contacts"
        ],
        "description": "Creates a new Contact record and optionally related phones/emails/addresses.\n\n    Parameters\n    ----------\n    name : str\n        Required. The full name of the contact.\n    doing_buiness_as : str\n    type : str\n        Either 'individual' or 'organization'. Defaults to 'individual'.\n    date_of_birth : str\n        Date-string, typically in YYYY-MM-DD format (encrypted within BriteCore).\n    ssn : str\n        The raw SSN of the contact (encrypted within BriteCore).\n    fein_tax : str\n    legal_entity_type : str\n    date_business_started : str\n        Date-string, typically in YYYY-MM-DD format.\n    gender : str\n        Must be a value in the 'gender-list' setting if provided.\n    validate_purchase_date : bool\n        Validates Purchase Date if it is among required-fields. True by default\n    phones : list\n        List of JSON objects with phone details\n        ::\n\n            {\n                \"phone\": \"1-111-1111\",\n                \"type\": \"Work\"\n            }\n\n    emails : list\n        List of JSON objects with email details\n        ::\n\n            {\n                \"email\": \"person@domain.com\",\n                \"type\": \"Home\"\n            }\n\n    addresses : list\n        List of JSON objects with address details.\n        ::\n\n            {\n                \"address_line1\": \"123 Main\",\n                \"address_line2\": \"Suite 300\",\n                \"address_city\": \"Springfield\",\n                \"address_state\": \"MO\",\n                \"address_zip\": \"12345\",\n                \"address_country\": \"USA\",\n                \"address_city_other\": \"\",  # Use if `address_country` is outside of U.S.A.\n                \"address_county_other\": \"\",  # Use if `address_country` is outside of U.S.A.\n                \"address_state_other\": \"\",  # Use if `address_country` is outside of U.S.A.\n                \"type\": \"Mailing/Billing\"\n            }\n\n    website : str,\n\n    cognito_username: str\n        Cognito username associated with this contact.\n\n    is_god : bool\n        Whether contact is isGod or not. Defaults to 'False'. (Note: Only isGod users can set this to 'True')\n\n    roles : list\n        List of roles that contact has.\n\n    username : str\n        The username of the contact.\n\n    confirmation_email : str\n        The unique email used for log in.\n\n    background_information : str\n        The contact background information text.\n\n    dates_to_remember : list\n        List of JSON objects with date to remember details.\n        ::\n\n            {\n                \"alert_email\": \"test@email.com\",\n                \"alert_status\": \"true\",\n                \"month\": \"03\",\n                \"day\": \"01\",\n                \"year\": \"2023\",\n                \"contents\": \"A reminder note\",\n                \"frequency\": \"This Date Only\",\n                \"alert_time_period\": \"2\",\n                \"alert_time_unit\": \"Day/s\",\n                \"touchpoint\": \"\",\n            }\n\n    position : str\n        Position for an individual contact.\n\n    name_aliases : list[str]\n        A list of name aliases\n\n    company: str\n        The company contact uuid.\n\n    organization_contacts : list\n        A list of contact ids belonging to this organization.\n\n    agency_administrators : list\n        A list of contact ids as agency administrator for this organization.\n\n    related_to : list\n        A list of related contacts. The related contact must either not linked to any policy,\n        or shares the same set of policies with this contact.\n\n    is_related : bool\n        If true, duplicate copy from contact info to all related contacts.\n\n    external_system_reference : str\n        External system reference for the contact.\n\n    Returns\n    -------\n    success : bool\n        Whether or not the contact could be created.\n    messages : list of str\n        List of human-readable error messages.\n    data : dict\n        An object of the following format.\n\n        ::\n\n            {\n                'contact_id': '',\n                'addresses': [\n                    {\n                        'id': '',\n                        'address_line1': '',\n                        'address_line2': '',\n                        'address_city': '',\n                        'address_state': '',\n                        'address_zip': '',\n                        'address_county': '',\n                        'address_country': '',\n                        'type': '',\n                    }\n                ],\n                'phones': [\n                    {\n                        'id': '',\n                        'phone': '',\n                        'type': ''\n                    }\n                ],\n                'emails': [\n                    {\n                        'id': '',\n                        'email': '',\n                        'type': ''\n                    }\n                ],\n                'dates_to_remember': [\n                    {\n                        'id': '',\n                        'alert_email': '',\n                        'alert_status': '',\n                        'month': '',\n                        'day': '',\n                        'year': '',\n                        'contents': '',\n                        'frequency': '',\n                        'alert_time_period: '',\n                        'alert_time_unit': '',\n                        'touchpoint': '',\n                    }\n                ],\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "doing_buiness_as": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string"
                  },
                  "date_of_birth": {
                    "type": "string"
                  },
                  "ssn": {
                    "type": "string"
                  },
                  "fein_tax": {
                    "type": "string"
                  },
                  "legal_entity_type": {
                    "type": "string"
                  },
                  "date_business_started": {
                    "type": "string"
                  },
                  "gender": {
                    "type": "string"
                  },
                  "validate_purchase_date": {
                    "type": "boolean"
                  },
                  "phones": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "emails": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "addresses": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "website": {
                    "type": "string"
                  },
                  "cognito_username": {
                    "type": "string"
                  },
                  "is_god": {
                    "type": "boolean"
                  },
                  "roles": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "username": {
                    "type": "string"
                  },
                  "confirmation_email": {
                    "type": "string"
                  },
                  "background_information": {
                    "type": "string"
                  },
                  "dates_to_remember": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "position": {
                    "type": "string"
                  },
                  "name_aliases": {
                    "type": "string"
                  },
                  "company": {
                    "type": "string"
                  },
                  "organization_contacts": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "agency_administrators": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "related_to": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "is_related": {
                    "type": "boolean"
                  },
                  "external_system_reference": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/override_screening_check_result": {
      "post": {
        "summary": "override_screening_check_result",
        "tags": [
          "contacts"
        ],
        "description": "\n    Override a screening check result.\n\n    Only underwriters should have access to this endpoint.\n\n    Parameters\n    ----------\n    screening_check_result_id : str\n        ID of the screening check result to override\n    override_reason : str\n        Reason for the override\n\n    Returns\n    -------\n    dict\n        Success response\n        {\"success\": true}\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-override_screening_check_result"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-override_screening_check_result"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/remove_contact_from_role": {
      "post": {
        "summary": "remove_contact_from_role",
        "tags": [
          "contacts"
        ],
        "description": "Removes a specified contact from the given role.\n\n    Parameters\n    ----------\n    contact_id : str\n        UUID of the contact\n    role_name : str\n        Name of the role from which the contact is to be removed\n\n    Returns\n    -------\n    success : bool\n        Whether or not the role could appropriately be removed from the contact\n    messages : list\n        List of human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-remove_contact_from_role"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-remove_contact_from_role"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/remove_contact_information": {
      "post": {
        "summary": "remove_contact_information",
        "tags": [
          "contacts"
        ],
        "description": "Removes passed information for the contact.\n\n    Removes passed contact addresses, phones and emails for the given contact.\n    Only removes given information if it belongs to the provided contact.\n\n    Parameters\n    ----------\n    contact_id : UUID\n\n        Required. Id of the contact\n\n    contact_addresses : list of dict\n\n        List of contact addresses.\n        Each `address` must contain `contact_id` and address `id` keys.\n\n        Example: [{'contact_id' : str, 'id': str, ...}]\n\n    contact_phones : list of dict\n\n        List of contact phones.\n        Each `phone` must contain `contact_id` and phone `id` keys.\n\n        Example: [{'contact_id' : str, 'id': str, ...}]\n\n    contact_emails : list of dict\n\n        List of contact emails.\n        Each `email` must contain `contact_id` and email `id` keys.\n\n        Example: [{'contact_id' : str, 'id': str, ...}]\n\n    Returns\n    -------\n    success : bool\n        Whether or not the passed information was removed from the contact\n    messages : list\n        List of human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contact_id": {
                    "type": "string"
                  },
                  "contact_addresses": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "contact_phones": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "contact_emails": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/remove_contact_system_tags": {
      "post": {
        "summary": "remove_contact_system_tags",
        "tags": [
          "contacts"
        ],
        "description": "Remove a list of system tags associated with a contact.\n\n    Parameters\n    ----------\n    contact_id : UUID\n        Required. ID of the contact to be linked.\n    system_tags : list\n        Required. List of system tags to be removed.\n        The system_tags list should be in the following format:\n            \"system_tags\": [\n                    \"<system_tag_name or system_tag_id>\", ...\n            ]\n\n    Returns\n    -------\n    success : bool\n        Whether or not the system tags could be retrieved.\n    messages : list of str\n        List of human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contact_id": {
                    "type": "string"
                  },
                  "system_tags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/remove_policy_contact": {
      "post": {
        "summary": "remove_policy_contact",
        "tags": [
          "contacts"
        ],
        "description": "remove_policy_contact",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-remove_policy_contact"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-remove_policy_contact"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/remove_quote_contact": {
      "post": {
        "summary": "remove_quote_contact",
        "tags": [
          "contacts"
        ],
        "description": "remove_quote_contact",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-remove_quote_contact"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-remove_quote_contact"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/remove_risk_contact": {
      "post": {
        "summary": "remove_risk_contact",
        "tags": [
          "contacts"
        ],
        "description": "remove_risk_contact",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-remove_risk_contact"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-remove_risk_contact"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/retrieveAddressInfo": {
      "post": {
        "summary": "retrieveAddressInfo",
        "tags": [
          "contacts"
        ],
        "description": "Retrieves the address information for a given location.\n\n    Parameters\n    ----------\n    zip : str\n        Required. A US zipcode\n    addressLine1 : str\n        Required. The address to search for\n    stateAbbr : str\n        Required. The state.\n\n    Returns\n    -------\n    cities : list of str\n        A list of cities.\n    counties : list of str\n        A list of counties\n    lat : str\n        Latitude\n    lng : str\n        Longitude\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "zip": {
                    "type": "string"
                  },
                  "addressLine1": {
                    "type": "string"
                  },
                  "stateAbbr": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/retrieve_address_suggestions": {
      "post": {
        "summary": "retrieve_address_suggestions",
        "tags": [
          "contacts"
        ],
        "description": "\n    Retrieves suggestions for the input address. If county is suggested within the enabled Business Location,\n    matched county definition is returned.\n    Requires an address suggestion integration.\n\n    Parameters\n    ----------\n    policy_type_id : str\n        Optional. Settings > Vendor Integrations allows different address suggestion integrations for different\n        Policy Types. When possible, a policy type ID should always be specified, or otherwise BriteCore will use\n        a random integration.\n    address_line1 : str, required\n    address_line2 : str\n    address_city : str\n    address_state : str\n    address_zip : str\n    address_country : str, required\n    revision_id : str\n        Optional. Used to resolve `policy_type_id` when it is not supplied directly, so a contact address edited\n        from a quote uses that quote's integration rather than any connected one.\n    claim_id : str\n        Optional. The same resolution for an address edited from a claim, which reaches its policy type through\n        the claim's revision.\n\n    Returns\n    -------\n    success : bool\n        True if updated successfully, False if not\n    messages : List[str]\n        Human-readable error messages.\n    data : dict\n        A dict having the form:\n        ::\n        {\n            \"suggestions_retrieved\": bool, // False if there's no integration installed\n            \"suggested_addresses\": [{  // Optional. Omitted if `suggestion_retrieved` is `false`.\n                                       // It may also be an empty list if integration is installed but there's no\n                                       // suggestion.\n                \"address_line1\": str,\n                \"address_line2\": str, optional\n                \"address_city\": str,\n                \"address_county\": str, optional\n                \"address_state\": str,\n                \"address_zip\": str,\n                \"address_country\": str,\n                \"county\": {  // optional, even if address_county has a value. This is omitted if address_state is\n                             // not an enabled Business Location, or address_county cannot be matched to a valid\n                             // definition under the Business Location (whether the county is checked or not).\n                    \"code\": str,\n                    \"checked\": bool,  // indicates if the county is checked as a valid business location\n                    \"name\": str,\n                    \"id\": str,\n                    \"specifications\": [{  // might be an empty list\n                        \"id\": str,\n                        \"name\": str\n                    }]\n                }\n            }]\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "policy_type_id": {
                    "type": "string"
                  },
                  "address_line1": {
                    "type": "string"
                  },
                  "address_line2": {
                    "type": "string"
                  },
                  "address_city": {
                    "type": "string"
                  },
                  "address_state": {
                    "type": "string"
                  },
                  "address_zip": {
                    "type": "string"
                  },
                  "address_country": {
                    "type": "string"
                  },
                  "revision_id": {
                    "type": "string"
                  },
                  "claim_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/retrieve_addresses": {
      "post": {
        "summary": "retrieve_addresses",
        "tags": [
          "contacts"
        ],
        "description": "\n    Retrieve addresses by id\n\n    Parameters\n    ----------\n    address_ids : list, required\n        List of address ids to retrieve\n\n    Returns\n    -------\n    success : bool\n        True if the function executed successfully, false if there was an error.\n    messages : list of str\n        List of human-readable error messages. If the function executed successfully, this list will be empty.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "address_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/retrieve_adjuster_licenses": {
      "post": {
        "summary": "retrieve_adjuster_licenses",
        "tags": [
          "contacts"
        ],
        "description": "Retrieve all adjuster licenses for a contact.\n\n    Parameters\n    ----------\n    contact_id : str\n        UUID of the contact\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : list of dict\n        List of adjuster license records with the following format:\n        {\n            \"id\": UUID,\n            \"contact_id\": UUID,\n            \"business_location_id\": UUID,\n            \"business_location_name\": str,\n            \"business_location_abbreviation\": str,\n            \"license_number\": str,\n            \"effective_date\": str (YYYY-MM-DD),\n            \"expiration_date\": str (YYYY-MM-DD),\n            \"date_added\": str (YYYY-MM-DD HH:MM:SS)\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-retrieve_adjuster_licenses"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-retrieve_adjuster_licenses"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/retrieve_agencies_near_zip": {
      "post": {
        "summary": "retrieve_agencies_near_zip",
        "tags": [
          "contacts"
        ],
        "description": "Returns nearest [results] contacts that have Agency role to the\n     provided zipcode.  Useful for website \"agency locator\" function.\n\n    Parameters\n    ----------\n    zipcode : str\n        Required. 5-digit zipcode to search agencies close by\n    results : int\n        Optional. number of results to provide, capped at 20 to prevent scraping\n    max_distance : int\n        Optional. max number of mile radius to return results within\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : list\n        List of dict containing agency details.\n        Example agency data:\n            {\n                name: str,\n                latitude: str,\n                longitude: str,\n                distance: str,\n                website: str,\n                addressLine1: str,\n                addressLine2: str,\n                city: str,\n                state: str,\n                zip: str,\n                telephone: str,\n                fax: str,\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "zipcode": {
                    "type": "string"
                  },
                  "results": {
                    "type": "integer"
                  },
                  "max_distance": {
                    "type": "integer"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/retrieve_all_roles": {
      "post": {
        "summary": "retrieve_all_roles",
        "tags": [
          "contacts"
        ],
        "description": "Returns a list of all the roles in the database.\n\n    Parameters\n    ----------\n    login_only : bool\n        Optional. If true, only those roles which have the loginInformation aspect (can log in) are returned.\n\n    Returns\n    -------\n    list\n        List of Role objects.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "login_only": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/retrieve_contact": {
      "post": {
        "summary": "retrieve_contact",
        "tags": [
          "contacts"
        ],
        "description": "\n    Retrieves an existing contact.\n\n    The input and output formats of this function are defined by the JSON schemas\n    located at 'lib/api/api_specs/request-retrieve_contact.json' and\n    'lib/api/api_specs/response-retrieve_contact.json', respectively.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-retrieve_contact"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-retrieve_contact"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/retrieve_contact_info": {
      "post": {
        "summary": "retrieve_contact_info",
        "tags": [
          "contacts"
        ],
        "description": "Retrieves the contact information\n\n    Parameters\n    ----------\n    contact_id : str, required\n        The UUID of an existing contact\n\n    Returns\n    -------\n    success : bool\n        True if updated successfully, False if not\n    message : str\n        Human-readable messages with error.\n    data : dict\n        A dict having the form:\n        ::\n        {\n            \"addressState\": \"str\",\n            \"name\": \"str\",\n            \"addressId\": \"str\",\n            \"addressCounty\": \"str\",\n            \"addressCountry\": \"str\",\n            \"phone\": \"str\",\n            \"flag\": \"str\",\n            \"addressLine2\": \"str\",\n            \"sortOrder\": int,\n            \"attention\": \"str\",\n            \"contactType\": \"str\",\n            \"agencyGroupNumber\": int,\n            \"typeLabel\": \"str\",\n            \"addressLine1\": \"str\",\n            \"type\": \"str\",\n            \"email\": \"str\",\n            \"addressCity\": \"str\",\n            \"addressZip\": \"str\"\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contact_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/retrieve_contact_motor_vehicle_reports": {
      "post": {
        "summary": "retrieve_contact_motor_vehicle_reports",
        "tags": [
          "contacts"
        ],
        "description": "Gives out a list of all incidents count from the respective MVR reports.\n\n    Parameters\n    ----------\n    contact_id : UUID\n        Required. Id of the contact\n    store_no_hit : boolean\n        Optional. Flag to determine whether or not \"No Hit\" should be counted in report incidents. False by default.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : list of dict\n        A list of dictionary entries, of the following format:\n        ::\n            {\n                <contact id>: [{\"accidents_count\": 0, \"violations_count\": 1},\n                ..]\n\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contact_id": {
                    "type": "string"
                  },
                  "store_no_hit": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/retrieve_contact_system_tags": {
      "post": {
        "summary": "retrieve_contact_system_tags",
        "tags": [
          "contacts"
        ],
        "description": "Retrieve the list of system tags associated with a contact.\n\n    Parameters\n    ----------\n    contact_id : UUID\n        Required. ID of the contact to retrieve system tags.\n\n    Returns\n    -------\n    success : bool\n        Whether or not the system tags could be retrieved.\n    data: list of dict\n        List of dictionaries containing the system tags data\n    messages : list of str\n        List of human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contact_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/retrieve_credit_score_tier": {
      "post": {
        "summary": "retrieve_credit_score_tier",
        "tags": [
          "contacts"
        ],
        "description": "Get the credit score tier for a given contact\n\n    Parameters\n    ----------\n    contact_id : UUID\n        Required. Id of the contact.\n    policy_type_id : str\n        Optional. ID of a policy type for retrieving policy type specific credit tier.\n        If None is passed, the default credit tier config will be used.\n\n    Returns\n    -------\n    data: A dictionary\n    ::\n        {\n            'credit_tier': str\n        }\n\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contact_id": {
                    "type": "string"
                  },
                  "policy_type_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/retrieve_dob_and_ssn": {
      "post": {
        "summary": "retrieve_dob_and_ssn",
        "tags": [
          "contacts"
        ],
        "description": "retrieve_dob_and_ssn",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contact_id": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/retrieve_quoting_permissions": {
      "post": {
        "summary": "retrieve_quoting_permissions",
        "tags": [
          "contacts"
        ],
        "description": "\n        Returns contact quoting permissions listed by states and policy types.\n\n        Parameters\n        ----------\n        contact_id : uuid\n            Required. The username of the contact to retrieve quoting permissions.\n\n        Returns\n        -------\n        success : bool\n            Whether or not the request was successful.\n        messages : list of str\n            List of human-readable error messages.\n        data : dict\n            An object of the following format.\n\n            ::\n\n                {\n                    \"contact_id\": \"34af0e29-2a5f-40c4-a29e-be1e8dd5c089\",  # id of the contact provided\n                    \"follow_agency_quoting_restriction\": false,  # if the contact is following its agency restrictions.\n                    \"contact_role\": \"Agent\",  # Role of the provided contact, will be either Agency or Agent.\n                                              # if the contact has both we use the agent role to check for restrictions\n                    \"restricting_quotes\": true,  # if we are restricting quotes for this contact. We do not restrict\n                                                 # quotes for contacts with God mode activated, britecore internal\n                                                 # users and agencies with the setting\n                                                 # 'restrict-policy-types-for-agencies' deactivated\n                    \"quoting_permissions\": {\n                        \"states\": [],  # list of state names the contact is allowed to quote\n                        \"policy_types\": {  # object keyed by state\n                            \"state name\" : [] # list of policy names the user can quote\n                        }\n                    }\n                }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contact_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/retrieve_related_contacts": {
      "post": {
        "summary": "retrieve_related_contacts",
        "tags": [
          "contacts"
        ],
        "description": "Return contacts related to a given contact.\n\n    Parameters\n    ----------\n    cognito_username: str\n        Cognito username of the contact whose related contacts have to be retrieved.\n    contact_id: uuid\n        Contact id of the contact whose related contacts have to be retrieved.\n    relations_required: list of str\n        The type of relations of the contact to be fetched. One or more of:\n            - self: default, the contact itself\n            - agencies: agencies associated to the contact\n            - agency_groups: agency groups associated to the contact\n            - agents: agents associated to the contact\n            - agents_in_agencies: agents associated with the agents associated to the contact\n            - agents_in_agency_groups: agents associated with the contact's agency groups\n    attributes_required: list of str\n        Attributes of the related contact to be returned.\n    result_structure: str\n        How the response should be structured. One of:\n            - keyed: default, nested dict with info on how the contacts are related.\n            - flattened: flattened list of relations.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "cognito_username": {
                    "type": "string"
                  },
                  "contact_id": {
                    "type": "string"
                  },
                  "relations_required": {
                    "type": "string"
                  },
                  "attributes_required": {
                    "type": "string"
                  },
                  "result_structure": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/revoke_screening_override": {
      "post": {
        "summary": "revoke_screening_override",
        "tags": [
          "contacts"
        ],
        "description": "\n    Revoke the override from a screening check result.\n\n    Only underwriters should have access to this endpoint.\n\n    Parameters\n    ----------\n    screening_check_result_id : str\n        ID of the screening check result to revoke override from\n\n    Returns\n    -------\n    dict\n        Success response\n        {\"success\": true}\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-revoke_screening_override"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-revoke_screening_override"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/search_names_emails": {
      "post": {
        "summary": "search_names_emails",
        "tags": [
          "contacts"
        ],
        "description": "Search for emails and usernames using ElasticSearch.\n\n    This endpoint performs partial search on email addresses and contact names\n    using the ElasticSearch index for better performance and search capabilities.\n\n    Parameters\n    ----------\n    query : str, required\n        Search query for email addresses or usernames\n    limit : int, optional\n        Maximum number of results to return (default: 300)\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : array of dicts\n        Contains search results with emails and contact information\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-search_names_emails"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-search_names_emails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/set_aspect_data": {
      "post": {
        "summary": "set_aspect_data",
        "tags": [
          "contacts"
        ],
        "description": "Set a contact's aspect data\n\n    Parameters\n    ----------\n    id : UUID\n        Id of the contact.\n    role_id : UUID\n        Id of the contact role.\n    agencies : dict\n        Optional. The agencies related details.\n    agency_dates : dict\n        Optional. The agency dates related details.\n    agency_group : dict\n        Optional. The agency group related details.\n    agency_group_number : dict\n        Optional. The agency group number related details.\n    agency_number : dict\n        Optional. The agency number related details.\n    credit_score_account : dict\n        Optional. The credit score account related details.\n    commission_payment : dict\n        Optional. The commission payment related details.\n    commission_structure : dict\n        Optional. The commission structure related details.\n    interest_content : dict\n        Optional. The interest content related details.\n    login_information : dict\n        Optional. The login information related details.\n    naic_number : dict\n        Optional. The NAIC number related details.\n    notices : dict\n        Optional. The notices related details.\n    payments_issued : dict\n        Optional. The issued payments related details.\n    personal_information : dict\n        Optional. The personal information related details.\n    producer_number : dict\n        Optional. The producer number related details.\n    sweep_account : dict\n        Optional. The sweep account related details.\n    termination : dict\n        Optional. The termination related details.\n    vendor_number : dict\n        Optional. The vendor number related details.\n    is_1099_reportable : dict\n        Optional. The 1099 reporting related details.\n    default_surplus_lines_producer : dict\n        Optional. The default surplus lines producer related details.\n    quoting_restriction : dict\n        Optional. The quoting restriction related details.\n    default_agency : dict\n        Optional. The default agency related details.\n    inactive_agency : bool\n        Optional. The agency inactive status.\n    disallow_e2_value : bool\n        Optional. The e2value disallow status.\n\n    Returns\n    -------\n    success : bool\n        Whether or not a producer could be found\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        Empty data is returned\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "role_id": {
                    "type": "string"
                  },
                  "agencies": {
                    "type": "object"
                  },
                  "agency_dates": {
                    "type": "object"
                  },
                  "agency_group": {
                    "type": "object"
                  },
                  "agency_group_number": {
                    "type": "object"
                  },
                  "agency_number": {
                    "type": "object"
                  },
                  "credit_score_account": {
                    "type": "object"
                  },
                  "commission_payment": {
                    "type": "object"
                  },
                  "commission_structure": {
                    "type": "object"
                  },
                  "interest_content": {
                    "type": "object"
                  },
                  "login_information": {
                    "type": "object"
                  },
                  "naic_number": {
                    "type": "object"
                  },
                  "notices": {
                    "type": "object"
                  },
                  "payments_issued": {
                    "type": "object"
                  },
                  "personal_information": {
                    "type": "object"
                  },
                  "producer_number": {
                    "type": "object"
                  },
                  "sweep_account": {
                    "type": "object"
                  },
                  "termination": {
                    "type": "object"
                  },
                  "vendor_number": {
                    "type": "object"
                  },
                  "is_1099_reportable": {
                    "type": "object"
                  },
                  "default_surplus_lines_producer": {
                    "type": "object"
                  },
                  "quoting_restriction": {
                    "type": "object"
                  },
                  "default_agency": {
                    "type": "object"
                  },
                  "inactive_agency": {
                    "type": "boolean"
                  },
                  "disallow_e2_value": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/set_contact_system_tags": {
      "post": {
        "summary": "set_contact_system_tags",
        "tags": [
          "contacts"
        ],
        "description": "Adds or updates a list of system tags to be associated with a contact.\n\n    Parameters\n    ----------\n    contact_id : UUID\n        Required. ID of the contact to be linked.\n    system_tags : list\n        Required. List of system tags to be added.\n        The system_tags list should be in the following format:\n            \"system_tags\": [\n                {\n                    \"<system_tag_name or system_tag_id>\": \"<EXISTING_SYSTEM_TAG_NAME/ID>\",\n                    \"value\": \"<ANY_VALUE>\"\n                },\n                ...\n            ]\n\n    Returns\n    -------\n    success : bool\n        Whether or not the system tags could be added.\n    messages : list of str\n        List of human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contact_id": {
                    "type": "string"
                  },
                  "system_tags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/set_quoting_permissions": {
      "post": {
        "summary": "set_quoting_permissions",
        "tags": [
          "contacts"
        ],
        "description": "\n        Set contact quoting permissions.\n\n        Parameters\n        ----------\n        contact_id : uuid\n            Required. The username of the contact to retrieve quoting permissions.\n        role: str (Agency|Agent)\n            Required. Contact's Role name the permissions will be applied.\n        states: list\n            Optional. List of state names to allow the contact to quote\n        policy_types: {}\n            Optional. List of dicts with the state and policy type names to allow the contact to quote.\n            ::\n                {\n                    \"state name\": [] # list policy type names belonging to the state provided\n                }\n\n\n        Returns\n        -------\n        success : bool\n            Whether or not the request was successful.\n        messages : list of str\n            List of human-readable error messages.\n        data : dict\n            An empty object.\n\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contact_id": {
                    "type": "string"
                  },
                  "role": {
                    "type": "string"
                  },
                  "states": {
                    "type": "string"
                  },
                  "policy_types": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/store_contact_gender": {
      "post": {
        "summary": "store_contact_gender",
        "tags": [
          "contacts"
        ],
        "description": "Set a contact's gender.\n\n    Parameters\n    ----------\n    contact_id : UUID\n        Required. Id of the contact whose gender is being changed.\n    gender : str\n        Required. Gender to be set on the contact.\n\n    Returns\n    -------\n    success : bool\n        Whether or not the system tags could be added.\n    messages : list of str\n        List of human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contact_id": {
                    "type": "string"
                  },
                  "gender": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/store_contact_legal_entity_type": {
      "post": {
        "summary": "store_contact_legal_entity_type",
        "tags": [
          "contacts"
        ],
        "description": "Set a contact's Legal Entity Type.\n\n    Always-visible field, independent of role. Write permission is enforced\n    server-side by the decorators, independent of the UI affordance.\n    @protect_contact_records sits OUTSIDE @api_request: it returns (not\n    raises) the permission-denied response, which @api_request would\n    otherwise wrap as the data of a successful response. The value is\n    validated and change-only audited inside\n    ContactService.set_legal_entity_type; an empty value clears the field.\n    An UpdatedContactEvent is emitted only when the value actually changes.\n    The request unload hook commits. Error translation is @api_request's\n    job: schema/service validation errors and a missing contact all become\n    standard error responses.\n\n    Parameters\n    ----------\n    params : dict\n        Request payload, validated by ContactLegalEntityTypeParamsModel:\n        - contact_id (str, required): id of the contact being changed.\n        - legal_entity_type (str, required): value to set; a literal empty\n          string clears the field. Null/omitted, non-string, and\n          whitespace-only values are rejected -- none silently clears.\n          Surrounding whitespace on a real value is trimmed.\n\n    The request and response JSON schemas for this endpoint are located at\n    'lib/api/api_specs/request-store_contact_legal_entity_type.json' and\n    'lib/api/api_specs/response-store_contact_legal_entity_type.json',\n    respectively.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-store_contact_legal_entity_type"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-store_contact_legal_entity_type"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/update_adjuster_license": {
      "post": {
        "summary": "update_adjuster_license",
        "tags": [
          "contacts"
        ],
        "description": "Update an existing adjuster license record.\n\n    Parameters\n    ----------\n    license_data : dict\n        Dictionary containing license update data with the following keys:\n        - id : str (required) - UUID of the license to update\n        - business_location_id : str (optional) - UUID of the business location (state)\n        - license_number : str (optional) - License number (max 64 characters)\n        - effective_date : str (optional) - Effective date in YYYY-MM-DD format (or null to clear)\n        - expiration_date : str (optional) - Expiration date in YYYY-MM-DD format (or null to clear)\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        Updated license record\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-update_adjuster_license"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-update_adjuster_license"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/update_contact": {
      "post": {
        "summary": "update_contact",
        "tags": [
          "contacts"
        ],
        "description": "Updates an existing contact.\n\n    Parameters\n    ----------\n    contact : dict\n        A dictionary with contact info\n        ::\n\n            {\n                'id': UUID,\n                'name': str,\n                'dob': str,  # (representation of a date, either YYYY-MM-DD or MM/DD/YYYY),\n                'ssn': str,\n                'fein_tax': str,\n                'legal_entity_type': str,\n                'date_business_started': str,\n                'risk_id_number': str,\n                'dba': str,\n                'purchase_date': str,\n                'confirmation_email': str,\n                'validate_purchase_date': bool, Validate Purchase Date if it is among required-fields. True by default\n                'website': str,\n                'gender': str,\n                'addresses': [\n                    {\n                        'id': UUID,  # optional if adding a new address\n                        'type': ('Mailing/Billing', 'Mailing', 'Billing', 'Other'),\n                        'type_label': str,  # only if type == 'Other'\n                        'address_line1': str,\n                        'address_line2': str,  # optional\n                        'address_city': str,\n                        'address_state': str,\n                        'address_zip': str,\n                        'address_county': str,\n                        'address_country': ('USA', 'Canada', 'Other')  # defaults to 'USA'\n                    }\n                ],\n                'emails': [\n                    {\n                        'id': UUID,  # optional if adding a new email address\n                        'email': str,\n                        'type': ('Work', 'Personal', 'Other')\n                    }\n                ],\n                'phones': [\n                    {\n                        'id': UUID,  # optional if adding a new phone number\n                        'phone': str,\n                        'type': ('Cell', 'Home', 'Work', 'Fax')\n                    }\n                ],\n                'background_information': str,\n                'dates_to_remember': [\n                    {\n                        \"id\": UUID,  # optional if adding a new date to remember\n                        \"alert_email\": \"test@email.com\",\n                        \"alert_status\": \"true\",\n                        \"month\": \"03\",\n                        \"day\": \"01\",\n                        \"year\": \"2023\",\n                        \"contents\": \"A reminder note\",\n                        \"frequency\": \"This Date Only\",\n                        \"alert_time_period\": \"2\",\n                        \"alert_time_unit\": \"Day/s\",\n                        \"touchpoint\": \"\",\n                    }\n                ],\n                'position': str,\n                'name_aliases': list[str],\n                'organization_contacts': list[str],\n                'agency_administrators': list[str],\n                'related_to': list[str],\n                'is_related': bool,\n            }\n\n    Note\n    ----\n    Besides the UUIDs, if any key is empty, we assume you want to clear it.\n    If you do not want to clear a field, leave the key out of your request.\n    In other words, every key/value pair you send will be checked for discrepancies\n    with the current data, and changes will be made.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        Updated contact information, complete with any other addresses/emails/phones\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contact": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/update_contact_number": {
      "post": {
        "summary": "update_contact_number",
        "tags": [
          "contacts"
        ],
        "description": "update_contact_number",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/update_contacts": {
      "post": {
        "summary": "update_contacts",
        "tags": [
          "contacts"
        ],
        "description": "Batch update contacts.  See `update_contact` for details for each update.\n\n    Parameters\n    ----------\n    contacts : list of dicts - each dict should follow the update_contact schema\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contacts": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/contacts/validate_last_4_ssn_digits": {
      "post": {
        "summary": "validate_last_4_ssn_digits",
        "tags": [
          "contacts"
        ],
        "description": "Find insured using given params\n\n    Parameters\n    ----------\n    contact_id : UUID\n        Required. Id of the contact\n    last_4_ssn_digits : str\n        Required. Last 4 ssn digits\n\n        Note that if user's SSN in DB is None - result will be \"false\"\n\n    Returns\n    -------\n    success : bool\n        True if validated, false if not\n    messages : list of str\n        List of human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contact_id": {
                    "type": "string"
                  },
                  "last_4_ssn_digits": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/convenience_fees/delete_config": {
      "post": {
        "summary": "delete_config",
        "tags": [
          "convenience_fees"
        ],
        "description": "Reset a per-state scope back to inherit (admin only).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-delete_config"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-delete_config"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/convenience_fees/list_scopes": {
      "post": {
        "summary": "list_scopes",
        "tags": [
          "convenience_fees"
        ],
        "description": "List configurable scopes for the Payments page",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-list_scopes"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-list_scopes"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/convenience_fees/retrieve_config": {
      "post": {
        "summary": "retrieve_config",
        "tags": [
          "convenience_fees"
        ],
        "description": "Resolved convenience-fee config for one scope (admin only).\n\n    Omit ``location_id`` for the carrier-wide global default. Returns\n    ``convenience_fees`` (the raw values stored at this scope; NULL means\n    inherit) plus ``inherited_convenience_fees`` placeholders the resolver\n    falls through to when a field is blank. Both objects are keyed by the\n    snake_case logical field names.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-retrieve_config"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-retrieve_config"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/convenience_fees/store_config": {
      "post": {
        "summary": "store_config",
        "tags": [
          "convenience_fees"
        ],
        "description": "Persist convenience-fee config at one scope (admin only).\n\n    ``payload`` carries an optional ``location_id`` (Global when omitted/null)\n    and a ``convenience_fees`` object of snake_case logical keys. Empty-string\n    clears a column to NULL (blank override at this scope); omitted keys are\n    left untouched (partial update). ``ConvenienceFeeConfigModel`` owns the\n    wire contract + casing, so the service never sees frontend key names.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-store_config"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-store_config"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/copilot_skills/activate_copilot_skill": {
      "post": {
        "summary": "activate_copilot_skill",
        "tags": [
          "copilot_skills"
        ],
        "description": "Set a copilot skill's status to ACTIVE.\n\n    Parameters\n    ----------\n    id : str\n        UUID of the copilot skill to activate.\n\n    Returns\n    -------\n    dict\n        ``{\"skill\": {...}}`` containing the activated skill.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-activate_copilot_skill"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-activate_copilot_skill"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/copilot_skills/archive_copilot_skill": {
      "post": {
        "summary": "archive_copilot_skill",
        "tags": [
          "copilot_skills"
        ],
        "description": "Set a copilot skill's status to ARCHIVED.\n\n    Parameters\n    ----------\n    id : str\n        UUID of the copilot skill to archive.\n\n    Returns\n    -------\n    dict\n        ``{\"skill\": {...}}`` containing the archived skill.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-archive_copilot_skill"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-archive_copilot_skill"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/copilot_skills/create_copilot_skill": {
      "post": {
        "summary": "create_copilot_skill",
        "tags": [
          "copilot_skills"
        ],
        "description": "Create a new copilot skill.\n\n    Parameters\n    ----------\n    skill : dict\n        Skill payload with keys:\n        - name (str): Display name, max 120 characters.\n        - description (str, optional): Short summary, max 500 characters.\n        - body (str): Markdown instruction body, max 20000 characters.\n        - status (str, optional): One of DRAFT, ACTIVE, ARCHIVED.\n          Defaults to DRAFT.\n        - applicable_copilots (list of str, optional): Copilot\n          identifiers this skill applies to. Empty list means all\n          copilots.\n\n    Returns\n    -------\n    dict\n        ``{\"skill\": {...}}`` containing the newly created skill with\n        server-assigned id and timestamps.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-create_copilot_skill"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-create_copilot_skill"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/copilot_skills/delete_copilot_skill": {
      "post": {
        "summary": "delete_copilot_skill",
        "tags": [
          "copilot_skills"
        ],
        "description": "Hard-delete a copilot skill.\n\n    Parameters\n    ----------\n    id : str\n        UUID of the copilot skill to delete.\n\n    Returns\n    -------\n    dict\n        ``{\"deleted\": true}``\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-delete_copilot_skill"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-delete_copilot_skill"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/copilot_skills/get_copilot_skill": {
      "post": {
        "summary": "get_copilot_skill",
        "tags": [
          "copilot_skills"
        ],
        "description": "Fetch a single copilot skill by ID.\n\n    Parameters\n    ----------\n    id : str\n        UUID of the copilot skill to retrieve.\n\n    Returns\n    -------\n    dict\n        ``{\"skill\": {...}}`` containing the full skill object.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_copilot_skill"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_copilot_skill"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/copilot_skills/list_copilot_skills": {
      "post": {
        "summary": "list_copilot_skills",
        "tags": [
          "copilot_skills"
        ],
        "description": "List copilot skills with optional filters.\n\n    Returns all skills visible to the caller, optionally filtered by\n    status, applicable copilot, or search term. Counts are always\n    computed against the full carrier-scoped set so the UI can render\n    tab totals.\n\n    Parameters\n    ----------\n    filters : dict, optional\n        A dictionary with optional filter keys:\n        - status (str): One of DRAFT, ACTIVE, ARCHIVED. Omit for all.\n        - copilot (str): Copilot identifier to filter by applicability.\n        - search (str): Case-insensitive substring match on name and\n          description.\n\n    Returns\n    -------\n    dict\n        ``{\"skills\": [...], \"counts\": {\"total\": N, \"by_status\": {...}}}``\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-list_copilot_skills"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-list_copilot_skills"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/copilot_skills/update_copilot_skill": {
      "post": {
        "summary": "update_copilot_skill",
        "tags": [
          "copilot_skills"
        ],
        "description": "Update an existing copilot skill.\n\n    Any subset of mutable fields may be provided. Immutable fields\n    (id, added_by, date_added) are ignored if supplied. The updated_by\n    field is set server-side from the authenticated user.\n\n    Parameters\n    ----------\n    skill : dict\n        Update payload with keys:\n        - id (str): UUID of the skill to update (required).\n        - name (str, optional): New display name, max 120 characters.\n        - description (str, optional): New summary, max 500 characters.\n        - body (str, optional): New markdown body, max 20000 characters.\n        - status (str, optional): One of DRAFT, ACTIVE, ARCHIVED.\n        - applicable_copilots (list of str, optional): New copilot list.\n\n    Returns\n    -------\n    dict\n        ``{\"skill\": {...}}`` containing the updated skill.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-update_copilot_skill"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-update_copilot_skill"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/coverages/add_coverage": {
      "post": {
        "summary": "add_coverage",
        "tags": [
          "coverages"
        ],
        "description": "add_coverage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/coverages/add_coverages": {
      "post": {
        "summary": "add_coverages",
        "tags": [
          "coverages"
        ],
        "description": "add_coverages",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/coverages/add_sub_lines": {
      "post": {
        "summary": "add_sub_lines",
        "tags": [
          "coverages"
        ],
        "description": "add_sub_lines",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/coverages/delete_coverage": {
      "post": {
        "summary": "delete_coverage",
        "tags": [
          "coverages"
        ],
        "description": "delete_coverage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/coverages/delete_sub_line": {
      "post": {
        "summary": "delete_sub_line",
        "tags": [
          "coverages"
        ],
        "description": "delete_sub_line",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-delete_sub_line"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-delete_sub_line"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/coverages/list_all_coverages": {
      "post": {
        "summary": "list_all_coverages",
        "tags": [
          "coverages"
        ],
        "description": "list_all_coverages",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/coverages/list_container_coverages_summary": {
      "post": {
        "summary": "list_container_coverages_summary",
        "tags": [
          "coverages"
        ],
        "description": "\n    Get coverages for a specific container with pagination.\n\n    Request/response schemas are located at\n    lib/api/api_specs/request-list_container_coverages_summary.json and\n    lib/api/api_specs/response-list_container_coverages_summary.json.\n\n    Request (Policy Wide):\n        {\n            \"quote_id\": \"quote1\",\n            \"query\": \"Coverage C\",  # optional\n            \"pagination\": {\"page\": 1, \"page_size\": 100}\n        }\n\n    Request (Property):\n        {\n            \"property_id\": \"prop1\",\n            \"query\": \"Coverage C\",  # optional\n            \"pagination\": {\"page\": 1, \"page_size\": 100}\n        }\n\n    Response:\n        {\n            \"container_id\": \"quote1\",\n            \"coverages\": [...],\n            \"pagination\": {\"page\", \"page_size\", \"total_count\", \"total_pages\"}\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-list_container_coverages_summary"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-list_container_coverages_summary"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/coverages/list_containers": {
      "post": {
        "summary": "list_containers",
        "tags": [
          "coverages"
        ],
        "description": "\n    List containers (Policy Wide and Properties) that have coverages matching the query.\n\n    Request/response schemas are located at\n    lib/api/api_specs/request-list_containers.json and\n    lib/api/api_specs/response-list_containers.json.\n\n    Request:\n        {\n            \"quote_id\": \"quote1\",\n            \"query\": \"Coverage C\"  # optional\n        }\n\n    Response:\n        {\n            \"containers\": [\n                {\n                    \"type\": \"policy_wide\",\n                    \"id\": \"quote1\",\n                    \"name\": \"Policy Wide\",\n                    \"coverage_count\": 3\n                },\n                {\n                    \"type\": \"property\",\n                    \"id\": \"prop1\",\n                    \"name\": \"Location 1\",\n                    \"address\": \"123 Main Street\",\n                    \"coverage_count\": 10\n                }\n            ]\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-list_containers"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-list_containers"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/coverages/list_coverages": {
      "post": {
        "summary": "list_coverages",
        "tags": [
          "coverages"
        ],
        "description": "list_coverages",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/coverages/list_sub_lines": {
      "post": {
        "summary": "list_sub_lines",
        "tags": [
          "coverages"
        ],
        "description": "list_sub_lines",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/coverages/update_coverage": {
      "post": {
        "summary": "update_coverage",
        "tags": [
          "coverages"
        ],
        "description": "update_coverage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/coverages/update_coverages": {
      "post": {
        "summary": "update_coverages",
        "tags": [
          "coverages"
        ],
        "description": "update_coverages",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/coverages/update_revision_billing_schedule": {
      "post": {
        "summary": "update_revision_billing_schedule",
        "tags": [
          "coverages"
        ],
        "description": "\n    Stage a billing-schedule change on an open revision (rating-driven Builder flow).\n\n    For rating-driven policy types this also records the admin's preserve/regenerate\n    choice (regenerate_installments) on revisions.regenerateInstallmentsOnCommit,\n    consumed at commit by build_installments (BC-22886). The change is not applied\n    to the policy term until the revision is committed.\n\n    Request/response schemas are located at\n    lib/api/api_specs/request-update_revision_billing_schedule.json and\n    lib/api/api_specs/response-update_revision_billing_schedule.json.\n\n    Request:\n        {\n            \"policy_id\": \"<uuid>\",\n            \"billing_schedule_id\": \"<uuid>\",\n            \"revision_id\": \"<uuid>\",\n            \"regenerate_installments\": true  # optional: true=regenerate, false=preserve,\n                                             # omitted/null=no decision recorded (preserve)\n        }\n\n    Response:\n        {\"success\": true, \"messages\": [], \"data\": null}\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-update_revision_billing_schedule"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-update_revision_billing_schedule"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/custom_data/add_custom_data": {
      "post": {
        "summary": "add_custom_data",
        "tags": [
          "custom_data"
        ],
        "description": "Adds new CustomData record(s)\n\n    Parameters\n    ----------\n    data : list<dict>, required\n        [{\"name\": str, required,\n          \"value\": dict, required,\n          \"reference_id\": uuid, optional,\n          \"id\": uuid, optional cannot conflict, use update if you need to override},\n        ...]\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : list<dict>, echo your added data with assigned uuids\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/custom_data/delete_custom_data": {
      "post": {
        "summary": "delete_custom_data",
        "tags": [
          "custom_data"
        ],
        "description": "Deletes custom data record(s)\n\n    Parameters\n    ----------\n    ids : list<UUID>, required\n        UUIDs of CustomData records to be deleted\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        {\"deleted\": ['uuids', 'deleted', 'records'],\n         \"notfound\": ['uuids', 'not', 'found']}\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ids": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/custom_data/get_custom_data": {
      "post": {
        "summary": "get_custom_data",
        "tags": [
          "custom_data"
        ],
        "description": "Queries existing CustomData record(s)\n\n    Parameters\n    ----------\n    id : uuid, optional\n    ids : list<uuid>, optional\n    name : str, optional\n    reference_id : uuid, optional\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : list<dict>, found CustomData results\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "ids": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "reference_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/custom_data/summarize_custom_data": {
      "post": {
        "summary": "summarize_custom_data",
        "tags": [
          "custom_data"
        ],
        "description": "Summarized counts of CustomData records grouped by name order by count descending\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    data : list\n        [[\"name\", count], [\"name2\", count2], ...]\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/custom_data/update_custom_data": {
      "post": {
        "summary": "update_custom_data",
        "tags": [
          "custom_data"
        ],
        "description": "Updates existing CustomData record(s)\n\n    Parameters\n    ----------\n    data : dict<dict>, required\n        {\"existing uuid\":\n          {\"value\": dict, keys will be updated by default,\n           \"replace_value\": bool, optional, if true then value will replace rather than update\n           \"reference_id\": uuid, optional,\n           \"name\": str, optional\n          },\n        ...}\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        {\"updated\": ['uuids', 'updated', 'records'],\n         \"notfound\": ['uuids', 'not', 'found']}\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/dashboards/get_agency_experience_data": {
      "post": {
        "summary": "get_agency_experience_data",
        "tags": [
          "dashboards"
        ],
        "description": "Get Agency Experience Data returns the agency experience summary data (used to fill the tables).\n\n    Parameters\n    ----------\n    contact_id : str\n      The id of the contact making the request.\n    to_date : str\n       The date of the end data e.x {\"year\":\"2017\",\"month\":\"3\"}\n\n    Returns\n    -------\n    success : bool\n       True if completely successful, false if not\n    messages : list of str\n       List of human-readable error messages\n    data : dict\n       Dict containing two array of dicts, this is YTD data.\n       {\n          \"line_of_business\":{\n                \"Dwelling Property\": {\n                    \"ytd_claims\": 0.0,\n                    \"losses_incurred\": 0.0,\n                    \"loss_ratio\": 0.0,\n                    \"total_written_premium\": 12597.14,\n                    \"canceled_written_premium\": -523.86,\n                    \"total_lae_paid\": 0.0,\n                    \"total_lae_incurred\": 0.0,\n                    \"renewal_written_premium\": 3039.0,\n                    \"endorsed_written_premium\": 0.0,\n                    \"inforce_policy_count\": 52.0,\n                    \"new_written_premium\": 10082.0,\n                    \"ending_loss_reserve\": 0.0,\n                    \"earned_premium\": 10492.720000000001,\n                    \"new_policy_count\": 11.0,\n                    \"net_cancel_policy_count\": 3.0,\n                    \"beginning_loss_reserve\": 0.0,\n                    \"losses_paid\": 0.0\n                  },\n                  ...\n                  for all line items.\n          },\n          \"totals\":{\n              \"ytd_claims\": 0.0,\n              \"losses_incurred\": 0.0,\n              \"loss_ratio\": 0.0,\n              \"total_written_premium\": 13104.939999999999,\n              \"canceled_written_premium\": -523.86,\n              \"total_lae_paid\": 0.0,\n              \"total_lae_incurred\": 0.0,\n              \"renewal_written_premium\": 3039.0,\n              \"endorsed_written_premium\": 0.0,\n              \"inforce_policy_count\": 53.0,\n              \"new_written_premium\": 10589.8,\n              \"ending_loss_reserve\": 0.0,\n              \"earned_premium\": 10591.41,\n              \"new_policy_count\": 12.0,\n              \"net_cancel_policy_count\": 3.0,\n              \"beginning_loss_reserve\": 0.0,\n              \"losses_paid\": 0.0\n          }\n       }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contact_id": {
                    "type": "string"
                  },
                  "to_date": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/dashboards/get_csr_data": {
      "post": {
        "summary": "get_csr_data",
        "tags": [
          "dashboards"
        ],
        "description": "Get csr data returns csr data for given agent/agency/agency group.\n\n   Parameters\n   ----------\n   contact_id : str, required\n      The id of the contact making the request.\n\n   Returns\n   -------\n   success : bool\n       True if completely successful, false if not\n   messages : list of str\n       List of human-readable error messages\n   data : list of dicts\n        List of dicts containing the csr data\n        [\n          {\n              \"cancellation_pending\": [\n                  {\n                  \"policyStatus\": \"Active\",\n                  \"policyNumber\": \"10-2015-36\",\n                  \"expirationDate\": \"2017-05-14\",\n                  \"policyId\": \"64f10a14-0ddf-46d2-a6e8-71868deac348\",\n                  \"revisionDate\": \"2016-05-14\"\n                },\n                ...\n              ],\n              \"will_expire_in_30_days\": [\n                {\n                  \"policyStatus\": \"Active\",\n                  \"policyNumber\": \"10-2015-36\",\n                  \"expirationDate\": \"2017-05-14\",\n                  \"policyId\": \"64f10a14-0ddf-46d2-a6e8-71868deac348\",\n                  \"revisionDate\": \"2016-05-14\"\n                },\n                ...\n              ],\n              \"will_expire_in_60_days\": [\n                {\n                  \"policyStatus\": \"Active\",\n                  \"policyNumber\": \"10-2015-36\",\n                  \"expirationDate\": \"2017-05-14\",\n                  \"policyId\": \"64f10a14-0ddf-46d2-a6e8-71868deac348\",\n                  \"revisionDate\": \"2016-05-14\"\n                },\n                ...\n              ],\n              \"cancel_non_pay_30_days\": [\n                 {\n                  \"policyStatus\": \"Cancelled\",\n                  \"policyNumber\": \"10-2015-36\",\n                  \"expirationDate\": \"2017-05-14\",\n                  \"policyId\": \"64f10a14-0ddf-46d2-a6e8-71868deac348\",\n                  \"revisionDate\": \"2016-05-14\"\n                },\n                ...\n              ],\n              \"expired_within_45_days\": [\n                 {\n                  \"policyStatus\": \"Cancelled\",\n                  \"policyNumber\": \"10-2015-36\",\n                  \"expirationDate\": \"2017-05-14\",\n                  \"policyId\": \"64f10a14-0ddf-46d2-a6e8-71868deac348\",\n                  \"revisionDate\": \"2016-05-14\"\n                },\n                ...\n              ]\n            }\n          ]\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contact_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/dashboards/get_loss_ratio_chart": {
      "post": {
        "summary": "get_loss_ratio_chart",
        "tags": [
          "dashboards"
        ],
        "description": "Get Loss Ratio Chart return monthly loss ratio for given year and one year prior.\n\n    Parameters\n    ----------\n    contact_id : str\n       The id of the contact making the request.\n    to_date : str\n        The date of the end data e.x {\"year\":\"2017\",\"month\":\"3\"}\n\n    Returns\n    -------\n    success : bool\n        True if completely successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        Dict containing two array objects\n        {\n            \"pv_year\": [m0,m1,m2,m3,m4,m5,m6,m7,m8,m9,m10,m11],\n            \"now\": [m0... util to_date[\"month\"]]\n        }\n        where m0 is January value and so on..\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contact_id": {
                    "type": "string"
                  },
                  "to_date": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/dashboards/get_policy_count_data": {
      "post": {
        "summary": "get_policy_count_data",
        "tags": [
          "dashboards"
        ],
        "description": "Get Policy Count Data returns the policy count (inforce_policy_count) for given year and one year prior.\n\n    Parameters\n    ----------\n    contact_id : str\n      The id of the contact making the request.\n    to_date : str\n       The date of the end data e.x {\"year\":\"2017\",\"month\":\"3\"}\n\n    Returns\n    -------\n    success : bool\n       True if completely successful, false if not\n    messages : list of str\n       List of human-readable error messages\n    data : dict\n        Dict containing two array of dicts\n       {\n           \"pv_year\": [\n               \"Dwelling Property\":[m0,m1,m2,m3,m4,m5,m6,m7,m8,m9,m10,m11],\n                ... fol all line items\n               \"Total\":[m0,m1,m2,m3,m4,m5,m6,m7,m8,m9,m10,m11]\n           ],\n           \"now\": [\n                \"Dwelling Property\":[m0... until to_date[\"month\"]],\n                ... fol all line items\n               \"Total\":[m0... until to_date[\"month\"]]\n           ]\n       }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contact_id": {
                    "type": "string"
                  },
                  "to_date": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/dashboards/get_premium_data": {
      "post": {
        "summary": "get_premium_data",
        "tags": [
          "dashboards"
        ],
        "description": "Get Premium data returns the Written Premium VS Losses Paid for given year and one year prior.\n\n    Parameters\n    ----------\n    contact_id : str\n      The id of the contact making the request.\n    to_date : str\n       The date of the end data e.x {\"year\":\"2017\",\"month\":\"3\"}\n\n    Returns\n    -------\n    success : bool\n       True if completely successful, false if not\n    messages : list of str\n       List of human-readable error messages\n    data : dict\n       Dict containing two array of dicts\n       {\n           \"pv_year\": [\n                {\n                    \"cl\":\"0\" - losses paid for given month,\n                    \"wp\": \"0\" - written premium for given month,\n                    \"reportingMonth\":\"1\"\n                },\n                ... until december (reportingMonth = 12)\n           ],\n           \"now\": [\n                {\n                    \"cl\":\"0\" - losses paid for given month,\n                    \"wp\": \"0\" - written premium for given month,\n                    \"reportingMonth\":\"1\"\n                },\n                ... until to_date[\"month\"] (reportingMonth = to_date[\"month\"])]\n       }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contact_id": {
                    "type": "string"
                  },
                  "to_date": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/dashboards/get_report_url": {
      "post": {
        "summary": "get_report_url",
        "tags": [
          "dashboards"
        ],
        "description": "Returns the Transaction Report for a specified date range\n\n    Parameters\n    ----------\n    from_date : str\n      ``MM-DD-YYYY``\n    to_date : str\n      ``MM-DD-YYYY``\n    contact_id : str\n      The id of the contact making the request.\n    payment_types : str\n      ``{field:bool, field:bool}`` e.x {\"Sweep\":true,\"Other\":true}\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        Representation of dict result:\n        ::\n            {\n                'data':{\n                  'url': String: URL for transaction report\n                },\n                'success': True,\n                'messages': []\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "from_date": {
                    "type": "string"
                  },
                  "to_date": {
                    "type": "string"
                  },
                  "contact_id": {
                    "type": "string"
                  },
                  "payment_types": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/dashboards/get_transaction_report": {
      "post": {
        "summary": "get_transaction_report",
        "tags": [
          "dashboards"
        ],
        "description": "Returns the Transaction Report for a specified date range\n\n    Parameters\n    ----------\n    from_date : str\n      ``MM-DD-YYYY``\n    to_date : str\n      ``MM-DD-YYYY``\n    page : int\n      ``1``\n    records_per_page: int\n      ``1``\n    sort_obj : str\n      ``{field:\"column\", order:\"asc\"}``\n    contact_id : str\n      The id of the contact making the request.\n    payment_types : str\n      ``{field:bool, field:bool}`` e.x {\"Sweep\":true,\"Other\":true}\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        Representation of dict result:\n        ::\n            {\n                'data':{\n                },\n                'success': True,\n                'messages': []\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "from_date": {
                    "type": "string"
                  },
                  "to_date": {
                    "type": "string"
                  },
                  "page": {
                    "type": "integer"
                  },
                  "records_per_page": {
                    "type": "string"
                  },
                  "sort_obj": {
                    "type": "string"
                  },
                  "contact_id": {
                    "type": "string"
                  },
                  "payment_types": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/dashboards/validate_loss_run": {
      "post": {
        "summary": "validate_loss_run",
        "tags": [
          "dashboards"
        ],
        "description": "Validates that the given agent's contact id has access to the provided policy.\n\n    Parameters\n    ----------\n    contact_id : str\n        The id of the contact making the request.\n    policy_number : str\n        Any valid policy number\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        Representation of dict result:\n        ::\n            {\n                'data':{\n                },\n                'success': True,\n                'messages': []\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contact_id": {
                    "type": "string"
                  },
                  "policy_number": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/data/export_data_as_csv": {
      "post": {
        "summary": "export_data_as_csv",
        "tags": [
          "data"
        ],
        "description": "Builds command to export data and push it to run in background cluster\n\n    Parameters\n    ----------\n    prep_dfs : str\n    nonprep_dfs : str\n    start_date : str\n    end_date : str\n    as_of_date : str\n\n    Returns\n    -------\n    success : bool\n       True if completely successful, false if not\n    messages : list of str\n       List of human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "prep_dfs": {
                    "type": "string"
                  },
                  "nonprep_dfs": {
                    "type": "string"
                  },
                  "start_date": {
                    "type": "string"
                  },
                  "end_date": {
                    "type": "string"
                  },
                  "as_of_date": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/data/fetch_json_report_result": {
      "post": {
        "summary": "fetch_json_report_result",
        "tags": [
          "data"
        ],
        "description": "Uses a saved JSON Report to return a custom JSON object, given required parameters.\n\n    Parameters\n    ----------\n    report_name : str\n    params : dict\n\n    Returns\n    -------\n    json : str\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "report_name": {
                    "type": "string"
                  },
                  "params": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/data/get_available_dashboards": {
      "post": {
        "summary": "get_available_dashboards",
        "tags": [
          "data"
        ],
        "description": "Get Available Dashboards returns available dashboards for BriteCore and\n    BriteQuote. For the agent portal it will return only dashboards the user\n    has been granted access to based on user permissions. For the employee portal\n    (BriteCore) it will include stock dashboards and embedded ones.\n\n    Parameters\n    ----------\n    module : str, optional\n        The module to use, can be britequote or britecore (defaults to britequote).\n\n    Returns\n    -------\n    success : bool\n       True if completely successful, false if not\n    messages : list of str\n       List of human-readable error messages\n    data : dict\n       List of dicts with available dashboards based on user permission\n        [\n            {\n                \"id\": 'agency_exp',\n                \"title\": 'Agency Experience',\n                \"path\": 'ae_dashboard',\n                \"permission\": {\n                    \"value\": \"agency/stats/ae_dashboard\",\n                    \"access\": \"r\"\n                }\n            },\n            {\n                \"id\": 'csr_dash',\n                \"title\": 'CSR Dashboard',\n                \"path\": 'csr_dashboard',\n                \"permission\": {\n                    \"value\": \"agency/stats/csr_dashboard\",\n                    \"access\": \"r\"\n                }\n            },\n        ]\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "module": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/data/get_britedata_last_execution": {
      "post": {
        "summary": "get_britedata_last_execution",
        "tags": [
          "data"
        ],
        "description": "Fetch the most recent successful BriteData execution for a migration.\n\n    Looks up the latest SUCCEEDED ``report_processes`` row for the given\n    ``britedata_migration_reports`` id, downloads the output file from the\n    carrier S3 bucket (resolved from the carrier's BriteCore config), parses\n    it, and returns up to ``sample_size`` rows along with the report\n    parameters.\n\n    Parameters\n    ----------\n    migration_id : str\n        UUID of the ``britedata_migration_reports`` row.\n    sample_size : int, optional\n        Maximum sample rows to return (default 500). Capped server-side\n        regardless to keep response payloads bounded.\n\n    Returns\n    -------\n    data : dict\n        Envelope with ``parameters``, ``sample_rows``, ``total_rows``,\n        ``sample_size``, and -- on any failure path -- a ``reason``\n        field (``no_s3_bucket`` | ``no_successful_execution`` |\n        ``file_expired`` | ``invalid_files_url`` | ``s3_error`` |\n        ``file_too_large`` | ``unsupported_format`` | ``parse_error``).\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "migration_id": {
                    "type": "string"
                  },
                  "sample_size": {
                    "type": "integer"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/data/get_coverage_schema": {
      "post": {
        "summary": "get_coverage_schema",
        "tags": [
          "data"
        ],
        "description": "Return the unified coverage schema across every policy type.\n\n    Aggregates duplicate coverage names so each entry lists every category\n    field, scheduled-item header, and (optionally) question label observed\n    anywhere in the carrier.\n\n    Parameters\n    ----------\n    include_questions : bool, optional\n        Include question labels (default True).\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "include_questions": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/data/get_logical_catalog": {
      "post": {
        "summary": "get_logical_catalog",
        "tags": [
          "data"
        ],
        "description": "Get Logical Catalog returns the metadata for logical SQL catalog.\n\n    Returns\n    -------\n    success : bool\n       True if completely successful, false if not\n    messages : list of str\n       List of human-readable error messages\n    data : dict\n       Logical catalog metadata\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/data/get_procedure_definitions": {
      "post": {
        "summary": "get_procedure_definitions",
        "tags": [
          "data"
        ],
        "description": "Return ``SHOW CREATE PROCEDURE`` output for one or more procedures.\n\n    Always list-based; ``[name]`` is the single-name case. Missing\n    procedures get ``success=False`` per item rather than failing the\n    whole batch.\n\n    Parameters\n    ----------\n    procedure_names : list of str\n        Non-empty list of procedure names.\n\n    Returns\n    -------\n    data : list of dict\n        Per-procedure result objects in the requested order.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "procedure_names": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/data/get_report_examples": {
      "post": {
        "summary": "get_report_examples",
        "tags": [
          "data"
        ],
        "description": "Return report examples grouped by category with parameters and\n    referenced views extracted from each sheet's SQL.\n\n    Parameters\n    ----------\n    category : str, optional\n        Restrict the response to a single Report Category name.\n    include_sql : bool, optional\n        Include each sheet's raw ``sql_query`` (default True).\n    max_reports_per_category : int, optional\n        Cap reports per category (default unlimited).\n\n    Returns\n    -------\n    data : dict\n        ``{\"categories\": {<category>: [<report>, ...], ...}}``\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "category": {
                    "type": "string"
                  },
                  "include_sql": {
                    "type": "boolean"
                  },
                  "max_reports_per_category": {
                    "type": "integer"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/data/get_view_definitions": {
      "post": {
        "summary": "get_view_definitions",
        "tags": [
          "data"
        ],
        "description": "Return ``SHOW CREATE VIEW`` output for one or more views.\n\n    Always list-based; ``[name]`` is the single-name case. The\n    ``m_*`` -> ``t_*`` mapping is applied server-side so callers always\n    work with public names. Missing views get ``success=False`` per item.\n\n    Parameters\n    ----------\n    view_names : list of str\n        Non-empty list of view names.\n\n    Returns\n    -------\n    data : list of dict\n        Per-view result objects in the requested order.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "view_names": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/data/list_procedures": {
      "post": {
        "summary": "list_procedures",
        "tags": [
          "data"
        ],
        "description": "List all stored procedures in the carrier database.\n\n    Returns\n    -------\n    data : list of dict\n        ``[{\"procedure_name\": \"build_measure\"}, ...]`` ordered by name.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/data/list_report_categories": {
      "post": {
        "summary": "list_report_categories",
        "tags": [
          "data"
        ],
        "description": "List all report categories.\n\n    Returns\n    -------\n    data : list of dict\n        ``[{\"name\": \"Financial\"}, ...]`` ordered by name.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/data/preview_sql_check": {
      "post": {
        "summary": "preview_sql_check",
        "tags": [
          "data"
        ],
        "description": "Preview SQL Check validates.\n\n    Parameters\n    ----------\n    query : str\n       The SQL query to preview\n    params : dict, optional\n       Dictionary of parameters to use in the query, when using measure tables\n       will require AsOfDate or StartDate and EndDate\n\n    Returns\n    -------\n    success : bool\n       True if completely successful, false if not\n    messages : list of str\n       List of human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "query": {
                    "type": "string"
                  },
                  "params": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/data/preview_sql_plan": {
      "post": {
        "summary": "preview_sql_plan",
        "tags": [
          "data"
        ],
        "description": "Return the MySQL execution plan and index metadata for a saved\n    report's sheet WITHOUT executing its query.\n\n    Report-centric by design: only a report already saved in the system can\n    be analyzed (there is no arbitrary-SQL mode). Requires READ access to\n    the report.\n\n    Parameters\n    ----------\n    report_id : str\n       The saved report to analyze. Required.\n    sheet_id : str, optional\n       Which sheet of the report to analyze; defaults to the first sheet.\n    params : dict, optional\n       ``<<$Name>>`` parameter values (e.g. AsOfDate, or StartDate and\n       EndDate), same shape as run_report. Required when the report's SQL\n       references parameters that have no default.\n\n    Returns\n    -------\n    success : bool\n    executed_sql : str\n       The final SQL that was explained (measures rewritten, params\n       substituted, LIMIT and MAX_EXECUTION_TIME hint injected).\n    plan_tree : str or null\n       EXPLAIN FORMAT=TREE output (null on MySQL < 8.0.16).\n    plan_json : dict or null\n       EXPLAIN FORMAT=JSON output, verbatim from MySQL.\n    tables : list of dict\n       Per real table the plan touches: name, rows_estimate, data_length,\n       index_length, indexes (index rows from information_schema).\n    built_measures : list of str\n       Any ``m_*`` measures this request materialized (see Notes).\n    warnings : list of str\n\n    Notes\n    -----\n    The report's SELECT is never executed. But this is not free of writes:\n    referencing an ``m_*`` measure not yet built for the requested window\n    triggers a real materialization (``CREATE TABLE ... AS SELECT``, the same\n    build ``run_report`` does and gated by the same READ access) before the\n    plan can be produced -- potentially minutes for a wide range measure. Such\n    builds are reported in ``built_measures``. The optimizer may also evaluate\n    constant scalar subqueries while planning.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "report_id": {
                    "type": "string"
                  },
                  "sheet_id": {
                    "type": "string"
                  },
                  "params": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/data/preview_sql_result": {
      "post": {
        "summary": "preview_sql_result",
        "tags": [
          "data"
        ],
        "description": "Preview SQL Result validates and runs a SQL query, capped at 10,000 rows.\n\n    Parameters\n    ----------\n    query : str\n       The SQL query to preview\n    params : dict, optional\n       Dictionary of parameters to use in the query, when using measure tables\n       will require AsOfDate or StartDate and EndDate\n    include_totals_row : bool, optional\n       When true, append a computed grand-total row to the result and tag it\n       via row_meta[].is_total. Default false.\n\n    Returns\n    -------\n    success : bool\n       True if completely successful, false if not\n    messages : list of str\n       List of human-readable error messages\n    error_code : str, optional\n       Present only on failure. A stable identifier for *why* the query was\n       refused, so non-human callers do not have to pattern-match the prose in\n       ``messages``. Messages may be reworded freely; codes are contract.\n\n       Faults in the submitted query -- deterministic, so retrying the same\n       query is pointless: ``SQL_PARSE_ERROR``, ``SQL_DML_DDL_NOT_ALLOWED``,\n       ``SQL_DISALLOWED_FUNCTION``, ``SQL_UNKNOWN_TABLE``,\n       ``SQL_DATED_MEASURE_TABLE`` (the query names a dated measure table,\n       which measure cleanup drops; query the measure instead),\n       ``SQL_MISSING_PARAMS``, ``SQL_MULTIPLE_STATEMENTS``,\n       ``SQL_NOT_CATALOG_QUERY``, ``SQL_EXECUTION_TIMEOUT`` (the query is too\n       expensive to preview, though it can still be built and downloaded), and\n       ``SQL_EXECUTION_ERROR``.\n\n       Faults on the server -- transient, and the same query may succeed on a\n       later attempt: ``SQL_EXECUTION_UNAVAILABLE`` (lost connection, deadlock,\n       lock wait, resource exhaustion) and ``SQL_CATALOG_UNAVAILABLE`` (the\n       logical catalog could not be read, so table names could not be\n       validated). Callers must not report these as caller mistakes.\n    num_rows : int\n       Number of rows in the result\n    columns : list of dict\n         List of columns in the result, each dict with name and type\n    data : list of list\n         List of rows in the result, each row is a list of values\n\n    Notes\n    -----\n    Queries are capped at 10,000 rows and a 180-second server-side execution\n    time, injected as a MySQL ``MAX_EXECUTION_TIME`` optimizer hint.\n\n    Only read-only catalog queries are accepted. Validation rejects DML/DDL and\n    the functions listed in ``DISALLOWED_FUNCTIONS`` (``SLEEP``, ``BENCHMARK``,\n    advisory-lock and replication-wait functions, ``LOAD_FILE``). Multiple\n    statements are refused separately, when the query is run rather than during\n    validation.\n\n    Comments -- including MySQL executable comments (``/*!...*/``) -- and\n    user-supplied optimizer hints (``/*+ ... */``) are stripped from the parsed\n    statement rather than rejected, so neither can carry SQL through to the\n    database. A caller's own ``MAX_EXECUTION_TIME`` value is read before the\n    hint is dropped, so it still tightens the bound.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "query": {
                    "type": "string"
                  },
                  "params": {
                    "type": "object"
                  },
                  "include_totals_row": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/data/validate_sql_expression": {
      "post": {
        "summary": "validate_sql_expression",
        "tags": [
          "data"
        ],
        "description": "Validate a SQL expression for use as a parameter default.\n\n    This endpoint validates that a SQL expression is syntactically valid MySQL SQL\n    and does not contain dangerous operations that could lead to SQL injection.\n    If valid, it also evaluates the expression and validates the result matches\n    the expected parameter type.\n\n    Parameters\n    ----------\n    expression : str\n        SQL expression string to validate\n    param_type : str\n        Parameter type (Date, DateTime, String, Number, Enum, UUID) for type validation\n\n    Returns\n    -------\n    success : bool\n        True if expression is valid, False otherwise\n    data : dict\n        Contains 'evaluated_value' if expression is valid and could be evaluated,\n        and 'type_valid' indicating if the value matches the expected type\n    messages : list of str\n        List of error messages if validation fails\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expression": {
                    "type": "string"
                  },
                  "param_type": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/deliverables/delete_html_template": {
      "post": {
        "summary": "delete_html_template",
        "tags": [
          "deliverables"
        ],
        "description": "Deletes an HTML Template by name\n\n    Parameters\n    ----------\n    name : str\n        The name to use when referencing the HTMLTemplate.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : none\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-delete_html_template"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-delete_html_template"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/deliverables/delete_static_resource": {
      "post": {
        "summary": "delete_static_resource",
        "tags": [
          "deliverables"
        ],
        "description": "Deletes a static resource by name\n\n    Parameters\n    ----------\n    name : str, required\n        The name to use when referencing the static resource in your Jinja template. (ex. test.png)\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : none\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/deliverables/expire_all_static_resources": {
      "post": {
        "summary": "expire_all_static_resources",
        "tags": [
          "deliverables"
        ],
        "description": "Expires all static resources\n\n    Parameters\n    ----------\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : none\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/deliverables/expire_static_resource": {
      "post": {
        "summary": "expire_static_resource",
        "tags": [
          "deliverables"
        ],
        "description": "Expires a static resource by name\n\n    Parameters\n    ----------\n    name : str, required\n        The name to use when referencing the static resource in your Jinja template. (ex. test.png)\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : none\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/deliverables/finalize_recovery_candidate": {
      "post": {
        "summary": "finalize_recovery_candidate",
        "tags": [
          "deliverables"
        ],
        "description": "finalize_recovery_candidate",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-finalize_recovery_candidate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-finalize_recovery_candidate"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/deliverables/getDeliverableData": {
      "post": {
        "summary": "getDeliverableData",
        "tags": [
          "deliverables"
        ],
        "description": "Get Deliverable Data\n\n    Parameters\n    ----------\n    revision_id : str\n    date_cursor : str\n    deliverable_type : str\n    reason : str\n    state_id : str\n    invoice_id : str\n    return_data : bool\n    coverage_forms : list\n\n    Returns\n    -------\n\n    data: dict\n        The data response having the form:\n        ::\n\n            custom_fee_names\n                cancellation_threshold\n                last_invoice\n                    debit_custom_fee_fully_earned\n                    date_updated\n                    waive_id\n                    debit_custom_fee_fully_billed\n                    policy_term_id\n                    id\n                    debit_premium_fully_billed\n                    generated_by\n                    debit_premium_fully_earned\n                    payment_amount\n                    day_zero_date\n                    transaction_date_time\n                    due_date\n                    account_balance\n                    description\n                    deleted\n                    debit_custom_fee_pro_rata\n                    cancel_date\n                    file_id\n                    date_added\n                    back_cancel_date\n                    payment_id\n                    debit_premium_pro_rata\n                    date_added_micro\n                    date_deleted\n                    transaction_type\n                    paid_in_full\n                    snapshot\n                    dirty\n                    debit_system_fee\n                    revision_id\n                submit_bound\n                word_replace\n                    {last_nonpay_cancel_date}\n                    {billing_schedule}\n                    {past_due}\n                    {agency}\n                    {cancellation_date}\n                    {insured_properties}\n                    {agent}\n                    {payoff_amount}\n                    {print_description}\n                    {insured}\n                    {premium}\n                    {late_payment_fee}\n                    {cancellation_reason}\n                    {premium_diff}\n                    {policy_status}\n                    {insured_address}\n                    {policy_type}\n                    {agency_phone}\n                    {adjuster}\n                    {inception_date}\n                    {expiration_date}\n                    {reinstatement_date}\n                    {app_id}\n                    {agent_phone}\n                    {todays_date}\n                    {insured_phone}\n                    {due_date}\n                    {last_payment_date}\n                    {last_payment_amount}\n                    {last_nonpay_due_date}\n                    {policy_number}\n                    {amount_due}\n                    {claim_number}\n                    {return_premium_reason}\n                    {effective_date}\n                    {mortgagee}\n                    {nonrenew_reason}\n                    {portal_code}\n                bill_when\n                date\n                manual_cancellation\n                silence_non_pay\n                silence_non_pay_renewal\n                underwriting_questions\n                auto_pay_schedule\n                    has_installment_fees\n                    table\n                    due\n                    has_custom_fees\n                procdate\n                payoff_amount\n                last_payment\n                    debit_custom_fee_fully_earned\n                    date_updated\n                    waive_id\n                    debit_custom_fee_fully_billed\n                    policy_term_id\n                    id\n                    debit_premium_fully_billed\n                    generated_by\n                    debit_premium_fully_earned\n                    payment_amount\n                    day_zero_date\n                    transaction_date_time\n                    due_date\n                    account_balance\n                    description\n                    deleted\n                    debit_custom_fee_pro_rata\n                    cancel_date\n                    file_id\n                    date_added\n                    back_cancel_date\n                    payment_id\n                    debit_premium_pro_rata\n                    date_added_micro\n                    date_deleted\n                    transaction_type\n                    paid_in_full\n                    snapshot\n                    dirty\n                    debit_system_fee\n                    revision_id\n                story\n                reinsurance_contract_id\n                billing\n                    recur\n                    first\n                contacts\n                    insured\n                    additional_interests\n                    agent\n                forms\n                index_info\n                    read_only\n                    sub_type\n                    received_meta_data\n                    print_date\n                    id\n                    label\n                    type\n                    form_ids\n                    rev_id\n                return_prem_reason\n                last_page\n                num_dec_footer_lines\n                report_type\n                report_due_date_minus_x\n                dec_options\n                revision\n                    separate_dec_sections\n                    submit_bound\n                    line_of_business\n                    app_id\n                    inception_date\n                    policy_name\n                    renewal_status\n                    exp_date\n                    renewal_reason\n                    committed\n                    policy_type_id\n                    is_renewal\n                    location_id\n                    id\n                    policy_type_system_tags\n                    annual_fee\n                    policy_term_id\n                    unsubmitted_policy_change\n                    commission_rate\n                    dec_description\n                    written_fee\n                    eff_date\n                    revision_date\n                    annual_premium\n                    reinstate\n                    status\n                    description\n                    written_premium\n                    auto_payment_method_id\n                    line_id\n                    cancel_date\n                    has_write_off\n                    active\n                    status_reason\n                    properties\n                    first_payment_method_id\n                    dec_display_options\n                    items\n                    policy_number\n                    policy_term\n                    commit_date\n                    revision_state\n                    underwriting_contact_date\n                    line_system_tags\n                    underwriting_contacted\n                    policy_id\n                    term_premium_factor\n                separate_dec_sections\n                header_info\n                    h-line2\n                    h-line3\n                    h-line1\n                    h-line4\n                account_balance\n                first_underpaid_debit_exceeding_threshold\n                billing_schedule_installments\n                primary_carrier\n                    address_line2\n                    address_city\n                    address_line1\n                    name\n                    signature\n                    phone\n                    address_state\n                    logo\n                    id\n                    address_zip\n                return_prem\n                prev_rev_comp\n                overwrite_stock\n                remarks\n                report_settings\n                    forms_agent\n                    module\n                    dec_blurb\n                    location_id\n                    id\n                    print_on_initial_dec\n                    requires_user_input\n                    dec_signature\n                    dec_signature_image\n                    include_mortgagee\n                    certified_mail\n                    forms_addt_int\n                    built_in_html\n                    include_agent\n                    include_insured\n                    include_primary_insured\n                    show_fixed_dec_sig\n                    print_on_renewal_dec\n                    print_on_non_autopay\n                    include_addt_int\n                    overwrite_stock\n                    forms_insured\n                    dec_footer\n                    report_id\n                    forms_mortgagee\n                    send_dec\n                    custom_name\n                past_due\n                billing_schedule_options\n                unpaid_debits_to_date\n                report_id\n                debit_deltas_to_date\n                del_reason\n                auto_pay_method\n                cancel_on_due_date\n                current_page\n                flow\n                card_list\n                last_non_pay\n                submit_payment\n                has_a_payment_vendor\n                display_topmost_name_on_dec\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "revision_id": {
                    "type": "string"
                  },
                  "date_cursor": {
                    "type": "string"
                  },
                  "deliverable_type": {
                    "type": "string"
                  },
                  "reason": {
                    "type": "string"
                  },
                  "state_id": {
                    "type": "string"
                  },
                  "invoice_id": {
                    "type": "string"
                  },
                  "return_data": {
                    "type": "boolean"
                  },
                  "coverage_forms": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/deliverables/get_all_html_templates": {
      "post": {
        "summary": "get_all_html_templates",
        "tags": [
          "deliverables"
        ],
        "description": "Gets a list with all HTML Templates\n\n    Parameters\n    ----------\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : list of dict\n        The data response having the form:\n        ::\n            [{\n                'id': 'Some UUID id',\n                'name': 'Declaration',\n                'html': '<html><body><h1>{{ policy.policy_number }}</h1></body></html>',\n                'use_new_html_render': False\n                'use_new_pdf_render': False\n                'enabled': False\n                'date_created': \"2015-01-01 00:00:00\",\n                'date_updated': \"2015-01-01 00:00:00\",\n            }]\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_all_html_templates"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_all_html_templates"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/deliverables/get_all_static_resources": {
      "post": {
        "summary": "get_all_static_resources",
        "tags": [
          "deliverables"
        ],
        "description": "Gets a list with all static resources\n\n    Parameters\n    ----------\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : list of dict\n        The data response having the form:\n        ::\n            [{\n                'id': 'Some UUID id',\n                # Name of static resource. Used to reference in Jinja {{ static_resource('name.png') }}\n                'name': 'name.png',\n                # The URL used to pull in the cached version of the static resource\n                'url': 'http://cdn.someurl.com/name.png',\n                # Number of seconds until resource auto-expires and is refreshed,\n                'expire_in': 50000,\n                'date_created': \"2015-01-01 00:00:00\",\n                'date_updated': \"2015-01-01 00:00:00\",\n            }]\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/deliverables/get_attachment": {
      "post": {
        "summary": "get_attachment",
        "tags": [
          "deliverables"
        ],
        "description": "Retrieve attachment by id.\n\n    Parameters\n    ----------\n    file_id : str, required\n        attachment id\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not. False when the content could not be\n        read: the id matches no file, or the stored file is unreachable.\n    messages : list of str\n        List of human-readable error messages\n    data : dict containing attachment\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "file_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/deliverables/get_dec": {
      "post": {
        "summary": "get_dec",
        "tags": [
          "deliverables"
        ],
        "description": "retrieves deliverable\n\n    Parameters\n    ----------\n    policy_id : str\n        Policy ID (UUID)\n    revision_id : str\n        Revision ID (UUID)\n    reason : str\n\n    Returns\n    -------\n    data : dict\n        list of base64 encoded files\n        ::\n            {\n                'files': []\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "policy_id": {
                    "type": "string"
                  },
                  "revision_id": {
                    "type": "string"
                  },
                  "reason": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/deliverables/get_dynamic_fields": {
      "post": {
        "summary": "get_dynamic_fields",
        "tags": [
          "deliverables"
        ],
        "description": "Retrieves custom fields for a template and renders any Jinja templates in their default values.\n\n    Parameters\n    ----------\n    deliverable_template_id : str, required\n        The ID of the template to retrieve custom fields for.\n    reference_id : str, optional\n        The reference ID to look for jinja templates configuration in the default values,\n        and (for a dropdown field) to resolve live dropdown options against. It should be\n        a claimId or revisionId.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : list\n        List of custom fields for the template. Each custom field is a dictionary with the following keys:\n        ::\n            [\n                {\n                    \"id\": \"UUID\",\n                    \"template_id\": \"UUID\",\n                    \"field_type\": \"text\",\n                    \"field_label\": \"Field Label\",\n                    \"field_key\": \"field_name\",\n                    \"default_value\": \"Default value\"\n                },\n                {\n                    \"id\": \"UUID\",\n                    \"template_id\": \"UUID\",\n                    \"field_type\": \"dropdown\",\n                    \"field_label\": \"Vehicle\",\n                    \"field_key\": \"selected_vehicle\",\n                    \"default_value\": None,\n                    \"option_source\": \"dynamic\",\n                    \"options\": None,\n                    \"source_key\": \"vehicles\",\n                    \"display_field\": \"name\",\n                    \"resolved_options\": [{\"value\": \"<vehicle id>\", \"label\": \"2021 Honda Accord\"}]\n                },\n                ...\n            ]\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_dynamic_fields"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_dynamic_fields"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/deliverables/get_edeliverables": {
      "post": {
        "summary": "get_edeliverables",
        "tags": [
          "deliverables"
        ],
        "description": "Returns e-deliverable documents that have not yet been sent. Candidacy criteria is having:\n\n    - settings > deliverable > specific deliverable > This document may be eDelivered to insureds via BriteApps\n    - print_state === 'tbd'\n    - print_date between date_from and date_to\n    - if unprocessed_only==True then only 'unprocessed' returned; if unprocessed_only==False all states returned\n\n    Parameters\n    ----------\n    date_from : str, required\n        from \"print_date\"(inclusive). Format is mm/dd/yyyy\n    date_to : str, required\n        to \"print_date\"(inclusive). Format is mm/dd/yyyy\n    unprocessed_only : bool, optional\n        return only unprocessed e-deliverable documents. Defaults to True\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : list of dict\n        List of deliverables that meet search criteria and can be e-delivered\n        ::\n            [\n                {\n                    \"print_date\": \"2019-07-01\",\n                    \"state\": \"unprocessed\",\n                    \"meta_data\": {\n                        \"policy_term\": {\n                            \"effective_date\": \"2018-08-19\",\n                            \"expiration_date\": \"2019-08-19\",\n                            \"id\": \"2bb7e400-d31c-4612-89fa-dc8d2d8c16a1\"\n                        },\n                        \"contact\": {\n                            \"addresses\": [\n                                {\n                                    \"address_line2\": \"\",\n                                    \"address_city\": \"Ardmore\",\n                                    \"address_line1\": \"2222 N Mdw DR\",\n                                    \"type_label\": \"\",\n                                    \"date_updated\": null,\n                                    \"address_country\": \"USA\",\n                                    \"address_county\": \"Carter\",\n                                    \"contact_id\": \"c1bfa8a0-4eb2-4f7b-b649-baf8e61eb080\",\n                                    \"longitude\": null,\n                                    \"attention\": \"\",\n                                    \"address_state\": \"OK\",\n                                    \"latitude\": null,\n                                    \"type\": \"Mailing/Billing\",\n                                    \"id\": \"e3ca04ca-d7e9-4319-b151-b71c2ee99da8\",\n                                    \"address_zip\": \"73401\"\n                                }\n                            ],\n                            \"id\": \"c1bfa8a0-4eb2-4f7b-b649-baf8e61eb080\",\n                            \"phones\": [\n                                {\n                                    \"date_updated\": null,\n                                    \"phone\": \"(111) 221-7526\",\n                                    \"type\": \"Home\",\n                                    \"id\": \"05b103d9-9400-41fd-b459-28303ac29564\",\n                                    \"contact_id\": \"c1bfa8a0-4eb2-4f7b-b649-baf8e61eb080\"\n                                }\n                            ],\n                            \"email_notices\": false,\n                            \"emails\": [],\n                            \"name\": \"JANET BROWN\"\n                        },\n                        \"named_insureds\": [\n                            {\n                                \"addresses\": [\n                                    {\n                                        \"address_line2\": \"\",\n                                        \"address_city\": \"Ardmore\",\n                                        \"address_line1\": \"2222 N Mdw DR\",\n                                        \"type_label\": \"\",\n                                        \"date_updated\": null,\n                                        \"address_country\": \"USA\",\n                                        \"address_county\": \"Carter\",\n                                        \"contact_id\": \"c1bfa8a0-4eb2-4f7b-b649-baf8e61eb080\",\n                                        \"longitude\": null,\n                                        \"attention\": \"\",\n                                        \"address_state\": \"OK\",\n                                        \"latitude\": null,\n                                        \"type\": \"Mailing/Billing\",\n                                        \"id\": \"e3ca04ca-d7e9-4319-b151-b71c2ee99da8\",\n                                        \"address_zip\": \"73401\"\n                                    }\n                                ],\n                                \"id\": \"c1bfa8a0-4eb2-4f7b-b649-baf8e61eb080\",\n                                \"phones\": [\n                                    {\n                                        \"date_updated\": null,\n                                        \"phone\": \"(111) 221-7526\",\n                                        \"type\": \"Home\",\n                                        \"id\": \"05b103d9-9400-41fd-b459-28303ac29564\",\n                                        \"contact_id\": \"c1bfa8a0-4eb2-4f7b-b649-baf8e61eb080\"\n                                    }\n                                ],\n                                \"email_notices\": false,\n                                \"emails\": [],\n                                \"name\": \"JANE DOE\"\n                            },\n                            {\n                                \"addresses\": [\n                                    {\n                                        \"address_line2\": \"\",\n                                        \"address_city\": \"Ardmore\",\n                                        \"address_line1\": \"2222 N MDW DR\",\n                                        \"type_label\": \"\",\n                                        \"date_updated\": null,\n                                        \"address_country\": \"USA\",\n                                        \"address_county\": \"Carter\",\n                                        \"contact_id\": \"ab3c07a5-1b08-4c87-b32d-f0d93841f0c9\",\n                                        \"longitude\": null,\n                                        \"attention\": \"\",\n                                        \"address_state\": \"OK\",\n                                        \"latitude\": null,\n                                        \"type\": \"Mailing/Billing\",\n                                        \"id\": \"1cf47ef8-7163-45c5-925b-c4d6e871f83e\",\n                                        \"address_zip\": \"73401\"\n                                    }\n                                ],\n                                \"id\": \"ab3c07a5-1b08-4c87-b32d-f0d93841f0c9\",\n                                \"phones\": [\n                                    {\n                                        \"date_updated\": null,\n                                        \"phone\": \"(111) 221-7526\",\n                                        \"type\": \"Home\",\n                                        \"id\": \"7ca45a3f-988b-48ed-a875-7476034485fd\",\n                                        \"contact_id\": \"ab3c07a5-1b08-4c87-b32d-f0d93841f0c9\"\n                                    }\n                                ],\n                                \"email_notices\": false,\n                                \"emails\": [],\n                                \"name\": \"JOHN DOE\"\n                            }\n                        ],\n                        \"file\": {\n                            \"print_state\": \"tbd\",\n                            \"title\": \"06-29-2019 - Installment Billing Statement - JANET BROWN\",\n                            \"date_added\": \"2019-02-04 15:17:04\",\n                            \"id\": \"dda9c813-8fbc-4e44-87b7-61278e1eca28\",\n                            \"print_date\": \"2019-07-01\",\n                            \"label\": \"Installment Billing Statement\"\n                        },\n                        \"policy\": {\n                            \"id\": \"a26935eb-7466-46af-a656-ccac17388f40\",\n                            \"policy_number\": \"10-2011-120\"\n                        },\n                        \"type\": \"document\",\n                        \"deliverable_type\": {\n                            \"custom_name\": null\n                        },\n                        \"revision\": {\n                            \"revision_date\": \"2018-08-19\",\n                            \"id\": \"0c64929f-f8b6-4617-8b25-911aa14faaa7\",\n                            \"policy_status\": \"Active\",\n                            \"revision_state\": \"committed\"\n                        }\n                    },\n                    \"file_id\": \"dda9c813-8fbc-4e44-87b7-61278e1eca28\",\n                    \"exclude_from_printing_queue\": false,\n                    \"edelivery_state\": \"FAILED\",\n                    \"date_added\": \"2019-05-24 08:39:30\",\n                    \"x_file_id\": null,\n                    \"id\": \"014386b3-d74c-4925-8d2c-f744ec5892e3\"\n                }\n            ]\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "date_from": {
                    "type": "string"
                  },
                  "date_to": {
                    "type": "string"
                  },
                  "unprocessed_only": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/deliverables/get_edeliverables_by_id": {
      "post": {
        "summary": "get_edeliverables_by_id",
        "tags": [
          "deliverables"
        ],
        "description": "Returns e-deliverable documents by ids.\n\n    Parameters\n    ----------\n    ids : list, required\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : list of dict\n        List of deliverables that meet search criteria and can be e-delivered\n        ::\n            [\n                {\n                    \"print_date\": \"2019-07-01\",\n                    \"state\": \"unprocessed\",\n                    \"meta_data\": {\n                        \"policy_term\": {\n                            \"effective_date\": \"2018-08-19\",\n                            \"expiration_date\": \"2019-08-19\",\n                            \"id\": \"2bb7e400-d31c-4612-89fa-dc8d2d8c16a1\"\n                        },\n                        \"contact\": {\n                            \"addresses\": [\n                                {\n                                    \"address_line2\": \"\",\n                                    \"address_city\": \"Ardmore\",\n                                    \"address_line1\": \"2222 N Mdw DR\",\n                                    \"type_label\": \"\",\n                                    \"date_updated\": null,\n                                    \"address_country\": \"USA\",\n                                    \"address_county\": \"Carter\",\n                                    \"contact_id\": \"c1bfa8a0-4eb2-4f7b-b649-baf8e61eb080\",\n                                    \"longitude\": null,\n                                    \"attention\": \"\",\n                                    \"address_state\": \"OK\",\n                                    \"latitude\": null,\n                                    \"type\": \"Mailing/Billing\",\n                                    \"id\": \"e3ca04ca-d7e9-4319-b151-b71c2ee99da8\",\n                                    \"address_zip\": \"73401\"\n                                }\n                            ],\n                            \"id\": \"c1bfa8a0-4eb2-4f7b-b649-baf8e61eb080\",\n                            \"phones\": [\n                                {\n                                    \"date_updated\": null,\n                                    \"phone\": \"(111) 221-7526\",\n                                    \"type\": \"Home\",\n                                    \"id\": \"05b103d9-9400-41fd-b459-28303ac29564\",\n                                    \"contact_id\": \"c1bfa8a0-4eb2-4f7b-b649-baf8e61eb080\"\n                                }\n                            ],\n                            \"email_notices\": false,\n                            \"emails\": [],\n                            \"name\": \"JANET BROWN\"\n                        },\n                        \"named_insureds\": [\n                            {\n                                \"addresses\": [\n                                    {\n                                        \"address_line2\": \"\",\n                                        \"address_city\": \"Ardmore\",\n                                        \"address_line1\": \"2222 N Mdw DR\",\n                                        \"type_label\": \"\",\n                                        \"date_updated\": null,\n                                        \"address_country\": \"USA\",\n                                        \"address_county\": \"Carter\",\n                                        \"contact_id\": \"c1bfa8a0-4eb2-4f7b-b649-baf8e61eb080\",\n                                        \"longitude\": null,\n                                        \"attention\": \"\",\n                                        \"address_state\": \"OK\",\n                                        \"latitude\": null,\n                                        \"type\": \"Mailing/Billing\",\n                                        \"id\": \"e3ca04ca-d7e9-4319-b151-b71c2ee99da8\",\n                                        \"address_zip\": \"73401\"\n                                    }\n                                ],\n                                \"id\": \"c1bfa8a0-4eb2-4f7b-b649-baf8e61eb080\",\n                                \"phones\": [\n                                    {\n                                        \"date_updated\": null,\n                                        \"phone\": \"(111) 221-7526\",\n                                        \"type\": \"Home\",\n                                        \"id\": \"05b103d9-9400-41fd-b459-28303ac29564\",\n                                        \"contact_id\": \"c1bfa8a0-4eb2-4f7b-b649-baf8e61eb080\"\n                                    }\n                                ],\n                                \"email_notices\": false,\n                                \"emails\": [],\n                                \"name\": \"JANE DOE\"\n                            },\n                            {\n                                \"addresses\": [\n                                    {\n                                        \"address_line2\": \"\",\n                                        \"address_city\": \"Ardmore\",\n                                        \"address_line1\": \"2222 N MDW DR\",\n                                        \"type_label\": \"\",\n                                        \"date_updated\": null,\n                                        \"address_country\": \"USA\",\n                                        \"address_county\": \"Carter\",\n                                        \"contact_id\": \"ab3c07a5-1b08-4c87-b32d-f0d93841f0c9\",\n                                        \"longitude\": null,\n                                        \"attention\": \"\",\n                                        \"address_state\": \"OK\",\n                                        \"latitude\": null,\n                                        \"type\": \"Mailing/Billing\",\n                                        \"id\": \"1cf47ef8-7163-45c5-925b-c4d6e871f83e\",\n                                        \"address_zip\": \"73401\"\n                                    }\n                                ],\n                                \"id\": \"ab3c07a5-1b08-4c87-b32d-f0d93841f0c9\",\n                                \"phones\": [\n                                    {\n                                        \"date_updated\": null,\n                                        \"phone\": \"(111) 221-7526\",\n                                        \"type\": \"Home\",\n                                        \"id\": \"7ca45a3f-988b-48ed-a875-7476034485fd\",\n                                        \"contact_id\": \"ab3c07a5-1b08-4c87-b32d-f0d93841f0c9\"\n                                    }\n                                ],\n                                \"email_notices\": false,\n                                \"emails\": [],\n                                \"name\": \"JOHN DOE\"\n                            }\n                        ],\n                        \"file\": {\n                            \"print_state\": \"tbd\",\n                            \"title\": \"06-29-2019 - Installment Billing Statement - JANET BROWN\",\n                            \"date_added\": \"2019-02-04 15:17:04\",\n                            \"id\": \"dda9c813-8fbc-4e44-87b7-61278e1eca28\",\n                            \"print_date\": \"2019-07-01\",\n                            \"label\": \"Installment Billing Statement\"\n                        },\n                        \"policy\": {\n                            \"id\": \"a26935eb-7466-46af-a656-ccac17388f40\",\n                            \"policy_number\": \"10-2011-120\"\n                        },\n                        \"type\": \"document\",\n                        \"deliverable_type\": {\n                            \"custom_name\": null\n                        },\n                        \"revision\": {\n                            \"revision_date\": \"2018-08-19\",\n                            \"id\": \"0c64929f-f8b6-4617-8b25-911aa14faaa7\",\n                            \"policy_status\": \"Active\",\n                            \"revision_state\": \"committed\"\n                        }\n                    },\n                    \"file_id\": \"dda9c813-8fbc-4e44-87b7-61278e1eca28\",\n                    \"exclude_from_printing_queue\": false,\n                    \"edelivery_state\": \"FAILED\",\n                    \"date_added\": \"2019-05-24 08:39:30\",\n                    \"x_file_id\": null,\n                    \"id\": \"014386b3-d74c-4925-8d2c-f744ec5892e3\"\n                }\n            ]\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/deliverables/get_html_template": {
      "post": {
        "summary": "get_html_template",
        "tags": [
          "deliverables"
        ],
        "description": "Gets an HTMLTemplate by name\n\n    Parameters\n    ----------\n    name : str\n        The name to use when referencing the HTMLTemplate.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The data response having the form:\n        ::\n            {\n                'id': 'Some UUID id',\n                'name': 'Declaration',\n                'html': '<html><body><h1>{{ policy.policy_number }}</h1></body></html>',\n                'use_new_html_render': False\n                'use_new_pdf_render': False\n                'enabled': False\n                'date_created': \"2015-01-01 00:00:00\",\n                'date_updated': \"2015-01-01 00:00:00\",\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_html_template"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_html_template"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/deliverables/get_pending_email_count": {
      "post": {
        "summary": "get_pending_email_count",
        "tags": [
          "deliverables"
        ],
        "description": "Returns the number of pending emails.\n\n    Parameters\n    ----------\n    from_date : date\n    to_date : date\n\n    Returns\n    -------\n    data: dict\n        The data response having the form:\n        ::\n            {\n                'pending_email_count': the count (int)\n            }\n\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "from_date": {
                    "type": "string"
                  },
                  "to_date": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/deliverables/get_static_resource": {
      "post": {
        "summary": "get_static_resource",
        "tags": [
          "deliverables"
        ],
        "description": "Gets a static resource by name\n\n    Parameters\n    ----------\n    name : str\n        The name to use when referencing the static resource in your Jinja template. (ex. test.png)\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The data response having the form:\n        ::\n            {\n                'id': 'Some UUID id',\n                # Name of static resource. Used to reference in Jinja {{ static_resource('name.png') }},\n                'name': 'name.png',\n                # The URL used to pull in the cached version of the static resource,\n                'url': 'http://cdn.someurl.com/name.png',\n                'expire_in': 50000, # Number of seconds until resource auto-expires and is refreshed,\n                'date_created': \"2015-01-01 00:00:00\",\n                'date_updated': \"2015-01-01 00:00:00\",\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/deliverables/index_edelivery_records": {
      "post": {
        "summary": "index_edelivery_records",
        "tags": [
          "deliverables"
        ],
        "description": "Launch edelivery documents indexing in given date range\n     It is a slow process so it is better to not pass date ranges bigger than week\n\n    Parameters\n    ----------\n    date_from : str, required\n        from \"print_date\"(inclusive). Format is mm/dd/yyyy\n    date_to : str, required\n        to \"print_date\"(inclusive). Format is mm/dd/yyyy\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        Deleted entities count\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "date_from": {
                    "type": "string"
                  },
                  "date_to": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/deliverables/list_attachments": {
      "post": {
        "summary": "list_attachments",
        "tags": [
          "deliverables"
        ],
        "description": "Retrieves attachments list related to any policy/contact/revision combination.\n\n    Parameters\n    ----------\n    policy_id : str\n        Filter attachments by policy_id\n    revision_id : str\n        Filter attachments by revision_id\n    contact_id : str\n        Filter attachments by contact_id\n\n    print_date_from : date\n        Filter attachments younger print_date_from\n    print_date_to : date\n        Filter attachments older print_date_from\n    print_state_ne : str\n        Filter attachments exclude print_state_ne==print_state\n    print_state : str\n        Filter attachments print_state==print_state\n    order_by : str\n        Order by field\n\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The data response having the form:\n        ::\n            {\n                'id': 'attachment_id,\n                'title': 'attachment_title',\n                'label': 'attachment_title',\n                'print_date': '11/11/2011,\n                'revision_id': 'some_revision_id,\n                'policy_id': 'some_policy_id,\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "policy_id": {
                    "type": "string"
                  },
                  "revision_id": {
                    "type": "string"
                  },
                  "contact_id": {
                    "type": "string"
                  },
                  "print_date_from": {
                    "type": "string"
                  },
                  "print_date_to": {
                    "type": "string"
                  },
                  "print_state_ne": {
                    "type": "string"
                  },
                  "print_state": {
                    "type": "string"
                  },
                  "order_by": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/deliverables/queue_recovery_candidate": {
      "post": {
        "summary": "queue_recovery_candidate",
        "tags": [
          "deliverables"
        ],
        "description": "queue_recovery_candidate",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-queue_recovery_candidate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-queue_recovery_candidate"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/deliverables/regenerate_combined_billing_statements": {
      "post": {
        "summary": "regenerate_combined_billing_statements",
        "tags": [
          "deliverables"
        ],
        "description": "Generate any combined billing covers that were sent out on the specified start_date and end_date range\n    If no end_date is supplied, we work with the respective date range (start_date-1, start_date).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "start_date": {},
                  "end_date": {},
                  "group_billing_number": {},
                  "force_generation": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/deliverables/remove_edelivery_records": {
      "post": {
        "summary": "remove_edelivery_records",
        "tags": [
          "deliverables"
        ],
        "description": "Removing e-deliverable documents entities in given date range\n\n    Parameters\n    ----------\n    date_from : str, required\n        from \"print_date\"(inclusive). Format is mm/dd/yyyy\n    date_to : str, required\n        to \"print_date\"(inclusive). Format is mm/dd/yyyy\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data: dict\n        Deleted entities count\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "date_from": {
                    "type": "string"
                  },
                  "date_to": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/deliverables/retrieve_available_document_options": {
      "post": {
        "summary": "retrieve_available_document_options",
        "tags": [
          "deliverables"
        ],
        "description": "Finds all document types configured within a given Business Location that can be generated\n    with \"standard\" parameters. Excludes billing, return premium, and claim acknolwedgement\n    documents. These specific documents require more detailed processing and arguments,\n    and therefore do not fit into this description.\n\n    Parameters\n    ----------\n    location_id : str\n        The UUID of the Business Location. May be omitted if `location_abbr` or `location_name` is provided.\n    location_abbr : str\n        The abbreviation of the Business Location. May be omitted if `location_id` or `location_name` is provided.\n    location_name : str\n        The full name of the Business Location. May be omitted if `location_id` or `location_abbr` is provided.\n    module : str\n        The related module that the documents are intended for. Valid options are \"policies\" or \"claims\".\n        Defaults to \"policies\".\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : list\n        The data response having the form:\n        ::\n            [\n                \"Declaration\",\n                \"Policy Application\",\n                \"Quote Summary\"\n            ]\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "location_id": {
                    "type": "string"
                  },
                  "location_abbr": {
                    "type": "string"
                  },
                  "location_name": {
                    "type": "string"
                  },
                  "module": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/deliverables/retrieve_files_for_entity": {
      "post": {
        "summary": "retrieve_files_for_entity",
        "tags": [
          "deliverables"
        ],
        "description": "Finds all active files for a specific entity, given a reference point. Optionally can retrieve files\n    with a NULL reference object as well (example, Report files). Additional filters can also be applied\n    if desired.\n\n    Parameters\n    ----------\n    reference_id : str\n        The UUID of the object reference to which the files are associated.\n        If intentionally omitted, `allow_null_reference` is expected,\n            or `policy_number`/`claim_number` should be provided.\n    policy_number : str\n        The policy number, if `reference_id` is unknown but the files are tied to a policy.\n    claim_number : str\n        The claim number, if `reference_id` is unknown but the files are tied to a claim.\n    allow_null_reference : bool\n        If the queried files are not tied to a specific entity, pass as True (defaults to False).\n        Example: Report result files do not currently have `reference_id` to any given entity.\n    ascending : bool\n        By default, the resulting list will be ordered by `dateAdded`-descending for most recently created first.\n        Pass this in as True to show oldest first.\n    advanced_filters : list\n        A list of specific dictionaries that expands filtering to a :makevar:`File` by giving\n            explicit comparison operators.\n        Must have three keys in the dict to accomplish successful filtering and failing to pass any of\n        them will result in the given filter being ignored.\n        They are :kbd:`column`, :kbd:`operator`, :kbd:`value`\n\n        :column: The column's value in a File table.\n        :operator: The comparison operator, have a look at python's built in\n                   `operator <https://docs.python.org/2/library/operator.html>`_ package\n                   The only allowed operators are :kbd:`lt le eq ne ge gt`\n        :value: The value being compared to.\n        Below is an example of how an advanced filter dictionary looks like:\n        ::\n            {\n                \"column\": \"label\",\n                \"operator\": \"ne\",\n                \"value\": \"Form\"\n            }\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : list\n        The data response having the form:\n        ::\n            [\n                {\n                    \"id\": \"UUID\",\n                    \"title\": \"Declaration - John Smith\",\n                    \"label\": \"Declaration\",\n                    \"date_added\": \"2018-01-01 12:00:00\",\n                    \"print_state\": \"printed\",\n                    \"print_date\": \"2018-02-01\",\n                    \"actual_print_date\": \"2018-02-02\",\n                    \"folder_id\": \"UUID\",\n                    \"mime_type\": \"application/pdf\",\n                    \"size\": 4096,\n                    \"type\": \"policies\",\n                    \"sub_type\": \"New Policy\"\n                }\n            ]\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reference_id": {
                    "type": "string"
                  },
                  "policy_number": {
                    "type": "string"
                  },
                  "claim_number": {
                    "type": "string"
                  },
                  "allow_null_reference": {
                    "type": "boolean"
                  },
                  "ascending": {
                    "type": "boolean"
                  },
                  "advanced_filters": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "Returns": {
                    "type": "string"
                  },
                  "-------": {
                    "type": "string"
                  },
                  "success": {
                    "type": "boolean"
                  },
                  "messages": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "data": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/deliverables/retrieve_invoice_document": {
      "post": {
        "summary": "retrieve_invoice_document",
        "tags": [
          "deliverables"
        ],
        "description": "Handles retrieving latest active invoice PDF in base64.\n\n    Parameters\n    ----------\n    invoice_number : str\n        `0000a461-1722-4111-8b82-b0cc286306db`\n    primary_insured : bool\n        True if doc returned should be for primary insured.\n        - False to just returns latest document generated. For cases where there are multiple\n          insureds, the output result (PDF recipient) may not be consistant\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        Representation of dict result:\n        ::\n            {\n                'success': true,\n                'messages': [],\n                'content': \"the pdf encoded in base64 format\",\n                'headers': {\n                    'Content-Length': 9983,\n                    'Content-type': \"application/pdf\",\n                    'Content-Disposition':\n                        \"inline; filename=\"09-21-2018 - Installment Billing Statement - Georgie Man.pdf\"\"\n                },\n                'content_type': \"application/pdf\"\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "invoice_number": {
                    "type": "string"
                  },
                  "primary_insured": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/deliverables/retrieve_recovery_statuses": {
      "post": {
        "summary": "retrieve_recovery_statuses",
        "tags": [
          "deliverables"
        ],
        "description": "retrieve_recovery_statuses",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-retrieve_recovery_statuses"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-retrieve_recovery_statuses"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/deliverables/save_html_template": {
      "post": {
        "summary": "save_html_template",
        "tags": [
          "deliverables"
        ],
        "description": "Saves an HTMLTemplate record to be used as a BriteCore Document Jinja template.\n\n    Args:\n        name (str): Template name matching the custom_deliverable name\n        html (str): HTML string (Jinja template) for rendering\n        use_new_html_render (bool): Use new render.py for Jinja template rendering\n        use_new_pdf_render (bool): Use new render.py for PDF rendering\n        enabled (bool): Whether template is enabled\n        show_as_custom_deliverable (bool): Show as custom deliverable option\n\n    Returns:\n        dict: Response with format:\n            {\n                'success': bool,\n                'messages': list,\n                'data': {\n                    'id': uuid,\n                    'name': str,\n                    'html': str,\n                    'description': str,\n                    'preview_object': str,\n                    'use_new_html_render': bool,\n                    'use_new_pdf_render': bool,\n                    'enabled': bool,\n                    'x_report_location_id': uuid,\n                    'date_created': str,\n                    'date_updated': str\n                }\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-save_html_template"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-save_html_template"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/deliverables/save_static_resource": {
      "post": {
        "summary": "save_static_resource",
        "tags": [
          "deliverables"
        ],
        "description": "Saves a static resource to be used in BriteCore Document Jinja templates.\n\n    Parameters\n    ----------\n    name : str\n        The name to use when referencing the static resource in your Jinja template. (ex. test.png)\n    url : str\n        The URL of the static resource. This URL must be present at the time of the fetch. Using a CDN is recommended.\n    expire_in : int\n        Number of seconds before the cached version of the resource is expired.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The data response having the form:\n        ::\n            {\n                'id': 'Some UUID id',\n                # Name of static resource. Used to reference in Jinja {{ static_resource('name.png') }},\n                'name': 'name.png',\n                # The URL used to pull in the cached version of the static resource\n                'url': 'http://cdn.someurl.com/name.png',\n                'expire_in': 50000, # Number of seconds until resource auto-expires and is refreshed,\n                'date_created': \"2015-01-01 00:00:00\",\n                'date_updated': \"2015-01-01 00:00:00\",\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "url": {
                    "type": "string"
                  },
                  "expire_in": {
                    "type": "integer"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/deliverables/search_recovery_candidates": {
      "post": {
        "summary": "search_recovery_candidates",
        "tags": [
          "deliverables"
        ],
        "description": "search_recovery_candidates",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-search_recovery_candidates"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-search_recovery_candidates"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/deliverables/set_html_templates_locations": {
      "post": {
        "summary": "set_html_templates_locations",
        "tags": [
          "deliverables"
        ],
        "description": "Set the mapping between the html templates and the locations they are used in.\n    Parameters\n    ----------\n    templates_locations_mapping : dict\n        {\n            \"templates\": [{\n                \"id\": \"template_id\",\n                \"name\": \"template_name\",\n                \"location_ids\": [\"location1\", \"location2\", ...],\n            }, ... ]\n        }\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    messages : list of str\n        List of human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-set_html_templates_locations"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-set_html_templates_locations"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/deliverables/update_edelivery_records": {
      "post": {
        "summary": "update_edelivery_records",
        "tags": [
          "deliverables"
        ],
        "description": "Update edelivery_documents\n\n    Parameters\n    ----------\n    records : dict of dicts\n        records need to be updated. Format is\n        ::\n            {\n                # UUID of e-deliverable_document entity\n                \"ef763124-8b7f-4016-ac54-7d07e4adfe70\": {\n                    # desired state. One of unprocessed/pending/processed. Flags internal state of e-delivery\n                    \"state\": \"pending\"\n                },\n                \"ef763124-8b7f-4016-ac54-7d07e4adfe71\": {  # UUID of e-deliverable_document entity\n                    \"state\": \"processed\",                  # desired state. One of unprocessed/pending/processed\n                    # if set to true - document will be excluded from printing queue (except certifieds)\n                    \"exclude_from_printing_queue\": True\n                },\n                \"ef763124-8b7f-4016-ac54-7d07e4adfe72\": {  # UUID of e-deliverable_document entity\n                    \"state\": \"processed\",                  # desired state. One of unprocessed/pending/processed\n                    # if set to true - document will be excluded from printing queue (except certifieds)\n                    \"exclude_from_printing_queue\": False,\n                    # reflects state of e-delivery. Required to inform BC users about E-DElivery state of document\n                    \"edelivery_state\": \"FAILED\"\n                },\n                \"ef763124-8b7f-4016-ac54-7d07e4adfe73\": {  # UUID of e-deliverable_document entity\n                    \"state\": \"processed\",                  # desired state. One of unprocessed/pending/processed\n                    # if set to true - document will be excluded from printing queue (except certifieds)\n                    \"exclude_from_printing_queue\": False,\n                    # reflects state of e-delivery. Required to inform BC users about E-DElivery state of document\n                    \"edelivery_state\": \"NOTIFIED\",\n                    # if set to true - document will be excluded from printing queue (certifieds)\n                    \"exclude_certified_from_printing_queue\": False\n                }\n            }\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data: dict\n        Dict with update results (true or false)\n        ::\n            {\n                'ef763124-8b7f-4016-ac54-7d07e4adfe70': True,\n                'ef763124-8b7f-4016-ac54-7d07e4adfe71': False\n            }\n        ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "records": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/disbursement_funding/archive_account": {
      "post": {
        "summary": "archive_account",
        "tags": [
          "disbursement_funding"
        ],
        "description": "Archive an orphaned FA anchor. Unknown id -> success with empty data.\n\n    An absent row is not an error (same as ``disbursements.get_detail``), so a\n    stale row the operator dismisses twice does not fail the page. Returning\n    ``None`` here renders as ``data: []`` -- ``standard_response`` defaults\n    ``data_type`` to list -- not as a JSON null.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-disbursement_funding_archive_account"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-disbursement_funding_archive_account"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/disbursement_funding/check_source_balance": {
      "post": {
        "summary": "check_source_balance",
        "tags": [
          "disbursement_funding"
        ],
        "description": "One funding source's advisory available balance -- the Check balance action.\n\n    Returns ``{available}``, and ``available`` is **null when the peek was\n    UNAVAILABLE** -- the vendor was unreachable or the integration is not\n    connected. Null is not zero, and the two must not render the same way:\n    showing $0.00 for an unreachable vendor tells an operator their funding\n    source is empty when it may be full. Render null as \"Unavailable\".\n\n    Advisory by design. The vendor marks this balance non-authoritative, so the\n    service swallows a transport failure rather than failing the page; a real\n    shortfall surfaces later as a rejected top-up. Gated 'r' -- it reads, and it\n    moves nothing.\n\n    Takes the BriteCore source row id, not a vendor reference; the stored handle\n    is resolved in the service. A source the vendor lists but BC has never\n    linked has no row id yet, so it cannot be checked -- link it first.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-disbursement_funding_check_source_balance"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-disbursement_funding_check_source_balance"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/disbursement_funding/describe_connection": {
      "post": {
        "summary": "describe_connection",
        "tags": [
          "disbursement_funding"
        ],
        "description": "Is funding configured on this site, under which instance, and what may\n    this caller do.\n\n    Returns ``{connected, integration_instance_id, instance_count,\n    can_configure, can_move_money}``. The console reads this first:\n    ``connected`` false with ``instance_count`` 0 is the not-configured state,\n    and greater than 1 is an ambiguous configuration the operator has to fix --\n    no instance id is returned for either, so no other endpoint here can be\n    called against a guess.\n\n    The two capability flags exist so the screens can DISABLE an action they\n    know will be refused, and say why, instead of letting the operator click it\n    and read an error. They are the page-load half of the rule this console\n    follows for permissions: render from the page-load read, re-check fresh on\n    the action, and always say why. Nothing is trusted to them -- every write\n    is still gated independently by its own ``@requires_permission`` at the\n    gateway and, for money, re-checked in the service. A caller who forges\n    ``can_move_money`` gains exactly nothing.\n\n    Read at the API layer rather than in the service on purpose: this is an\n    authorization question about the *request*, and the service is also driven\n    by the ``bin/`` money drivers, which have no session and must not start\n    consulting one. The shared ``core.permissions.caller_may`` reports False without a\n    session rather than raising, mirroring ``_require_money_action_permission``:\n    no session means a trusted caller, which is not a browser, so the flags do\n    not pretend to know.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-disbursement_funding_describe_connection"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-disbursement_funding_describe_connection"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/disbursement_funding/get_financial_account_balance": {
      "post": {
        "summary": "get_financial_account_balance",
        "tags": [
          "disbursement_funding"
        ],
        "description": "The FA's live balance, in dollars -- the overview's balance card.\n\n    Returns ``available`` / ``incoming`` / ``outbound_pending``. The vendor is\n    the source of truth and nothing is stored, so this is what **Refresh**\n    re-reads.\n\n    Two limits the rendered figure inherits, both deliberate MVP positions from\n    BC-23640 and worth knowing before anyone treats ``incoming`` as exact: the\n    computed incoming does not follow pagination (one call, limit 100) and does\n    not count the payments-balance payout rail.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-disbursement_funding_get_financial_account_balance"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-disbursement_funding_get_financial_account_balance"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/disbursement_funding/link_funding_source": {
      "post": {
        "summary": "link_funding_source",
        "tags": [
          "disbursement_funding"
        ],
        "description": "First-time link of a live vendor source into BC's waterfall.\n\n    ``priority`` defaults to 1 and is validated in the service against the\n    funding schema, so a non-waterfall position never reaches the column.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-disbursement_funding_link_funding_source"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-disbursement_funding_link_funding_source"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/disbursement_funding/list_financial_account_transactions": {
      "post": {
        "summary": "list_financial_account_transactions",
        "tags": [
          "disbursement_funding"
        ],
        "description": "One page of the FA's live ledger -- the overview's Account activity card.\n\n    Money is re-denominated to dollars at the service boundary. Pass the\n    previous response's ``next_pagination_cursor`` to fetch the next page, omit\n    it for the first (this is a user-paged \"Load more\", not a background sweep).\n\n    A row is credit, debit, trailing_balance, description and -- when the\n    integration system supplies it (BC-24754) -- ``posted_at``, the vendor's own\n    entry timestamp, passed through verbatim and null until the IS emits it.\n    There is still no entry id, type or status, so the mock's Type / Status\n    columns and its row menu cannot be rendered from this feed; see the plan's\n    D1.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-disbursement_funding_list_financial_account_transactions"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-disbursement_funding_list_financial_account_transactions"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/disbursement_funding/list_funding_requests": {
      "post": {
        "summary": "list_funding_requests",
        "tags": [
          "disbursement_funding"
        ],
        "description": "BC's money-IN log for one FA, newest first -- the \"Money added\" card.\n\n    Returns ``{items, has_more}``. Each row carries when / how much / from which\n    source / the outcome, plus the error context behind a non-success: outcome\n    ``succeeded`` renders as Submitted (the bank accepted the pull), ``settled``\n    as Funded (the money arrived), ``returned`` as Returned (the bank sent it\n    back, before or after settlement -- code / reason in ``error_code`` /\n    ``error``), ``vendor_rejected`` as Declined, and ``transport_failed`` as\n    Needs review -- the last meaning the response was lost and **money may have\n    moved**, never a clean failure. The settlement sweep (BC-24754) is what\n    advances ``succeeded`` to the two terminal states.\n\n    Takes no ``integration_instance_id``: this reads BC's own append-only log by\n    FA id and makes no vendor call, so there is no instance to dispatch against.\n    It is also why this card can disagree with the balance and activity cards\n    while a pull settles -- a row appears here at once, the vendor may take\n    hours to reflect it.\n\n    ``limit`` is clamped in the service; a missing or non-positive value gets\n    the default page rather than an error.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-disbursement_funding_list_funding_requests"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-disbursement_funding_list_funding_requests"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/disbursement_funding/list_funding_sources": {
      "post": {
        "summary": "list_funding_sources",
        "tags": [
          "disbursement_funding"
        ],
        "description": "The live vendor source set, left-joined with BC's stored waterfall state.\n\n    Returns ``{items: [...]}`` in the engine's waterfall order -- (priority,\n    dateAdded, id), so ties come back the way the auto top-up reads them --\n    with never-linked sources last.\n    Each row carries the vendor payload plus ``source_id`` and ``priority``,\n    both null when the source has never been linked in BC -- that is the\n    ``link_funding_source`` case, where a linked row re-prioritizes through\n    ``set_source_priority`` instead.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-disbursement_funding_list_funding_sources"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-disbursement_funding_list_funding_sources"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/disbursement_funding/manage_account": {
      "post": {
        "summary": "manage_account",
        "tags": [
          "disbursement_funding"
        ],
        "description": "Onboard a discoverable vendor FA as a BC anchor; returns the anchor.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-disbursement_funding_manage_account"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-disbursement_funding_manage_account"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/disbursement_funding/reconcile_view": {
      "post": {
        "summary": "reconcile_view",
        "tags": [
          "disbursement_funding"
        ],
        "description": "Diff the live vendor FA set against BC's stored anchors; persists nothing.\n\n    Returns ``{matched, discoverable, orphaned}``. ``matched`` rows carry both\n    sides (``stored`` anchor + live ``vendor`` payload) because the vendor owns\n    display / status / features and BC owns only the anchor; ``discoverable`` is\n    a vendor account the operator can onboard via ``manage_account``;\n    ``orphaned`` is a stored anchor the vendor no longer returns, which\n    ``archive_account`` clears. There is deliberately no ``drifted`` state.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-disbursement_funding_reconcile_view"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-disbursement_funding_reconcile_view"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/disbursement_funding/request_source_entry": {
      "post": {
        "summary": "request_source_entry",
        "tags": [
          "disbursement_funding"
        ],
        "description": "Mint a vendor source-entry session and return the embed payload verbatim.\n\n    The payload is vendor-shaped and modeled nowhere in BC; mounting it is\n    BC-23257 (S5). Gated 'rw' because it opens an add-a-source flow, not because\n    it moves money -- it does not.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-disbursement_funding_request_source_entry"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-disbursement_funding_request_source_entry"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/disbursement_funding/set_source_priority": {
      "post": {
        "summary": "set_source_priority",
        "tags": [
          "disbursement_funding"
        ],
        "description": "Re-position an already-linked source in the waterfall by BC row id.\n\n    Unknown id -> success with empty data (``data: []``, as in\n    ``archive_account``). ``priority`` is required here and its\n    value is validated in the service -- unlike ``link_funding_source``, which\n    defaults an omitted position to 1: a first link has an obvious default, a\n    deliberate re-position does not. Use ``link_funding_source`` for a source BC\n    has never stored.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-disbursement_funding_set_source_priority"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-disbursement_funding_set_source_priority"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/disbursement_funding/top_up": {
      "post": {
        "summary": "top_up",
        "tags": [
          "disbursement_funding"
        ],
        "description": "Pull ``amount`` dollars from a source into the FA -- **this moves money**.\n\n    Backs Add money. With auto top-up and JIT both out of the MVP, this is the\n    only way money enters the funding account.\n\n    Three things about this endpoint are deliberate and should not be\n    \"simplified\" away:\n\n    1. **``request_id`` is caller-supplied and is the vendor Idempotency-Key.**\n       The console mints it when the modal OPENS, not on submit -- that is what\n       makes a double-click dedupe to one pull rather than two. A reused id\n       describing different money is rejected outright.\n    2. **No ``initiated_by_contact_id`` parameter.** The service pins the\n       initiator to the authenticated session (``_resolve_initiator``). Taking\n       one from the body would let a permitted user attribute a real pull to\n       another contact, and the permission gate proves only that the caller MAY\n       move money, not that they ARE the submitted initiator.\n    3. **``commit_attempt=db.safe_commit`` -- the one place this module does not\n       leave its write to the decorator.** The audit row must be durable INSIDE\n       the service's per-FA lock: ``api_request``'s generic error handler rolls\n       the session back, so without this hook any failure after the vendor pull\n       would discard the row while the money had already moved. Committing\n       early is also what lets a concurrent auto evaluation see the row it must\n       debounce against. The decorator's own commit afterwards is a harmless\n       no-op.\n\n    Gated on ``britecore/payments/funding/topUp`` (rw), NOT on the console's\n    config permission -- config rights must not imply moving money. The service\n    re-checks the same path independently.\n\n    Two service exceptions are allowed to propagate rather than being folded\n    into a tidy response, because both carry meaning a caller must not lose:\n    ``FundingAuditIntegrityError`` (a pull was attempted and the row did not\n    persist -- money may have moved) and ``FundingLockUnavailableError`` (Redis\n    down; fail-closed, no money moved). Their messages reach the caller through\n    the decorator's error envelope.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-disbursement_funding_top_up"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-disbursement_funding_top_up"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/disbursements/admin_terminate": {
      "post": {
        "summary": "admin_terminate",
        "tags": [
          "disbursements"
        ],
        "description": "Operator admin-terminate of a stuck pending ACH attempt (justification\n    required).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-disbursements_admin_terminate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-disbursements_admin_terminate"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/disbursements/aggregates": {
      "post": {
        "summary": "aggregates",
        "tags": [
          "disbursements"
        ],
        "description": "Per-state counts + amount sums: ``{by_state: {<state>: {count, amount}}}``.\n\n    Optional filters are enum / UUID / date validated against the published\n    contract instead of being forwarded raw. added_from / added_to mirror the\n    `list` grid so a date-filtered view gets a matching aggregate card\n    (BC-22436).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-disbursements_aggregates"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-disbursements_aggregates"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/disbursements/cancel": {
      "post": {
        "summary": "cancel",
        "tags": [
          "disbursements"
        ],
        "description": "Operator cancel of an in_transit ACH attempt (justification required).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-disbursements_cancel"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-disbursements_cancel"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/disbursements/check_vendor": {
      "post": {
        "summary": "check_vendor",
        "tags": [
          "disbursements"
        ],
        "description": "Reconcile a stuck pending ACH attempt against the vendor: if the vendor\n    holds a reference -> advance to in_transit (writing the ref in the CAS);\n    else stay pending. Idempotent.\n\n    This endpoint owns the unit of work around the vendor round-trip (the\n    service no longer commits/rolls back): validate + capture the row, COMMIT to\n    close the read txn BEFORE the synchronous get_vendor_reference call (so no DB\n    transaction is held across the vendor HTTP round-trip), then apply the vendor\n    result and COMMIT the transition + exported projection. On error the\n    @api_request wrapper rolls back the request (a lost CAS wrote 0 rows, so\n    there is nothing to strand).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-disbursements_check_vendor"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-disbursements_check_vendor"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/disbursements/get_detail": {
      "post": {
        "summary": "get_detail",
        "tags": [
          "disbursements"
        ],
        "description": "Full serialized attempt plus folded single-row source enrichment.\n\n    Absent row -> success=true, data null/empty; bad UUID -> BCValidationError.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-disbursements_get_detail"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-disbursements_get_detail"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/disbursements/issue": {
      "post": {
        "summary": "issue",
        "tags": [
          "disbursements"
        ],
        "description": "Issue (or re-issue / retry) a batch of Commission Payments via ACH.\n\n    ``items`` is a list of ``{commission_payment_id, payment_method_id}``. The\n    re-issue path is the same call: a failed row released the obligation mutex,\n    so re-issuing INSERTs a new pending attempt and leaves the failed row as\n    history. Serializes each IssuanceResult: ``{items:[...]}``.\n\n    ``integration_instance_id`` and every item's ``commission_payment_id`` /\n    ``payment_method_id`` are required UUIDs (validated against the published\n    contract) so malformed / missing ids fail up front rather than falling\n    through to per-item service results.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-disbursements_issue"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-disbursements_issue"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/disbursements/list_disbursements": {
      "post": {
        "summary": "list_disbursements",
        "tags": [
          "disbursements"
        ],
        "description": "All-attempts grid (lean rows only, no source fan-out).\n\n    ``transaction_type`` routes to ``list_by_type``; otherwise ``list_all``.\n    Returns ``{items, page, page_size, total}``.\n\n    NOT named ``list``: api/v2 routing maps the last URL segment straight to a\n    function name, and ``def list`` shadowed the builtin for this whole module,\n    so a plain ``isinstance(x, list)`` anywhere in here raised TypeError. That\n    bit BC-24593 in production-shaped traffic. Public URL is therefore\n    ``POST /api/v2/disbursements/list_disbursements``.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-disbursements_list_disbursements"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-disbursements_list_disbursements"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/disbursements/mark_failed": {
      "post": {
        "summary": "mark_failed",
        "tags": [
          "disbursements"
        ],
        "description": "Transition an attempt to failed.\n\n    Body adds ``failure_origin`` (one of vendor_rejected / recipient_returned /\n    cancel_acknowledged; ``admin_terminate`` is operator-only and rejected by\n    the engine as ``incompatible_current_state``), ``failure_code``,\n    ``failure_reason``, and optional ``ach_return_code`` (max 8). The required\n    source state is derived from ``failure_origin`` by the engine\n    (vendor_rejected<-pending, recipient_returned / cancel_acknowledged\n    <-in_transit).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-mark_failed"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-mark_failed"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/disbursements/mark_in_transit": {
      "post": {
        "summary": "mark_in_transit",
        "tags": [
          "disbursements"
        ],
        "description": "Transition an attempt pending -> in_transit (IS reports the vendor\n    accepted the submission). Body adds ``vendor_reference_id`` (the IS/vendor\n    handle for the operation, max 255) to the common envelope.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-mark_in_transit"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-mark_in_transit"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/disbursements/mark_settled": {
      "post": {
        "summary": "mark_settled",
        "tags": [
          "disbursements"
        ],
        "description": "Transition an attempt in_transit -> settled (IS reports the vendor\n    settled the funds). No extra body beyond the common envelope.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-mark_settled"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-mark_settled"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/disbursements/needs_attention": {
      "post": {
        "summary": "needs_attention",
        "tags": [
          "disbursements"
        ],
        "description": "Latest failed-with-no-live-successor attempts, deduped per obligation.\n\n    Returns ``{items, page, page_size, total, count, amount_sum}`` (the grid +\n    the deduped aggregate card). rail / integration_instance_id / added_from /\n    added_to mirror the `list` grid so a filtered all-attempts view gets a\n    matching worklist total (BC-22436); there is no state filter (the surface is\n    inherently the terminal `failed` set).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-disbursements_needs_attention"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-disbursements_needs_attention"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/disbursements/obligation_history": {
      "post": {
        "summary": "obligation_history",
        "tags": [
          "disbursements"
        ],
        "description": "All attempts for one obligation, newest first: ``{items:[...]}``.\n\n    Both ``transaction_type`` (enum) and ``transaction_id`` (UUID) are required\n    and validated against the published contract.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-disbursements_obligation_history"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-disbursements_obligation_history"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/disbursements/record_manual": {
      "post": {
        "summary": "record_manual",
        "tags": [
          "disbursements"
        ],
        "description": "Record a disbursement made OUTSIDE BriteCore (rail='manual'), created\n    directly settled. Justification required; operator resolved server-side.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-disbursements_record_manual"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-disbursements_record_manual"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/disbursements/source_enrichment": {
      "post": {
        "summary": "source_enrichment",
        "tags": [
          "disbursements"
        ],
        "description": "Batched per-attempt source enrichment (payee name, live-successor flag,\n    commission source block).\n\n    ``disbursement_attempt_ids`` is a REQUIRED, bounded list of UUIDs (validated\n    by the request schema): a missing/omitted value is a malformed request\n    (success=false), NOT a silent empty ``{}``, and a bare UUID string is\n    rejected rather than iterated character-by-character downstream.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-disbursements_source_enrichment"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-disbursements_source_enrichment"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/disbursements/unissued_obligations": {
      "post": {
        "summary": "unissued_obligations",
        "tags": [
          "disbursements"
        ],
        "description": "Commission obligations that are claimable but have NO disbursement\n    attempt yet, each tagged ``ready_to_send`` or ``awaiting_funds``\n    (BC-24980, TXN T5).\n\n    The attempt-table reads (``list_disbursements`` and friends) cannot see a\n    payment that is still waiting to go out; this is the read that can.\n    Membership is the commission export's own claim classifier, and the tag\n    is the SAME whole-selection funding-gate verdict the export applies up\n    front, so the page and the export agree. Returns ``{items, page,\n    page_size, total, funding_gate: {applied, available, obligation_total,\n    blocked}}``; ``funding_gate.blocked`` is why every row is\n    ``awaiting_funds``. Fails open like the gate: funding unconfigured or a\n    failed balance read -> ``applied=false`` and every row ``ready_to_send``.\n\n    ``transaction_type`` is optional and, in this build, only Commission\n    Payment (anything else is a validation error, not an empty page).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-disbursements_unissued_obligations"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-disbursements_unissued_obligations"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/disbursements/update_exported_check_details": {
      "post": {
        "summary": "update_exported_check_details",
        "tags": [
          "disbursements"
        ],
        "description": "Write check number, check date, and/or cleared date onto already-exported\n    outbound checks (return premium, claim payment, or commission payment).\n\n    Same shape as the export helper in ``api.v2.utils``: validate the batch,\n    lock matching rows in three IN queries, bulk-update the successes, and\n    write force-overwrite notes in the same transaction. Request-level errors\n    (bad UUID, duplicate ids, invalid dates) fail the call. Per-row errors\n    (not found, not exported, voided, canceled/rejected/transferred return\n    premium, electronic or net commission, negative commission, claim\n    recovery or untyped claim) go in ``failed`` and do not roll back the rest.\n\n    Parameters\n    ----------\n    records : list of dict, required\n        Batch of partial updates. Each object must include ``id`` (UUID). Any of\n        ``check_number``, ``check_date``, ``cleared_date`` may be sent; omitted\n        fields are left alone. A mixed batch is allowed. The row must already\n        be exported and must not be voided, canceled, rejected, transferred,\n        an electronic, net, or negative commission, or a non-payment claim.\n        Replacing a value that is already set\n        requires ``force_update`` on that record and writes a system note on\n        the related policy, claim, or payee contact. ``check_number`` must be\n        an integer from 1 to 2147483647. Check dates accept ``YYYY-MM-DD``,\n        ``YYYY-MM-DD HH:MM:SS``, or ``YYYY-MM-DDTHH:MM:SS``.\n\n        ::\n            {\n                \"records\": [\n                    {\"id\": \"<uuid>\", \"check_number\": 1001, \"check_date\": \"2026-08-26\"},\n                    {\"id\": \"<uuid>\", \"cleared_date\": \"2026-09-15\"},\n                    {\"id\": \"<uuid>\", \"check_number\": 1002, \"force_update\": true}\n                ]\n            }\n\n    Returns\n    -------\n    data : dict\n        ``updated`` is the list of rows that were written, including the\n        resolved ``payment_type``. ``failed`` is per-row errors (not found,\n        not exported, voided, canceled/rejected/transferred return premium,\n        electronic, net, or negative commission, claim recovery or untyped\n        claim, or a field that is already set without ``force_update``).\n        Request-level errors use the standard v2 envelope with ``data: []``.\n\n    Schemas: ``lib/api/api_specs/request-update_exported_check_details.json``\n    and ``lib/api/api_specs/response-update_exported_check_details.json``.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-update_exported_check_details"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-update_exported_check_details"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/disputes/bulk_create_disputes": {
      "post": {
        "summary": "bulk_create_disputes",
        "tags": [
          "disputes"
        ],
        "description": "\n    Create multiple disputes for a claim atomically.\n\n    Args:\n        claim_id (str): The claim id.\n        disputes (list): List of dispute dicts.\n\n    Returns:\n        list: Serialized list of created disputes.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-bulk_create_disputes"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-bulk_create_disputes"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/disputes/create_dispute": {
      "post": {
        "summary": "create_dispute",
        "tags": [
          "disputes"
        ],
        "description": "\n    Create a new dispute.\n\n    Args:\n        dispute (dict): The dispute data to be created.\n        {\n            \"name\": \"string\",\n            \"type\": \"string\",\n            \"dispute_dates\": [\n                {\"date\": \"2023-01-01\", \"type\": \"X\"}\n            ],\n            \"dispute_settlements\": [\n                {\"amount\": 100, \"date\": \"2023-01-01\", \"type\": \"Y\"}\n            ],\n            \"case_number\": \"string\",\n            \"claim_id\": <claim.id>,\n            \"court_type\": \"string\",  # CLAIMS_COURT_TYPE quick code value\n            \"defendant_attorney_id\": <contact.id>,\n            \"defendant_firm_id\": <contact.id>,\n            \"docket_number\": \"string\",\n            \"handling_claims_adjuster_id\": <contact.id>,\n            \"is_appraisal_requested\": True,\n            \"is_codefendant\": True,\n            \"is_structured_settlement\": True,\n            \"judge_id\": <contact.id>,\n            \"lawsuit_name\": \"string\",\n            \"lawsuit_state\": \"string\",\n            \"lawsuit_status\": \"string\",\n            \"lawsuit_type\": \"string\",\n            \"name\": \"string\",\n            \"plaintiff_attorney_id\": <contact.id>,\n            \"plaintiff_firm_id\": <contact.id>,\n            \"remarks\": \"string\",\n            \"type\": \"string\",\n        }\n\n    Returns:\n        dict: The serialized representation of the newly created dispute.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-create_dispute"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-create_dispute"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/disputes/delete_dispute": {
      "post": {
        "summary": "delete_dispute",
        "tags": [
          "disputes"
        ],
        "description": "\n    Delete a dispute.\n\n    Args:\n        dispute_id (uuid): The dispute id.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-delete_dispute"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-delete_dispute"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/disputes/list_disputes": {
      "post": {
        "summary": "list_disputes",
        "tags": [
          "disputes"
        ],
        "description": "\n    List all disputes for a claim.\n\n    Args:\n        claim_id (uuid): The claim id.\n\n    Returns:\n        list: A list of the serialized representations of the disputes.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-list_disputes"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-list_disputes"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/disputes/update_dispute": {
      "post": {
        "summary": "update_dispute",
        "tags": [
          "disputes"
        ],
        "description": "\n    Update a dispute.\n\n    dispute_dates and dispute_settlements whose IDs do not appear in the\n    request will be deleted.\n    dispute_dates and dispute_settlements with IDs will be added as new.\n    An empty list of dispute_dates or dispute_settlements will remove all.\n\n    Args:\n        dispute (dict): The dispute data to be updated.\n        {\n            \"id\": <uuid>,\n            \"name\": \"string\",\n            \"type\": \"string\",\n            \"dispute_dates\": [\n                {\"date\": \"2023-01-01\", \"type\": \"X\"},\n                {\"id\": <uuid>, \"date\": \"2023-01-01\", \"type\": \"X\"}\n            ],\n            \"dispute_settlements\": [\n                {\"amount\": 100, \"date\": \"2023-01-01\", \"type\": \"Y\"}\n                {\"id\": <uuid>, \"amount\": 100, \"date\": \"2023-01-01\", \"type\": \"Y\"}\n            ],\n            \"case_number\": \"string\",\n            \"claim_id\": <claim.id>,  # must match the persisted owner; reassignment is rejected\n            \"court_type\": \"string\",  # CLAIMS_COURT_TYPE quick code value\n            \"defendant_attorney_id\": <contact.id>,\n            \"defendant_firm_id\": <contact.id>,\n            \"docket_number\": \"string\",\n            \"handling_claims_adjuster_id\": <contact.id>,\n            \"is_appraisal_requested\": True,\n            \"is_codefendant\": True,\n            \"is_structured_settlement\": True,\n            \"judge_id\": <contact.id>,\n            \"lawsuit_name\": \"string\",\n            \"lawsuit_state\": \"string\",\n            \"lawsuit_status\": \"string\",\n            \"lawsuit_type\": \"string\",\n            \"name\": \"string\",\n            \"plaintiff_attorney_id\": <contact.id>,\n            \"plaintiff_firm_id\": <contact.id>,\n            \"remarks\": \"string\",\n            \"type\": \"string\",\n        }\n\n    Returns:\n        dict: The serialized representation of the updated dispute.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-update_dispute"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-update_dispute"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/document_summary/check_cached_summaries": {
      "post": {
        "summary": "check_cached_summaries",
        "tags": [
          "document_summary"
        ],
        "description": "Check which files already have cached AI summaries without triggering generation.\n\n    Parameters\n    ----------\n    params : dict\n        {\n            \"file_ids\": [\"uuid-1\", \"uuid-2\"]  (required)\n        }\n\n    Returns\n    -------\n    dict\n        {\n            \"summaries\": [\n                {\n                    \"file_id\": \"uuid-1\",\n                    \"summary\": \"This document is a...\",\n                    \"success\": true\n                }\n            ]\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "params": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/document_summary/generate_document_summary": {
      "post": {
        "summary": "generate_document_summary",
        "tags": [
          "document_summary"
        ],
        "description": "Generate AI-powered summaries for documents attached to a policy.\n\n    Retrieves all attachments (or a filtered subset) for the given policy,\n    extracts their text content, and sends each to an LLM for summarization.\n\n    Parameters\n    ----------\n    params : dict\n        {\n            \"policy_id\": \"uuid-1\"  (required),\n            \"file_ids\": [\"uuid-2\", \"uuid-3\"]  (optional, defaults to all documents)\n        }\n\n    Returns\n    -------\n    dict\n        {\n            \"policy_id\": \"uuid-1\",\n            \"policy_number\": \"1234\",\n            \"total_documents\": 2,\n            \"summaries\": [\n                {\n                    \"file_id\": \"uuid-2\",\n                    \"filename\": \"declaration.pdf\",\n                    \"mime_type\": \"application/pdf\",\n                    \"size\": 102400,\n                    \"summary\": \"This document is a...\",\n                    \"error\": null,\n                    \"success\": true\n                },\n                ...\n            ]\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "params": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/document_templates/create_calculated_field": {
      "post": {
        "summary": "create_calculated_field",
        "tags": [
          "document_templates"
        ],
        "description": "\n    Create a new calculated field. Always appended at the end (highest sort_order).\n    Use sort_calculated_field to change ordering.\n\n    Parameters:\n        field_name: str - required, valid Python identifier\n        path: str - where to evaluate ('' for root, 'drivers' for arrays)\n        expression: str - restricted Python expression\n        description: str - optional description\n        x_report_location_id: str or None - None for global, ID for template-specific\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-create_calculated_field"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-create_calculated_field"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/document_templates/delete_calculated_field": {
      "post": {
        "summary": "delete_calculated_field",
        "tags": [
          "document_templates"
        ],
        "description": "\n    Delete a calculated field.\n\n    Parameters:\n        id: str - the field ID to delete\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-delete_calculated_field"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-delete_calculated_field"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/document_templates/get_available_functions": {
      "post": {
        "summary": "get_available_functions",
        "tags": [
          "document_templates"
        ],
        "description": "\n    Get reference documentation for available custom functions.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_available_functions"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/document_templates/list_calculated_fields": {
      "post": {
        "summary": "list_calculated_fields",
        "tags": [
          "document_templates"
        ],
        "description": "\n    List calculated fields. Each field has a `type` field ('global' or\n    'template') derived from x_report_location_id.\n\n    Parameters:\n        x_report_location_id: str or None\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-list_calculated_fields"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-list_calculated_fields"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/document_templates/sort_calculated_field": {
      "post": {
        "summary": "sort_calculated_field",
        "tags": [
          "document_templates"
        ],
        "description": "\n    Move a calculated field to a new position within its scope.\n    Same pattern as sortUnderwritingRules - takes a single field ID\n    and its new index position.\n\n    Parameters:\n        field_id: str - the field to move\n        new_order: int - the new 0-based index position\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-sort_calculated_field"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-sort_calculated_field"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/document_templates/test_expression": {
      "post": {
        "summary": "test_expression",
        "tags": [
          "document_templates"
        ],
        "description": "\n    Test an expression against provided context data.\n\n    Parameters:\n        expression: str - the expression to evaluate\n        path: str - path context ('' for root, 'drivers' for arrays)\n        context: dict - the context data to evaluate against\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-test_expression"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-test_expression"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/document_templates/update_calculated_field": {
      "post": {
        "summary": "update_calculated_field",
        "tags": [
          "document_templates"
        ],
        "description": "\n    Update an existing calculated field. sort_order cannot be changed here;\n    use sort_calculated_field instead.\n\n    Parameters:\n        id: str - required, the field ID to update\n        field_name: str - optional new field name\n        path: str - optional new path\n        expression: str - optional new expression\n        description: str - optional new description\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-update_calculated_field"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-update_calculated_field"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/drivers/create_driver": {
      "post": {
        "summary": "create_driver",
        "tags": [
          "drivers"
        ],
        "description": "create_driver",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/drivers/delete_driver": {
      "post": {
        "summary": "delete_driver",
        "tags": [
          "drivers"
        ],
        "description": "delete_driver",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/drivers/get_driver": {
      "post": {
        "summary": "get_driver",
        "tags": [
          "drivers"
        ],
        "description": "get_driver",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/drivers/list_custom_fields_types": {
      "post": {
        "summary": "list_custom_fields_types",
        "tags": [
          "drivers"
        ],
        "description": "list_custom_fields_types",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-list_custom_fields_types"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-list_custom_fields_types"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/drivers/list_driver_integration_reports": {
      "post": {
        "summary": "list_driver_integration_reports",
        "tags": [
          "drivers"
        ],
        "description": "list_driver_integration_reports",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/drivers/list_drivers_for_quote": {
      "post": {
        "summary": "list_drivers_for_quote",
        "tags": [
          "drivers"
        ],
        "description": "list_drivers_for_quote",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/drivers/update_driver": {
      "post": {
        "summary": "update_driver",
        "tags": [
          "drivers"
        ],
        "description": "update_driver",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/erp/get_erp_items": {
      "post": {
        "summary": "get_erp_items",
        "tags": [
          "erp"
        ],
        "description": "\n    Retrieve ERP items for a specific policy.\n\n    Parameters\n    ----------\n    policy_id : str\n        The UUID of the policy\n    revision_id : str, optional\n        The UUID of a revision. When supplied, only that revision's ERP items are\n        returned; otherwise all non-archived revisions are included.\n\n    Returns\n    -------\n    dict\n        Response containing policy_id and list of ERP items:\n        ::\n            {\n                \"policy_id\": \"uuid\",\n                \"items\": [\n                    {\n                        \"id\": \"uuid\",\n                        \"revision_id\": \"uuid\",\n                        \"item_id\": \"uuid\",\n                        \"item_name\": \"string\",\n                        \"category\": \"policy|property\",\n                        \"erp_duration\": 365,\n                        \"erp_start_date\": \"YYYY-MM-DD\",\n                        \"erp_end_date\": \"YYYY-MM-DD\",\n                        \"property_id\": \"uuid (optional)\",\n                        \"property_name\": \"string (optional)\"\n                    }\n                ]\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_erp_items"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_erp_items"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/errors/get_internal_error": {
      "post": {
        "summary": "get_internal_error",
        "tags": [
          "errors"
        ],
        "description": "Gets an InternalError by id\n\n    Parameters\n    ----------\n    internal_error_id : str, required\n        The name to use when referencing the HTMLTemplate.\n\n    Returns\n    -------\n    success : bool\n        Whether or not the operation was successful\n    id : str\n        The id of the InternalError.\n    html : str\n        The default generated html error.\n    message : str\n        The message produced by the error.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "internal_error_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/exposure_remap/change_with_remap": {
      "post": {
        "summary": "change_with_remap",
        "tags": [
          "exposure_remap"
        ],
        "description": "Atomically save the loss date and apply the adjuster's decision for each exposure.\n\n    Schemas: lib/api/api_specs/request-change_with_remap.json and\n    lib/api/api_specs/response-change_with_remap.json.\n\n    Request Payload\n    ---------------\n    {\n        \"claim_id\": str,\n        \"loss_date\": str,\n        \"decisions\": [{\"exposure_id\": str, \"action\": \"remap\"|\"assign\"|\"discard\",\n                       \"target_coverage_id\": str}]   # target required for remap/assign\n    }\n\n    Returns\n    -------\n    {\"remapped\": int, \"discarded\": int}\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-change_with_remap"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-change_with_remap"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/exposure_remap/preview": {
      "post": {
        "summary": "preview",
        "tags": [
          "exposure_remap"
        ],
        "description": "Dry run for the BC-22410 exposure remap -- mutates nothing.\n\n    Schemas: lib/api/api_specs/request-exposure_remap_preview.json and\n    lib/api/api_specs/response-exposure_remap_preview.json.\n\n    Request Payload\n    ---------------\n    {\n        \"claim_id\": str,\n        \"loss_date\": str        # ISO date/datetime the loss date would change to\n    }\n\n    Returns\n    -------\n    {\n        \"items\": [{\"exposure_id\", \"coverage_name\", \"sub_line\", \"current_coverage_id\",\n                   \"suggested_coverage_id\", \"has_payments\", \"has_reserves\", \"bucket\"}],\n        \"candidates\": [{\"coverage_id\", \"name\", \"sub_line\"}],   # coverages on the loss-date revision\n        \"payment_blocked\": [exposure_id, ...]\n    }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-exposure_remap_preview"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-exposure_remap_preview"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/files/generate_download_url": {
      "post": {
        "summary": "generate_download_url",
        "tags": [
          "files"
        ],
        "description": "\n    Generates a direct download URL for the given file ID.\n\n    Parameters\n    ---------\n    file_id : str\n    expires_in : int\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        ::\n        {\n            download_url : str\n            file : dict\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "file_id": {},
                  "expires_in": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/files/generate_upload_url_for_tmp_file": {
      "post": {
        "summary": "generate_upload_url_for_tmp_file",
        "tags": [
          "files"
        ],
        "description": "\n    Generates a presigned S3 POST URL so a caller can upload a file directly\n    to S3, without BriteCore ever touching the bytes.\n\n    Creates a minimal ``File`` row backing the returned ``file_id``, so once\n    the caller has uploaded, the existing generate_download_url resolves it\n    unchanged. The minted key always lives under the tenant's own S3 prefix\n    followed by the enforced ``\"uploads/tmp_files/\"`` base; ``key_suffix``\n    may only append a further relative sub-path after that base, never\n    replace or escape it.\n\n    Parameters\n    ----------\n    content_type : str, required\n        The MIME type the uploaded object will be stored with. Also used to\n        derive the S3 key's file extension.\n    key_suffix : str, optional\n        A relative sub-path (no leading slash, no ``..`` segments) appended\n        after the enforced ``\"uploads/tmp_files/\"`` base, e.g. ``\"carbone/\"``\n        yields ``\"uploads/tmp_files/carbone/\"``.\n    expires_in : int, optional\n        Presigned POST TTL in seconds. Defaults to 600; cannot exceed 7 days\n        (the AWS SDK's upper limit).\n    max_size : int, optional\n        Maximum allowed upload size in bytes, enforced via the presigned\n        POST's content-length-range condition. Defaults to 26214400 (25MB).\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        ::\n        {\n            file_id : str        # the real File.id backing the upload,\n                                  # usable directly with generate_download_url\n            upload_url : str\n            upload_fields : dict\n            bucket : str\n            expires_at : str     # ISO-8601 UTC timestamp\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-files_generate_upload_url_for_tmp_file"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-files_generate_upload_url_for_tmp_file"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/files/retrieve_active_file_objects": {
      "post": {
        "summary": "retrieve_active_file_objects",
        "tags": [
          "files"
        ],
        "description": "\n    Retrieve a list of active file objects filtered by specified criteria.\n\n    This API allows consumers to identify new file objects based on date filters and optionally by label.\n\n    Parameters\n    ----------\n    date_added_from : str, required\n        The starting date and time for file addition, format YYYY-mm-dd HH:MM:SS.\n    date_added_to : str, required\n        The ending date and time for file addition, format YYYY-mm-dd HH:MM:SS.\n    print_date_from : str, required\n        The starting print date for files, format YYYY-mm-dd.\n    print_date_to : str, required\n        The ending print date for files, format YYYY-mm-dd.\n    label : str, optional\n        An optional label to further filter the file objects.\n\n    Returns\n    -------\n    success : bool\n        True if the query was successful, False otherwise.\n    messages : list of str\n        List of messages detailing any errors encountered during execution.\n    data : dict\n        A dictionary containing a list of filtered file objects under the key \"files\".\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "date_added_from": {
                    "type": "string"
                  },
                  "date_added_to": {
                    "type": "string"
                  },
                  "print_date_from": {
                    "type": "string"
                  },
                  "print_date_to": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/geometries/create_geometry": {
      "post": {
        "summary": "create_geometry",
        "tags": [
          "geometries"
        ],
        "description": "create_geometry",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/geometries/delete_geometry": {
      "post": {
        "summary": "delete_geometry",
        "tags": [
          "geometries"
        ],
        "description": "delete_geometry",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/geometries/get_geometries": {
      "post": {
        "summary": "get_geometries",
        "tags": [
          "geometries"
        ],
        "description": "get_geometries",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/geometries/get_geometry": {
      "post": {
        "summary": "get_geometry",
        "tags": [
          "geometries"
        ],
        "description": "get_geometry",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/geometries/update_geometry": {
      "post": {
        "summary": "update_geometry",
        "tags": [
          "geometries"
        ],
        "description": "update_geometry",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/geometry/get_zip_geometry": {
      "post": {
        "summary": "get_zip_geometry",
        "tags": [
          "geometry"
        ],
        "description": "\n    Get geometry data for a specific zip code\n    :param zip_code: The zip code to get geometry for\n    :return: Geometry data for the zip code\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_zip_geometry"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_zip_geometry"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/imports/download_import_schema": {
      "post": {
        "summary": "download_import_schema",
        "tags": [
          "imports"
        ],
        "description": "\n    Download import schema file(s) as CSV with pre-signed S3 URLs.\n\n    This endpoint generates CSV schema template files and stores them in S3, then returns pre-signed download URLs.\n\n    S3 Folder Structure:\n    - Schema templates: {instance_name}/uploads/migration-data/schemas/\n    - Pending uploads:  {instance_name}/uploads/migration-data/pending/\n    - Validated data:   {instance_name}/uploads/migration-data/ (root)\n\n    Logic:\n    - If schema_type is None: Returns all fixed schemas\n    - If schema_type is provided and it's fixed: Returns that specific fixed schema\n    - If schema_type is dynamic (policy_transactions) and no policy_type_id: Returns error\n    - If policy_type_id is provided and schema_type is None: Returns all schemas\n    - If policy_type_id is provided with schema_type: Returns that specific dynamic schema\n\n    CSV Template Format:\n    - Row 1: Field names (column headers)\n    - Row 2: Required/Not Required status for each field\n    - Row 3: Field descriptions\n    - Row 4: Valid values for categorical fields (pipe-separated, e.g. \"Payment | Invoice | Adjustment\")\n\n    IMPORTANT - Before Uploading Your Data:\n    The downloaded CSV template contains up to 4 rows of metadata for guidance only.\n    You MUST:\n    1. Review the field requirements (rows 2-4)\n    2. DELETE rows 2, 3, and 4 (metadata rows)\n    3. Keep only Row 1 (headers) and add your data rows below it\n    4. Your final CSV should have: Header row + Data rows only\n\n    Parameters\n    ----------\n    schema_type : str, optional\n        Type of schema to generate ('insureds', 'agencies', 'policy_transactions', etc.)\n    policy_type_id : str, optional\n        Policy type UUID (required for dynamic schemas like policy_transactions)\n\n    Returns\n    -------\n    success : bool\n    messages : list of str\n    data : dict\n        Dictionary containing:\n        - schemas: List of schema dictionaries with download URLs\n          - schema_type: Schema identifier\n          - schema_name: Human-readable name\n          - download_url: Pre-signed S3 URL (valid for 1 hour)\n          - file_name: Name of the CSV file\n\n    Examples\n    --------\n    Get all fixed schemas:\n        POST /api/v2/imports/download_import_schema\n        {}\n\n    Get specific fixed schema:\n        POST /api/v2/imports/download_import_schema\n        {\"schema_type\": \"insureds\"}\n\n    Get dynamic schema:\n        POST /api/v2/imports/download_import_schema\n        {\"schema_type\": \"policy_transactions\", \"policy_type_id\": \"uuid-here\"}\n\n    Get all schemas for a policy type:\n        POST /api/v2/imports/download_import_schema\n        {\"policy_type_id\": \"uuid-here\"}\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-download_import_schema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-download_import_schema"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/imports/get_migration_job_status": {
      "post": {
        "summary": "get_migration_job_status",
        "tags": [
          "imports"
        ],
        "description": "\n    Retrieve detailed status information for migration jobs.\n\n    Returns status, timestamps, and optionally logs for migration jobs.\n\n    Parameters\n    ----------\n    job_id : str, optional\n        Job identifier UUID returned from run_migration. If omitted, returns recent jobs.\n    include_logs : bool, optional\n        If True, include logs in response (default: False).\n    log_levels : list, optional\n        List of log levels to include.\n        Valid values: 'DEBUG', 'INFO', 'WARNING', 'ERROR'.\n        Example: ['ERROR', 'WARNING'] to include error and warning logs.\n    log_limit : int, optional\n        Maximum number of log entries to return (default: 100).\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_migration_job_status"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_migration_job_status"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/imports/get_migration_reports": {
      "post": {
        "summary": "get_migration_reports",
        "tags": [
          "imports"
        ],
        "description": "\n    List and download migration analysis reports.\n\n    Returns pre-signed S3 URLs for available migration reports including:\n    - Analysis reports (.md) - generated by the analyze migration step\n    - Premium comparison reports (.csv) - generated by the policy import step\n\n    Reports are stored under: {instance_name}/uploads/migration_analyses/\n    Newer runs store reports in a job-specific subdirectory beneath that root.\n\n    Parameters\n    ----------\n    job_id : str, optional\n        Job identifier UUID from run_migration. If provided, returns reports\n        for that specific migration run. Newer runs are resolved via a\n        job-specific report prefix; older flat reports fall back to time-window\n        matching. If omitted, returns all available reports.\n\n    Returns\n    -------\n    success : bool\n    messages : list of str\n    data : dict\n        Dictionary containing:\n        - reports: List of report dictionaries with:\n          - file_name: Basename of the report file\n          - report_path: Path relative to the migration_analyses root\n          - file_type: 'analysis' or 'premium_comparison'\n          - size_bytes: File size in bytes\n          - last_modified: ISO timestamp of last modification\n          - download_url: Pre-signed S3 URL (valid for 1 hour)\n        - job_id: The job_id filter applied (if provided)\n        - job_status: The job's status (if job_id provided)\n        - reports_path: S3 prefix searched for matching reports\n\n    Examples\n    --------\n    Get all migration reports:\n        POST /api/v2/imports/get_migration_reports\n        {}\n\n    Get reports for a specific run:\n        POST /api/v2/imports/get_migration_reports\n        {\"job_id\": \"e7e18ed0-5cec-47bc-8865-a2d215d61974\"}\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "job_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/imports/get_schema_columns": {
      "post": {
        "summary": "get_schema_columns",
        "tags": [
          "imports"
        ],
        "description": "\n    Return detailed column metadata for an import schema, including valid values\n    for categorical fields.\n\n    Works for both fixed schemas (account_history, payments, agencies, etc.)\n    and dynamic schemas (policy_transactions, historical_terms).\n\n    Parameters\n    ----------\n    schema_type : str\n        Schema identifier (e.g. 'account_history', 'payments', 'policy_transactions')\n    policy_type_id : str, optional\n        Policy type UUID (required for dynamic schemas like policy_transactions)\n\n    Returns\n    -------\n    success : bool\n    messages : list of str\n    data : dict\n        Dictionary containing:\n        - schema_type: Schema identifier\n        - columns: dict mapping column name to metadata:\n          - source: 'schema'\n          - required: bool\n          - description: str\n          - valid_values: list of str (only present for categorical fields)\n          - condition: str (only present for conditionally required fields)\n        - sample_rows: list (empty for fixed schemas)\n\n    Examples\n    --------\n    Get column metadata for a fixed schema:\n        POST /api/v2/imports/get_schema_columns\n        {\"schema_type\": \"account_history\"}\n\n    Get column metadata for a dynamic schema:\n        POST /api/v2/imports/get_schema_columns\n        {\"schema_type\": \"policy_transactions\", \"policy_type_id\": \"uuid-here\"}\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "schema_type": {
                    "type": "string"
                  },
                  "policy_type_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/imports/get_upload_url": {
      "post": {
        "summary": "get_upload_url",
        "tags": [
          "imports"
        ],
        "description": "\n    Generate pre-signed S3 POST URL for uploading CSV files to the pending validation folder.\n\n    The file will be uploaded to a pending folder and must be validated using\n    validate_uploaded_files() before being moved to the final migration-data folder.\n\n    S3 Folder Structure:\n    - Pending uploads:  {instance_name}/uploads/migration-data/pending/\n    - Validated data:   {instance_name}/uploads/migration-data/\n    - Schema templates: {instance_name}/uploads/migration-data/schemas/\n\n    Parameters\n    ----------\n    schema_type : str, required\n        Schema identifier (e.g., 'insureds', 'agencies', 'policy_transactions')\n        Must be a valid fixed or dynamic schema type.\n    policy_type_id : str, optional\n        Policy type UUID (required for dynamic schemas like 'policy_transactions')\n        The first 8 characters will be used in the filename.\n\n    Returns\n    -------\n    success : bool\n    messages : list of str\n    data : dict\n        Dictionary containing:\n        - schema_type: The schema identifier\n        - policy_type_id: The policy type ID (only for dynamic schemas)\n        - upload_url: S3 URL to POST the file to\n        - upload_fields: Dictionary of form fields required for the POST request\n        - expires_in: URL expiration time in seconds (600 = 10 minutes)\n\n    Examples\n    --------\n    Get upload URL for fixed schema (insureds):\n        POST /api/v2/imports/get_upload_url\n        {\"schema_type\": \"insureds\"}\n\n    Get upload URL for dynamic schema (policy_transactions):\n        POST /api/v2/imports/get_upload_url\n        {\"schema_type\": \"policy_transactions\", \"policy_type_id\": \"a320737f-2aef-42cf-957e-5c5da0e46aa1\"}\n\n    Response:\n        {\n            \"success\": true,\n            \"data\": {\n                \"schema_type\": \"policy_transactions\",\n                \"policy_type_id\": \"a320737f-2aef-42cf-957e-5c5da0e46aa1\",\n                \"upload_url\": \"https://s3.amazonaws.com/bucket-name\",\n                \"upload_fields\": {\n                    \"key\": \"instance/uploads/migration-data/pending/policy_transactions_a320737f.csv\",\n                    \"Content-Type\": \"text/csv\",\n                    \"x-amz-server-side-encryption\": \"AES256\",\n                    \"policy\": \"...\",\n                    \"x-amz-algorithm\": \"...\",\n                    \"x-amz-credential\": \"...\",\n                    \"x-amz-date\": \"...\",\n                    \"x-amz-signature\": \"...\"\n                },\n                \"expires_in\": 600\n            }\n        }\n\n    Note: S3 folders are virtual - the pending folder will be created automatically\n    when the first file is uploaded. No explicit folder creation needed.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_upload_url"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_upload_url"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/imports/import_disclosures": {
      "post": {
        "summary": "import_disclosures",
        "tags": [
          "imports"
        ],
        "description": "\n    Import an insured disclosure\n\n    Parameters\n    ----------\n    override: boolean\n        A flag to determine whether we should override existing disclosures\n    disclosures: list\n        The list of parameters containing disclosure data to be imported.\n        [\n            {\n                \"property_id\": \"a320737f-2aef-42cf-957e-5c5da0e46aa1\",\n                \"revision_id\": \"f2d68d87-08b5-40a1-b165-67650a59b5eb\",\n                \"loss_date\": \"2025-01-21\",\n                \"description\": \"Damage to flooring\",\n                \"loss_amount\": 1000.00,\n                \"loss_cause\": \"Water Damage\"\n            },\n            ...\n        ]\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-import_disclosures"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-import_disclosures"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/imports/import_loss_report": {
      "post": {
        "summary": "import_loss_report",
        "tags": [
          "imports"
        ],
        "description": "\n    Import loss report data for a property\n\n    Parameters\n    ----------\n    property_id: str\n        The property id. Required.\n    revision_id: str\n        The revision id. Required.\n    loss_reports: list\n        The list of loss report records to be imported.\n    loss_history_report_number: str\n        The loss history report number.\n    loss_history_retrieved_date: str\n        The loss history report retrieval date.\n    loss_history_vendor_status: str\n        The loss history report vendor status.\n    cache_key: str\n        The loss history report cache key.\n    created_by: str\n        The contact id of the user who requested the loss history report.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-import_loss_report"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-import_loss_report"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/imports/import_note": {
      "post": {
        "summary": "import_note",
        "tags": [
          "imports"
        ],
        "description": "\n    Import a note\n\n    Parameters\n    ----------\n    note : dict\n        The note to import. Supports legacy alert fields for backward compatibility:\n        - alert_status: bool - Whether the note has an alert\n        - alert_date: datetime - When to fire the alert\n        - alert_email: str - Email to send alert to\n        - alert_sent: bool - Whether alert has been sent\n        - alert_now: bool - Fire alert immediately\n        - alert_displayed: bool - Whether alert has been displayed\n        - event_alert: bool - Whether this is an event-based alert\n        - event_fired: bool - Whether the event has fired\n        - event_preset: str - Event type preset\n    force_create : bool\n        Delete and recreate the note if it already exists\n    create_only : bool\n        Only create the note, do not update if it already exists\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "note": {
                    "type": "object"
                  },
                  "force_create": {
                    "type": "boolean"
                  },
                  "create_only": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/imports/import_policy_number": {
      "post": {
        "summary": "import_policy_number",
        "tags": [
          "imports"
        ],
        "description": "import_policy_number",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-import_policy_number"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-import_policy_number"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/imports/list_available_schemas": {
      "post": {
        "summary": "list_available_schemas",
        "tags": [
          "imports"
        ],
        "description": "\n    List all available schema types for data imports.\n\n    Returns both fixed (hardcoded) and dynamic (database-generated) schemas\n    with their metadata, field counts, and parameter requirements.\n\n    Fixed Schemas: insureds, agencies, producers, mortgagees, additional_insured,\n    addresses, dates_to_remember, payments, account_history, notes, credit_reports,\n    x_business_locations_restrictions, x_policy_types_restrictions\n\n    Dynamic Schemas: policy_transactions (requires policy_type_id parameter)\n\n    Returns\n    -------\n    success : bool\n    messages : list of str\n    data : dict\n        Dictionary containing:\n        - schemas: List of schema dictionaries with:\n          - schema_type: Schema identifier\n          - name: Human-readable schema name\n          - description: Schema purpose and usage\n          - field_count: Number of fields (for fixed schemas)\n          - query_type: Query type (for dynamic schemas)\n          - required_parameters: List of required parameters (e.g., ['policy_type_id'])\n\n    Examples\n    --------\n    List all available schemas:\n        POST /api/v2/imports/list_available_schemas\n        {}\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-list_available_schemas"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-list_available_schemas"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/imports/purge_migration_data": {
      "post": {
        "summary": "purge_migration_data",
        "tags": [
          "imports"
        ],
        "description": "\n    Purge previously imported migration data.\n\n    This endpoint is restricted to lower environments and, when api.v2\n    permissions apply to the caller, additionally requires the\n    ``britecore/imports/migration_purge`` permission at ``rw``. It launches a\n    tracked migration purge job so API users can explicitly delete prior\n    migrated data before running a new migration instead of deleting data\n    during import.\n\n    Parameters\n    ----------\n    policy_type_mappings : dict, optional\n        Map of execution names to policy type UUIDs, as passed to run_migration. The purge\n        only removes contacts listed in the migration contact files and policies whose every\n        revision is listed in the mapped policy transaction / historical terms files; records\n        from any other source are preserved. Required when targets include \"policy\".\n    targets : list or str, optional\n        Purge targets to run. Supported values are \"contacts\" and \"policy\".\n        Defaults to both targets.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-purge_migration_data"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-purge_migration_data"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/imports/run_migration": {
      "post": {
        "summary": "run_migration",
        "tags": [
          "imports"
        ],
        "description": "\n    Run data migration via job runner.\n\n    This API simplifies migration by pre-defining the entire configuration.\n    User only needs to provide policy type ID mappings.\n\n    Starting a migration writes configuration to S3 and launches a job that\n    imports data into the site, so the caller must hold\n    ``britecore/imports/migration_jobs`` at ``rw`` (BC-25688). The status and\n    report endpoints require the same path at ``r``.\n\n    Parameters\n    ----------\n    policy_type_mappings : dict\n        Map of execution names (user-defined labels) to policy type UUIDs.\n        File names are generated from policy_type_id: policy_transactions_{uuid[:8]}.csv\n        Execution names starting with ``Historical_`` are routed only to the\n        historical terms phase; every other name runs the policy and analyze\n        phases. Use the prefix for mappings that feed historical_terms files.\n    disable_rules : dict, optional\n        Map of execution names to semicolon-separated rule IDs to disable.\n    filters : dict, optional\n        Runtime filters to control which migration scripts execute.\n    dry_run : bool, default False\n        If True, returns the config and command without executing.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-run_migration"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-run_migration"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/imports/validate_uploaded_files": {
      "post": {
        "summary": "validate_uploaded_files",
        "tags": [
          "imports"
        ],
        "description": "\n    Validate ALL uploaded files from pending folder and move valid ones to migration-data root folder.\n\n    This API:\n    1. Lists all CSV files in pending folder\n    2. Validates each file against its schema (extracted from filename)\n    3. For dynamic schemas (policy_transactions): Extracts policy_type_id from filename and generates schema\n    4. If valid: Copies to root migration-data folder (overwrites existing) and deletes from pending\n    5. If invalid: Deletes from pending and returns validation errors to user\n    6. If deep_validation=True: Cross-validates contact references between files\n\n    S3 Folder Structure:\n    - Schema templates: {instance_name}/uploads/migration-data/schemas/ (not touched by this API)\n    - Pending uploads:  {instance_name}/uploads/migration-data/pending/ (source for validation)\n    - Validated data:   {instance_name}/uploads/migration-data/ (destination for valid files)\n\n    Parameters\n    ----------\n    deep_validation : bool, optional\n        If True, performs additional referential integrity validation:\n        - Validates producerId in policy_transactions exists in producers.csv\n        - Validates agencyId in policy_transactions exists in agencies.csv\n        Referential issues are returned as warnings (non-blocking).\n        Default is False for faster validation.\n\n    Filename Requirements:\n    - Fixed schemas: {schema_type}.csv (e.g., insureds.csv, agencies.csv)\n    - Dynamic schemas: {schema_type}_{uuid_prefix}.csv (e.g., policy_transactions_a320737f.csv)\n      The UUID prefix must match an existing policy type in the database.\n\n    CRITICAL - CSV File Format:\n    Uploaded CSV files must contain ONLY:\n    - Row 1: Column headers (field names)\n    - Row 2+: Your actual data rows\n\n    If you downloaded schema templates using download_import_schema(), those files contain\n    3 metadata rows. You MUST delete rows 2-3 (Required/Not Required status and descriptions)\n    before uploading. The validator expects only header + data rows.\n\n    Validation Rules:\n    - CSV must have header row + at least 1 data row (2 rows minimum)\n    - All expected schema columns must be present in header\n    - Required fields must have data in at least one row\n    - Extra columns generate warnings but don't fail validation\n    - Files with unknown schema types are rejected\n    - Dynamic schema files with invalid UUID prefixes are rejected\n    - ALL files are deleted from pending folder after processing (pass or fail)\n\n    Returns\n    -------\n    success : bool\n    messages : list of str\n    data : dict\n        Dictionary containing:\n        - status: Overall validation status ('all_passed', 'partial', 'all_failed')\n        - files: List of validation results for each file\n          - schema_type: The schema identifier\n          - filename: Original filename\n          - validation_errors: List of validation issues (if failed)\n          - referential_warnings: List of cross-file reference warnings (if deep_validation=True)\n          - row_count: Number of data rows (if validated)\n        - summary: Validation summary\n          - total_files: Total files found in pending\n          - validated: Number of successfully validated files\n          - failed: Number of failed validations\n          - referential_warnings: Total count of referential warnings (if deep_validation=True)\n\n    API Success vs Validation Status:\n    - success=true: API executed successfully (files were processed)\n    - success=false: System error (S3 connection failed, permissions error, etc.)\n    - Check data.status for data-level validation results\n\n    Examples\n    --------\n    Validate all pending files:\n        POST /api/v2/imports/validate_uploaded_files\n        {}\n\n    Response (all files passed):\n        {\n            \"success\": true,\n            \"data\": {\n                \"status\": \"all_passed\",\n                \"files\": [\n                    {\n                        \"schema_type\": \"insureds\",\n                        \"filename\": \"insureds.csv\",\n                        \"row_count\": 150\n                    }\n                ],\n                \"summary\": {\n                    \"total_files\": 1,\n                    \"validated\": 1,\n                    \"failed\": 0\n                }\n            }\n        }\n\n    Response (partial failures):\n        {\n            \"success\": true,\n            \"messages\": [\"1 of 2 files validated successfully\"],\n            \"data\": {\n                \"status\": \"partial\",\n                \"files\": [\n                    {\n                        \"schema_type\": \"insureds\",\n                        \"filename\": \"insureds.csv\",\n                        \"row_count\": 150\n                    },\n                    {\n                        \"schema_type\": \"agencies\",\n                        \"filename\": \"agencies.csv\",\n                        \"validation_errors\": [\"Missing required columns: name, status\"]\n                    }\n                ],\n                \"summary\": {\n                    \"total_files\": 2,\n                    \"validated\": 1,\n                    \"failed\": 1\n                }\n            }\n        }\n\n    Note: ALL files are deleted from pending folder after processing, regardless of validation result.\n    Failed files must be corrected and re-uploaded.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-validate_uploaded_files"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-validate_uploaded_files"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/ingestion_job/create_ingestion_job": {
      "post": {
        "summary": "create_ingestion_job",
        "tags": [
          "ingestion_job"
        ],
        "description": "create_ingestion_job",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/ingestion_job/delete_ingestion_job": {
      "post": {
        "summary": "delete_ingestion_job",
        "tags": [
          "ingestion_job"
        ],
        "description": "delete_ingestion_job",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/ingestion_job/execute_import": {
      "post": {
        "summary": "execute_import",
        "tags": [
          "ingestion_job"
        ],
        "description": "execute_import",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/ingestion_job/get_ingestion_job": {
      "post": {
        "summary": "get_ingestion_job",
        "tags": [
          "ingestion_job"
        ],
        "description": "get_ingestion_job",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/ingestion_job/list_ingestion_jobs": {
      "post": {
        "summary": "list_ingestion_jobs",
        "tags": [
          "ingestion_job"
        ],
        "description": "list_ingestion_jobs",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/insights/acknowledge_insight": {
      "post": {
        "summary": "acknowledge_insight",
        "tags": [
          "insights"
        ],
        "description": "Acknowledge an insight with reshow-driven resolution.\n\n    Stamps ``last_acknowledged_at`` / ``last_acknowledged_by`` and applies\n    the insight's ``reshow`` policy: snooze (``UNTIL_RESOLVED``), dismiss\n    (``ON_DATA_CHANGE`` / ``ONCE_ONLY``), or stamp-only for\n    ``IMMEDIATE_BLOCKING`` severity. Writes an audit note on the parent\n    claim or policy. Does not touch ``last_evaluated_at``.\n\n    Parameters\n    ----------\n    id : str\n        UUID of the insight to acknowledge.\n\n    Returns\n    -------\n    dict\n        ``{\"insight\": {...}}`` -- the updated insight.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/insights/create_insight": {
      "post": {
        "summary": "create_insight",
        "tags": [
          "insights"
        ],
        "description": "Create a new insight.\n\n    Called exclusively by the copilot agents (via the ``bc-insights`` MCP\n    server); human users do not hit this endpoint.\n\n    Parameters\n    ----------\n    reference_type : str\n        ``CLAIM`` or ``POLICY``.\n    reference_id : str\n        UUID of the claim or policy to attach the insight to.\n    insight_type : str\n        One of ``MISSING``, ``WORKFLOW``, ``ADVISORY``, ``QUALITY``,\n        ``CONFLICT``, ``FRAUD``, ``GAPS``, ``DOC``.\n    insight_severity : str\n        One of ``IMMEDIATE_BLOCKING``, ``ACTION_NEEDED``,\n        ``RECOMMENDED_REVIEW``, ``INFORMATIONAL``.\n    title : str\n        Short headline (1-120 characters).\n    description : str\n        Reader-facing narrative (1-4000 characters).\n    product_area : str, optional\n        A product area valid for the reference type (see\n        ``list_insights``). Omit / null for reference-wide insights.\n    selector : str, optional\n        Optional card-level deep-link within ``product_area`` (requires\n        a non-null product area). Valid values are per-product-area\n        enums (see ``CLAIM_INSIGHT_SELECTORS`` /\n        ``POLICY_INSIGHT_SELECTORS``).\n    reshow : str, optional\n        Acknowledge re-show policy (one of ``UNTIL_RESOLVED``,\n        ``ON_DATA_CHANGE``, ``ONCE_ONLY``). Defaults to ``UNTIL_RESOLVED``.\n    snooze_days : int, optional\n        Per-insight snooze-window override in days; null falls back to the\n        severity default.\n\n    Returns\n    -------\n    dict\n        ``{\"insight\": {...}}`` -- the freshly persisted insight, including\n        the server-assigned ``id`` and timestamps.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-create_insight"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-create_insight"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/insights/delete_insight": {
      "post": {
        "summary": "delete_insight",
        "tags": [
          "insights"
        ],
        "description": "Hard-delete an insight.\n\n    Parameters\n    ----------\n    id : str\n        UUID of the insight to delete.\n    reference_type : str, optional\n        ``CLAIM`` or ``POLICY``; accepted for backwards compatibility\n        but ignored -- the write scope is resolved from the stored\n        row's own reference type, and the service additionally enforces\n        the row's type lens.\n\n    Returns\n    -------\n    dict\n        ``{\"deleted\": true}`` on success.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "reference_type": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/insights/evaluate_insights": {
      "post": {
        "summary": "evaluate_insights",
        "tags": [
          "insights"
        ],
        "description": "Trigger an out-of-band reconcile for a claim or policy.\n\n    Asks the matching copilot agent (Claims Copilot for CLAIM, Policy\n    Copilot for POLICY) to run its reconcile procedure for the reference\n    as an AIAgents background job. Progress is mirrored in the local\n    ``agent_jobs`` index and returned as ``evaluation_status`` (also\n    available from ``list_insights`` while the job is in flight). The\n    agent applies the result via ``reconcile_insights``; no claim or\n    policy state is mutated by this endpoint itself.\n\n    Parameters\n    ----------\n    reference_type : str\n        ``CLAIM`` or ``POLICY``.\n    reference_id : str\n        UUID of the claim or policy to (re)evaluate.\n\n    Returns\n    -------\n    dict\n        ``{\"status\": \"QUEUED\"|\"SKIPPED\", \"evaluation_status\": {...}?}``.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reference_type": {
                    "type": "string"
                  },
                  "reference_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/insights/list_insights": {
      "post": {
        "summary": "list_insights",
        "tags": [
          "insights"
        ],
        "description": "List insights for a claim or policy, persona-filtered server-side.\n\n    The result set is trimmed to the insight types the caller is permitted\n    to see for the reference type (R-30). A user with zero type-lens\n    permissions receives an empty list and zero counts.\n\n    Tab / product-area visibility is a client-side display filter, not a\n    server ACL. This endpoint still returns every type-permitted insight.\n\n    Parameters\n    ----------\n    reference_type : str\n        ``CLAIM`` or ``POLICY``.\n    reference_id : str\n        UUID of the claim or policy whose insights are being requested.\n    product_area : str, optional\n        Restrict results to a single product area. For CLAIM references:\n        one of INFORMATION, PARTIES, VEHICLES, DAMAGED_PROPERTIES,\n        INJURIES, ESTIMATIONS, ACCOUNTING, DISPUTES, NOTES, ATTACHMENTS.\n        For POLICY references: one of INFORMATION, UNDERWRITING,\n        SUBJECTIVITIES, CONTACTS, PROPERTY, VEHICLES, DRIVERS, COVERAGES,\n        RATING, NOTES, ATTACHMENTS, RENEWAL. Pass the literal string\n        ``__NULL__`` to limit results to reference-wide insights (rows\n        whose ``product_area`` is null). Omit / null for \"no product-area\n        filter\". Any other value is rejected with HTTP 400.\n    include_hidden : bool, optional\n        When ``False`` (default), exclude dismissed insights and insights\n        still inside an active snooze window from both the list and\n        counts. When ``True``, return the full set including hidden rows.\n\n    Returns\n    -------\n    dict\n        ``{\"insights\": [...], \"counts\": {\"total\": N, \"by_type\": {...}}}``\n        -- ``insights`` is filtered by ``product_area`` when supplied;\n        ``counts`` are reference-wide over the caller's permitted insight\n        types, so a product-area tab can still show the full permitted\n        severity summary.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-list_insights"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-list_insights"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/insights/reconcile_insights": {
      "post": {
        "summary": "reconcile_insights",
        "tags": [
          "insights"
        ],
        "description": "Apply a full reconciliation payload from a copilot agent atomically.\n\n    Combines four sub-operations into one request-level transaction:\n    ``keep`` (touch), ``update`` (partial update), ``remove`` (delete),\n    ``create`` (insert). Any per-row validation failure aborts the whole\n    payload -- no partial writes, ever (FR-036 convergence invariant).\n\n    All ids referenced in ``keep``, ``update``, and ``remove`` must\n    belong to the supplied reference -- cross-reference ids are rejected\n    with 400.\n\n    Parameters\n    ----------\n    reference_type : str\n        ``CLAIM`` or ``POLICY``.\n    reference_id : str\n        UUID of the claim or policy under reconciliation.\n    keep : list of str, optional\n        UUIDs of insights to retain (their ``last_evaluated_at`` is\n        bumped). Default: empty list.\n    update : list of dict, optional\n        Per-row partial updates. Each entry: ``{id, title?,\n        description?, product_area?, selector?}``. An entry that moves\n        ``product_area`` without a ``selector`` clears a stored selector\n        the new area does not define. Default: empty list.\n    remove : list of str, optional\n        UUIDs of insights to delete. Default: empty list.\n    create : list of dict, optional\n        Per-row creates. Each entry: ``{insight_type, insight_severity,\n        title, description, product_area?, selector?}``. The reference is\n        taken from the parent envelope. Default: empty list.\n\n    Returns\n    -------\n    dict\n        ``{\"applied\": {\"kept\": N, \"updated\": N, \"removed\": N,\n        \"created\": N}, \"created_ids\": [...]}`` -- counts per arm and the\n        server-assigned ids of the new rows in submission order.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-reconcile_insights"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-reconcile_insights"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/insights/touch_insights": {
      "post": {
        "summary": "touch_insights",
        "tags": [
          "insights"
        ],
        "description": "Bulk-bump ``last_evaluated_at`` for the listed insight ids.\n\n    Used by the copilot agents after a reconciliation run to mark\n    \"still-valid\" insights as freshly evaluated without changing their\n    content. All supplied ids must belong to the reference; cross-\n    reference ids are rejected.\n\n    Parameters\n    ----------\n    reference_type : str\n        ``CLAIM`` or ``POLICY``.\n    reference_id : str\n        UUID of the claim or policy that owns every id in ``ids``.\n    ids : list of str\n        UUIDs of the insights to touch (min length 1).\n\n    Returns\n    -------\n    dict\n        ``{\"updated\": N}`` -- number of rows whose ``last_evaluated_at``\n        was bumped.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reference_type": {
                    "type": "string"
                  },
                  "reference_id": {
                    "type": "string"
                  },
                  "ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/insights/unacknowledge_insight": {
      "post": {
        "summary": "unacknowledge_insight",
        "tags": [
          "insights"
        ],
        "description": "Clear acknowledgment state and restore insight visibility.\n\n    Clears ``last_acknowledged_at``, ``last_acknowledged_by``,\n    ``snoozed_until``, and ``dismissed``. Writes an audit note on the\n    parent claim or policy.\n\n    Parameters\n    ----------\n    id : str\n        UUID of the insight to unacknowledge.\n\n    Returns\n    -------\n    dict\n        ``{\"insight\": {...}}`` -- the updated insight.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/insights/update_insight": {
      "post": {
        "summary": "update_insight",
        "tags": [
          "insights"
        ],
        "description": "Partially update an existing insight.\n\n    Mutable fields: ``title``, ``description``, ``product_area``,\n    ``selector`` only (FR-034c).\n\n    Immutable (rejected with 400 if present): ``reference_type``,\n    ``reference_id``, ``insight_type``, ``insight_severity``,\n    ``first_seen_at``, ``date_added``, ``last_evaluated_at``,\n    ``date_updated``. To change type or severity, delete and recreate\n    (or reconcile ``remove`` + ``create``).\n\n    Parameters\n    ----------\n    id : str\n        UUID of the insight to update.\n    title : str, optional\n        New headline (1-120 characters).\n    description : str, optional\n        New narrative (1-4000 characters).\n    product_area : str, optional\n        New product area (valid for the row's reference type), or null to\n        clear.\n    selector : str, optional\n        New card-level deep-link within ``product_area``, or null to\n        clear. Requires a non-null effective product area. Changing\n        ``product_area`` without sending ``selector`` clears a stored\n        selector the new area does not define, since that card is not on\n        the new page; send both to land on a specific card.\n\n    Returns\n    -------\n    dict\n        ``{\"insight\": {...}}`` -- the updated insight.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-update_insight"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-update_insight"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/inspections/initiate_property_inspection": {
      "post": {
        "summary": "initiate_property_inspection",
        "tags": [
          "inspections"
        ],
        "description": "\n    Initiate a property inspection request. Returns a start URL to the inspection request page and optimal size.\n\n    The embedded content will emit events through the `window.postMessage()` API:\n    - `postMessage(\"inspection-request-complete\", origin)` event when the user has submitted a new inspection request.\n    - `postMessage(\"inspection-request-cancelled\", origin)` event when the user has cancelled the request. This is\n        equivalent to user closing the embedded content without finishing it.\n\n    Parameters\n    ----------\n    property_id : str\n        The UUID of an existing Property. Cannot be on an archived revision.\n    integration_instance_id : str\n        The UUID of an installed Integration Instance supporting property inspection request.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable messages describing either error or success.\n    data : dict\n        ::\n        {\n            \"start_url\": str,\n            \"optimal_width_px\": int,\n            \"optimal_height_px\": int\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "property_id": {
                    "type": "string"
                  },
                  "integration_instance_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/inspections/update_inspection_dates": {
      "post": {
        "summary": "update_inspection_dates",
        "tags": [
          "inspections"
        ],
        "description": "Update inspection dates for the specified property and make notes to the policy.\n\n    Parameters\n    ----------\n    next_inspection_date: str, optional\n        The new next inspection date to set. Format: YYYY-MM-DD\n    inspection_request_date: str, optional\n        The new inspection request date to set. Format: YYYY-MM-DD\n    property_id: str, optional\n        The UUID of an existing Property. Cannot be on an archived revision.\n        If property_id is provided, policy_number will be ignored.\n    policy_number: str, optional\n        (Deprecated) The policy number of an existing Policy. This takes effect when property_id is not provided.\n        The update will ONLY be applied to the first property on the latest revision of the policy before today\n        (open or committed).\n\n    Returns\n    -------\n    success : bool\n        True if completely successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        A dictionary containing the following:\n        {\n            'policy_id': str,\n            'risk_id': UUID,  // ID of the property\n            'next_inspection_date': str,\n            'inspection_request_date': str\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "next_inspection_date": {
                    "type": "string"
                  },
                  "inspection_request_date": {
                    "type": "string"
                  },
                  "property_id": {
                    "type": "string"
                  },
                  "policy_number": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/inspections/update_property_inspection_data": {
      "post": {
        "summary": "update_property_inspection_data",
        "tags": [
          "inspections"
        ],
        "description": "\n    Updates the property inspection request for the given integration instance, property, policy, and revision.\n\n    Parameters\n    ----------\n    integration_instance_id : str, required\n    property_id : str, required\n    policy_id : str, required\n    revision_id : str, required\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable messages\n    data : dict\n        Confirmation data - empty for now, will be populated when API is fully implemented\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "integration_instance_id": {
                    "type": "string"
                  },
                  "property_id": {
                    "type": "string"
                  },
                  "policy_id": {
                    "type": "string"
                  },
                  "revision_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/insured/change_billing_schedule": {
      "post": {
        "summary": "change_billing_schedule",
        "tags": [
          "insured"
        ],
        "description": "Change policy billing schedule\n\n    Parameters\n    ----------\n    policy_id : str, required\n        Policy id\n    billing_schedule_id : str, required\n        Schedule to switch to\n    policy_term_id : str, optional\n        Policy Term whose billing schedule is being changed\n\n    Returns\n    -------\n    success : bool\n        True if completely successful, false if not\n    messages : list of str\n        List of human-readable error messages\n\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "policy_id": {
                    "type": "string"
                  },
                  "billing_schedule_id": {
                    "type": "string"
                  },
                  "policy_term_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/insured/find_similar_contact": {
      "post": {
        "summary": "find_similar_contact",
        "tags": [
          "insured"
        ],
        "description": "Retrieves all contacts similar to contact_id\n    If\n\n    Parameters\n    ----------\n    contact_id : str, required\n        Contact id to match\n    ssn_only_check : bool\n        Flag if SSN-only search should be applied\n    contact_ids_to_check : list of str\n        contacts to compare, if provided. Otherwise search will be performed for all named insureds in DB\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The data response having the form:\n        ::\n            {\n                \"has_dob\": true,\n                \"has_ssn\": true,\n                \"result\": [\n                    {\n                        \"hit_by_ssn\": true,\n                        \"id\": __uuid__\n                    },\n                    {\n                        \"hit_by_dob_and_phone\": true,\n                        \"id\": __uuid__\n                    }, ...\n                ]\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contact_id": {
                    "type": "string"
                  },
                  "ssn_only_check": {
                    "type": "boolean"
                  },
                  "contact_ids_to_check": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/insured/get_agent_and_agencies_from_contact": {
      "post": {
        "summary": "get_agent_and_agencies_from_contact",
        "tags": [
          "insured"
        ],
        "description": "Return agents and agencies related to insured's policies\n\n    Parameters\n    ----------\n    contact_id : str, required\n        UUID of an existing Insured\n\n    Returns\n    -------\n    success : bool\n        True if completely successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        Agents/Agencies data\n        {\n        \"agents\": {},\n        \"agencies\": {\n            \"agency_id1\": {\n                \"photo_id\": null,\n                \"addresses\": [\n                    {\n                        \"address_line2\": null,\n                        \"address_city\": \"WELLSTON\",\n                        \"address_line1\": \"PO BOX 314\",\n                        \"type_label\": null,\n                        \"date_updated\": null,\n                        \"address_country\": \"USA\",\n                        \"address_county\": \"\",\n                        \"contact_id\": \"8a403b5b-fb57-4b29-9524-53f431651da6\",\n                        \"longitude\": null,\n                        \"attention\": null,\n                        \"address_state\": \"OK\",\n                        \"latitude\": null,\n                        \"type\": \"Mailing/Billing\",\n                        \"id\": \"6d5cc731-c5fb-11e5-8667-12a91c8c3ac7\",\n                        \"address_zip\": \"74881\"\n                    }\n                ],\n                \"phones\": [\n                    {\n                        \"date_updated\": null,\n                        \"phone\": \"(405)356-2477\",\n                        \"type\": \"Work\",\n                        \"id\": \"6d4a9d49-c5fb-11e5-8667-12a91c8c3ac7\",\n                        \"contact_id\": \"8a403b5b-fb57-4b29-9524-53f431651da6\"\n                    }\n                ],\n                \"emails\": [\n                    {\n                        \"date_updated\": null,\n                        \"type\": \"Work\",\n                        \"id\": \"1261aac2-aad2-486f-9509-1b59f66dc58c\",\n                        \"contact_id\": \"8a403b5b-fb57-4b29-9524-53f431651da6\",\n                        \"email\": \"steffenson06@sbcglobal.net\"\n                    },\n\n                ],\n                \"id\": \"8a403b5b-fb57-4b29-9524-53f431651da6\",\n                \"name\": \"Steffenson Ins. Agy. [356]\"\n            }\n        }\n    }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contact_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/insured/get_complete_contact_information": {
      "post": {
        "summary": "get_complete_contact_information",
        "tags": [
          "insured"
        ],
        "description": "Retrieves insured data accroding to input param.\n\n    Parameters\n    ----------\n    contact_id : str\n        Filter notes by contact_id\n    policy_params : dict\n        Values that will be sent to appropriate function\n    filter_values : array\n        Array of strings defining values list to return. For all values should be empty []\n        F.e. ['contact', 'policies']\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The data response having the form:\n        ::\n            {\n                \"contact\": {},\n                \"policies\": \"{}\"\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contact_id": {
                    "type": "string"
                  },
                  "policy_params": {
                    "type": "object"
                  },
                  "filter_values": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/insured/get_contacts_with_insured_portal_user_role": {
      "post": {
        "summary": "get_contacts_with_insured_portal_user_role",
        "tags": [
          "insured"
        ],
        "description": "Retrieves all contacts having 'Insured Portal User' role\n\n    :return:\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : list of dicts\n        The data response having the form:\n        ::\n            [{\n                \"id\": __contact_id__,\n                \"name\": __contact_name__\n            },...]\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/insured/get_primary_carrier": {
      "post": {
        "summary": "get_primary_carrier",
        "tags": [
          "insured"
        ],
        "description": "Retrieve contact information for carrier\n\n    Parameters\n    ----------\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict contains carrier's contact data\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/insured/get_property_information_and_photos": {
      "post": {
        "summary": "get_property_information_and_photos",
        "tags": [
          "insured"
        ],
        "description": "Get property data\n\n    Parameters\n    ----------\n    property_id : str, required\n        UUID of an existing Property instance\n\n    Returns\n    -------\n    success : bool\n        True if completely successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        A dict containing results\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "property_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/insured/is_email_available": {
      "post": {
        "summary": "is_email_available",
        "tags": [
          "insured"
        ],
        "description": "Check if email not belong to another contact\n\n    Parameters\n    ----------\n    email : str\n        Email to check\n    contact_id : str\n        Contact id that we want to assign email\n\n    Returns\n    -------\n    success : bool\n        True if available, false if not\n    messages : list of str\n        List of human-readable error messages\n\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string"
                  },
                  "contact_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/insured/new_claim_information": {
      "post": {
        "summary": "new_claim_information",
        "tags": [
          "insured"
        ],
        "description": "Create claim.\n\n    Parameters\n    ----------\n    policy_id : str, required\n        Policy id\n    property_id : str, optional\n        Property id\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data: dict containing claim details\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "policy_id": {
                    "type": "string"
                  },
                  "property_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/insured/retrieve_contact_information": {
      "post": {
        "summary": "retrieve_contact_information",
        "tags": [
          "insured"
        ],
        "description": "Get contact data\n\n    Parameters\n    ----------\n    contact_id : str, required\n        UUID of an existing Contact instance\n    additional_policy_list : list\n        UUID list of additional policy IDs to be retrieved\n    include_canceled: bool\n        Optional, whether to retrieve policies that are canceled\n\n    Returns\n    -------\n    success : bool\n        True if completely successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        A dict containing contact\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contact_id": {
                    "type": "string"
                  },
                  "additional_policy_list": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "include_canceled": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/insured/set_file_metadata": {
      "post": {
        "summary": "set_file_metadata",
        "tags": [
          "insured"
        ],
        "description": "Updates file metadata\n\n    Parameters\n    ----------\n    file_id : str\n        Updated File id\n    metadata : dict\n        Dict that describes new metadata\n        {\n            'update': {key:value, ...},   # metadata values to be updates\n            'delete': [key1, key2,...],    # metadata values to be deleted\n            'key':value ,   # metadata to update\n        }\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "file_id": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/insured/set_photo_as_insurred_preferred": {
      "post": {
        "summary": "set_photo_as_insurred_preferred",
        "tags": [
          "insured"
        ],
        "description": "Updates file received_meta_data keyword 'preferred'\n\n    For all resource's photos 'preferred' metadata key set to False except photo with file_id\n\n    Parameters\n    ----------\n    file_id : str, required\n        Updated File id\n    reference_id : str, required\n        Insured id\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "file_id": {
                    "type": "string"
                  },
                  "reference_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/insured/set_photo_caption": {
      "post": {
        "summary": "set_photo_caption",
        "tags": [
          "insured"
        ],
        "description": "Updates file received_meta_data keyword 'caption'\n\n    Parameters\n    ----------\n    file_id : str, required\n        Updated File id\n    caption : str, optional\n        'Caption' metadata value\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "file_id": {
                    "type": "string"
                  },
                  "caption": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/insured/submit_claim": {
      "post": {
        "summary": "submit_claim",
        "tags": [
          "insured"
        ],
        "description": "Submits the claim to the carrier\n\n    Parameters\n    ----------\n    claim_id : str, required\n        Claim id\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "claim_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/insured/update_claim": {
      "post": {
        "summary": "update_claim",
        "tags": [
          "insured"
        ],
        "description": "Stores the loss date/description for a given claim\n\n    Parameters\n    ----------\n    claim_id: str, required\n        Claim id\n    loss_date: str, required\n        YYYY_MM-DD Loss Date\n    description: str, required\n        Description\n    additional_information: dict, optional\n        Additional information for the claim submission, with arbitrary keys and values(as strings), like:\n        ::\n            {\n                \"Insured Contact Number\": \"+1 (650) 321-1234\",\n                \"Device ID\": \"0fe6a7bf-bca7-4757-825c-7cc9bf90cfc0\"\n            }\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "claim_id": {
                    "type": "string"
                  },
                  "loss_date": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "additional_information": {
                    "type": "string"
                  },
                  "Returns": {
                    "type": "string"
                  },
                  "-------": {
                    "type": "string"
                  },
                  "success": {
                    "type": "boolean"
                  },
                  "messages": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/insured/update_contact_email_notices_flag": {
      "post": {
        "summary": "update_contact_email_notices_flag",
        "tags": [
          "insured"
        ],
        "description": "update_contact_email_notices_flag",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contact_id": {},
                  "enabled": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/insured/update_contact_information": {
      "post": {
        "summary": "update_contact_information",
        "tags": [
          "insured"
        ],
        "description": "Updates contact values\n\n    Parameters\n    ----------\n    contact_id : str\n        Contact id\n    contact_name : str\n        Name to update\n    contact_photo : basestring\n        Photo in base64 format\n    contact_addresses : list of dicts\n        List of address dicts\n    contact_phones : list of dicts\n        List of phones dicts\n    contact_emails : list of dicts\n        List of emails dicts\n    dry_run : bool\n        False for apply changes, True for compare without apply\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data: dict containing changes\n        {\n        'name_updated': name_updated,\n        'new_addresses': new_addresses,\n        'updated_addresses': updated_addresses,\n        'new_phones': new_phones,\n        'updated_phones': updated_phones,\n        'new_emails': new_emails,\n        'updated_emails': updated_emails,\n        'updated_photo': update_photo\n    }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contact_id": {
                    "type": "string"
                  },
                  "contact_name": {
                    "type": "string"
                  },
                  "contact_photo": {
                    "type": "string"
                  },
                  "contact_addresses": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "contact_phones": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "contact_emails": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "dry_run": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/insured/upload_property_or_claim_photo": {
      "post": {
        "summary": "upload_property_or_claim_photo",
        "tags": [
          "insured"
        ],
        "description": "Uploads claim/property user's photo. User's and agent's photos stored in different folders.\n\n    Agent's photos stored in None folder and user's photos stored in %INSURED_UPLOAD_PHOTOS_DIR_NAME%\n    This way on claim/property retrieve we can distinguish user/agent photos\n\n    Parameters\n    ----------\n    file_type : str, required\n        either one of 'properties' or 'claims'\n    reference_id : str, required\n        reference id pointing to claim or property id related to file\n    photo_as_base64 : basestring, required\n        photo as a data URI string -- ex: 'data:image/gif;base64,abcdefghij...'\n    filename : str, required\n        original filename of uploaded file\n    mimetype : str\n        mimetype of uploaded file\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The data response having the form:\n        ::\n            {\n                \"file_id\": uploaded_file_id\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "file_type": {
                    "type": "string"
                  },
                  "reference_id": {
                    "type": "string"
                  },
                  "photo_as_base64": {
                    "type": "string"
                  },
                  "filename": {
                    "type": "string"
                  },
                  "mimetype": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/intacct/get_intacct_vendor_info": {
      "post": {
        "summary": "get_intacct_vendor_info",
        "tags": [
          "intacct"
        ],
        "description": "Return Intacct Vendor Information.\n\n    Parameters\n    ----------\n\n    Returns\n    -------\n    success : bool\n        True if completely successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : Intacct Vendor Information\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/intacct/get_unexported_claim_transactions_xml": {
      "post": {
        "summary": "get_unexported_claim_transactions_xml",
        "tags": [
          "intacct"
        ],
        "description": "Return xml for all unexported claim transactions.\n\n    Parameters\n    ----------\n\n    Returns\n    -------\n    success : bool\n        True if completely successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : list of xml dicts to post to intacct\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/intacct/get_unexported_return_premiums_xml": {
      "post": {
        "summary": "get_unexported_return_premiums_xml",
        "tags": [
          "intacct"
        ],
        "description": "Return xml for all return premiums.\n\n    Parameters\n    ----------\n\n    Returns\n    -------\n    success : bool\n        True if completely successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : list of xmls to post to intacct\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/intacct/post_claim_transactions": {
      "post": {
        "summary": "post_claim_transactions",
        "tags": [
          "intacct"
        ],
        "description": "Post claim transactions to Intacct.\n\n    Parameters\n    ----------\n    payload : dict\n        Dict containing of returnPremiumIds.\n        Posts transactions to intacct\n\n    Returns\n    -------\n    success : bool\n        True if completely successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : Dict containing ids successfully posted to Intacct\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "payload": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/intacct/post_return_premiums": {
      "post": {
        "summary": "post_return_premiums",
        "tags": [
          "intacct"
        ],
        "description": "Post return premiums to Intacct.\n\n    Parameters\n    ----------\n    payload : dict\n        Dict of action(canceled or exported) and list of returnPremiumIds.\n        Posts transactions to intacct and passes successful returnPremiumIds to\n        policies.views.clearReturnPremiums to mark as exported\n\n    Returns\n    -------\n    success : bool\n        True if completely successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict of transactions with their success status\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "payload": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/integrations/get_installed_integrations": {
      "post": {
        "summary": "get_installed_integrations",
        "tags": [
          "integrations"
        ],
        "description": "\n    Retrieves the installed integrations for the given policy type.\n\n    Parameters\n    ----------\n    policy_type_id : str, optional\n        The policy type id to retrieve the installed integrations for.\n        If not provided, returns all installed integrations.\n    integration_point_code : str, optional\n        The integration point code to filter integrations by (e.g., 'PROPERTY_VALUATION').\n        If not provided, returns all integration types.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The data response having the form:\n        ::\n            {\n                \"integrations\": [{\n                    \"id\": str,\n                    \"name\": str\n                }, ...]\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_installed_integrations"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_installed_integrations"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/integrations/get_integration_dependencies": {
      "post": {
        "summary": "get_integration_dependencies",
        "tags": [
          "integrations"
        ],
        "description": "\n    Retrieves the potential dependencies for the given policy type.\n\n    Parameters\n    ----------\n    policy_type_id : str, required\n        The policy type id to retrieve the dependencies for\n    include_optionals : bool, optional\n        Whether to include optional dependencies or not\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The data response having the form:\n        ::\n            {\n                \"potential_dependency_list\": [{\n                    \"categories\": [{\n                        \"label\": str,\n                        \"input\": str,\n                        \"type\": str,\n                        \"categories\": [str, str, ...]\n                    }, ...],\n                    \"policy_type_item_id\": str,\n                    \"policy_type_item_name\": str,\n                    \"policy_type_item_description\": str,\n                    \"policy_type_item_category\": str,\n                    \"policy_type_item_sub_line_id\": str\n                }, ...]\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "policy_type_id": {
                    "type": "string"
                  },
                  "include_optionals": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/integrations/get_integration_dependencies_stored": {
      "post": {
        "summary": "get_integration_dependencies_stored",
        "tags": [
          "integrations"
        ],
        "description": "\n    Retrieves the dependencies stored for the given integration and policy type.\n\n    Parameters\n    ----------\n    integration_id : str, required\n        The integration id\n    policy_type_id : str, required\n        The policy type id to retrieve the dependencies for\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The data response having the form:\n        ::\n            {\n                \"dependencies\": [str, str, ...]\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "integration_id": {
                    "type": "string"
                  },
                  "policy_type_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/integrations/get_policy_types_for_integration_instance": {
      "post": {
        "summary": "get_policy_types_for_integration_instance",
        "tags": [
          "integrations"
        ],
        "description": "\n    Retrieves the Policy Types that are selected for the specified Integration Instance.\n\n    Parameters\n    ----------\n    integration_instance_external_id : str\n        External ID of the Integration Instance\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The data response having the form:\n        ::\n            {\n                \"policy_types\": [{\"id\": \"...\"}, {\"id\": \"...\"}, ...]\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "integration_instance_external_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/integrations/is_integration_point_installed": {
      "post": {
        "summary": "is_integration_point_installed",
        "tags": [
          "integrations"
        ],
        "description": "\n    Checks if a specific integration point is installed and optionally enabled for a policy type.\n\n    Parameters\n    ----------\n    integration_point_code : str, required\n        The code of the integration point to check (e.g. 'CLAIM_ESTIMATION')\n    policy_type_id : str, optional\n        The policy type id to check if the integration is enabled for.\n        If not provided, only checks if integration is installed globally.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The data response having the form:\n        ::\n            {\n                \"is_installed\": bool\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "integration_point_code": {
                    "type": "string"
                  },
                  "policy_type_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/integrations/list_integration_points": {
      "post": {
        "summary": "list_integration_points",
        "tags": [
          "integrations"
        ],
        "description": "\n    Lists all supported Integration Points.\n\n    Parameters\n    ----------\n    None\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The data response having the form:\n        ::\n            {\n                \"integration_points\": [{\n                    \"code\": str\n                    \"description\": str\n                    \"request_schema\": JSON Schema object\n                    \"response_schema\": JSON Schema object\n                    \"error_schema\": JSON Schema object\n                    \"request_samples\": List of objects\n                    \"response_samples\": List of objects\n                    \"error_samples\": List of objects\n                }, ...]\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "None": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/integrations/make_note": {
      "post": {
        "summary": "make_note",
        "tags": [
          "integrations"
        ],
        "description": "\n    Allow integration instance to create a note on BriteCore.\n\n    Parameters\n    ----------\n    note_data : dict\n        The note data containing:\n        - integration_instance_external_id: str, required\n        - reference_id: str, required\n        - title: str, required\n        - contents: str, required\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-make_note"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-make_note"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/integrations/persist_file": {
      "post": {
        "summary": "persist_file",
        "tags": [
          "integrations"
        ],
        "description": "\n    Allow integration instance to persist file on BriteCore. Human user can download the file via\n    https://site.britecore.com/gateway?file=core.uploads&method=getAttachment&id=<file_id>\n    API user can download the file via /api/v2/files/generate_download_url.\n\n    Parameters\n    ----------\n    integration_instance_external_id : str\n        Specify the integration instance.\n    file_data_base64 : str\n        The base64-encoded file data.\n    title : str\n        The name of the file.\n    mime_type : str\n        The mime type of the file.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The data response having the form:\n        ::\n            {\n                \"file_id\": str\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "integration_instance_external_id": {
                    "type": "string"
                  },
                  "file_data_base64": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "mime_type": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/integrations/send_britecore_email": {
      "post": {
        "summary": "send_britecore_email",
        "tags": [
          "integrations"
        ],
        "description": "\n    Allows integration instances to send emails via BriteCore's email service.\n\n    Parameters\n    ----------\n    integration_instance_external_id : str, required\n        Specify the integration instance.\n    to_emails : list of str, required\n        List of email addresses to send the email to.\n    subject : str, required\n        The subject line of the email.\n    plain_body : str, required\n        The plain text body of the email.\n    html_body : str, optional\n        The HTML body of the email.\n    attachments : list of dict, optional\n        List of attachments to include in the email. Each attachment should be a dictionary with the following keys\n        - file_name: str, required\n            The name of the file.\n        - file_data_base64: str, required\n            The base64-encoded file data.\n        - mime_type: str, optional\n            The mime type of the file.\n    cc_emails : list of str, optional\n        List of email addresses to CC.\n    reply_to_emails : list of str, optional\n        List of email addresses to set as the reply-to address. If unset, system default will be used.\n    attachments_exceed_message : str, optional\n        Message to send along when the size of attachments exceeds the maximum allowed. Default to empty string.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "integration_instance_external_id": {
                    "type": "string"
                  },
                  "to_emails": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "subject": {
                    "type": "string"
                  },
                  "plain_body": {
                    "type": "string"
                  },
                  "html_body": {
                    "type": "string"
                  },
                  "attachments": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "cc_emails": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "reply_to_emails": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "attachments_exceed_message": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/integrations/send_integration_alert_email": {
      "post": {
        "summary": "send_integration_alert_email",
        "tags": [
          "integrations"
        ],
        "description": "\n    Send an alert email to the receipients under Settings > Administrative Alerts > Integration Notifications.\n\n    Parameters\n    ----------\n    integration_instance_external_id : str\n        Specify the integration instance.\n    email_subject : str\n        The subject line. The final email subject will have the name of the specified Integration Instance prepended\n        in a pair of brackets, which will read as \"[Integration Instance Name] Your Email Subject\"\n    email_body : str\n        The plain text email body.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "integration_instance_external_id": {
                    "type": "string"
                  },
                  "email_subject": {
                    "type": "string"
                  },
                  "email_body": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/integrations/store_integration_dependencies": {
      "post": {
        "summary": "store_integration_dependencies",
        "tags": [
          "integrations"
        ],
        "description": "\n    Stores the dependencies for the given integration and policy type.\n\n    Parameters\n    ----------\n    integration_id : str, required\n        The integration id to store the dependencies for\n    policy_type_id : str, required\n        The policy type id to store the dependencies for\n    dependencies : list of str, optional\n        The dependencies to store. Each dependency is a string in the form of \"policy_type_item_id--category\"\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "integration_id": {
                    "type": "string"
                  },
                  "policy_type_id": {
                    "type": "string"
                  },
                  "dependencies": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/add_memory_decision": {
      "post": {
        "summary": "add_memory_decision",
        "tags": [
          "io_mapping"
        ],
        "description": "Body: ``{mappingId, topic, decision, rationale?}``.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_add_memory_decision"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_add_memory_decision"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/add_memory_followup": {
      "post": {
        "summary": "add_memory_followup",
        "tags": [
          "io_mapping"
        ],
        "description": "Body: ``{mappingId, topic, status}``.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_add_memory_followup"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_add_memory_followup"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/add_memory_ruled_out": {
      "post": {
        "summary": "add_memory_ruled_out",
        "tags": [
          "io_mapping"
        ],
        "description": "Body: ``{mappingId, approach, reason}``.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_add_memory_ruled_out"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_add_memory_ruled_out"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/add_note": {
      "post": {
        "summary": "add_note",
        "tags": [
          "io_mapping"
        ],
        "description": "Anchor a note to a place in the mapping. To ASK somebody, prefer\n    ask_insurance_expert / ask_technical_expert -- they say who reads the answer.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_add_note"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_add_note"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/ask_insurance_expert": {
      "post": {
        "summary": "ask_insurance_expert",
        "tags": [
          "io_mapping"
        ],
        "description": "Ask a product lead or underwriter a question about how the CARRIER'S PRODUCT\n    works -- in the carrier's words, anchored to the slot it is about. They have never\n    heard of a resolver cell. Not for endpoints, schemas or credentials.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_ask_insurance_expert"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_ask_insurance_expert"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/ask_technical_expert": {
      "post": {
        "summary": "ask_technical_expert",
        "tags": [
          "io_mapping"
        ],
        "description": "Ask an engineer a question about the SYSTEM -- the endpoint, the schema, the\n    input document, credentials, the environment. Not for product questions like what\n    a roof code means.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_ask_technical_expert"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_ask_technical_expert"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/assess_variant_fit": {
      "post": {
        "summary": "assess_variant_fit",
        "tags": [
          "io_mapping"
        ],
        "description": "Should this policy type be a variant of this mapping, or its own mapping?",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_assess_variant_fit"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_assess_variant_fit"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/call_wrapped_api": {
      "post": {
        "summary": "call_wrapped_api",
        "tags": [
          "io_mapping"
        ],
        "description": "Render this mapping's request and CALL the endpoint it wraps, for real...",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_call_wrapped_api"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_call_wrapped_api"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/capture_reconcile_snapshot": {
      "post": {
        "summary": "capture_reconcile_snapshot",
        "tags": [
          "io_mapping"
        ],
        "description": "Pin the live definition's domains onto the spec as the authoring snapshot...",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_capture_reconcile_snapshot"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_capture_reconcile_snapshot"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/clear_agent_memory": {
      "post": {
        "summary": "clear_agent_memory",
        "tags": [
          "io_mapping"
        ],
        "description": "Wipe the agent_memory column.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_clear_agent_memory"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_clear_agent_memory"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/compile_analytics_preview": {
      "post": {
        "summary": "compile_analytics_preview",
        "tags": [
          "io_mapping"
        ],
        "description": "Compile a WORKING spec's ANALYTICS section for live preview.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_compile_analytics_preview"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_compile_analytics_preview"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/compile_resolver_preview": {
      "post": {
        "summary": "compile_resolver_preview",
        "tags": [
          "io_mapping"
        ],
        "description": "Compile a WORKING (unsaved) spec to its Jinja template for live preview \u2014 persists...",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_compile_resolver_preview"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_compile_resolver_preview"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/compile_response_preview": {
      "post": {
        "summary": "compile_response_preview",
        "tags": [
          "io_mapping"
        ],
        "description": "Compile a WORKING spec's RESPONSE section (``spec['response']``) for live preview.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_compile_response_preview"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_compile_response_preview"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/copilot": {
      "post": {
        "summary": "copilot",
        "tags": [
          "io_mapping"
        ],
        "description": "SSE streaming endpoint (mirrors ``reports.py:send_prompt``).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_copilot"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_copilot"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/create_fixture": {
      "post": {
        "summary": "create_fixture",
        "tags": [
          "io_mapping"
        ],
        "description": "create_fixture",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_create_fixture"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_create_fixture"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/create_mapping": {
      "post": {
        "summary": "create_mapping",
        "tags": [
          "io_mapping"
        ],
        "description": "create_mapping",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_create_mapping"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_create_mapping"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/delete_fixture": {
      "post": {
        "summary": "delete_fixture",
        "tags": [
          "io_mapping"
        ],
        "description": "delete_fixture",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_delete_fixture"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_delete_fixture"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/delete_mapping": {
      "post": {
        "summary": "delete_mapping",
        "tags": [
          "io_mapping"
        ],
        "description": "delete_mapping",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_delete_mapping"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_delete_mapping"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/delete_schema": {
      "post": {
        "summary": "delete_schema",
        "tags": [
          "io_mapping"
        ],
        "description": "Delete a BYOS schema library row.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_delete_schema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_delete_schema"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/discard_draft_note": {
      "post": {
        "summary": "discard_draft_note",
        "tags": [
          "io_mapping"
        ],
        "description": "Drop one unsent note.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_discard_draft_note"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_discard_draft_note"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/dismiss_memory_decision": {
      "post": {
        "summary": "dismiss_memory_decision",
        "tags": [
          "io_mapping"
        ],
        "description": "Body: ``{mappingId, topic}``.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_dismiss_memory_decision"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_dismiss_memory_decision"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/dismiss_memory_ruled_out": {
      "post": {
        "summary": "dismiss_memory_ruled_out",
        "tags": [
          "io_mapping"
        ],
        "description": "Body: ``{mappingId, approach}``.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_dismiss_memory_ruled_out"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_dismiss_memory_ruled_out"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/export_mapping": {
      "post": {
        "summary": "export_mapping",
        "tags": [
          "io_mapping"
        ],
        "description": "Return the portable JSON blob for ``slug`` at the given version.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_export_mapping"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_export_mapping"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/find_live_copilot_job": {
      "post": {
        "summary": "find_live_copilot_job",
        "tags": [
          "io_mapping"
        ],
        "description": "The job already working on this mapping, if there is one.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_find_live_copilot_job"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_find_live_copilot_job"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/find_policy_type": {
      "post": {
        "summary": "find_policy_type",
        "tags": [
          "io_mapping"
        ],
        "description": "As-of resolve ``(name, state, effectiveDate[, lineName])`` to a minimal PT summary.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_find_policy_type"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_find_policy_type"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/generate_sample": {
      "post": {
        "summary": "generate_sample",
        "tags": [
          "io_mapping"
        ],
        "description": "Generate a valid, complete sample instance from a schema.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_generate_sample"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_generate_sample"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/get_analytics_slots": {
      "post": {
        "summary": "get_analytics_slots",
        "tags": [
          "io_mapping"
        ],
        "description": "The slot grid for the ANALYTICS direction: the mapping's analytics schema flattened...",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_get_analytics_slots"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_get_analytics_slots"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/get_copilot_job": {
      "post": {
        "summary": "get_copilot_job",
        "tags": [
          "io_mapping"
        ],
        "description": "A running job's status, next to what the review still owes.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_get_copilot_job"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_get_copilot_job"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/get_endpoint_slots": {
      "post": {
        "summary": "get_endpoint_slots",
        "tags": [
          "io_mapping"
        ],
        "description": "The endpoint's own schema flattened into the slot grid: one section per top-level...",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_get_endpoint_slots"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_get_endpoint_slots"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/get_mapping": {
      "post": {
        "summary": "get_mapping",
        "tags": [
          "io_mapping"
        ],
        "description": "get_mapping",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_get_mapping"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_get_mapping"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/get_policy_type_definition": {
      "post": {
        "summary": "get_policy_type_definition",
        "tags": [
          "io_mapping"
        ],
        "description": "Walkable PT definition (mapping scope: sub_lines + items + item_questions +...",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_get_policy_type_definition"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_get_policy_type_definition"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/get_policy_type_schema": {
      "post": {
        "summary": "get_policy_type_schema",
        "tags": [
          "io_mapping"
        ],
        "description": "Synthesize the extended JSON Schema (the RH mapping target) for a resolved policy...",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_get_policy_type_schema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_get_policy_type_schema"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/get_resolver_constructs": {
      "post": {
        "summary": "get_resolver_constructs",
        "tags": [
          "io_mapping"
        ],
        "description": "Everything a mapping DECLARES for its slots to share \u2014 each of it a cell: derived :...",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_get_resolver_constructs"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_get_resolver_constructs"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/get_resolver_paths": {
      "post": {
        "summary": "get_resolver_paths",
        "tags": [
          "io_mapping"
        ],
        "description": "The mapping's named path aliases ({name: absolute-path}) \u2014 the path analogue of...",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_get_resolver_paths"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_get_resolver_paths"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/get_resolver_spec": {
      "post": {
        "summary": "get_resolver_spec",
        "tags": [
          "io_mapping"
        ],
        "description": "The mapping's full resolver spec \u2014 the seed for the client's working copy.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_get_resolver_spec"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_get_resolver_spec"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/get_review": {
      "post": {
        "summary": "get_review",
        "tags": [
          "io_mapping"
        ],
        "description": "The mapping stated in the carrier's language -- one row per slot.\n\n    Settled threads are hidden unless ``includeResolved`` asks for them.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_get_review"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_get_review"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/get_schema": {
      "post": {
        "summary": "get_schema",
        "tags": [
          "io_mapping"
        ],
        "description": "One schema library row WITH content.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_get_schema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_get_schema"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/get_schema_index": {
      "post": {
        "summary": "get_schema_index",
        "tags": [
          "io_mapping"
        ],
        "description": "Parsed ACORD schema index (codes, code lists, elements, aggregates) for ``schema_id``.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_get_schema_index"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_get_schema_index"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/get_slotfill_context": {
      "post": {
        "summary": "get_slotfill_context",
        "tags": [
          "io_mapping"
        ],
        "description": "Data for the schema-bound slotFill table editor: source.codes \u2014 the LEFT key...",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_get_slotfill_context"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_get_slotfill_context"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/get_source_paths": {
      "post": {
        "summary": "get_source_paths",
        "tags": [
          "io_mapping"
        ],
        "description": "Flatten the inbound document to candidate SOURCE paths + sample values in one call \u2014...",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_get_source_paths"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_get_source_paths"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/get_spec_overview": {
      "post": {
        "summary": "get_spec_overview",
        "tags": [
          "io_mapping"
        ],
        "description": "Top-level snapshot of one spec.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_get_spec_overview"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_get_spec_overview"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/get_variant_slots": {
      "post": {
        "summary": "get_variant_slots",
        "tags": [
          "io_mapping"
        ],
        "description": "The Resolver Stack FORM contract for one (policyType, state) variant: the...",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_get_variant_slots"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_get_variant_slots"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/import_mapping": {
      "post": {
        "summary": "import_mapping",
        "tags": [
          "io_mapping"
        ],
        "description": "Create a new mapping from an export blob.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_import_mapping"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_import_mapping"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/infer_schema_from_workbook": {
      "post": {
        "summary": "infer_schema_from_workbook",
        "tags": [
          "io_mapping"
        ],
        "description": "Propose a JSON Schema from an uploaded workbook. Writes nothing -- confirm by\n    calling upload_schema with the result.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_infer_schema_from_workbook"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_infer_schema_from_workbook"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/introspect_fixture": {
      "post": {
        "summary": "introspect_fixture",
        "tags": [
          "io_mapping"
        ],
        "description": "Tag tree for ``document.<...>`` autocomplete.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_introspect_fixture"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_introspect_fixture"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/list_bruno_examples": {
      "post": {
        "summary": "list_bruno_examples",
        "tags": [
          "io_mapping"
        ],
        "description": "Bruno-collection examples ``{name, collection, method, url, body}``, optionally...",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_list_bruno_examples"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_list_bruno_examples"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/list_endpoints": {
      "post": {
        "summary": "list_endpoints",
        "tags": [
          "io_mapping"
        ],
        "description": "Dotted api paths the apiCall pill suggests.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_list_endpoints"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_list_endpoints"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/list_fixture_coordinates": {
      "post": {
        "summary": "list_fixture_coordinates",
        "tags": [
          "io_mapping"
        ],
        "description": "Every fixture on the mapping, with the COORDINATE its request resolves to.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_list_fixture_coordinates"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_list_fixture_coordinates"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/list_fixtures": {
      "post": {
        "summary": "list_fixtures",
        "tags": [
          "io_mapping"
        ],
        "description": "Return every fixture on the mapping, **with content**.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_list_fixtures"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_list_fixtures"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/list_mappings": {
      "post": {
        "summary": "list_mappings",
        "tags": [
          "io_mapping"
        ],
        "description": "list_mappings",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_list_mappings"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_list_mappings"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/list_notes": {
      "post": {
        "summary": "list_notes",
        "tags": [
          "io_mapping"
        ],
        "description": "Note threads on a mapping.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_list_notes"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_list_notes"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/list_policy_types": {
      "post": {
        "summary": "list_policy_types",
        "tags": [
          "io_mapping"
        ],
        "description": "Every PolicyType row for the carrier -- used by the copilot's discovery flow before...",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_list_policy_types"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_list_policy_types"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/list_schemas": {
      "post": {
        "summary": "list_schemas",
        "tags": [
          "io_mapping"
        ],
        "description": "Schema library for the manager UI.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_list_schemas"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_list_schemas"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/list_spec_indexes": {
      "post": {
        "summary": "list_spec_indexes",
        "tags": [
          "io_mapping"
        ],
        "description": "Named query targets in a spec (code lists, aggregates, enums, ...).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_list_spec_indexes"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_list_spec_indexes"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/list_specs": {
      "post": {
        "summary": "list_specs",
        "tags": [
          "io_mapping"
        ],
        "description": "Every spec the registry knows, sorted ``(source, spec_id)``.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_list_specs"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_list_specs"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/list_versions": {
      "post": {
        "summary": "list_versions",
        "tags": [
          "io_mapping"
        ],
        "description": "list_versions",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_list_versions"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_list_versions"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/load_revision_quote": {
      "post": {
        "summary": "load_revision_quote",
        "tags": [
          "io_mapping"
        ],
        "description": "Reconstruct an existing revision as a ``create_quote_extended`` ``quote_info`` for...",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_load_revision_quote"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_load_revision_quote"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/lookup_spec_enum": {
      "post": {
        "summary": "lookup_spec_enum",
        "tags": [
          "io_mapping"
        ],
        "description": "Members of a named code list / enum within a spec.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_lookup_spec_enum"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_lookup_spec_enum"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/lookup_spec_path": {
      "post": {
        "summary": "lookup_spec_path",
        "tags": [
          "io_mapping"
        ],
        "description": "Resolve a path within a spec (ACORD: dotted element/aggregate; JSONSchema: dotted...",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_lookup_spec_path"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_lookup_spec_path"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/note_follow_up": {
      "post": {
        "summary": "note_follow_up",
        "tags": [
          "io_mapping"
        ],
        "description": "Record a JOB for later -- not a question, so nobody owes a reply and it does\n    not hold up the review. \"Call create_quote_extended once UAT credentials are\n    confirmed\" is a follow-up, not a question.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_note_follow_up"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_note_follow_up"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/promote_slot_to_base": {
      "post": {
        "summary": "promote_slot_to_base",
        "tags": [
          "io_mapping"
        ],
        "description": "Factor a slot's per-variant override UP into the shared base catalog: the overlay...",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_promote_slot_to_base"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_promote_slot_to_base"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/reconcile_mapping": {
      "post": {
        "summary": "reconcile_mapping",
        "tags": [
          "io_mapping"
        ],
        "description": "Reconcile a mapping against the LIVE policy-type definition for one variant.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_reconcile_mapping"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_reconcile_mapping"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/rename_mapping_slug": {
      "post": {
        "summary": "rename_mapping_slug",
        "tags": [
          "io_mapping"
        ],
        "description": "Rename an existing mapping's slug.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_rename_mapping_slug"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_rename_mapping_slug"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/render": {
      "post": {
        "summary": "render",
        "tags": [
          "io_mapping"
        ],
        "description": "Live preview -- render an in-flight (mapping, fixture, template) triple.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_render"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_render"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/reply_to_note": {
      "post": {
        "summary": "reply_to_note",
        "tags": [
          "io_mapping"
        ],
        "description": "Answer one review note, with an outcome.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_reply_to_note"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_reply_to_note"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/resolve_memory_followup": {
      "post": {
        "summary": "resolve_memory_followup",
        "tags": [
          "io_mapping"
        ],
        "description": "Body: ``{mappingId, topic}``.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_resolve_memory_followup"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_resolve_memory_followup"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/resolve_note": {
      "post": {
        "summary": "resolve_note",
        "tags": [
          "io_mapping"
        ],
        "description": "Close a note thread, or reopen it.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_resolve_note"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_resolve_note"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/review_inbox": {
      "post": {
        "summary": "review_inbox",
        "tags": [
          "io_mapping"
        ],
        "description": "Review notes still waiting on a reply.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_review_inbox"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_review_inbox"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/review_index": {
      "post": {
        "summary": "review_index",
        "tags": [
          "io_mapping"
        ],
        "description": "The mapping's products and what each still owes -- the review's front door, for\n    arriving without a product named.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_review_index"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_review_index"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/save_draft_note": {
      "post": {
        "summary": "save_draft_note",
        "tags": [
          "io_mapping"
        ],
        "description": "Store a reviewer's unsent answer so a reload does not discard it. Invisible to\n    the copilot until the review is submitted.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_save_draft_note"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_save_draft_note"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/save_resolver_spec": {
      "post": {
        "summary": "save_resolver_spec",
        "tags": [
          "io_mapping"
        ],
        "description": "Persist the client's working resolver spec \u2014 Save Mapping.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_save_resolver_spec"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_save_resolver_spec"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/search_policies": {
      "post": {
        "summary": "search_policies",
        "tags": [
          "io_mapping"
        ],
        "description": "Typeahead search for policies of a given policy type, to load a sample revision into...",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_search_policies"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_search_policies"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/search_spec": {
      "post": {
        "summary": "search_spec",
        "tags": [
          "io_mapping"
        ],
        "description": "Fuzzy search across a spec's named entities.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_search_spec"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_search_spec"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/set_active_version": {
      "post": {
        "summary": "set_active_version",
        "tags": [
          "io_mapping"
        ],
        "description": "set_active_version",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_set_active_version"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_set_active_version"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/set_analytics_resolvers": {
      "post": {
        "summary": "set_analytics_resolvers",
        "tags": [
          "io_mapping"
        ],
        "description": "BATCH-write ANALYTICS cells -- the dimensions to derive from an inbound submission,...",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_set_analytics_resolvers"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_set_analytics_resolvers"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/set_declarations": {
      "post": {
        "summary": "set_declarations",
        "tags": [
          "io_mapping"
        ],
        "description": "Declare aliases, shared logic and the variant key in ONE transaction, applied in...",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_set_declarations"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_set_declarations"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/set_endpoint_slot_source": {
      "post": {
        "summary": "set_endpoint_slot_source",
        "tags": [
          "io_mapping"
        ],
        "description": "Write (or clear, with ``cell=None``) the resolver cell for one slot of a...",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_set_endpoint_slot_source"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_set_endpoint_slot_source"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/set_item_repeat": {
      "post": {
        "summary": "set_item_repeat",
        "tags": [
          "io_mapping"
        ],
        "description": "Make an item emit ONE INSTANCE PER SOURCE ELEMENT, or stop it doing so.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_set_item_repeat"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_set_item_repeat"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/set_lookup_table": {
      "post": {
        "summary": "set_lookup_table",
        "tags": [
          "io_mapping"
        ],
        "description": "Create or replace a shared lookup table's ``map`` (code\u2192value) and/or ``default`` \u2014...",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_set_lookup_table"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_set_lookup_table"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/set_resolver_construct": {
      "post": {
        "summary": "set_resolver_construct",
        "tags": [
          "io_mapping"
        ],
        "description": "Replace one construct section (``derived``/``channels``/``variantKey``) and...",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_set_resolver_construct"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_set_resolver_construct"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/set_resolver_path": {
      "post": {
        "summary": "set_resolver_path",
        "tags": [
          "io_mapping"
        ],
        "description": "Create / rename / update named path aliases, ONE OR MANY.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_set_resolver_path"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_set_resolver_path"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/set_resolver_table": {
      "post": {
        "summary": "set_resolver_table",
        "tags": [
          "io_mapping"
        ],
        "description": "Create / replace / delete one entry in the reference-table library...",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_set_resolver_table"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_set_resolver_table"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/set_resolvers": {
      "post": {
        "summary": "set_resolvers",
        "tags": [
          "io_mapping"
        ],
        "description": "BATCH-write resolver cells -- the copilot's core authoring primitive (the shift away...",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_set_resolvers"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_set_resolvers"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/set_response_resolvers": {
      "post": {
        "summary": "set_response_resolvers",
        "tags": [
          "io_mapping"
        ],
        "description": "BATCH-write RESPONSE cells -- the FIELDS dialect, for a response the mapping...",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_set_response_resolvers"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_set_response_resolvers"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/set_response_rewrite": {
      "post": {
        "summary": "set_response_rewrite",
        "tags": [
          "io_mapping"
        ],
        "description": "Write the RESPONSE REWRITE list -- the dialect for a response that ECHOES the...",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_set_response_rewrite"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_set_response_rewrite"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/set_slot_source": {
      "post": {
        "summary": "set_slot_source",
        "tags": [
          "io_mapping"
        ],
        "description": "Write (or clear) a resolver cell for one slot of a LAYERED mapping -- the Resolver...",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_set_slot_source"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_set_slot_source"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/stamp_version": {
      "post": {
        "summary": "stamp_version",
        "tags": [
          "io_mapping"
        ],
        "description": "stamp_version",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_stamp_version"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_stamp_version"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/start_copilot_job": {
      "post": {
        "summary": "start_copilot_job",
        "tags": [
          "io_mapping"
        ],
        "description": "Hand a submitted review to the copilot as a background job.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_start_copilot_job"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_start_copilot_job"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/stop_copilot_job": {
      "post": {
        "summary": "stop_copilot_job",
        "tags": [
          "io_mapping"
        ],
        "description": "Stop a running copilot job.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_stop_copilot_job"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_stop_copilot_job"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/submit_review": {
      "post": {
        "summary": "submit_review",
        "tags": [
          "io_mapping"
        ],
        "description": "Send this reviewer's drafts as a batch the copilot is expected to answer.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_submit_review"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_submit_review"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/update_fixture": {
      "post": {
        "summary": "update_fixture",
        "tags": [
          "io_mapping"
        ],
        "description": "update_fixture",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_update_fixture"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_update_fixture"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/update_mapping_metadata": {
      "post": {
        "summary": "update_mapping_metadata",
        "tags": [
          "io_mapping"
        ],
        "description": "update_mapping_metadata",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_update_mapping_metadata"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_update_mapping_metadata"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/update_memory_summary": {
      "post": {
        "summary": "update_memory_summary",
        "tags": [
          "io_mapping"
        ],
        "description": "Body: ``{mappingId, summary}``.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_update_memory_summary"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_update_memory_summary"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/io_mapping/upload_schema": {
      "post": {
        "summary": "upload_schema",
        "tags": [
          "io_mapping"
        ],
        "description": "Create or replace a BYOS schema library row after validating content.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-io_mapping_upload_schema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-io_mapping_upload_schema"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/ivans_dbcs/abandon_build": {
      "post": {
        "summary": "abandon_build",
        "tags": [
          "ivans_dbcs"
        ],
        "description": "Mark the month's stuck in-flight build failed so it can be resubmitted.\n\n    Body: ``{year, month}``. Response: ``{abandoned, reference_id, year,\n    month}``. Does not stop a running worker.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-ivans_dbcs_abandon_build"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-ivans_dbcs_abandon_build"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/ivans_dbcs/get_build_status": {
      "post": {
        "summary": "get_build_status",
        "tags": [
          "ivans_dbcs"
        ],
        "description": "Poll the month's build. Idempotent: polling never consumes the result.\n\n    Body: ``{year, month}``. Response: ``{success, async_status, async_result,\n    build_status, stalled_since, reference_id, year, month}``. Render\n    ``build_status``, not ``async_status``: a build that failed its stability\n    check still finishes as a Celery success.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-ivans_dbcs_get_build_status"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-ivans_dbcs_get_build_status"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/ivans_dbcs/get_configuration": {
      "post": {
        "summary": "get_configuration",
        "tags": [
          "ivans_dbcs"
        ],
        "description": "Return the credential-free DBCS configuration read model.\n\n    Response: ``{checked, upload_enabled, upload_method,\n    selected_agency_count}``. Built from named fields only, so no transport or\n    connection detail can reach the wire through it.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-ivans_dbcs_get_configuration"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-ivans_dbcs_get_configuration"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/ivans_dbcs/get_existing_artifacts": {
      "post": {
        "summary": "get_existing_artifacts",
        "tags": [
          "ivans_dbcs"
        ],
        "description": "List the DBCS XML already on file for the month, newest first.\n\n    Body: ``{year, month}``. Response: ``{year, month, artifacts}``. Matches on\n    the file's metadata first; a file with no metadata is matched by legacy\n    filename only, and flagged ``verified: false``.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-ivans_dbcs_get_existing_artifacts"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-ivans_dbcs_get_existing_artifacts"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/ivans_dbcs/get_selected_agencies": {
      "post": {
        "summary": "get_selected_agencies",
        "tags": [
          "ivans_dbcs"
        ],
        "description": "Return the stored selection, resolved, INCLUDING ids no longer eligible.\n\n    Response: ``{agencies, unknown_contact_ids}`` -- the same shape the batch\n    resolver answers with, because both endpoints answer the same two\n    questions.\n\n    The save replaces the whole set, so a caller wanting to add or drop one\n    agency has to submit the complete list. A stored id that has since become\n    ineligible appears on no search page, yet it is still stored and is still\n    refused on the next save; this endpoint is the only way to see it.\n\n    NOT paginated and NOT capped, unlike every other endpoint here. That is\n    deliberate but it is a real cost, so it is stated rather than buried: this\n    endpoint answers with the whole stored selection, and nothing bounds how\n    large that is. ``MAX_SELECTION_IDS`` bounds a REQUEST, not the stored set:\n    ``vendors/nxtech/dbcs/cli.py::select_agencies`` writes the key with no cap\n    of its own and is deliberately left in place by this story, so a tenant can\n    already hold more ids than this API would accept in a save. (Postfix 250\n    only seeds the key empty; the CLI is the uncapped writer.) Capping or\n    paging the answer would hide exactly the\n    stored ids an operator opened it to find, which is the whole reason the\n    endpoint exists. What the size does NOT do is reach the database as one\n    statement: ``repository/ivans_dbcs.py::IvansDbcsRepository`` chunks the\n    lookup at ``ID_QUERY_CHUNK_SIZE`` and unions the batches. A client must be\n    prepared for a list longer than it could have submitted itself.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-ivans_dbcs_get_selected_agencies"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-ivans_dbcs_get_selected_agencies"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/ivans_dbcs/rebuild": {
      "post": {
        "summary": "rebuild",
        "tags": [
          "ivans_dbcs"
        ],
        "description": "Submit a new build that supersedes an earlier DBCS XML for the month.\n\n    Body: ``{year, month, supersedes_file_id, acknowledged_unverified_month}``.\n    Same admission and response as ``submit_build``. The superseded file must\n    exist, be DBCS XML, and cover the requested month; only the NEW file's\n    metadata records the link.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-ivans_dbcs_rebuild"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-ivans_dbcs_rebuild"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/ivans_dbcs/resolve_agencies": {
      "post": {
        "summary": "resolve_agencies",
        "tags": [
          "ivans_dbcs"
        ],
        "description": "Resolve a batch of contact ids to rows plus their eligibility verdicts.\n\n    Body: ``{contact_ids}``. Response: ``{agencies, unknown_contact_ids}``.\n\n    No eligibility filter is applied: this answers for ANY contact and each row\n    carries the axes it fails, which is what makes it useful for auditing a\n    selection rather than a filtered view of the search.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-ivans_dbcs_resolve_agencies"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-ivans_dbcs_resolve_agencies"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/ivans_dbcs/save_selected_agencies": {
      "post": {
        "summary": "save_selected_agencies",
        "tags": [
          "ivans_dbcs"
        ],
        "description": "Replace the whole stored selection with the submitted ids.\n\n    Body: ``{contact_ids, confirmation_text}``. Response:\n    ``{selected_agency_count, previous_agency_count}``.\n\n    An empty ``contact_ids`` is a legitimate request that clears the selection,\n    guarded by the typed confirmation the request schema enforces. Validation\n    is all-or-nothing and runs before the write, so a refused request stores\n    nothing; the refusal names every offending id, both as a sentence under\n    ``contact_ids`` and as structured entries under ``rejected_agencies`` or\n    ``duplicate_agency_numbers`` that a UI can act on.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-ivans_dbcs_save_selected_agencies"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-ivans_dbcs_save_selected_agencies"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/ivans_dbcs/search_agencies": {
      "post": {
        "summary": "search_agencies",
        "tags": [
          "ivans_dbcs"
        ],
        "description": "Return one page of the eligible agency roster, flagged for the picker.\n\n    Body: ``{search_text, page, page_size}``. Response:\n    ``{page, page_size, total_count, total_pages, agencies}``.\n\n    A page past the last one is an empty list with the real total, never an\n    error -- a paging control branches on exactly that.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-ivans_dbcs_search_agencies"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-ivans_dbcs_search_agencies"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/ivans_dbcs/submit_build": {
      "post": {
        "summary": "submit_build",
        "tags": [
          "ivans_dbcs"
        ],
        "description": "Admit and enqueue a DBCS build for one completed calendar month.\n\n    Body: ``{year, month, acknowledged_unverified_month}``. Response:\n    ``{success, accepted, async_status, async_result, reference_id,\n    build_token, snapshot_file_id, submitted_at, supersedes_file_id, year,\n    month}``.\n\n    A refused admission answers ``success: false`` with\n    ``messages.refusal_code`` naming the gate. ``accepted: false`` means a\n    build for the month is already in flight and nothing new was queued.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-ivans_dbcs_submit_build"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-ivans_dbcs_submit_build"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/jobrunner/list_processes": {
      "post": {
        "summary": "list_processes",
        "tags": [
          "jobrunner"
        ],
        "description": "Get a paginated list of JobRunner processes.\n\n    Parameters\n    ----------\n    page : int, optional\n        The page number to return (1-based). Defaults to 1.\n    per_page : int, optional\n        Number of items per page. Defaults to 25.\n    status : str, optional\n        Filter by status if provided.\n    job_name : str, optional\n        Filter by job name if provided.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "page": {
                    "type": "integer"
                  },
                  "per_page": {
                    "type": "integer"
                  },
                  "status": {
                    "type": "string"
                  },
                  "job_name": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/jobrunner/relaunch_process": {
      "post": {
        "summary": "relaunch_process",
        "tags": [
          "jobrunner"
        ],
        "description": "Relaunch a JobRunner process by ID.\n\n    Parameters\n    ----------\n    job_id : str\n        The ID of the process to relaunch.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "job_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/attach_form_to_policy_type": {
      "post": {
        "summary": "attach_form_to_policy_type",
        "tags": [
          "lines"
        ],
        "description": "\n    Attaches a new stock form (a PDF file) to a Policy Type, and creates\n    its print-flag metadata row (x_policy_types_docs).\n\n    Parameters\n    ----------\n    form : dict\n        policy_type_id : str, required\n        file_name : str, required\n        file_base64 : str, required - base64-encoded file content\n        mime_type : str, optional - defaults to 'application/pdf'\n        metadata : dict, optional - fields matching PolicyTypeFormMetadataSchema\n\n    Returns\n    -------\n    dict\n        {\"file\": {...}, \"metadata\": {...} or None}\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-attach_form_to_policy_type"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-attach_form_to_policy_type"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/attach_form_to_policy_type_item": {
      "post": {
        "summary": "attach_form_to_policy_type_item",
        "tags": [
          "lines"
        ],
        "description": "\n    Attaches a new stock form (a PDF file) to a Policy Type Item, and\n    creates its print-flag metadata row (x_policy_type_items_docs).\n\n    Parameters\n    ----------\n    form : dict\n        policy_type_item_id : str, required\n        file_name : str, required\n        file_base64 : str, required - base64-encoded file content\n        mime_type : str, optional - defaults to 'application/pdf'\n        metadata : dict, optional - fields matching PolicyTypeItemFormMetadataSchema\n\n    Returns\n    -------\n    dict\n        {\"file\": {...}, \"metadata\": {...} or None}\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-attach_form_to_policy_type_item"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-attach_form_to_policy_type_item"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/copy_line_items": {
      "post": {
        "summary": "copy_line_items",
        "tags": [
          "lines"
        ],
        "description": "Copy line items between effective dates, states, policy types,\n    line types and sub-lines.\n\n    Parameters:\n    -----------\n    from_effective_date_id : str\n    to_effective_date_id : str\n    from_state_id : str\n    to_state_id : str\n    json_dict:\n        A JSON object defining what items to copy, what those\n        items are, and what to copy them into.\n    validate_only: bool, optional\n        Whether to just validate the parameters, defaults to False.\n\n    Returns\n    -------\n    success: bool\n        True if successful, false if not\n    messages: list of str\n        List of human-readable error messages\n    data: list\n        The data response having the form:\n        ::\n            {\n                \"data\": [\n                    {\n                        \"fromEffectiveDate\": 'YYYY-MM-DD HH:MM:SS',\n                        \"toEffectiveData\": 'YYYY-MM-DD HH:MM:SS',\n                        \"fromState\": str,\n                        \"toState\": str,\n                        \"fromPolicyType\": str,\n                        \"toPolicyType\": str,\n                        \"copiedItems\": {}\n                    },\n                ],\n                \"messages\": [],\n                \"success\": true\n            }\n\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "from_effective_date_id": {},
                  "to_effective_date_id": {},
                  "from_state_id": {},
                  "to_state_id": {},
                  "json_dict": {},
                  "validate_only": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/copy_policy_type": {
      "post": {
        "summary": "copy_policy_type",
        "tags": [
          "lines"
        ],
        "description": "API method to copy a policy type to a new effective date and state.\n\n    Parameters\n    ----------\n    policy_type_id : str, required\n    from_effective_date_id : str, required\n    to_effective_date_id : str, required\n    from_state_id : str, required\n    to_state_id : str, required\n    validate_only : bool, optional\n        Whether to just validate the parameters, defaults to False\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    messages : list of str\n        List of human-readable error messages\n    data : array containing applicable policy type data\n        ::\n        {\n            \"data\": [],\n            \"messages\": [],\n            \"success\": bool\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "policy_type_id": {
                    "type": "string"
                  },
                  "from_effective_date_id": {
                    "type": "string"
                  },
                  "to_effective_date_id": {
                    "type": "string"
                  },
                  "from_state_id": {
                    "type": "string"
                  },
                  "to_state_id": {
                    "type": "string"
                  },
                  "validate_only": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/copy_underwriting_rules": {
      "post": {
        "summary": "copy_underwriting_rules",
        "tags": [
          "lines"
        ],
        "description": "Copies underwriting rules from one effective date, state and policy type to another.\n\n    Parameters:\n    -----------\n    from_effective_date_id : str\n        UUID of an effective date\n    from_state_id : str\n        UUID of a state\n    from_policy_type_id : str\n        UUID of a policy type\n    to_effective_date_id : str\n        UUID of an effective date\n    to_state_id : str\n        UUID of a state\n    to_policy_type_id : str\n        UUID of a policy type\n    json_dict : dict\n            {\n                    \"underwriting_rule_ids\": [],\n                    \"auto_infer_refs\": bool\n                }\n    validate_only: bool\n        Whether to just validate the parameters, defaults to False\n    manual_items: list\n        An optional list of policy type ids to review manually\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : list\n        The data response having the form:\n        ::\n            {\n                \"data\": [\n                    {\n                        \"fromEffectiveDate\": 'YYYY-MM-DD',\n                        \"fromState\": str,\n                        \"fromPolicyType\": str,\n                        \"toEffectiveData\": 'YYYY-MM-DD',\n                        \"toState\": str,\n                        \"toPolicyType\": str\n                    },\n                ],\n                \"messages\": [],\n                \"success\": true\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "payload": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/create_builderdiff_mapping": {
      "post": {
        "summary": "create_builderdiff_mapping",
        "tags": [
          "lines"
        ],
        "description": "Creates a mapping to supply persistent builder with an explicit change.\n\n    Parameters:\n    -----------\n    mapping_type : str, required\n    from_mapped_name : str, required\n    to_mapped_name : str, required\n    validate_only : bool, optional\n        True validates only, False validates and creates\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : list\n        The data response having the form:\n        ::\n            {\n                \"data\": [\n                    {\n                        \"mapping_type\": str,\n                        \"old_name\": str,\n                        \"new_name\": str\n                    },\n                ],\n                \"messages\": [],\n                \"success\": true\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "mapping_type": {},
                  "from_mapped_name": {},
                  "to_mapped_name": {},
                  "validate_only": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/create_effective_date": {
      "post": {
        "summary": "create_effective_date",
        "tags": [
          "lines"
        ],
        "description": "\n    Creates an effective date with the given parameters\n    @param params_data: dict (id, effective_date, policy_type_ids, policy_type_external_system_references, force)\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-create_effective_date"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-create_effective_date"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/create_policy_type": {
      "post": {
        "summary": "create_policy_type",
        "tags": [
          "lines"
        ],
        "description": "\n    Creates a policy type with the given parameters.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-create_policy_type"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-create_policy_type"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/create_policy_type_item": {
      "post": {
        "summary": "create_policy_type_item",
        "tags": [
          "lines"
        ],
        "description": "\n    Creates a single line item on an existing policy type.\n    Requires policy_type_id, name, category, and type.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-create_policy_type_item"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-create_policy_type_item"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/create_rating_grid_definition": {
      "post": {
        "summary": "create_rating_grid_definition",
        "tags": [
          "lines"
        ],
        "description": "Creates a new rating grid definition.\n\n    Args:\n        payload (dict): The data for the new rating grid definition.\n\n    Returns:\n        dict: The serialized created rating grid definition.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/create_sub_line": {
      "post": {
        "summary": "create_sub_line",
        "tags": [
          "lines"
        ],
        "description": "\n    Creates a single subline on an existing policy type.\n    Requires policy_type_id, name, category, and type.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-create_sub_line"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-create_sub_line"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/delete_builderdiff_mapping": {
      "post": {
        "summary": "delete_builderdiff_mapping",
        "tags": [
          "lines"
        ],
        "description": "Deletes an explicit mapping in persistent builder.\n\n    Parameters:\n    -----------\n    mapping_type : str\n    from_mapped_name : str\n    to_mapped_name : str\n    validate_only : bool\n        True validates only, False validates and deletes\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : list\n        The data response having the form:\n        ::\n            {\n                \"data\": [\n                    {\n                        \"mapping_type\": str,\n                        \"old_name\": str,\n                        \"new_name\": str\n                    },\n                ],\n                \"messages\": [],\n                \"success\": true\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "mapping_type": {},
                  "from_mapped_name": {},
                  "to_mapped_name": {},
                  "validate_only": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/delete_effective_date": {
      "post": {
        "summary": "delete_effective_date",
        "tags": [
          "lines"
        ],
        "description": "\n    Deletes an effective date.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/delete_line_item": {
      "post": {
        "summary": "delete_line_item",
        "tags": [
          "lines"
        ],
        "description": "API method to delete the line item specified by id.\n\n    Parameters\n    ----------\n    item_id : str, required\n        UUID of an existing line item.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data :\n        ::\n        {\n            \"messages\": [],\n            \"success\": bool\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "item_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/delete_policy_type": {
      "post": {
        "summary": "delete_policy_type",
        "tags": [
          "lines"
        ],
        "description": "\n    Deletes a policy type.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/delete_rating_table": {
      "post": {
        "summary": "delete_rating_table",
        "tags": [
          "lines"
        ],
        "description": "\n    Deletes a rating table.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/delete_rating_table_file": {
      "post": {
        "summary": "delete_rating_table_file",
        "tags": [
          "lines"
        ],
        "description": "\n    Deletes a rating table file\n    :param file_id: str (id of the file)\n    :return: bool\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/delete_sub_line": {
      "post": {
        "summary": "delete_sub_line",
        "tags": [
          "lines"
        ],
        "description": "API method to delete a subline (and cascade-delete its child items).\n\n    Mirrors ``delete_line_item``: live sites are blocked outright, no\n    backend dependency gate. The caller (Copilot, future UI) is\n    responsible for previewing dependencies via\n    ``lines/get_policies_with_sub_line`` and confirming with the user\n    before invoking this endpoint.\n\n    Returns\n    -------\n    success : bool\n    messages : list of str\n    data : dict\n        On success: ``{\"deleted_items\": int, \"affected_policies\":\n        [policy_number, ...]}``.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-delete_sub_line"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-delete_sub_line"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/find_effective_date": {
      "post": {
        "summary": "find_effective_date",
        "tags": [
          "lines"
        ],
        "description": "find_effective_date",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "date": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/get_all_effective_dates": {
      "post": {
        "summary": "get_all_effective_dates",
        "tags": [
          "lines"
        ],
        "description": "Retrieves information about all effective dates.\n\n    Parameters\n    ----------\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : list\n        The data response having the form:\n        ::\n            {\n                \"data\": [\n                    {\n                        \"description\": str,\n                        \"creation_date\": 'YYYY-MM-DD HH:MM:SS',\n                        \"override_lock\": bool,\n                        \"effective_date\": 'YYYY-MM-DD',\n                        \"change_history\": [],\n                        \"id\": UUID\n                    },\n                ],\n                \"messages\": [],\n                \"success\": true\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/get_all_lines": {
      "post": {
        "summary": "get_all_lines",
        "tags": [
          "lines"
        ],
        "description": "Retrieves information about all lines for an effective date.\n\n    Parameters\n    ----------\n    effective_date_id : str, required\n        UUID of an effective date\n    location_id : str, optional\n        UUID of a location. If empty, all lines for all locations returned.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : list\n        The data response having the form:\n        ::\n            {\n                \"data\": [\n                    {\n                        \"inheritance_id\": UUID,\n                        \"name\": str,\n                        \"date_updated\": 'YYYY-MM-DD HH:MM:SS',\n                        \"system_tags\": dict,\n                        \"effective_id\": UUID,\n                        \"location_id\": UUID,\n                        \"id\": UUID\n                    },\n                ],\n                \"messages\": [],\n                \"success\": true\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "effective_date_id": {
                    "type": "string"
                  },
                  "location_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/get_all_policy_types": {
      "post": {
        "summary": "get_all_policy_types",
        "tags": [
          "lines"
        ],
        "description": "Retrieves information about all policy types for an effective date.\n\n    Parameters\n    ----------\n    effective_date_id : str, required\n        UUID for an effective date\n    location_id : str, required\n        UUID for a location. If empty, all policy types for all locations returned.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : list\n        The data response having the form:\n        ::\n            {\n                \"data\": [\n                    {\n                        \"always_display_wizard_credit_score_button\": bool,\n                        \"skip_insured_quoting_step\": bool,\n                        \"allow_motor_vehicle_reports\": bool,\n                        \"months_mvr_valid\": int,\n                        \"date_updated\": 'YYYY-MM-DD HH:MM:SS',\n                        \"three_month\": bool,\n                        \"app_id\": str,\n                        \"six_month\": bool,\n                        \"rating_info_title\": str,\n                        \"sort_order\": int,\n                        \"britelines_product_name\": str,\n                        \"requires_approval\": bool,\n                        \"one_year_quote\": bool,\n                        \"location_id\": UUID,\n                        \"id\": UUID,\n                        \"three_year\": bool,\n                        \"require_risk_address\": bool,\n                        \"maximum_risk_count\": int,\n                        \"protection_class\": str,\n                        \"is_protection_class_btn_visible\": bool,\n                        \"allow_property_valuation\": bool,\n                        \"one_year\": bool,\n                        \"open_to_quoting\": bool,\n                        \"nine_month\": bool,\n                        \"separate_dec_sections\": bool,\n                        \"three_year_quote\": bool,\n                        \"inheritance_id\": UUID,\n                        \"description\": str,\n                        \"trust_risk_premiums\": bool,\n                        \"three_year_factor\": Decimal('0.0000'),\n                        \"six_month_quote\": bool,\n                        \"system_tags\": dict,\n                        \"line_id\": UUID,\n                        \"sequence_id\": UUID,\n                        \"six_month_factor\": Decimal('0.0000'),\n                        \"one_year_factor\": Decimal('0.0000'),\n                        \"three_month_quote\": bool,\n                        \"use_rating_v1\": bool,\n                        \"underwriting\": str,\n                        \"dec_display_options\": str,\n                        \"name\": str,\n                        \"three_month_factor\": Decimal('0.0000'),\n                        \"nine_month_quote\": bool,\n                        \"multiple_property_status\": bool,\n                        \"limit_threshold\": Decimal('0.00'),\n                        \"show_optional_builder_items_inline\": bool,\n                        \"effective_id\": UUID,\n                        \"nine_month_factor\": Decimal('0.0000'),\n                        \"require_credit_score\": bool,\n                        \"limit_warning\": int\n                    },\n                ],\n                \"messages\": [],\n                \"success\": true\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "effective_date_id": {
                    "type": "string"
                  },
                  "location_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/get_all_states": {
      "post": {
        "summary": "get_all_states",
        "tags": [
          "lines"
        ],
        "description": "Retrieves information about all states or for a specific effective date.\n\n\n    Parameters\n    ----------\n    effective_date_id : str, optional\n        UUID of an effective date. Leave blank to return all states\n        without filtering by effective date.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : list\n        The data response having the form:\n        ::\n            {\n                \"data\": [\n                    {\n                        \"life_cycle_parameters\": str,\n                        \"checked\": bool,\n                        \"name\": str,\n                        \"county_specifications\": list,\n                        \"date_updated\": 'YYYY-MM-DD HH:MM:SS',\n                        \"country_id\": UUID,\n                        \"abbreviation\": str,\n                        \"cities\": list,\n                        \"id\": UUID,\n                        \"counties\": list\n                    },\n                ],\n                \"messages\": [],\n                \"success\": true\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "effective_date_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/get_effective_date": {
      "post": {
        "summary": "get_effective_date",
        "tags": [
          "lines"
        ],
        "description": "\n    Returns an effective date\n    @param id\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_effective_date"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_effective_date"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/get_export_line_file": {
      "post": {
        "summary": "get_export_line_file",
        "tags": [
          "lines"
        ],
        "description": "Retrieves file data for exporting a line.\n\n    Parameters\n    ----------\n    curr_line_id : str, required\n        The line id.\n    curr_eff_date_id : str, required\n        The effective date id,\n    curr_state_id : str, required\n        The state id\n    include_custom_sequences : bool, optional\n        Whether or not to include any non-default data from custom_sequences that is associated with the policy types\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : list\n        The data response having the form:\n        ::\n            {\n                \"data\": JSON data respresenting a line export\n                \"messages\": [],\n                \"success\": true\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "curr_line_id": {
                    "type": "string"
                  },
                  "curr_eff_date_id": {
                    "type": "string"
                  },
                  "curr_state_id": {
                    "type": "string"
                  },
                  "include_custom_sequences": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/get_policies_with_line_item": {
      "post": {
        "summary": "get_policies_with_line_item",
        "tags": [
          "lines"
        ],
        "description": "API method to get all policies using a specified (by id) line item.\n\n    Parameters\n    ----------\n    item_id : str, required\n        UUID of an existing line item.\n    limit : int, optional\n        number of policies to return, 0 means all\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        ``{\"count\": int, \"policies\": [policy_number, ...],\n        \"rule_count\": int, \"form_count\": int}``\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "item_id": {
                    "type": "string"
                  },
                  "limit": {
                    "type": "integer"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/get_policies_with_sub_line": {
      "post": {
        "summary": "get_policies_with_sub_line",
        "tags": [
          "lines"
        ],
        "description": "API method to get all policies using a specified (by id) subline.\n\n    Mirrors the shape of ``get_policies_with_line_item``: returns a count\n    plus a list of policy numbers clamped to ``limit``, alongside the\n    rule/form dependency counts for the subline's child items.\n\n    Parameters\n    ----------\n    sub_line_id : str, required\n        UUID of an existing subline.\n    limit : int, optional\n        Number of policies to return. 0 (default) means all.\n\n    Returns\n    -------\n    success : bool\n    messages : list of str\n    data : dict\n        ``{\"count\": int, \"policies\": [policy_number, ...],\n        \"rule_count\": int, \"form_count\": int}``\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_policies_with_sub_line"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_policies_with_sub_line"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/get_policy_type": {
      "post": {
        "summary": "get_policy_type",
        "tags": [
          "lines"
        ],
        "description": "\n    Retrieves a policy type with the given ID.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_policy_type"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_policy_type"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/get_policy_type_item": {
      "post": {
        "summary": "get_policy_type_item",
        "tags": [
          "lines"
        ],
        "description": "\n    Retrieves a single line item with the given ID, including its rate_chain.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_policy_type_item"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_policy_type_item"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/get_policy_type_minimal": {
      "post": {
        "summary": "get_policy_type_minimal",
        "tags": [
          "lines"
        ],
        "description": "\n    Retrieves a policy type with the given ID, excluding rate_chain data from items.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_policy_type_minimal"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_policy_type_minimal"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/get_rate_chains": {
      "post": {
        "summary": "get_rate_chains",
        "tags": [
          "lines"
        ],
        "description": "\n    Retrieves the rate chains of all line items for the policy types in scope\n    in a single batched call.\n\n    Built for scan/audit flows (e.g. \"find all year categories missing 2025\n    across all policy types\") that would otherwise fetch thousands of items\n    one get_policy_type_item call at a time.\n\n    Parameters\n    ----------\n    effective_date_id : str, optional\n        UUID of an effective date. Required unless policy_type_ids is given.\n        All policy types under this effective date are included.\n    location_id : str, optional\n        UUID of a location/state to narrow the effective date scope.\n    policy_type_ids : list of str, optional\n        Explicit policy type UUIDs. When given, effective_date_id and\n        location_id are ignored.\n    step_types : list of str, optional\n        Rate chain step types to include (e.g. [\"CATEGORIES\"]). Steps of\n        other types are dropped before serialization, keeping the response\n        small. When omitted, full rate chains are returned.\n\n    Returns\n    -------\n    data : list of dict\n        One entry per line item (top-level and subline items):\n        ::\n            {\n                \"policy_type_id\": UUID,\n                \"policy_type_name\": str,\n                \"item_id\": UUID,\n                \"item_name\": str,\n                \"rate_chain\": [ ...steps... ]\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_rate_chains"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_rate_chains"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/get_rating_table_template": {
      "post": {
        "summary": "get_rating_table_template",
        "tags": [
          "lines"
        ],
        "description": "\n    Returns a template for rating tables or vehicle prefill fallback tables\n\n    Query Parameters:\n        table_type: Optional[str] - Type of table template to generate ('grid_points' or 'prefill_vehicle_fallback')\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/get_underwriting_question_autofill_answers": {
      "post": {
        "summary": "get_underwriting_question_autofill_answers",
        "tags": [
          "lines"
        ],
        "description": "\n    Get auto-fill answers for underwriting questions based on template risks.\n    Returns answers that are opposite of yes_no_prevent_continue values.\n    Args:\n        policy_type_id: Policy type identifier\n    Returns:\n        List of auto-fill answers with question_id and suggested_answer\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_underwriting_question_autofill_answers"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_underwriting_question_autofill_answers"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/import_line": {
      "post": {
        "summary": "import_line",
        "tags": [
          "lines"
        ],
        "description": "import_line",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "new_eff_date_id": {},
                  "new_state_id": {},
                  "file_data": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/import_rating_table": {
      "post": {
        "summary": "import_rating_table",
        "tags": [
          "lines"
        ],
        "description": "\n    Imports a rating table\n    @param params_data: dict (\n        table_definition_id: str - ID of the table definition,\n        location_id: str - ID of the state,\n        name: str - Name of the table,\n        effective_date: str - Effective date for the table,\n        renewal_effective_date: str - Optional renewal effective date,\n        file_id: str - ID of the uploaded file\n    )\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/list_effective_dates": {
      "post": {
        "summary": "list_effective_dates",
        "tags": [
          "lines"
        ],
        "description": "\n    Returns a list of effective dates\n    @param params_data: dict (page, page_size, sort_by, sort_order)\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-list_effective_dates"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-list_effective_dates"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/list_forms_for_policy_type": {
      "post": {
        "summary": "list_forms_for_policy_type",
        "tags": [
          "lines"
        ],
        "description": "\n    Lists every form attached to a Policy Type (active or not, matching what\n    actually renders), including both ids a caller needs: file_id (the File\n    row) and form_id (the\n    XPolicyTypesDoc row's own id, required by update_form_on_policy_type/\n    remove_form_from_policy_type). Mirrors legacy retrieveDocuments\n    (lib/lines/views.py:1930).\n\n    Parameters\n    ----------\n    policy_type_id : str, required\n\n    Returns\n    -------\n    list of dict\n        Each dict has file_id, form_id, title, and the 7\n        policy-type-level metadata fields (form_code, edition_number,\n        description, suppress_printing, always_print_on_renewal,\n        always_print_on_endorsement, mortgagee_types).\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-list_forms_for_policy_type"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-list_forms_for_policy_type"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/list_forms_for_policy_type_item": {
      "post": {
        "summary": "list_forms_for_policy_type_item",
        "tags": [
          "lines"
        ],
        "description": "\n    Lists every form attached to a Policy Type Item (active or not, matching\n    what actually renders), including both ids a caller needs: file_id (the\n    File row) and form_id (the\n    XPolicyTypeItemsDoc row's own id, required by\n    update_form_on_policy_type_item/remove_form_from_policy_type_item).\n    Mirrors legacy retrieveDocuments (lib/lines/views.py:1930).\n\n    Parameters\n    ----------\n    policy_type_item_id : str, required\n\n    Returns\n    -------\n    list of dict\n        Each dict has file_id, form_id, title, and all 14 metadata\n        fields (see domain.form.PolicyTypeItemFormMetadataSchema).\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-list_forms_for_policy_type_item"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-list_forms_for_policy_type_item"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/list_policy_types": {
      "post": {
        "summary": "list_policy_types",
        "tags": [
          "lines"
        ],
        "description": "\n    Lists policy types based on the given parameters.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-list_policy_types"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-list_policy_types"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/list_rating_grid_definitions": {
      "post": {
        "summary": "list_rating_grid_definitions",
        "tags": [
          "lines"
        ],
        "description": "Get rating grid definitions.\n\n    Returns:\n        A list of serialized RatingTableDefinition objects.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/list_rating_tables": {
      "post": {
        "summary": "list_rating_tables",
        "tags": [
          "lines"
        ],
        "description": "\n    Returns a list of rating tables\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-list_rating_tables"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/modify_effective_date": {
      "post": {
        "summary": "modify_effective_date",
        "tags": [
          "lines"
        ],
        "description": "\n    Update an effective date with the given parameters\n    @param params_data: dict\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-modify_effective_date"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-modify_effective_date"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/modify_policy_type": {
      "post": {
        "summary": "modify_policy_type",
        "tags": [
          "lines"
        ],
        "description": "\n    Modifies a policy type with the given parameters.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-modify_policy_type"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-modify_policy_type"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/modify_policy_type_item": {
      "post": {
        "summary": "modify_policy_type_item",
        "tags": [
          "lines"
        ],
        "description": "\n    Modifies a line item with the given parameters.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-modify_policy_type_item"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-modify_policy_type_item"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/modify_sub_line": {
      "post": {
        "summary": "modify_sub_line",
        "tags": [
          "lines"
        ],
        "description": "\n    Modifies a single subline with the given parameters. Partial update --\n    only provided fields are changed.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-modify_sub_line"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-modify_sub_line"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/remove_form_from_policy_type": {
      "post": {
        "summary": "remove_form_from_policy_type",
        "tags": [
          "lines"
        ],
        "description": "\n    Hard-deletes a policy-type-level form: deletes the File row (the ON\n    DELETE CASCADE drops the linked XPolicyTypesDoc row) and removes the\n    stored file. Irreversible.\n\n    Parameters\n    ----------\n    form : dict\n        form_id : str, required - the XPolicyTypesDoc row's own id (NOT\n            file_id).\n\n    Returns\n    -------\n    dict\n        {\"file\": {...}}\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-remove_form_from_policy_type"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-remove_form_from_policy_type"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/remove_form_from_policy_type_item": {
      "post": {
        "summary": "remove_form_from_policy_type_item",
        "tags": [
          "lines"
        ],
        "description": "\n    Hard-deletes a policy-type-item-level form: deletes the File row (the ON\n    DELETE CASCADE drops the linked XPolicyTypeItemsDoc row) and removes the\n    stored file. Irreversible.\n\n    Parameters\n    ----------\n    form : dict\n        form_id : str, required - the XPolicyTypeItemsDoc row's own id\n            (NOT file_id).\n\n    Returns\n    -------\n    dict\n        {\"file\": {...}}\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-remove_form_from_policy_type_item"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-remove_form_from_policy_type_item"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/retrieve_effective_date": {
      "post": {
        "summary": "retrieve_effective_date",
        "tags": [
          "lines"
        ],
        "description": "Retrieves information about an effective date.\n\n    Parameters\n    ----------\n    effective_date_id: str, optional\n        Id of the effective date to describe. Takes precedence over date_cursor.\n    date_cursor: str, optional\n        Date in YYYY-MM-DD form; the latest effective date on or before it is used.\n    open_to_quoting_only: bool, optional\n        When true, only policy types open to quoting are returned. Defaults to false so the\n        Lines configuration screen, the classic wizard and the vendor settings keep the full\n        list. Must be a real boolean; a non-boolean is rejected rather than coerced.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The data response having the form:\n        ::\n\n            {\n                'id': UUID,\n                'description': str,\n                'creation_date': 'YYY-MM-DD',\n                'effective_date': 'YYYY-MM-DD',\n                'change_history': [],\n                'override_lock': bool,\n                'states': [\n                    {\n                        'id': UUID,\n                        'name': str,\n                        'abbreviation': str,\n                        'counties': [{}],\n                        'county_specifications': [{}]\n                    }\n                ],\n                'underwriting_questions': [\n                    {\n                        'id': UUID\n                        'effective_id': UUID,\n                        'policy_type_id': NULL,\n                        'inheritance_id': UUID,\n                        'order': int,\n                        'yes_no_explain': ('yes', 'no', 'none'),\n                        'yes_no_question': str,\n                        'yes_no_prevent_continue': ('yes', 'no', 'none')\n                    }\n                ],\n                'lines': [\n                    {\n                        'effective_id': UUID,\n                        'location_id': UUID,\n                        'name': str,\n                        'system_tags': {},\n                        'policy_types': [\n                            {\n                                'id': UUID,\n                                'name': str,\n                                'description': str,\n                                'system_tags': [\n                                    {\n                                        'id': UUID,\n                                        'name': str,\n                                        'value': str,\n                                    },\n                                ],\n                                'location_id': UUID,\n                                'sort_order': int,\n                                'multiple_property_status': bool,\n                                'open_to_quoting': bool,\n                                'three_year': bool,\n                                'three_year_quote': bool,\n                                'eighteen_month': bool,\n                                'eighteen_month_quote': bool,\n                                'one_year': bool,\n                                'one_year_quote': bool,\n                                'nine_month': bool,\n                                'nine_month_quote': bool,\n                                'six_month': bool,\n                                'six_month_quote': bool,\n                                'three_month': bool,\n                                'three_month_quote': bool,\n                                'underwriting_options': [\n                                    {\n                                        'id': UUID,\n                                        'policy_type_id': UUID,\n                                        'inheritance_id': UUID,\n                                        'errorMessage': str,\n                                        'order': int,\n                                        'question': str,\n                                        'options': [{\n                                            'id': UUID,\n                                            'allowed': bool,\n                                            'description': str,\n                                            'option_code': str\n                                        }]\n                                    }\n                                ],\n                                'underwriting_questions': [\n                                    {\n                                        'id': UUID,\n                                        'effective_id': UUID,\n                                        'policy_type_id': UUID,\n                                        'inheritance_id': UUID,\n                                        'order': int,\n                                        'yes_no_question': str,\n                                        'yes_no_explain': ('yes', 'no', 'none'),\n                                        'yes_no_prevent_continue': ('yes', 'no', 'none')\n                                    },\n                                ]\n                            }\n                        ]\n                    }\n                ]\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "effective_date_id": {
                    "type": "string"
                  },
                  "date_cursor": {
                    "type": "string"
                  },
                  "open_to_quoting_only": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/retrieve_policy_type": {
      "post": {
        "summary": "retrieve_policy_type",
        "tags": [
          "lines"
        ],
        "description": "Retrieves information about a policy type.\n\n    Parameters\n    ----------\n    policy_type_id: str, required\n        UUID of an existing PolicyType instance\n    extend_system_tags: bool, optional\n        Flag to indicate if the system tags should be returned with all details\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The data response having the form:\n        ::\n            {\n                'id': UUID,\n                'reference_id': UUID,\n                'app_id': str\n                'line_id': UUID,\n                'effective_id': UUID,\n                'location_id': UUID,\n                'inheritance_id': UUID,\n                'name': str,\n                'description': str,\n                'underwriting': str,\n                'sort_order': int,\n                'multiple_property_status': bool,\n                'open_to_quoting': bool,\n                'three_year': bool,\n                'three_year_quote': bool,\n                'eighteen_month': bool,\n                'eighteen_month_quote': bool,\n                'one_year': bool,\n                'one_year_quote': bool,\n                'nine_month': bool,\n                'nine_month_quote': bool,\n                'six_month': bool,\n                'six_month_quote': bool,\n                'three_month': bool,\n                'three_month_quote': bool,\n                'dec_display_options': str,\n                'three_year_factor': Decimal('0.0000'),\n                'eighteen_month_factor': Decimal('0.0000'),\n                'one_year_factor': Decimal('0.0000'),\n                'nine_month_factor': Decimal('0.0000'),\n                'six_month_factor': Decimal('0.0000'),\n                'three_month_factor': Decimal('0.0000'),\n                'system_tags': {}\n                'protection_class': ('ISO', 'AAIS'),\n                'separate_dec_sections': bool,\n                'location': {\n                    'id': UUID,\n                    'abbreviation': str,\n                    'checked': bool,\n                    'counties': [],\n                    'county_specifications': [],\n                    'life_cycle_parameters': ('same', 'definedPer')\n                    'name': str\n                },\n                'deductible_groups': [\n                    {\n                        'id': UUID,\n                        'reference_id': UUID,\n                        'effective_id': UUID,\n                        'inheritance_id': UUID,\n                        'name': str,\n                        'deductibles': {\n                            'roundMethod': ('ROUND_HALF_UP', 'ROUND_CEILING', 'ROUND_FLOOR'),\n                            'roundTo': str\n                            'data': [\n                                {\n                                    'modification': str,\n                                    'amount': str,\n                                    'defaultDeductible': bool,\n                                    'unit': ('Dollar', 'Factor')\n                                }\n                            ]\n\n                        }\n                    }\n                ]\n                'items': [\n                    {\n                        'id': UUID,\n                        'allow_multiples': bool,\n                        'category': ('policy', 'property'),\n                        'description': str,\n                        'sub_line_id': UUID,\n                        'has_limit': bool,\n                        'has_rate': bool,\n                        'limit_availability': str,\n                        'mandatory': bool,\n                        'name': str,\n                        'show_in_builder': bool,\n                        'do_not_display_when_zero': bool\n                        'sort_order': int,\n                        'required_for_quote': bool\n                        'type': ('coverage', 'adjustment', 'nonRate', 'fee',\n                                 'calculation', 'dividend')\n                    }, ...\n                ]\n                'sub_lines': [\n                    {\n                        'id': UUID,\n                        'inheritance_id': UUID,\n                        'category': ('policy', 'property'),\n                        'default': bool,\n                        'mandatory': bool,\n                        'allow_multiples': bool,\n                        'name': str,\n                        'policy_type_id': UUID,\n                        'sort_order': int,\n                        'description': str,\n                        'type': ('liability', 'inland marine', 'property'),\n                        'items': [...] # see items definition above\n                    }, ...\n                ],\n                'line_item_groups': [\n                    {\n                        'id': UUID,\n                        'policy_type_id': UUID,\n                        'name': str,\n                        'sort_order': int,\n                        'items': [...]  # items as above, each also carrying\n                                        # 'group_membership': 'mandatory' | 'optionalChecked' | 'optionalUnchecked'\n                    }, ...\n                ],\n                'underwriting_rules': [\n                    {\n                        'id': UUID,\n                        'reference_id': UUID,\n                        'policy_type_id': UUID,\n                        'name': str,\n                        'description': str,\n                        'category': ('policy', 'property'),\n                        'exceptionType': (null, 'include', 'exclude'),\n                        'exceptionAgencies': null or ['agencyId1', 'agencyId2', ...],\n                        'enabled_for_new_business': bool,\n                        'enabled_for_endorsement': bool,\n                        'enabled_for_renewal': bool,\n                        'sort_order': int,\n                        'triggers': [\n                            {\n                                'id': UUID\n                                'underwriting_rule_id': UUID,\n                                'policy_type_item_id': UUID,\n                                'sort_order': int,\n                                'category': str,\n                                'value': [str, ...]\n                            }\n                        ]\n                        'effects': [\n                            {\n                                'id': UUID\n                                'underwriting_rule_id': UUID,\n                                'policy_type_item_id': UUID,\n                                'target_id': UUID,\n                                'action': ('Add Line Item', 'Add Sub Line',\n                                           'Add Optional Line Item',\n                                           'Remove Line Item', 'Remove Sub Line',\n                                           'Remove Optional Line Item', 'Remove Optional Sub Line',\n                                           'Remove Category Option', 'Remove Deductible Option',\n                                           'Set Category Option')\n                                'sort_order': int,\n                                'category': str,\n                                'value': str,\n                                'mandatory': bool,\n                                'hard_reverse': bool,\n                                'hide_category': bool\n                            }\n                        ]\n                    }\n                ],\n                'underwriting_options': [\n                    {\n                        'id': UUID,\n                        'policy_type_id': UUID,\n                        'inheritance_id': UUID,\n                        'errorMessage': str,\n                        'order': int,\n                        'question': str,\n                        'options': [{\n                            'id': UUID,\n                            'allowed': bool,\n                            'description': str,\n                            'option_code': str\n                        }]\n                    }\n                ],\n                'underwriting_questions': [\n                    {\n                        'id': UUID,\n                        'reference_id': UUID,\n                        'effective_id': UUID,\n                        'policy_type_id': UUID,\n                        'inheritance_id': UUID,\n                        'order': int,\n                        'yes_no_question': str,\n                        'yes_no_explain': ('yes', 'no', 'none'),\n                        'yes_no_prevent_continue': ('yes', 'no', 'none')\n                    },\n                ],\n                'connected_integration_points': List[str],\n                'connected_integration_instances_by_integration_point_code': {\n                    'CODE_1': [{id, name, date_added}],\n                    ...\n                },\n                'supported_risk_types': list[str]\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "policy_type_id": {
                    "type": "string"
                  },
                  "extend_system_tags": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/retrieve_policy_type_claims_tabs_visibility": {
      "post": {
        "summary": "retrieve_policy_type_claims_tabs_visibility",
        "tags": [
          "lines"
        ],
        "description": "retrieve_policy_type_claims_tabs_visibility",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-retrieve_policy_type_claims_tabs_visibility"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-retrieve_policy_type_claims_tabs_visibility"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/retrieve_rating_table": {
      "post": {
        "summary": "retrieve_rating_table",
        "tags": [
          "lines"
        ],
        "description": "\n    Retrieves a rating table\n    @param params_data: request dict\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-retrieve_rating_table"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-retrieve_rating_table"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/retrieve_underwriting_questions": {
      "post": {
        "summary": "retrieve_underwriting_questions",
        "tags": [
          "lines"
        ],
        "description": "Retrieves underwriting questions for an effective date and optionally a policy type id\n\n    Parameters\n    ----------\n    effective_date_id : str\n    policy_type_id : str, optional\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : list\n        The data response having the questions:\n        ::\n            {\n                \"data\": [\n                    {\n                        \"id\": UUID,\n                        \"reference_id\": UUID,\n                        \"effective_id\": UUID,\n                        \"policy_type_id\": UUID,\n                        \"inheritance_id\": UUID,\n                        \"order\": int,\n                        \"yes_no_explain\": str,\n                        \"yes_no_question\": enum('yes', 'no', 'none'),\n                        \"yes_no_prevent_continue\": enum('yes', 'no', 'none'),\n                        \"question_id\": UUID,\n                        \"yes_no_answer\": str,\n                        \"explanation\": str,\n                    },\n                ],\n                \"messages\": [],\n                \"success\": true\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "effective_date_id": {
                    "type": "string"
                  },
                  "policy_type_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/set_policy_type_item_system_tags": {
      "post": {
        "summary": "set_policy_type_item_system_tags",
        "tags": [
          "lines"
        ],
        "description": "Set (replace) the system tags on a policy type item.\n\n    Column-only update: it writes just the item's ``systemTags`` and never\n    reconstructs the rate chain, so -- unlike modify_policy_type_item -- it\n    cannot wipe rate_chain_refs or factor-table limits. Mirrors the tag-only\n    path the lines builder UI uses (settings.storeSystemTags) and\n    contacts.set_contact_system_tags. ``system_tags`` is a required, resolved\n    ``{system_tag_id: value}`` mapping that replaces the current mapping.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {},
                  "system_tags": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/set_policy_type_system_tags": {
      "post": {
        "summary": "set_policy_type_system_tags",
        "tags": [
          "lines"
        ],
        "description": "Set (replace) the system tags on a policy type (column-only update).\n\n    ``system_tags`` is a required ``{system_tag_id: value}`` mapping that\n    replaces the current mapping (pass ``{}`` to clear).\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {},
                  "system_tags": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/set_sub_line_system_tags": {
      "post": {
        "summary": "set_sub_line_system_tags",
        "tags": [
          "lines"
        ],
        "description": "Set (replace) the system tags on a sub line (column-only update).\n\n    ``system_tags`` is a required ``{system_tag_id: value}`` mapping that\n    replaces the current mapping (pass ``{}`` to clear).\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {},
                  "system_tags": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/update_form_on_policy_type": {
      "post": {
        "summary": "update_form_on_policy_type",
        "tags": [
          "lines"
        ],
        "description": "\n    Updates a policy-type-level form's print-flag metadata and/or title.\n\n    ``metadata`` is a PARTIAL update (a merge, not a replace): only the\n    keys actually present in the request are written, and every other\n    print-control field keeps its stored value. To clear a field, send it\n    explicitly (``null`` for form_code/edition_number/description/\n    mortgagee_types, ``false`` for the flags). Omitting ``metadata``\n    entirely, or sending ``{}``, leaves the whole metadata row untouched.\n\n    Parameters\n    ----------\n    form : dict\n        form_id : str, required - the XPolicyTypesDoc row's own id (NOT\n            file_id), matching how legacy retrieveDocuments already\n            treats the doc row's own id as the form's primary handle.\n        metadata : dict, optional - any subset of the fields on\n            PolicyTypeFormMetadataSchema\n        title : str, optional\n\n    Returns\n    -------\n    dict\n        {\"file\": {...}, \"metadata\": {...} or None} - metadata reflects the\n        full merged state of the row after the update, not just the fields\n        that were sent.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-update_form_on_policy_type"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-update_form_on_policy_type"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/update_form_on_policy_type_item": {
      "post": {
        "summary": "update_form_on_policy_type_item",
        "tags": [
          "lines"
        ],
        "description": "\n    Updates a policy-type-item-level form's print-flag metadata and/or\n    title.\n\n    ``metadata`` is a PARTIAL update (a merge, not a replace): only the\n    keys actually present in the request are written, and every other\n    print-control field keeps its stored value. To clear a field, send it\n    explicitly (``null`` for form_code/edition_number/description/\n    conditional_values/mortgagee_types/ntp_start_date/ntp_end_date,\n    ``false`` for the flags, ``\"gt\"`` for conditional_premium_select).\n    Omitting ``metadata`` entirely, or sending ``{}``, leaves the whole\n    metadata row untouched.\n\n    Parameters\n    ----------\n    form : dict\n        form_id : str, required - the XPolicyTypeItemsDoc row's own id\n            (NOT file_id).\n        metadata : dict, optional - any subset of the fields on\n            PolicyTypeItemFormMetadataSchema\n        title : str, optional\n\n    Returns\n    -------\n    dict\n        {\"file\": {...}, \"metadata\": {...} or None} - metadata reflects the\n        full merged state of the row after the update, not just the fields\n        that were sent.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-update_form_on_policy_type_item"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-update_form_on_policy_type_item"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/update_policy_type_claims_tab_visibility": {
      "post": {
        "summary": "update_policy_type_claims_tab_visibility",
        "tags": [
          "lines"
        ],
        "description": "update_policy_type_claims_tab_visibility",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-update_policy_type_claims_tab_visibility"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-update_policy_type_claims_tab_visibility"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/lines/update_rating_table": {
      "post": {
        "summary": "update_rating_table",
        "tags": [
          "lines"
        ],
        "description": "\n    Updates an existing rating table with a new file.\n\n    The new file must be compatible with the existing table type and will replace\n    all existing grid factors or vehicle fallbacks while maintaining the same\n    effective dates.\n\n    Args:\n        params_data: dict containing:\n            - id: str - ID of the existing rating table\n            - file_id: str - ID of the new uploaded file\n\n    Returns:\n        dict: The updated rating table data\n\n    Raises:\n        BCServiceError: If rating table not found, file not found, or validation fails\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-update_rating_table"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-update_rating_table"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/medical_codes/bulk_upsert": {
      "post": {
        "summary": "bulk_upsert",
        "tags": [
          "medical_codes"
        ],
        "description": "Producer push of one release batch (<= MAX_BULK_ROWS rows). Idempotent\n    upsert keyed on ``(code_system, code)``. Returns ``{upserted: <int>}``.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-bulk_upsert"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-bulk_upsert"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/medical_codes/finalize_sync": {
      "post": {
        "summary": "finalize_sync",
        "tags": [
          "medical_codes"
        ],
        "description": "Close out a full-replace: deactivate every code in ``code_system`` not\n    stamped with ``source_version``. Returns ``{deactivated: <int>}``.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-finalize_sync"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-finalize_sync"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/medical_codes/search": {
      "post": {
        "summary": "search",
        "tags": [
          "medical_codes"
        ],
        "description": "VIN-style lookup for the injuries tab: active codes in a system whose\n    code prefix or description matches ``terms``. Returns ``{results: [...]}``.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-medical_codes_search"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-medical_codes_search"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/named_insureds/create_named_insured": {
      "post": {
        "summary": "create_named_insured",
        "tags": [
          "named_insureds"
        ],
        "description": "create_named_insured",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/named_insureds/delete_named_insured": {
      "post": {
        "summary": "delete_named_insured",
        "tags": [
          "named_insureds"
        ],
        "description": "delete_named_insured",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/named_insureds/get_named_insured": {
      "post": {
        "summary": "get_named_insured",
        "tags": [
          "named_insureds"
        ],
        "description": "get_named_insured",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/named_insureds/get_named_insured_by_id": {
      "post": {
        "summary": "get_named_insured_by_id",
        "tags": [
          "named_insureds"
        ],
        "description": "get_named_insured_by_id",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/named_insureds/get_named_insureds": {
      "post": {
        "summary": "get_named_insureds",
        "tags": [
          "named_insureds"
        ],
        "description": "get_named_insureds",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/named_insureds/run_score": {
      "post": {
        "summary": "run_score",
        "tags": [
          "named_insureds"
        ],
        "description": "run_score",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/named_insureds/set_primary_insured": {
      "post": {
        "summary": "set_primary_insured",
        "tags": [
          "named_insureds"
        ],
        "description": "set_primary_insured",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/named_insureds/update_named_insured": {
      "post": {
        "summary": "update_named_insured",
        "tags": [
          "named_insureds"
        ],
        "description": "update_named_insured",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/nightly_jobs/process_auto_pays": {
      "post": {
        "summary": "process_auto_pays",
        "tags": [
          "nightly_jobs"
        ],
        "description": "Makes auto payments\n\n    Parameters\n    ----------\n    on_date : str, required\n        Date for auto pay\n    policy_number : str, optional\n        Policy for auto pay, or blank if all\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "on_date": {
                    "type": "string"
                  },
                  "policy_number": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/nightly_jobs/process_cancellation_pending_or_non_renewals": {
      "post": {
        "summary": "process_cancellation_pending_or_non_renewals",
        "tags": [
          "nightly_jobs"
        ],
        "description": "Cancel policies that have been pending cancellation for too long and non-renew policies\n    that are past their expiration date\n\n    Parameters\n    ----------\n    on_date : str, required\n        Process date\n    policy_number : str, required\n        Policy to renew, or empty if all.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "on_date": {
                    "type": "string"
                  },
                  "policy_number": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/nightly_jobs/process_non_pays_and_cancellations": {
      "post": {
        "summary": "process_non_pays_and_cancellations",
        "tags": [
          "nightly_jobs"
        ],
        "description": "process_non_pays_and_cancellations",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "on_date": {},
                  "policy_number": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/nightly_jobs/process_renewals": {
      "post": {
        "summary": "process_renewals",
        "tags": [
          "nightly_jobs"
        ],
        "description": "Renews given policies for the given date.\n\n    Parameters\n    ----------\n    renew_date : str\n        Date to renew policies on\n    policy_number : str\n        Policy to renew, or empty if all.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "renew_date": {
                    "type": "string"
                  },
                  "policy_number": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/notes/newNote": {
      "post": {
        "summary": "newNote",
        "tags": [
          "notes"
        ],
        "description": "Creates new record in `notes` using the passed reference id\n    and returns the id in JSON string. Only called from frontend, use\n    makeNote for notes generated within the system.\n\n    Parameters\n    ----------\n    id : str, required\n\n    Returns\n    -------\n        dict\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/notes/retrieveNotes": {
      "post": {
        "summary": "retrieveNotes",
        "tags": [
          "notes"
        ],
        "description": "Returns a JSON string containing the notes matching the\n    search string entered by the user or null.  Pass pageSize\n    for amount and page for the section of notes to be returned.\n    Pages starts on zero.\n    If aggregateAll is true, the API will assume the id is a contactId, and search for all the policies\n    and claims associated to the contact and include the notes for those policies, claims and the contact itself.\n    If aggregateAll is false, the API will use the id to search by referenceId that is the policy, claim,\n    contact that the note is assigned to.\n\n    Parameters\n    ----------\n    pageSize : int\n    id : str\n    searchString : str\n    aggregateAll : bool , If true, the API will assume the id is a contactId.\n    advSearch : bool\n    filterAlerts : bool\n    filterUserGen : bool\n    orderBy : str\n    page : int , Page starts on zero.\n    ascending : bool\n    type : str\n    filterExcludeAlerts : bool\n    filterSystemNotesOnly : bool\n\n    Returns\n    -------\n        dict\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "pageSize": {
                    "type": "integer"
                  },
                  "id": {
                    "type": "string"
                  },
                  "searchString": {
                    "type": "string"
                  },
                  "aggregateAll": {
                    "type": "string"
                  },
                  "advSearch": {
                    "type": "boolean"
                  },
                  "filterAlerts": {
                    "type": "boolean"
                  },
                  "filterUserGen": {
                    "type": "boolean"
                  },
                  "orderBy": {
                    "type": "string"
                  },
                  "page": {
                    "type": "string"
                  },
                  "ascending": {
                    "type": "boolean"
                  },
                  "type": {
                    "type": "string"
                  },
                  "filterExcludeAlerts": {
                    "type": "boolean"
                  },
                  "filterSystemNotesOnly": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/notes/storeNote": {
      "post": {
        "summary": "storeNote",
        "tags": [
          "notes"
        ],
        "description": "Takes a json_dict with the bc.models.Note() information and stores the\n    record. Returns success or an error message.\n\n    Parameters\n    ----------\n    enteredBy : str\n    id : str\n    alertSave : bool\n    alertStatus : str\n    eventAlert : str\n    eventPreset : str\n    alertDate : str\n    alertEmail : str\n    alertNow : str\n    title : str\n    contents : str\n    alertSent : str\n    notifiedInsureds : str # deprecated, unused. Stays for backward compatibility\n    fileId: str\n    alertId : str, optional\n        Alert ID for explicit updates. If provided, will be used for direct lookup.\n        If not provided, alert will be looked up by reference_id (note.id).\n\n    Returns\n    -------\n        success : bool\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enteredBy": {
                    "type": "string"
                  },
                  "id": {
                    "type": "string"
                  },
                  "alertSave": {
                    "type": "boolean"
                  },
                  "alertStatus": {
                    "type": "string"
                  },
                  "eventAlert": {
                    "type": "string"
                  },
                  "eventPreset": {
                    "type": "string"
                  },
                  "alertDate": {
                    "type": "string"
                  },
                  "alertEmail": {
                    "type": "string"
                  },
                  "alertNow": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "contents": {
                    "type": "string"
                  },
                  "alertSent": {
                    "type": "string"
                  },
                  "notifiedInsureds": {
                    "type": "string"
                  },
                  "fileId": {
                    "type": "string"
                  },
                  "alertId": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/notifications/acknowledge": {
      "post": {
        "summary": "acknowledge",
        "tags": [
          "notifications"
        ],
        "description": "Acknowledges the current notifications for the logged in user.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/notifications/current": {
      "post": {
        "summary": "current",
        "tags": [
          "notifications"
        ],
        "description": "Returns a list of the current notifications.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/payments/add_payment_method": {
      "post": {
        "summary": "add_payment_method",
        "tags": [
          "payments"
        ],
        "description": "Add payment method for contact\n\n    Parameters\n    ----------\n    contact_id : str\n        Contact id\n    ach_account : str\n        account id\n    ach_bank : str\n        Bank name\n    ach_name_on : str\n        Accountholder's name\n    ach_routing : str\n        Routing number\n    ach_type : str\n        Account type\n    card_cvv2 : str\n        Card CVV2\n    card_expires_mm : str\n        Card expiration (month)\n    card_expires_yy : str\n        Card expiration (year)\n    card_name_on : str\n        Cardholder's name\n    card_number : str\n        Card number\n    card_type : str\n        Card type\n    type : str\n        Payment type ACH/CVV2\n    address : dict\n        Address information for new payment method\n    customer_profile_id : str\n        Customer profile identification from vendor\n    vendor_payment_method_id : str\n        Vendor payment method identification\n    account_description : str\n        Account description\n    metadata : dict\n        Additional vendor specific data\n\n    Returns\n    -------\n    success : bool\n        True, if all necessary information was provided. Otherwise False\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        result\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contact_id": {
                    "type": "string"
                  },
                  "ach_account": {
                    "type": "string"
                  },
                  "ach_bank": {
                    "type": "string"
                  },
                  "ach_name_on": {
                    "type": "string"
                  },
                  "ach_routing": {
                    "type": "string"
                  },
                  "ach_type": {
                    "type": "string"
                  },
                  "card_cvv2": {
                    "type": "string"
                  },
                  "card_expires_mm": {
                    "type": "string"
                  },
                  "card_expires_yy": {
                    "type": "string"
                  },
                  "card_name_on": {
                    "type": "string"
                  },
                  "card_number": {
                    "type": "string"
                  },
                  "card_type": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string"
                  },
                  "address": {
                    "type": "object"
                  },
                  "customer_profile_id": {
                    "type": "string"
                  },
                  "vendor_payment_method_id": {
                    "type": "string"
                  },
                  "account_description": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/payments/apply_selected_payments": {
      "post": {
        "summary": "apply_selected_payments",
        "tags": [
          "payments"
        ],
        "description": "Apply selected payments and optionally generate deposit receipt upon successful application\n\n    Parameters\n    ----------\n    payment_ids : list\n        List of Payment ID objects to apply\n    print_deposit_receipt : bool\n        Boolean flag to print deposit receipt on applied payments\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    message : str\n        Human readable description of failure reasons\n    data : dict\n        Dictionary containing the `attachmentId` of the deposit receipt, if selected to print\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "payment_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "print_deposit_receipt": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/payments/approve_pending_payment": {
      "post": {
        "summary": "approve_pending_payment",
        "tags": [
          "payments"
        ],
        "description": "approve_pending_payment",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-approve_pending_payment"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-approve_pending_payment"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/payments/change_payment_method": {
      "post": {
        "summary": "change_payment_method",
        "tags": [
          "payments"
        ],
        "description": "Setup payment method for policies\n\n    Parameters\n    ----------\n    policy_list : list of str\n        Policies to update\n    auto_payment_method_id : str\n        auto payment method id\n    auto_pay_days_before : int\n        Payment date shift\n    contact_id : str\n        contact id. Used if auto_payment_method_id is None or if payment-method owner need to be declared explicitly\n\n    Returns\n    -------\n    success : bool\n        True, if all necessary information was provided. Otherwise False\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        result\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "policy_list": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "auto_payment_method_id": {
                    "type": "string"
                  },
                  "auto_pay_days_before": {
                    "type": "integer"
                  },
                  "contact_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/payments/change_payment_method_single": {
      "post": {
        "summary": "change_payment_method_single",
        "tags": [
          "payments"
        ],
        "description": "Setup payment method for policy or policy term (if policy term id passed)\n\n    Parameters\n    ----------\n    policy_id : str\n        Policy to update (optional)\n    policy_term_id : str\n        Policy term to update (optional)\n    auto_payment_method_id : str\n        auto payment method id\n    auto_pay_days_before : int\n        Payment date shift\n    contact_id : str\n        contact id. Used if auto_payment_method_id is None or if payment-method owner need to be declared explicitly\n    override_propagation: bool\n        Overrides BC setting 'billing.store-pay-method-across-terms' if passed (propagate autopay method to next terms)\n\n    Returns\n    -------\n    success : bool\n        True, if all necessary information was provided and update was successful\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        result\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "policy_id": {
                    "type": "string"
                  },
                  "policy_term_id": {
                    "type": "string"
                  },
                  "auto_payment_method_id": {
                    "type": "string"
                  },
                  "auto_pay_days_before": {
                    "type": "integer"
                  },
                  "contact_id": {
                    "type": "string"
                  },
                  "override_propagation": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/payments/create_payment_batch": {
      "post": {
        "summary": "create_payment_batch",
        "tags": [
          "payments"
        ],
        "description": "Creates a PaymentBatch instance in the database.\n\n    Parameters\n    ----------\n    data : dict\n        A dictionary with batch info\n        ::\n\n            {\n                \"id\": str,                          # (optional) UUID (defaults to create)\n                \"title\": str,\n                \"creator_id\": str,                  # (optional) UUID (defaults to logged user)\n                \"created_at\": str,                  # (optional) MM/DD/YYYY (defaults to now)\n                \"expected_entry_count\": int,        # (optional)\n                \"expected_total_amount\": str,       # (optional) Float parseable\n                \"capture_mode\": str,                # (optional) \"Policy Number\" (default), \"Invoice Code\"\n                \"default_paid_amount_source\": str,  # (optional) \"Term Payoff\", \"Current Due\"\n            }\n\n    Returns\n    -------\n    data : dict\n        A dictionary containing the created batch info\n        ::\n\n            {\n                \"id\": str,                          # UUID,\n                \"title\": str,\n                \"created_at\": str,                  # MM/DD/YYYY\n                \"creator_name\": str,\n                \"creator_username\": str,\n                \"expected_entry_count\": int,\n                \"expected_total_amount\": str,       # Float parseable\n                \"capture_mode\": str,                # \"Policy Number\", \"Invoice Code\"\n                \"default_paid_amount_source\": str,  # \"Term Payoff\", \"Current Due\"\n            }\n\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/payments/create_payment_entries": {
      "post": {
        "summary": "create_payment_entries",
        "tags": [
          "payments"
        ],
        "description": "Creates payment entries in the database from the given serialized dataset\n\n    Parameters\n    ----------\n    entries : list of dicts\n        List containing serialized data for the entries to be created\n        ::\n\n            {\n                \"entry_id\": str,             # (optional) UUID\n                \"payor_id\": str,             # (optional) UUID\n                \"batch_id\": str,             # UUID\n                \"paid_amount\": str,          # (optional)\n                \"check_number\": str,         # (optional)\n                \"batch_datetime\": str,       # (optional) MM/DD/YYYY (defaults to now)\n                \"invoice_code\": str,         # (optional if policy_number is specified)\n                \"policy_number\": str,        # (optional if invoice code is specified)\n                \"distribution_amount\": str,  # (optional) Float parseable\n                \"distribution_action\": str,  # (optional)\n                \"billing_schedule_id\": str,  # (optional) UUID\n            }\n\n    Returns\n    -------\n    data : list of dicts\n        List containing serialized data for the created entries\n        ::\n\n            {\n                \"entry_id\": str,\n                \"group_id\": str,\n                \"payor_name\": str,\n                \"paid_amount\": str,\n                \"payment_id\": str,\n                \"payment_applied\": bool,\n                \"owed_amount\": str,\n                \"full_amount\": str,\n                \"agent_name\": str,\n                \"insured_name\": str,\n                \"invoice_code\": str,\n                \"policy_number\": str,\n                \"distribution_amount\": str,\n                \"distribution_action\": str,\n                \"billing_schedule_id\": str,\n                \"has_future_invoice\": bool,\n                \"policy_is_canceled\": bool,\n            }\n\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "entries": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/payments/create_recurring_payment_consent": {
      "post": {
        "summary": "create_recurring_payment_consent",
        "tags": [
          "payments"
        ],
        "description": "\n    Create a recurring payment consent record.\n    The administered_by_contact_id is automatically set from the current session.\n    A detailed note is created with payment method information for audit trail.\n\n    Request body should contain:\n    {\n        \"contact_id\": \"uuid\",\n        \"payment_method_id\": \"uuid\" or null\n    }\n\n    Returns:\n    {\n        \"success\": true,\n        \"data\": {\n            \"id\": \"uuid\",\n            \"contact_id\": \"uuid\",\n            \"payment_method_id\": \"uuid\" or null,\n            \"administered_by_contact_id\": \"uuid\" or null,\n            \"consent_timestamp\": \"ISO datetime string\"\n        }\n    }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/payments/decline_pending_payment": {
      "post": {
        "summary": "decline_pending_payment",
        "tags": [
          "payments"
        ],
        "description": "decline_pending_payment",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-decline_pending_payment"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-decline_pending_payment"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/payments/delete_payment_batch": {
      "post": {
        "summary": "delete_payment_batch",
        "tags": [
          "payments"
        ],
        "description": "Removes a PaymentBatch instance from the database.\n\n    Parameters\n    ----------\n    batch_id : str\n        UUID of the target batch\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "batch_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/payments/delete_payment_entries": {
      "post": {
        "summary": "delete_payment_entries",
        "tags": [
          "payments"
        ],
        "description": "Deletes payment entries from the database from the given entry ids\n\n    Parameters\n    ----------\n    entry_ids : list of str\n        List containing the ids of the target payment entries\n\n    Returns\n    -------\n    data : list of str\n        List containing the ids of the removed payment entries\n\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "entry_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/payments/ensure_receipt": {
      "post": {
        "summary": "ensure_receipt",
        "tags": [
          "payments"
        ],
        "description": "\n    Ensures receipt exists for specific payment/policy combination.\n    Generates if missing. Idempotent and safe to call multiple times.\n\n    Both parameters are REQUIRED.\n\n    Parameters\n    ----------\n    payment_id : str, required\n        UUID of payment\n    policy_number : str, required\n        Policy number to get receipt for\n\n    Returns\n    -------\n    success : bool\n        True if receipt was found or generated successfully\n    data : dict\n        {\n            \"file_id\": \"uuid\",\n            \"policy_number\": \"12345\",\n            \"generated\": False,\n            \"policy_index\": 0\n        }\n\n    Errors\n    ------\n    - Missing required parameters (payment_id or policy_number)\n    - Payment not found\n    - Policy not associated with payment\n    - Receipt generation failure (propagates from Report().build_receipt())\n\n    Notes\n    -----\n    - Fail-fast: Errors propagate without generic exception handling\n    - Idempotent: Safe to call multiple times, won't regenerate existing receipts\n    - For group payments: Call once per policy to get each receipt\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-ensure_receipt"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-ensure_receipt"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/payments/evaluate_convenience_fee_formula": {
      "post": {
        "summary": "evaluate_convenience_fee_formula",
        "tags": [
          "payments"
        ],
        "description": "Design-time tester for convenience-fee formulas.\n\n    Evaluates the supplied per-method formulas against a test amount and\n    returns the resolved fee per method. Drives the live \"Fee: $X.XX\"\n    chips next to each formula on the convenience-fee settings page\n    (Settings > Payments). Distinct from\n    ``retrieve_convenience_fee_preview``, which reads *saved* formulas\n    from the resolver and is consumed at payment time; this endpoint\n    evaluates *unsaved* admin-supplied formula strings so an admin can\n    sanity-check syntax and output before clicking Save.\n\n    The evaluator (``lib.payments.fee_formula.evaluate_fee_formula``) is\n    byte-identical to the production path at\n    ``lib.payments.controllers.PaymentProcessorController.get_fee`` --\n    same Decimal substitution, same whitespace normalization, same\n    ``python2_round`` rounding, same NegativeFeeError. Only the wrapper\n    differs intentionally: production swallows formula exceptions and\n    returns 0 + emails admins (runtime safety net); preview surfaces\n    the real error per-method so the admin sees what's broken\n    (design-time feedback).\n\n    Parameters\n    ----------\n    payload : dict\n        amount : str or number, required\n            Test amount to evaluate each formula against. Must parse as\n            a positive Decimal.\n        formulas : dict, optional\n            Logical-method-keyed dict ``{\"cc\"?, \"ach\"?, \"debit\"?}``.\n            Each value is a formula string (e.g. ``amount * 0.03``).\n            Missing or empty values are skipped and reported as\n            ``{\"inherited\": True}`` so the frontend can render an\n            ``(inherits)`` badge instead of an error.\n        disclosure_style : str, optional\n            ``\"new_york\"`` or ``\"standard\"`` (default). Drives the\n            ``messages`` formatting. Any other value is treated as\n            ``\"standard\"``.\n\n    Returns\n    -------\n    data : dict\n        results : dict\n            Per-method dict. Each method maps to one of:\n\n            * ``{\"fee\": \"3.00\"}`` -- successful evaluation\n            * ``{\"error\": \"<reason>\"}`` -- formula raised; admin sees\n              the message inline. Includes negative-fee rejections via\n              ``NegativeFeeError``.\n            * ``{\"inherited\": true}`` -- formula was empty; the resolver\n              would inherit from the broader scope at runtime.\n        messages : list of str\n            Customer-facing preview lines for the selected\n            ``disclosure_style``, formatted by\n            ``PaymentService.format_preview_messages`` (the single\n            source of truth shared with the saved-config preview).\n            Errored / inherited formulas contribute a $0 fee here.\n\n    Permissions\n    -----------\n    Admin-only. Mirrors the ``convenience_fees.store_config`` permission\n    gate -- only users who can save these formulas can preview them. The\n    eval target is the same restricted scope production uses; the gate\n    is for consistency, not because the preview adds new attack surface.\n    No connected payment processor is required: admins\n    pre-configure and preview convenience fees ahead of Stripe Connect\n    go-live, matching ``convenience_fees.store_config``.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-evaluate_convenience_fee_formula"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-evaluate_convenience_fee_formula"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/payments/get_billing_contact_emails": {
      "post": {
        "summary": "get_billing_contact_emails",
        "tags": [
          "payments"
        ],
        "description": "\n    Get the primary email and all email options for billing-related contacts on the policy revision.\n\n    policy_number is required. Policy is looked up by policy_number. Collects emails for\n    named insureds, additional interests, mortgagees, bill whom, agent, and premium finance\n    company. Options are deduped by email; when the same email appears for multiple roles,\n    the single option lists all roles in contact_type and label.\n\n    Parameters\n    ----------\n    policy_number : str, required\n        Policy number\n\n    Returns\n    -------\n    success : bool\n    data : dict\n        email : str or None\n            Primary (first) email when at least one contact has an email, else None.\n        email_options : list of dict\n            Each has: name, email, contact_type, label. Deduped by email; multiple roles\n            combined in contact_type and label.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_billing_contact_emails"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_billing_contact_emails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/payments/get_payment_method_info": {
      "post": {
        "summary": "get_payment_method_info",
        "tags": [
          "payments"
        ],
        "description": "Provides info about policy and terms where it is involved\n\n    Parameters\n    ----------\n    payment_method_id : str\n        Payment method id\n\n    Returns\n    -------\n    success : bool\n        True, if all necessary information was provided. Otherwise False\n    data : dict\n        A dictionary with payment method info\n        ::\n\n            {\n                \"payment_method\": dict,                     # payment method\n                \"policies_with_auto_payment_method\": dict   # policies &  terms where payment method is used as autopay\n            }\n    messages : list of str\n        List of human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "payment_method_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/payments/get_unpaid_invoices_by_date": {
      "post": {
        "summary": "get_unpaid_invoices_by_date",
        "tags": [
          "payments"
        ],
        "description": "Retrieve unpaid invoices for bill_date/due_date with additional information\n\n    Parameters\n    ----------\n    bill_date : str, optional\n                    Format is yyyy-mm-dd\n    due_date : str, optional\n                    Format is yyyy-mm-dd\n    manualpay_date_adjustment : bool, optional\n                    If false/not provided - returns invoices with requested bill date/ due date fot policies\n                        with manual payments\n                    If true - returns invoices with correlated date if autopay disabled for policy.\n                           F.e. If you requested invoices with due date 2022-09-09, and report_due_date_minus_x is -1\n                           - you will get in invoice with due date 2022-09-10 - because in paper doc\n                             this invoice has date 2022-09-09\n    autopay_date_adjustment : bool, optional\n                    If false/not provided - returns invoices with requested bill date/ due date fot policies\n                        with auto payments\n                    If true - returns invoices with correlated date if autopay enabled for policy.\n                           F.e. If you requested invoices with due date 2022-09-09, and report_due_date_minus_x is -1\n                           - you will get in invoice with due date 2022-09-10 - because in paper doc\n                           this invoice has date 2022-09-09\n\n    Returns\n    -------\n    success : bool\n    messages : []\n    data : list of dicts\n        ::\n        [{\n            \"policy\": {\n                \"active\": true,\n                \"is_valid\": true,\n                \"id\": \"444f33ba-c313-49da-9999-133e96ef339a\",\n                \"inception_date\": \"2008-05-23\",\n                \"policy_number\": \"H09533\"\n            },\n            \"term\": {\n                \"effective_date\": \"2021-05-23\",\n                \"expiration_date\": \"2022-05-23\",\n                \"is_valid\": true,\n                \"term_type\": \"1 Year\"\n            },\n            \"billing_schedule\": {\n                \"name\": \"Monthly EFT\",\n                \"id\": \"fff045c3-37c6-4872-ac72-09be2fc0ea86\"\n            },\n            \"active_revision\": {\n                \"revision_date\": \"2021-05-23\",\n                \"named_insureds\": [\n                    {\n                        \"phones\": [\n                            {\n                                \"date_updated\": \"2019-03-24 01:57:00\",\n                                \"phone\": \"1114636251\",\n                                \"type\": \"Home\"\n                            }\n                        ],\n                        \"name\": \"John Doe\",\n                        \"contact_id\": \"1112d33f-3c57-4d22-bda5-6300e03a4d38\"\n                    },\n                    {\n                        \"phones\": [],\n                        \"name\": \"Jane Doe\",\n                        \"contact_id\": \"111f1e42-1b05-436e-9087-9ee386222161\"\n                    }\n                ],\n                \"policy_id\": \"444f33ba-c313-49da-9999-133e96ef339a\",\n                \"id\": \"79d4d7a9-4444-4199-8a60-e62134689b76\",\n                \"policy_status\": \"Active\",\n                \"policy_term_id\": \"fcd2066b-d8f9-2222-ac46-bf3f70e01c68\"\n            },\n            \"invoice\": {\n                \"due_date\": \"2021-06-28\",\n                \"debits\": 260.06,\n                \"description\": \"Installment Invoice\",\n                \"paid_in_full\": false,\n                \"is_valid\": true,\n                \"cancel_date\": \"2021-07-13\",\n                \"account_balance\": 260.06,\n                \"file_id\": \"ce06e321-1111-4bd2-810e-84a6f1947583\",\n                \"revision_id\": \"79d4d7a9-4444-4199-8a60-e62134689b76\",\n                \"id\": \"92c10551-eeb8-4023-807e-443b51e6cccc\",\n                \"bill_date\": \"2021-06-08\"\n            }\n        },...]\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "bill_date": {
                    "type": "string"
                  },
                  "due_date": {
                    "type": "string"
                  },
                  "manualpay_date_adjustment": {
                    "type": "boolean"
                  },
                  "autopay_date_adjustment": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/payments/import_payment_entries": {
      "post": {
        "summary": "import_payment_entries",
        "tags": [
          "payments"
        ],
        "description": "Import a collection of payment entries into the accounting system.\n\n    Parameters\n    ----------\n    entry_ids : list of str\n        List containing the ids of the target payment entries\n    bypass_duplicates_check : bool\n        Whether to bypass duplicate check for all the entries being imported\n\n    Returns\n    -------\n    data : list of dict\n        List of dict in the format\n        ::\n\n            {\n                'entry_id': str,\n                'payment_id': str,\n                'duplicate_payment_id': str,\n                'payment_applied': bool,\n            }\n\n    success : bool\n        True if successful, false if not\n\n    messages : list of dict\n        List of dict representing errors respective to the index at the given entry_ids\n        ::\n\n            {\n                \"entry_id\": str,\n                \"message\": str\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "entry_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "bypass_duplicates_check": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/payments/import_payment_method": {
      "post": {
        "summary": "import_payment_method",
        "tags": [
          "payments"
        ],
        "description": "import_payment_method",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-import_payment_method"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-import_payment_method"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/payments/make_payment_by_contact_and_payment_method": {
      "post": {
        "summary": "make_payment_by_contact_and_payment_method",
        "tags": [
          "payments"
        ],
        "description": "Make payment for policy/contact with payment_method_id and payment_amount\n\n    Parameters\n    ----------\n    payment_method_id : str\n        Payment method id\n    payment_amount : str or decimal\n        min/max/next_term or explicit amount to pay\n    contact_id : str\n        Contact which policies should be paid(optional)\n    policy_id : str\n        Policy that should be paid (optional)\n    payor_name : str\n        Display name of the payer (optional); stored on the payment and used\n        on the confirmation's payor line. Same meaning as store_payment's\n        payor_name.\n    payor_email : str\n        The payer's email address (optional). When present and valid, the\n        standard payment confirmation is auto-emailed to it.\n    bypass_cannotpay_guard : bool\n        Skip the payability guard (BC-24420) and accept the payment on a policy\n        the carrier's configuration would otherwise refuse -- a pending non-pay\n        cancellation flagged Poor Payment History, an expired or rejected policy,\n        one canceled past its payment window.\n\n        For internal callers acting on behalf of staff, who may take a payment\n        the insured cannot make themselves: the life-cycle options behind the\n        refusal are scoped to *external* payments. Defaults to False, so the\n        guard applies unless a caller deliberately opts out and a new or\n        forgotten caller fails closed.\n\n        Must be a real boolean. A non-boolean is rejected with ``error_code``\n        ``invalid_parameter`` rather than coerced, so a stringy ``\"false\"``\n        cannot be read as an enabled bypass.\n\n    Returns\n    -------\n    success : bool\n        True, if all necessary information was provided. Otherwise False\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        results of payment\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-make_payment_by_contact_and_payment_method"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-make_payment_by_contact_and_payment_method"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/payments/make_payment_by_invoice_or_policy": {
      "post": {
        "summary": "make_payment_by_invoice_or_policy",
        "tags": [
          "payments"
        ],
        "description": "Please use api/v2/payments/store_external_payment endpoint if you're simply registering an external payment.\n\n    For given invoice/policy number we identify it's respective policy and primary payment method,\n    to then apply the respective amount on the payment_date. System uses the auto-pay payment method,\n    but if non located it will default to the primary insureds' first payment method.\n\n    - Payments are always invoked through PaymentController().make_payment(). When payment_transaction_id is set, it's\n    assumed funds are already deducted any payment recorded would have similar effects as a \"Cash\" (but instead of\n    payment type cash, shows as respective payment vendor). Other information such as payor name and an identifier\n    to track the source of the payment are also optionally captured for tracking purposes.\n\n    - `payment_transaction_id` and `source_id` and `meta` are mandatory when recording a payment that has already\n    happened.\n\n\n    Parameters\n    ----------\n    amount : float\n        amount payment was recoded as.\n    payment_date : str, optional\n        date in format 'YYYY-MM-dd' representing when payment was made.\n        Date-only values (no time of day) use the API receive time on the\n        same calendar day, and 23:59:59 of that date for prior-day posts\n        (BC-24707). A payload that already includes a time is stored as-is.\n    invoice_number : str\n        AccountHistory.id (UUID) for invoice for respective policy term payment\n        was made against.\n    policy_number : str, optional\n        Policy.policy_number of the account we want to make payment on.\n    payment_transaction_id : str, optional\n        The transaction reference id for the payment.\n    source_id : str, optional\n        A string identifier that shows where the payment originates from.\n    meta: object: dict, optional\n        An object containing payment metadata.\n        ::\n            {\n                'payorName': <string>,\n                'maskedNumber': <string>, # Last four of ACH account or CC number\n                'payment_method': <string>, # One of Visa, MC, AMEX, Discover, ACH\n            }\n\n    Returns\n    -------\n    success : True if payment processed correctly, otherwise false\n    messages : list of failure messages\n        ::\n            [\n                'Attempted to setup default payment method',\n                'Updated account balance'  # present if success payment was processed'\n            ]\n    data : dict\n        ::\n            {\n                'isDuplicate': false,\n                'payoffAmount': <decimal>,  # overall amount due to payoff policy term\n                'confirmationNumber': \"124312312\",  # numeric string value that can be used to nsf payment later\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "number"
                  },
                  "payment_date": {
                    "type": "string"
                  },
                  "invoice_number": {
                    "type": "string"
                  },
                  "policy_number": {
                    "type": "string"
                  },
                  "payment_transaction_id": {
                    "type": "string"
                  },
                  "source_id": {
                    "type": "string"
                  },
                  "meta": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/payments/mark_payment_nsf": {
      "post": {
        "summary": "mark_payment_nsf",
        "tags": [
          "payments"
        ],
        "description": "Searches respective payment for the specified amount/date/invoice and mark it as NSF.\n\n    This also invokes any NSF policy activity that might happen when applying it from the UI.\n\n    Parameters\n    ----------\n    amount : float\n        amount payment was recoded as.\n    payment_date : str\n        date in format 'YYYY-MM-dd' representing when payment was made.\n    policy_number : str\n        Policy.policy_number for account we want mark payment as NSF. System\n        defaults to latest term if passed instead of invoice_number.\n    invoice_number : str\n        AccountHistory.id for invoice for respective policy term payment\n        was made against.\n    confirmation_number : str\n        unique numeric value associated with Payment record. This is\n        typically returned by make_payment_by_invoice_or_policy()\n    disable_auto_pay : bool\n        Flag to indicate whether to disable auto pay for current term and\n        further terms (if any).\n\n    Returns\n    -------\n    success : True if processed correctly, else False\n    messages : list of strings with failure messages if success is ever False\n        ::\n            [\n                'Non pay evaluation complete.',\n                'neither the invoice_number or policy_number passed can be located'\n            ]\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "number"
                  },
                  "payment_date": {
                    "type": "string"
                  },
                  "policy_number": {
                    "type": "string"
                  },
                  "invoice_number": {
                    "type": "string"
                  },
                  "confirmation_number": {
                    "type": "string"
                  },
                  "disable_auto_pay": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/payments/record_saved_method_authorization": {
      "post": {
        "summary": "record_saved_method_authorization",
        "tags": [
          "payments"
        ],
        "description": "Persist the saved-payment-method authorization attestation for a contact.\n\n    Writes provable consent (contact-keyed, unlinked) so a later\n    ``import_payment_method`` can bind it to the created vendor method once it\n    exists (see ``PaymentMethodAuthorizationService.link_payment_method``). The\n    acting user comes from the authenticated session, never from caller input.\n    No-op when capture is turned off for the carrier.\n\n    ``@api_request`` matters here because this endpoint WRITES: it rolls the\n    session back on an unexpected failure, so a mid-write exception (e.g. while\n    ``record_consent`` writes its audit note, after the proof row is inserted)\n    cannot leave a committed row behind a failure response.\n\n    Request and response schemas:\n    ``lib/api/api_specs/request-record_saved_method_authorization.json`` and\n    ``response-record_saved_method_authorization.json``.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-record_saved_method_authorization"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-record_saved_method_authorization"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/payments/remove_payment_method": {
      "post": {
        "summary": "remove_payment_method",
        "tags": [
          "payments"
        ],
        "description": "Soft-delete a payment method (as long as it isn't being referenced by a Policy)\n\n    Parameters\n    ----------\n    payment_method_id : str\n        Payment method id to remove\n\n    Returns\n    -------\n    success : bool\n        True, if all necessary information was provided. Otherwise False\n    messages : list of str\n        List of human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "payment_method_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/payments/retrieve_account_payoff_amount": {
      "post": {
        "summary": "retrieve_account_payoff_amount",
        "tags": [
          "payments"
        ],
        "description": "For a given account (policy) number we determine what's the payoff amount\n    for it's respective active term.\n\n    Parameters\n    ----------\n    policy_number : str policy.policy_number\n\n    Returns\n    -------\n    success : bool  # true if payoff amount identified, else false\n    messages : [\n            'policy number <policy_number> is not recognized',  # if we can't identify the account\n        ]\n    data : dict\n        ::\n            {\n                # does not show up if success = False\n                'payoffAmount': <decimal>  # overall amount due to payoff policy term\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "policy_number": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/payments/retrieve_active_payment_processor": {
      "post": {
        "summary": "retrieve_active_payment_processor",
        "tags": [
          "payments"
        ],
        "description": "retrieve_active_payment_processor",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/payments/retrieve_convenience_fee": {
      "post": {
        "summary": "retrieve_convenience_fee",
        "tags": [
          "payments"
        ],
        "description": "Retrieve the convenience fee to be charged by the enabled payment processor based on the\n    amount of the payment and the type of account being used.\n\n    Parameters\n    ----------\n    payment_amount : decimal\n        Amount of the payment being made\n    account_type : str\n        The type of the account being charged.\n        For PaymentProcessor integration: \"ACH\", \"CC\" or \"DEBIT\"\n        For legacy vendors: \"ACH\", \"MasterCard\", \"VISA\", \"AmericanExpress\", \"Discover\"\n    policy_id : str, optional\n        Policy ID\n\n    Returns\n    -------\n    success : bool\n        True, if all necessary information was provided. Otherwise False\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        Returned fee amount in the form:\n        ::\n\n            {\n                \"fee_amount\": decimal or null,\n                \"fee_message\": str or null,\n                \"disclosure\": str,\n                \"capture_authorization\": bool,\n                \"disclosure_first_party\": str,\n                \"disclosure_third_party\": str\n            }\n\n        ``capture_authorization`` / ``disclosure_first_party`` /\n        ``disclosure_third_party`` are the shared,\n        centrally-delivered saved-payment-method authorization capability:\n        whether provable consent must be captured before storing a method,\n        and the first-party (policyholder) and third-party (agent\n        attestation) disclosure copy, all resolved against the same scope as\n        the fee.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-retrieve_convenience_fee"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-retrieve_convenience_fee"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/payments/retrieve_convenience_fee_preview": {
      "post": {
        "summary": "retrieve_convenience_fee_preview",
        "tags": [
          "payments"
        ],
        "description": "Retrieve convenience fee preview with messages and fee amounts grouped by payment method.\n\n    This endpoint calculates convenience fees for multiple payment methods and groups them\n    by their total amounts, generating user-friendly messages for display in the payment UI.\n\n    Parameters\n    ----------\n    payload : dict\n        Request payload containing:\n        - payment_amount (string): Amount of the payment being made. Use string format for precision.\n        - payment_methods (list of str, optional): List of payment methods to calculate fees for.\n          Valid values: \"ach\", \"cc\", \"debit\". If not provided, defaults to all payment methods.\n        - policy_id (str, optional): Policy ID\n\n    Returns\n    -------\n    data : dict\n        Response data containing:\n        ::\n\n            {\n                \"messages\": [\n                    \"ACH/debit card price: $100.00\",\n                    \"Credit card price: $103.00 (includes a $3.00 card processing cost)\"\n                ],\n                \"fees\": {\n                    \"ach\": \"0.00\",\n                    \"cc\": \"3.00\",\n                    \"debit\": \"0.00\"\n                }\n            }\n\n        Note: The \"fees\" dictionary only contains the payment methods specified in the request.\n        Consumers can determine if there's a surcharge by checking if any fee > 0.\n    success : bool\n        True if successful, False otherwise\n    messages : list of str\n        List of human-readable error messages (empty if successful)\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-retrieve_convenience_fee_preview"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-retrieve_convenience_fee_preview"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/payments/retrieve_payment": {
      "post": {
        "summary": "retrieve_payment",
        "tags": [
          "payments"
        ],
        "description": "Retrieve the specified payment\n\n    Parameters\n    ----------\n    payment_id : str\n        Requested payment id\n\n    Returns\n    -------\n    success : bool\n        True, if specified payment was found, False if otherwise (or errors)\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        the requested payment object, having the form\n        ::\n            {\n                'account_name': str or null,\n                'authorization_state': str,\n                'check_number': int,\n                'comm_pay_id': UUID,\n                'commission_payment': bool,\n                'committer': str,\n                'complete': bool,\n                'confirmation_number': str,\n                'date_updated': datetime,\n                'deleted': bool,\n                'distribution': str or null,  # a JSON-encoded dict of how payment was applied to policies\n                'entry_date_time': datetime,\n                'file_ids': list of UUID,\n                'id': UUID,\n                'invoice_number': str,\n                'is_auto_payment': bool,\n                'masked_number': str,\n                'nsf': bool,\n                'payment_instrument': str,\n                'payment_interface': str or null,\n                'payment_method_id': UUID,\n                'payor_id': UUID,\n                'printed_to_deposit': bool,\n                'remote_ip': str,\n                'selected_on_deposit': bool,\n                'sweep': bool,\n                'transaction_amount': float,\n                'transaction_date_time': datetime,\n                'transaction_type': str,\n                'vendor_message': str,\n                'vendor_stage': str or null,\n                'vendor_stage_success': bool,\n                'invoices_paid': list of dict with invoice details:\n                    {\n                        'id': UUID,\n                        'description': str,\n                        'invoice_amount': float,\n                        'amount_paid': float,\n                        'amount_due': float,\n                        'paid_in_full': bool,\n                        'revision_id': UUID,\n                        'revision_external_system_reference': str or null,\n                        'due_date': date or null\n                    }\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-retrieve_payment"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-retrieve_payment"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/payments/retrieve_payment_batch_entries": {
      "post": {
        "summary": "retrieve_payment_batch_entries",
        "tags": [
          "payments"
        ],
        "description": "Retrieves the entries related to the given batch\n\n    Parameters\n    ----------\n    batch_id : str\n        UUID of the target batch\n\n    Returns\n    -------\n    data : list of dicts\n        List containing serialized data for the created entries\n        ::\n\n            {\n                \"entry_id\": str,\n                \"group_id\": str,\n                \"payor_name\": str,\n                \"paid_amount\": str,\n                \"payment_id\": str,\n                \"payment_applied\": bool,\n                \"owed_amount\": str,\n                \"full_amount\": str,\n                \"agent_name\": str,\n                \"insured_name\": str,\n                \"invoice_code\": str,\n                \"policy_number\": str,\n                \"distribution_amount\": str,\n                \"distribution_action\": str,\n                \"billing_schedule_id\": str,\n                \"has_future_invoice\": bool,\n                \"policy_is_canceled\": bool,\n            }\n\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "batch_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/payments/retrieve_payment_batches": {
      "post": {
        "summary": "retrieve_payment_batches",
        "tags": [
          "payments"
        ],
        "description": "Retrieves all PaymentBatch instances in the database.\n\n    Parameters\n    ----------\n    load_entries : bool\n        Whether to load and serialize batch related entries in the response.\n\n    Returns\n    -------\n    data : list of dicts\n        A list of dictionaries containing all of the existing batches\n        ::\n\n            {\n                \"id\": str,\n                \"title\": str,\n                \"created_at\": str,\n                \"creator_name\": str,\n                \"creator_username\": str,\n                \"expected_entry_count\": int,\n                \"expected_total_amount\": decimal,\n                \"capture_mode\": str,\n                \"default_paid_amount_source\": str,\n                \"entries\": [{\n                    \"entry_id\": str,\n                    \"payor_name\": str,\n                    \"paid_amount\": str,\n                    \"payment_id\": str,\n                    \"payment_applied\": bool,\n                    \"policies\": [{\n                        \"policy_number\": str,\n                        \"owed_amount\": str,\n                        \"full_amount\": str,\n                        \"agent_name\": str,\n                        \"insured_name\": str,\n                        \"policy_is_canceled\": bool,\n                        \"distribution_amount\": str,\n                        \"distribution_action\": str,\n                        \"billing_schedule_id\": str,\n                        \"billing_threshold\": str,\n                        \"has_future_invoice\": bool,\n                    }],\n                    \"invoices\": [{\n                        \"invoice_code\": str,\n                        \"policy_number\": str,\n                        \"owed_amount\": str,\n                        \"full_amount\": str,\n                        \"agent_name\": str,\n                        \"insured_name\": str,\n                        \"policy_is_canceled\": bool,\n                        \"distribution_amount\": str,\n                        \"distribution_action\": str,\n                        \"billing_schedule_id\": str,\n                        \"billing_threshold\": str,\n                        \"has_future_invoice\": bool,\n                    }]\n                }]\n            }\n\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "load_entries": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/payments/retrieve_payment_entries": {
      "post": {
        "summary": "retrieve_payment_entries",
        "tags": [
          "payments"
        ],
        "description": "Retrieves the entries related to the given batch\n\n    Parameters\n    ----------\n    entry_ids : list of str\n        List containing the UUID's for the target entries\n\n    Returns\n    -------\n    data : list of dicts\n        List containing serialized data for the created entries\n        ::\n\n            {\n                \"entry_id\": str,\n                \"group_id\": str,\n                \"payor_name\": str,\n                \"paid_amount\": str,\n                \"payment_id\": str,\n                \"payment_applied\": bool,\n                \"owed_amount\": str,\n                \"full_amount\": str,\n                \"agent_name\": str,\n                \"insured_name\": str,\n                \"invoice_code\": str,\n                \"policy_number\": str,\n                \"distribution_amount\": str,\n                \"distribution_action\": str,\n                \"billing_schedule_id\": str,\n                \"has_future_invoice\": bool,\n                \"policy_is_canceled\": bool,\n            }\n\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "entry_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/payments/retrieve_payment_method_consent": {
      "post": {
        "summary": "retrieve_payment_method_consent",
        "tags": [
          "payments"
        ],
        "description": "\n    Check if a recurring payment consent record exists for a payment method.\n\n    Request body should contain:\n    {\n        \"payment_method_id\": \"uuid\"\n    }\n\n    Returns:\n    {\n        \"success\": true,\n        \"data\": {\n            \"consent_given\": boolean,\n            \"consent_id\": \"uuid\" or null\n        }\n    }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/payments/retrieve_payment_method_creation_details": {
      "post": {
        "summary": "retrieve_payment_method_creation_details",
        "tags": [
          "payments"
        ],
        "description": "retrieve_payment_method_creation_details",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-retrieve_payment_method_creation_details"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-retrieve_payment_method_creation_details"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/payments/retrieve_payment_methods": {
      "post": {
        "summary": "retrieve_payment_methods",
        "tags": [
          "payments"
        ],
        "description": "Retrieves payment methods according to received parameters\n\n    Parameters\n    ----------\n    exp_less_than : int\n        Optional. Filter all payment methods where expiration date less than or equal to\n        (current date + exp_less_than days).\n        If not provided, list all the active payment methods\n    contact_ids : list\n        Filter payments method only for listed ids\n    min_updated_on : str in ISO 8601 format (e.g. 2025-01-01T00:00:00Z)\n        Optional. Filter payment methods created after the given date\n\n    Returns\n    -------\n    data : list of dicts\n        List containing payment methods\n\n    success : bool\n        True if successful, false if not\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-retrieve_payment_methods"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-retrieve_payment_methods"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/payments/retrieve_pending_payments_for_settlement": {
      "post": {
        "summary": "retrieve_pending_payments_for_settlement",
        "tags": [
          "payments"
        ],
        "description": "retrieve_pending_payments_for_settlement",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-retrieve_pending_payments_for_settlement"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-retrieve_pending_payments_for_settlement"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/payments/retrieve_policy_billing_information": {
      "post": {
        "summary": "retrieve_policy_billing_information",
        "tags": [
          "payments"
        ],
        "description": "Retrieve a Policy's billing information\n\n    Parameters\n    ----------\n    policy_id : str\n    policy_term_id : str, optional\n    billing_only : bool, optional\n        defaults to True\n\n    Returns\n    -------\n    success : bool\n    messages : []\n    data : dict\n        ::\n            {\n                'billWhoms': [\n                    {\n                        'hideSweep': ,\n                        'billingSchedules': [\n                            {\n                                'automaticPaymentReminder': bool,\n                                'billingSchedule': string e.g. 'Annual',\n                                'id': uuid\n                            },\n                            ...\n                        ],\n                        'paymentMethods': ,\n                        'billWhom': string e.g. 'Test Insured - (Named Insured)',\n                        'id': ,\n                        'billHows': [\n                            {\n                                'billHow': string e.g. 'Mailing/Billing: 123 Fake - Springfield, MO 65802',\n                                'id': uuid,\n                            },\n                            ...\n                        ],\n                    },\n                    ...\n                ],\n\n                'sendInitialInvoice': bool,\n                'whenWithdraw': int,\n                'billingSchedule': uuid,\n\n                'recurringSelectedValues': {\n                    'billHows': uuid,\n                    'billWhoms': uuid,\n                    'billingSchedules': uuid,\n                    'paymentMethods': string,\n                    'whenWithdraw': int\n                } ,\n\n                'initialSelectedValues': {\n                    'billHows': uuid,\n                    'billWhoms': uuid,\n                    'billingSchedules': uuid,\n                    'manualReason': string,\n                    'paymentMethods': string,\n                    'whenWithdraw': int\n                },\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-retrieve_policy_billing_information"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-retrieve_policy_billing_information"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/payments/retrieve_saved_method_authorization": {
      "post": {
        "summary": "retrieve_saved_method_authorization",
        "tags": [
          "payments"
        ],
        "description": "Whether the saved-payment-method consent control must be shown, and the\n    disclosure copy to render with it. Read-only.\n\n    Unlike ``retrieve_convenience_fee`` -- which also carries these fields, but\n    only as a side effect of a fee calculation -- this endpoint needs no payment\n    amount, account type, or policy, so a caller that only wants to know whether\n    to render the consent control does not have to invent placeholder fee\n    arguments to ask.\n\n    Request and response schemas:\n    ``lib/api/api_specs/request-retrieve_saved_method_authorization.json`` and\n    ``response-retrieve_saved_method_authorization.json``.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-retrieve_saved_method_authorization"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-retrieve_saved_method_authorization"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/payments/retrieve_sweep_payment_list": {
      "post": {
        "summary": "retrieve_sweep_payment_list",
        "tags": [
          "payments"
        ],
        "description": "Retrieve pending sweep payments\n\n    Parameters\n    ----------\n    procdate : str, optional\n        optionally pass a date. All sweep payments entered before the passed in date\n        will be retrieved. by default, this uses the current date minus the grace period in settings\n\n    Returns\n    -------\n    success : bool\n    data : list of dicts\n        List containing payments with their associated policy numbers and primary property\n        {\n            \"id\": str UUID,\n            \"transaction_amount\": decimal,\n            \"vendor_message\": str,\n            \"policies\": [\n                {\n                    \"policy_number_normalized\": str,\n                    \"latest_revision\": {\n                        \"primary_property\": {\n                            \"address_line2\": str or null,\n                            \"address_city\": str,\n                            \"address_line1\": str,\n                            \"name\": str,\n                            \"address_state\": str,\n                            \"address_country\": str,\n                            \"address_zip\": str\n                        },\n                        \"policy_status\": str,\n                        \"revision_state\": str\n                    },\n                    \"policy_number\": str\n                }\n            ],\n            \"payment_method\": {\n                \"masked_routing\": str,\n                \"account_type\": str,\n                \"name_on_account\": str,\n                \"account_description\": str,\n                \"address_state\": str,\n                \"vendor\": str,\n                \"address_country\": str,\n                \"account_name\": str,\n                \"address_zip\": str,\n                \"address_line2\": str or null,\n                \"address_city\": str,\n                \"address_line1\": str,\n                \"masked_number\": str,\n                \"contact\": {\n                    \"confirmation_email\": str,\n                    \"name\": str,\n                    \"agency_number\": str,\n                    \"phones\": [\n                        {\n                            \"type\": str,\n                            \"phone\": str\n                        }\n                    ],\n                    \"addresses\": [\n                        {\n                            'address_city': str\n                            'address_country': str\n                            'address_line1': str\n                            'address_line2': str\n                            'address_state': str\n                            'address_zip': str\n                            'type': str\n                        }\n                    ]\n                },\n                \"method\": str\n            },\n            \"payment_instrument\": str,\n            \"date_updated\": str,\n            \"transaction_type\": str,\n            \"confirmation_number\": str,\n            \"commission_payment\": boolean\n        }\n        messages : list\n            Empty\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "procdate": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/payments/retrieve_updated_invoice_balance": {
      "post": {
        "summary": "retrieve_updated_invoice_balance",
        "tags": [
          "payments"
        ],
        "description": "For a given invoice_id we check if an associated invoice record exists\n    If it exists we return the total amount due.\n\n    Parameters\n    ----------\n    invoice_id : AccountHistory.id where AccountHistory.transaction_type == 'invoice'\n\n    Returns\n    -------\n    success : bool\n    messages : [\n            # returned if we located an AccountHistory record that is not an invoice\n            'passed id is not recognized as invoice record',\n            # returned if we didn't identify an AccountHistory record for passed value\n            'invoice record not found']\n    data : dict\n        ::\n            {\n                # only returned if success == True, else empty\n                'totalAmountDue': ,  # 0 if already paid in full, otherwise returns remaining balance\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "invoice_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/payments/send_payment_receipt_email": {
      "post": {
        "summary": "send_payment_receipt_email",
        "tags": [
          "payments"
        ],
        "description": "\n    Send the payment receipt PDF to the given recipient.\n\n    payment_id, policy_number, and recipient_email are required. The UI should call\n    get_billing_contact_emails to pre-fill options; the chosen or entered email is sent here.\n\n    Parameters\n    ----------\n    payment_id : str, required\n    policy_number : str, required\n    recipient_email : str, required\n        Recipient email address (from UI dropdown or free-form entry).\n    subject : str, optional\n    body : str, optional\n\n    Returns\n    -------\n    success : bool\n    data : dict\n        { \"recipient_email\": str, \"file_id\": str, \"policy_number\": str,\n          \"attachment_filename\": str }\n        file_id is the document actually attached: the stored per-policy receipt\n        for a single-policy payment, the group confirmation built for this send\n        otherwise.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-send_payment_receipt_email"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-send_payment_receipt_email"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/payments/settle_payments": {
      "post": {
        "summary": "settle_payments",
        "tags": [
          "payments"
        ],
        "description": "\n    Marks approved payments with a settlement timestamp given a list of dicts with payment ids\n\n    Parameters\n    ----------\n    payments : list of dicts\n        With form\n        ::\n            [{\n            'id': payment uuid,\n            'settlement_date_time': timezone-aware datetime in format 'YYYY-mm-ddTHH:MM:SSZ',\n            }]\n\n    Returns\n    -------\n    success : bool\n        True, if all necessary information was provided. Otherwise False\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        With form\n        ::\n            {\n                'summary' : {\n                    'total' : int, # total number of payments\n                    'succeeded' : int, # number of payments that succeeded\n                    'failed' : int # number of payments that failed\n                },\n                'successful_transactions' : list of given payments that succeeded\n                'failed_transactions' : list of given payments that failed in the process\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "payments": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/payments/store_external_payment": {
      "post": {
        "summary": "store_external_payment",
        "tags": [
          "payments"
        ],
        "description": "\n    Store an external payment (e.g. from a vendor) in BriteCore.\n\n    Parameters\n    ----------\n    policy_number : str, optional\n        Policy number to apply payment to. Either this or policy_number_normalized must be provided.\n    policy_number_normalized : str, optional\n        Normalized policy number to apply payment to. Either this or policy_number must be provided.\n    transaction_amount_in_cents : int\n        Amount of the payment in cents (this avoids floating point rounding)\n    transaction_date_time : datetime, optional\n        Date and time of the payment in the format of YYYY-MM-DD HH:MM:SS\n        If not specified, defaults to now.\n    external_account_name : str\n        Descriptive name of the external payment account. This will show up as \"External - {external_account_name}\"\n        on Policies > Payments > Payment Log page.\n    check_number : int, optional\n        Check number associated with the payment. Must be an integer.\n    sweep_check_number : str, optional\n        Sweep check number associated with the payment. Alphanumeric, max 36 characters.\n\n    Returns\n    -------\n    success : bool\n        True if the payment was stored successfully, False if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        Dictionary containing the following keys:\n        ::\n            {\n                'payment': {\n                    'id': str,\n                    'account_name': str,\n                    'confirmation_number': str,\n                    'transaction_date_time': str,\n                    'entry_date_time': str,\n                    'transaction_amount': str,\n                    'check_number': int,\n                    'sweep_check_number': str\n                }\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "policy_number": {
                    "type": "string"
                  },
                  "policy_number_normalized": {
                    "type": "string"
                  },
                  "transaction_amount_in_cents": {
                    "type": "integer"
                  },
                  "transaction_date_time": {
                    "type": "string"
                  },
                  "external_account_name": {
                    "type": "string"
                  },
                  "check_number": {
                    "type": "integer"
                  },
                  "sweep_check_number": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/payments/store_payment": {
      "post": {
        "summary": "store_payment",
        "tags": [
          "payments"
        ],
        "description": "store_payment",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-store_payment"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-store_payment"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/payments/store_payment_nsf": {
      "post": {
        "summary": "store_payment_nsf",
        "tags": [
          "payments"
        ],
        "description": "Mark a payment as NSF (V2 API).\n\n    Parameters:\n        request_body (dict): Request payload containing:\n            - payment_id (str): UUID of the payment to mark as NSF (required)\n            - assess_fee (str): When to assess NSF fee. Options: \"now\", \"next\", \"waive\". Default: \"now\"\n            - allow_cancel (bool): Whether to allow policy cancellation. Default: True\n            - postpone_until_date (str): Date to postpone outstanding invoices (YYYY-MM-DD). Optional\n            - policy_id (str): UUID of the policy (required)\n            - policy_term_id (str): UUID of the policy term. Required if external reference not provided\n            - policy_term_external_system_reference (str): External system reference. Required if term ID not provided\n\n    Returns:\n        dict: PaymentModel serialized data containing payment details with nsf=True\n\n    Raises:\n        BCValidationError: If payment not found or validation fails\n        BCServiceError: If NSF operation fails\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-store_payment_nsf"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-store_payment_nsf"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/payments/update_payment_batch": {
      "post": {
        "summary": "update_payment_batch",
        "tags": [
          "payments"
        ],
        "description": "Updates a PaymentBatch instance in the database.\n\n    Parameters\n    ----------\n    batch_id : str\n        UUID of the target batch\n    data : dict\n        A dictionary with batch info\n        ::\n\n            {\n                \"title\": str,\n                \"creator_id\": str,                  # (optional) UUID (defaults to logged user)\n                \"created_at\": str,                  # (optional) MM/DD/YYYY (defaults to now)\n                \"expected_entry_count\": int,        # (optional)\n                \"expected_total_amount\": str,       # (optional) Float parseable\n                \"capture_mode\": str,                # (optional) \"Policy Number\" (default), \"Invoice Code\"\n                \"default_paid_amount_source\": str,  # (optional) \"Term Payoff\", \"Current Due\"\n            }\n\n    Returns\n    -------\n    data: dict\n        A dictionary containing the created batch info\n        ::\n\n            {\n                \"id\": str,                          # UUID,\n                \"title\": str,\n                \"created_at\": str,                  # MM/DD/YYYY\n                \"creator_name\": str,\n                \"creator_username\": str,\n                \"expected_entry_count\": int,\n                \"expected_total_amount\": str,       # Float parseable\n                \"capture_mode\": str,                # \"Policy Number\", \"Invoice Code\"\n                \"default_paid_amount_source\": str,  # \"Term Payoff\", \"Current Due\"\n            }\n\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "batch_id": {
                    "type": "string"
                  },
                  "data": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/payments/update_payment_entries": {
      "post": {
        "summary": "update_payment_entries",
        "tags": [
          "payments"
        ],
        "description": "Updates payment entries in the database from the given serialized dataset\n\n    Parameters\n    ----------\n    entries : list of dicts\n        List containing serialized data for the entries to be created\n        ::\n\n            {\n                \"entry_id\": str,             # UUID\n                \"payor_id\": str,             # (optional) UUID\n                \"paid_amount\": str,          # (optional)\n                \"check_number\": str,         # (optional)\n                \"batch_datetime\": str,       # (optional) MM/DD/YYYY (defaults to now)\n                \"invoice_code\": str,         # (optional if policy_number is specified)\n                \"policy_number\": str,        # (optional if invoice code is specified)\n                \"distribution_amount\": str,  # (optional) Float parseable\n                \"distribution_action\": str,  # (optional)\n                \"billing_schedule_id\": str,  # (optional) UUID\n            }\n\n    Returns\n    -------\n    data : list of dicts\n        List containing serialized data for the updated entries\n        ::\n\n            {\n                \"entry_id\": str,\n                \"group_id\": str,\n                \"payor_name\": str,\n                \"paid_amount\": str,\n                \"payment_id\": str,\n                \"payment_applied\": bool,\n                \"owed_amount\": str,\n                \"full_amount\": str,\n                \"agent_name\": str,\n                \"insured_name\": str,\n                \"invoice_code\": str,\n                \"policy_number\": str,\n                \"distribution_amount\": str,\n                \"distribution_action\": str,\n                \"billing_schedule_id\": str,\n                \"has_future_invoice\": bool,\n                \"policy_is_canceled\": bool,\n            }\n\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "entries": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/payments/update_sweep_payments_complete": {
      "post": {
        "summary": "update_sweep_payments_complete",
        "tags": [
          "payments"
        ],
        "description": "Update a set up sweep payment IDs as completed payments\n\n    Parameters\n    ----------\n    payment_ids : list, required\n        list of str UUIDs as payment IDs\n    procdate : str, optional\n        optionally pass a date. All sweep payments entered before the passed in date will be retrieved.\n        by default, this uses the current date minus the grace period in settings\n\n    Returns\n    -------\n    success : bool\n    message : 'Sweep Queue Submitted to Celery'\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "payment_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "procdate": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/permissions/user_has_permission": {
      "post": {
        "summary": "user_has_permission",
        "tags": [
          "permissions"
        ],
        "description": "\n    Check if a user has a specific permission. username or cognito_username must be provided.\n    Only admin users can check permissions of other users.\n\n    Parameters\n    ----------\n    permission : str\n        The permission to check for.\n    username : str\n        The username of the user to check.\n    cognito_username : str\n        The Cognito username of the user to check.\n\n    Returns\n    -------\n    bool\n        True if the user has the permission, False otherwise.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-user_has_permission"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-user_has_permission"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/pgp_keys/create_pgp_key": {
      "post": {
        "summary": "create_pgp_key",
        "tags": [
          "pgp_keys"
        ],
        "description": "Create a new PGP key. Body: {label, key_value}.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/pgp_keys/delete_pgp_key": {
      "post": {
        "summary": "delete_pgp_key",
        "tags": [
          "pgp_keys"
        ],
        "description": "Soft-delete a PGP key.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/pgp_keys/get_pgp_key": {
      "post": {
        "summary": "get_pgp_key",
        "tags": [
          "pgp_keys"
        ],
        "description": "Fetch a single PGP key (no key_value).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/pgp_keys/list_pgp_keys": {
      "post": {
        "summary": "list_pgp_keys",
        "tags": [
          "pgp_keys"
        ],
        "description": "List active PGP keys (no key_value, no deleted rows).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/pgp_keys/picker_pgp_keys": {
      "post": {
        "summary": "picker_pgp_keys",
        "tags": [
          "pgp_keys"
        ],
        "description": "Picker shape: id + label (+ is_expired) only -- no fingerprint, audit\n    fields, or key material.\n\n    Exposure: session auth only. There is deliberately NO permission decorator\n    here (PR decision #9), so ANY authenticated user -- not just report editors\n    -- can enumerate key ids and labels. There is no report-edit permission to\n    gate on: the report list loads this picker on every render for every user,\n    so gating it behind britecore/pgp-keys would 403 the report list for\n    everyone without the admin permission and lock report editors out of\n    configuring encryption. Labels are operator-chosen names (\"ACME nightly\n    export\"), so the accepted leak is a list of counterparty names; the\n    material that matters -- key_value and fingerprint -- is never in this\n    payload and stays behind the admin endpoints (list/get/create/update/\n    delete/preview), which all require britecore/pgp-keys.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/pgp_keys/preview_pgp_key": {
      "post": {
        "summary": "preview_pgp_key",
        "tags": [
          "pgp_keys"
        ],
        "description": "Parse a pasted armored block and return just the fingerprint without\n    saving. Used by the admin editor to surface the fingerprint live so\n    admins can verify against the value the counterparty gave them before\n    clicking Save. Body: {key_value}. Response: {fingerprint}.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/pgp_keys/update_pgp_key": {
      "post": {
        "summary": "update_pgp_key",
        "tags": [
          "pgp_keys"
        ],
        "description": "Rename and/or rotate a PGP key. Body: {id, label, key_value?}.\n\n    Empty / missing key_value -> label-only update. Non-empty key_value ->\n    rotation: re-validates and recomputes fingerprint while preserving the\n    row id so reports referencing this key keep working.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/add_external_policies_to_existing_groups": {
      "post": {
        "summary": "add_external_policies_to_existing_groups",
        "tags": [
          "policies"
        ],
        "description": "Receives a list of external_policy dictionaries and\n    assigns it to the included policy_group_id.\n\n    Parameters\n    ----------\n    external_policies : list\n        A list with the form:\n        ::\n            [\n                {\n                    policy_id: uuid,\n                    policy_group_id: uuid\n                },\n                ...\n            ]\n\n    Returns\n    -------\n    success : bool\n    messages : list\n        The sql error if one occurs, or a success message.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "external_policies": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/add_line_item": {
      "post": {
        "summary": "add_line_item",
        "tags": [
          "policies"
        ],
        "description": "Adds a Line Item to a revision/property.\n\n    Parameters\n    ----------\n    revision_id : UUID, required\n        The UUID of an existing Revision\n    property_id : UUID, optional\n        The UUID of an existing Property. Only needed for line items with property category\n    sub_line_id : UUID, optional\n        The UUID of an existing SubLine. Only needed if adding to an existing subline.\n    item_id : UUID, required\n            The UUID of an existing Item\n    link_id : UUID, optional\n        The UUID of an existing link. Only needed if being added by another\n         item's Underwriting Rules.\n    check_for_sub_line : bool\n        defaults to False, Set this to true if this item belongs in a\n         subline that may not exist yet.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The data response having the form:\n        ::\n            {\n                'added_items': [\n                    {\n                        'id': UUID,\n                        'property_id': UUID,  # Only if this is a property item\n                        'revision_id': UUID,  # Only if this is a revision item\n                        'sub_line_instance_id': UUID,  # Only if this is on a sub line\n                        'item_id': UUID,\n                        'apply_date': date,\n                        'limit': Decimal('0.00'),\n                        'deductible': Decimal('0.00'),\n                        'written_premium': Decimal('0.00'),\n                        'annual_premium': Decimal('0.00'),\n                        'written_fee': Decimal('0.00'),\n                        'annual_fee': Decimal('0.00'),\n                        'manual': bool,\n                        'loss_exposure_group': int,\n                        'builder_obj': {},\n                        'link_obj: {},\n                        'rating_details: {},\n                        'date_added': date,\n                        'date_added_micro': str (microseconds),\n                        'prev_adj_amt': Decimal('0.00')\n                        'persist_status': ('normal', 'copied', 'conflicted', 'rejected', 'resolved')\n                        'resolved': bool,\n                        'status_reason': str,\n                        'allow_multiples': bool,\n                        'category': ('policy', 'property'),\n                        'description': str,\n                        'limit_availability': str,\n                        'mandatory': bool,\n                        'name': str,\n                        'show_in_builder': bool,\n                        'sort_order': int,\n                        'type': ('coverage', 'adjustment', 'nonRate',\n                                 'fee', 'calculation', 'dividend')\n                    }, ...\n                ],\n                'added_subline': {\n                    ...\n                }\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "revision_id": {
                    "type": "string"
                  },
                  "property_id": {
                    "type": "string"
                  },
                  "sub_line_id": {
                    "type": "string"
                  },
                  "item_id": {
                    "type": "string"
                  },
                  "link_id": {
                    "type": "string"
                  },
                  "check_for_sub_line": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/add_policies_to_existing_groups": {
      "post": {
        "summary": "add_policies_to_existing_groups",
        "tags": [
          "policies"
        ],
        "description": "Receives a list of policy dictionaries and\n    assigns it to the given policy_group_id.\n\n    Parameters\n    ----------\n    policies : list\n        A list with the form:\n        ::\n            [\n                {\n                    policy_id: uuid,\n                    policy_group_id: uuid\n                },\n            ]\n    Returns\n    -------\n    success : bool\n    messages : list\n        the sql error if one occurs, or a success message.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "policies": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "Returns": {
                    "type": "string"
                  },
                  "-------": {
                    "type": "string"
                  },
                  "success": {
                    "type": "boolean"
                  },
                  "messages": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/add_policies_to_new_group": {
      "post": {
        "summary": "add_policies_to_new_group",
        "tags": [
          "policies"
        ],
        "description": "Receives a list of policy dictionary lists and adds each element to a policy group.\n\n    Parameters\n    ----------\n    policies : list\n        A list with the form:\n        ::\n            [\n                [\n                    {\n                        policy_id: uuid,\n                        external_policy: bool(optional key)\n                    },\n                    ...\n                ],\n                ...\n            ]\n\n    Returns\n    -------\n    success : bool\n    messages : list\n        The sql error if one occurs, or a success message.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "policies": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/add_sub_line": {
      "post": {
        "summary": "add_sub_line",
        "tags": [
          "policies"
        ],
        "description": "Adds a Sub Line to a revision/property.\n\n    Parameters\n    ----------\n    revision_id : UUID, required\n        The UUID of an existing Revision\n    property_id : UUID, optional\n        The UUID of an existing Property\n    sub_line_id : UUID, required\n        The UUID of an existing SubLine\n    link_id : UUID, required\n        (optional) The UUID of an existing Link. Only needed if being added by another\n         item's Underwriting Rules\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The data response having the form:\n        ::\n\n            {\n                'id': UUID,\n                'property_id': UUID,  # Only if this is a property sub line\n                'revision_id': UUID,  # Only if this is a revision sub line\n                'sub_line_id': UUID,\n                'inheritance_id': UUID,\n                'date_added': date,\n                'date_added_micro': str (microseconds),\n                'category': ('policy', 'property'),\n                'default': bool,\n                'mandatory': bool,\n                'allow_multiples': bool,\n                'name': str,\n                'policy_type_id': UUID,\n                'sort_order': int,\n                'description': str,\n                'type': ('liability', 'inland marine', 'property'),\n                'persist_status': ('normal', 'copied', 'conflicted', 'rejected', 'resolved')\n                'resolved': bool,\n                'status_reason': str\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "revision_id": {
                    "type": "string"
                  },
                  "property_id": {
                    "type": "string"
                  },
                  "sub_line_id": {
                    "type": "string"
                  },
                  "link_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/application_signature_event_callback": {
      "post": {
        "summary": "application_signature_event_callback",
        "tags": [
          "policies"
        ],
        "description": "Triggers processing for a created, signed, canceled or signed-by-all Policy Application.\n\n    Parameters\n    ----------\n    policy_id : str\n        Policy Id of the application associated with the signature.\n    signer_name : str\n        The name of the contact who signed this Policy Application.\n    signature_url : str\n        An URL where the signed document can view reviewed.\n    event_type : str\n        The event type (created, signed, all_signed, or canceled).\n    file_id : str\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    message : str\n        'Event processed' if successful, else human-readable error message\n    data : None\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "policy_id": {
                    "type": "string"
                  },
                  "signer_name": {
                    "type": "string"
                  },
                  "signature_url": {
                    "type": "string"
                  },
                  "event_type": {
                    "type": "string"
                  },
                  "file_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/apply_pnc_lockbox_payment_transactions": {
      "post": {
        "summary": "apply_pnc_lockbox_payment_transactions",
        "tags": [
          "policies"
        ],
        "description": "Applies a collection of transaction records as accounted BriteCore\n    payments.\n\n    Parameters\n    ----------\n    transactions : list of dict\n        Iterable containing dicts of the following format:\n        ::\n            {\n                # Reference to an existing policy number, cleared of\n                # non-numerical characters (ex: the policy \"P90-2010-8\" would\n                # be represented here as \"9020108\")\n                \"policy\": str,\n\n                # Code identifying the check to be processed.\n                \"check\": str,\n\n                # The amount to be payed (with precision: 0.00).\n                \"payment\": decimal.Decimal,\n            }\n\n    Returns\n    -------\n    success : bool\n    messages : list of strings\n        List of human readable error messages filled only when success != True.\n    data : list of dict\n        A list of dicts, containing the results of the individual attempts to\n        apply the payment transactions. The result list is aligned to the input\n        transactions list, meaning it is possible to zip(transactions, results)\n        to analyze the results in respect to its input. Each contained element\n        has the following format:\n        ::\n\n            {\n                # Either \"success\" when the respective payment was correctly\n                # applied or \"error\" when it was not.\n                \"result\": str,\n\n                # A human readable message detailing the result field in case its\n                # value is different from \"success\".\n                \"detail\": str\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "transactions": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/async_create_policy_from_britequote": {
      "post": {
        "summary": "async_create_policy_from_britequote",
        "tags": [
          "policies"
        ],
        "description": "async_create_policy_from_britequote",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "quote": {},
                  "inception_date": {},
                  "term_type": {},
                  "user": {},
                  "transaction_type": {},
                  "postback": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/async_create_revision_from_britequote": {
      "post": {
        "summary": "async_create_revision_from_britequote",
        "tags": [
          "policies"
        ],
        "description": "async_create_revision_from_britequote",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "quote": {},
                  "revision_date": {},
                  "policy_id": {},
                  "transaction_type": {},
                  "user": {},
                  "postback": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/async_request_loss_analysis": {
      "post": {
        "summary": "async_request_loss_analysis",
        "tags": [
          "policies"
        ],
        "description": "Asynchronous request of loss analysis\n\n    Parameters\n    ----------\n    revision_id : str\n        The UUID of an existing Revision\n\n    Returns\n    -------\n    data : dict\n        The data response having the form:\n        ::\n            {\n                'job_id'  uuid: ID of the async task\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "revision_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/bind": {
      "post": {
        "summary": "bind",
        "tags": [
          "policies"
        ],
        "description": "Bind a policy from the API\n\n    Parameters\n    ----------\n    bind_info : dict\n        A list with the form:\n        ::\n            {\n                \"policy_number\": \"10-2017-1001\",\n                \"policy_id\": \"0fe6a7bf-bca7-4757-825c-7cc9bf90cfc0\"\n            }\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    message : list of str\n        Human-readable messages with error.\n    data : dict\n        Description of response dictionary here.\n\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "bind_info": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/cancel_policy": {
      "post": {
        "summary": "cancel_policy",
        "tags": [
          "policies"
        ],
        "description": "\n    DEPRECATED: This function is deprecated and will be removed in a future version.\n    Please use cancel_policy_v2 instead, which provides enhanced validation,\n    error handling, and consistent response formatting.\n\n    API v2 wrapper around lib.policies.views:cancelPolicy.\n\n    Note that the underlying cancelPolicy() has the following side-effects:\n    - policy_accounting.update_invoice_print_state\n    - creates revision row for U(policy_id, policy_term_id) with policyStatusReasonID set to cancellation_reason_id and cancel date\n    - updates cancelDate of other future committed revisions for this U(policy_id, policy_term_id)\n    - creates account_history row\n    - create_deliverable()\n    - make_note()\n\n    Parameters\n    ----------\n    policy_id : str\n        The UUID of an existing policy\n    policy_term_id : str\n        The UUID of an existing policy term\n    cancel_reason_id : str\n        The UUID of an existing cancel reason\n        If this is passed in, cancel_reason does not have to be. If both are specified, then cancel_reason\n        will be ignored since it is less accurate than the cancel_reason_id.\n    cancel_date : str\n        A string representing the cancel date (\"YYYY-MM-DD\").\n        If cancel_pending_date is specified, that will take precendence over cancel_date.\n    cancel_pending_date : str\n        A string representing the cancellation pending date (\"YYYY-MM-DD\").\n        If this is specified, put the policy into cancellation pending instead of canceling immediately.\n    cancel_reason : str\n        A string representing the cancellation reason.\n        This can be used in place of the cancel_reason_id. If this is passed in, cancel_reason_id does not have to be.\n        If the cancel_reason_id is passed in then this will be ignored as it is less accurate. Passing in the\n        cancel_reason_id is the preferred and recommended method.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The data response having the form:\n        ::\n            {\n                \"success\": bool,\n                \"message\": str\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "policy_id": {
                    "type": "string"
                  },
                  "policy_term_id": {
                    "type": "string"
                  },
                  "cancel_reason_id": {
                    "type": "string"
                  },
                  "cancel_date": {
                    "type": "string"
                  },
                  "cancel_pending_date": {
                    "type": "string"
                  },
                  "cancel_reason": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/cancel_policy_v2": {
      "post": {
        "summary": "cancel_policy_v2",
        "tags": [
          "policies"
        ],
        "description": "\n    Enhanced API v2 endpoint for policy cancellation with comprehensive validation and error handling.\n\n    This function provides a modern interface for policy cancellation with:\n    - Comprehensive input validation\n    - Idempotency support\n    - Standardized error handling\n    - Enhanced response formatting\n    - Business rule validation\n\n    Parameters\n    ----------\n    request_params : dict\n        Dictionary containing cancellation parameters\n    Returns\n    -------\n    dict\n        Standardized response with the following structure:\n        ::\n            {\n                \"success\": bool,\n                \"messages\": list of str,\n                \"data\": {\n                    \"policy_id\": str,\n                    \"policy_term_id\": str,\n                    \"cancellation_date\": str,\n                    \"cancellation_pending_date\": str,\n                    \"cancellation_reason\": {\n                        \"id\": str,\n                        \"name\": str\n                    },\n                    \"revision_id\": str,\n                    \"policy_number\": str,\n                    \"policy_status\": str,\n                    \"print_description\": str,\n                    \"additional_description\": str\n                }\n            }\n\n    Raises\n    ------\n    BCServiceError\n        If validation or business rules are violated\n    Exception\n        For system errors\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-cancel_policy_v2"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-cancel_policy_v2"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/copy_risk": {
      "post": {
        "summary": "copy_risk",
        "tags": [
          "policies"
        ],
        "description": "Copies risk information from one risk to another.\n\n    Parameters\n    ----------\n    from_risk_id : UUID, required\n    to_risk_id : UUID, required\n    copy_address : Optionally copies the address from (from_risk_id) to (to_risk_id), DEFAULT: True\n    copy_rating : Optionally copies the rating from (from_risk_id) to (to_risk_id), DEFAULT: True\n    copy_mortgagees : Optionally copies the mortgagees from (from_risk_id) to (to_risk_id), DEFAULT: False\n    copy_tenants : Optionally copies the tenants from (from_risk_id) to (to_risk_id), DEFAULT: False\n    copy_additional_interests : Optionally copies building-level additional interests from (from_risk_id) to (to_risk_id), DEFAULT: True\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        *see retrieve_risk_details*\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "from_risk_id": {
                    "type": "string"
                  },
                  "to_risk_id": {
                    "type": "string"
                  },
                  "copy_address": {
                    "type": "string"
                  },
                  "copy_rating": {
                    "type": "string"
                  },
                  "copy_mortgagees": {
                    "type": "string"
                  },
                  "copy_tenants": {
                    "type": "string"
                  },
                  "copy_additional_interests": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/copy_sub_line": {
      "post": {
        "summary": "copy_sub_line",
        "tags": [
          "policies"
        ],
        "description": "Adds copy of a Sub Line to a revision/property.\n\n    Parameters\n    ----------\n    revision_id : UUID, required\n        The UUID of an existing Revision\n    property_id : UUID, optional\n        The UUID of an existing Property\n    sub_line_id : UUID, required\n        The UUID of an existing SubLine\n    sub_line_instance_id: UUID, required\n        The UUID of an existing SubLineInstance\n    link_id : UUID, required\n        (optional) The UUID of an existing Link. Only needed if being added by another\n         item's Underwriting Rules\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The data response having the form:\n        ::\n\n            {\n                'id': UUID,\n                'property_id': UUID,  # Only if this is a property sub line\n                'revision_id': UUID,  # Only if this is a revision sub line\n                'sub_line_id': UUID,\n                'inheritance_id': UUID,\n                'date_added': date,\n                'date_added_micro': str (microseconds),\n                'category': ('policy', 'property'),\n                'default': bool,\n                'mandatory': bool,\n                'allow_multiples': bool,\n                'name': str,\n                'policy_type_id': UUID,\n                'sort_order': int,\n                'description': str,\n                'type': ('liability', 'inland marine', 'property'),\n                'persist_status': ('normal', 'copied', 'conflicted', 'rejected', 'resolved')\n                'resolved': bool,\n                'status_reason': str\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "revision_id": {
                    "type": "string"
                  },
                  "property_id": {
                    "type": "string"
                  },
                  "sub_line_id": {
                    "type": "string"
                  },
                  "sub_line_instance_id": {
                    "type": "string"
                  },
                  "link_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/create_from_stateless_quote": {
      "post": {
        "summary": "create_from_stateless_quote",
        "tags": [
          "policies"
        ],
        "description": "create_from_stateless_quote",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/create_loss_dispute": {
      "post": {
        "summary": "create_loss_dispute",
        "tags": [
          "policies"
        ],
        "description": "Create a new loss dispute record\n\n    Parameters\n    ----------\n    property_id : UUID\n    case_number : string\n    reason : text\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    message : list of str\n        Human-readable messages with error.\n    data: dict of newly created loss_dispute\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "property_id": {
                    "type": "string"
                  },
                  "case_number": {
                    "type": "string"
                  },
                  "reason": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/create_new_policy": {
      "post": {
        "summary": "create_new_policy",
        "tags": [
          "policies"
        ],
        "description": "Create a new policy from the API as part of the create_quote logic.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/create_new_policy_extended": {
      "post": {
        "summary": "create_new_policy_extended",
        "tags": [
          "policies"
        ],
        "description": "Create a new policy from the API as part of the create_quote_extended logic.\n\n    This function is responsible for creating a new policy from the API as part of the create_quote_extended logic.\n    It is responsible for formatting the underwriting options and questions, and for creating the policy.\n\n    Returns\n    -------\n    dict\n        A dictionary containing the new policy data.\n\n    Raises\n    ------\n    Exception\n        If an error occurs while creating the policy.\n        Returns a standard error response.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/create_policy": {
      "post": {
        "summary": "create_policy",
        "tags": [
          "policies"
        ],
        "description": "Creates a new policy.\n\n    Parameters\n    ----------\n    policy_number : str\n        defaults to the next system generated policy number\n    inception_date : str\n        defaults to today\n    term_type : str\n        ('Custom', '3 Years', '18 Months', '1 Year', '9 Months', '6 Months', '3 Months')\n    expiration_date : str\n        (optional) - required if term_type is 'Custom'\n    renewal_term_type : str\n        ('3 Years', '18 Months', '1 Year', '9 Months', '6 Months', '3 Months')\n    is_renewal : bool\n        (optional) if the policy should be processed as a renewal\n    underwriting_questions : list\n        (optional) if enforcing underwriting questions\n    underwriting_options : list\n        (optional) if enforcing underwriting options\n    as_agent : bool\n        If true, creator and agent relations are based on logged in user\n        It also adds a meta key in the response that holds the redirect_uri location\n        of the new quote.\n    manual_policy_number : bool\n        indicates whether the policy number was manually assigned\n    policy_type_id : uuid\n        (optional): Given a policy type ID, the policy type is attached to the revision\n    effective_date : str\n        (optional) - required if effective_date is different than inception_date. Defaults to inception date\n    external_system_reference : str\n    property_zip : str\n        (optional) - used to determine if there are suspensions for this zip code.\n    save_policy_type : boolean\n        (optional): If true, and policy_type_id is passed, the policy type is attached to the revision\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The data response having the form:\n        ::\n\n            {'policy_id': UUID,\n             'revision_id': UUID,\n             'policy_term_id': UUID,\n             'policy_number': str, (System generated number if none provided)\n             'revision_data': {*see retrieve_revision_details*}\n             'policy_contacts' : {}}\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "policy_number": {
                    "type": "string"
                  },
                  "inception_date": {
                    "type": "string"
                  },
                  "term_type": {
                    "type": "string"
                  },
                  "expiration_date": {
                    "type": "string"
                  },
                  "renewal_term_type": {
                    "type": "string"
                  },
                  "is_renewal": {
                    "type": "boolean"
                  },
                  "underwriting_questions": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "underwriting_options": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "as_agent": {
                    "type": "boolean"
                  },
                  "manual_policy_number": {
                    "type": "boolean"
                  },
                  "policy_type_id": {
                    "type": "string"
                  },
                  "effective_date": {
                    "type": "string"
                  },
                  "external_system_reference": {
                    "type": "string"
                  },
                  "property_zip": {
                    "type": "string"
                  },
                  "save_policy_type": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/create_policy_from_britequote": {
      "post": {
        "summary": "create_policy_from_britequote",
        "tags": [
          "policies"
        ],
        "description": "\n    Creates a Policy from a BriteQuote unified risk state object.\n\n    Parameters\n    ----------\n    quote : dict\n        A quote externally rated from containing data such as all risks, fields, items, and premiums.\n    inception_date: Date\n        With the following format: %Y-%m-%d\n    term_type: string\n        \"1 Year\" for instance\n    transaction_type: string\n        \"new_business\" by default, but it can also be \"rewrite\"\n    postback: dict\n            Data sent from a third party system to be used based on the transaction type\n\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "quote": {
                    "type": "object"
                  },
                  "inception_date": {
                    "type": "string"
                  },
                  "term_type": {
                    "type": "string"
                  },
                  "transaction_type": {
                    "type": "string"
                  },
                  "postback": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/create_quote": {
      "post": {
        "summary": "create_quote",
        "tags": [
          "policies"
        ],
        "description": "Create a quote from the API\n\n    Parameters\n    ----------\n    quote_info : dict\n        A object with the form:\n        ::\n            {\n                \"underwriting_questions\": [\n                    {\n                        \"questionId\": \"UUID-1\",\n                        \"yesNoAnswer\": \"no\",\n                        \"explanation\": \"\"\n                    },\n                    {\n                        \"questionId\": \"UUID-2\",\n                        \"yesNoAnswer\": \"no\",\n                        \"explanation\": \"\"\n                    }\n                ],\n                \"named_insured\": \"My Software Company, Inc.\",\n                \"named_insured_type\": \"organization\",\n                \"named_insured_address\":\n                {\n                    \"address_line1\": \"30 Marion Ave\",\n                    \"address_line2\": \"\",\n                    \"address_city\": \"Albany\",\n                    \"address_state\": \"NY\",\n                    \"address_county\": \"Albany\",\n                    \"address_country\": \"USA\",\n                    \"address_zip\": \"12203\",\n                    \"latitude\": 42.6652464,\n                    \"longitude\": -73.80048369999997\n                },\n                \"website\": \"www.test.com\",\n                \"line_name\": \"Worker's Compensation\",\n                \"policy_type_name\": \"Workers' Compensation\",\n                \"effective_date\": \"10/26/2017\",\n                \"agency_id\": \"<agency_id>\",\n                \"agent_id\": \"<agent_id>\",\n                \"activated\": false,\n                \"locations\": [\n                    {\n                        \"address_line1\": \"30 Marion Ave\",\n                        \"address_line2\": \"\",\n                        \"address_city\": \"Albany\",\n                        \"address_state\": \"NY\",\n                        \"address_county\": \"Albany\",\n                        \"address_county_specify\": \"\",\n                        \"address_country\": \"USA\",\n                        \"address_zip\": \"12203\",\n                        \"latitude\": 42.6652464,\n                        \"longitude\": -73.80048369999997\n                    }\n                ],\n                \"items\": [\n                    {\n                        \"name\": \"Policy Information\",\n                        \"questions\": {\n                            \"Market Segment\": \"\",\n                            \"Standard Industrial Classification (SIC)\":\n                                \"7371 Computer Programming Services\",\n                            \"Each Accident Limit/Disease-Policy Limit/Disease-Each Employee Limit\":\n                                \"$500,000/$500,000/$500,000\"\n                        }\n                    },\n                    {\n                        \"name\": \"Class Code\",\n                        \"questions\":\n                        {\n                            \"Payroll Amount\": \"100000\",\n                            \"# Full Time Employees\": \"1\",\n                            \"# Part Time Employees\": \"\",\n                            \"Occupation\": \"8810 Clerical Office Employees NOC\",\n                            \"If Any\": \"No\"\n                        }\n                    },\n                    {\n                        \"name\": \"Coverage A\",\n                        \"limit\": 100000\n                    }\n                ],\n                \"soft_geoservice_bypass\": False,\n                \"hard_geoservice_bypass\": False\n            }\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    message : list of str\n        Human-readable messages with error.\n    data : dict\n        ::\n            {\n                \"quote_number\": \"Quote-2017-0000001\",\n                \"policy_id\": \"POLICY-UUID\",\n                \"total\": {\n                    \"pro_rata_fees\": 69.00,\n                    \"pro_rata_premium\": 861.00,\n                    \"pro_rata_total\": 930.00,\n                    \"annual_fees\": 69.00,\n                    \"annual_premium\": 861.00,\n                    \"annual_total\": 930.00\n                },\n                \"items\": [\n                    {\n                        \"name\": \"Policy Information\",\n                        \"pro_rata_amount\": 0.00,\n                        \"annual_amount\": 0.00\n                    },\n                    {\n                        \"name\": \"Class Code\",\n                        \"pro_rata_amount\": 861.00,\n                        \"annual_amount\": 861.00\n                    }\n                ]\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "quote_info": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/create_quote_async": {
      "post": {
        "summary": "create_quote_async",
        "tags": [
          "policies"
        ],
        "description": "Create a quote as a background job from the API\n\n    Parameters\n    ----------\n    quote_info : dict\n        A object with the form:\n        ::\n            {\n                \"api_key\": \"<your_api_key>\",\n                \"quote_info\": {\n                    \"named_insured\": \"BC Test OCT2\",\n                    \"named_insured_type\": \"organization\",\n                    \"named_insured_address\": {\n                        \"address_line1\": \"123 Mission St\",\n                        \"address_line2\": \"\",\n                        \"address_city\": \"San Francisco\",\n                        \"address_state\": \"CA\",\n                        \"address_county\": \"\",\n                        \"address_county_specify\": \"\",\n                        \"address_country\": \"USA\",\n                        \"address_zip\": \"94105\"\n                    },\n                    \"line_name\": \"Cyber Liability\",\n                    \"policy_type_name\": \"HSB Total Cyber\",\n                    \"effective_date\": \"07/07/2021\",\n                    \"agency_id\": \"<agency_id>\",\n                    \"agent_id\": \"<agent_id>\",\n                    \"locations\": [\n                        {\n                            \"address_line1\": \"123 Mission St\",\n                            \"address_line2\": \"\",\n                            \"address_city\": \"San Francisco\",\n                            \"address_state\": \"CA\",\n                            \"address_county\": \"\",\n                            \"address_county_specify\": \"\",\n                            \"address_country\": \"USA\",\n                            \"address_zip\": \"94105\"\n                        }\n                    ],\n                    \"items\": [\n                        {\n                            \"name\": \"Rating Information\",\n                            \"limit\": 4000000,\n                            \"questions\": {\n                                \"Retroactive Date (MM/DD/YYYY)\": \"\",\n                                \"Industry Category\": \"62 - Health Care and Social Assistance\",\n                                \"Annual Revenue / Operating Revenue\": \"3000000\"\n                            }\n                        }\n                    ]\n                }\n            }\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    message : list of str\n        Human-readable messages with error.\n    data : dict\n        ::\n            {\n                \"quote_number\": \"Q2021000078\",\n                \"policy_id\": \"<policy_id>\"\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "quote_info": {
                    "type": "object"
                  },
                  "Returns": {
                    "type": "string"
                  },
                  "-------": {
                    "type": "string"
                  },
                  "success": {
                    "type": "boolean"
                  },
                  "message": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "data": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/create_quote_extended": {
      "post": {
        "summary": "create_quote_extended",
        "tags": [
          "policies"
        ],
        "description": "Create a new quote using the API.\n\n    - Advanced settings `application-future-date-bound` and `application-past-date-bound` will be\n      enforced if the API key used is not associated with an \"Administrator\" contact.\n\n    ``log_api_payloads`` logs the request payload and response body at INFO,\n    matching ``create_and_rate_full_quote``.\n\n    run_uw_rules : bool\n        Run Underwriting Rules and calculate limits of Property Items.\n        If run_stateless, this will be ignored, as Underwriting Rules are always run in stateless mode.\n    run_stateless : Union[bool, 'debug']\n        If true, run the quote in stateless mode. This will create a stateless_quote_id in response.\n        If \"debug\", it will run the quote and include execution details, but NOT create a stateless_quote_id.\n        If false (default), the quote will be stored in the database and a policy number/ID is returned.\n    requote : bool\n        Only works when run_stateless is false.\n    quote_info : dict:\n        A dict having the form:\n        ::\n            {\n                \"policy_number\": \"optional manual policy number\",\n                \"inception_date\": \"MM/DD/YYYY\" (optional),\n                \"effective_date\": \"MM/DD/YYYY\",\n                \"line_name\": \"line name\",\n                \"is_renewal\": boolean, // optional, default is false\n                \"policy_type_name\": \"policy type name\",\n                \"underwriting_options\": [{\n                    \"answer\": \"answer\",\n                    \"optionId\": \"option id\"\n                }],\n                \"underwriting_questions\": [{\n                    // Either questionId or questionText is required.\n                    \"questionId\": \"question id\",  // UUID; precise but changes per\n                                                  // policy-type effective date.\n                    \"questionText\": \"text fragment\",  // case-insensitive contains\n                                                      // match on the question's\n                                                      // yes_no_question text,\n                                                      // scoped to this policy\n                                                      // type's effective version.\n                                                      // Must match exactly one.\n                    \"yesNoAnswer\": \"no\",\n                    \"explanation\": \"explanation\"\n                }],\n                \"named_insureds\": [{\n                    \"name\": \"name\",\n                    \"type\": \"organization\",\n                    \"fein_tax\": \"1234567\",\n                    \"ssn\": \"001112222\",\n                    \"date_business_started\": \"MM/DD/YYYY\", // optional\n                    \"website\": \"www.test.com\",\n                    \"legal_entity_type\": \"legal entity type\", // optional\n                    \"phones\": [{ // optional\n                        \"number\": \"1234567890\",\n                        \"type\": \"work\"\n                    }],\n                    \"emails\": [{ // optional\n                        \"email\": \"test@example.com\",\n                        \"type\": \"work\"\n                    }],\n                    \"addresses\": [\n                        {\n                            \"address_line1\": \"address line 1\",\n                            \"address_line2\": \"\",\n                            \"address_city\": \"city\",\n                            \"address_state\": \"NY\",\n                            \"address_county\": \"county\",\n                            \"address_country\": \"USA\",\n                            \"address_zip\": \"12208\",\n                            \"type\": \"Mailing\"\n                        }\n                    ],\n                    \"retrieve_credit_report\": false,      // optional\n                    \"retrieve_credit_report_timeout\": 30  // optional\n                }],\n                \"additional_interests\": [{  // optional\n                    \"Interest\": \"Interest in property\",\n                    \"name\": \"name\",\n                    \"type\": \"organization\",\n                    \"fein_tax\": \"1234567\",\n                    \"ssn\": \"001112222\",\n                    \"date_business_started\": \"MM/DD/YYYY\", // optional\n                    \"legal_entity_type\": \"legal entity type\", // optional\n                    \"phones\": [{ // optional\n                        \"number\": \"1234567890\",\n                        \"type\": \"work\"\n                    }],\n                    \"emails\": [{ // optional\n                        \"email\": \"test@example.com\",\n                        \"type\": \"work\"\n                    }],\n                    \"addresses\": [\n                        {\n                            \"address_line1\": \"address line 1\",\n                            \"address_line2\": \"\",\n                            \"address_city\": \"city\",\n                            \"address_state\": \"NY\",\n                            \"address_county\": \"county\",\n                            \"address_country\": \"USA\",\n                            \"address_zip\": \"12208\",\n                            \"type\": \"Mailing\"\n                        }\n                    ]\n                }],\n                // At least one of \"agency_id\" or \"agency_number\" is required.\n                // agency_number takes precedence if both are present.\n                \"agency_id\": \"uuid\",  // conditionally optional; see note above\n                \"agency_number\": str,  // conditionally optional; see note above\n                // At least one of \"agent_id\" or \"agent_number\" is required.\n                // agent_number takes precedence if both are present.\n                \"agent_id\": \"uuid\", // conditionally optional; see note above\n                \"agent_number\": str,  // conditionally optional; see note above\n                \"locations\": [{\n                    \"address_county_specify\": \"\",\n                    \"address_line1\": \"address line 1\",\n                    \"address_line2\": \"\",\n                    \"address_city\": \"city\",\n                    \"address_state\": \"NY\",\n                    \"address_county\": \"county\",\n                    \"address_country\": \"USA\",\n                    \"address_zip\": \"12208\",\n                    \"primary\": true\n                }],\n                // `items` accepts EITHER a list (below) OR an object keyed by\n                // item name -- {\"<name>\": {..} } or, for allow_multiples items,\n                // {\"<name>\": [{..}, {..}]}. Object-keyed input is normalized to\n                // this list form before processing; the object form is the\n                // canonical, schema-targetable shape (io_mapping workbench).\n                \"items\": [{\n                    \"name\": \"name\",\n                    \"questions\": {\n                        \"question 1\": \"answer 1\",\n                        \"question 2\": \"answer 2\",\n                    },\n                    \"rating_details\": [\"rating_detail_type\"], // optional\n                    \"identifier\": \"question 1\", // optional\n                    \"sub_line\": \"sub line name\" // optional\n                }],\n                \"activated\": false,\n                \"soft_geoservice_bypass\": false,\n                \"hard_geoservice_bypass\": false\n            }\n            or\n            {\n                // Populate a quote from a saved stateless quote ID.\n                \"stateless_quote_id\": \"stateless quote id\",\n                \"activated\": false,\n                \"soft_geoservice_bypass\": false,\n                \"hard_geoservice_bypass\": false\n            }\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    message : list of str\n        Human-readable messages with error.\n        If credit report retrieval on any named insured has failed, the message list will contain the message\n        \"Credit vendor failed\", as well as any detailed error message.\n    data : dict\n        A dict having the form:\n        ::\n        {\n            \"quote_number\": \"quote number\",  // Only when run_stateless is false\n            \"stateless_quote_id\": \"stateless quote id\",  // Only when run_stateless is true\n            \"items\": [{\n                \"annual_amount\": 0.0,\n                \"name\": \"item name\",\n                \"pro_rata_amount\": 0.0,\n                \"rating_details\": [{\"rating_detail_type\": running_total}]\n                \"identifier\": \"identifier if the optional parameter is given\"  // Only when run_stateless is false\n            }],\n            \"total\": {\n                \"annual_fees\": 0.0,\n                \"pro_rata_premium\": 0.0,\n                \"annual_total\": 0.0,\n                \"pro_rata_total\": 0.0,\n                \"annual_premium\": 0.0,\n                \"pro_rata_fees\": 0.0\n            },\n            \"forms\": [{  // Only when run_stateless is false\n                \"edition_number\": \"edition number\",\n                \"description\": \"form description\",\n                \"form_code\": \"form code\"\n            }],\n            \"policy_id\": \"policy id\",  // Only when run_stateless is false\n            \"policy_type_id\": \"policy type id\",  // Only when run_stateless is false\n            \"primary_property_id\": \"primary property id\",  // Only when run_stateless is false\n            \"revision_id\": \"revision id\",  // Only when run_stateless is false\n            \"stp\": {  // Only when run_stateless is false\n                \"ran\": true,\n                \"success\": true,\n                \"details\": []\n            }\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-create_quote_extended"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-create_quote_extended"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/create_quote_extended_async": {
      "post": {
        "summary": "create_quote_extended_async",
        "tags": [
          "policies"
        ],
        "description": "Create a quote as a background job from the API.\n        This shares functionality with the 'create_quote_extended' endpoint.\n\n    - Advanced settings `application-future-date-bound` and `application-past-date-bound` will be\n      enforced if the API key used is not associated with an \"Administrator\" contact.\n\n    Parameters\n    ----------\n\n    run_uw_rules : bool\n        Run Underwriting Rules and calculate limits of Property Items\n    quote_info : dict\n        A object with the form:\n        ::\n            {\n                \"api_key\": \"<your_api_key>\",\n                \"quote_info\": {\n                    \"named_insured\": \"BC Test OCT2\",\n                    \"named_insured_type\": \"organization\",\n                    \"named_insured_address\": {\n                        \"address_line1\": \"123 Mission St\",\n                        \"address_line2\": \"\",\n                        \"address_city\": \"San Francisco\",\n                        \"address_state\": \"CA\",\n                        \"address_county\": \"\",\n                        \"address_county_specify\": \"\",\n                        \"address_country\": \"USA\",\n                        \"address_zip\": \"94105\"\n                    },\n                    \"line_name\": \"Cyber Liability\",\n                    \"is_renewal\": boolean, // optional, default is false\n                    \"policy_type_name\": \"HSB Total Cyber\",\n                    \"inception_date\": \"07/07/2021\" (optional),\n                    \"effective_date\": \"07/07/2021\",\n                    // At least one of \"agency_id\" or \"agency_number\" is required.\n                    // agency_number takes precedence if both are present.\n                    \"agency_id\": \"<agency_id>\",  // conditionally optional; see note above\n                    \"agent_id\": \"<agent_id>\",  // conditionally optional; see note above\n                    \"locations\": [\n                        {\n                            \"address_line1\": \"123 Mission St\",\n                            \"address_line2\": \"\",\n                            \"address_city\": \"San Francisco\",\n                            \"address_state\": \"CA\",\n                            \"address_county\": \"\",\n                            \"address_county_specify\": \"\",\n                            \"address_country\": \"USA\",\n                            \"address_zip\": \"94105\"\n                        }\n                    ],\n                    \"items\": [\n                        {\n                            \"name\": \"Rating Information\",\n                            \"limit\": 4000000,\n                            \"questions\": {\n                                \"Retroactive Date (MM/DD/YYYY)\": \"\",\n                                \"Industry Category\": \"62 - Health Care and Social Assistance\",\n                                \"Annual Revenue / Operating Revenue\": \"3000000\"\n                            }\n                        }\n                    ]\n                }\n            }\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    message : list of str\n        Human-readable messages with error.\n    data : dict\n        ::\n            {\n                \"quote_number\": \"Q2021000078\",\n                \"policy_id\": \"<policy_id>\"\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "run_uw_rules": {
                    "type": "boolean"
                  },
                  "quote_info": {
                    "type": "object"
                  },
                  "Returns": {
                    "type": "string"
                  },
                  "-------": {
                    "type": "string"
                  },
                  "success": {
                    "type": "boolean"
                  },
                  "message": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "data": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/create_revision_from_britequote": {
      "post": {
        "summary": "create_revision_from_britequote",
        "tags": [
          "policies"
        ],
        "description": "\n    Parameters\n    ----------\n    quote: dict, required\n            Endorsement dict from BriteQuote\n    revision_date: str, required\n            'YYYY-dd-MM' formatted string stating the new revision's start date\n    policy_id: str, required\n            Policy id to create a new revision\n    transaction_type: str, required\n            Tell which transaction will be executed by Gen 2 (e.g. 'cancellation')\n    postback: dict\n            Data sent from a third party system to be used based on the transaction type. It's\n            required when transaction_type is equals to 'cancellation' or 'reinstatement'\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data: dict\n        The data response if success is True\n        ::\n            {\n                'policy_id': str\n                'revision_id': str\n                'policy_number': str\n                'redirect_uri': str\n            }\n        The data response if success is False\n        ::\n            {\n                'success': bool\n                'messages': [str]\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "quote": {
                    "type": "string"
                  },
                  "revision_date": {
                    "type": "string"
                  },
                  "policy_id": {
                    "type": "string"
                  },
                  "transaction_type": {
                    "type": "string"
                  },
                  "postback": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/create_risk": {
      "post": {
        "summary": "create_risk",
        "tags": [
          "policies"
        ],
        "description": "Creates a new risk (property) for the given revision.\n\n    Parameters\n    ----------\n    revision_id : str, required\n    property_group_number : int\n    building_number : int\n    force_categories : bool, optional\n        If True, forces category creation for mandatory items\n\n    Returns\n    -------\n    success: bool\n        True if successful, false if not\n    messages: list of str\n        List of human-readable error messages\n    data:\n        The data response having the form:\n        ::\n\n            {\n                'id': UUID,\n                'revision_id': UUID,\n                'name': str (\"Property #\"),\n                'address_state': str (\"MO\"),\n                'property_group_id': UUID\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "revision_id": {
                    "type": "string"
                  },
                  "property_group_number": {
                    "type": "integer"
                  },
                  "building_number": {
                    "type": "integer"
                  },
                  "force_categories": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/delete_external_policies": {
      "post": {
        "summary": "delete_external_policies",
        "tags": [
          "policies"
        ],
        "description": "Receives a list of external policies to be deleted.\n\n    Parameters\n    ----------\n    policies : list\n        A list of policy numbers:\n\n    Returns\n    -------\n    success : bool\n    messages : list of str\n    data : list of external policy numbers(if an exception is raised)\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "policies": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/delete_loss_dispute": {
      "post": {
        "summary": "delete_loss_dispute",
        "tags": [
          "policies"
        ],
        "description": "Mark a loss_dispute as deleted\n    This is not going to delete the db register, but set the dispute as deleted\n    Parameters\n    ----------\n    dispute_id : UUID\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    message : list of str\n        Human-readable messages with error.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "dispute_id": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/evaluate_cancellation": {
      "post": {
        "summary": "evaluate_cancellation",
        "tags": [
          "policies"
        ],
        "description": "Run non pay cancellation evaluation logic for a given policy\n\n    Parameters\n    ----------\n    policy_id : str\n        The UUID of the policy to evaluate for cancellation\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The data response having the form:\n        ::\n            {\n                \"success\": bool,\n                \"cancel\": bool,\n                \"np_created\": bool,\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "policy_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/export_auto_policies": {
      "post": {
        "summary": "export_auto_policies",
        "tags": [
          "policies"
        ],
        "description": "\n    Retrieve all data points specific to policies for the given revision ids.\n\n    Parameters\n    ----------\n    revision_ids : list of str, required\n        List of revision ids to generate data points for policies\n    property_ids : list of str, optional\n        List of property ids to filter results\n\n    Notes\n    -----\n    Every return premium of the policy is listed under\n    ``revision.policy_term.billing.return_premiums``, sorted from newest to\n    oldest, so ``return_premiums[0]`` is always the most recent return premium.\n    Return premium dates carry no time of day, so same-day return premiums are\n    ordered by when the underlying account history entry was raised.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    message : list of str\n        Human-readable messages.\n    data :\n        Contains the data points of the policy in the following format:\n    [\n        {\n            \"revision\": {\n                \"id\": ,\n                \"policy_id\": ,\n                \"policy_term_id\": ,\n                \"cancel_date\": ,\n                \"commission_rate\": ,\n                \"commission_rate_adjustment\": ,\n                \"commit_date\": ,\n                \"commit_date_time\": ,\n                \"create_date\": ,\n                \"date_archived\": ,\n                \"dec_description\": ,\n                \"description\": ,\n                \"written_fee\": ,\n                \"grant_mortgagee_extension\": ,\n                \"override_commission\": ,\n                \"policy_status\": ,\n                \"policy_status_reason_id\": ,\n                \"policy_type_id\": ,\n                \"written_premium\": ,\n                \"print_dec\": ,\n                \"reinstate_at_commit\": ,\n                \"revision_date\": ,\n                \"revision_state\": ,\n                \"annual_fee\": ,\n                \"annual_premium\": ,\n                \"underwriting_questions\": ,\n                \"underwriting_contacted\": ,\n                \"underwriting_contact_date\": ,\n                \"builder_pending\": ,\n                \"deleted\": ,\n                \"credit_report_permissions\": ,\n                \"date_updated\": ,\n                \"last_visited\": ,\n                \"builder_ready_to_rate\": ,\n                \"review_workflow_state\": ,\n                \"signature_type\": ,\n                \"review_workflow_request_reason\": ,\n                \"underwriting_options\": ,\n                \"primary_property_id\": ,\n                \"written_premium_delta\": ,\n                \"cancellation_revision_id\": ,\n                \"previous_revision_state\": ,\n                \"overpayment\": ,\n                \"coverages\": [\n                    {\n                        \"revision_item_id\": ,\n                        \"revision_id\": ,\n                        \"sub_line_instance_id\": ,\n                        \"item_id\": ,\n                        \"apply_date\": ,\n                        \"limit\": ,\n                        \"limit_type\": ,\n                        \"limit2_type\": ,\n                        \"limit3_type\": ,\n                        \"limit2\": ,\n                        \"limit3\": ,\n                        \"deductible\": ,\n                        \"written_premium\": ,\n                        \"annual_premium\": ,\n                        \"written_fee\": ,\n                        \"annual_fee\": ,\n                        \"manual\": ,\n                        \"loss_exposure_group\": ,\n                        \"builder_obj\": ,\n                        \"link_obj\": ,\n                        \"rating_details\": ,\n                        \"date_added\": ,\n                        \"date_added_micro\": ,\n                        \"deleted\": ,\n                        \"date_deleted\": ,\n                        \"deleted_by\": ,\n                        \"prev_adj_amt\": ,\n                        \"persist_status\": ,\n                        \"resolved\": ,\n                        \"status_reason\": ,\n                        \"date_updated\": ,\n                        \"limit_updated\": ,\n                        \"previous_id\": ,\n                    }\n                ],\n                \"risks\": {\n                    \"vehicles\": [\n                        {\n                            \"id\",\n                            \"revision_id\": ,\n                            \"address_accuracy\": ,\n                            \"address_city\": ,\n                            \"address_county\": ,\n                            \"address_line_1\": ,\n                            \"address_line_2\": ,\n                            \"address_state\": ,\n                            \"address_country\": ,\n                            \"address_zip\": ,\n                            \"copy_address\": ,\n                            \"county_specify\": ,\n                            \"date_added\": ,\n                            \"date_added_micro\": ,\n                            \"deleted\": ,\n                            \"fire_district_distance\": ,\n                            \"flag\": ,\n                            \"gross_area\": ,\n                            \"hydrant_distance\": ,\n                            \"inspection_requested_date\": ,\n                            \"inspection_vendor\": ,\n                            \"latitude\": ,\n                            \"longitude\": ,\n                            \"loss_history_report_content\": ,\n                            \"loss_history_report_number\": ,\n                            \"name\": ,\n                            \"next_inspection_date\": ,\n                            \"property_val\": ,\n                            \"protection_class_id\": ,\n                            \"iso_pc_data\": ,\n                            \"verisk_passport_data\": ,\n                            \"prefill_services_data\": ,\n                            \"replace_contents\": ,\n                            \"replace_loss\": ,\n                            \"replace_other\": ,\n                            \"replacement_cost_value\": ,\n                            \"approved_limits\": ,\n                            \"stories\": ,\n                            \"type\": ,\n                            \"year_built\": ,\n                            \"annual_fee\": ,\n                            \"annual_premium\": ,\n                            \"written_fee\": ,\n                            \"written_premium\": ,\n                            \"date_updated\": ,\n                            \"risk_data\": ,\n                            \"builder_ready_to_rate\": ,\n                            \"property_group_id\": ,\n                            \"previous_id\": ,\n                            \"location_number\": ,\n                            \"vehicle_year\": ,\n                            \"vehicle_make\": ,\n                            \"vehicle_model\": ,\n                            \"vehicle_vin\": ,\n                            \"vehicle_body_type\": ,\n                            \"new_vehicle\": ,\n                            \"cost_new_vehicle\": ,\n                            \"performance\": ,\n                            \"date_vehicle_leased\": ,\n                            \"date_vehicle_purchased\": ,\n                            \"miles_to_work\": ,\n                            \"per_week_days_driven\": ,\n                            \"per_month_weeks_driven\": ,\n                            \"usage\": ,\n                            \"multi_car\": ,\n                            \"car_pool\": ,\n                            \"air_bags\": ,\n                            \"anti_lock_brakes\": ,\n                            \"anti_theft_device\": ,\n                            \"symbol_age_group\": ,\n                            \"symbol_collision\": ,\n                            \"symbol_comprehensive\": ,\n                            \"symbol_liability\": ,\n                            \"symbol_medical_payments\": ,\n                            \"territory\": ,\n                            \"horse_power\": ,\n                            \"vehicle_class\": ,\n                            \"vehicle_type\": ,\n                            \"owned_or_leased\": ,\n                            \"annual_mileage\": ,\n                            \"odometer_reading\": ,\n                            \"seat_belts\": ,\n                            \"seat_belt_type\": ,\n                            \"air_bag_type\": ,\n                            \"anti_theft_code\": ,\n                            \"anti_theft_device_type\": ,\n                            \"registered_state\": ,\n                            \"garage_code\": ,\n                            \"customized_equipment\": ,\n                            \"used_for_ride_share\": ,\n                            \"daytime_running_lights\": ,\n                            \"gross_vehicle_weight\": ,\n                            \"purchased_new\": ,\n                            \"acres\": ,\n                            \"legal_description\": ,\n                            \"plate_number\": ,\n                            \"coverages\": [\n                                {\n                                    \"id\": ,\n                                    \"property_id\": ,\n                                    \"sub_line_instance_id\": ,\n                                    \"item_id\": ,\n                                    \"apply_date\": ,\n                                    \"limit\": ,\n                                    \"limit_type\": ,\n                                    \"limit_3_type\": ,\n                                    \"limit_2_type\": ,\n                                    \"limit_2\": ,\n                                    \"limit_3\": ,\n                                    \"deductible\": ,\n                                    \"written_premium\": ,\n                                    \"annual_premium\": ,\n                                    \"written_fee\": ,\n                                    \"annual_fee\": ,\n                                    \"manual\": ,\n                                    \"loss_exposure_group\": ,\n                                    \"builder_obj\": ,\n                                    \"link_obj\": ,\n                                    \"rating_details\": ,\n                                    \"date_added\": ,\n                                    \"date_added_micro\": ,\n                                    \"deleted\": ,\n                                    \"date_deleted\": ,\n                                    \"deleted_by\": ,\n                                    \"prev_adj_amt\": ,\n                                    \"persist_status\": ,\n                                    \"resolved\": ,\n                                    \"status_reason\": ,\n                                    \"date_updated\": ,\n                                    \"limit_updated\": ,\n                                    \"previous_id\": ,\n                                }\n                            ],\n                            \"additional_interests\": [\n                                {\n                                    \"id\": ,\n                                    \"property_id\": ,\n                                    \"contact_id\": ,\n                                    \"mortgagee\": ,\n                                    \"inspector\": ,\n                                    \"description\": ,\n                                    \"loan_num\": ,\n                                    \"type\": ,\n                                    \"date_added\": ,\n                                    \"dec_mort_statement\": ,\n                                    \"date_updated\": ,\n                                    \"driver\": ,\n                                    \"tenant\": ,\n                                }\n                            ],\n                        }\n                    ],\n                    \"properties\": [\n                        ...\n                    ],\n                },\n                \"policy_term\": {\n                    \"id\": ,\n                    \"policy_id\": ,\n                    \"effective_date\": ,\n                    \"expiration_date\": ,\n                    \"is_renewal\": ,\n                    \"term_credit_score\": ,\n                    \"term_length\": ,\n                    \"term_type\": ,\n                    \"renewal_type\": ,\n                    \"renewal_status\": ,\n                    \"renewal_status_reason_id\": ,\n                    \"renewal_status_description\": ,\n                    \"manual_reason\": ,\n                    \"bill_sched_id\": ,\n                    \"auto_payment_method_id\": ,\n                    \"auto_pay_days_before\": ,\n                    \"first_bill_whom_id\": ,\n                    \"bill_whom_id\": ,\n                    \"first_address_used_id\": ,\n                    \"first_email_used_id\": ,\n                    \"address_used_id\": ,\n                    \"email_used_id\": ,\n                    \"first_bill_checked\": ,\n                    \"first_payment_method_id\": ,\n                    \"has_write_off\": ,\n                    \"generate_pre_pay_schedule\": ,\n                    \"force_comm_recalc\": ,\n                    \"date_updated\": ,\n                    \"policy_term_number\": ,\n                    \"override_min_amount_due\": ,\n                    \"preferred_day_of_month_due\": ,\n                    \"earned_formula\": ,\n                    \"billing\": {\n                        \"billing_schedule\": {\n                            \"id\": ,\n                            \"automatic_payment_reminder\": ,\n                            \"bill_to_add_int\": ,\n                            \"bill_to_agency\": ,\n                            \"bill_to_insured\": ,\n                            \"bill_to_mortgagee\": ,\n                            \"custom_term\": ,\n                            \"default_schedule\": ,\n                            \"initial_invoice\": ,\n                            \"initial_due\": ,\n                            \"life_cycle_id\": ,\n                            \"mid_term_due\": ,\n                            \"mid_term_invoice\": ,\n                            \"migrate_on_renewal\": ,\n                            \"min_amount_due\": ,\n                            \"name\": ,\n                            \"nine_months_term\": ,\n                            \"one_year_term\": ,\n                            \"order\": ,\n                            \"renewal_due\": ,\n                            \"renewal_invoice\": ,\n                            \"show_on_invoices\": ,\n                            \"show_in_public_gateway\": ,\n                            \"show_in_payment_sweep\": ,\n                            \"six_months_term\": ,\n                            \"three_months_term\": ,\n                            \"three_years_term\": ,\n                            \"eighteen_months_term\": ,\n                            \"trans_cancellation\": ,\n                            \"trans_mid_term_charges\": ,\n                            \"trans_new_business\": ,\n                            \"trans_reinstatement\": ,\n                            \"trans_renewal\": ,\n                            \"date_updated\": ,\n                            \"use_recurring_ach_installment_fee\": ,\n                            \"recurring_ach_installment_fee_amount\": ,\n                            \"use_recurring_credit_card_installment_fee\": ,\n                            \"recurring_credit_card_installment_fee_amount\": ,\n                            \"use_initial_ach_installment_fee\": ,\n                            \"initial_ach_installment_fee_amount\": ,\n                            \"use_initial_credit_card_installment_fee\": ,\n                            \"initial_credit_card_installment_fee_amount\":\n                        },\n                        \"return_premiums\": [\n                            {\n                                \"id\": ,\n                                \"account_history_id\": ,\n                                \"address_id\": ,\n                                \"payment_id\": ,\n                                \"policy_id\": ,\n                                \"amount\": ,\n                                \"date\": ,\n                                \"reason\": ,\n                                \"canceled\": ,\n                                \"exported\": ,\n                                \"transferred\": ,\n                                \"check_number\": ,\n                                \"product_description\": ,\n                                \"check_divert\": ,\n                                \"rejected\": ,\n                                \"voided\": ,\n                                \"account_history_transfer_id\": ,\n                                \"date_updated\": ,\n                                \"authorized\": ,\n                                \"date_authorized\": ,\n                                \"cleared_date\": ,\n                            },\n                        ],  # sorted by date, newest first\n                    },\n                },\n                \"contacts\": {\n                    \"agency\": {\n                        \"id\": ,\n                        \"accept_electronic_comm_statement\": ,\n                        \"active\": ,\n                        \"agency_inactive\": ,\n                        \"agency_inactive_timestamp\": ,\n                        \"agency_number\": ,\n                        \"agency_group_number\": ,\n                        \"background\": ,\n                        \"date_added\": ,\n                        \"commission_account_id\": ,\n                        \"comm_statement_email_id\": ,\n                        \"cc_email_notices\": ,\n                        \"commission_structure\": ,\n                        \"confirmation_email\": ,\n                        \"default_state_id\": ,\n                        \"direct_application_activity_to\": ,\n                        \"display_agency_group_info_on_dec\": ,\n                        \"dob\": ,\n                        \"drivers_license\": ,\n                        \"email_notices\": ,\n                        \"email_print_list\": ,\n                        \"fein_tax\": ,\n                        \"legal_entity_type\": ,\n                        \"date_business_started\": ,\n                        \"risk_id_number\": ,\n                        \"dba\": ,\n                        \"flag\": ,\n                        \"has_sweep_account\": ,\n                        \"issue_commission_payments\": ,\n                        \"issue_payments\": ,\n                        \"issue_payments_account_id\": ,\n                        \"mortgagee_statement\": ,\n                        \"naic_number\": ,\n                        \"vendor_number\": ,\n                        \"name\": ,\n                        \"notice_email_id\": ,\n                        \"claim_activity_email_id\": ,\n                        \"cc_claim_email_notices\": ,\n                        \"notify_of_overdue_invoices\": ,\n                        \"photo_id\": ,\n                        \"permission_level_id\": ,\n                        \"position\": ,\n                        \"website\": ,\n                        \"producer_number\": ,\n                        \"same_as_ssn\": ,\n                        \"ssn\": ,\n                        \"ssn_group\": ,\n                        \"sweep_account_id\": ,\n                        \"system_tags\": ,\n                        \"terminated\": ,\n                        \"termination_reason\": ,\n                        \"timezone\": ,\n                        \"type\": ,\n                        \"username\": ,\n                        \"disallow_e2_val\": ,\n                        \"is_god\": ,\n                        \"oops_email\": ,\n                        \"do_not_print_when_bill_whom\": ,\n                        \"agency_billing_enabled\": ,\n                        \"credit_score_account\": ,\n                        \"date_updated\": ,\n                        \"terms_conditions_accepted\": ,\n                        \"follow_agency_quoting_restriction\": ,\n                        \"purchase_date\": ,\n                        \"cognito_username\": ,\n                        \"default_agency_id\": ,\n                        \"added_by\": ,\n                        \"is_approved_vendor\": ,\n                        \"gender\": ,\n                        \"is_1099_reportable\": ,\n                        \"agency_inception_date\": ,\n                        \"agency_termination_date\": ,\n                        \"previous_address_id\": ,\n                        \"driver_license_date\": ,\n                        \"license_state\": ,\n                        \"phones\": [\n                            {\n                                \"id\": ,\n                                \"date_updated\": ,\n                                \"phone\": ,\n                                \"type\":\n                            }\n                        ],\n                        \"addresses\": [\n                            {\n                                \"id\": ,\n                                \"address_city\": ,\n                                \"address_county\": ,\n                                \"address_country\": ,\n                                \"address_line_1\": ,\n                                \"address_line_2\": ,\n                                \"address_state\": ,\n                                \"address_zip\": ,\n                                \"attention\": ,\n                                \"type\": ,\n                                \"type_label\": ,\n                                \"latitude\": ,\n                                \"longitude\": ,\n                                \"date_updated\": ,\n                                \"effective_start_date\": ,\n                                \"effective_end_date\":\n                            }\n                        ],\n                        \"emails\": [\n                            {\n                                \"id\": ,\n                                \"email\": ,\n                                \"type\": ,\n                                \"date_updated\":\n                            }\n                        ],\n                    }\n                        \"agent\": {\n                                        ...,\n                        \"phones\": [\n                            {\n                                            ...\n                            }\n                        ],\n                        \"addresses\": [\n                            {\n                                            ...\n                            }\n                        ],\n                        \"emails\": [\n                            {\n                                            ...\n                            }\n                        ],\n                    },\n                    \"named_insureds\": [\n                        {\n                                            ...,\n                            \"phones\": [\n                                {\n                                                    ...\n                                }\n                            ],\n                            \"addresses\": [\n                                {\n                                                    ...\n                                }\n                            ],\n                            \"emails\": [\n                                {\n                                                ...\n                                }\n                            ],\n                        }\n                    ],\n                    \"drivers\": [\n                        {\n                                            ...,\n                            \"violations\": [\n                                {\n                                    \"id\": ,\n                                    \"accident_violation_code\": ,\n                                    \"accident_violation_date\": ,\n                                    \"damage_total_amount\": ,\n                                    \"bodily_injury\": ,\n                                    \"is_fatality\": ,\n                                    \"violationtype\": ,\n                                    \"num_surcharge_points\": ,\n                                    \"accident_violation_description\": ,\n                                    \"accident_violation_location\": ,\n                                    \"conviction_date\": ,\n                                    \"property_damage\": ,\n                                    \"is_chargeable\": ,\n                                    \"excess_speed\": ,\n                                    \"speed_limit\": ,\n                                    \"actual_speed\": ,\n                                    \"responsible_percent\": ,\n                                    \"effective_date\": ,\n                                    \"expiration_date\": ,\n                                    \"is_manual\": ,\n                                    \"date_added\": ,\n                                    \"date_updated\": ,\n                                    \"created_by\": ,\n                                    \"updated_by\": ,\n                                    \"report_id\": ,\n                                    \"deleted\":\n                                }\n                            ],\n                            \"phones\": [\n                                {\n                                                    ...\n                                }\n                            ],\n                            \"addresses\": [\n                                {\n                                                    ...\n                                }\n                            ],\n                            \"emails\": [\n                                {\n                                                ...\n                                }\n                            ],\n                            \"driving_information\": {\n                                \"married\": ,\n                                \"marital_status\": ,\n                                \"education_level\": ,\n                                \"occupation\": ,\n                                \"good_student\": ,\n                                \"govt_employee\": ,\n                                \"current_employer\": ,\n                                \"years_with_current_employer\": ,\n                                \"driver_training\": ,\n                                \"driver_training_date\": ,\n                                \"driver_license_status\": ,\n                                \"years_at_current_address\": ,\n                                \"years_at_previous_address\": ,\n                                \"address_owned\": ,\n                                \"relation_to_applicant\": ,\n                                \"distant_student\": ,\n                            }\n                        }\n                    ],\n                    \"non_drivers\": [\n                        {\n                                            ...,\n                            \"phones\": [\n                                {\n                                                    ...\n                                }\n                            ],\n                            \"addresses\": [\n                                {\n                                                    ...\n                                }\n                            ],\n                            \"emails\": [\n                                {\n                                                ...\n                                }\n                            ],\n                            \"driving_information\": {...}\n                        }\n                    ],\n                    \"others\": [  // other risk additional interests that are not categorized above\n                        {\n                            ...\n                        }\n                    ]\n                },\n                \"policy\": {\n                    \"id\": ,\n                    \"policy_number\": ,\n                    \"policy_number_origin\": ,\n                    \"sequence_id\": ,\n                    \"policy_number_normalized\": ,\n                    \"active\": ,\n                    \"rewritten\": ,\n                    \"show_app\": ,\n                    \"date_added\": ,\n                    \"policy_group_id\": ,\n                    \"copied_from_rev_id\": ,\n                    \"copied_to_rev_id\": ,\n                    \"flag\": ,\n                    \"inception_date\": ,\n                    \"system_tags\": ,\n                    \"submit_bound\": ,\n                    \"unbound_option_id\": ,\n                    \"submit_receipt_email\": ,\n                    \"submit_receipt_name\": ,\n                    \"submit_confirm_email\": ,\n                    \"submit_confirm_name\": ,\n                    \"date_updated\": ,\n                    \"do_not_automatically_rewrite\": ,\n                    \"account_number\": ,\n                    \"in_progress_oos_transaction_id\": ,\n                    \"cancel_delay_date\":\n                },\n            },\n        },\n    ]\n\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "revision_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "property_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/export_policies": {
      "post": {
        "summary": "export_policies",
        "tags": [
          "policies"
        ],
        "description": "\n    Retrieve all data points specific to policies for the given revision ids.\n\n    Parameters\n    ----------\n    revision_ids : list of str, required\n        List of revision ids to generate data points for policies\n    property_ids : list of str, optional\n        List of property ids to filter results\n\n    Notes\n    -----\n    Every return premium of the policy is listed under\n    ``revision.policy_term.billing.return_premiums``, sorted from newest to\n    oldest, so ``return_premiums[0]`` is always the most recent return premium.\n    Return premium dates carry no time of day, so same-day return premiums are\n    ordered by when the underlying account history entry was raised.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    message : list of str\n        Human-readable messages.\n    data :\n        Contains the data points of the policy in the following format:\n    [\n        {\n            \"revision\": {\n                \"id\": ,\n                \"policy_id\": ,\n                \"policy_term_id\": ,\n                \"cancel_date\": ,\n                \"commission_rate\": ,\n                \"commission_rate_adjustment\": ,\n                \"commit_date\": ,\n                \"commit_date_time\": ,\n                \"create_date\": ,\n                \"date_archived\": ,\n                \"dec_description\": ,\n                \"description\": ,\n                \"written_fee\": ,\n                \"grant_mortgagee_extension\": ,\n                \"override_commission\": ,\n                \"policy_status\": ,\n                \"policy_status_reason_id\": ,\n                \"policy_type_id\": ,\n                \"written_premium\": ,\n                \"print_dec\": ,\n                \"reinstate_at_commit\": ,\n                \"revision_date\": ,\n                \"revision_state\": ,\n                \"annual_fee\": ,\n                \"annual_premium\": ,\n                \"underwriting_questions\": ,\n                \"underwriting_contacted\": ,\n                \"underwriting_contact_date\": ,\n                \"builder_pending\": ,\n                \"deleted\": ,\n                \"credit_report_permissions\": ,\n                \"date_updated\": ,\n                \"last_visited\": ,\n                \"builder_ready_to_rate\": ,\n                \"review_workflow_state\": ,\n                \"signature_type\": ,\n                \"review_workflow_request_reason\": ,\n                \"underwriting_options\": ,\n                \"primary_property_id\": ,\n                \"written_premium_delta\": ,\n                \"cancellation_revision_id\": ,\n                \"previous_revision_state\": ,\n                \"overpayment\": ,\n                \"coverages\": [\n                    {\n                        \"revision_item_id\": ,\n                        \"revision_id\": ,\n                        \"sub_line_instance_id\": ,\n                        \"item_id\": ,\n                        \"apply_date\": ,\n                        \"limit\": ,\n                        \"limit_type\": ,\n                        \"limit2_type\": ,\n                        \"limit3_type\": ,\n                        \"limit2\": ,\n                        \"limit3\": ,\n                        \"deductible\": ,\n                        \"written_premium\": ,\n                        \"annual_premium\": ,\n                        \"written_fee\": ,\n                        \"annual_fee\": ,\n                        \"manual\": ,\n                        \"loss_exposure_group\": ,\n                        \"builder_obj\": ,\n                        \"link_obj\": ,\n                        \"rating_details\": ,\n                        \"date_added\": ,\n                        \"date_added_micro\": ,\n                        \"deleted\": ,\n                        \"date_deleted\": ,\n                        \"deleted_by\": ,\n                        \"prev_adj_amt\": ,\n                        \"persist_status\": ,\n                        \"resolved\": ,\n                        \"status_reason\": ,\n                        \"date_updated\": ,\n                        \"limit_updated\": ,\n                        \"previous_id\": ,\n                    }\n                ],\n                \"risks\": {\n                    \"vehicles\": [\n                        {\n                            \"id\",\n                            \"revision_id\": ,\n                            \"address_accuracy\": ,\n                            \"address_city\": ,\n                            \"address_county\": ,\n                            \"address_line_1\": ,\n                            \"address_line_2\": ,\n                            \"address_state\": ,\n                            \"address_country\": ,\n                            \"address_zip\": ,\n                            \"copy_address\": ,\n                            \"county_specify\": ,\n                            \"date_added\": ,\n                            \"date_added_micro\": ,\n                            \"deleted\": ,\n                            \"fire_district_distance\": ,\n                            \"flag\": ,\n                            \"gross_area\": ,\n                            \"hydrant_distance\": ,\n                            \"inspection_requested_date\": ,\n                            \"inspection_vendor\": ,\n                            \"latitude\": ,\n                            \"longitude\": ,\n                            \"loss_history_report_content\": ,\n                            \"loss_history_report_number\": ,\n                            \"name\": ,\n                            \"next_inspection_date\": ,\n                            \"property_val\": ,\n                            \"protection_class_id\": ,\n                            \"iso_pc_data\": ,\n                            \"verisk_passport_data\": ,\n                            \"prefill_services_data\": ,\n                            \"replace_contents\": ,\n                            \"replace_loss\": ,\n                            \"replace_other\": ,\n                            \"replacement_cost_value\": ,\n                            \"approved_limits\": ,\n                            \"stories\": ,\n                            \"type\": ,\n                            \"year_built\": ,\n                            \"annual_fee\": ,\n                            \"annual_premium\": ,\n                            \"written_fee\": ,\n                            \"written_premium\": ,\n                            \"date_updated\": ,\n                            \"risk_data\": ,\n                            \"builder_ready_to_rate\": ,\n                            \"property_group_id\": ,\n                            \"previous_id\": ,\n                            \"location_number\": ,\n                            \"vehicle_year\": ,\n                            \"vehicle_make\": ,\n                            \"vehicle_model\": ,\n                            \"vehicle_vin\": ,\n                            \"vehicle_body_type\": ,\n                            \"new_vehicle\": ,\n                            \"cost_new_vehicle\": ,\n                            \"performance\": ,\n                            \"date_vehicle_leased\": ,\n                            \"date_vehicle_purchased\": ,\n                            \"miles_to_work\": ,\n                            \"per_week_days_driven\": ,\n                            \"per_month_weeks_driven\": ,\n                            \"usage\": ,\n                            \"multi_car\": ,\n                            \"car_pool\": ,\n                            \"air_bags\": ,\n                            \"anti_lock_brakes\": ,\n                            \"anti_theft_device\": ,\n                            \"symbol_age_group\": ,\n                            \"symbol_collision\": ,\n                            \"symbol_comprehensive\": ,\n                            \"symbol_liability\": ,\n                            \"symbol_medical_payments\": ,\n                            \"territory\": ,\n                            \"horse_power\": ,\n                            \"vehicle_class\": ,\n                            \"vehicle_type\": ,\n                            \"owned_or_leased\": ,\n                            \"annual_mileage\": ,\n                            \"odometer_reading\": ,\n                            \"seat_belts\": ,\n                            \"seat_belt_type\": ,\n                            \"air_bag_type\": ,\n                            \"anti_theft_code\": ,\n                            \"anti_theft_device_type\": ,\n                            \"registered_state\": ,\n                            \"garage_code\": ,\n                            \"customized_equipment\": ,\n                            \"used_for_ride_share\": ,\n                            \"daytime_running_lights\": ,\n                            \"gross_vehicle_weight\": ,\n                            \"purchased_new\": ,\n                            \"acres\": ,\n                            \"legal_description\": ,\n                            \"plate_number\": ,\n                            \"coverages\": [\n                                {\n                                    \"id\": ,\n                                    \"property_id\": ,\n                                    \"sub_line_instance_id\": ,\n                                    \"item_id\": ,\n                                    \"apply_date\": ,\n                                    \"limit\": ,\n                                    \"limit_type\": ,\n                                    \"limit_3_type\": ,\n                                    \"limit_2_type\": ,\n                                    \"limit_2\": ,\n                                    \"limit_3\": ,\n                                    \"deductible\": ,\n                                    \"written_premium\": ,\n                                    \"annual_premium\": ,\n                                    \"written_fee\": ,\n                                    \"annual_fee\": ,\n                                    \"manual\": ,\n                                    \"loss_exposure_group\": ,\n                                    \"builder_obj\": ,\n                                    \"link_obj\": ,\n                                    \"rating_details\": ,\n                                    \"date_added\": ,\n                                    \"date_added_micro\": ,\n                                    \"deleted\": ,\n                                    \"date_deleted\": ,\n                                    \"deleted_by\": ,\n                                    \"prev_adj_amt\": ,\n                                    \"persist_status\": ,\n                                    \"resolved\": ,\n                                    \"status_reason\": ,\n                                    \"date_updated\": ,\n                                    \"limit_updated\": ,\n                                    \"previous_id\": ,\n                                }\n                            ],\n                            \"additional_interests\": [\n                                {\n                                    \"id\": ,\n                                    \"property_id\": ,\n                                    \"contact_id\": ,\n                                    \"mortgagee\": ,\n                                    \"inspector\": ,\n                                    \"description\": ,\n                                    \"loan_num\": ,\n                                    \"type\": ,\n                                    \"date_added\": ,\n                                    \"dec_mort_statement\": ,\n                                    \"date_updated\": ,\n                                    \"driver\": ,\n                                    \"tenant\": ,\n                                }\n                            ],\n                        }\n                    ],\n                    \"properties\": [\n                        ...\n                    ],\n                },\n                \"policy_term\": {\n                    \"id\": ,\n                    \"policy_id\": ,\n                    \"effective_date\": ,\n                    \"expiration_date\": ,\n                    \"is_renewal\": ,\n                    \"term_credit_score\": ,\n                    \"term_length\": ,\n                    \"term_type\": ,\n                    \"renewal_type\": ,\n                    \"renewal_status\": ,\n                    \"renewal_status_reason_id\": ,\n                    \"renewal_status_description\": ,\n                    \"manual_reason\": ,\n                    \"bill_sched_id\": ,\n                    \"auto_payment_method_id\": ,\n                    \"auto_pay_days_before\": ,\n                    \"first_bill_whom_id\": ,\n                    \"bill_whom_id\": ,\n                    \"first_address_used_id\": ,\n                    \"first_email_used_id\": ,\n                    \"address_used_id\": ,\n                    \"email_used_id\": ,\n                    \"first_bill_checked\": ,\n                    \"first_payment_method_id\": ,\n                    \"has_write_off\": ,\n                    \"generate_pre_pay_schedule\": ,\n                    \"force_comm_recalc\": ,\n                    \"date_updated\": ,\n                    \"policy_term_number\": ,\n                    \"override_min_amount_due\": ,\n                    \"preferred_day_of_month_due\": ,\n                    \"earned_formula\": ,\n                    \"billing\": {\n                        \"billing_schedule\": {\n                            \"id\": ,\n                            \"automatic_payment_reminder\": ,\n                            \"bill_to_add_int\": ,\n                            \"bill_to_agency\": ,\n                            \"bill_to_insured\": ,\n                            \"bill_to_mortgagee\": ,\n                            \"custom_term\": ,\n                            \"default_schedule\": ,\n                            \"initial_invoice\": ,\n                            \"initial_due\": ,\n                            \"life_cycle_id\": ,\n                            \"mid_term_due\": ,\n                            \"mid_term_invoice\": ,\n                            \"migrate_on_renewal\": ,\n                            \"min_amount_due\": ,\n                            \"name\": ,\n                            \"nine_months_term\": ,\n                            \"one_year_term\": ,\n                            \"order\": ,\n                            \"renewal_due\": ,\n                            \"renewal_invoice\": ,\n                            \"show_on_invoices\": ,\n                            \"show_in_public_gateway\": ,\n                            \"show_in_payment_sweep\": ,\n                            \"six_months_term\": ,\n                            \"three_months_term\": ,\n                            \"three_years_term\": ,\n                            \"eighteen_months_term\": ,\n                            \"trans_cancellation\": ,\n                            \"trans_mid_term_charges\": ,\n                            \"trans_new_business\": ,\n                            \"trans_reinstatement\": ,\n                            \"trans_renewal\": ,\n                            \"date_updated\": ,\n                            \"use_recurring_ach_installment_fee\": ,\n                            \"recurring_ach_installment_fee_amount\": ,\n                            \"use_recurring_credit_card_installment_fee\": ,\n                            \"recurring_credit_card_installment_fee_amount\": ,\n                            \"use_initial_ach_installment_fee\": ,\n                            \"initial_ach_installment_fee_amount\": ,\n                            \"use_initial_credit_card_installment_fee\": ,\n                            \"initial_credit_card_installment_fee_amount\":\n                        },\n                        \"return_premiums\": [\n                            {\n                                \"id\": ,\n                                \"account_history_id\": ,\n                                \"address_id\": ,\n                                \"payment_id\": ,\n                                \"policy_id\": ,\n                                \"amount\": ,\n                                \"date\": ,\n                                \"reason\": ,\n                                \"canceled\": ,\n                                \"exported\": ,\n                                \"transferred\": ,\n                                \"check_number\": ,\n                                \"product_description\": ,\n                                \"check_divert\": ,\n                                \"rejected\": ,\n                                \"voided\": ,\n                                \"account_history_transfer_id\": ,\n                                \"date_updated\": ,\n                                \"authorized\": ,\n                                \"date_authorized\": ,\n                                \"cleared_date\": ,\n                            },\n                        ],  # sorted by date, newest first\n                    },\n                },\n                \"contacts\": {\n                    \"agency\": {\n                        \"id\": ,\n                        \"accept_electronic_comm_statement\": ,\n                        \"active\": ,\n                        \"agency_inactive\": ,\n                        \"agency_inactive_timestamp\": ,\n                        \"agency_number\": ,\n                        \"agency_group_number\": ,\n                        \"background\": ,\n                        \"date_added\": ,\n                        \"commission_account_id\": ,\n                        \"comm_statement_email_id\": ,\n                        \"cc_email_notices\": ,\n                        \"commission_structure\": ,\n                        \"confirmation_email\": ,\n                        \"default_state_id\": ,\n                        \"direct_application_activity_to\": ,\n                        \"display_agency_group_info_on_dec\": ,\n                        \"dob\": ,\n                        \"drivers_license\": ,\n                        \"email_notices\": ,\n                        \"email_print_list\": ,\n                        \"fein_tax\": ,\n                        \"legal_entity_type\": ,\n                        \"date_business_started\": ,\n                        \"risk_id_number\": ,\n                        \"dba\": ,\n                        \"flag\": ,\n                        \"has_sweep_account\": ,\n                        \"issue_commission_payments\": ,\n                        \"issue_payments\": ,\n                        \"issue_payments_account_id\": ,\n                        \"mortgagee_statement\": ,\n                        \"naic_number\": ,\n                        \"vendor_number\": ,\n                        \"name\": ,\n                        \"notice_email_id\": ,\n                        \"claim_activity_email_id\": ,\n                        \"cc_claim_email_notices\": ,\n                        \"notify_of_overdue_invoices\": ,\n                        \"photo_id\": ,\n                        \"permission_level_id\": ,\n                        \"position\": ,\n                        \"website\": ,\n                        \"producer_number\": ,\n                        \"same_as_ssn\": ,\n                        \"ssn\": ,\n                        \"ssn_group\": ,\n                        \"sweep_account_id\": ,\n                        \"system_tags\": ,\n                        \"terminated\": ,\n                        \"termination_reason\": ,\n                        \"timezone\": ,\n                        \"type\": ,\n                        \"username\": ,\n                        \"disallow_e2_val\": ,\n                        \"is_god\": ,\n                        \"oops_email\": ,\n                        \"do_not_print_when_bill_whom\": ,\n                        \"agency_billing_enabled\": ,\n                        \"credit_score_account\": ,\n                        \"date_updated\": ,\n                        \"terms_conditions_accepted\": ,\n                        \"follow_agency_quoting_restriction\": ,\n                        \"purchase_date\": ,\n                        \"cognito_username\": ,\n                        \"default_agency_id\": ,\n                        \"added_by\": ,\n                        \"is_approved_vendor\": ,\n                        \"gender\": ,\n                        \"is_1099_reportable\": ,\n                        \"agency_inception_date\": ,\n                        \"agency_termination_date\": ,\n                        \"previous_address_id\": ,\n                        \"driver_license_date\": ,\n                        \"license_state\": ,\n                        \"phones\": [\n                            {\n                                \"id\": ,\n                                \"date_updated\": ,\n                                \"phone\": ,\n                                \"type\":\n                            }\n                        ],\n                        \"addresses\": [\n                            {\n                                \"id\": ,\n                                \"address_city\": ,\n                                \"address_county\": ,\n                                \"address_country\": ,\n                                \"address_line_1\": ,\n                                \"address_line_2\": ,\n                                \"address_state\": ,\n                                \"address_zip\": ,\n                                \"attention\": ,\n                                \"type\": ,\n                                \"type_label\": ,\n                                \"latitude\": ,\n                                \"longitude\": ,\n                                \"date_updated\": ,\n                                \"effective_start_date\": ,\n                                \"effective_end_date\":\n                            }\n                        ],\n                        \"emails\": [\n                            {\n                                \"id\": ,\n                                \"email\": ,\n                                \"type\": ,\n                                \"date_updated\":\n                            }\n                        ],\n                    }\n                        \"agent\": {\n                                        ...,\n                        \"phones\": [\n                            {\n                                            ...\n                            }\n                        ],\n                        \"addresses\": [\n                            {\n                                            ...\n                            }\n                        ],\n                        \"emails\": [\n                            {\n                                            ...\n                            }\n                        ],\n                    },\n                    \"named_insureds\": [\n                        {\n                                            ...,\n                            \"phones\": [\n                                {\n                                                    ...\n                                }\n                            ],\n                            \"addresses\": [\n                                {\n                                                    ...\n                                }\n                            ],\n                            \"emails\": [\n                                {\n                                                ...\n                                }\n                            ],\n                        }\n                    ],\n                    \"drivers\": [\n                        {\n                                            ...,\n                            \"violations\": [\n                                {\n                                    \"id\": ,\n                                    \"accident_violation_code\": ,\n                                    \"accident_violation_date\": ,\n                                    \"damage_total_amount\": ,\n                                    \"bodily_injury\": ,\n                                    \"is_fatality\": ,\n                                    \"violationtype\": ,\n                                    \"num_surcharge_points\": ,\n                                    \"accident_violation_description\": ,\n                                    \"accident_violation_location\": ,\n                                    \"conviction_date\": ,\n                                    \"property_damage\": ,\n                                    \"is_chargeable\": ,\n                                    \"excess_speed\": ,\n                                    \"speed_limit\": ,\n                                    \"actual_speed\": ,\n                                    \"responsible_percent\": ,\n                                    \"effective_date\": ,\n                                    \"expiration_date\": ,\n                                    \"is_manual\": ,\n                                    \"date_added\": ,\n                                    \"date_updated\": ,\n                                    \"created_by\": ,\n                                    \"updated_by\": ,\n                                    \"report_id\": ,\n                                    \"deleted\":\n                                }\n                            ],\n                            \"phones\": [\n                                {\n                                                    ...\n                                }\n                            ],\n                            \"addresses\": [\n                                {\n                                                    ...\n                                }\n                            ],\n                            \"emails\": [\n                                {\n                                                ...\n                                }\n                            ],\n                            \"driving_information\": {\n                                \"married\": ,\n                                \"marital_status\": ,\n                                \"education_level\": ,\n                                \"occupation\": ,\n                                \"good_student\": ,\n                                \"govt_employee\": ,\n                                \"current_employer\": ,\n                                \"years_with_current_employer\": ,\n                                \"driver_training\": ,\n                                \"driver_training_date\": ,\n                                \"driver_license_status\": ,\n                                \"years_at_current_address\": ,\n                                \"years_at_previous_address\": ,\n                                \"address_owned\": ,\n                                \"relation_to_applicant\": ,\n                                \"distant_student\": ,\n                            }\n                        }\n                    ],\n                    \"non_drivers\": [\n                        {\n                                            ...,\n                            \"phones\": [\n                                {\n                                                    ...\n                                }\n                            ],\n                            \"addresses\": [\n                                {\n                                                    ...\n                                }\n                            ],\n                            \"emails\": [\n                                {\n                                                ...\n                                }\n                            ],\n                            \"driving_information\": {...}\n                        }\n                    ],\n                    \"others\": [  // other risk additional interests that are not categorized above\n                        {\n                            ...\n                        }\n                    ]\n                },\n                \"policy\": {\n                    \"id\": ,\n                    \"policy_number\": ,\n                    \"policy_number_origin\": ,\n                    \"sequence_id\": ,\n                    \"policy_number_normalized\": ,\n                    \"active\": ,\n                    \"rewritten\": ,\n                    \"show_app\": ,\n                    \"date_added\": ,\n                    \"policy_group_id\": ,\n                    \"copied_from_rev_id\": ,\n                    \"copied_to_rev_id\": ,\n                    \"flag\": ,\n                    \"inception_date\": ,\n                    \"system_tags\": ,\n                    \"submit_bound\": ,\n                    \"unbound_option_id\": ,\n                    \"submit_receipt_email\": ,\n                    \"submit_receipt_name\": ,\n                    \"submit_confirm_email\": ,\n                    \"submit_confirm_name\": ,\n                    \"date_updated\": ,\n                    \"do_not_automatically_rewrite\": ,\n                    \"account_number\": ,\n                    \"in_progress_oos_transaction_id\": ,\n                    \"cancel_delay_date\":\n                },\n            },\n        },\n    ]\n\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "revision_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "property_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/generate_quote_json_for_revision": {
      "post": {
        "summary": "generate_quote_json_for_revision",
        "tags": [
          "policies"
        ],
        "description": "Generate a complete ``create_quote_extended`` request body that would\n    recreate an existing revision -- the inverse of ``create_quote_extended``.\n\n    Accepts ``revisionId`` directly, or ``policyId`` (resolved to the policy's\n    current revision). Returns ``{\"quote_info\": {...}, \"revisionId\": ...,\n    \"policyId\": ...}`` where ``quote_info`` is the object-keyed shape CQX\n    accepts: policy type / line / effective date, named insureds, locations\n    (county resolved to its name), object-keyed ``items`` carrying the stored\n    categories + user inputs (as ``questions``), limits/deductibles and\n    scheduled-item rows, and the revision's ``underwriting_questions``.\n\n    Read-only. Powers the Schema Explorer's \"load a sample policy\" flow.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "policyId": {},
                  "revisionId": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/get_loss_disputes": {
      "post": {
        "summary": "get_loss_disputes",
        "tags": [
          "policies"
        ],
        "description": "Retrieve a loss dispute or a list of loss disputes\n    Parameters\n    ----------\n    property_id : UUID\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    message : list of str\n    Human-readable messages with error.\n    data: list of dict with loss_dispute data\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "property_id": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/get_policies": {
      "post": {
        "summary": "get_policies",
        "tags": [
          "policies"
        ],
        "description": "Retrieves paginated policies related to contact.\n\n    By default only bound policies are returned -- Active, plus cancellations subject to\n    ``include_canceled``. Non-bound policies (quotes and applications, whose revision never leaves\n    the ``open`` state) are excluded, which means a prior declined submission is not discoverable\n    from the contact. Pass ``policy_statuses`` to opt into them. See BC-23723.\n\n    An empty ``policies`` list therefore answers three different questions the same way, which is why\n    the envelope also reports ``contact_found``: it separates \"no such contact\" from \"this contact has\n    no matching records\", and ``policy_statuses`` separates \"no records at all\" from \"quotes only\"\n    (BC-24798).\n\n    Parameters\n    ----------\n    contact_id : str\n        Filter policies by contact_id\n    from_date : date\n        Filter policies where date_added > from_date\n    to_date : date\n        Filter policies where date_added < from_date\n    sorting_order : str\n        Ascending/descending order. Choices {'asc', 'desc'}\n    page_number : int\n        Page number,starting from 1\n    page_size : int\n        Page size, must be >0\n    include_policy_photo : bool\n        Include policies photo (entity size will be increased dramatically!)\n    include_canceled : bool\n        Include policies which have canceled if set to true.\n        Cannot be combined with ``policy_statuses``: the two overlap without being redundant\n        (``include_canceled`` is a ``Cancel*`` prefix match, ``policy_statuses`` an explicit list), so\n        supplying both is an error rather than one silently winning. List the cancellation statuses in\n        ``policy_statuses`` instead.\n    policy_statuses : list of str\n        Opt-in allowlist matched against the current revision's ``policy_status``. When supplied it\n        replaces the default Active/cancellation rule, and non-bound policies become reachable, e.g.\n        ``[\"Active\", \"Rejected\"]`` to see a contact's bound policies alongside prior declines.\n        Must be non-empty -- omit the parameter to use the default statuses.\n\n        Matched case- and trailing-space-insensitively, which is how MySQL compares it under the\n        table's ``utf8_general_ci`` collation, so ``[\"rejected\"]`` and ``[\"Rejected\"]`` behave alike.\n\n        Values are NOT validated against ``Revision.VALID_POLICY_STATUSES``: live data contains\n        statuses absent from that tuple (notably ``\"Quote\"``), so validating against it would\n        silently hide records. Unknown values simply match nothing.\n\n        To list a contact's quotes, name the statuses a quote actually carries. There is no single\n        one: ``repository/utils/quote.py:_get_quote_status`` stamps a newly created quote\n        ``\"Unsubmitted\"``, an application that has not been sent yet ``\"Unsubmitted\"`` as well, one that\n        has been submitted ``\"Submitted\"`` and a declined one ``\"Rejected\"``; a quote that is out for\n        electronic signature sits at ``\"Pending E-Signature\"`` while its revision stays ``open``; and\n        imported data also carries the non-enum ``\"Quote\"``.\n\n        The authoritative list is ``domain.constants.PRE_ISSUE_POLICY_STATUSES`` -- every status a\n        new-business revision can hold before it is issued -- which is\n        ``[\"Unsubmitted\", \"Quote\", \"Submitted\", \"Rejected\", \"Pending E-Signature\"]``. Pass that whole\n        set to list a contact's **new-business** quotes and applications; a quote that was just\n        created and rated is found by ``[\"Unsubmitted\"]`` alone. Do not hand-maintain a shorter copy\n        of it: omitting ``\"Pending E-Signature\"`` reproduces the very failure this endpoint was\n        reported for, because an insured whose only quote is awaiting signature comes back as an\n        empty list with ``contact_found: true``.\n        ``test_documented_non_bound_status_set_matches_the_domain_constant`` fails if the constant\n        grows a sixth status.\n\n        It is **not** \"everything not yet bound\", and the difference matters to a caller hunting for\n        drafts. Membership is decided on each policy's *current* revision, and the bound tier wins\n        outright: any non-deleted ``committed`` or ``pending`` revision outranks every ``open``\n        revision, including future-dated and ``NULL``-dated bound revisions. Archived revisions are\n        excluded by revision state; soft-deleted revisions are excluded by the ``Revision.deleted``\n        filter in ``repository/revision.py:list_candidate_revisions_for_policies``. While a usable\n        bound revision exists, an open endorsement or renewal draft cannot itself be surfaced through\n        a status allowlist -- the policy's current status is the bound one, so it is dropped after\n        selection, giving ``contact_found: true`` with an empty ``policies``.\n\n        If no usable bound revision remains and at least one non-deleted ``open`` revision remains,\n        the latest such open revision becomes current. It can be returned when its status is\n        requested, it still names the contact, and the ordinary request filters admit the policy.\n        Prior bound rows that are now archived or soft-deleted therefore do not themselves hide the\n        current draft. Such a result still uses the non-bound projection (``is_bound: false`` with\n        null accounting fields) even though the policy may have been billed previously -- so\n        \"nothing has been billed yet\" below describes the normal all-open/new-business shape, not an\n        invariant.\n\n        Nothing enforces a transaction type, so \"new-business\" describes the normal shape rather than\n        a restriction. Surfacing a non-current draft requires revision-level results, which is a\n        different feature. See ``service/contact_policy_projection.resolve_current_revisions``.\n\n        Archived policies stay hidden. ``[\"Canceled\"]`` does not resurface a policy an administrator\n        archived, even though archiving deliberately leaves its ``Canceled`` revision committed.\n\n        Records for non-bound policies carry ``is_bound: false`` and ``null`` for every\n        accounting-derived field (``current_due``, ``payoff_amount``, ``ar_details``,\n        ``billing_schedules``, ...) because nothing has been billed yet. Treat those nulls as\n        \"not applicable\", never as ``0.00``.\n\n        ``can_make_payment`` is the exception to that rule: it is ``false``, never ``null``, on a\n        non-bound record. It is a permission rather than a billed figure, and a quote or application\n        is not payable. See below.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The data response having the form:\n        ::\n            {\n                \"include_policy_photo\": true,\n                \"from_date\": null,\n                \"sorting_order\": \"asc\",\n                \"to_date\": null,\n                \"policy_statuses\": null,\n                \"policies\": [\n                  {}\n                ],\n                \"page_number\": 1,\n                \"page_size\": 50,\n                \"total_pages\": 1,\n                \"contact_id\": \"7487d974-dbb5-4f8a-ab45-2f93ef92eb49\",\n                \"contact_found\": true\n            }\n\n        Each record carries ``can_make_payment``: whether an electronic payment may be applied to\n        that policy right now. It is asked exactly as the payment endpoints ask it -- the same gate,\n        on the committed revision for the current term, with ``require_active_policy`` opted into\n        the same way -- so a consumer cannot show a payment path the charge would then refuse. That\n        pairing is the one that matters and the one to rely on.\n\n        ``retrieve_policy`` returns the same field name from the same gate, but do not expect the\n        two to agree. It evaluates whichever revision its caller selected -- ``revision_id`` if\n        given, else the most recent revision in ``revision_state`` (default 'committed') looked up\n        policy-wide, with no term constraint -- and it does not pass ``require_active_policy``. So\n        it can differ whenever that revision is not this one, which includes an older committed\n        revision, a non-committed state, a revision from another term, and an archived policy whose\n        billing revision still reads 'Active'. Those are different questions, not a disagreement to\n        reconcile. ``false`` covers every reason a payment is\n        not allowed -- an expired, rejected or archived policy, a canceled one past its payment\n        window, and a pending cancellation the policy type's life cycle disallows payments on,\n        including the \"Poor Payment History\" case where an underwriter has flagged the policy and the\n        Non-Pay life cycle disallows external payments for poor payors (BC-24420). It reports\n        payability only, not who is asking: BriteCore's own Accounts Receivable screen deliberately\n        accepts payments the insured-facing channels refuse.\n\n        ``contact_found`` is a primary-key lookup on ``contacts``, so an id that does not exist at all\n        reports ``false`` while a real contact with nothing to show reports ``true`` (BC-24798). An\n        unknown id is still ``success: true`` with an empty ``policies`` list rather than an error\n        envelope: ``briteapps-admin`` calls this endpoint directly on its own deploy cadence and treats a\n        non-success response as a portal-facing failure, so the distinction is reported additively.\n        The lookup applies no activity filter, so ``true`` means the row exists, not that the contact\n        is usable -- and that distinction is load-bearing, because **a contact IS soft-deleted by\n        being deactivated, not by a ``deleted`` column**. ``contacts`` has no ``deleted`` column at\n        all; ``contacts/views.py:removeContact`` archives a contact by setting ``active = False``\n        (\"Contact has been archived and no longer is returned by the policy search\"), and\n        ``contacts/utils.py:get_contact_emails_by_contact_id`` calls that same state\n        \"inactive (soft-deleted)\". Since ``Contact.get`` consults none of ``active``, ``terminated``\n        or ``agencyInactive``, **an archived contact still reports ``contact_found: true``**. Read the\n        field as \"this id exists in ``contacts``\" and nothing more; a consumer that needs\n        \"active contact\" semantics has to check ``active`` itself.\n        ``test_contact_found_is_existence_not_usability`` pins all three flags.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contact_id": {
                    "type": "string"
                  },
                  "from_date": {
                    "type": "string"
                  },
                  "to_date": {
                    "type": "string"
                  },
                  "sorting_order": {
                    "type": "string"
                  },
                  "page_number": {
                    "type": "integer"
                  },
                  "page_size": {
                    "type": "integer"
                  },
                  "include_policy_photo": {
                    "type": "boolean"
                  },
                  "include_canceled": {
                    "type": "boolean"
                  },
                  "policy_statuses": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/get_policy_groups": {
      "post": {
        "summary": "get_policy_groups",
        "tags": [
          "policies"
        ],
        "description": "\n    Retrieve all active policy groups.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/get_policy_number_history": {
      "post": {
        "summary": "get_policy_number_history",
        "tags": [
          "policies"
        ],
        "description": "Every policy holding the number, each flagged ``is_current``. Unranked.\n\n    See lib/api/api_specs/response-get_policy_number_history.json.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_policy_number_history"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_policy_number_history"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/get_policy_snapshot": {
      "post": {
        "summary": "get_policy_snapshot",
        "tags": [
          "policies"
        ],
        "description": "Return the structured policy snapshot for the Policy Copilot.\n\n    Projects the deterministic underwriting / lifecycle data the curated\n    policy-insight recipes and the summary operation consume: the latest\n    committed and any open revisions, STP execution results, subjectivities,\n    required signers, parties, risks, coverages, terms, external MVR data,\n    and document / note counts. No role-based redaction (consumed via API\n    key).\n\n    Parameters\n    ----------\n    params : dict\n        Request payload. Must contain ``policy_id`` (str).\n\n    Returns\n    -------\n    dict\n        ``{\"policy_id\": <str>, \"facts\": {<grouped sections>}}`` where the\n        grouped sections are ``revision``, ``underwriting``,\n        ``subjectivities``, ``signers``, ``parties``, ``risks``,\n        ``coverages``, ``rating``, ``terms``, ``external_data``,\n        ``documents``, and ``line_capabilities``. ``line_capabilities``\n        carries the policy-type / line identity, the integration point codes\n        connected to that policy type, ``stp_configured`` (STP rules enabled\n        for the line) and the site-wide ``default_review_workflow_enabled``\n        flag; ``external_data`` (MVR counts) is populated only when the\n        ``DRIVING_RECORDS_PREFILL`` integration is connected to the policy's\n        type, and is ``{}`` otherwise. ``underwriting.stp`` is ``{}`` when STP\n        is not configured for the line and no execution exists. State fields\n        carry a ``*_label`` sibling holding the reader-facing wording (the\n        carrier's configured review-state labels where set); the raw code stays\n        alongside it for consumers that match on it. ``rating`` carries the fee\n        total and the premium-plus-fee total beside the premium, plus the named\n        ``fees`` behind that total; they are populated only where the revision\n        charges a fee and null otherwise -- including on a rated policy with no\n        fees, where the premium is the amount due. ``coverages`` projects every\n        rated item, so ``type`` is what separates a coverage from a fee.\n\n    Raises\n    ------\n    NotFound\n        When no policy exists for ``policy_id``.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "params": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/get_revision_data_for_stp": {
      "post": {
        "summary": "get_revision_data_for_stp",
        "tags": [
          "policies"
        ],
        "description": "\n    Retrieve data for a specific revision, in STP format\n\n    Parameters\n    ----------\n    revision_id : str, required\n        The revision id to retrieve\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The data response containing policy information, contacts, policy term,\n        revision, and coverages as of the specified date\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "revision_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/get_underlying_policy_changes": {
      "post": {
        "summary": "get_underlying_policy_changes",
        "tags": [
          "policies"
        ],
        "description": "Check for underlying policy changes between revisions.\n    This takes the umbrella revision id, and compares the corresponding underlying revision and the previous one.\n\n    Parameters\n    ----------\n    revision_id : str\n        The UUID of the current umbrella revision\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable messages\n    data : UnderlyingChangeDetection\n        Object containing changes_detected flag and change details\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_underlying_policy_changes"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_underlying_policy_changes"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/get_underwriting_review_workflow": {
      "post": {
        "summary": "get_underwriting_review_workflow",
        "tags": [
          "policies"
        ],
        "description": "\n    Get the underwriting review workflow if it's enabled and and the user has the required permissions\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/import_iso_protection_classes": {
      "post": {
        "summary": "import_iso_protection_classes",
        "tags": [
          "policies"
        ],
        "description": "Import a ISO Protection Classes result.\n    Parameters\n    ----------\n    property_id : str\n        The UUID of the property to update\n    protection_class: str\n        The ISO Protection Class\n    fire_district: str\n        The ISO Fire District\n    effective_date: Optional[str]\n        The Effective Date\n    county_fips: Optional[str]\n        The County FIPS\n    county_name: Optional[str]\n        The County Name\n    bcegs_year: Optional[str]\n        The BCEGS (Building Code Effectiveness Grading Schedule) Year\n    bcegs_code: Optional[str]\n        The BCEGS (Building Code Effectiveness Grading Schedule) Code\n    bcegs_positive_hit: bool, default to False\n        The BCEGS (Building Code Effectiveness Grading Schedule) Positive Hit\n    distance_to_coast_range_code: Optional[int]\n        The Distance to Coast Range Code\n    distance_to_coast_range_name: Optional[str]\n        The Distance to Coast Range Name\n    distance_to_coast_fips: Optional[str]\n        The Distance to Coast Range Code\n    distance_to_coast_county_name: Optional[str]\n        The Distance to Coast County Name\n    distance_to_coast_ocean_gulf_name: Optional[str]\n        The Distance to Coast Ocean Gulf Name\n    retrieval_date: str\n        The date the ISO Protection Classes result was retrieved\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    message: str\n        Human-readable error message\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "property_id": {},
                  "protection_class": {},
                  "fire_district": {},
                  "effective_date": {},
                  "county_fips": {},
                  "county_name": {},
                  "bcegs_year": {},
                  "bcegs_code": {},
                  "bcegs_positive_hit": {},
                  "distance_to_coast_range_code": {},
                  "distance_to_coast_range_name": {},
                  "distance_to_coast_fips": {},
                  "distance_to_coast_county_name": {},
                  "distance_to_coast_ocean_gulf_name": {},
                  "retrieval_date": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/import_munichre_eligibility": {
      "post": {
        "summary": "import_munichre_eligibility",
        "tags": [
          "policies"
        ],
        "description": "Import a MunichRe Inland Flood Coverage Eligibility result.\n    Parameters\n    ----------\n    property_id : str\n        The UUID of the property to update\n    is_eligible : bool\n        Whether the property is eligible for MunichRe Inland Flood Coverage\n    score : str\n        The score returned by MunichRe Inland Flood Coverage Lookup\n    retrieval_date : str\n        The date the lookup was performed, in the format YYYY-MM-DD. Optional.\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    message: str\n        Human-readable error message\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "property_id": {},
                  "is_eligible": {},
                  "score": {},
                  "retrieval_date": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/initialize_application_questions": {
      "post": {
        "summary": "initialize_application_questions",
        "tags": [
          "policies"
        ],
        "description": "initialize_application_questions",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/initiate_property_valuation": {
      "post": {
        "summary": "initiate_property_valuation",
        "tags": [
          "policies"
        ],
        "description": "\n    Initiate a property valuation request. Returns a popup URL to the valuation service and optimal size.\n\n    The popup content can emit either events at any time through the `window.postMessage()` API:\n    - `postMessage(\"valuation-complete\", origin)` when the valuation is complete and new valuation is saved to the\n        property (through the API `/api/v2/policies/update_property_valuation`).\n    - `postMessage(\"valuation-cancelled\", origin)` when the user has cancelled the request. This is\n        equivalent to user closing the popup content without finishing it.\n\n    Parameters\n    ----------\n    property_id : str\n        The UUID of an existing Property. Cannot be on an archived revision.\n    integration_instance_id : str\n        The UUID of an installed Integration Instance supporting property valuation request.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable messages describing either error or success.\n    data : dict\n        ::\n        {\n            \"popup_url\": str,\n            \"optimal_width_px\": int,\n            \"optimal_height_px\": int\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "property_id": {
                    "type": "string"
                  },
                  "integration_instance_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/is_stp_enabled": {
      "post": {
        "summary": "is_stp_enabled",
        "tags": [
          "policies"
        ],
        "description": "Check if STP is enabled for a revision.\n\n    This is endpoint is used to check if STP is enabled for a revision.\n\n    Parameters\n    ----------\n    revision_id : str\n        The UUID of an existing Revision\n\n    Returns\n    -------\n    data : dict\n        The data response having the form:\n        ::\n            {\n                \"is_stp_enabled\": bool\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-is_stp_enabled"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-is_stp_enabled"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/issue": {
      "post": {
        "summary": "issue",
        "tags": [
          "policies"
        ],
        "description": "Issue a policy from the API.\n    Assumes a pending, uncommitted policy or quote by default unless an endorsement revision ID is given.\n\n    Parameters\n    ----------\n    issue_info : dict\n        A dict of the form:\n        ::\n            {\n                \"policy_id\": UUID,  # Optional if policy_number is present,\n                \"policy_number\": str,  # Optional, policy_id gets priority,\n                \"revision_id\": str,  # Optional, if specified, the commit the associated endorsement revision\n            }\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    message : list of str\n        Human-readable messages with error.\n    data : dict\n        A dict of the form:\n        ::\n            {\n                \"policy_number\": str,\n                \"policy_id\": UUID,\n                \"commission_rate\": float,\n                \"override_commission\": bool\n            }\n\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "issue_info": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/ivr_lookup": {
      "post": {
        "summary": "ivr_lookup",
        "tags": [
          "policies"
        ],
        "description": "Look up policies using consecutive numbers and zip code for IVR systems.\n\n    Parameters\n    ----------\n    digits : str, required\n        Policy number without letters and dashes, digits only\n    property_address_zip : str, optional\n        5-digit US zip code to narrow down results\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The data response having the form:\n        ::\n            {\n                \"policies\": [\n                    {\n                        \"policyNumber\": str,                 # Full formatted policy number\n                        \"policyId\": str,                     # UUID of the policy\n                        \"activeRevisionPolicyStatus\": str,   # ACTIVE, CANCELLED, or EXPIRED\n                    }\n                ],\n                \"totalFound\": int  # Total number of policies found\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "digits": {
                    "type": "string"
                  },
                  "property_address_zip": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/link_underlying_policy": {
      "post": {
        "summary": "link_underlying_policy",
        "tags": [
          "policies"
        ],
        "description": "Links an underlying policy to the current policy revision.\n\n    This function links an underlying policy to the current policy revision. This link is the initial step\n    in the process of synchronizing underlying policy changes to the current policy revision. It copies\n    the underlying policy data to the current policy revision's related_* tables and final ones.\n\n    Parameters\n    ----------\n    revision_id : str\n        The UUID of the target revision to link underlying policy to\n    underlying_policy_id : str\n        The UUID of the underlying policy to copy from\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict or None\n        Success confirmation data\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-link_underlying_policy"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-link_underlying_policy"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/list_policy_parties": {
      "post": {
        "summary": "list_policy_parties",
        "tags": [
          "policies"
        ],
        "description": "Contacts currently party to the given policies, one row per contact.\n\n    The strict counterpart to `retrieve_potential_policies_payors`: anchored on\n    each policy's latest committed revision (a contact removed from the current\n    revision is not listed), multi-role contacts keep every role, and each row\n    carries the contact's emails (primary first). Built for pickers that must\n    key on contact identity -- the BC-18405 payer dropdown is the first\n    consumer, and its server-side save-eligibility check uses the same service\n    method, so the options shown and the set enforced cannot diverge.\n\n    Parameters\n    ----------\n    params : dict\n        ``policy_ids`` : list of str, required\n            Policies to collect parties from (several = a policy group).\n        ``roles`` : list of str, optional\n            Restrict to these roles, from: ``named_insured``,\n            ``addtl_interest``, ``mortgagee``, ``agent``, ``finance_company``.\n            A contact is included when it holds at least one requested role;\n            its ``roles`` list is intersected with the request.\n\n    Returns\n    -------\n    dict\n        ``{\"parties\": [{\"contact_id\", \"name\", \"type\", \"roles\": [str],\n        \"policy_ids\": [str], \"emails\": [{\"email\", \"type\"}]}],\n        \"can_update_contact_email\": bool}``. A policy with no committed\n        revision contributes no parties. ``can_update_contact_email`` is\n        whether the CALLER holds the rule ``contacts.views.newContactEmail`` /\n        ``storeContactEmail`` enforce, so the dialog can hide its add-email\n        checkbox rather than offer a write that will be refused. Advisory\n        only -- those endpoints keep their own gates.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-list_policy_parties"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-list_policy_parties"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/new_mortgagee": {
      "post": {
        "summary": "new_mortgagee",
        "tags": [
          "policies"
        ],
        "description": "\n    Creates a new mortagee contact entry on the specified property.\n\n    Parameters\n    ----------\n    property_id : str\n        UUID of the property.\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not.\n    message : list[str]\n        Human-readable messages.\n    data : dict\n        UUID of the created contact entry on the property.\n        ::\n        {\n            \"x_properties_contact_id\": <New UUID>\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "property_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/new_policy_information": {
      "post": {
        "summary": "new_policy_information",
        "tags": [
          "policies"
        ],
        "description": "Retrieves information required to create a new policy.\n\n    Parameters\n    ----------\n\n    Returns\n    -------\n    success: bool\n        True if successful, false if not\n    messages: list of str\n        List of human-readable error messages\n    data: dict\n        The data response having the form:\n        ::\n\n            {\n                'next_policy_number': '{PREFIX}-YEAR-{INCREMENT}',\n                'effective_dates': [\n                    {\n                        'id': UUID,\n                        'description': str,\n                        'creation_date': 'YYY-MM-DD',\n                        'effective_date': 'YYYY-MM-DD',\n                        'change_history': [],\n                        'override_lock': bool\n                    }\n                ]\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/new_revision": {
      "post": {
        "summary": "new_revision",
        "tags": [
          "policies"
        ],
        "description": "Create a new revision on a policy\n\n    Parameters\n    ----------\n    policy_id : str, required\n        The UUID of an existing Policy\n    revision_date : str, required\n        The date of the new revision\n    override_effective_date_checks : bool\n        If true allow dates outside the policy term.\n        Defaults to false.\n    check_for_policy_changes\n        If true and there is any pending revision (policy status of 'Submitted' or 'Unsubmitted'),\n        then do not create the new revision.\n        Defaults to false.\n    force_persistent_builder\n        If true and there is a new effective date, then force the policy type from the new LED\n        regardless of whether or not there is a new policy term.\n        Defaults to false.\n    renewal_status : str\n        If the revision date is equal to the policy's term expiration date,\n        then set the renewal status to this value.\n        Defaults to existing term renewal status.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The data response having the form:\n        ::\n            {\n                revision_id: UUID\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "policy_id": {
                    "type": "string"
                  },
                  "revision_date": {
                    "type": "string"
                  },
                  "override_effective_date_checks": {
                    "type": "boolean"
                  },
                  "check_for_policy_changes": {
                    "type": "string"
                  },
                  "force_persistent_builder": {
                    "type": "string"
                  },
                  "renewal_status": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/new_revision_contact": {
      "post": {
        "summary": "new_revision_contact",
        "tags": [
          "policies"
        ],
        "description": "\n    Creates a new contact entry on the specified revision.\n\n    Parameters\n    ----------\n    revision_id : str\n        UUID of the revision.\n    role : str\n        One of \"namedInsured\", \"addtlInterest\", \"financeCompany\", \"underwriter\", or \"driver\".\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not.\n    message : list[str]\n        Human-readable messages.\n    data : dict\n        UUID of the created contact entry on the revision.\n        ::\n        {\n            \"x_revisions_contact_id\": <New UUID>\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "revision_id": {
                    "type": "string"
                  },
                  "role": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/post_external_policies": {
      "post": {
        "summary": "post_external_policies",
        "tags": [
          "policies"
        ],
        "description": "Inserts one or more external policy records.\n\n    Parameters\n    ----------\n    policies : list\n        The data input having the form:\n        ::\n        [\n            {\n              \"policy_number\": str,\n              \"policy_type_id\": UUID,\n              \"other_details\": {\"some: details\"}\n            },\n        ]\n\n    Note\n    ----\n    policyNumber is a required parameter. This method is intended to create new records only,\n    if the provided policyNumber already exists the insert action will be skipped.\n\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        inserted: List of policies that were successfully inserted\n        failed: List of policies that failed validation or were rejected by the db\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "policies": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/rate_quote_revision": {
      "post": {
        "summary": "rate_quote_revision",
        "tags": [
          "policies"
        ],
        "description": "rate_quote_revision",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/rate_revision": {
      "post": {
        "summary": "rate_revision",
        "tags": [
          "policies"
        ],
        "description": "Calculates a rate for the given revision.\n\n    Parameters\n    ----------\n    revision_id : str\n        uuid of the target revision\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The data response having the form:\n        ::\n\n            {\n                'annual_fee': Decimal,\n                'annual_premium': Decimal,\n                'written_fee': Decimal,\n                'written_premium': Decimal,\n                'items': []\n                'sub_lines': []\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "revision_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/rate_risk": {
      "post": {
        "summary": "rate_risk",
        "tags": [
          "policies"
        ],
        "description": "Calculates a rate for the given risk.\n\n    Parameters\n    ----------\n    risk_id : str\n        UUID of an existing Risk instance\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The data response having the form:\n        ::\n\n            {\n                'annual_fee': Decimal,\n                'annual_premium': Decimal,\n                'written_fee': Decimal,\n                'written_premium': Decimal,\n                'items': [],\n                'sub_lines': [],\n                'alert_messages': []   # List[str]\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "risk_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/reinstate_policy": {
      "post": {
        "summary": "reinstate_policy",
        "tags": [
          "policies"
        ],
        "description": "\n    API v2 endpoint for policy reinstatement.\n\n    Reinstates a policy to Active or Binder Active. ``ReinstatementService``\n    selects the path from the policy's current status:\n\n    - Cancellation Pending -> Active: a direct status change, no fee, and no new\n      revision, so ``revision_id`` is null in the response\n    - Cancelled -> Active: a new revision, with an optional fee\n\n    Nothing here is new behaviour. The service and its request/response domain\n    objects already existed, and so does a gateway entry point\n    (``policies/views.py:reinstatePolicy``). Only the api/v2 entry point was\n    missing, which left reinstatement unreachable to API callers.\n\n    EXPIRED POLICIES ARE DELIBERATELY OUT OF REACH HERE. The service takes\n    ``allow_expired``, and only the gateway's ``reinstateExpiredPolicy`` passes\n    True because that endpoint carries\n    ``@requires_permission('britecore/policies/reinstateExpired', 'rw')``. This\n    endpoint has no such permission, so passing True would make that permission\n    bypassable through api/v2. The default is left alone and the service rejects\n    an expired revision.\n\n    Parameters\n    ----------\n    request_params : dict\n        ``policy_id`` is required. Optional: ``policy_term_id``, ``revision_id``,\n        ``reinstatement_date``, ``reinstate_reason``, ``assess_fee``,\n        ``custom_reinstatement_fee``, ``lapse``, ``create_notice_deliverable``,\n        ``push_invoice_dates``, ``propagate``, ``date_cursor``.\n\n        ``lapse`` without ``reinstatement_date`` is refused HERE rather than by\n        the schema. A lapse is \"reinstate on a date AFTER the cancel date\", so\n        with no date there is no gap to book and the request silently becomes an\n        ordinary reinstatement -- the caller believes they created a gap in\n        coverage and did not. The shared schema is left alone deliberately:\n        ``lib/domain/policy_reinstatement.py`` is also the gateway's and the\n        billing engine's, and tightening it would change their behaviour as a\n        side effect of adding this endpoint.\n\n    Returns\n    -------\n    data : dict\n        ``policy_id``, ``revision_id``, ``policy_term_id``,\n        ``reinstatement_date``, ``previous_status``, ``policy_status``.\n\n    Raises\n    ------\n    BCServiceError\n        If validation or business rules are violated\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-reinstate_policy"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-reinstate_policy"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/remove_line_item": {
      "post": {
        "summary": "remove_line_item",
        "tags": [
          "policies"
        ],
        "description": "Remove a line item from an uncommitted revision.\n\n    Parameters\n    ----------\n    item_id : UUID, required\n        PropertyItem or RevisionItem unique identifier (primary key)\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        An empty dict\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "item_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/requote_extended": {
      "post": {
        "summary": "requote_extended",
        "tags": [
          "policies"
        ],
        "description": "Delete a previous quote and create a new quote.\n\n    Parameters\n    ----------\n    run_uw_rules : boolean:\n        A boolean indicating whether the uw rules should be called.\n    quote_info : dict:\n        A dict having the form:\n        ::\n            {\n                \"policy_number\": \"policy number\",\n                \"new_policy_number\": \"optional manual policy number for the new quote\",\n                \"inception_date\": \"MM/DD/YYYY\" (optional),\n                \"effective_date\": \"MM/DD/YYYY\",\n                \"line_name\": \"line name\",\n                \"policy_type_name\": \"policy type name\",\n                \"underwriting_options\": [{\n                    \"answer\": \"answer\",\n                    \"optionId\": \"option id\"\n                }],\n                \"underwriting_questions\": [{\n                    // Either questionId or questionText is required.\n                    \"questionId\": \"question id\",  // UUID; precise but changes per\n                                                  // policy-type effective date.\n                    \"questionText\": \"text fragment\",  // case-insensitive contains\n                                                      // match on the question's\n                                                      // yes_no_question text,\n                                                      // scoped to this policy\n                                                      // type's effective version.\n                                                      // Must match exactly one.\n                    \"yesNoAnswer\": \"no\",\n                    \"explanation\": \"explanation\"\n                }],\n                \"named_insureds\": [{\n                    \"name\": \"name\",\n                    \"type\": \"organization\",\n                    \"fein_tax\": \"1234567\",\n                    \"ssn\": \"001112222\",\n                    \"date_business_started\": \"MM/DD/YYYY\", // optional\n                    \"website\": \"www.test.com\",\n                    \"legal_entity_type\": \"legal entity type\", // optional\n                    \"phones\": [{ // optional\n                        \"number\": \"1234567890\",\n                        \"type\": \"work\"\n                    }],\n                    \"emails\": [{ // optional\n                        \"email\": \"test@example.com\",\n                        \"type\": \"work\"\n                    }],\n                    \"addresses\": [\n                        {\n                            \"address_line1\": \"address line 1\",\n                            \"address_line2\": \"\",\n                            \"address_city\": \"city\",\n                            \"address_state\": \"NY\",\n                            \"address_county\": \"county\",\n                            \"address_country\": \"USA\",\n                            \"address_zip\": \"12208\",\n                            \"type\": \"Mailing\"\n                        }\n                    ]\n                }],\n                \"agency_id\": \"uuid\",\n                \"agent_id\": \"uuid\",\n                \"locations\": [{\n                    \"address_county_specify\": \"\",\n                    \"address_line1\": \"address line 1\",\n                    \"address_line2\": \"\",\n                    \"address_city\": \"city\",\n                    \"address_state\": \"NY\",\n                    \"address_county\": \"county\",\n                    \"address_country\": \"USA\",\n                    \"address_zip\": \"12208\"\n                }],\n                \"items\": [{\n                    \"name\": \"name\",\n                    \"questions\": {\n                        \"question 1\": \"answer 1\",\n                        \"question 2\": \"answer 2\",\n                    },\n                    \"identifier\": \"question 1\" // optional\n                }],\n                \"activated\": false\n            }\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    message : list of str\n        Human-readable messages with error.\n    data : dict\n        Description of response dictionary here.\n\n        {\n            \"quote_number\": \"quote number\",\n            \"items\": [{\n                \"annual_amount\": 0.0,\n                \"name\": \"item name\",\n                \"pro_rata_amount\": 0.0,\n                \"identifier\": \"identifier if the optional parameter is given\"\n            }],\n            \"total\": {\n                \"annual_fees\": 0.0,\n                \"pro_rata_premium\": 0.0,\n                \"annual_total\": 0.0,\n                \"pro_rata_total\": 0.0,\n                \"annual_premium\": 0.0,\n                \"pro_rata_fees\": 0.0\n            },\n            \"forms\": [{\n                \"edition_number\": \"edition number\",\n                \"description\": \"form description\",\n                \"form_code\": \"form code\"\n            }],\n            \"policy_id\": \"policy id\"\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "run_uw_rules": {
                    "type": "string"
                  },
                  "quote_info": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/reset_revision_premium": {
      "post": {
        "summary": "reset_revision_premium",
        "tags": [
          "policies"
        ],
        "description": "Clears the calculated premium for the given revision\n\n    Parameters\n    ----------\n    revision_id : UUID, required\n        The UUID of an existing Revision\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The data response, currently empty\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "revision_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/reset_risk_premium": {
      "post": {
        "summary": "reset_risk_premium",
        "tags": [
          "policies"
        ],
        "description": "Clears the calculated premium for the given risk\n\n    Parameters\n    ----------\n    risk_id : UUID, required\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The data response, currently empty\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "risk_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/resolve_property_geolocation": {
      "post": {
        "summary": "resolve_property_geolocation",
        "tags": [
          "policies"
        ],
        "description": "Resolve a property's address to a point through a provider, and persist it.\n\n    Four phases, and the split is the whole design:\n\n    1. **Preflight** -- one snapshot, authorization, and the provider connection\n       resolved to exactly one connection RECORD -- records, not instances,\n       because ``_call`` issues one HTTP request per record, so two records\n       on one instance would bill the vendor twice. Everything needing the\n       database.\n    2. **The billable call** -- no SQL of its own, and no integration-connection\n       lookup, because the point arrives already resolved to its connection. Note\n       what that does NOT claim: the request's own transaction is still open across\n       the HTTP call and its pooled connection stays checked out, exactly as it does\n       for every other integration point in the product. Falls through to the\n       geocoder when no provider is connected, when the address's country is one the\n       contract cannot express, when the provider fails, or when its response does\n       not conform (INT-9944).\n    3. **A short mutation** -- ``PropertyLocationService`` locks the row, verifies\n       every writable column and the address fingerprint, writes, and commits. No\n       vendor call happens under that lock; the inland flood refresh is deferred\n       into phase 4.\n    4. **Derived work**, with the property lock released -- the deferred inland\n       flood refresh, then flood zone, census block group, waterway, MunichRe\n       twice, AIR, and the search index.\n\n    Parameters\n    ----------\n    location : dict\n        Same shape ``update_property_location`` accepts. ``id`` selects the\n        property; the address keys describe the address to resolve and write.\n    context_identifier : str\n        Reported to integration logging. Usually the policy number.\n\n    Returns\n    -------\n    dict\n        The property, plus ``resolution_committed`` and ``derived_complete``.\n        ``@api_request`` wraps it in the standard ``{success, data}`` envelope;\n        this function returns the payload itself, which is the convention for\n        every decorated endpoint in this module.\n\n    Failure classes, which are deliberately different on either side of the\n    commit:\n\n    * **Pre-commit** -- no such property, a non-editable revision, more than one\n      connected provider, a snapshot that moved under the lock, or a fingerprint\n      mismatch. Nothing is written, and the ``BCValidationError`` propagates to\n      ``@api_request``, which renders ``{success: false, messages: {...}}``.\n    * **Post-commit** -- the resolution landed but the derived payload failed.\n      Returns ``resolution_committed: true, derived_complete: false`` with the\n      address, point and counties, because the resolution itself is not in doubt\n      and the caller must not be told the write failed.\n\n    Notes\n    -----\n    No ``suggestion_accuracy`` or ``suggestion_address_fingerprint`` parameter, on\n    purpose. ``address_accuracy`` is written server-side from the provider's\n    required ``accuracy`` on every path -- a suggestion's posted ``'great'`` never\n    survives today anyway, since the geoservice block overwrites it on every\n    complete-address save, so provider-wins is the behaviour-preserving option.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-resolve_property_geolocation"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-resolve_property_geolocation"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/retrieve_account_history": {
      "post": {
        "summary": "retrieve_account_history",
        "tags": [
          "policies"
        ],
        "description": " Retrieves account payment history details for a given policy_id and policy_term_id,\n        optionally taking in filter paramaters.\n\n    Parameters\n    ----------\n    policy_id : str\n        The UUID of an existing policy. Either this parameter or policy_term_id must be\n        provided. If only a policy_id is provided, the currently active term (inferred\n        based on today's date) will be used. If a policy_term_id is provided, a policy_id\n        can be provided but is never needed because a term associates with only one policy.\n    policy_term_id : str\n        The UUID of an existing policy term. Either this parameter or policy_id must be\n        provided. If only a policy_id is provided, the currently active term (inferred\n        based on today's date) will be used. If a policy_term_id is provided, a policy_id\n        can be provided but is never needed because a term associates with only one policy.\n    filter_dict : dict\n        Optional. A dictionary passed to the underlying function core.db.filter_by_date()\n        containing date parts to filter by; keys in the form '(from|to)(Day|Month|Year)'.\n        Example: 'fromDay'.\n    current_page : int\n        Default is 1. An integer of representing the set to view if results are paginated.\n    page_size : int\n        Default is 50. An integer representing the number of results to show per page.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The data response having the form:\n        ::\n            {\n                \"activePage\": int,\n                \"maxPages\": int,\n                \"records\": [\n                      {\n                        \"fileKey\": uuid,\n                        \"amount\": float,\n                        \"icon\": str,\n                        \"date\": date,\n                        \"data\": {\n                              \"amount\": float,\n                              \"schedule\": {\n                                    \"Premium\": float,\n                                    \"Installment Fee\": float,\n                                    \"Custom Fees\": float\n                              },\n                              \"details\": {\n                                    \"showDelete\": bool,\n                                    \"cancelDate\": date,\n                                    \"paidInFull\": bool,\n                                    \"billDate\": date,\n                                    \"description\": str,\n                                    \"generatedBy\": str,\n                                    \"policyStatus\": str,\n                                    \"showEditAndReprint\": bool,\n                                    \"dirty\": bool,\n                                    \"showWaive\": bool,\n                                    \"dueDate\": date,\n                                    \"invoiceReportDueDate\": date\n                              }\n                        },\n                        \"balance\": float,\n                        \"type\": str,\n                        \"id\": uuid,\n                        \"summary\": str\n                      }\n                  ]\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "policy_id": {
                    "type": "string"
                  },
                  "policy_term_id": {
                    "type": "string"
                  },
                  "filter_dict": {
                    "type": "object"
                  },
                  "current_page": {
                    "type": "integer"
                  },
                  "page_size": {
                    "type": "integer"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/retrieve_billing_schedule_options": {
      "post": {
        "summary": "retrieve_billing_schedule_options",
        "tags": [
          "policies"
        ],
        "description": "Retrieves the list of billing schedules associated to a given policy through its policy\n    life cycle.\n\n    Parameters\n    ----------\n    policy_number : str\n        Policy number of the target policy\n    policy_term_id : str\n        The UUID of an existing policy term. Either this parameter or policy_number must be\n        provided. If only a policy_number is provided, the currently active term (inferred\n        based on today's date) will be used. If a policy_term_id is provided, a policy_number\n        can be provided but is never needed because a term associates with only one policy.\n    ignore_billing_schedule_roles : bool\n        If True, all billing schedules will be returned regardless of bill to whom settings\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : list of dict\n        A list containing information on the related billing schedules\n        ::\n            {\n                \"installments\": [{    # preview of billing schedule installments\n                    \"amountDue\": decimal,\n                    \"billDate\": str,\n                    \"dueDate\": str,\n                    \"details\": [\n                        {\n                            \"amount\": decimal,\n                            \"type\": \"Premium\"\n                        },\n                        {\n                            \"amount\": decimal,\n                            \"type\": \"Premium Fully Earned\"\n                        },\n                        {\n                            \"amount\": decimal,\n                            \"type\": \"Premium Fully Billed\"\n                        },\n                        {\n                            \"amount\": decimal,\n                            \"type\": \"Custom Fee Fully Earned\"\n                        },\n                        {\n                            \"amount\": decimal,\n                            \"type\": \"Custom Fee Fully Billed\"\n                        },\n                        {\n                            \"amount\": decimal,\n                            \"type\": \"Custom Fee Prorata\"\n                        },\n                        {\n                            \"amount\": decimal,\n                            \"type\": \"Installment Fee\"\n                        }\n                    ]\n                }],\n                \"id\": str,          # UUID of the billing schedule\n                \"label\": str        # name of the billing schedule\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "policy_number": {
                    "type": "string"
                  },
                  "policy_term_id": {
                    "type": "string"
                  },
                  "ignore_billing_schedule_roles": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/retrieve_cancellation_info": {
      "post": {
        "summary": "retrieve_cancellation_info",
        "tags": [
          "policies"
        ],
        "description": "\n    Retrieve Cancellation Info based on a Revision ID.\n    Parameters\n    ----------\n    revision_id : UUID, required\n        UUID of an existing revision\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    data : dict\n        Contains cancellation info\n    message : str\n        Human-readable messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "revision_id": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/retrieve_current_and_future_policies_terms_with_recurring_payment_method_id": {
      "post": {
        "summary": "retrieve_current_and_future_policies_terms_with_recurring_payment_method_id",
        "tags": [
          "policies"
        ],
        "description": "\n    Returns the list of current and future active policies terms that have the recurring payment method id\n    passed in the parameters\n    Parameters\n    ----------\n    json_dict: dict\n        The json_dict dict have the format\n        {\n            'payment_method_id': UUID\n        }\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    message : str\n        Human-readable messages.\n    data : dict\n        list of policies terms with the payment method id\n        ::\n        {\n            'policyTermId': <id of the policy term>,\n            'policyNumber': <policy number>,\n            \"expirationDate\": <expiration date of policy term>,\n            \"effectiveDate\": <effective date of policy term>\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "payment_method_id": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/retrieve_files_pending_signature": {
      "post": {
        "summary": "retrieve_files_pending_signature",
        "tags": [
          "policies"
        ],
        "description": "Retrieve files that should be signed.\n\n    Retrieves all signable custom deliverables pending signature\n    for given policy.\n\n    Parameters\n    ----------\n    policy_id : str, required\n        UUID of an existing Policy instance\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    message : str\n        Human-readable messages with error.\n    json_object : dict\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "policy_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/retrieve_ivans_billing_data": {
      "post": {
        "summary": "retrieve_ivans_billing_data",
        "tags": [
          "policies"
        ],
        "description": "\n    Retrieve IVANS billing data for new gen policies XML generation.\n\n    Parameters\n    ----------\n    revision_id : str\n        The revision id.\n\n    Returns\n    -------\n    data : dict\n        The data response having the form:\n        ::\n            {\n                'premium_delta': '0.00',\n                'billing_schedule': 'annual',\n                'bill_whom_type': 'Named Insured',\n                'total_premium': '0.00',\n                'invoice_type': 'Invoice Type',\n                'return_premium': '0.00',\n                'premium_paid': '0.00',\n                'bill_whom_name': 'Insured Name',\n                'account_balance': '0.00',\n                'premium_invoiced': '0.00',\n                'fees_invoiced': '0.00',\n                'fees_paid': '0.00',\n                'premium_with_fees_invoiced': '0.00'\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "revision_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/retrieve_pnc_lockbox_matchfile_info": {
      "post": {
        "summary": "retrieve_pnc_lockbox_matchfile_info",
        "tags": [
          "policies"
        ],
        "description": "Retrieves the required data to generate PNC's lockbox matchfile\n\n    Returns\n    -------\n    success : bool\n    messages : list of strings\n        List of human readable error messages filled only when success != True.\n    data : list of dict\n        A list of dicts, in the following format:\n        ::\n            {\n                # The policy number, target of the respective payment.\n                \"policy_number\": str,\n\n                # The amount due for the given policy, in pennies.\n                \"current_due_amount\": int,\n\n                # The minimum acceptable payment amount for the given policy, in pennies.\n                \"minimum_acceptable_amount\": int,\n\n                # A flag to inform PNC whether to reject the given payment without questioning.\n                \"always_reject_flag\": bool,\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/retrieve_policy": {
      "post": {
        "summary": "retrieve_policy",
        "tags": [
          "policies"
        ],
        "description": "Retrieves top-level information about a policy\n\n    Parameters\n    ----------\n    policy_id : str\n        The UUID of the existing Policy\n    policy_number : str\n        The policy number of the existing Policy\n    revision_state : str\n        Given the revision state, it returns active_revision with a matching state\n    revision_id : uuid the revision to retrieve\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The data response having the form:\n        ::\n\n            {\n                'id': 'UUID',\n                'policy_number': '2015-01-01',\n                'previous_policy_numbers': [],\n                'active': boolean,\n                'rewritten': boolean,\n                'date_added': 'MM/DD/YYYY',\n                'show_app': boolean,\n                'policy_group_id': 'UUID',\n                'copied_from_rev_id': 'UUID',\n                'copied_to_rev_id': 'UUID',\n                'flag': 'white/orange/black',\n                'inception_date': 'MM/DD/YYYY',\n                'system_tags': [\n                    {'id': 'UUID',\n                     'name': 'System Tag Name',\n                     'value': 'System Tag Value'},\n                ],\n                'submit_bound': boolean,\n                'submit_receipt_email': 'email',\n                'submit_receipt_name': 'name',\n                'submit_confirm_email': 'email',\n                'submit_confirm_name': 'name',\n                'active_revision': {},\n                'active_policy_term': {},\n                'britecore_claims': [],\n                'policy_contacts' : {}\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "policy_id": {
                    "type": "string"
                  },
                  "policy_number": {
                    "type": "string"
                  },
                  "revision_state": {
                    "type": "string"
                  },
                  "revision_id": {
                    "type": "string"
                  },
                  "Returns": {
                    "type": "string"
                  },
                  "-------": {
                    "type": "string"
                  },
                  "success": {
                    "type": "boolean"
                  },
                  "messages": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "data": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/retrieve_policy_change_logs": {
      "post": {
        "summary": "retrieve_policy_change_logs",
        "tags": [
          "policies"
        ],
        "description": "\n    Retrieve Policy Change Log entries.\n\n    Parameters\n    ----------\n    filter_by : str, required\n        The date field to filter by. One of the following:\n            'date_stamp' - The date the change was made (in CST timezone).\n            Supports time-based filtering if 'allow_timestamp' is set to True.\n            'date_cursor' - The calculated date in effect upon revision commit.\n            Does not support time-based filtering.\n            'revision_commit_date_time' - The date and time when the revision was committed.\n            Supports time-based filtering if 'allow_timestamp' is set to True.\n    from_date : str, required\n        The start date of the search.\n        If allow_timestamp is True, includes the start time (format YYYY-mm-dd or YYYY-mm-dd HH:MM:SS)\n    to_date : str, required\n        The end date of the search.\n        If allow_timestamp is True, includes the end time (format YYYY-mm-dd or YYYY-mm-dd HH:MM:SS)\n    allow_timestamp : bool, optional\n        If True and 'filter_by' is set to 'date_stamp' or 'revision_commit_date_time',\n        the 'from_date' and 'to_date' arguments will be treated as datetime with format 'YYYY-mm-dd HH:MM:SS'.\n        If False or not provided, or if 'filter_by' is 'date_cursor', the 'from_date' and 'to_date'\n        arguments will be treated as date with format 'YYYY-mm-dd'.\n    transactions : list of str, optional\n        Limit the search to the specified transactions\n    policy_type_ids : list of str, optional\n        Limit the search to the specified policy types\n    revision_ids : list of str, optional\n        Limit the search to the specified revisions\n    policy_ids : list of str, optional\n        Limit the search to the specified policies\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    data : dict\n        Contains policy change log info as well as revision timestamps\n        ::\n            {\n                \"policy_change_logs\": [\n                    {\n                        \"id\": str,\n                        \"date_stamp\": str,\n                        \"date_cursor\": str,\n                        \"policy_id\": str,\n                        \"property_id\": str,\n                        \"revision_id\": str,\n                        \"policy_term_id\": str,\n                        \"contact_id\": str,\n                        \"transaction\": str,\n                        \"revision_create_date\": str,\n                        \"revision_revision_date\": str,\n                        \"revision_commit_date_time\": str\n                    }\n                ]\n            }\n    message : str\n        Human-readable messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-retrieve_policy_change_logs"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-retrieve_policy_change_logs"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/retrieve_policy_snapshot": {
      "post": {
        "summary": "retrieve_policy_snapshot",
        "tags": [
          "policies"
        ],
        "description": "Retrieves a snapshot of a policy's state as of a specific date.\n\n    Parameters\n    ----------\n    policy_number : str, required\n        The policy number to retrieve\n    snapshot_date : str, required\n        The date for which to retrieve the policy snapshot (YYYY-MM-DD)\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The data response containing policy information, contacts, policy term,\n        revision, and coverages as of the specified date\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-retrieve_policy_snapshot"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-retrieve_policy_snapshot"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/retrieve_policy_terms": {
      "post": {
        "summary": "retrieve_policy_terms",
        "tags": [
          "policies"
        ],
        "description": "Retrieves policy terms and their revisions for a policy\n\n    Parameters\n    ----------\n    policy_id : str\n        The UUID of an existing Policy.\n    policy_number : str\n        The policy number of an existing Policy. Looks up the revisions by\n        this parameter if policy_id is not given.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : list\n        The data response having the form:\n        ::\n\n            [\n                {\n                    'id': UUID,\n                    'policy_id': UUID,autoPaymentMethodId\n                    'auto_payment_method_id': UUID,\n                    'effective_date': 'YYYY-MM-DD',\n                    'expiration_date': 'YYYY-MM-DD',\n                    'is_renewal': bool\n                    'term_length': int,\n                    'term_type': ('3 Years', '18 Months', '1 Year', 'Annual', '9 Months',\n                                  '6 Months', '3 Months', '1 Month', 'Monthly', 'Custom'),\n                    'renewal_type': ('3 Years', '18 Months', '1 Year', 'Annual', '9 Months',\n                                     '6 Months', '3 Months', '1 Month', 'Monthly'),\n                    'renewal_status': '',\n                    'renewal_status_reason_id': UUID,\n                    'renewal_status_description': '',\n                    'manual_reason': '',\n                    'revisions': [{\n                        'id': 'UUID',\n                        'policy_id': 'UUID',\n                        'policy_term_id': 'UUID',\n                        'cancel_date': 'YYYY-MM-DD',\n                        'commission_rate': 0.0,\n                        'commit_date': 'YYYY-MM-DD',\n                        'create_date': 'YYYY-MM-DD',\n                        'date_archived': 'YYYY-MM-DD HH:MM:SS',\n                        'end_date': 'YYYY-MM-DD',\n                        'dec_description': '',\n                        'description': '',\n                        'written_fee': 0.0,\n                        'written_premium': 0.0,\n                        'annual_fee': 0.0,\n                        'annual_premium': 0.0,\n                        'grant_mortgagee_extension': Boolean,\n                        'override_commission': Boolean,\n                        'policy_status': '',\n                        'policy_status_reason_id': 'UUID',\n                        'print_dec': Boolean,\n                        'revision_date': 'YYYY-MM-DD',\n                        'revision_state': ('open', 'committed', 'archived', 'pending'),\n                        'underwriting_questions': [],\n                        'underwriting_contacted': Boolean,\n                        'underwriting_contacted_date': 'YYYY-MM-DD',\n                        'builder_pending': Boolean,\n                        'credit_report_permissions': {}\n                    }]\n                }\n            ]\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "policy_id": {
                    "type": "string"
                  },
                  "policy_number": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/retrieve_potential_policies_payors": {
      "post": {
        "summary": "retrieve_potential_policies_payors",
        "tags": [
          "policies"
        ],
        "description": "Retrieves a list of of potential payors for the given set of policies.\n\n    Parameters\n    ----------\n    policy_numbers : list of str\n        List containing the policy numbers of the target policies\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : list of dict\n        A list containing information on the related contact\n        ::\n\n            {\n                \"policy_id\": str,      # the respective policy id\n                \"policy_number\": str,  # the respective policy number\n                \"contact_id\": str,     # id of the contact\n                \"contact_name: str,    # name of the contact\n                \"contact_role\": str,   # str pointing out the nature of the relationship between\n                                       #  the policy and the contact, from the following alternative\n                                       #  list: ['named_insured', 'finance_company', 'addtl_interest',\n                                       #  'mortgagee' ]\n            }\n\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "policy_numbers": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/retrieve_properties_by_coverage_name": {
      "post": {
        "summary": "retrieve_properties_by_coverage_name",
        "tags": [
          "policies"
        ],
        "description": "Returns a dict with a list containing property ids of properties\n     having the given coverage.\n\n    Parameters\n    ----------\n    policy_id : str, required\n        The UUID of an existing Policy.\n    revision_id : str, required\n        The UUID of an existing Revision.\n    name : str, required\n        The name of the coverage.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The data response having the form:\n        ::\n            {\n                \"properties\":[\n                    \"9eb4a2d9-8b79-4b3e-b721-244103290dfe\",\n                    \"89b4a2d9-8b79-4b3e-b721-134103290doi\"\n                ]\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "policy_id": {
                    "type": "string"
                  },
                  "revision_id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/retrieve_properties_by_group": {
      "post": {
        "summary": "retrieve_properties_by_group",
        "tags": [
          "policies"
        ],
        "description": "Retrieves property groups for a revision along with the properties.\n\n    Parameters\n    ----------\n    revision_id : str, required\n        The UUID of an existing Revision\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The data response having the form:\n        ::\n            {\n                \"results\": [\n                    {\n                        \"properties\": [\n                            {\n                                \"property_group_id\": \"5f7cae3d-bb6b-4fa1-933c-4cbe264ecac5\",\n                                \"replace_loss\": null,\n                                \"building_class\": \"\",\n                                \"property_val\": null,\n                                \"date_updated\": \"2020-02-13 01:53:54\",\n                                \"inspection_requested_date\": null,\n                                \"county_specify\": null,\n                                \"address_state\": \"MO\",\n                                \"flood_zone_code\": null,\n                                \"protection_class_id\": null,\n                                \"hydrant_distance\": 0,\n                                \"id\": \"a7e4c01f-8030-4b96-bce6-e4aeedf8a3e6\",\n                                \"is_waterway\": \"No\",\n                                \"building_name\": \"Building 1\",\n                                \"address_line2\": null,\n                                \"annual_fee\": null,\n                                \"address_line1\": null,\n                                \"replacement_cost_value\": null,\n                                \"copy_address\": false,\n                                \"iso_pc_data\": null,\n                                'verisk_passport_data': {},\n                                \"address_country\": \"USA\",\n                                \"munich_re_inland_flood\": {},\n                                \"commercial_munich_re_inland_flood\": {},\n                                \"written_fee\": null,\n                                \"wind_terrain\": null,\n                                \"risk_data\": null,\n                                \"loss_history_report_content\": null,\n                                \"annual_premium\": 0.00,\n                                \"distance_to_coast\": null,\n                                \"latitude\": null,\n                                \"county_specification\": {},\n                                \"distance_to_actual_coast\": null,\n                                \"type\": null,\n                                \"wind_borne_debris\": null,\n                                \"replace_contents\": null,\n                                \"address_accuracy\": null,\n                                \"address_county\": null,\n                                \"written_premium\": 0.00,\n                                \"approved_limits\": null,\n                                \"high_velocity_zone\": null,\n                                \"flag\": \"white\",\n                                \"fire_district_distance\": 0.00,\n                                \"loss_history_report_number\": null,\n                                \"date_added\": \"2020-02-13 07:53:54\",\n                                \"revision_id\": \"2754174e-8e5d-4dda-a427-830fc729e7d6\",\n                                \"inspection_vendor\": null,\n                                \"address_zip\": null,\n                                \"wind_speed\": null,\n                                \"county\": {},\n                                \"address_city\": null,\n                                \"prefill_services_data\": null,\n                                \"year_built\": null,\n                                \"name\": \"Location 3 Building 1\",\n                                \"gross_area\": null,\n                                \"date_added_micro\": 795384,\n                                \"longitude\": null,\n                                \"next_inspection_date\": null,\n                                \"report_file_id\": null,\n                                \"stories\": null,\n                                \"builder_ready_to_rate\": false,\n                                \"replace_other\": null,\n                                \"census_block_group\": null\n                            }\n                        ],\n                            \"id\": \"5f7cae3d-bb6b-4fa1-933c-4cbe264ecac5\",\n                            \"name\": \"Location 3\",\n                            \"number\": \"3\"\n                        }\n                    ]\n                }\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "revision_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/retrieve_revision_analysis": {
      "post": {
        "summary": "retrieve_revision_analysis",
        "tags": [
          "policies"
        ],
        "description": "Return straight through processing info like status and the details if failed.\n\n    Parameters\n    ----------\n    revision_id : str\n        The UUID of an existing Revision\n\n    Returns\n    -------\n    data : dict\n        The data response having the form:\n        ::\n            {\n                \"stp_success\": bool,\n                \"stp_details\": list of dictionaries like\n                    [{\"rule_name\":\"rule_name-test1a\", \"details\":\"details-test2a\"},\n                     {\"rule_name\":\"rule_name-test1b\", \"details\":\"details-test2b\"}]\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "revision_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/retrieve_revision_billing_schedule_context": {
      "post": {
        "summary": "retrieve_revision_billing_schedule_context",
        "tags": [
          "policies"
        ],
        "description": "BC-22886: gating signals for the Builder's Change Billing Schedule dialog.\n\n    Moves the per-term lookup that previously ran inline in builder.html into the\n    API layer so it is unit/API testable. Returns hasPriorCommittedRevision\n    (FR-016) and inForceBillingScheduleId (FR-008) for the term being worked.\n\n    The Builder passes ``revision_id`` (the revision it is editing) so the gating\n    is computed from that revision's own term. This keeps the dialog suppressed on\n    a manual renewal, whose open revision lives on a brand-new (future-dated) term\n    with no committed revisions, even though the policy's in-force term still has\n    one. When ``revision_id`` is omitted the policy's current term is used.\n\n    Request/response schemas:\n      lib/api/api_specs/request-retrieve_revision_billing_schedule_context.json\n      lib/api/api_specs/response-retrieve_revision_billing_schedule_context.json\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-retrieve_revision_billing_schedule_context"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-retrieve_revision_billing_schedule_context"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/retrieve_revision_details": {
      "post": {
        "summary": "retrieve_revision_details",
        "tags": [
          "policies"
        ],
        "description": "Retrieves details for a specified revision\n\n    Parameters\n    ----------\n    revision_id : str\n        The UUID of an existing Revision\n    include_contact_details : bool\n        Whether or not revision contact details are required. Default True.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The data response having the form:\n        ::\n\n            {\n                'id': 'UUID',\n                'policy_id': 'UUID',\n                'policy_term_id': 'UUID',\n                'policy_term_start': 'YYYY-MM-DD',\n                'policy_term_end': 'YYYY-MM-DD',\n                'cancel_date': 'YYYY-MM-DD',\n                'commission_rate': 0.0,\n                'commit_date': 'YYYY-MM-DD',\n                'create_date': 'YYYY-MM-DD',\n                'date_archived': 'YYYY-MM-DD HH:MM:SS',\n                'dec_description': '',\n                'description': '',\n                'written_fee': 0.0,\n                'written_premium': 0.0,\n                'annual_fee': 0.0,\n                'annual_premium': 0.0,\n                'grant_mortgagee_extension': Boolean,\n                'override_commission': Boolean,\n                'policy_status': '',\n                'policy_status_reason_id': 'UUID',\n                'policy_type': '',\n                'print_dec': Boolean,\n                'revision_date': 'YYYY-MM-DD',\n                'revision_state': ('open', 'committed', 'archived', 'pending'),\n                'underwriting_questions': [],\n                'underwriting_contacted': Boolean,\n                'underwriting_contacted_date': 'YYYY-MM-DD',\n                'builder_pending': Boolean,\n                'rate_capability': Boolean,\n                'credit_report_permissions': {},\n                'additional_interests': [],\n                'agents': [],\n                'mortgagees': [],\n                'named_insureds': []\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "revision_id": {
                    "type": "string"
                  },
                  "include_contact_details": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/retrieve_revision_invoice_numbers": {
      "post": {
        "summary": "retrieve_revision_invoice_numbers",
        "tags": [
          "policies"
        ],
        "description": "Retrieves all RevisionInvoiceNumbers from\n    `custom_data` table for a specific revision\n\n    Parameters\n    ----------\n    revision_id : str\n        The UUID of an existing Revision\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The data response having the form:\n        ::\n            revision_id: 'UUID',\n            total: int,\n            invoices: List[dict]\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "revision_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/retrieve_revision_property_group_numbers": {
      "post": {
        "summary": "retrieve_revision_property_group_numbers",
        "tags": [
          "policies"
        ],
        "description": "Returns the list of group numbers arranged in descending order for the given revision\n\n    Parameters\n    ----------\n    revision_id : UUID\n        The UUID - the id of the revision for which we want the group numbers\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The data response having the form:\n        ::\n            {\n               \"grouping_data\":[\n                    {\n                        \"groupNumber\":\"2\"\n                    },\n                    {\n                         \"groupNumber\":\"1\"\n                    }\n                ]\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "revision_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/retrieve_revision_status": {
      "post": {
        "summary": "retrieve_revision_status",
        "tags": [
          "policies"
        ],
        "description": "\n    Retrieve revision status.\n    Parameters\n    ----------\n    revision_id : UUID, required\n        UUID of an existing revision\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    data : dict\n        Contains cancellation info\n    message : str\n        Human-readable messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "revision_id": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/retrieve_risk_details": {
      "post": {
        "summary": "retrieve_risk_details",
        "tags": [
          "policies"
        ],
        "description": "Retrieves risk details similar to details in retrieve_risks,\n    but with the addition of extra details like mortgagees\n    and rating information\n\n    Parameters\n    ----------\n    risk_id : str\n        The UUID of an existing risk\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The data response having the form:\n        ::\n            {\n                'id': 'UUID',\n                'address_accuracy': ('poor', 'fair', 'great'),\n                'address_city': 'City Name',\n                'address_line1': 'Line 1',\n                'address_line2': 'Line 2',\n                'address_state': 'NY',\n                'address_zip': '12345',\n                'county': {'name': '', 'code': '', 'id': 'UUID'},\n                'county_specification': {'name': '', 'code': '', 'id': 'UUID'},\n                'copy_address': bool,\n                'date_added': datetime,\n                'fire_district': '',  # only if manual protection classes are used\n                'fire_district_distance': decimal,\n                'flag': ('white', 'orange'),\n                'gross_area': '',\n                'hydrant_distance': int,\n                'inspection_requested_date': date,\n                'latitude': decimal,\n                'longitude': decimal,\n                'loss_history_report_content': '',\n                'loss_history_report_number': '',\n                'name': 'Property Nickname',\n                'next_inspection_date': date,\n                'property_val': '',\n                'iso_pc_data': {},\n                'verisk_passport_data': {},\n                'replace_contents': '',\n                'replace_loss': '',\n                'replace_other': '',\n                'approved_limits': {},\n                'revision_id': 'UUID',\n                'stories': '',\n                'type': '',\n                'year_built': '',\n                'items': [],\n                'sub_lines': [],\n                'question_groups': {},\n                'mortgagees': [],\n                'tenants': [],\n                'inspectors': [],\n                'photos': [],\n                'disclosures': [],\n                'loss_history': [],\n                'loss_history_date': '',  # legacy attribute name, same as loss_history_date_pulled\n                'loss_history_date_pulled': '',\n                'loss_history_report_number': '',\n                'britecore_claims': [],\n                'flood_zone_code': '',\n                'distance_to_coast': ''\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-retrieve_risk_details"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-retrieve_risk_details"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/retrieve_risks": {
      "post": {
        "summary": "retrieve_risks",
        "tags": [
          "policies"
        ],
        "description": "Retrieves paginated/filtered risks for a revision\n\n    Parameters\n    ----------\n    revision_id : str\n        The UUID of an existing Revision\n    page : int\n        The page number of results, defaults to 0\n    page_size : int\n        The maximum number of results per page, defaults to 10\n    retrieve_remaining : bool\n        Override page_size and get all remaining properties\n    order_by : str\n        The attribute used to sort properties, defaults to 'name'\n    risk_types : list of str\n        The types of risks to retrieve, defaults to None, meaning that it will return all types of risks\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The data response having the form:\n        ::\n            {\n                'page': int,\n                'page_size': int,\n                'total_size': int\n                'results': [\n                    {\n                        'id': 'UUID',\n                        'address_accuracy': ('poor', 'fair', 'great'),\n                        'address_city': 'City Name',\n                        'address_line1': 'Line 1',\n                        'address_line2': 'Line 2',\n                        'address_state': 'NY',\n                        'address_zip': '12345',\n                        'address_county': 'UUID',\n                        'county_specify': 'UUID',\n                        'county': {'name': '', 'code': '', 'id': 'UUID'},\n                        'county_specification': {'name': '', 'code': '', 'id': 'UUID'},\n                        'copy_address': bool,\n                        'date_added': datetime,\n                        'fire_district_distance': decimal,\n                        'flag': ('white', 'orange'),\n                        'gross_area': '',\n                        'hydrant_distance': int,\n                        'inspection_requested_date': date,\n                        'latitude': decimal,\n                        'longitude': decimal,\n                        'loss_history_report_content': '',\n                        'loss_history_report_number': '',\n                        'name': 'Property Nickname',\n                        'next_inspection_date': date,\n                        'property_group_id': 'UUID',\n                        'property_val': '',\n                        'iso_pc_data': {},\n                        'verisk_passport_data': {},\n                        'replace_contents': '',\n                        'replace_loss': '',\n                        'replace_other': '',\n                        'approved_limits': {},\n                        'revision_id': 'UUID',\n                        'stories': '',\n                        'type': '',\n                        'year_built': '',\n                        'flood_zone_code': '',\n                        'builder_ready_to_rate': '',\n                        'distance_to_coast': ''\n                    }\n                ]\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "revision_id": {
                    "type": "string"
                  },
                  "page": {
                    "type": "integer"
                  },
                  "page_size": {
                    "type": "integer"
                  },
                  "retrieve_remaining": {
                    "type": "boolean"
                  },
                  "order_by": {
                    "type": "string"
                  },
                  "risk_types": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/retrieve_underlying_policy": {
      "post": {
        "summary": "retrieve_underlying_policy",
        "tags": [
          "policies"
        ],
        "description": "Retrieves underlying policy for a specified revision\n\n    Parameters\n    ----------\n    revision_id : str\n        The UUID of an existing Revision\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict or None\n        The underlying policy data if it exists, None if no underlying policy is found\n        The data response having the form:\n        ::\n\n            {\n                'id': 'UUID',\n                'copied_to_policy_id': 'UUID',\n                'carrier_name': 'str',\n                'policy_number': 'str',\n                'policy_type': 'str',\n                'policy_status': 'str',\n                'policy_state_code': 'str',\n                'inception_date': 'YYYY-MM-DD',\n                'requested_contact_id': 'UUID',\n                'copied_from_revision_id': 'UUID',\n                'copied_to_revision_id': 'UUID',\n                'relationship_type': 'str',\n                'vehicles': [],\n                'properties': [],\n                'contacts': []\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "revision_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/review_revision": {
      "post": {
        "summary": "review_revision",
        "tags": [
          "policies"
        ],
        "description": "Manually trigger STP for a revision and update review workflow state.\n\n    This endpoint allows administrators to manually run Straight Through Processing\n    on a quote/revision and updates the review_workflow_state based on the results.\n\n    Parameters\n    ----------\n    revision_id : str\n        The UUID of an existing Revision\n\n    Returns\n    -------\n    data : dict\n        The data response having the form:\n        ::\n            {\n                \"review_workflow_state\": str,\n                \"stp\": {\n                    \"status\": str ('approved' | 'requires_review' | 'failed'),\n                    \"stp_details\": list of dictionaries like\n                        [{\"rule_name\":\"rule_name-test1a\", \"details\":\"details-test2a\"},\n                        {\"rule_name\":\"rule_name-test1b\", \"details\":\"details-test2b\"}]\n                    \"stp_errors\": list\n                }\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-review_revision"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-review_revision"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/rewrite_policy": {
      "post": {
        "summary": "rewrite_policy",
        "tags": [
          "policies"
        ],
        "description": "API endpoint to rewrite a full quote",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-rewrite_policy"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-rewrite_policy"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/run_property_lookup": {
      "post": {
        "summary": "run_property_lookup",
        "tags": [
          "policies"
        ],
        "description": "\n    Runs the property lookup integration for a property, and stores updates.\n\n    Parameters\n    ----------\n    property_id : str, required\n        The UUID of an existing Property\n    integration_instance_id : str, optional\n        The UUID of an existing IntegrationInstance to use for the lookup\n    dependencies : list, optional\n        A list of integration dependencies to store, property items categories and user inputs to store and use on\n        the integration lookup call\n            - category: str; optional if label is present\n                The name of the category if dependency is category.\n            - label: str; optional if category is present\n                The name of the user input label if dependency is user input.\n            - itemId: str; optional\n                The ID of the item. If not provided, the value will be stored across all the property items with\n                the same name as the category or user input label.\n            - value: str; required\n                The value to store for the category or user input.\n    headless : bool or str, optional\n        If True or a string (one of PropertyLookupOptions), this API will not require an integration instance,\n        and will execute all the integrations instances with the option enabled (if passed a string).\n        If False (default), the API will require an integration instance, and only execute that integration instance.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable messages describing either error or lookup effects\n    data : dict\n        Indicate which sections have received the update, so that UI can trigger refresh.\n        The data response having the form:\n        ::\n            {\n                \"rating_information_updates\": [{\n                    \"visible_on_admin_builder\": True/False,\n                    \"visible_on_agent_builder\": True/False,\n                    \"property_item_id\": str,\n                    \"policy_type_item_id\": str,\n                    \"policy_type_item_name\": str,\n                    \"policy_type_item_sort_order\": int,\n                    \"field_name\": str,\n                    \"field_sort_order\": int,\n                    \"old_value\": Union[str, None],\n                    \"new_value\": str,\n                    \"old_value_display\": Union[str, None],\n                    \"new_value_display\": str,\n                    \"type\": str,  # \"category\" or \"userInput\"\n                }, ...],\n                \"property_information_updates\": {\n                    # float -- the vendor response deserializes property_value with\n                    # fields.Float and it is echoed back unchanged, so this is a JSON\n                    # number even though propertyVal is stored in a VARCHAR.\n                    \"property_value\": float,\n                    # Decimal, quantized to the DECIMAL(64,2) column scale (BC-23939), so it\n                    # serializes as a JSON number rather than the raw vendor string.\n                    \"replacement_cost_value\": Decimal,\n                },\n                \"alert_message\": str,  # empty string if none\n                # BC-24445 (L4): hold / vendor-proposal state after this run.\n                # {property item id: {field: {recordedValue, userValueHasPrecedence}}}.\n                # A converging vendor value releases a hold and a value refused by a\n                # live hold records a fresh proposal; neither produces a\n                # rating_information_updates entry, so this is the only route by\n                # which the Quote Wizard learns its Revert link is now wrong.\n                \"integration_state_updates\": dict,\n            }\n\n    Request/response schemas:\n      lib/api/api_specs/request-run_property_lookup.json\n      lib/api/api_specs/response-run_property_lookup.json\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-run_property_lookup"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-run_property_lookup"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/run_underwriting_rules": {
      "post": {
        "summary": "run_underwriting_rules",
        "tags": [
          "policies"
        ],
        "description": "\n    Runs underwriting rules for a revision. If provided, rules can be executed for just a single property,\n    excluding any rules with the modules in the list passed in the parameters\n\n    Parameters\n    ----------\n    revision_id : UUID, required\n        UUID of an existing revision\n    property_id: UUID, optional\n        UUID of a property on the given revision\n    use_new_rules_engine: bool, optional\n        True if the new rules engine should be used, False if not. When None, uses the\n        configured value from the \"use-new-rules-engine\" setting (policies section).\n    exclude_modules: list of str, optional\n        A list containing any UWR modules to exclude\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    message : str\n        Human-readable messages.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "revision_id": {
                    "type": "string"
                  },
                  "property_id": {
                    "type": "string"
                  },
                  "use_new_rules_engine": {
                    "type": "string"
                  },
                  "exclude_modules": {
                    "type": "string"
                  },
                  "Returns": {
                    "type": "string"
                  },
                  "-------": {
                    "type": "string"
                  },
                  "success": {
                    "type": "boolean"
                  },
                  "message": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/search": {
      "post": {
        "summary": "search",
        "tags": [
          "policies"
        ],
        "description": "Returns a JSON string containing the policies matching the search string entered by the user.\n\n    Parameters\n    ----------\n    search_string : str\n        Value to search for\n    statuses : list\n        A list specifying the statuses to filter by such as\n        ::\n            [\"Unsubmitted\",\"Submitted\"]\n    policy_types : list\n        A list specifying the policy types to filter by such as\n        ::\n            [\"CT-HO3\",\"Homeowners HO3 - Test\"]\n    revision_states : list\n        A list specifying the revision states to filter by such as\n        ::\n            [\"archived\",\"open\"]\n    review_states : list\n        A list specifying the review states to filter by such as\n        ::\n            [\"NOT_STARTED\",\"READY_TO_APPLY\",\"PENDING_AGENT_CHANGES\",\"PENDING_UNDERWRITER_REVIEW\",\"APPROVED_BY_UW\"]\n    sort_obj : dict\n        A dict with the field and order keys indicating the column to sort by and the sorting order such as\n        ::\n            {\n            \"field\":\"policy_number\",\n            \"order\":\"asc\"\n            }\n    current_page : int\n        The page number to be retrieved, useful for pagination and going to a specific page in the results\n    page_size : int\n        The number of results per page\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The data response having the following format.:\n        ::\n\n            {\n                \"activePage\": int,\n                \"maxPages\": int,\n                \"records\": [\n                    {\n                        \"status\": ('Active', 'Unsubmitted', 'Submitted',\n                                    'Rejected', 'Cancelled', 'Expired'),\n                        \"namedInsured\": str,\n                        \"expirationDate\": MM/DD/YYYY,\n                        \"policyId\": UUID,\n                        \"flag\": \"white\",\n                        \"isGen3\": boolean,\n                        \"reviewState\": ('NOT_STARTED', 'READY_TO_APPLY', 'PENDING_AGENT_CHANGES',\n                                    'PENDING_UNDERWRITER_REVIEW', 'APPROVED_BY_UW'),\n                        \"policyType\": str,\n                        \"policyNumber\": str,\n                        \"effectiveDate\": MM/DD/YYYY\n                    }\n                ]\n            }\n        ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "search_string": {
                    "type": "string"
                  },
                  "statuses": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "policy_types": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "revision_states": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "review_states": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "sort_obj": {
                    "type": "object"
                  },
                  "current_page": {
                    "type": "integer"
                  },
                  "page_size": {
                    "type": "integer"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/set_binder_to_active": {
      "post": {
        "summary": "set_binder_to_active",
        "tags": [
          "policies"
        ],
        "description": "\n    Set a revision from \"Binder Active\" to \"Active\" status\n    Parameters\n    ----------\n    revision_id : UUID, optional\n        UUID of an existing revision\n    external_system_reference : str, optional\n        External system reference\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    message : str\n        Human-readable messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-set_binder_to_active"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-set_binder_to_active"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/set_exclude_from_combined_billing": {
      "post": {
        "summary": "set_exclude_from_combined_billing",
        "tags": [
          "policies"
        ],
        "description": "\n    Exclude a policy from combined billing\n    by simply adding a system tag to it\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "policy_id": {},
                  "exclude": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/store_mortgagee": {
      "post": {
        "summary": "store_mortgagee",
        "tags": [
          "policies"
        ],
        "description": "\n    Stores a mortgagee\n\n    Parameters\n    ----------\n    x_properties_contact_id : str, required\n        UUID of an existing x_properties_contact_id. Call `/api/v2/policies/new_mortgagee` to create one.\n    mortgagee_contact_id : str, required\n        UUID of an existing contact that has `Mortgagee` role.\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not.\n    message : list[str]\n        Human-readable messages.\n    data : dict\n        Details of the transaction.\n        ::\n        {\n            'dec_mort_statement': str,  // Mortgagee statement used in `decMortStatement` column\n            'loss_payee_warning': str,  // Warning in case there has been a modification to the loss payees\n            'removed_bill_whom': bool  // True in case that one of the bill whoms was replaced (recurring or initial)\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "x_properties_contact_id": {
                    "type": "string"
                  },
                  "mortgagee_contact_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/store_policy_information": {
      "post": {
        "summary": "store_policy_information",
        "tags": [
          "policies"
        ],
        "description": "Store contact, property and other policy information via the API\n        as part of the create_quote logic.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "quote_info": {},
                  "policy_data": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/store_policy_information_extended": {
      "post": {
        "summary": "store_policy_information_extended",
        "tags": [
          "policies"
        ],
        "description": "Store contact, property and other policy information via the API\n        as part of the create_quote_extended logic.\n\n    Parameters\n    ----------\n    quote_info : dict\n        The quote information from the stateless quote\n    policy_data : dict\n        The policy data from the stateless quote\n    run_uw_rules : bool\n        Whether to run the underwriting rules\n\n    Returns\n    -------\n    dict\n        A standard API response including `success`, `messages`, and `data` as keys.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "quote_info": {
                    "type": "object"
                  },
                  "policy_data": {
                    "type": "object"
                  },
                  "run_uw_rules": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/store_renewal_status": {
      "post": {
        "summary": "store_renewal_status",
        "tags": [
          "policies"
        ],
        "description": "\n    Store renewal status\n    Parameters\n    ----------\n    revision_id : UUID, required\n        UUID of an existing revision\n    renewal_status_reason : UUID, required\n        UUID of an existing reason\n    renewal_status : str, required\n        Renew or Non-Renewal\n    renewal_status_description : str, required\n        Renewal status description\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    data : dict\n        Contains cancellation info\n    message : str\n        Human-readable messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "revision_id": {},
                  "renewal_status": {},
                  "renewal_status_description": {},
                  "renewal_status_reason": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/store_revision_description": {
      "post": {
        "summary": "store_revision_description",
        "tags": [
          "policies"
        ],
        "description": "\n    Store revision description\n\n    Parameters\n    ----------\n    revision_id : UUID, required\n        UUID of an existing revision\n    type : str, required\n        One of \"dec\" (Print description), \"rev\" (Additional Description)\n    description : str, required\n        new description to store\n\n    Returns\n    -------\n    success : bool\n        True if stored successfully, False if not\n    message : str\n        Human-readable messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "revision_id": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/submit_quote": {
      "post": {
        "summary": "submit_quote",
        "tags": [
          "policies"
        ],
        "description": "submit_quote",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "json_dict": {},
                  "date_cursor": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/sync_item_within_a_property_group": {
      "post": {
        "summary": "sync_item_within_a_property_group",
        "tags": [
          "policies"
        ],
        "description": "Sync a Property Item to all properties belonging to the same Property Group\n\n    Parameters\n    ----------\n    property_group_id : UUID\n    item_id : UUID\n    builder_obj : dict\n        The builder_obj dict having the following format\n        {\n            'categories': {\n                category_name: category_value\n            }\n        }\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    message : list of str\n        Human-readable messages with error.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "property_group_id": {
                    "type": "string"
                  },
                  "item_id": {
                    "type": "string"
                  },
                  "builder_obj": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/sync_underlying_policy_changes": {
      "post": {
        "summary": "sync_underlying_policy_changes",
        "tags": [
          "policies"
        ],
        "description": "Detect and synchronize underlying policy changes to the current umbrella revision.\n\n    This function detects underlying policy data changes and synchronizes them to keep the umbrella policy up to date.\n\n    Parameters\n    ----------\n    revision_id : str\n        The UUID of the current umbrella revision to sync changes to\n\n    Returns\n    -------\n    dict\n        Standard API response containing:\n        - success: bool - True if synchronization completed successfully\n        - messages: list of str - Human-readable status messages\n        - data: dict - Contains success confirmation message\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-sync_underlying_policy_changes"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-sync_underlying_policy_changes"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/update_billing_schedule": {
      "post": {
        "summary": "update_billing_schedule",
        "tags": [
          "policies"
        ],
        "description": "update_billing_schedule",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-update_billing_schedule"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-update_billing_schedule"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/update_builder_ready_to_rate": {
      "post": {
        "summary": "update_builder_ready_to_rate",
        "tags": [
          "policies"
        ],
        "description": "Updates an existing property/revision's builderReadyToRate flag.\n\n    Parameters\n    ----------\n    property/revision : dict\n    'property_id' : UUID, # only if updating a property\n    'revision_id' : UUID, # only one of these ids is necessary\n    'is_completed' : bool\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "property/revision": {
                    "type": "object"
                  },
                  "'property_id'": {
                    "type": "string"
                  },
                  "'revision_id'": {
                    "type": "string"
                  },
                  "'is_completed'": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/update_contact_interest": {
      "post": {
        "summary": "update_contact_interest",
        "tags": [
          "policies"
        ],
        "description": "Updates the contact's interest.\n    Additional interests may be an additional insured, a land contract holder, a loss payee, a joint interest,\n    or a liability interest.\n\n    Parameters\n    ----------\n    revision_id : str, required\n        The UUID of an existing Revision\n    x_revisions_contact_id : str, required\n        UUID of the contact entry.\n        Call `/api/v2/policies/new_revision_contact` to create one on the revision with \"addtlInterest\" role.\n    interest : str, required\n        The contact interest\n\n    Returns\n    -------\n    success : bool\n        True if updated successfully, False if not\n    message : str\n        Human-readable messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "revision_id": {
                    "type": "string"
                  },
                  "x_revisions_contact_id": {
                    "type": "string"
                  },
                  "interest": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/update_effective_and_expiration_date": {
      "post": {
        "summary": "update_effective_and_expiration_date",
        "tags": [
          "policies"
        ],
        "description": " Updates the effective date, expiration date and policy term.\n\n    It also finds the related policy term length and updates the same.\n\n    Parameters\n    ----------\n    policy_id : UUID of specific policy.\n    effective_date : The effective date given by user.  Date should be in the format YYYY-MM-DD.\n    expiration_date : The expiration date given by user.  Date should be in the format YYYY-MM-DD.\n    policy_term_type : The term type for the specific policy.\n    policy_type_id : The policy type id for the selected line.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The data response having the form:\n        ::\n            {\n                \"policy_term\": The deduced policy term,\n                \"effective_date\": The updated effective date,\n                \"expiration_date\": The updated expiration date,\n                \"term_length\": The updated term length,\n                \"revision_id\": UUID, # only one of these ids is necessary\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "policy_id": {
                    "type": "string"
                  },
                  "effective_date": {
                    "type": "string"
                  },
                  "expiration_date": {
                    "type": "string"
                  },
                  "policy_term_type": {
                    "type": "string"
                  },
                  "policy_type_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/update_inactive_policy_groups": {
      "post": {
        "summary": "update_inactive_policy_groups",
        "tags": [
          "policies"
        ],
        "description": "Take an iterable of policy_group_ids, determine which policy groups are\n    inactive (have fewer than at least two policies), remove the\n    policy_group_id from each associated policy, and delete each inactive\n    policy group.\n\n    Parameters\n    ----------\n    group_ids : iterable\n        An iterable of group id strings.\n    force_removal : boolean\n        Optional true/false boolean\n        If True, forces removal of policy groups (even if not currently inactive)\n\n    Returns\n    -------\n    success : bool\n    messages : list\n        The sql error if one occurs, or a success message.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "group_ids": {
                    "type": "string"
                  },
                  "force_removal": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/update_loss_dispute": {
      "post": {
        "summary": "update_loss_dispute",
        "tags": [
          "policies"
        ],
        "description": "Update loss dispute\n    Parameters\n    ----------\n    dispute_id : UUID\n    reason : text\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    message : list of str\n        Human-readable messages with error.\n    data: dict of updated loss_dispute\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "dispute_id": {},
                  "reason": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/update_mortgagee_information": {
      "post": {
        "summary": "update_mortgagee_information",
        "tags": [
          "policies"
        ],
        "description": "Updates mortgagee specific information as related to a property.\n\n    Parameters\n    ----------\n    x_contact_reference : UUID\n        The id connecting the contact to the property\n    mortgagee_info : dict\n        Mortgagee information of the form:\n        ::\n\n            {\n                'description': str,\n                'loan_num': str,\n                'type': str,\n                'dec_mort_statement': str\n            }\n\n    Note\n    ----\n    If any key in mortgagee_info is empty, we assume you want to clear it.\n    If you do not want to clear a field, leave the key out of your request.\n    In other words, every key/value pair you send will be checked for discrepencies\n    with the current data, and changes will be made.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        Echoes the updated mortgagee record\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "x_contact_reference": {
                    "type": "string"
                  },
                  "mortgagee_info": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/update_policies_terms_payment_method_batch": {
      "post": {
        "summary": "update_policies_terms_payment_method_batch",
        "tags": [
          "policies"
        ],
        "description": "\n    Updates a list of active policies terms' payment method with the payment method id\n    passed in the parameters\n    Parameters\n    ----------\n    payment_method_id : str\n        UUID of an existing payment method\n    policy_term_ids: list of str\n        A list containing policy terms ids\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    message : str\n        Human-readable messages.\n    data : dict\n        Contains list of failed policy terms updates (if any)\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "payment_method_id": {},
                  "policy_term_ids": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/update_policy_contact": {
      "post": {
        "summary": "update_policy_contact",
        "tags": [
          "policies"
        ],
        "description": "\n    Stores a contact into the specified contact entry on policy, or remove any currently stored contact from it.\n\n    Parameters\n    ----------\n    x_policy_contact_id : str\n        UUID of the contact entry. Call `/api/v2/policies/new_revision_contact` to create one on the revision.\n    contact_id : Optional[str]\n        Optional. UUID of the contact to be stored into the contact entry.\n        If not provided or null value, any currently stored contact will be removed from the specified contact entry.\n    contact_role : Optional[str]\n        Optional. When storing a contact, it ensures the stored contact has the specified contact role; if not provided,\n        it defaults to a random role the contact already has, or returns an error if the contact has no role.\n        When removing a contact, it has to be one of the roles of the currently stored contact; if not provided, it\n        defaults to a random role the currently stored contact has. The specified role name will be posted on Policy\n        Notes. Consult `/api/v2/contacts/retrieve_all_roles` for the list of all available contact roles.\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not.\n    message : list[str]\n        Human-readable messages.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "x_policy_contact_id": {
                    "type": "string"
                  },
                  "contact_id": {
                    "type": "string"
                  },
                  "contact_role": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/update_policy_last_visited": {
      "post": {
        "summary": "update_policy_last_visited",
        "tags": [
          "policies"
        ],
        "description": "\n    Updates the policy with the last visited step data, called when an agent first lands on\n    one of the wizard steps. At the moment , update will fully overrite existing data.\n\n    Parameters\n    ----------\n    policy_id : str\n        Policy ID (UUID)\n    revision_id : str\n        Revision ID (UUID)\n    params : dict\n        A dictionary containing params to store.\n        ::\n\n            {\n                \"lastBriteQuoteWizardURL\": str,       # Last visited URL of quoting wizard,\n                \"lastBriteQuoteWizardStepId\": str,    # Last visited step of wizard\n            }\n\n    Returns\n    -------\n    data : dict\n        The data response having the form:\n        ::\n        { 'done': True }\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "policy_id": {
                    "type": "string"
                  },
                  "revision_id": {
                    "type": "string"
                  },
                  "params": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/update_primary_property": {
      "post": {
        "summary": "update_primary_property",
        "tags": [
          "policies"
        ],
        "description": "Update primary property of revision with this function.\n\n    Parameters\n    ----------\n    property_id : uuid\n        The id of property which will be added as primary property\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : str\n        Human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "property_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/update_property_location": {
      "post": {
        "summary": "update_property_location",
        "tags": [
          "policies"
        ],
        "description": "Updates an existing property's location details.\n\n    Parameters\n    ----------\n    location : dict\n        The data input having the form:\n        ::\n\n            {\n                'id': UUID,\n                'name': str,\n                'address_accuracy': str,\n                'address_line1': str,\n                'address_line2': str,\n                'address_city': str,\n                'address_state': str,\n                'address_zip': str,\n                'address_county': UUID,\n                'county_specify': UUID,\n                'latitude': float,\n                'longitude': float,\n                'copy_address': bool,\n                'flood_zone_code': str,\n                'distance_to_coast': str\n                'year_built': str,\n                'primary': bool,\n                'acres': decimal,\n                'legal_description': str\n            }\n\n    soft_geoservice_bypass : bool\n        If all location fields are present (lat/long, county, city, zip), then trust these values\n        and do not hit the geo-service processes.\n\n    hard_geoservice_bypass : bool\n        Regardless of potentially-lacking address fields, do not hit geo-service processes.\n\n    reset_premiums : bool\n        If True, will reset the premiums for the revision and property.\n\n    Note\n    ----\n    Besides the UUID, if any key is empty, we assume you want to clear it.\n    If you do not want to clear a field, leave the key out of your request.\n    In other words, every key/value pair you send will be checked for discrepencies\n    with the current data, and changes will be made.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        Echoes the updated information, complete with the rest of the property information\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "location": {
                    "type": "object"
                  },
                  "soft_geoservice_bypass": {
                    "type": "boolean"
                  },
                  "hard_geoservice_bypass": {
                    "type": "boolean"
                  },
                  "reset_premiums": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/update_property_sub_line_name": {
      "post": {
        "summary": "update_property_sub_line_name",
        "tags": [
          "policies"
        ],
        "description": "Change name of property sub line with this function.\n\n    Parameters\n    ----------\n        property_sub_line_id : uuid\n            The id of property which name will be updated\n        property_sub_line_name : str\n            The name that should be written in property sub lines name\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "property_sub_line_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/update_property_valuation": {
      "post": {
        "summary": "update_property_valuation",
        "tags": [
          "policies"
        ],
        "description": "\n    Update the property valuation information for a property.\n\n    Parameters\n    ----------\n    property_id : str\n        The UUID of an existing Property. It must be on an open revision.\n    replacement_cost_value : str\n        Optional. The replacement cost value (RCV) for the property. Must be a stringified number.\n        If omitted or None, the value will not be updated.\n    property_val : str\n        Optional. The actual cash value (ACV) for the property. Must be a stringified number.\n        If omitted or None, the value will not be updated.\n    integration_instance_external_id : str\n        Optional. External ID of the Integration Instance.\n        If provided, Policy Notes will indicate which Integration Instance updated these.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable messages describing errors, if any.\n    data : dict\n        Present only when a property valuation auto-filled one or more property item limits:\n        ``{'limit_auto_filled': True, 'items': [{'item_id': <PropertyItem id>, 'new_limit': <str>}]}``.\n        An empty list (the standard_response default) on all other paths.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "property_id": {
                    "type": "string"
                  },
                  "replacement_cost_value": {
                    "type": "string"
                  },
                  "property_val": {
                    "type": "string"
                  },
                  "integration_instance_external_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/update_quote_details": {
      "post": {
        "summary": "update_quote_details",
        "tags": [
          "policies"
        ],
        "description": "PATCH endpoint for updating answers / limits / deductibles on an\n    existing revision, addressed by human-readable identifiers.\n\n    Designed for the multi-phase quote-build lifecycle where callers\n    progressively answer questions and tune coverages without having to\n    harvest the revision-scoped UUIDs that ``update_rating_information``\n    requires. Pairs naturally with ``create_quote_extended``'s fragment\n    matching: anything the caller could resolve by label or fragment at\n    create time can be resolved the same way here.\n\n    Semantics:\n    * **PATCH throughout.** Omitted fields are left untouched, both at the\n      request level and within ``items[].questions`` / ``categories`` /\n      ``userInputs``. Items not listed in the request are not touched.\n    * **Best-effort.** Per-key resolution failures (no match, ambiguous\n      fragment, invalid category value) collect into a warnings list\n      instead of aborting the whole call. Successfully resolved updates\n      are committed.\n    * **Disallow / yes_no_prevent_continue values are STORED.** Matches\n      UI behavior: the value is recorded and a warning notes the bind\n      block. The actual bind refusal is enforced separately at bind time\n      by the ``policies`` / ``enforce-business-rules-at-bind`` tenant\n      advanced setting (default off).\n\n    Parameters\n    ----------\n    id : str, optional\n        Revision id. One of ``id``, ``external_system_reference``, or\n        ``property_id`` is required.\n    external_system_reference : str, optional\n        Caller-side reference, alternative to ``id``.\n    property_id : str, optional\n        Property id. When provided, the revision is derived from the\n        property and PropertyItem name resolution scopes to that property.\n        RevisionItem (policy-wide) name resolution is unaffected.\n    items : list[dict], optional\n        Each item identifies its target via ``id`` (revision_item or\n        property_item id; required for allow-multiple item instances or\n        when a name resolves to multiple items) OR ``name`` (exact or\n        case-insensitive fragment match on the underlying line item's\n        name). Supported per-item fields:\n        ::\n            {\n                \"id\": \"uuid\"  OR  \"name\": \"Dwelling\",\n                \"limit\": 250000,                       # optional, PATCH\n                \"deductible\": 1000,                    # optional, PATCH\n                \"questions\": {                         # PATCH-merged; keys\n                                                       # are routed dynamically\n                                                       # to categories /\n                                                       # userInputs / questions\n                    \"Construction Type\": \"Frame\",\n                    \"fire claim\": \"No\"\n                },\n                \"scheduledItem\": [[\"2500\", \"Ring\", \"\"]]  # REPLACE when present\n            }\n    underwriting_questions : list[dict], optional\n        Revision-level UW questions, PATCH-merged into the existing list.\n        Same shape as ``create_quote_extended``: each entry takes\n        ``questionId`` or ``questionText`` plus ``yesNoAnswer`` and\n        optional ``explanation``.\n    rerate : bool, optional\n        When True, rate the revision after the updates are applied. Sync.\n        The rerate is best-effort: the field updates are already committed,\n        so a rerate failure does NOT flip ``success`` to False. Instead it is\n        surfaced as a warning under ``messages._warning_`` with the stable\n        ``rerate_failed:`` prefix - a caller that needs rated premiums should\n        check for that prefix and treat the returned premiums as potentially\n        stale.\n    run_uw_rules : bool, optional\n        When True, run the UW rules engine after the updates are applied.\n\n    Returns\n    -------\n    dict\n        Full quote response (same shape as ``bind_full_quote``) under\n        ``data``, with per-update warnings under ``messages._warning_``.\n        A ``rerate_failed:``-prefixed warning indicates the post-update\n        rerate did not complete (premiums may be stale) even though\n        ``success`` is True.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-update_quote_details"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-update_quote_details"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/update_rating_information": {
      "post": {
        "summary": "update_rating_information",
        "tags": [
          "policies"
        ],
        "description": " Updates an existing property/revision's rating information.\n\n    Parameters\n    ----------\n    property/revision : dict\n    'property_id': UUID, # only if updating a property\n    'revision_id': UUID, # only one of these ids is necessary\n    'items' : [\n        {\n            'id': UUID,\n            'limit': 0.00,\n            'deductible': 0.00,\n            'manual': boolean,\n            'annual_premium': 0.00, # only if manually rated\n            'loss_exposure_group': int,\n            'builder_obj': {\n                'categories': {'Category Name': 'value'},\n                'overrideCategories': [],\n                'questions': {UUID: []},\n                'lossPayees': {}\n            },\n            # BC-24445/BC-24444 (L3/L4), both REQUEST-ONLY: they never ride\n            # inside builder_obj, because the server strips its own keys from\n            # incoming payloads precisely so a caller cannot forge a hold.\n            # Only a literal True counts; anything else is ignored.\n            'user_edited': {'Field Name': True},          # a human edited this field\n            'release_user_edited': {'Field Name': True},  # Revert: drop the hold\n        }\n    ]\n    'reset_premiums': bool # set to False if premiums should not be reset\n    Note\n    ----\n    If any key is empty, we assume you want to clear it.\n    If you do not want to clear a field, leave the key out of your request.\n    In other words, every key/value pair you send will be checked for discrepencies\n    with the current data, and changes will be made.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        Echoes the updated information. Besides review_workflow_state and the\n        optional e2value_xml, BC-24445 adds two authoritative echoes, each\n        present only when that operation actually happened:\n\n            'released_user_edited': {item id: {field: restored value}}\n                What apply_release_user_edit_holds WROTE, so the client stops\n                guessing: it seeds Revert optimistically from its own\n                integrationValues copy, which can be stale.\n            'minted_user_edited': {item id: [field, ...]}\n                The requested mints that are held after this save. The server\n                refuses a mint it cannot key safely - an ambiguous rate-chain\n                name, or a field this save did not carry in that slot - so a\n                client applying every mint it asked for would show a Revert\n                link for a hold that does not exist.\n\n        Both echoes describe each item entry as it was applied, so they assume\n        one entry per item. The Quote Wizard guarantees that by coalescing its\n        batch to the last entry per item. A caller that sends the same item\n        twice gets both entries' echoes, which can disagree with the final row\n        (a release followed by a plain write still reports the release).\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "property/revision": {
                    "type": "object"
                  },
                  "'property_id'": {
                    "type": "string"
                  },
                  "'revision_id'": {
                    "type": "string"
                  },
                  "'items'": {
                    "type": "string"
                  },
                  "]": {
                    "type": "string"
                  },
                  "'reset_premiums'": {
                    "type": "string"
                  },
                  "Note": {
                    "type": "string"
                  },
                  "----": {
                    "type": "string"
                  },
                  "If any key is empty, we assume you want to clear it.": {
                    "type": "string"
                  },
                  "If you do not want to clear a field, leave the key out of your request.": {
                    "type": "string"
                  },
                  "In other words, every key/value pair you send will be checked for discrepencies": {
                    "type": "string"
                  },
                  "with the current data, and changes will be made.": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/update_review_workflow": {
      "post": {
        "summary": "update_review_workflow",
        "tags": [
          "policies"
        ],
        "description": "\n    Updates underwriter review workflow on spot for a given revision\n\n    Parameters\n    ----------\n    revision_id : str\n        The UUID of an existing Revision\n    workflow_event : str\n        Symbol representing an event accepted by the workflow state machine:\n            - UW_REVIEW_REQUESTED\n            - UW_REVIEW_APPROVED\n            - UW_REVIEW_DECLINED\n            - AGENT_ACK\n    event_context : dict\n        Contains details for potential side-effects of state transitions\n        ::\n            {\n                \"uw_message\": str, # message from the UnderWriter about why the policy is declined or approved\n                \"request_reason\": str, # message from the Agent about why he is requesting a review\n            }\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    data : dict\n        ::\n\n            {\n                \"prev_state\": str,\n                \"curr_state\": str,\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "revision_id": {
                    "type": "string"
                  },
                  "workflow_event": {
                    "type": "string"
                  },
                  "event_context": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/update_revision_contact": {
      "post": {
        "summary": "update_revision_contact",
        "tags": [
          "policies"
        ],
        "description": "\n    Stores a contact into the specified contact entry on revision, or remove any currently stored contact from it.\n\n    Parameters\n    ----------\n    x_revisions_contact_id : str\n        UUID of the contact entry. Call `/api/v2/policies/new_revision_contact` to create one on the revision.\n    contact_id : Optional[str]\n        Optional. UUID of the contact to be stored into the contact entry.\n        If not provided or null value, any currently stored contact will be removed from the specified contact entry.\n    contact_role : Optional[str]\n        Optional. When storing a contact, it ensures the stored contact has the specified contact role; if not provided,\n        it defaults to a random role the contact already has, or returns an error if the contact has no role.\n        When removing a contact, it has to be one of the roles of the currently stored contact; if not provided, it\n        defaults to a random role the currently stored contact has. The specified role name will be posted on Policy\n        Notes. Consult `/api/v2/contacts/retrieve_all_roles` for the list of all available contact roles.\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not.\n    message : list[str]\n        Human-readable messages.\n    data : dict\n        Detailed side effects of the update.\n        ::\n        {\n            \"bill_whom_removed\": bool,  // Indicate if the billing contact was removed due to this update\n            \"items_removed\": bool,  // Indicate if any builder items were removed because agency billing was set\n            \"items_added\": bool,  // Indicate if any mandatory builder items were added because agency billing was unset\n            \"updated_rating_items\": {  // Optional. Contain details of the builder items after the update,\n                                       // only if items_removed or items_added is true.\n                \"policy\": {\n                    \"items\": [...],  // Refer to \"items\" under `/api/v2/policies/retrieve_revision_details`\n                    \"sub_lines\": [...]  // Refer to \"sub_lines\" under `/api/v2/policies/retrieve_revision_details`\n                },\n                \"prop\": {\n                    <Property UUID>: {\n                        \"items\": [...],  // Refer to \"items\" under `/api/v2/policies/retrieve_risk_details`\n                        \"sub_lines\": [...]  // Refer to \"sub_lines\" under `/api/v2/policies/retrieve_risk_details`\n                    }, ...\n                }\n            },\n            \"commission\": {  // Optional. Only available if the determined contact role is Agent or Agency\n                \"override_commission\": bool,  // Indicate if the commission is manually overridden on this revision\n                \"commission_rate_adjustment\": Optional[str],  // Any applied commission rate adjustment,\n                                                              // rounded to 4 decimal places\n                \"commission_rate\": str  // The applicable commission rate on this revision, rounded to 4 decimal places\n            }\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "x_revisions_contact_id": {
                    "type": "string"
                  },
                  "contact_id": {
                    "type": "string"
                  },
                  "contact_role": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/update_underwriting_options": {
      "post": {
        "summary": "update_underwriting_options",
        "tags": [
          "policies"
        ],
        "description": "\n    Parameters\n    ----------\n    revision_id : str\n    underwriting_options:\n\n    Returns\n    -------\n    data : dict\n        The data response having the form:\n        ::\n        { 'done': True }\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "revision_id": {
                    "type": "string"
                  },
                  "underwriting_options": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/update_underwriting_questions": {
      "post": {
        "summary": "update_underwriting_questions",
        "tags": [
          "policies"
        ],
        "description": "Updates underwriting questions on spot for a given revision\n\n    Parameters\n    ----------\n    revision_id : str\n        The ID of the revision\n    underwriting_questions: Array of dicts\n        An array that holds an dict object with questionId yesNoAnswer and explanation\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    message : str\n        Human-readable messages with error.\n    data : []\n        Empty Array\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "revision_id": {
                    "type": "string"
                  },
                  "underwriting_questions": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/validate_and_get_billing_schedule": {
      "post": {
        "summary": "validate_and_get_billing_schedule",
        "tags": [
          "policies"
        ],
        "description": "Validate and determine the billing schedule to use.\n\n    This function handles the billing schedule logic for both stateful and stateless\n    create_quote_extended flows. It validates the provided billing schedule (if any)\n    and returns the appropriate schedule ID to use based on the policy type settings.\n\n    Parameters\n    ----------\n    billing_schedule_name_from_request : str or None\n        The billing schedule name/label from the API request (quote_info['billing_schedule'])\n    policy_type : PolicyType\n        The policy type object with billing_schedule_in_rating flag\n    error_data : list, optional\n        Error data to include in error responses (defaults to empty list)\n\n    Returns\n    -------\n    tuple\n        (billing_schedule_id, error_response)\n        - If successful: (str, None) - the billing schedule ID to use\n        - If error: (None, dict) - standard error response\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "billing_schedule_name_from_request": {
                    "type": "string"
                  },
                  "policy_type": {
                    "type": "string"
                  },
                  "error_data": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policies/vehicle_in_force_status": {
      "post": {
        "summary": "vehicle_in_force_status",
        "tags": [
          "policies"
        ],
        "description": "Which of this carrier's policies is a vehicle on, and is each policy's\n    coverage active on a date? (BC-23144 - backs the NCIVS insurance\n    verification adapter.)\n\n    BriteCore is a pure data source here: it reports facts about its own book\n    only. All verification-protocol concerns (CONFIRMED/UNCONFIRMED verdicts,\n    reason codes) live in the calling adapter, so this endpoint never asserts\n    a vehicle is uninsured nor why coverage is inactive.\n\n    Request/response schemas:\n    lib/api/api_specs/request-vehicle_in_force_status.json and\n    lib/api/api_specs/response-vehicle_in_force_status.json.\n\n    Parameters\n    ----------\n    vehicle_vin : str\n        Required. Matched case/whitespace-insensitively.\n    as_of_date : str\n        Required. The YYYY-MM-DD date coverage is checked for; any in-term\n        date is supported (lapse-aware reconstruction, not snapshot lookup).\n    policy_type_ids : list of str, optional\n        Hard filter pushed into the SQL - only these policy types are\n        considered. The integration instance owns which policy types are\n        reportable and passes the list in. Omitted -> all policy types are\n        returned and the caller filters on ``policy_type_id``.\n\n    Returns\n    -------\n    dict\n        ``{'matches': [{'policy_number', 'policy_type_id', 'in_force'}]}`` -\n        one entry per policy the vehicle is on **on the revision effective\n        that date** (a VIN endorsed off earlier, or added later, yields no\n        entry). ``in_force`` is False when the policy exists but coverage is\n        inactive on the date (committed cancellation, or a date inside a\n        cancel/reinstate gap).\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-vehicle_in_force_status"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-vehicle_in_force_status"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policy_types/create_line": {
      "post": {
        "summary": "create_line",
        "tags": [
          "policy_types"
        ],
        "description": "\n    Creates a new line with line definition.\n\n    Args:\n        line_payload: Dictionary containing line creation data\n\n    Returns:\n        Standard response with created line data including line_definition_code\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-create_line"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-create_line"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policy_types/create_policy_type_relation": {
      "post": {
        "summary": "create_policy_type_relation",
        "tags": [
          "policy_types"
        ],
        "description": "Create new policy type relation.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-create_policy_type_relation"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-create_policy_type_relation"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policy_types/get_coverage_type": {
      "post": {
        "summary": "get_coverage_type",
        "tags": [
          "policy_types"
        ],
        "description": "get_coverage_type",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policy_types/list_available_coverages": {
      "post": {
        "summary": "list_available_coverages",
        "tags": [
          "policy_types"
        ],
        "description": "list_available_coverages",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policy_types/list_available_sub_lines": {
      "post": {
        "summary": "list_available_sub_lines",
        "tags": [
          "policy_types"
        ],
        "description": "list_available_sub_lines",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policy_types/list_coverage_types": {
      "post": {
        "summary": "list_coverage_types",
        "tags": [
          "policy_types"
        ],
        "description": "list_coverage_types",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policy_types/list_filtered_policy_types": {
      "post": {
        "summary": "list_filtered_policy_types",
        "tags": [
          "policy_types"
        ],
        "description": "Returns a list of filtered policy types based on the request parameters.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policy_types/list_policy_type_definitions": {
      "post": {
        "summary": "list_policy_type_definitions",
        "tags": [
          "policy_types"
        ],
        "description": "Return all policy type definitions.\n\n    Schemas: api_specs/request-list_policy_type_definitions.json, response-list_policy_type_definitions.json.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-list_policy_type_definitions"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-list_policy_type_definitions"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policy_types/remove_policy_type_relations": {
      "post": {
        "summary": "remove_policy_type_relations",
        "tags": [
          "policy_types"
        ],
        "description": "Remove policy type relations by relation type.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-remove_policy_type_relations"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-remove_policy_type_relations"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policy_types/retrieve_policy_types": {
      "post": {
        "summary": "retrieve_policy_types",
        "tags": [
          "policy_types"
        ],
        "description": "Return a list of policy types, optionally scoped to a single effective date or a date cursor.\n\n    Parameters\n    ----------\n    effective_date_id: str, optional\n        If provided, only policy types belonging to this effective date are returned.\n        Useful for callers (e.g. the rules-ingestion job form) that already know\n        the effective-date scope and would otherwise pull the full tenant catalog\n        and filter client-side.\n    date_cursor: date, optional\n        If provided, resolves policy types the way quoting does: the governing effective\n        date for this date, including policy types inherited from an earlier effective date\n        that did not redefine them (gaps, BC-14373). Takes precedence over effective_date_id\n        if both are sent.\n\n    Returns\n    -------\n    success: bool\n        True if the request was successful\n    messages: list of str\n        Error messages\n    data: list of dict\n        id: str, id of the policy type\n        name: str, name of the policy type\n        effective_date_id: str, id of the effective date\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-retrieve_policy_types"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-retrieve_policy_types"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/policy_types/update_quick_codes": {
      "post": {
        "summary": "update_quick_codes",
        "tags": [
          "policy_types"
        ],
        "description": "update_quick_codes",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/premium_finance_companies/create": {
      "post": {
        "summary": "create",
        "tags": [
          "premium_finance_companies"
        ],
        "description": "create",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/premium_finance_companies/delete": {
      "post": {
        "summary": "delete",
        "tags": [
          "premium_finance_companies"
        ],
        "description": "delete",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/premium_finance_companies/get": {
      "post": {
        "summary": "get",
        "tags": [
          "premium_finance_companies"
        ],
        "description": "get",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/premium_finance_companies/list_for_quote": {
      "post": {
        "summary": "list_for_quote",
        "tags": [
          "premium_finance_companies"
        ],
        "description": "list_for_quote",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/premium_finance_companies/update": {
      "post": {
        "summary": "update",
        "tags": [
          "premium_finance_companies"
        ],
        "description": "update",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/printing/create_mailings": {
      "post": {
        "summary": "create_mailings",
        "tags": [
          "printing"
        ],
        "description": "Run the create_mailings process for all or a specific policy.\n\n    Parameters\n    ----------\n    on_date : str\n        Process date in MM/DD/YYYY format.\n    policy_number : str\n        Policy number to process, or empty for all policies.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "on_date": {
                    "type": "string"
                  },
                  "policy_number": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/prior_policies/list_prior_policies": {
      "post": {
        "summary": "list_prior_policies",
        "tags": [
          "prior_policies"
        ],
        "description": "list_prior_policies",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/prior_policies/update_prior_policy": {
      "post": {
        "summary": "update_prior_policy",
        "tags": [
          "prior_policies"
        ],
        "description": "update_prior_policy",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quick_code_values/create_quick_code_value": {
      "post": {
        "summary": "create_quick_code_value",
        "tags": [
          "quick_code_values"
        ],
        "description": "\n    Create a new quick code value.\n\n    The quick code must exist and have codeAccessLevel of 'user' or 'extensible',\n    and codeType must be 'list'.\n\n    Args:\n        quick_code_value: dict containing:\n            - code_value_type (required): The unique identifier for this value\n            - quick_code (required): The quick code this value belongs to\n            - label (required): Display label for the value\n            - description (optional): Description of the value\n            - active (optional, default True): Whether the value is active\n            - default (optional, default False): Whether this is the default value\n            - sort_order (optional): Order for display\n\n    Returns:\n        The created quick code value\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-create_quick_code_value"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-create_quick_code_value"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quick_code_values/delete_quick_code_value": {
      "post": {
        "summary": "delete_quick_code_value",
        "tags": [
          "quick_code_values"
        ],
        "description": "\n    Delete a user-created quick code value.\n\n    System default values cannot be deleted.\n    Values that are referenced by other tables cannot be deleted.\n\n    Args:\n        code_value_type: The code value type to delete\n        quick_code: The quick code the value belongs to\n\n    Returns:\n        Success message\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-delete_quick_code_value"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-delete_quick_code_value"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quick_code_values/list_definition_overrides": {
      "post": {
        "summary": "list_definition_overrides",
        "tags": [
          "quick_code_values"
        ],
        "description": "Schemas: api_specs/request-list_definition_overrides.json,\n    api_specs/response-list_definition_overrides.json.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-list_definition_overrides"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-list_definition_overrides"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quick_code_values/list_quick_code_values": {
      "post": {
        "summary": "list_quick_code_values",
        "tags": [
          "quick_code_values"
        ],
        "description": "Schemas: api_specs/request-list_quick_code_values.json,\n    api_specs/response-list_quick_code_values.json.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-list_quick_code_values"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-list_quick_code_values"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quick_code_values/save_definition_quick_code_value_toggle": {
      "post": {
        "summary": "save_definition_quick_code_value_toggle",
        "tags": [
          "quick_code_values"
        ],
        "description": "Schemas: api_specs/request-save_definition_quick_code_value_toggle.json,\n    api_specs/response-save_definition_quick_code_value_toggle.json.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-save_definition_quick_code_value_toggle"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-save_definition_quick_code_value_toggle"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quick_code_values/save_remove_value_from_definitions_and_deactivate": {
      "post": {
        "summary": "save_remove_value_from_definitions_and_deactivate",
        "tags": [
          "quick_code_values"
        ],
        "description": "Schemas: api_specs/request-save_remove_value_from_definitions_and_deactivate.json,\n    api_specs/response-save_remove_value_from_definitions_and_deactivate.json.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-save_remove_value_from_definitions_and_deactivate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-save_remove_value_from_definitions_and_deactivate"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quick_code_values/save_reset_definition_quick_code_values": {
      "post": {
        "summary": "save_reset_definition_quick_code_values",
        "tags": [
          "quick_code_values"
        ],
        "description": "Schemas: api_specs/request-save_reset_definition_quick_code_values.json,\n    api_specs/response-save_reset_definition_quick_code_values.json.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-save_reset_definition_quick_code_values"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-save_reset_definition_quick_code_values"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quick_code_values/update_quick_code_value": {
      "post": {
        "summary": "update_quick_code_value",
        "tags": [
          "quick_code_values"
        ],
        "description": "update_quick_code_value",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quick_codes/list_quick_codes": {
      "post": {
        "summary": "list_quick_codes",
        "tags": [
          "quick_codes"
        ],
        "description": "list_quick_codes",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quick_codes/update_quick_code": {
      "post": {
        "summary": "update_quick_code",
        "tags": [
          "quick_codes"
        ],
        "description": "update_quick_code",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quick_quote_templates/add_template_to_policy_type": {
      "post": {
        "summary": "add_template_to_policy_type",
        "tags": [
          "quick_quote_templates"
        ],
        "description": "Associate a Quick Quote Template with a Policy Type",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-add_template_to_policy_type"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-add_template_to_policy_type"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quick_quote_templates/create_quick_quote_template": {
      "post": {
        "summary": "create_quick_quote_template",
        "tags": [
          "quick_quote_templates"
        ],
        "description": "Create a new Quick Quote Template",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-create_quick_quote_template"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-create_quick_quote_template"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quick_quote_templates/create_template_risk_default_value": {
      "post": {
        "summary": "create_template_risk_default_value",
        "tags": [
          "quick_quote_templates"
        ],
        "description": "Create a new Template Risk Default Value",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-create_template_risk_default_value"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-create_template_risk_default_value"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quick_quote_templates/delete_quick_quote_template": {
      "post": {
        "summary": "delete_quick_quote_template",
        "tags": [
          "quick_quote_templates"
        ],
        "description": "Delete a Quick Quote Template",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-delete_quick_quote_template"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-delete_quick_quote_template"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quick_quote_templates/delete_template_risk_default_value": {
      "post": {
        "summary": "delete_template_risk_default_value",
        "tags": [
          "quick_quote_templates"
        ],
        "description": "Delete a Template Risk Default Value",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-delete_template_risk_default_value"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-delete_template_risk_default_value"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quick_quote_templates/get_quick_quote_template": {
      "post": {
        "summary": "get_quick_quote_template",
        "tags": [
          "quick_quote_templates"
        ],
        "description": "Get a Quick Quote Template by ID",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_quick_quote_template"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_quick_quote_template"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quick_quote_templates/list_quick_quote_templates": {
      "post": {
        "summary": "list_quick_quote_templates",
        "tags": [
          "quick_quote_templates"
        ],
        "description": "List all Quick Quote Templates",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-list_quick_quote_templates"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-list_quick_quote_templates"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quick_quote_templates/update_quick_quote_template": {
      "post": {
        "summary": "update_quick_quote_template",
        "tags": [
          "quick_quote_templates"
        ],
        "description": "Update an existing Quick Quote Template",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-update_quick_quote_template"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-update_quick_quote_template"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quick_quote_templates/update_template_risk_default_value": {
      "post": {
        "summary": "update_template_risk_default_value",
        "tags": [
          "quick_quote_templates"
        ],
        "description": "Update an existing Template Risk Default Value",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quote/add_flow_placeholder": {
      "post": {
        "summary": "add_flow_placeholder",
        "tags": [
          "quote"
        ],
        "description": "Add new custom placeholder to the wizard flow\n\n    Parameters\n    ----------\n        flow_id : uuid, required\n        placeholder_dict : dict, required\n    Returns\n    -------\n        success : bool\n        data : dict\n            Representation of the placeholder\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "flow_id": {
                    "type": "string"
                  },
                  "Returns": {
                    "type": "string"
                  },
                  "-------": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quote/add_quote_wizard_flow": {
      "post": {
        "summary": "add_quote_wizard_flow",
        "tags": [
          "quote"
        ],
        "description": "Adds a new Quote flow by passing a policy type ID.\n    Parameters\n    ----------\n        policy_type_id : uuid, required\n        is_endorsement: bool, default to false\n    Returns\n    -------\n        success : bool\n        data : dict\n            Representation of the newly added wizard flow\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "policy_type_id": {},
                  "is_endorsement": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quote/add_wizard_flow_section": {
      "post": {
        "summary": "add_wizard_flow_section",
        "tags": [
          "quote"
        ],
        "description": "\n        Add a section to the current flow definition\n        ----------\n        flow_id : The target wizard flow\n        section_name : The name from the section to be added\n        Returns\n        -------\n        success : bool\n        data : list of sections dictionary data\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "flow_id": {},
                  "section_name": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quote/batch_update_flow_sections": {
      "post": {
        "summary": "batch_update_flow_sections",
        "tags": [
          "quote"
        ],
        "description": "\n        Update the sections list in the definition Json within the given flow\n        ----------\n        flow_id : The target wizard flow\n        section_list : The list of sections in the desired order\n        Returns\n        -------\n        success : bool\n        data : dict - the dictionary de flow data\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "flow_id": {},
                  "section_list": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quote/copy_wizard_flows": {
      "post": {
        "summary": "copy_wizard_flows",
        "tags": [
          "quote"
        ],
        "description": "copy_wizard_flows",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "source_policy_type_id": {},
                  "target_policy_type_id": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quote/create_flow_from_quote_flow": {
      "post": {
        "summary": "create_flow_from_quote_flow",
        "tags": [
          "quote"
        ],
        "description": "Create an endorsement flow based on a existing quote_flow.\n    Parameters\n    ----------\n        quote_flow_id : uuid, required\n    Returns\n    -------\n        success : bool\n        data : dict\n            Representation of the newly added endorsement wizard flow\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "quote_flow_id": {},
                  "endorsement": {},
                  "admin": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quote/delete_quote_wizard_flow": {
      "post": {
        "summary": "delete_quote_wizard_flow",
        "tags": [
          "quote"
        ],
        "description": "\n    Deletes wizard flow.\n\n    Parameters\n    ----------\n        id: uuid, required\n\n    Returns\n    -------\n        success : bool\n        messages : list\n            List of human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quote/get_flow_features": {
      "post": {
        "summary": "get_flow_features",
        "tags": [
          "quote"
        ],
        "description": "\n    Parameters\n    ----------\n        flow_id : wizard_flow.id, required\n    Returns\n    -------\n        success : bool\n        data : list of features and their attributes\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "flow_id": {
                    "type": "string"
                  },
                  "Returns": {
                    "type": "string"
                  },
                  "-------": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quote/get_flow_placeholders": {
      "post": {
        "summary": "get_flow_placeholders",
        "tags": [
          "quote"
        ],
        "description": "get all placeholders for a given flow\n\n    Parameters\n    ----------\n        flow_id : uuid, required\n    Returns\n    -------\n        success : bool\n        data : list, list of placeholder dictionaries.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "flow_id": {
                    "type": "string"
                  },
                  "Returns": {
                    "type": "string"
                  },
                  "-------": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quote/get_property_quote_integration_dependencies": {
      "post": {
        "summary": "get_property_quote_integration_dependencies",
        "tags": [
          "quote"
        ],
        "description": "\n    Get all dependencies for a given property and integration instance.\n\n    Parameters\n    ----------\n    property_id : str, required\n        The target property id (uuid) - required\n    integration_id : str, required\n        The target integration instance id (uuid) - required\n\n    Returns\n    -------\n    success : bool\n    data : dict - the dictionary containing the dependencies\n        {\n            \"dependencies\": [{\n                \"value\": str,  // the category or user input value\n                \"itemId\": str,  // the item id\n                ...  // category or user input definitions\n                \"integrationSelectionOptions\": {\n                    \"options\": [str, str, ...],\n                    \"displaySuffixes\": [str, str, ...]\n                }\n            }]\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "property_id": {
                    "type": "string"
                  },
                  "integration_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quote/get_quote_wizard_flow": {
      "post": {
        "summary": "get_quote_wizard_flow",
        "tags": [
          "quote"
        ],
        "description": "Returns the corresponding quote wizard flow matching the filtering criteria\n\n    Parameters\n    ----------\n        policy_type_id : str, optional\n        role_id : str, optional\n        is_endorsement: bool, default to false\n    Returns\n    -------\n        success : bool\n        messages : list\n            List of human-readable error messages\n        data : dict\n            the wizard flow matchig the filter parameters or the default flow in case none are specified\n            ::\n            {\n                \"id\" : uuid\n                \"version\" : str, the uispec version of this flow\n                \"sections\" : list, list with the sections information\n                \"placeholders\" : dict, a map of placeholders and their values\n                \"customizers\" : list, each element is as dict containing information to load a customizer\n                \"features\" : str, javascript code for the uispec features\n                \"link_overrides\" : dict\n                \"meta\" : dict\n                    policy_type_id : uuid\n                    role_id : uuid\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "policy_type_id": {
                    "type": "string"
                  },
                  "Returns": {
                    "type": "string"
                  },
                  "-------": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quote/get_quote_wizard_flows": {
      "post": {
        "summary": "get_quote_wizard_flows",
        "tags": [
          "quote"
        ],
        "description": "Returns all quote wizard flows\n\n    Parameters\n    ----------\n        include : str, optional\n            Comma-separated list of models to include in the meta field. Available: PolicyType, EffectiveDate\n\n    Returns\n    -------\n        list : all wizard flows\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "include": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quote/get_wizard_flow_sections": {
      "post": {
        "summary": "get_wizard_flow_sections",
        "tags": [
          "quote"
        ],
        "description": "\n        Get all wizard sections\n        ----------\n        flow_id : The target wizard flow\n        Returns\n        -------\n        success : bool\n        data : list of section dictionaries\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "flow_id": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quote/patch_flow_definition": {
      "post": {
        "summary": "patch_flow_definition",
        "tags": [
          "quote"
        ],
        "description": "Patches a flow's definition. Fields that are not specified as left intact.\n    Parameters\n    __________\n        id : uuid, required\n        endorsement : boolean, required\n        definition: dict, required\n            A dict with the parts of the flow definition to be updated. For a example, a definition like:\n            ```\n            {\n                {\n                    \"features\": [...]\n                }\n            }\n            ```\n            will patch only the `features` field. The other definition fields will stay the same.\n    Returns\n    -------\n        success : bool\n        messages : list\n            List of human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {},
                  "is_endorsement": {},
                  "definition": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quote/patch_flow_feature_attribute": {
      "post": {
        "summary": "patch_flow_feature_attribute",
        "tags": [
          "quote"
        ],
        "description": "\n    Update the feature attribute value\n    Parameters\n    ----------\n        attr_dict : dictionary with relevant data, required\n        should have the fields:\n        flow_id - the current flow of the feature.\n        id - The attribute Id\n        value - the value to be changed\n        key - the key of the changed value\n    Returns\n    -------\n        success : bool\n        data : dict - the dictionary containing the updated attribute data\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "attr_dict": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quote/patch_flow_features": {
      "post": {
        "summary": "patch_flow_features",
        "tags": [
          "quote"
        ],
        "description": "\n    Update the feature display label and description\n    Parameters\n    ----------\n        feature_dict : dictionary with relevant data, required\n        should have the fields:\n        id - The feature Id\n        flow_id - the wizard flow id\n        label - the feature label\n        display_label - the display label to be changed\n        description - the descriptition to be changed\n        Returns\n    -------\n    success : bool\n    data : dict - the dictionary containing the updated feature\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "feature_dict": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quote/patch_placeholder": {
      "post": {
        "summary": "patch_placeholder",
        "tags": [
          "quote"
        ],
        "description": "Update placeholders\n\n    Parameters\n    ----------\n        placeholder_dict : dict, required\n    Returns\n    -------\n        success : bool\n        data : dict\n            Representation of the placeholder\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "placeholder_dict": {
                    "type": "object"
                  },
                  "Returns": {
                    "type": "string"
                  },
                  "-------": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quote/remove_wizard_flow_section": {
      "post": {
        "summary": "remove_wizard_flow_section",
        "tags": [
          "quote"
        ],
        "description": "\n        Remove a section from the current flow definition\n        ----------\n        flow_id : The target wizard flow\n        section_name : The name from the section to be added\n        Returns\n        -------\n        success : bool\n        data : list of sections dictionary data\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "flow_id": {},
                  "section_name": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quotes/associate_agentcy_to_quote": {
      "post": {
        "summary": "associate_agentcy_to_quote",
        "tags": [
          "quotes"
        ],
        "description": "associate_agentcy_to_quote",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quotes/bind_full_quote": {
      "post": {
        "summary": "bind_full_quote",
        "tags": [
          "quotes"
        ],
        "description": "\n    Bind a full quote with all the necessary information.\n\n    Two tenant advanced settings, enforced at the shared new-business bind\n    choke point (``QuoteService.bind_quote``), can additionally gate this bind.\n    They govern every new-business bind path identically (this API and the\n    agent UI new-business submit); mid-term change/endorsement binds\n    (``submit_change``) are out of scope and unaffected. Both DEFAULT OFF, so\n    behavior is unchanged until a tenant opts in:\n\n    * ``integrations`` / ``contact-screening-require-completion-before-bind``:\n      refuse the bind unless every in-scope contact has a currently complete\n      screening result (``complete_pass`` or ``complete_overridden``).\n      IMPORTANT for programmatic binders: the pre-existing implicit OFAC\n      hit-block (``_agent_submission_locked`` in ``lib/agent/utils.py``, which\n      evaluates screening and refuses on ``review_required`` hits) DOES run on\n      this path - ``bind_full_quote`` -> ``submit_full_quote`` ->\n      ``bind_quote`` reaches it via ``agent_submission('application')``. But it\n      is only EFFECTIVE on the agent-UI submit, which surfaces the returned\n      failure dict; on the programmatic path only the gate's\n      ``restrictionReason`` refusals (suspension / limit) become an error, and\n      the hit-block sets none, so it is a no-op here and a ``flagged`` contact\n      will bind. That makes this setting\n      the ONLY effective bind-time OFAC enforcement on the programmatic API: a\n      binder that leaves it OFF gets no bind-time OFAC protection, and one that\n      wants it MUST enable it. On the agent-UI path the setting is additive and\n      stricter than the hit-block (it also refuses ``never_screened`` /\n      ``expired`` / ``data_mismatch``, not just hits).\n    * ``policies`` / ``enforce-business-rules-at-bind``: gate the bind by the\n      KNOCKOUT business rules (disallowed category options, required /\n      List-``Disallow`` supplemental-question knockouts, and revision-level\n      underwriting prevent-continue blocks). It intentionally does NOT enforce\n      the completeness/boundary checks (item mandatoriness, multiplicity,\n      deductible/limit boundaries): those are build-time input guards that\n      false-positive on a fully rated quote, so enforcing them at bind would\n      reject the existing book. When either gate trips, the bind is refused\n      with a ``BCGlobalValidationError``.\n\n    Parameters\n    ----------\n    id : str, optional\n        Revision id.\n    external_system_reference : str, optional\n        Caller-side reference, alternative to ``id``.\n    submit_bound : bool, optional\n        Whether the policy should be submitted as bound (legacy behavior).\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-bind_full_quote"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-bind_full_quote"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quotes/copy_quote": {
      "post": {
        "summary": "copy_quote",
        "tags": [
          "quotes"
        ],
        "description": "copy_quote",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quotes/create_and_rate_endorsement_quote": {
      "post": {
        "summary": "create_and_rate_endorsement_quote",
        "tags": [
          "quotes"
        ],
        "description": "create_and_rate_endorsement_quote",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-create_and_rate_endorsement_quote"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-create_and_rate_endorsement_quote"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quotes/create_and_rate_full_quote": {
      "post": {
        "summary": "create_and_rate_full_quote",
        "tags": [
          "quotes"
        ],
        "description": "Create and rate a full quote without committing to the database.\n\n    Both modes can run through the unified engine, each behind its own\n    advanced setting (default off; flipping back is the rollback): the\n    STATELESS mode (rate_quote=true too) on the rate-only pipeline, the\n    STATEFUL mode on the persist branch with the response read back by\n    the legacy retrieve -- the flag alone routes (the per-feature\n    capability gate is gone; underlying-policy copy and template risks\n    resolve in input space). rate_quote=false always stays legacy (an\n    unrated create is persistence-only).\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-create_and_rate_full_quote"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-create_and_rate_full_quote"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quotes/create_endorsement_quote": {
      "post": {
        "summary": "create_endorsement_quote",
        "tags": [
          "quotes"
        ],
        "description": "\n    Create an endorsement quote with all the necessary information.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-create_endorsement_quote"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-create_endorsement_quote"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quotes/create_full_quote": {
      "post": {
        "summary": "create_full_quote",
        "tags": [
          "quotes"
        ],
        "description": "\n    Create a full quote with all the necessary information.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-create_full_quote"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-create_full_quote"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quotes/create_full_quote_async": {
      "post": {
        "summary": "create_full_quote_async",
        "tags": [
          "quotes"
        ],
        "description": "Validate a full-quote payload synchronously, then offload heavy creation to Celery.\n\n    Returns immediately with a ``reference_id`` the caller polls via\n    :func:`get_full_quote_async_status`.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-create_full_quote_async"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-create_full_quote_async"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quotes/create_renewal_quote": {
      "post": {
        "summary": "create_renewal_quote",
        "tags": [
          "quotes"
        ],
        "description": "\n    Create a renewal quote using the latest committed or pending revision.\n\n    Request:\n        - Quote ID or Quote Exref or Policy Number.\n    Response:\n        - Full Quote response.\n    Validations:\n        - Renewal can only be created on the latest committed or pending revision.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-create_renewal_quote"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-create_renewal_quote"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quotes/delete_full_quote": {
      "post": {
        "summary": "delete_full_quote",
        "tags": [
          "quotes"
        ],
        "description": "\n    Delete a full quote with all the necessary information.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-delete_full_quote"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-delete_full_quote"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quotes/delete_quote": {
      "post": {
        "summary": "delete_quote",
        "tags": [
          "quotes"
        ],
        "description": "delete_quote",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quotes/evaluate_contact_screening": {
      "post": {
        "summary": "evaluate_contact_screening",
        "tags": [
          "quotes"
        ],
        "description": "\n    Evaluate contact screening for a quote or revision.\n\n    Parameters\n    ----------\n    id : str\n        ID of the quote or revision to evaluate contact screening for\n    skip_integrations : bool, optional\n        If True, skip external integration calls and only use existing screening results.\n        Defaults to False.\n\n    Returns\n    -------\n    dict\n        Screening results\n        {\n            \"screening_contacts\": [...],\n            \"all_results\": [...],\n            \"review_required_results\": [...]\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-evaluate_contact_screening"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-evaluate_contact_screening"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quotes/generate_quote": {
      "post": {
        "summary": "generate_quote",
        "tags": [
          "quotes"
        ],
        "description": "Generate a quote through the unified engine (plan.md 1A.14).\n\n    NOTE: decorated with ``log_payload_params=False`` -- the quote payload\n    (multi-KB, insured PII) and the full rated response would otherwise be\n    JSON-serialized into the INFO logs twice per request (file + stdout\n    handlers). Both are recoverable from ``stateless_quotes`` (``input_data``\n    encrypted, ``output_data``) when ``save_stateless_quote`` is on, so the\n    logs only need the received/completed markers, path, and timing.\n\n    Authorization -- ``create_quote_extended`` parity: gateway authentication\n    only (any valid api key or session), NO endpoint-level permission check.\n    The graduated ``britecore/policies/newPolicy`` gate was enforced briefly\n    and removed (plan.md 1A.14): api-key\n    principals carry no permissions tree for the path engine to evaluate, so\n    on restrictive-engine sites the check denied EVERY integration -- the\n    endpoint's primary callers. Re-gating waits on an api-key story in the\n    permission engine.\n\n    Takes ONE of:\n      - ``quote_info``: a ``create_quote_extended``-shaped payload (names) --\n        translated by ``RequestSource``;\n      - ``quote``: the canonical ``CreateFullQuoteRequestModel`` JSON (ids) --\n        deserialized directly by ``CanonicalSource``.\n\n    Rate-only through the FULL unified pipeline (Source -> canonical\n    CreateFullQuoteRequest -> vendor enrichment -> ItemBuilderCore mutating\n    the working Quote -> UWR core-routing loop -> rating projection ->\n    rate_line_items_in_memory). Enrichment (geocoding + per-insured credit\n    reports via ``VendorIntegrationService``, all enabled vendor calls in ONE\n    PARALLEL batch) is fail-open: vendor degradation lands in the response's\n    ``warnings`` list (and in ``stateless_quotes.messages`` when saving),\n    never as a failed quote (FR-13/AS-29).\n\n    Two INDEPENDENT persistence flags; the pipeline itself stays rate-only:\n      - ``save_stateless_quote`` -- the STATELESS terminal: one row in\n        ``stateless_quotes`` (raw payload as encrypted input_data, rating\n        result + '_unified' UWR sidecar as output_data, origin='canonical');\n        the response carries ``stateless_quote_id``. Defaults ON -- an absent\n        key saves; the dry run (rate-only, no row written) is opt-in via an\n        explicit ``save_stateless_quote=false``. A non-boolean value is\n        rejected (``ensure_boolean``) so a stringy ``\"false\"`` cannot\n        silently persist a caller's intended dry run.\n      - ``save_full_quote=true`` -- the STATEFUL terminal (1A quote+bind\n        branch): ``QuoteService.quote_and_persist`` runs the same pipeline\n        with stateful seeding semantics (DEFAULT items included, BL-2) and\n        ``QuotePersister`` writes the real graph -- Policy + PolicyTerm +\n        Revision + properties + the quote's items/sub-lines -- then numbering\n        and billing. The response carries ``revision_id`` / ``policy_id`` /\n        ``policy_number``. With both flags on, the saved row is linked to the\n        created revision via ``revision_id``.\n\n    The response also carries the rating result (same shape as the stateless\n    output, for side-by-side comparison), the surfaced UWR outcome, and the\n    quote's serialized items/sub-lines (what ``save_full_quote`` writes).\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quotes/get_applicable_forms": {
      "post": {
        "summary": "get_applicable_forms",
        "tags": [
          "quotes"
        ],
        "description": "\n    Return the read-only set of forms applicable to a quote's revision.\n\n    Each row carries the ``form_id`` (``File.id``) and a ``has_preview``\n    hint; the wizard frontend (``applicable-forms.vue``) builds the\n    download URL with the standard ``core.uploads.getAttachment`` gateway\n    shape used everywhere else for File downloads, so frontend routing\n    stays out of the backend response.\n\n    The list itself is the server-side applicability gate: the wizard can\n    only ever open previews for ``form_id`` values it receives here, so we\n    don't need a separate per-form re-validation endpoint.\n\n    Eligibility mirrors commit-time generation; this endpoint does not\n    commit, render PDFs, or otherwise mutate the quote.\n\n    Parameters\n    ----------\n    quote_id : str\n        Revision id of the in-progress quote.\n\n    Returns\n    -------\n    dict\n        ``forms`` is the list of applicable forms; ``revision_updated_at``\n        is the staleness signal the frontend captures on load and compares\n        against the next ``rate_quote`` to decide whether the list needs\n        a refresh.\n        {\n            \"forms\": [\n                {\n                    \"form_id\": str,\n                    \"form_number\": str,\n                    \"form_title\": str,\n                    \"form_type\": str,\n                    \"applicability\": str,\n                    \"edition_number\": str,\n                    \"description\": str,\n                    \"has_preview\": bool,\n                    \"mime_type\": str,\n                },\n                ...\n            ],\n            \"revision_updated_at\": str | None,\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_applicable_forms"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_applicable_forms"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quotes/get_contact_screening_status": {
      "post": {
        "summary": "get_contact_screening_status",
        "tags": [
          "quotes"
        ],
        "description": "\n    Report the current contact-screening completeness for a revision, without\n    making any vendor calls.\n\n    Distinct from :func:`evaluate_contact_screening`, which calls the\n    vendor for any contact missing a valid result (side effects +\n    integration cost). This endpoint is pure read against persisted\n    state, so callers can pre-check before bind and decide whether to\n    invoke ``evaluate_contact_screening``, prompt for an override, fix\n    contact data, or proceed.\n\n    The per-contact ``status`` is one of the ``SCREENING_VERIFICATION_STATUS_*``\n    values; ``complete_pass`` and ``complete_overridden`` are the only\n    statuses that count as complete. ``vendor_message`` is surfaced verbatim\n    on ``flagged`` rows so callers can distinguish a confirmed sanctions hit\n    from an ambiguous / insufficient-data response.\n\n    Parameters\n    ----------\n    id : str\n        Revision id.\n\n    Returns\n    -------\n    dict\n        {\n            \"revision_id\": str,\n            \"all_complete\": bool,\n            \"screening_enabled\": bool,\n            \"integration_configured\": bool,\n            \"tenant_reason\": str|null,\n            \"contacts\": [\n                {\n                    \"contact_id\": str,\n                    \"contact_name\": str,\n                    \"status\": str,\n                    \"is_complete\": bool,\n                    \"reason\": str,\n                    \"vendor_message\": str|null,\n                    \"screened_at\": iso8601|null,\n                    \"screening_check_result_id\": str|null,\n                    \"has_valid_override\": bool\n                }\n            ]\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_contact_screening_status"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_contact_screening_status"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quotes/get_estimated_quote": {
      "post": {
        "summary": "get_estimated_quote",
        "tags": [
          "quotes"
        ],
        "description": "Return estimated quote for the given quote.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_estimated_quote"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_estimated_quote"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quotes/get_full_quote_async_status": {
      "post": {
        "summary": "get_full_quote_async_status",
        "tags": [
          "quotes"
        ],
        "description": "Poll for the status of an async quote creation job.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_full_quote_async_status"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_full_quote_async_status"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quotes/get_last_prefill_quote_execution_date": {
      "post": {
        "summary": "get_last_prefill_quote_execution_date",
        "tags": [
          "quotes"
        ],
        "description": "\n    Get the last execution date of data prefill for a given policy.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_last_prefill_quote_execution_date"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_last_prefill_quote_execution_date"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quotes/get_quote": {
      "post": {
        "summary": "get_quote",
        "tags": [
          "quotes"
        ],
        "description": "get_quote",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quotes/get_quote_properties_summary": {
      "post": {
        "summary": "get_quote_properties_summary",
        "tags": [
          "quotes"
        ],
        "description": "get_quote_properties_summary",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quotes/get_quote_schema": {
      "post": {
        "summary": "get_quote_schema",
        "tags": [
          "quotes"
        ],
        "description": "FR-14 (spec 009 P2): the JSON Schema (draft-07) describing the\n    canonical ``create_full_quote`` payload for ONE policy type -- derived\n    from the same ``PolicyTypeConfigProvider`` the unified engine rates\n    from. Integrator/UI-facing; Marshmallow remains the in-process\n    validator of record.\n\n    POST /api/v2/quotes/get_quote_schema  {\"policy_type_id\": \"<uuid>\"}\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_quote_schema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quotes/get_quote_wizard_plugin": {
      "post": {
        "summary": "get_quote_wizard_plugin",
        "tags": [
          "quotes"
        ],
        "description": "get_quote_wizard_plugin",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_quote_wizard_plugin"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_quote_wizard_plugin"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quotes/get_quoting_suspension": {
      "post": {
        "summary": "get_quoting_suspension",
        "tags": [
          "quotes"
        ],
        "description": "The active \"Suspend Quoting\" message for a revision being quoted, or None (BC-24714).\n\n    The read-only companion to the enforcement points. Rating refuses, the location save refuses\n    and submission refuses, each by raising; the wizard needs the same answer without provoking a\n    raise, so that it can keep an agent out of the steps that work an unquotable quote. It returns\n    the message rather than a bare boolean so the copy stays in one place: what the wizard shows is\n    what the refusals say.\n\n    Deliberately answers about the quote as SAVED, and offers no way to ask about an address the\n    agent has merely typed. A refused address was never written, so it is not a risk the quote\n    holds, and the AC blocks the wizard when a suspension matches a risk. An earlier revision of\n    this endpoint did take a candidate location; it over-blocked a quote that was still perfectly\n    quotable, and it latched, because nothing could clear a verdict about an attempt the agent then\n    abandoned. Asking one question also means this and the rating gate cannot disagree.\n\n    Revisions that are no longer being quoted are not suspended by this action and answer None -\n    that exemption belongs to SuspensionService and is shared with the rating gate.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quotes/get_risks": {
      "post": {
        "summary": "get_risks",
        "tags": [
          "quotes"
        ],
        "description": "\n    Get all risks (Properties, Vehicles, Watercrafts) for a quote.\n    Returns a summary of each risk with type and name.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_risks"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_risks"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quotes/issue_full_quote": {
      "post": {
        "summary": "issue_full_quote",
        "tags": [
          "quotes"
        ],
        "description": "\n    Issue a full quote with all the necessary information.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-issue_full_quote"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-issue_full_quote"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quotes/list_available_offers": {
      "post": {
        "summary": "list_available_offers",
        "tags": [
          "quotes"
        ],
        "description": "list_available_offers",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quotes/modify_full_quote": {
      "post": {
        "summary": "modify_full_quote",
        "tags": [
          "quotes"
        ],
        "description": "\n    Modify a full quote with all the necessary information.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-modify_full_quote"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-modify_full_quote"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quotes/prefill_loss_history": {
      "post": {
        "summary": "prefill_loss_history",
        "tags": [
          "quotes"
        ],
        "description": "prefill_loss_history",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quotes/prefill_property_loss_history": {
      "post": {
        "summary": "prefill_property_loss_history",
        "tags": [
          "quotes"
        ],
        "description": "\n    Pull property loss history (CLUE / ISOLoss) for one or more properties on\n    a revision and persist the results.\n\n    NOTE: decorated with ``log_payload_params=False`` because the response\n    carries vendor-shaped ``loss_history`` and report numbers (CLUE/ISOLoss\n    claim detail); the default ``@api_request`` would write that into the API\n    request/response logs.\n\n    This is the supported v2 surface for property loss history; it wraps the\n    legacy ``policies.views.retrieveLossHistory`` gateway function. Use this\n    in place of hitting that gateway path directly. The auto equivalent is\n    :func:`prefill_loss_history` (this endpoint is property-only).\n\n    Reading already-pulled history does not require this endpoint;\n    /api/v2/policies/retrieve_risk_details surfaces stored loss history\n    alongside the rest of the property data.\n\n    Parameters\n    ----------\n    revision_id : str, required\n        Revision whose property/properties should have loss history pulled.\n    property_ids : list[str], optional\n        Restrict the pull to specific properties on this revision. Ids that\n        don't belong to the revision are silently skipped (they will not\n        appear in the response). When omitted (``None``), all properties on\n        the revision are pulled; an explicit empty list pulls none.\n    force_run : bool, optional, default False\n        When False, CLUE's property-level 30-day check applies: a property\n        whose most recent successful report is within 30 days is reused\n        instead of burning another vendor call. When True, that property-level\n        check is bypassed. NOTE: CLUE's separate <=30-day ``VendorCache``\n        (keyed on the named insureds) may still serve a cached result even\n        with ``force_run=True``, so a fresh vendor order is NOT guaranteed -\n        inspect each property's ``pull_performed`` flag to know whether an\n        order actually ran. ISOLoss has no equivalent cache; this kwarg is a\n        no-op there.\n\n    Returns\n    -------\n    dict\n        ::\n            {\n                \"vendor\": \"iso_loss\" | \"clue_property\" | null,\n                \"properties\": [\n                    {\n                        \"property_id\": str,\n                        \"loss_history\": [...],            # vendor-shaped past claims\n                        \"loss_history_date_pulled\": str,  # MM/DD/YYYY\n                        \"loss_history_report_number\": str,\n                        \"pull_performed\": bool,           # true when a fresh vendor call ran\n                        \"mandatories_succeeded\": bool or null, # loss-free mandatory item refresh result\n                        \"messages\": [str]                 # per-property warnings/errors\n                    }, ...\n                ],\n                \"messages\": [str]                          # tenant-level warnings (e.g. no vendor configured)\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-prefill_property_loss_history"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-prefill_property_loss_history"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quotes/prefill_quote": {
      "post": {
        "summary": "prefill_quote",
        "tags": [
          "quotes"
        ],
        "description": "prefill_quote",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-prefill_quote"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-prefill_quote"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quotes/prefill_violations": {
      "post": {
        "summary": "prefill_violations",
        "tags": [
          "quotes"
        ],
        "description": "prefill_violations",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quotes/rate": {
      "post": {
        "summary": "rate",
        "tags": [
          "quotes"
        ],
        "description": "The Quote Wizard Rate action as ONE call:\n    hydrate the persisted revision, run UWR server-side, rate fully in\n    memory, persist the rate delta, and answer with the\n    ``retrieve_revision_details`` payload -- replacing the wizard's\n    8-request reset/rate_risk/rate_revision/details cascade.\n\n    The response also carries a ``risk_rates`` sibling: per property of the\n    revision, the legacy ``rate_risk`` response shape (rated items and\n    sub-lines plus the four premium columns). Every property, not a\n    requested subset -- the engine rates them as a set, because they can\n    reference each other, so all of their premiums move and every property\n    model in the wizard needs the new figures.\n\n    ``generate_quote``'s sibling in the unified-engine namespace:\n    ``quotes/generate_quote`` creates, ``quotes/rate`` rates existing\n    content. ``quote_id`` IS the revision id -- the quotes v2 API\n    convention (the repository layer resolves ``Revision.get(quote_id)``,\n    lib/repository/legacy_utils.py:217).\n\n    This endpoint rates through the unified engine, period -- it does NOT\n    fall back to the legacy ``rate_quote_revision`` in-process. WHICH Rate\n    action a revision gets is the service's decision (``rate_capability``:\n    the ``britequote/toggle-feature-enable-rate-revision-unified-engine``\n    advanced setting ON, default OFF, AND a rating-v2 Property\n    new-business/renewal revision), and the wizard consumes it from the\n    revision-details payload BEFORE its first call: a supported revision\n    POSTs ``run_pre_rate_integrations`` then this; an unsupported one runs\n    the legacy cascade untouched. The adapter re-asserts the predicate, so a\n    call that lands here with it False (a stale wizard whose details predate\n    a setting flip, or a direct caller) is refused in the flat error.\n\n    Authz continuity: the EXPLICIT page-permission decorator\n    (``_RATE_PAGE_PERMISSIONS``) keeps an agent authorized for the\n    Rating/Risks wizard pages under the legacy rate authorized here -- a\n    bare ``api/v2/quotes/rate`` module-path check would key on a new\n    namespace no existing grant covers.\n\n    Layering: orchestration lives in the adapter\n    (``service/quote_services/adapters/rate_revision.py``) with every read\n    behind a repository, and the service projects its own result\n    (``RateRevisionResult``, plain values); this layer parses, translates\n    errors and serializes -- it assembles nothing. Engine and guard failures\n    re-raise as marshmallow ``ValidationError`` so the shape is the legacy\n    cascade's flat ``messages`` list (``standard_error`` parity) rather\n    than the ``_base_`` / ``_rules_`` dict a ``BCValidationError`` would\n    envelope them in, so every failure of this endpoint answers in one\n    shape.\n\n    Parameters\n    ----------\n    quote_id : str\n        UUID of the revision to rate (the quotes v2 convention: ``quote_id``\n        IS the revision id). Required by the request schema.\n\n    Returns\n    -------\n    success : bool\n    messages : list of str\n        On a refusal or failure (success False), the flat legacy list --\n        ALWAYS a list of strings, never the ``_base_`` dict shape: every\n        exception this endpoint does not translate is caught, logged with the\n        revision id, and re-raised as a sanitized ``RATE_UNEXPECTED_FAILURE_\n        MESSAGE``.\n    error_code : str, optional\n        Present only for the one machine-readable failure: the rate delta\n        committed but its response could not be built\n        (``'rate_saved_response_unavailable'``). Absent from every other\n        response, success or failure.\n    data : dict\n        ::\n\n            {\n                # ...the retrieve_revision_details payload of the rated\n                # revision (items, sub_lines, premiums, rate_capability)...\n                'delta_summary': {},  # per-table counts of the rate delta\n                'uwr_outcome': {},    # the server-side UWR run's outcome\n                'risk_rates': {}      # property id -> rate_risk-shaped figures\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-rate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-rate"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quotes/rate_full_quote": {
      "post": {
        "summary": "rate_full_quote",
        "tags": [
          "quotes"
        ],
        "description": "\n    Rate a full quote with all the necessary information.\n\n    If external_system_reference is provided, it will be used to retrieve the latest non archived quote.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-rate_full_quote"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-rate_full_quote"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quotes/rate_quote": {
      "post": {
        "summary": "rate_quote",
        "tags": [
          "quotes"
        ],
        "description": "rate_quote",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quotes/retrieve_full_quote": {
      "post": {
        "summary": "retrieve_full_quote",
        "tags": [
          "quotes"
        ],
        "description": "\n    Retrieve a full quote with all the necessary information.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-retrieve_full_quote"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-retrieve_full_quote"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quotes/run_pre_rate_integrations": {
      "post": {
        "summary": "run_pre_rate_integrations",
        "tags": [
          "quotes"
        ],
        "description": "The Rate click's vendor integrations, split out of the rate itself:\n    HazardHub-on-rate and the property lookups\n    configured with ``runWhenQWUserClicksCalculateRate``, for EVERY live\n    risk of the revision in one call.\n\n    The legacy ``rate_risk`` ran these inline before rating; the unified\n    ``rate`` is deliberately integration-free, so the wizard POSTs this\n    first and only rates when it succeeds -- the same abort-the-rate\n    semantics the legacy cascade had, made explicit. Sites with nothing\n    configured for the rate click answer immediately (two config reads).\n\n    Orchestration is ``QuoteService.run_pre_rate_integrations``; this layer\n    owns the wire shape only. Failures ride the legacy flat ``messages``\n    list, always -- but only the ONE reviewed vendor failure (HazardHub's own\n    real-rating-error raise) keeps ``rate_risk``'s verbatim\n    ``standard_error(str(e))`` text; anything unreviewed is logged and\n    answered with a stable, sanitized message instead.\n\n    Parameters\n    ----------\n    quote_id : str\n        UUID of the revision to run the integrations for (the quotes v2\n        convention: ``quote_id`` IS the revision id).\n\n    Returns\n    -------\n    success : bool\n    messages : list of str\n    data : dict\n        ::\n\n            {\n                'ran': bool,          # False = nothing ran; see reason\n                'alert_messages': [], # lookup alerts + selection conflicts\n                'reason': str         # '' | 'unsupported' | 'nothing-configured'\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-run_pre_rate_integrations"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-run_pre_rate_integrations"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quotes/submit_application": {
      "post": {
        "summary": "submit_application",
        "tags": [
          "quotes"
        ],
        "description": "Bind (submit) a new-business quote from the agent UI wizard.\n\n    Routes through the shared new-business bind choke point\n    ``QuoteService.bind_quote``, so the same two tenant advanced settings that\n    govern ``bind_full_quote`` also govern this path. (Mid-term\n    change/endorsement binds go through ``submit_change`` instead and are NOT\n    gated by these settings.) Both DEFAULT OFF (unchanged behavior until\n    opt-in):\n\n    * ``integrations`` / ``contact-screening-require-completion-before-bind``:\n      refuse the bind unless every in-scope contact has a complete screening\n      result.\n    * ``policies`` / ``enforce-business-rules-at-bind``: gate the bind by the\n      KNOCKOUT business rules (disallowed category options, required /\n      List-``Disallow`` supplemental-question knockouts, and revision-level\n      underwriting prevent-continue blocks). It intentionally does NOT enforce\n      the completeness/boundary checks (item mandatoriness, multiplicity,\n      deductible/limit boundaries): those are build-time input guards that\n      false-positive on a fully rated quote, so enforcing them at bind would\n      reject the existing book.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quotes/submit_change": {
      "post": {
        "summary": "submit_change",
        "tags": [
          "quotes"
        ],
        "description": "Bind (submit) a mid-term change/endorsement.\n\n    NOTE: the two new-business bind-posture settings\n    (``contact-screening-require-completion-before-bind`` and\n    ``enforce-business-rules-at-bind``) do NOT apply here. They are scoped to\n    new-business binds (``bind_full_quote`` / ``submit_application``) for\n    BC-22935; change/endorsement binds keep their existing behavior.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quotes/summary": {
      "post": {
        "summary": "summary",
        "tags": [
          "quotes"
        ],
        "description": "summary",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quotes/turn_quote_into_application": {
      "post": {
        "summary": "turn_quote_into_application",
        "tags": [
          "quotes"
        ],
        "description": "turn_quote_into_application",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quotes/update_e_delivery_enabled": {
      "post": {
        "summary": "update_e_delivery_enabled",
        "tags": [
          "quotes"
        ],
        "description": "update_e_delivery_enabled",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/related_policies/list_latest": {
      "post": {
        "summary": "list_latest",
        "tags": [
          "related_policies"
        ],
        "description": "list_latest",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/related_policies/update_related_policy": {
      "post": {
        "summary": "update_related_policy",
        "tags": [
          "related_policies"
        ],
        "description": "update_related_policy",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/reports/call_sql_agent_service": {
      "post": {
        "summary": "call_sql_agent_service",
        "tags": [
          "reports"
        ],
        "description": "call_sql_agent_service",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "prompt": {},
                  "file_data": {},
                  "session_id": {},
                  "context": {},
                  "initial_state_params": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/reports/call_sql_agent_service_streaming": {
      "post": {
        "summary": "call_sql_agent_service_streaming",
        "tags": [
          "reports"
        ],
        "description": "Call SQL Agent Service with streaming response support",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "prompt": {},
                  "file_data": {},
                  "session_id": {},
                  "context": {},
                  "initial_state_params": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/reports/check_report_process_status": {
      "post": {
        "summary": "check_report_process_status",
        "tags": [
          "reports"
        ],
        "description": "Check the status of a report process\n\n    Parameters\n    ----------\n    report_process_id : str\n        The id of the report process to check\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    messages : list of str\n        List of human-readable error messages\n    data : report process information\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "report_process_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/reports/complete_britedata_migration": {
      "post": {
        "summary": "complete_britedata_migration",
        "tags": [
          "reports"
        ],
        "description": "Complete a BriteData migration: archive source, save SQL report, mark completed.\n\n    Order matters: the source BriteData report must be archived BEFORE\n    save_report runs, otherwise save_report's name-collision guard blocks\n    the new SQL report (it shares the source's name). The archive commits\n    independently via safe_commit so the source is durably hidden before\n    save_report runs.\n\n    Step 1 (archive source) commits independently via safe_commit().\n    Step 2 (save_report) commits independently via its own safe_commit().\n    Step 3 (mark migration completed) flushes only - committed by the\n    @api_request decorator at end of request.\n\n    If step 2 fails after step 1 succeeded, the archive is rolled back\n    via ``restore_source_report`` (rename back to original, ``hidden=False``)\n    and an error is returned. Without that rollback the source would\n    remain renamed + hidden even though no replacement was saved -- the\n    user would lose the working source on every validation / permission\n    / SQL error.\n\n    If step 3 fails after steps 1+2 succeed, the new SQL report id is\n    persisted on the migration row via ``attach_sql_report`` + an\n    independent ``safe_commit`` immediately after step 2 so a retry is\n    deterministic: the next ``complete_britedata_migration`` call detects\n    the persisted ``sql_report_id`` and resumes from step 3 (mark\n    completed) without re-running archive or ``save_report``. Without\n    this durable link, retry would call ``save_report`` again and hit\n    its name-collision guard on the archived source's reused name.\n\n    Idempotent resume paths:\n      * ``status=completed`` AND ``sql_report_id`` set\n        -> returns ``retrieve_report(sql_report_id)`` directly with no\n          mutation (whole completion was already done).\n      * ``sql_report_id`` set but ``status != completed``\n        -> skips steps 1+2 and only runs step 3 against the persisted\n          ``sql_report_id``.\n\n    Parameters\n    ----------\n    id : str\n        Migration record UUID (POST body). Required.\n    report : dict\n        Report data in save_report format (POST body). Required.\n    migration_summary : str\n        Agent Changes Summary text (POST body). Optional.\n\n    Returns\n    -------\n    standard_response payload for the new SQL Editor report (retrieve_report\n    shape), or standard_error on validation/lookup/save failure.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "report": {
                    "type": "object"
                  },
                  "migration_summary": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/reports/create_report_cadence": {
      "post": {
        "summary": "create_report_cadence",
        "tags": [
          "reports"
        ],
        "description": "POST /api/v2/reports/create_report_cadence\n\n    Body: { report_id, cadence }\n\n    Parameters\n    ----------\n    report_id : str\n    cadence : str\n        One of the report cadences (daily, weekly, monthly, ...).\n\n    Returns\n    -------\n    success : bool\n    messages : list of str\n    data : dict\n        {cadence: {...}, legacy_run_when_retired: bool}\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "report_id": {
                    "type": "string"
                  },
                  "cadence": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/reports/create_report_category": {
      "post": {
        "summary": "create_report_category",
        "tags": [
          "reports"
        ],
        "description": "Creates a new Report Category\n\n    Parameters\n    ----------\n    category_name : str\n        The name of the new Report Category\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The data response having the form:\n        ::\n\n            {\n                'id': 'Some UUID id',\n                'name': 'Category Name'\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "category_name": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/reports/create_report_schedule": {
      "post": {
        "summary": "create_report_schedule",
        "tags": [
          "reports"
        ],
        "description": "POST a new parameter set onto a cadence.\n\n    Parameters\n    ----------\n    report_id : str\n    cadence_id : str\n    parameter_overrides : dict\n        Keyed by declared parameter name; each value is\n        {type: literal|sql_expression, value: <any>}.\n    position : int, optional\n        Defaults to the next free position on the cadence.\n    name : str, optional\n        Defaults to \"Schedule <position>\".\n\n    Returns\n    -------\n    success : bool\n    messages : list of str\n    data : dict\n        The created schedule.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "report_id": {
                    "type": "string"
                  },
                  "cadence_id": {
                    "type": "string"
                  },
                  "parameter_overrides": {
                    "type": "object"
                  },
                  "position": {
                    "type": "integer"
                  },
                  "name": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/reports/data_frame_preview": {
      "post": {
        "summary": "data_frame_preview",
        "tags": [
          "reports"
        ],
        "description": "Get a preview of the selected dataframe\n\n    Parameters\n    ----------\n    df_name : str\n        the name of the dataframe\n    numberOfRows : int\n        The number of rows to take from head of dataframe for sample\n    prepared : boolean\n        Indicated if this dataframe is a prepared dataframe (defaults to false)\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict with dataframe preview\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "df_name": {
                    "type": "string"
                  },
                  "numberOfRows": {
                    "type": "integer"
                  },
                  "prepared": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/reports/delete_file": {
      "post": {
        "summary": "delete_file",
        "tags": [
          "reports"
        ],
        "description": "Deletes file from File table\n\n    Parameters\n    ----------\n    report_id : str, required\n        UUID of the report associated with the file\n    file_id : str, required\n        UUID of the file wishing to delete\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict of File deleted\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "report_id": {
                    "type": "string"
                  },
                  "file_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/reports/delete_report": {
      "post": {
        "summary": "delete_report",
        "tags": [
          "reports"
        ],
        "description": "Deletes an existing Report\n\n    Parameters\n    ----------\n    report_id : str, required\n        The UUID of the existing Report\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "report_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/reports/delete_report_cadence": {
      "post": {
        "summary": "delete_report_cadence",
        "tags": [
          "reports"
        ],
        "description": "DELETE a cadence and the schedules that fire on it.\n\n    Parameters\n    ----------\n    report_id : str\n    cadence_id : str\n\n    Returns\n    -------\n    success : bool\n    messages : list of str\n    data : dict\n        {deleted: str}\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "report_id": {
                    "type": "string"
                  },
                  "cadence_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/reports/delete_report_category": {
      "post": {
        "summary": "delete_report_category",
        "tags": [
          "reports"
        ],
        "description": "Deletes an existing Report Category\n\n    Parameters\n    ----------\n    category_id : str, required\n        The UUID of the existing Report Category\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "category_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/reports/delete_report_schedule": {
      "post": {
        "summary": "delete_report_schedule",
        "tags": [
          "reports"
        ],
        "description": "DELETE one schedule, unless it is the cadence's last one.\n\n    Parameters\n    ----------\n    report_id : str\n    cadence_id : str\n    schedule_id : str\n\n    Returns\n    -------\n    success : bool\n    messages : list of str\n    data : dict\n        {deleted: str}\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "report_id": {
                    "type": "string"
                  },
                  "cadence_id": {
                    "type": "string"
                  },
                  "schedule_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/reports/describe_report_configuration": {
      "post": {
        "summary": "describe_report_configuration",
        "tags": [
          "reports"
        ],
        "description": "Count the schedules and export settings a duplicate could inherit\n\n    Backs the Duplicate dialog's checkboxes.\n\n    Parameters\n    ----------\n    report_id : str\n        The id of the report to inspect\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        ``{'cadences': int, 'schedules': int, 'has_export_options': bool,\n        'has_delivery_password': bool, 'has_custom_permissions': bool}``\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "report_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/reports/download_report_file": {
      "post": {
        "summary": "download_report_file",
        "tags": [
          "reports"
        ],
        "description": "Download a report file\n\n    Parameters\n    ----------\n    file_id : str\n        The id of the file to download\n    as_url : bool\n        Answer with a presigned S3 url in the body instead of a redirect to it.\n        Browsers need this: fetch() follows a redirect as a cross-origin request\n        and the storage buckets have no CORS configuration.\n\n    Returns\n    -------\n    A 303 to the report file, or - with as_url - a standard response carrying\n    download_url and filename.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-download_report_file"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-download_report_file"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/reports/duplicate_report": {
      "post": {
        "summary": "duplicate_report",
        "tags": [
          "reports"
        ],
        "description": "Duplicate a SQL Runner report as a new draft\n\n    Sheets, parameters and documentation always travel with the copy.\n    Permissions, run history and the category never do: the copy lands in the\n    draft category.\n\n    Parameters\n    ----------\n    report_id : str\n        The id of the report to duplicate\n    copy_schedules : bool, optional\n        Recreate the cadences and schedules, all disabled. Defaults to False.\n    copy_export_options : bool, optional\n        Carry the delivery settings at report and schedule level. The stored\n        password comes along only when the source has no permission rows of\n        its own. Defaults to False.\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        ``{'id': ..., 'name': ..., 'cadences_copied': int,\n        'schedules_copied': int, 'export_options_copied': bool,\n        'password_copied': bool}``\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "report_id": {
                    "type": "string"
                  },
                  "copy_schedules": {
                    "type": "boolean"
                  },
                  "copy_export_options": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/reports/export_report": {
      "post": {
        "summary": "export_report",
        "tags": [
          "reports"
        ],
        "description": "Export a single report's definition as a downloadable JSON file\n\n    On success the response body is the report definition JSON, served as a\n    file download (``Content-Type: application/json`` and\n    ``Content-Disposition: attachment; filename=\"<report name>.json\"``) so it\n    can be saved and later fed to :func:`import_report`. The database-managed\n    report id is stripped so the payload can be recreated in any environment,\n    and the report's category is emitted by name (``category_name``) rather\n    than a non-portable ``category_id``. Errors return the standard\n    ``standard_error`` envelope.\n\n    The file is written for another environment, so it always records the\n    report as a draft (``draft`` and the \"Draft (Unpublished)\" category) and\n    never carries a delivery password.\n\n    Parameters\n    ----------\n    report_id : str\n        The id of the report to export\n\n    Returns\n    -------\n    file : application/json\n        A downloadable JSON file (the report definition), having the form:\n        ::\n\n            {\n                'name': 'Report Name',\n                'description': 'Report Description',\n                'report_runner': 'sql_runner',\n                'custom': True,\n                'draft': True,                     # always, see above\n                'date_type': 'single',\n                'output_format': 'excel',\n                'output_file_delimiter': ',',\n                'category_name': 'Draft (Unpublished)',\n                'report_parameters': [...],\n                'export_options': {...},           # never carries a password\n                'additional_report_settings': {...},\n                'report_sheets': [\n                    {\n                        'name': 'Sheet 1',\n                        'order': 0,\n                        'sql_query': 'SELECT * FROM v_some_view',\n                        'formatting': {...},\n                    },\n                ],\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-reports_export_report"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-reports_export_report"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/reports/fetch_prepared_yml": {
      "post": {
        "summary": "fetch_prepared_yml",
        "tags": [
          "reports"
        ],
        "description": "Get the prepared.yml file\n\n    Parameters\n    ----------\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict with yaml information\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/reports/generate_consolidated_declaration": {
      "post": {
        "summary": "generate_consolidated_declaration",
        "tags": [
          "reports"
        ],
        "description": "\n    Generate the Consolidated Declaration Statements\n    @policy_group: The policy group to generate the Consolidated Declaration Statements for\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "policy_group": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/reports/get_britedata_migration": {
      "post": {
        "summary": "get_britedata_migration",
        "tags": [
          "reports"
        ],
        "description": "Returns full migration record with YAML, conversion map, and date type.\n\n    Parameters\n    ----------\n    id : str\n        Migration record UUID (query param).\n\n    Returns\n    -------\n    success : bool\n    messages : list\n    data : dict\n        Full migration record including yaml, template, conversion_map,\n        conversion_map_confidence_score, conversion_map_confidence_score_reason,\n        date_type, report_name.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/reports/get_report_documentation": {
      "post": {
        "summary": "get_report_documentation",
        "tags": [
          "reports"
        ],
        "description": "Retrieves documentation for a single report or all reports\n\n    Parameters\n    ----------\n    report_id : str, optional\n        The id of the report to get documentation for\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict or list\n        Single report documentation or list of all reports documentation\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "report_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/reports/get_report_executions": {
      "post": {
        "summary": "get_report_executions",
        "tags": [
          "reports"
        ],
        "description": "List past executions of a single report, newest first, paginated.\n\n    Backs the Reports Run tab's \"load more past executions\".\n\n    Parameters\n    ----------\n    report_id : str\n        The id of the report whose executions to list.\n    limit : int, optional\n        Page size (default 10, capped at 50).\n    offset : int, optional\n        Number of rows to skip (default 0).\n\n    Returns\n    -------\n    success : bool\n    messages : list of str\n    data : dict\n        {executions: [...], total: int, limit: int, offset: int, hasMore: bool}\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "report_id": {
                    "type": "string"
                  },
                  "limit": {
                    "type": "integer"
                  },
                  "offset": {
                    "type": "integer"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/reports/get_report_versions": {
      "post": {
        "summary": "get_report_versions",
        "tags": [
          "reports"
        ],
        "description": "Get report versions for a specific report\n\n    Parameters\n    ----------\n    report_id : str, required\n        The UUID of the report to get versions for\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    messages : list of str\n        List of human-readable error messages\n    data : list\n        List of report versions with their information\n        ::\n        [\n            {\n                'id': 'version UUID',\n                'version_number': '1.0.0',\n                'version_hash': 'hash string',\n                'change_log': {...},  # JSON object with change information\n                'date_deployed': '2023-10-07T10:30:00Z'\n            }\n        ]\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "report_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/reports/get_s3_token": {
      "post": {
        "summary": "get_s3_token",
        "tags": [
          "reports"
        ],
        "description": "Gets authentication token from S3 Gateway for DF and PDF retrieval.\n    S3 Gateway is a service that allows restricted access to S3 assets.\n\n    This call will return an Authentication key used for making calls to\n    S3 Gateway. The Authentication key will be restricted to dataframes\n    for the client associated with the login.\n    `NOTE: Only users with roles of Admin or Vendor can receive a S3 Auth key`\n\n    Parameters\n    ----------\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n\n    messages : list of str\n        List of human-readable error messages\n\n    data : dict\n        Authentication key and expiration time\n        ::\n        {\n            'client': 'Client Name',\n            'expires': 'UTC Time',\n            'key': 'UUID Authentication key'\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/reports/get_scheduled_run_summary": {
      "post": {
        "summary": "get_scheduled_run_summary",
        "tags": [
          "reports"
        ],
        "description": "Per-cadence completion status of scheduled reports (config vs actual).\n\n    Answers \"did my scheduled reports finish?\" operationally: each report\n    configured for a cadence is classified against that cadence's latest\n    run-batch as Completed, Failure, Running or Not started.\n\n    Returns\n    -------\n    success : bool\n    messages : list of str\n    data : dict\n        {cadences: [{cadence, setProcessId, lastRunAt, total, completed, failed,\n                     running, notStarted,\n                     reports: [{reportId, reportName, status, finishedAt,\n                                fileId, error}]}]}\n        Only cadences with at least one configured (and readable) report appear.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/reports/grant_report_permission": {
      "post": {
        "summary": "grant_report_permission",
        "tags": [
          "reports"
        ],
        "description": "Create or update a report permission grant.\n\n    Parameters\n    ----------\n    report_id : str\n        The id of the report (JSON body).\n    grantee_type : str\n        One of contact, user_group, role, permission_level (JSON body).\n    grantee_id : str\n        The id of the grantee (JSON body).\n    access : str\n        One of none, read, write (JSON body).\n\n    Returns\n    -------\n    str\n        JSON with success, messages, and data containing the saved permission.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-grant_report_permission"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-grant_report_permission"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/reports/import_report": {
      "post": {
        "summary": "import_report",
        "tags": [
          "reports"
        ],
        "description": "Import a report definition, creating a new report\n\n    Thin API layer: resolves the payload, deserializes it to a ``ReportExport``\n    domain object, hands it to ``ReportDefinitionService`` to validate and\n    persist, then serializes the created report (response built with\n    ``standard_response`` / ``standard_error``). Accepts the definition as\n    ``report_data`` (a dict or JSON string) or as ``file_data`` (the JSON text\n    of an exported file, mirroring ``import_line``), in the shape produced by\n    :func:`export_report`, and persists it as a **new** report. Any id carried\n    in the payload is ignored so an import always creates a fresh report, and\n    the report is marked ``custom`` so it stays editable. For ``sql_runner``\n    reports each sheet's SQL is validated before the report is written.\n\n    Importing fails if a report with the same ``name`` already exists -- the\n    caller must rename the incoming report (or rename/delete the existing one)\n    before retrying.\n\n    Parameters\n    ----------\n    report_data : dict, optional\n        The report definition to import (dict or JSON string). ``category_name``\n        (optional) is resolved to a category in the target environment, creating\n        it when it\n        does not yet exist.\n        ::\n\n            {\n                'name': 'Report Name',\n                'description': 'Report Description',\n                'output_format': 'excel',\n                'date_type': 'single',\n                'category_name': 'Category Name',\n                'report_parameters': [...],\n                'export_options': {...},\n                'report_sheets': [\n                    {\n                        'name': 'Sheet 1',\n                        'order': 0,\n                        'sql_query': 'SELECT * FROM v_some_view',\n                    },\n                ],\n            }\n    file_data : str, optional\n        The JSON text of an exported report file (or base64 of it), following\n        the ``file_data`` convention used by ``import_line``. Takes precedence\n        over ``report_data``.\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The created report definition (same shape as :func:`export_report`)\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-reports_import_report"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-reports_import_report"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/reports/list_all_schedules": {
      "post": {
        "summary": "list_all_schedules",
        "tags": [
          "reports"
        ],
        "description": "Every schedule on the site, one row each\n\n    Backs the Schedules page. A row is a schedule, since that is the thing a\n    person edits; a cadence with no schedule row of its own still fires and\n    contributes one row. Reports the caller cannot read are filtered out.\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        ``{'schedules': [{report_id, report_name, category_name, cadence_id,\n        cadence, cadence_enabled, schedule_id, schedule_name, enabled,\n        parameter_overrides, export_label, export_inherited, next_run}]}``\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "payload": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/reports/list_britedata_migrations": {
      "post": {
        "summary": "list_britedata_migrations",
        "tags": [
          "reports"
        ],
        "description": "Returns BriteData migration rows for the current carrier.\n\n    Includes tiers 1-6 for rows with status pending or in_progress. Tiers 4-6 are\n    included so the UI can show them disabled with ``unsupported_reason`` (tooltip).\n    Only tiers 1-3 have ``migration_supported`` true; the SQL Editor should show the\n    Migrate button only when ``has_eligible_migration`` is true.\n\n    When the migration feature is disabled (Setting\n    ``reports.enable-britedata-migration`` is false), returns an empty list\n    with ``has_eligible_migration=False`` so the UI hides the Migrate button\n    gracefully without surfacing an error.\n\n    Returns\n    -------\n    success : bool\n    messages : list\n    data : dict\n        {'migrations': [...], 'has_eligible_migration': bool}\n\n        Each migration item includes:\n        id, report_name, category_name, status, tier,\n        conversion_map_confidence_score, date_type,\n        migration_supported, unsupported_reason (null when supported).\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/reports/list_df_cache_files": {
      "post": {
        "summary": "list_df_cache_files",
        "tags": [
          "reports"
        ],
        "description": "Retrieves a list of df_cache files\n    Parameters\n    ----------\n    prefix : str\n        Prefix of the files. Usually a date in YYYYMMDD format\n    auth_token : str\n        S3 authentication token\n    prepared : bool, optional\n        Get prepared df_cache files\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    messages : dict\n        List of error messages\n    data : dict\n        {\n            'files': [\n                {\n                    'url': '...', #download link for file\n                    'expired': '2014-09-08T08:02:17.127178', #expiration of url (ISO 8601)\n                    'id': '...' #unique (in line) id for the file\n                },\n            ]\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "prefix": {},
                  "auth_token": {},
                  "prepared": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/reports/list_df_caches": {
      "post": {
        "summary": "list_df_caches",
        "tags": [
          "reports"
        ],
        "description": "Returns list of all prepared, non prepared and facts dfs.\n\n    parameters\n    ----------\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    messages : dict\n        List of error messages\n    data : dict\n        {\n            'prepared': [..],\n            'nonprepared': [..],\n            'facts': [..]\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/reports/list_files": {
      "post": {
        "summary": "list_files",
        "tags": [
          "reports"
        ],
        "description": "Get list of files associated with report\n\n    Parameters\n    ----------\n    report_id : str, required\n        UUID of the report associated with the file\n\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    messages : list of str\n        List of human-readable error messages\n    data : list of related files\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "report_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/reports/list_grantee_options": {
      "post": {
        "summary": "list_grantee_options",
        "tags": [
          "reports"
        ],
        "description": "List grantee id and name options for the permissions picker.\n\n    Parameters\n    ----------\n    grantee_type : str\n        One of contact, user_group, role, permission_level (JSON body).\n\n    Returns\n    -------\n    str\n        JSON with success, messages, and data as a list of id/name objects.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-list_grantee_options"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-list_grantee_options"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/reports/list_report_cadences": {
      "post": {
        "summary": "list_report_cadences",
        "tags": [
          "reports"
        ],
        "description": "GET /api/v2/reports/list_report_cadences?report_id=...\n\n    Returns the report's cadences and the schedules that fire on each.\n\n    Parameters\n    ----------\n    report_id : str\n\n    Returns\n    -------\n    success : bool\n    messages : list of str\n    data : dict\n        {cadences: [{id, report_id, cadence, enabled, date_added, date_updated,\n                     next_run, schedules: [...]}]}\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "report_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/reports/list_report_permissions": {
      "post": {
        "summary": "list_report_permissions",
        "tags": [
          "reports"
        ],
        "description": "List report permission rows and whether the user can edit them.\n\n    Parameters\n    ----------\n    report_id : str\n        The id of the report (JSON body).\n\n    Returns\n    -------\n    str\n        JSON with success, messages, and data containing permissions and can_write.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-list_report_permissions"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-list_report_permissions"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/reports/rename_report_category": {
      "post": {
        "summary": "rename_report_category",
        "tags": [
          "reports"
        ],
        "description": "Renames an existing Report Category\n\n    Parameters\n    ----------\n    category_id : str, required\n        The UUID of the existing Report Category\n    category_name : str, required\n        The new name of the new Report Category\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The data response having the form:\n        ::\n\n            {\n                'id': 'Some UUID id',\n                'name': 'Category Name'\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "category_id": {
                    "type": "string"
                  },
                  "category_name": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/reports/reset_britedata_migration": {
      "post": {
        "summary": "reset_britedata_migration",
        "tags": [
          "reports"
        ],
        "description": "Discard an in-progress migration's saved draft and reset it to pending.\n    Lets a user start a report's migration over from scratch instead of\n    resuming the previously-saved (possibly stale) agent draft.\n\n    Completed migrations cannot be reset here; the service raises and this\n    returns an error response.\n\n    Gated the same way as the other per-record migration endpoints:\n    ``@report_permission_required(WRITE_ACCESS)`` against the source\n    BriteData report's ACL, plus the ``reports.enable-britedata-migration``\n    feature Setting.\n\n    Parameters\n    ----------\n    id : str\n        Migration record UUID (POST body param). Required.\n\n    Returns\n    -------\n    success : bool\n    messages : list\n    data : dict\n        {'status': 'ok'} on success.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/reports/retrieve_report": {
      "post": {
        "summary": "retrieve_report",
        "tags": [
          "reports"
        ],
        "description": "Retrieves a single report's full definition\n\n    Parameters\n    ----------\n    report_id : str\n        The id of the report to retrieve\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict with report information\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "report_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/reports/retrieve_report_categories": {
      "post": {
        "summary": "retrieve_report_categories",
        "tags": [
          "reports"
        ],
        "description": "Retrieves all available Report Categories\n\n    Parameters\n    ----------\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict with report categories\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/reports/retrieve_report_exception": {
      "post": {
        "summary": "retrieve_report_exception",
        "tags": [
          "reports"
        ],
        "description": "Retrieves the cleaned exception text for a failed report's background job.\n\n    Parameters\n    ----------\n    job_id : str, required\n        ``background_jobs.id`` for export-style rows, or ``report_processes.id``\n        when the UI passes the process primary key (report-status ``jobId``).\n\n    Returns\n    -------\n    success : bool\n    messages : list of str\n    data : str\n        ASCII-cleaned exception text, or an empty string.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "job_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/reports/retrieve_report_processes": {
      "post": {
        "summary": "retrieve_report_processes",
        "tags": [
          "reports"
        ],
        "description": "Retrieves report processes from the past N hours\n\n    Parameters\n    ----------\n    hours : int, optional\n        Number of hours to look back for report processes (default: 24)\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The data response having the form:\n        ::\n\n            {\n                'report_processes': [\n                    {\n                        'id': 'Process UUID',\n                        'parent_process_id': 'Parent Process UUID',\n                        'report_id': 'Report UUID',\n                        'report_name': 'Report Name',\n                        'file_id': 'File UUID',\n                        'report_start_date': 'MM/DD/YYYY',\n                        'report_end_date': 'MM/DD/YYYY',\n                        'started_at': 'MM/DD/YYYY HH:MM:SS',\n                        'finished_at': 'MM/DD/YYYY HH:MM:SS',\n                        'export_status': 'status',\n                        'execution_step': 'step',\n                        'execution_updated_at': 'MM/DD/YYYY HH:MM:SS',\n                        'error_code': 'error code',\n                        'error_message': 'error message',\n                        'status': 'Running/Succeeded/Failed',\n                        'duration': seconds,\n                        'download_link': 'URL or None',\n                        'additional_report_configuration': {...},\n                        'report_parameters': {...}\n                    },\n                ]\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "hours": {
                    "type": "integer"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/reports/retrieve_reports": {
      "post": {
        "summary": "retrieve_reports",
        "tags": [
          "reports"
        ],
        "description": "Retrieves all available Reports, grouped in their Report Categories\n\n    Parameters\n    ----------\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The data response having the form:\n        ::\n\n            {\n                'report_categories': [\n                    {\n                        'name': 'Category Name', 'id': 'Category UUID',\n                        'reports': [\n                            {\n                                'name': 'Report Name', 'id': 'Report UUID',\n                                'category_id': 'Parent Category UUID',\n                                'description': 'Markdown Lite Description',\n                                'output_format': 'xls, xml, csv, etc.',\n                                'css': 'Custom CSS',\n                                'yaml': {...}, # complex BriteData report YAML, in JSON format\n                                'template': 'BriteData report template',\n                                'custom': bool, # true if created by a user\n                                'date_type': 'single/range',\n                                'legacy': bool, # true if this is NOT a BriteData report\n                                'run_when': 'manual, daily, weekly, monthly, or annually',\n                                'cadences': ['daily', ...], # enabled SQL Runner cadences\n                                'custom_start_date': 'MM/DD/YYYY',\n                                'export_options': {...} # complex custom export options,\n                            },\n                        ]\n                    },\n                ]\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "payload": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/reports/retrieve_sql_reports": {
      "post": {
        "summary": "retrieve_sql_reports",
        "tags": [
          "reports"
        ],
        "description": "Retrieves all available SQL Reports\n\n    Parameters\n    ----------\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict with sql reports\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/reports/revoke_report_permission": {
      "post": {
        "summary": "revoke_report_permission",
        "tags": [
          "reports"
        ],
        "description": "Remove a report permission grant.\n\n    Parameters\n    ----------\n    report_id : str\n        The id of the report (JSON body).\n    grantee_type : str\n        One of contact, user_group, role, permission_level (JSON body).\n    grantee_id : str\n        The id of the grantee to revoke (JSON body).\n\n    Returns\n    -------\n    str\n        JSON with success, messages, and empty data on success.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-revoke_report_permission"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-revoke_report_permission"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/reports/run_report": {
      "post": {
        "summary": "run_report",
        "tags": [
          "reports"
        ],
        "description": "Start running a report and get the report process id\n\n    Parameters\n    ----------\n    report_name : str\n        The name of the report to run\n    end_date : str, optional\n        The end date or as of date of the report (supports yyyy-mm-dd, mm/dd/yyyy formats)\n    start_date : str, optional\n        The start date of the report for range reports (supports yyyy-mm-dd, mm/dd/yyyy formats)\n    additional_report_configuration : dict, optional\n        Additional report configuration to pass to reports that support it.\n        Can include a 'parameters' key containing parameter VALUES for SQL queries.\n        Parameter values must be provided as plain values (strings, numbers, dates).\n\n        Example:\n        {\n            \"parameters\": [\n                {\"name\": \"CustomDate\", \"value\": \"06/13/2024\"},\n                {\"name\": \"AnotherDate\", \"value\": \"2024-06-13\"},\n                {\"name\": \"today\", \"value\": \"2024-06-13T17:19:05.183Z\"},\n                {\"name\": \"status\", \"value\": \"active\"}\n            ]\n        }\n\n        Parameters with defaults:\n        - If a parameter is not provided but has a default value defined in the report,\n          the default will be used automatically.\n        - SQL expression defaults (e.g., CURDATE()) are evaluated server-side.\n\n        Standard parameters provided automatically:\n        - RunDateTime: current execution timestamp (always available)\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict with report process id to pass to check_report_process_status\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "report_name": {
                    "type": "string"
                  },
                  "end_date": {
                    "type": "string"
                  },
                  "start_date": {
                    "type": "string"
                  },
                  "additional_report_configuration": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/reports/save_britedata_migration_draft": {
      "post": {
        "summary": "save_britedata_migration_draft",
        "tags": [
          "reports"
        ],
        "description": "Persist the most recent agent-generated report_json for a migration.\n\n    Called by the SQL Editor after the migration agent emits a fresh\n    ``report_json`` fence (initial response and every follow-up iteration).\n    The persisted draft is returned by ``start_britedata_migration`` on the\n    next Resume so the user does not have to re-run the agent.\n\n    Parameters\n    ----------\n    id : str\n        Migration record UUID (POST body param). Required.\n    draft_report_json : str\n        JSON-serialized report payload. Empty / null clears the draft.\n\n    Returns\n    -------\n    success : bool\n    messages : list\n    data : dict\n        {'status': 'ok'} on success.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "draft_report_json": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/reports/save_report": {
      "post": {
        "summary": "save_report",
        "tags": [
          "reports"
        ],
        "description": "Saves a new or updates existing report\n\n    Parameters\n    ----------\n    report_data : dict\n        The report data to save\n        ::\n            {\n                'id': 'Report ID', # when updating an existing report\n                'name': 'Report Name',\n                'description': 'Report Description',\n                'output_format': 'xlsx, csv',\n                'custom': bool, # true if created by a user\n                'date_type': 'single/range',\n                'report_parameters': [  # optional, list of parameter definitions\n                    {\n                        'name': 'creationTimestamp',\n                        'type': 'DateTime',\n                        'extra_info': {\n                            'default_value': 'NOW()',  # SQL expression default\n                            'default_value_type': 'sql_expression'  # 'sql_expression' or omit for static values\n                        }\n                    },\n                    {\n                        'name': 'reportDate',\n                        'type': 'Date',\n                        'extra_info': {\n                            'default_value': 'CURDATE()',\n                            'default_value_type': 'sql_expression'\n                        }\n                    },\n                    {\n                        'name': 'status',\n                        'type': 'String',\n                        'extra_info': {}\n                    },\n                    {\n                        'name': 'amount',\n                        'type': 'Number',\n                        'extra_info': {}\n                    },\n                    {\n                        'name': 'category',\n                        'type': 'Enum',\n                        'extra_info': {\n                            'enumOptions': [\n                                {'text': 'Active', 'value': 'Active'},\n                                {'text': 'Inactive', 'value': 'Inactive'},\n                                {'text': 'Pending', 'value': 'Pending'}\n                            ],\n                            'default_value': 'Active'  # static default (no default_value_type)\n                        }\n                    }\n                ],\n                'export_options': {\n                    'filename': 'Output File Name.xlsx',\n                },\n                'report_sheets': [\n                    {\n                        'name': 'Sheet Name',\n                        'order': 0,\n                        'sql_query': 'SELECT * FROM v_some_view',\n                        'include_totals_row': False,\n                        'formatting': {\n                            'column_name': {\n                                'type': 'type_string',\n                            }\n                        }\n                    },\n                ]\n            }\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict with report information\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "report_data": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/reports/send_prompt": {
      "post": {
        "summary": "send_prompt",
        "tags": [
          "reports"
        ],
        "description": "send_prompt",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "prompt": {},
                  "session_id": {},
                  "context": {},
                  "initial_state_params": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/reports/start_britedata_migration": {
      "post": {
        "summary": "start_britedata_migration",
        "tags": [
          "reports"
        ],
        "description": "Sets a migration record status to in_progress.\n\n    Re-entry policy:\n    - If already in_progress: 200 OK, returns current record.\n    - If completed: returns error response.\n\n    If the migration has a persisted ``draft_report_json`` from a previous\n    agent run, it is returned alongside the status. The frontend uses this\n    to skip the agent invocation on Resume and load the draft directly into\n    the SQL Editor.\n\n    Parameters\n    ----------\n    id : str\n        Migration record UUID (POST body param).\n\n    Returns\n    -------\n    success : bool\n    messages : list\n    data : dict\n        {'status': str, 'draft_report_json': str | None}\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/reports/update_report_cadence": {
      "post": {
        "summary": "update_report_cadence",
        "tags": [
          "reports"
        ],
        "description": "PATCH a cadence's enabled flag.\n\n    Per-schedule export options live on update_report_schedule; this endpoint\n    does not accept them.\n\n    Parameters\n    ----------\n    report_id : str\n    cadence_id : str\n    enabled : bool, optional\n\n    Returns\n    -------\n    success : bool\n    messages : list of str\n    data : dict\n        {id, enabled}\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "report_id": {
                    "type": "string"
                  },
                  "cadence_id": {
                    "type": "string"
                  },
                  "enabled": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/reports/update_report_export_options": {
      "post": {
        "summary": "update_report_export_options",
        "tags": [
          "reports"
        ],
        "description": "PATCH a report's default export options.\n\n    Unlike save_report this does not reject stock reports: export options are\n    per-tenant delivery configuration, not part of the stock report definition.\n    Sentinel semantics match update_report_schedule.\n\n    Parameters\n    ----------\n    report_id : str\n    export_options : dict or None, optional\n\n    Returns\n    -------\n    success : bool\n    messages : list of str\n    data : dict\n        {id, export_options}\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "report_id": {
                    "type": "string"
                  },
                  "export_options": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/reports/update_report_schedule": {
      "post": {
        "summary": "update_report_schedule",
        "tags": [
          "reports"
        ],
        "description": "PATCH a schedule's parameter overrides, position, name, enabled flag\n    and/or export options.\n\n    `export_options` is three-state: omit it to leave the column alone, pass\n    None to clear the override (the schedule then inherits\n    Report.export_options), or pass a dict to set it. Protected fields\n    (password) round-trip through a sentinel so clients can echo back the\n    redacted value without losing the stored one.\n\n    Parameters\n    ----------\n    report_id : str\n    cadence_id : str\n    schedule_id : str\n    parameter_overrides : dict, optional\n    position : int, optional\n    enabled : bool, optional\n    name : str, optional\n    export_options : dict or None, optional\n\n    Returns\n    -------\n    success : bool\n    messages : list of str\n    data : dict\n        The updated schedule.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "report_id": {
                    "type": "string"
                  },
                  "cadence_id": {
                    "type": "string"
                  },
                  "schedule_id": {
                    "type": "string"
                  },
                  "parameter_overrides": {
                    "type": "object"
                  },
                  "position": {
                    "type": "integer"
                  },
                  "enabled": {
                    "type": "boolean"
                  },
                  "name": {
                    "type": "string"
                  },
                  "export_options": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/reports/upload_file": {
      "post": {
        "summary": "upload_file",
        "tags": [
          "reports"
        ],
        "description": "Uploads file in Files table and stores to S3\n\n    Parameters\n    ----------\n    report_id : str, required\n        UUID of the report uploading files for\n    title : str, required\n        Title of the file being uploaded\n    data : basestring, required\n        Base64-encoded of the file\n    kwargs : dict, optional\n        Additional parameters in file creation. Must be\n        valid args. See File model for full list of properties.\n        ::\n            {\n                'reference_id': 'Some UUID'\n            }\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict of new File model\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "report_id": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "data": {
                    "type": "string"
                  },
                  "kwargs": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/return_premium/exportReturnPremium": {
      "post": {
        "summary": "exportReturnPremium",
        "tags": [
          "return_premium"
        ],
        "description": "Given a valid return premium id, export it through the guarded export path.\n\n    This is a thin wrapper around `policies.utils.billing.export_return_premium_by_id`,\n    which is the single guarded implementation shared with the Return Premiums UI, the\n    Celery worker and the vendor export jobs. Keep it a wrapper: exporting a return premium\n    mutates the ORM and writes accounting rows, which belongs in `policies.utils.billing`\n    and not in the API layer, and a second implementation here is exactly how this entry\n    point drifted away from the others (BC-24101).\n\n    Every guard the shared path applies therefore applies here. The return premium must not\n    already be exported, voided, canceled, rejected or transferred, and must be authorized\n    when `billing / use_authorize_return_premium` is enabled; a check number is consumed\n    only when `policies / refund-check-counter` is configured or check issuance returns one;\n    `CheckIssuanceIntegrationPoint` is called when a check issuance instance is connected;\n    and the `'Exported Return Premium'` account history row that BriteData's\n    `changeInExportedReturnPremium` measure reads is written.\n\n    Parameters\n    ----------\n    returnPremiumId : str\n        A return premium id (UUID) to export.\n\n    Returns\n    -------\n    success : bool\n        True if completely successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        A dictionary containing the following:\n        ::\n\n            {\n            'checkNumber': int or None,\n            'returnPremiumId': UUID,\n            'export_status': bool\n            }\n\n        `checkNumber` is None when no check number was assigned, which is the case when\n        `policies / refund-check-counter` is not configured.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "returnPremiumId": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/return_premium/retrieve_return_premiums": {
      "post": {
        "summary": "retrieve_return_premiums",
        "tags": [
          "return_premium"
        ],
        "description": "\n    Given a valid from_date and to_date, return a list of return premiums that match the given\n    parameters, sorted from newest to oldest by return premium date.\n\n    Parameters\n    ----------\n    policy_type_ids : list of str, optional\n        A list of policy type ids to filter the return premiums.\n        The function will return only the return premiums that have a policy type id in this list.\n    from_date : str, required\n        The start date and time) for the return premium date range.\n        The date should be in the format 'YYYY-mm-dd HH:MM:SS'.\n    to_date : str, required\n        The end date time for the return premium date range.\n        The date should be in the format 'YYYY-mm-dd HH:MM:SS'.\n    canceled : bool, optional\n        If provided, the function will return only the return premiums\n        that have the canceled flag set to this value.\n    exported : bool, optional\n        If provided, the function will return only the return premiums\n        that have the exported flag set to this value.\n    transferred : bool, optional\n        If provided, the function will return only the return premiums\n        that have the transferred flag set to this value.\n    rejected : bool, optional\n        If provided, the function will return only the return premiums\n        that have the rejected flag set to this value.\n    voided : bool, optional\n        If provided, the function will return only the return premiums\n        that have the voided flag set to this value.\n    authorized : bool, optional\n        If provided, the function will return only the return premiums\n        that have the authorized flag set to this value.\n    policy_id : str, optional\n        A policy id to filter the return premiums.\n        The function will return only the return premiums that belong to this policy.\n        Kept last in the signature so existing positional callers are unaffected.\n\n    Returns\n    -------\n    success : bool\n        True if the function executed successfully, false if there was an error.\n    messages : list of str\n        List of human-readable error messages. If the function executed successfully, this list will be empty.\n    data : list of dict\n        The matching return premiums, sorted from newest to oldest, so data[0] is always the most\n        recent return premium. Return premium dates carry no time of day, so same-day return\n        premiums are ordered by when the underlying account history entry was raised.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "policy_type_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "from_date": {
                    "type": "string"
                  },
                  "to_date": {
                    "type": "string"
                  },
                  "canceled": {
                    "type": "boolean"
                  },
                  "exported": {
                    "type": "boolean"
                  },
                  "transferred": {
                    "type": "boolean"
                  },
                  "rejected": {
                    "type": "boolean"
                  },
                  "voided": {
                    "type": "boolean"
                  },
                  "authorized": {
                    "type": "boolean"
                  },
                  "policy_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/revision_history/get_revision_history": {
      "post": {
        "summary": "get_revision_history",
        "tags": [
          "revision_history"
        ],
        "description": "\n    Get revision history for a policy with premium comparisons.\n\n    Args:\n        policy_id (str): The policy ID\n\n    Returns:\n        dict: Serialized revision history response\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_revision_history"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_revision_history"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/rules/create_rule": {
      "post": {
        "summary": "create_rule",
        "tags": [
          "rules"
        ],
        "description": "Create a new underwriting rule with triggers and effects.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-create_rule"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-create_rule"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/rules/delete_rule": {
      "post": {
        "summary": "delete_rule",
        "tags": [
          "rules"
        ],
        "description": "\n    Soft delete an underwriting rule and its triggers and effects.\n\n    Marks the rule and all associated triggers and effects as deleted.\n    This is a soft delete - records are not removed from the database.\n\n    Parameters\n    ----------\n    rule_id : str\n        UUID of the rule to delete\n\n    Returns\n    -------\n    dict\n        A JSON object containing:\n        - `success` : bool : Whether the deletion was successful\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-delete_rule"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-delete_rule"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/rules/get_event_types": {
      "post": {
        "summary": "get_event_types",
        "tags": [
          "rules"
        ],
        "description": "\n    Returns available event types for rules.\n    Each event type has an id (the constant value) and a name (human-readable text).\n    Returns a serialized list of IdName objects.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_event_types"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_event_types"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/rules/get_rule": {
      "post": {
        "summary": "get_rule",
        "tags": [
          "rules"
        ],
        "description": "Get a single underwriting rule by ID with its triggers and effects.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_rule"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_rule"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/rules/get_rules_config": {
      "post": {
        "summary": "get_rules_config",
        "tags": [
          "rules"
        ],
        "description": "\n    Get rules configuration for a policy type.\n\n    Parameters\n    ----------\n    policy_type_id : str\n        UUID of the policy type.\n\n    Returns\n    -------\n    dict\n        Response containing rules configuration:\n        - policy_type_configs: Category mappings per policy type\n        - triggers_spec: Trigger type UI metadata\n        - effects_spec: Effect type UI metadata\n        - trigger_restrictions: Restrictions for triggers\n        - effect_restrictions: Restrictions for effects\n        - module_restrictions: Restrictions for modules\n        - policy_type_items: Items for trigger/effect dropdowns\n        - sub_lines: Sub lines for sub line effect actions\n        - ... (other static config)\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_rules_config"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_rules_config"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/rules/get_rules_documentation": {
      "post": {
        "summary": "get_rules_documentation",
        "tags": [
          "rules"
        ],
        "description": "\n    Get Advanced Triggers documentation for rules.\n\n    Returns all markdown documentation files for writing advanced trigger code,\n    including available data points, referenced data models, and examples.\n    This documentation applies to advanced triggers across all rule types\n    (underwriting, STP, events, etc.).\n\n    Returns\n    -------\n    dict\n        A JSON object containing:\n        - `content` : str : All documentation files concatenated with separators\n        - `files_count` : int : Number of documentation files included\n        - `total_chars` : int : Total character count of the content\n        - `files` : list : List of relative file paths included\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_rules_documentation"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_rules_documentation"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/rules/list_rules": {
      "post": {
        "summary": "list_rules",
        "tags": [
          "rules"
        ],
        "description": "\n    List all underwriting rules for a policy type.\n\n    Returns all rules with their triggers and effects, sorted by sort_order.\n\n    Parameters\n    ----------\n    policy_type_id : str\n        UUID of the policy type to list rules for.\n\n    Returns\n    -------\n    dict\n        A JSON object with standard API wrapper containing:\n        - `success` : bool : Whether the API call succeeded\n        - `messages` : list : Error messages if any\n        - `data` : list : List of rule objects, each containing:\n            - id: UUID of the rule\n            - name: Rule name\n            - category: Rule category (policy, driver, property, etc.)\n            - module: Rule module (all, bc, bq, stp, events)\n            - severity: Severity level for STP rules\n            - triggers: List of trigger objects\n            - effects: List of effect objects\n            - ... (other rule fields)\n\n    Examples\n    --------\n    Request::\n\n        {\"policy_type_id\": \"abc123-...\"}\n\n    Response::\n\n        {\n            \"success\": true,\n            \"messages\": [],\n            \"data\": [\n                {\n                    \"id\": \"rule-uuid-1\",\n                    \"name\": \"Block high risk drivers\",\n                    \"category\": \"driver\",\n                    \"module\": \"stp\",\n                    \"severity\": \"high\",\n                    \"triggers\": [...],\n                    \"effects\": [...]\n                },\n                ...\n            ]\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-list_rules"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-list_rules"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/rules/list_rules_stp_results": {
      "post": {
        "summary": "list_rules_stp_results",
        "tags": [
          "rules"
        ],
        "description": "\n    List STP (Straight-Through Processing) execution results for a revision with pagination.\n\n    Retrieves all STP rule execution instances and their individual rule results\n    for a specific revision, ordered by execution date descending.\n\n    Parameters\n    ----------\n    params : dict\n        A JSON object containing request parameters. Required fields include:\n        - `revision_id` : str : UUID of the revision to get STP results for.\n        Optional fields include:\n        - `page` : int : Page number for pagination (default: 1).\n        - `page_size` : int : Number of executions per page, max 100 (default: 25).\n\n    Returns\n    -------\n    dict\n        A JSON object containing paginated STP execution results:\n        - `results` : list : Array of STP execution objects, each containing:\n            - `id` : str : UUID of the STP execution.\n            - `revision_id` : str : UUID of the associated revision.\n            - `execution_start_time` : str : ISO datetime when execution started.\n            - `execution_end_time` : str : ISO datetime when execution ended.\n            - `status` : str : Overall execution status ('success' or 'error').\n            - `total_rules_executed` : int : Total number of rules executed.\n            - `total_rules_succeeded` : int : Number of rules that succeeded.\n            - `total_rules_failed` : int : Number of rules that failed.\n            - `results` : list : Array of individual rule execution results, each containing:\n                - `id` : str : UUID of the rule result.\n                - `rule_name` : str : Name of the executed rule.\n                - `rule_severity` : str or null : Severity level of the rule\n                  ('critical', 'high', 'medium', 'low') or null if not set.\n                - `status` : str : Rule execution status ('success' or 'error').\n                - `error_description` : str or null : Error details if rule failed.\n                - `custom_error_code_id` : str or null : Associated custom error code ID.\n                - `custom_error_code` : dict or null : Custom error code details if available, containing:\n                    - `id` : str : UUID of the custom error code.\n                    - `module` : str : Error code module (e.g., 'stp').\n                    - `code` : str : Error code string.\n                    - `description` : str : Error description.\n                - `property_id` : str or null : Property ID if rule is property-specific.\n                - `driver_contact_id` : str or null : Driver contact ID if rule is driver-specific.\n        - `pagination` : dict : Pagination metadata containing:\n            - `page` : int : Current page number.\n            - `page_size` : int : Number of items per page.\n            - `total_count` : int : Total number of executions.\n            - `total_pages` : int : Total number of pages.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-list_rules_stp_results"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-list_rules_stp_results"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/rules/run": {
      "post": {
        "summary": "run",
        "tags": [
          "rules"
        ],
        "description": "run",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/rules/simulate_rule": {
      "post": {
        "summary": "simulate_rule",
        "tags": [
          "rules"
        ],
        "description": "\n    Simulate execution of a rule against a revision or claim without persisting.\n\n    Accepts a full rule definition (with triggers and effects) plus an anchor to\n    run it against, executes the rule through the engine in dry-run mode, and\n    returns per-trigger and per-effect results.\n\n    For UI-scoped categories (``vehicle-ui`` / ``driver-ui`` / ``watercraft-ui``)\n    the simulation fans out across every matching risk on the revision by\n    default; ``property_id`` is ignored on this path. Callers can still pass\n    an explicit ``ui_context`` to override the autoload (useful for Bruno-style\n    what-if testing of partial form data).\n\n    Claim-scoped rules are anchored to a claim instead of a revision: pass\n    ``claim_id`` rather than ``quote_id``. The rule is simulated once against\n    the whole claim -- triggers are evaluated for the claim itself, then each\n    effect is previewed against every exposure whose coverage type it targets.\n    The revision comes from the claim, falling back to an exposure's coverage\n    exactly as the production claim-rules path does. Which exposures are\n    actually affected is decided by the rule's own effect targets, not by the\n    caller.\n\n    Parameters\n    ----------\n    params : dict\n        A JSON object containing:\n        - `rule` : dict : Full rule definition (same structure as create_rule).\n        - `quote_id` : str : UUID of the revision to simulate against.\n            Required for every category except ``claim``.\n        - `property_id` : str, optional : UUID of a specific property to scope.\n            Ignored for UI-scoped and claim-scoped rule categories.\n        - `ui_context` : dict, optional : Override for UI-scoped categories.\n            Same shape as the production ``run_quoting_ui_rules`` payload.\n            When omitted, the simulation runs against every vehicle / driver /\n            watercraft on the revision matching the rule's category.\n        - `claim_id` : str : UUID of the claim to simulate against. Required\n            when the rule's category is ``claim``.\n\n    Returns\n    -------\n    dict\n        A JSON object containing:\n        - `success` : bool : Whether simulation completed without errors.\n        - `would_fire` : bool : Whether the rule's triggers would fire.\n        - `trigger_results` : list : Per-trigger evaluation results.\n        - `effects_preview` : list : Per-effect application previews.\n        - `execution_time_ms` : int : Simulation duration in milliseconds.\n        - `error` : dict or None : Error details if simulation failed.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-simulate_rule"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-simulate_rule"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/rules/update_rule": {
      "post": {
        "summary": "update_rule",
        "tags": [
          "rules"
        ],
        "description": "Update an existing underwriting rule with its triggers and effects.\n\n    Triggers and effects present in the database but absent from the payload\n    are automatically soft-deleted.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-update_rule"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-update_rule"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/rules/validate_rule": {
      "post": {
        "summary": "validate_rule",
        "tags": [
          "rules"
        ],
        "description": "\n    Validate an underwriting rule without creating or updating it.\n\n    This endpoint validates the rule structure, triggers, and effects\n    against the schema and business rules. Use this to check for errors\n    before submitting a create or update request.\n\n    Validates:\n        - Category and module are known values\n        - Module is allowed for the category\n        - STP module requires severity\n        - Events module requires event type\n        - Waiver behavior and waiver_terms cross-validation\n        - Date range is valid (from <= to)\n        - Triggers are allowed for the category\n        - Trigger required fields per type (policy_type_item_id, label_name, value)\n        - Effects are allowed for the category\n        - Effect required fields per type (target_id, label_name, value, popup_message)\n        - Effect is allowed for the module\n        - Advanced trigger code syntax and variable usage\n\n    Also validates (requires database access):\n        - Module, trigger, and effect restrictions for the policy type\n        - Trigger/effect items match the rule's category\n        - Items referenced by policy_type_item_id/target_id exist and are valid\n\n    Parameters\n    ----------\n    params : dict\n        A JSON object containing the rule to validate. Same structure as\n        create_rule/update_rule requests.\n\n    Returns\n    -------\n    dict\n        A JSON object with standard API wrapper containing:\n        - `success` : bool : Always true (API call succeeded)\n        - `messages` : list : Empty list\n        - `data` : dict : Validation result with:\n            - `valid` : bool : Whether the rule passed validation\n            - `errors` : dict : Raw Marshmallow validation errors, empty if valid\n            - `conflicting_rules` : list : Names of existing rules whose triggers\n              and effects conflict with this rule. Empty list when there are no\n              conflicts. Conflicts are warnings -- they do not affect `valid`.\n              On updates (`id` set in the payload), the rule itself is excluded\n              from the candidate set.\n\n    Examples\n    --------\n    Valid rule response::\n\n        {\n            \"success\": true,\n            \"messages\": [],\n            \"data\": {\n                \"valid\": true,\n                \"errors\": {},\n                \"conflicting_rules\": []\n            }\n        }\n\n    Valid rule with conflicts response::\n\n        {\n            \"success\": true,\n            \"messages\": [],\n            \"data\": {\n                \"valid\": true,\n                \"errors\": {},\n                \"conflicting_rules\": [\"Existing Conflicting Rule\"]\n            }\n        }\n\n    Invalid rule response::\n\n        {\n            \"success\": true,\n            \"messages\": [],\n            \"data\": {\n                \"valid\": false,\n                \"errors\": {\n                    \"severity\": [\"Severity is required for STP rules\"],\n                    \"_schema\": [{\"module\": [\"Module 'stp' is not allowed for category 'claim'\"]}]\n                },\n                \"conflicting_rules\": []\n            }\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-validate_rule"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-validate_rule"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/search/add_to_index": {
      "post": {
        "summary": "add_to_index",
        "tags": [
          "search"
        ],
        "description": " Add or update search index for a given document.\n\n    Parameters\n    ----------\n    index_name : str\n        policies | claims | contacts | properties | protection_classes\n    id : str\n        Index ID.\n    document : dict\n        Document body to index.\n\n    Returns\n    -------\n    success: bool\n        True if successful, false if not\n    messages: list of str\n        List of human-readable error messages\n    data: list\n        Empty list\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "index_name": {
                    "type": "string"
                  },
                  "id": {
                    "type": "string"
                  },
                  "document": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/search/remove_from_index": {
      "post": {
        "summary": "remove_from_index",
        "tags": [
          "search"
        ],
        "description": " Remove a document from index.\n\n    Parameters\n    ----------\n    index_name : str\n        policies | claims | contacts | properties | protection_classes\n    id : str\n        Index ID.\n\n    Returns\n    -------\n    success: bool\n        True if successful, false if not\n    messages: list of str\n        List of human-readable error messages\n    data: list\n        Empty list\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "index_name": {
                    "type": "string"
                  },
                  "id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/settings/add_city_to_zip_override": {
      "post": {
        "summary": "add_city_to_zip_override",
        "tags": [
          "settings"
        ],
        "description": "Associate a city to a zip code. Add a city to a zip code as an override,\n    so that the zip code will have this city as an option during the lookup of\n    possible cities in a zip code, even if an external geolocation service disagrees.\n\n    Parameters\n    ----------\n    city : str\n        The exact string that will be associated with the `zip_code`.\n    state_abbreviation : str\n        The two letter abbreviation of the state (US).\n        This is necessary because zip codes can cross state lines.\n    zip_code : str\n        The five character zip code.\n    county : str\n        An appropriate county for the specified location\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : none\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "city": {
                    "type": "string"
                  },
                  "state_abbreviation": {
                    "type": "string"
                  },
                  "zip_code": {
                    "type": "string"
                  },
                  "county": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/settings/add_counties_to_state": {
      "post": {
        "summary": "add_counties_to_state",
        "tags": [
          "settings"
        ],
        "description": "Associate counties with a state. Add counties to a state, so that the\n    state will have these counties as an option during the lookup.\n\n    Parameters\n    ----------\n    country: str\n        The two letter abbreviation of the country (US) or (CA).\n    state : dict\n        A dictionary containing the state or province name and\n        two letter abbreviation. The name is only taking effect\n        when the abbreviation is not yet registered in the system.\n        If the abbreviation already exists, assigning a name will\n        not alter the existing entry.\n    counties : list\n        The list of county dictionaries that will be associated with\n        the `state`. Each one contains a county name and FIPS code.\n        ::\n\n            {\n                'country': str,\n                'state': {\n                    'name': str,\n                    'abbreviation': str\n                },\n                'counties': [\n                    {\n                        'name': str,\n                        'code': str\n                    }\n                ]\n            }\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : none\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "country": {
                    "type": "string"
                  },
                  "state": {
                    "type": "object"
                  },
                  "counties": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/settings/add_county_to_zip_override": {
      "post": {
        "summary": "add_county_to_zip_override",
        "tags": [
          "settings"
        ],
        "description": "Associate a county to a zip code. Add a county to a zip code as an override,\n    so that the zip code will have this county as an option during the lookup of\n    possible cities in a zip code, even if an external geolocation service disagrees.\n\n    Parameters\n    ----------\n    county : str\n        The exact county string that will be associated with the `zip_code`.\n    state_abbreviation : str\n        The two letter abbreviation of the state (US).\n        This is necessary because zip codes can cross state lines.\n    zip_code : str\n        The five character zip code.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : none\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "county": {
                    "type": "string"
                  },
                  "state_abbreviation": {
                    "type": "string"
                  },
                  "zip_code": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/settings/add_county_to_zip_suppression": {
      "post": {
        "summary": "add_county_to_zip_suppression",
        "tags": [
          "settings"
        ],
        "description": "Suppress a county for a zip code. Add a county to a zip code's suppression\n    list, so that the geocoder's report of this county for the zip code will be\n    dropped before the county dropdown is built.\n\n    Parameters\n    ----------\n    county : str\n        The exact county string to suppress for the `zip_code`.\n    state_abbreviation : str\n        The two letter abbreviation of the state (US).\n        This is necessary because zip codes can cross state lines.\n    zip_code : str\n        The five character zip code.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : none\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "county": {
                    "type": "string"
                  },
                  "state_abbreviation": {
                    "type": "string"
                  },
                  "zip_code": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/settings/create_carbone_custom_deliverable": {
      "post": {
        "summary": "create_carbone_custom_deliverable",
        "tags": [
          "settings"
        ],
        "description": "\n    Creates a new Carbone custom deliverable template and uploads the template file to the Carbone service\n\n    Parameters:\n        deliverable: dict\n            overwrite_stock: bool\n            location_id: str\n            policy_type_name: str\n            custom_name: str - The deliverable name\n            print_on_initial_dec: bool\n            print_on_renewal_dec: bool\n            print_on_non_autopay: bool\n            allow_britequote_creation: bool\n            module: str\n            generated_per: str\n            carbone_template_id: str\n            source_file_name: str\n            draft_carbone_template_id: str\n            draft_source_file_name: str\n            last_preview_entity_number: str\n            dynamic_fields: list - Optional list of dynamic fields to associate with this template\n    Returns:\n        dict: The created carbone deliverable template\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-create_carbone_custom_deliverable"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-create_carbone_custom_deliverable"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/settings/create_configuration_import": {
      "post": {
        "summary": "create_configuration_import",
        "tags": [
          "settings"
        ],
        "description": "Record a configuration package so it can be validated and applied.\n\n    Takes exactly one of file_id, for a package already uploaded here through\n    core.uploads uploadAttachment with type 'config_package', or url, for a\n    presigned Amazon S3 link to one on the exporting site. A link is fetched\n    and stored before this returns, so what comes back always names a package\n    held on this site.\n\n    Nothing is executed. Hand the returned id to import_configuration\n    to validate it, and again to apply it.\n\n    A link import is not a cheap record: the fetch and the store run in this\n    request, bounded by the fetch deadline plus the upload, so one call can\n    hold an app worker for the better part of two minutes. A handful of\n    operators at a time is the expected load.\n\n    Parameters\n    ----------\n    file_id : str\n        A package already stored on this site, uploaded through\n        core.uploads uploadAttachment with type 'config_package'.\n    url : str\n        A presigned Amazon S3 link to a package on the exporting site. Only\n        https S3 hosts are accepted and redirects are refused, because the\n        fetch happens from inside the cluster.\n\n    Returns\n    -------\n    success : bool\n        True if the request was handled, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The configuration import record. Its id is what to process and poll.\n\n    Raises\n    ------\n    marshmallow.ValidationError\n        If neither or both of file_id and url are given.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-create_configuration_import"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-create_configuration_import"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/settings/create_system_tags": {
      "post": {
        "summary": "create_system_tags",
        "tags": [
          "settings"
        ],
        "description": "Create system tags.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-create_system_tags"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-create_system_tags"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/settings/delete_carbone_custom_deliverable": {
      "post": {
        "summary": "delete_carbone_custom_deliverable",
        "tags": [
          "settings"
        ],
        "description": "delete_carbone_custom_deliverable",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/settings/export_configuration": {
      "post": {
        "summary": "export_configuration",
        "tags": [
          "settings"
        ],
        "description": "Export configuration settings as a package.\n\n    Returns a configuration package that can be imported into another environment.\n    The package includes effective dates, lines, policy types, forms, items,\n    sublines, UW rules/questions, groups, quick quote templates, underlying\n    relationships, and quickcode values.\n\n    Parameters\n    ----------\n    policy_type_id : str\n        UUID of the policy type to export. Exports this policy type and any\n        related (underlying) policy types.\n    skip_forms : bool, optional\n        If True, skip exporting form files (PDF forms and item forms).\n        Default is False.\n\n    Returns\n    -------\n    data : dict\n        The configuration export record. Where the site runs Celery it comes\n        back at status queued; poll get_configuration_export with its id.\n        Otherwise the work runs here and the record is already complete. The\n        package is never in this response either way: read it from the file\n        the record names, through files/generate_download_url.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-export_configuration"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-export_configuration"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/settings/get_configuration_export": {
      "post": {
        "summary": "get_configuration_export",
        "tags": [
          "settings"
        ],
        "description": "Return one configuration export by id.\n\n    This is what the page polls while an export runs: status moves through\n    queued, processing and then complete or failed, and the record carries the\n    package it produced.\n\n    Parameters\n    ----------\n    export_id : str\n\n    Returns\n    -------\n    success : bool\n        True if the request was handled, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The configuration export record.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_configuration_export"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_configuration_export"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/settings/get_configuration_import": {
      "post": {
        "summary": "get_configuration_import",
        "tags": [
          "settings"
        ],
        "description": "Return one configuration import by id.\n\n    Carries the whole outcome once complete: what it touched, any warnings,\n    and where the package came from.\n\n    Parameters\n    ----------\n    import_id : str\n\n    Returns\n    -------\n    success : bool\n        True if the request was handled, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The configuration import record.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_configuration_import"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_configuration_import"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/settings/get_deliverable_preview_json": {
      "post": {
        "summary": "get_deliverable_preview_json",
        "tags": [
          "settings"
        ],
        "description": "\n    Gets the JSON context for previewing a Carbone deliverable\n\n    With no entity_id and no entity_number this returns an EXAMPLE context\n    instead of failing: the canonical example shipped with BriteCore, with its\n    static line items replaced by items generated from the selected policy\n    type's configuration when `policy_type_name` names one. That is what lets\n    Carbone Studio's data panel and preview work on a template before any\n    policy exists to preview against - which is most of the time a template is\n    being authored. In example mode `policy_type_name` / `location_id` are\n    SELECTORS (they resolve the policy type to generate from); with an entity\n    they stay validators, asserting the entity matches the dropdown.\n\n    The example context carries an `_example_meta` key describing what it is\n    (generated vs. the shipped fixture, which policy type resolved, how many\n    items per container, and the configured item names). Underscore-prefixed\n    so it reads as a sidecar rather than a mappable field; the caller is\n    expected to lift it out before handing the context to Carbone.\n\n    Parameters:\n        deliverable_id - str (required if no entity_type): The ID of the deliverable to load preview data for\n        entity_type - str (required if no deliverable_id): The type of entity to preview (policy, revision, claim)\n        entity_id - str (optional): The ID of the entity to preview. Omit both this and\n            entity_number for an example context.\n        entity_number - str (optional): The number of the entity to preview. Omit both this\n            and entity_id for an example context.\n        location_id - str (optional): The ID of the location to restrict results for; in\n            example mode, the business location narrowing policy_type_name\n        policy_type_name - str (optional): The name of the policy type to restrict results\n            for; in example mode, the policy type whose configured items are generated\n        dynamic_field_values - dict (optional): Simulated dynamic-field values keyed by field_key,\n            used to preview the `dynamic` namespace (see CarboneDeliverableTemplateService.apply_dynamic_fields)\n        dynamic_fields - list of dict (optional): in-progress (not yet saved) dynamic-field\n            definitions from Carbone Studio's local form state, used INSTEAD OF the\n            database so an unsaved field still previews (see apply_dynamic_fields)\n        calc_fields - dict (optional): {'global': [...], 'template': [...]} in-progress\n            (not yet saved) calculated-field definitions, used INSTEAD OF the database\n            so an unsaved field still previews (see apply_calculated_fields)\n\n    Returns:\n        str: The dumped JSON context for previewing the deliverable\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_deliverable_preview_json"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_deliverable_preview_json"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/settings/get_pdf_engine": {
      "post": {
        "summary": "get_pdf_engine",
        "tags": [
          "settings"
        ],
        "description": "Gets the HTML to PDF engine used by BriteCore for custom deliverables.\n\n    Parameters\n    ----------\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The data response having the form:\n        ::\n\n            {'engine': 'weasyprint'}\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/settings/get_setting_value": {
      "post": {
        "summary": "get_setting_value",
        "tags": [
          "settings"
        ],
        "description": "Gets the value of a setting by section and option.\n\n    Parameters\n    ----------\n    section : str\n        The section the setting falls under.\n    option : str\n        The specific option we're looking for.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : str\n        The value of the setting. Settings can actually be dicts, bools,\n        lists, or strings but are always returned inside of a string.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "section": {
                    "type": "string"
                  },
                  "option": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/settings/get_system_tags_list": {
      "post": {
        "summary": "get_system_tags_list",
        "tags": [
          "settings"
        ],
        "description": "Return a list of system tags.\n\n    Parameters\n    ----------\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : list of dict\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/settings/get_zip_county_candidates": {
      "post": {
        "summary": "get_zip_county_candidates",
        "tags": [
          "settings"
        ],
        "description": "Return the business county names currently offered for a ZIP, pre-suppression.\n\n    Parameters\n    ----------\n    zip_code : str\n        The five character zip code.\n    state_abbreviation : str\n        The two letter abbreviation of the state (US).\n\n    Returns\n    -------\n    success : bool\n    messages : list of str\n    data : dict\n        ::\n\n            {\n                'zip_code': str,\n                'state': str,\n                'candidates': list of str\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "zip_code": {
                    "type": "string"
                  },
                  "state_abbreviation": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/settings/get_zip_suppression": {
      "post": {
        "summary": "get_zip_suppression",
        "tags": [
          "settings"
        ],
        "description": "Return the current suppression state for a zip code.\n\n    Parameters\n    ----------\n    zip_code : str\n        The five character zip code.\n    state_abbreviation : str, optional\n        The two letter abbreviation of the state (US). Informational - used only\n        when no row exists yet for the ZIP.\n\n    Returns\n    -------\n    success : bool\n    messages : list of str\n    data : dict\n        ::\n\n            {\n                'zip_code': str,\n                'state': str or None,\n                'suppress_counties': list of str,\n                'exists': bool  # whether a geography_overrides row exists for the ZIP\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "zip_code": {
                    "type": "string"
                  },
                  "state_abbreviation": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/settings/import_configuration": {
      "post": {
        "summary": "import_configuration",
        "tags": [
          "settings"
        ],
        "description": "Validate or apply a configuration package already recorded here.\n\n    Takes an import_id from create_configuration_import, never the package\n    itself: a package reaches this site as an upload or a presigned link, and\n    is stored before anything runs against it. Sent twice in the ordinary\n    flow, once with dry_run and once without, and both runs hang off the one\n    record, the later replacing the earlier one's outcome.\n\n    Queues a background job where Celery is enabled and runs in this request\n    where it is not. Either way the answer is the record.\n\n    Validation Rules:\n    - Package version must be <= supported version\n    - Sections the declared version does not support are not imported;\n      they are reported in warnings and summary.sections_not_imported\n      instead of failing the request\n    - All location_ids in packet must exist in this environment\n    - Effective dates are matched by (effective_date value + location)\n    - Lines are unique by (line_definition_code + effective_id + location_id)\n    - Policy Types are unique by (policy_type_definition_code + effective_date_id + location_id)\n    - If entity exists with same unique key but different ID: reject\n    - If ID exists but unique key differs: reject\n    - If entity exists with same ID and unique key: update (idempotent)\n\n    Parameters\n    ----------\n    import_id : str\n        A package recorded by create_configuration_import.\n    dry_run : bool, optional\n        If True, only validate the package without applying changes. Default\n        is False.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The import record. Queued, it comes back at status queued; poll\n        get_configuration_import with the same id. Run here, it is already\n        complete. Either way the outcome is in ``summary``, and re-running\n        replaces it:\n        ::\n\n            {\n                \"dry_run\": bool,\n                \"version_compatible\": bool,\n                \"validation_passed\": bool,\n                \"applied\": bool,  # non-dry-run transaction committed; check\n                                  # summary for per-section outcomes\n                \"warnings\": [str, ...],\n                \"locations_affected\": [str (UUID), ...],\n                \"summary\": {\n                    \"<section>\": {...per-importer counters...},\n                    \"sections_not_imported\": [str, ...]  # populated sections\n                                  # dropped because the declared version does\n                                  # not include them, with entry counts\n                }\n            }\n\n    Raises\n    ------\n    marshmallow.ValidationError\n        If import_id is missing, unknown, or names a record with no stored\n        package.\n    BCValidationError\n        If unable to acquire lock (another import is in progress)\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-import_configuration"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-import_configuration"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/settings/list_cancellation_reasons": {
      "post": {
        "summary": "list_cancellation_reasons",
        "tags": [
          "settings"
        ],
        "description": "List all cancellation reasons.\n\n    Parameters\n    ----------\n    ids : list of str, optional\n        List of cancellation reason IDs to filter by, if provided.\n    policy_life_cycle_ids : list of str, optional\n        List of policy life cycle IDs to filter by, if provided.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages.\n    data : object\n        The data response having the form:\n        ::\n\n            {\n                'cancellation_reasons': [\n                    {\n                        'id': str,\n                        'reason': str,\n                        'date_added': str,\n                        'policy_life_cycle_id': str\n                    }\n                ]\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "policy_life_cycle_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/settings/list_carbone_custom_deliverables": {
      "post": {
        "summary": "list_carbone_custom_deliverables",
        "tags": [
          "settings"
        ],
        "description": "\n    Lists Carbone custom deliverable templates, optionally scoped to a policy type\n    and/or location. Global templates (no policy_type_name / no location_id set on\n    the row) are always included alongside an exact match on either filter.\n\n    Parameters:\n        policy_type_name: str, optional\n            Policy type to filter by (e.g. \"DP3\"). Omit for all policy types.\n        location_id: str, optional\n            BusinessLocation UUID to filter by. Omit for all locations.\n    Returns:\n        list: The matching Carbone deliverable templates\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/settings/list_configuration_exports": {
      "post": {
        "summary": "list_configuration_exports",
        "tags": [
          "settings"
        ],
        "description": "Return configuration exports, newest first.\n\n    Parameters\n    ----------\n    limit : int\n        Page size. Defaults to 25 and is capped at 200.\n    offset : int\n        How many to skip.\n    status : str\n        Optional filter: queued, processing, complete or failed.\n\n    Returns\n    -------\n    success : bool\n        True if the request was handled, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        ::\n\n            {\"results\": [...], \"total\": int, \"offset\": int}\n\n        With ``status``, ``total`` is advisory and a page can hold fewer\n        than ``limit`` results: a lost record is settled only when read.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-list_configuration_exports"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-list_configuration_exports"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/settings/list_configuration_imports": {
      "post": {
        "summary": "list_configuration_imports",
        "tags": [
          "settings"
        ],
        "description": "Return configuration imports, newest first.\n\n    Parameters\n    ----------\n    limit : int\n        Page size. Defaults to 25 and is capped at 200.\n    offset : int\n        How many to skip.\n    status : str\n        Optional filter: queued, processing, complete or failed.\n\n    Returns\n    -------\n    success : bool\n        True if the request was handled, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        ::\n\n            {\"results\": [...], \"total\": int, \"offset\": int}\n\n        With ``status``, ``total`` is advisory and a page can hold fewer\n        than ``limit`` results: a lost record is settled only when read.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-list_configuration_imports"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-list_configuration_imports"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/settings/list_system_tags": {
      "post": {
        "summary": "list_system_tags",
        "tags": [
          "settings"
        ],
        "description": "Retrieve system tags.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-list_system_tags"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-list_system_tags"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/settings/new_permission_level_rule_dashboard": {
      "post": {
        "summary": "new_permission_level_rule_dashboard",
        "tags": [
          "settings"
        ],
        "description": " Creates a new permission level rule inside Settings > Permissions.\n\n    Parameters\n    ----------\n    permission_level_id : str\n        i.e \"bd1dd7fb-5c3f-5336-94d1-7d7e0ab62808\"\n    is_primary: boolean\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : list\n        List of dicts with the PermissionLevelRuleDashboard info with the form:\n        ::\n\n            {\n                \"dashboardId\": \"4495cb72-9847-4d37-8bd7-5ea91c2a143d\",\n                \"dateAdded\": \"2030-01-01 00:00:00\",\n                \"id\": \"2695cb72-9847-4d37-8bd7-5ea91b1a146f\",\n                \"permissionLevelId\": \"7b733249-9802-4690-99ce-c911f6bd53cd\"\n            }\n\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "permission_level_id": {
                    "type": "string"
                  },
                  "is_primary": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/settings/persist_carbone_draft": {
      "post": {
        "summary": "persist_carbone_draft",
        "tags": [
          "settings"
        ],
        "description": "\n    Persists Carbone draft changes to the database.\n\n    Parameters:\n        deliverable_id: str\n        prior_draft_id: str\n        new_draft_id: str\n        new_draft_filename: str\n\n    Returns:\n        dict: Message indicating success or failure\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "deliverable_id": {},
                  "prior_draft_id": {},
                  "new_draft_id": {},
                  "new_draft_filename": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/settings/remove_county_from_zip_suppression": {
      "post": {
        "summary": "remove_county_from_zip_suppression",
        "tags": [
          "settings"
        ],
        "description": "Remove a county from a zip code's suppression list.\n\n    Parameters\n    ----------\n    county : str\n        The exact county string to remove from the suppression list.\n    zip_code : str\n        The five character zip code.\n\n    Returns\n    -------\n    success : bool\n    messages : list of str\n    data : none\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "county": {
                    "type": "string"
                  },
                  "zip_code": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/settings/remove_permission_level_rule_dashboard": {
      "post": {
        "summary": "remove_permission_level_rule_dashboard",
        "tags": [
          "settings"
        ],
        "description": " Deletes a permission level dashboard.\n\n    Parameters\n    ----------\n    permission_level_rule_dashboard_id : str\n        i.e \"0d1bd7eb-5c3f-4322-94d2-9d7e0aa89962\"\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : list\n        Empty list\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "permission_level_rule_dashboard_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/settings/retrieve_credit_permission_prompt": {
      "post": {
        "summary": "retrieve_credit_permission_prompt",
        "tags": [
          "settings"
        ],
        "description": "Retrieves the configured prompt intended prior to pulling a credit report.\n\n    Parameters\n    ----------\n    policy_type_id : Optional[str]\n        If provided, the configured prompt on the Policy Type will be returned.\n        If not, the default prompt \"Have you received permission from the insured(s) to obtain their insurance score?\"\n        will be returned.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : object\n        The data response having the form:\n        ::\n\n            {\n                'prompt': 'Have you received permission from the insured(s) to obtain their insurance score?'\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "policy_type_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/settings/retrieve_permissions": {
      "post": {
        "summary": "retrieve_permissions",
        "tags": [
          "settings"
        ],
        "description": "\n    Retrieve permissions for this user with given prefixes.\n    Returns all permissions from registry if no prefixes provided.\n\n    Parameters\n    ----------\n    prefixes : list of str\n        List of filtering prefixes for permissions list.\n\n    Returns\n    -------\n    success : bool\n        Whether or not the request was successful.\n    messages : list of str\n        List of human-readable error messages.\n    data : dict\n        An object of the following format.\n\n        ::\n\n            {\n                'permissions': [\n                    {\n                        'read': '',\n                        'write': '',\n                        'section': ''\n                    }\n                ]\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-retrieve_permissions"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-retrieve_permissions"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/settings/retrieve_property_valuation_availability": {
      "post": {
        "summary": "retrieve_property_valuation_availability",
        "tags": [
          "settings"
        ],
        "description": "Check whether the current user can perform a property replacement\n    cost valuation on the policy.\n\n    Parameters\n    ----------\n    is_app : bool\n        True is the policy is an application and False if it is a quote.\n    revision_id : str\n        ID of the revision whose property valuation availability is being questioned.\n    chosen_role : str\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The data response having the form:\n        ::\n\n            {\n                'allow_property_valuation': bool  # True if property valuation is allowed.\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "is_app": {
                    "type": "boolean"
                  },
                  "revision_id": {
                    "type": "string"
                  },
                  "chosen_role": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/settings/retrieve_quick_code_value_tags": {
      "post": {
        "summary": "retrieve_quick_code_value_tags",
        "tags": [
          "settings"
        ],
        "description": "Retrieves list of quick code value tags\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "quick_code": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/settings/retrieve_settings": {
      "post": {
        "summary": "retrieve_settings",
        "tags": [
          "settings"
        ],
        "description": "Lists Advanced Settings grouped by section.\n\n    Exposes over REST the section/settings structure the Advanced Settings admin\n    screen consumes, so API callers (e.g. the settings MCP tool) can enumerate\n    sections, options, current values, and value types without the internal\n    gateway. Read-only; requires the same ``britecore/settings/advancedSettings``\n    'r' permission that gates the Advanced Settings UI page, since bulk\n    enumeration of every setting's value is a materially larger blast radius\n    than the single-key ``get_setting_value`` lookup.\n\n    The request/response formats are documented by the JSON schemas at\n    ``lib/api/api_specs/request-retrieve_settings.json`` and\n    ``lib/api/api_specs/response-retrieve_settings.json``.\n\n    Parameters\n    ----------\n    section : str, optional\n        When provided, only that section is returned; otherwise every section.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : list of dict\n        Sections, each ``{\"name\": <section>, \"settings\": [{\"id\", \"section\",\n        \"option\", \"value\", \"value_type\", \"description\", \"options\"}, ...]}``.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-retrieve_settings"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-retrieve_settings"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/settings/retrieve_system_tags": {
      "post": {
        "summary": "retrieve_system_tags",
        "tags": [
          "settings"
        ],
        "description": "Retrieves information about system tags\n\n    Parameters\n    ----------\n    level : str (optional, default 'all')\n        The level at which the resulting tags are allowed to tag.\n        ('line', 'policy_type', 'sub_line',\n         'policy_type_item', 'category', 'question',\n         'claim', 'contact', 'policy')\n    include_select : boolean (optional, default False)\n        Include tags with 'select' as style\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : list\n        The data response having the form:\n        ::\n\n            [\n                {\n                    'id': 'UUID',\n                    'name': 'Tag Name',\n                    'required': boolean,\n                    'type': ('internal', 'report', 'vendor', 'custom'),\n                    'style': ('text', 'checkbox', 'select'),\n                    'line': boolean,\n                    'policy_type': boolean,\n                    'sub_lines': boolean,\n                    'policy_type_item': boolean,\n                    'category': boolean,\n                    'question': boolean,\n                    'claim': boolean,\n                    'contact': boolean,\n                    'policy': boolean,\n                    'quick_code': 'Quick Code',\n                }\n            ]\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "level": {
                    "type": "string"
                  },
                  "include_select": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/settings/retrieve_template_setup": {
      "post": {
        "summary": "retrieve_template_setup",
        "tags": [
          "settings"
        ],
        "description": "\n    Retrieves the template setup for a Carbone deliverable\n\n    Returns\n    -------\n    dict:\n        systemDocuments: A list of report type names used for Carbone reports\n        policyTypesLocations: a list of policy types and their associated business locations\n        existingDeliverables: a list of all Carbone deliverables with their details, including their associated policy\n         type and location\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/settings/set_pdf_engine": {
      "post": {
        "summary": "set_pdf_engine",
        "tags": [
          "settings"
        ],
        "description": "Sets the HTML to PDF engine used by BriteCore for custom deliverables.\n\n    Parameters\n    ----------\n    engine : str, required\n        The name of the PDF engine to use for processing custom deliverables in BriteCore. (weasyprint, wkhtmltopdf)\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : none\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "engine": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/settings/set_setting_value": {
      "post": {
        "summary": "set_setting_value",
        "tags": [
          "settings"
        ],
        "description": "Sets the value of a setting by section and option.\n\n    Parameters\n    ----------\n    section : str\n        The section the setting falls under.\n    option : str\n        The specific option we're looking for.\n    value : str\n        The value to se the setting|option to.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : str\n        The value of the setting. Settings can actually be dicts, bools,\n        lists, or strings but are always returned inside of a string.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "section": {
                    "type": "string"
                  },
                  "option": {
                    "type": "string"
                  },
                  "value": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/settings/update_carbone_custom_deliverable": {
      "post": {
        "summary": "update_carbone_custom_deliverable",
        "tags": [
          "settings"
        ],
        "description": "\n    Updates an existing Carbone custom deliverable template\n\n    Parameters:\n        deliverable: dict\n            id: str - The ID of the deliverable to update\n            location_id: str\n            policy_type_name: str\n            custom_name: str - The deliverable name\n            overwrite_stock: bool\n            carbone_template_id: str\n            source_file_name: str\n            draft_carbone_template_id: str\n            draft_source_file_name: str\n            last_preview_entity_number: str\n            print_on_initial_dec: bool\n            print_on_renewal_dec: bool\n            print_on_non_autopay: bool\n            allow_britequote_creation: bool\n            module: str\n            generated_per: str\n            dynamic_fields: list - (Optional) list of dynamic fields to associate with this template\n            deleted_dynamic_field_ids: list - (Optional) list of dynamic field IDs to delete\n    Returns:\n        dict: The updated carbone deliverable template\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-update_carbone_custom_deliverable"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-update_carbone_custom_deliverable"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/settings/update_permission_level_rule_dashboard": {
      "post": {
        "summary": "update_permission_level_rule_dashboard",
        "tags": [
          "settings"
        ],
        "description": " Updates the given permission level dashboard.\n\n    Parameters\n    ----------\n    permission_level_rule_dashboard_id : str\n        i.e \"0d1bd7eb-5c3f-4322-94d2-9d7e0aa89962\"\n    dashboard_id : str\n        i.e \"bd1bd7eb-5c3f-4366-94d1-9d7e0aa62899\"\n    is_primary: boolean\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : list\n        Empty list\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "permission_level_rule_dashboard_id": {
                    "type": "string"
                  },
                  "dashboard_id": {
                    "type": "string"
                  },
                  "is_primary": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/signatures/docusign_auth": {
      "post": {
        "summary": "docusign_auth",
        "tags": [
          "signatures"
        ],
        "description": "\n      Endpoint to retrieve and save settings on docuSign service\n\n     Parameters:\n      -----------\n      GET method\n      DELETE method:\n          json_dict : dict\n                  {\n                      \"action\": \"disconnect\"\n                  }\n      Returns\n      -------\n      success : bool\n          True if successful, false if not\n      data : list\n      delete method returns status code 204\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "action": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/signatures/docusign_config": {
      "post": {
        "summary": "docusign_config",
        "tags": [
          "signatures"
        ],
        "description": "\n    Endpoint to retrieve and save settings on e-signature service\n\n   Parameters:\n    -----------\n    GET method\n    PATCH method:\n        json_dict : dict\n                {\n                    \"data\": {\n                        \"type\": str,\n                        \"attributes\": {\n                            \"enabled_esignature_documents\": [\n                                {\n                                    \"document_parent_type\": str,\n                                    \"document_type_id\": str,\n                                    \"state_id\": str,\n                                    \"effective_date_id\": str,\n                                    \"policy_type_id\": str\n                                },\n                            ]\n                        }\n                    }\n                }\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    data : list\n        The data response:\n        ::\n        {\n            \"data\": {\n                \"data\": {\n                    \"attributes\": {\n                        \"enabled_esignature_documents\": [\n                            {\n                                \"policy_type_id\": \"275292e7-1572-4625-a767-a14bf74ae386\",\n                                \"document_parent_type\": \"Deliverable\",\n                                \"state_id\": \"339ff8b0-8c0e-11de-b1cc-000c2976c0ee\",\n                                \"document_type_id\": \"07d54bcc-dce1-4f39-a27b-9df9baee5a85\",\n                                \"effective_date_id\": \"6608d0f9-8e83-4e03-aff1-f7c680d4b84c\"\n                            }\n                        ]\n                    },\n                    \"type\": \"config\"\n                }\n            },\n            \"messages\": [],\n            \"success\": true\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/signatures/flush_cache": {
      "post": {
        "summary": "flush_cache",
        "tags": [
          "signatures"
        ],
        "description": "Flushes all cached data used by the e-signature integration.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/signatures/get_envelope": {
      "post": {
        "summary": "get_envelope",
        "tags": [
          "signatures"
        ],
        "description": "\n    Endpoint to return a signature or signatures that are related to a revision\n\n    Parameters:\n     -----------\n     GET method\n     revision_id: the revision of the signature\n     envelope_id: the id of an envelope\n\n    Returns:\n     -----------\n    success : bool\n        True if successful, false if not\n    data : list or Dict\n        List of envelopes if revision_id provided\n        Dictionary with envelope data if envelope_id provided\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "envelope_id": {},
                  "revision_id": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/signatures/get_signatures": {
      "post": {
        "summary": "get_signatures",
        "tags": [
          "signatures"
        ],
        "description": "\n    Endpoint to retrieve individual signature statuses\n\n    Parameters:\n     -----------\n     GET method\n     revision_id: the revision of the signature\n     include_complete: bool, if we should return complete status.\n\n    Returns:\n     -----------\n    success : bool\n        True if successful, false if not\n    data : list\n        List of each individual signer\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "revision_id": {},
                  "include_complete": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/signatures/recreate_envelope": {
      "post": {
        "summary": "recreate_envelope",
        "tags": [
          "signatures"
        ],
        "description": "\n    Endpoint to regenerate an envelope for e-signature\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "revision_id": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/signatures/update_signatures": {
      "post": {
        "summary": "update_signatures",
        "tags": [
          "signatures"
        ],
        "description": "\n\n    Parameters\n    ----------\n    envelope_id : str\n        Id of the envelope\n    status : str\n        Status of the signature\n        One of the following\n            sent\n            viewed\n            signed\n            completed\n            declined\n            voided\n            errored\n    signers: List of individual signers with states\n\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : If successful a dict with the envelope_id, status, and revision_id associated with the signatures\n    and a list of updated individual signers\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "envelope_id": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string"
                  },
                  "signers": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/signatures/void_envelope": {
      "post": {
        "summary": "void_envelope",
        "tags": [
          "signatures"
        ],
        "description": "Voids a signature request envelope.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "revisionId": {},
                  "envelopeId": {},
                  "voidReason": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/statement_of_value/create_sov": {
      "post": {
        "summary": "create_sov",
        "tags": [
          "statement_of_value"
        ],
        "description": "\n    Save a sov import data\n    :param sov_import: SovImport instance\n    :return: the sov import data id\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/statement_of_value/delete_sov": {
      "post": {
        "summary": "delete_sov",
        "tags": [
          "statement_of_value"
        ],
        "description": "\n    Deletes a sov import\n    :param sov_import_id: the sov import id to delete\n    :return: the sov import data id\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/statement_of_value/delete_sov_file": {
      "post": {
        "summary": "delete_sov_file",
        "tags": [
          "statement_of_value"
        ],
        "description": "\n    Deletes the previous file associated to the sov import data\n    :param file_id: the file id to delete\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/statement_of_value/execute_sov_job": {
      "post": {
        "summary": "execute_sov_job",
        "tags": [
          "statement_of_value"
        ],
        "description": "\n    Starts an SoV import job\n    :param sov_import_id: the sov import data id to execute the job\n    :returns: sov_import\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/statement_of_value/export_sov_template": {
      "post": {
        "summary": "export_sov_template",
        "tags": [
          "statement_of_value"
        ],
        "description": "\n    Exports an SoV file\n    :param policy_type_id: the id of the policy type to use as template.\n    :param policy_numbers: the list of policy numbers to export. Can be empty.\n    :return: the sov file\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "policy_type_id": {},
                  "policy_numbers": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/statement_of_value/get_policies_from_sov": {
      "post": {
        "summary": "get_policies_from_sov",
        "tags": [
          "statement_of_value"
        ],
        "description": "\n    Gets the policies from a sov import data\n    :param page: the page number\n    :param page_size: the page size\n    :param sov_import_id: the sov import data id to get the policies associated to it\n    :return: the policies list\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/statement_of_value/get_sov_info": {
      "post": {
        "summary": "get_sov_info",
        "tags": [
          "statement_of_value"
        ],
        "description": "\n    Get the info of a SOV\n    Parameters\n    ----------\n    sov_id: the sov id\n\n    Returns\n    -------\n    dict\n        The sov data\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/statement_of_value/get_sovs": {
      "post": {
        "summary": "get_sovs",
        "tags": [
          "statement_of_value"
        ],
        "description": "\n    Gets the list of sov data\n    :return: the list of sov import data\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/statement_of_value/update_elastic_search_index": {
      "post": {
        "summary": "update_elastic_search_index",
        "tags": [
          "statement_of_value"
        ],
        "description": "\n    Updates the elastic search index for a policy\n    :param policy_ids: the policy id to update\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/statement_of_value/update_sov": {
      "post": {
        "summary": "update_sov",
        "tags": [
          "statement_of_value"
        ],
        "description": "\n    Updates a sov import data\n    :param sov_import: the sov import data to update\n    :return: the sov import data\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/statement_of_value/validate_sov": {
      "post": {
        "summary": "validate_sov",
        "tags": [
          "statement_of_value"
        ],
        "description": "\n    Validates the sov import data\n    :param sov_import_id: the sov import data id to validate\n    :return: the sov import data\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/subjectivities/create_subjectivity": {
      "post": {
        "summary": "create_subjectivity",
        "tags": [
          "subjectivities"
        ],
        "description": "Create an XRevisionSubjectivity.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-create_subjectivity"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-create_subjectivity"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/subjectivities/create_subjectivity_definition": {
      "post": {
        "summary": "create_subjectivity_definition",
        "tags": [
          "subjectivities"
        ],
        "description": "Create a subjectivity definition.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-create_subjectivity_definition"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-create_subjectivity_definition"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/subjectivities/delete_subjectivity": {
      "post": {
        "summary": "delete_subjectivity",
        "tags": [
          "subjectivities"
        ],
        "description": "Delete a revision subjectivity.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-delete_subjectivity"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-delete_subjectivity"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/subjectivities/filter_subjectivities": {
      "post": {
        "summary": "filter_subjectivities",
        "tags": [
          "subjectivities"
        ],
        "description": "Filter subjectivities.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-filter_subjectivities"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-filter_subjectivities"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/subjectivities/list_subjectivities": {
      "post": {
        "summary": "list_subjectivities",
        "tags": [
          "subjectivities"
        ],
        "description": "Retrieve list of revision subjectivities.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-list_subjectivities"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-list_subjectivities"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/subjectivities/list_subjectivity_definitions": {
      "post": {
        "summary": "list_subjectivity_definitions",
        "tags": [
          "subjectivities"
        ],
        "description": "Retrieve list of subjectivity definitions.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-list_subjectivity_definitions"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-list_subjectivity_definitions"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/subjectivities/modify_subjectivity": {
      "post": {
        "summary": "modify_subjectivity",
        "tags": [
          "subjectivities"
        ],
        "description": "Modify a revision subjectivity.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-modify_subjectivity"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-modify_subjectivity"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/subjectivities/modify_subjectivity_definition": {
      "post": {
        "summary": "modify_subjectivity_definition",
        "tags": [
          "subjectivities"
        ],
        "description": "Modify a subjectivity definition.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-modify_subjectivity_definition"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-modify_subjectivity_definition"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/subjectivities/retrieve_subjectivity": {
      "post": {
        "summary": "retrieve_subjectivity",
        "tags": [
          "subjectivities"
        ],
        "description": "Retrieve revision subjectivity by ID.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-retrieve_subjectivity"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-retrieve_subjectivity"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/subjectivities/retrieve_subjectivity_definition": {
      "post": {
        "summary": "retrieve_subjectivity_definition",
        "tags": [
          "subjectivities"
        ],
        "description": "Retrieve subjectivity definition by ID.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-retrieve_subjectivity_definition"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-retrieve_subjectivity_definition"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/subjectivities/retrieve_subjectivity_provenance": {
      "post": {
        "summary": "retrieve_subjectivity_provenance",
        "tags": [
          "subjectivities"
        ],
        "description": "Retrieve rule-execution provenance rows for a revision subjectivity.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-retrieve_subjectivity_provenance"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-retrieve_subjectivity_provenance"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/summaries/get_summary": {
      "post": {
        "summary": "get_summary",
        "tags": [
          "summaries"
        ],
        "description": "Return the persisted summary for a claim or policy, viewer-tailored.\n\n    One generation pass produces every role variant; this read path\n    selects the variant for the viewer and returns the flattened shape.\n    When no summary has been persisted, ``state`` is ``never_generated``\n    with an empty payload. When a summary generation job is in flight\n    (or recently finished), ``generation_status`` is included for UI\n    polling.\n\n    Parameters\n    ----------\n    reference_type : str\n        ``CLAIM`` or ``POLICY``.\n    reference_id : str\n        UUID of the claim or policy whose summary is being requested.\n    variant : str, optional\n        Role variant to read. For POLICY: ``agent``, ``underwriter``,\n        ``adjuster``. For CLAIM: ``adjuster``, ``siu``. Omit / null to let\n        the server resolve the variant from the viewer's session role\n        (POLICY) or the reference-type default.\n\n    Returns\n    -------\n    dict\n        The flattened ``SummaryResponseSchema`` shape: ``reference_type``,\n        ``reference_id``, ``variant``, ``narrative``,\n        ``data_completeness_warning``, ``generated_at``, ``state``\n        (``generated`` | ``never_generated``), and optional\n        ``generation_status`` (``RUNNING`` | ``SUCCEEDED`` | ``FAILED``).\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reference_type": {
                    "type": "string"
                  },
                  "reference_id": {
                    "type": "string"
                  },
                  "variant": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_summary"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/summaries/regenerate_summary": {
      "post": {
        "summary": "regenerate_summary",
        "tags": [
          "summaries"
        ],
        "description": "Queue async regeneration of a claim or policy summary.\n\n    When the per-reference-type generation flag is off, returns\n    ``status: SKIPPED``. Honors the per-entity cooldown\n    (``SUMMARY_COOLDOWN_SECONDS``): a request within the window raises an\n    error whose message mentions ``cooldown``. Otherwise queues an\n    AIAgents background job on the matching copilot and returns queue\n    status plus ``generation_status`` for UI polling via ``get_summary``.\n    Also serves the empty-state Generate button.\n\n    Parameters\n    ----------\n    reference_type : str\n        ``CLAIM`` or ``POLICY``.\n    reference_id : str\n        UUID of the claim or policy to regenerate.\n\n    Returns\n    -------\n    dict\n        ``{\"status\": \"QUEUED\"|\"SKIPPED\", \"generation_status\": {...}?}``.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reference_type": {
                    "type": "string"
                  },
                  "reference_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-regenerate_summary"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/summaries/save_summary": {
      "post": {
        "summary": "save_summary",
        "tags": [
          "summaries"
        ],
        "description": "Persist a generated summary envelope (MCP api-key contact only).\n\n    Called exclusively by the copilot agents (via the ``bc-policies`` /\n    ``bc-claims`` MCP save tools); human users do not hit this endpoint.\n    The variant key set must equal exactly the keys allowed for the\n    reference type, and each variant value must satisfy the variant\n    contract. The server sets the generated timestamp.\n\n    Parameters\n    ----------\n    reference_type : str\n        ``CLAIM`` or ``POLICY``.\n    reference_id : str\n        UUID of the claim or policy to attach the summary to.\n    summary : dict\n        The envelope ``{\"variants\": {\"<role>\": <variant>}}``. For POLICY\n        the variant keys must be exactly ``agent``, ``underwriter``,\n        ``adjuster``; for CLAIM exactly ``adjuster``, ``siu``. Each\n        variant carries ``narrative`` and ``data_completeness_warning``\n        (or null).\n\n    Returns\n    -------\n    dict\n        ``{\"saved\": true, \"generated_at\": \"<iso>\"}`` -- the server-set\n        generation timestamp in UTC.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reference_type": {
                    "type": "string"
                  },
                  "reference_id": {
                    "type": "string"
                  },
                  "summary": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/suspensions/create_suspension": {
      "post": {
        "summary": "create_suspension",
        "tags": [
          "suspensions"
        ],
        "description": "create_suspension",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/suspensions/delete_suspension": {
      "post": {
        "summary": "delete_suspension",
        "tags": [
          "suspensions"
        ],
        "description": "delete_suspension",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/suspensions/get_policy_applicable_suspensions": {
      "post": {
        "summary": "get_policy_applicable_suspensions",
        "tags": [
          "suspensions"
        ],
        "description": "get_policy_applicable_suspensions",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_policy_applicable_suspensions"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_policy_applicable_suspensions"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/suspensions/get_revision_suspensions": {
      "post": {
        "summary": "get_revision_suspensions",
        "tags": [
          "suspensions"
        ],
        "description": "get_revision_suspensions",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/suspensions/get_user_suspensions_with_geometries": {
      "post": {
        "summary": "get_user_suspensions_with_geometries",
        "tags": [
          "suspensions"
        ],
        "description": "get_user_suspensions_with_geometries",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_user_suspensions_with_geometries"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_user_suspensions_with_geometries"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/suspensions/list_suspensions": {
      "post": {
        "summary": "list_suspensions",
        "tags": [
          "suspensions"
        ],
        "description": "list_suspensions",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/suspensions/update_suspension": {
      "post": {
        "summary": "update_suspension",
        "tags": [
          "suspensions"
        ],
        "description": "update_suspension",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/tasks/bulk_modify_tasks": {
      "post": {
        "summary": "bulk_modify_tasks",
        "tags": [
          "tasks"
        ],
        "description": "Apply one bulk action from ``BULK_TASK_ACTIONS`` to the selected tasks\n    (BC-23219).\n\n    The action set is not restated here: it lives in ``BULK_TASK_ACTIONS``\n    (``lib/domain/constants.py``) alongside the map of which payload field each\n    one takes, and a copy in this docstring would go stale the next time one is\n    added or removed.\n\n    Guarded by the same ``britecore/tasks`` rw permission as ``modify_task``,\n    because that is what this ultimately performs: the service drives each task\n    through the single-task path so every one keeps its own history entry and\n    events. The queue's ``edit_tasks`` capability decides whether the bulk\n    controls are offered in the UI, which is an affordance rather than access\n    control -- this decorator is the actual gate.\n\n    A batch that fails for some tasks still applies to the rest; the response\n    reports each task's outcome and the reason for every failure.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-bulk_modify_tasks"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-bulk_modify_tasks"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/tasks/create_task": {
      "post": {
        "summary": "create_task",
        "tags": [
          "tasks"
        ],
        "description": "create_task",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-create_task"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-create_task"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/tasks/create_task_definition": {
      "post": {
        "summary": "create_task_definition",
        "tags": [
          "tasks"
        ],
        "description": "Create a new task definition.\n\n    Args:\n        task_definition_data: The task definition data to create\n\n    Returns:\n        The created task definition\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-create_task_definition"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-create_task_definition"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/tasks/create_task_definitions_assignees": {
      "post": {
        "summary": "create_task_definitions_assignees",
        "tags": [
          "tasks"
        ],
        "description": "Create task definitions assignees for roles and user groups.\n\n    Args:\n        assignment_data: The assignment data containing task_definition_id,\n                        role_ids list, and user_group_ids list\n\n    Returns:\n        List of created assignments\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-create_task_definitions_assignees"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-create_task_definitions_assignees"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/tasks/create_task_note": {
      "post": {
        "summary": "create_task_note",
        "tags": [
          "tasks"
        ],
        "description": "Write a note on a task.\n\n    Parameters\n    ----------\n    task_id : str\n        UUID of the task the note belongs to.\n    contents : str\n        The note body. Required, and capped at 10000 characters.\n    share_to_policy : bool, optional\n        Defaults to false. When true the note is also published to the task's\n        policy, appearing on that policy's Notes tab as well as on the task.\n        Needs no permission beyond this endpoint's own, but the task must be\n        attached to a policy. Cannot be changed after the note is written.\n\n    Returns\n    -------\n    dict\n        The created note in the same shape ``retrieve_task_notes`` returns.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-create_task_note"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-create_task_note"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/tasks/delete_task_definition": {
      "post": {
        "summary": "delete_task_definition",
        "tags": [
          "tasks"
        ],
        "description": "Delete a task definition (soft delete).\n\n    Args:\n        id: The ID of the task definition to delete\n\n    Returns:\n        Success response\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-delete_task_definition"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-delete_task_definition"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/tasks/export_tasks": {
      "post": {
        "summary": "export_tasks",
        "tags": [
          "tasks"
        ],
        "description": "Export the task queue's current query as CSV.\n\n    Accepts the same ``query`` / ``filters`` / ``sorting`` / ``view`` as\n    retrieve_tasks, and returns the whole filtered set rather than one page,\n    split into files of ``TASK_EXPORT_ROWS_PER_FILE`` rows.\n\n    Call it twice. Omit ``file_index`` for the plan: the row total, the file\n    count, and each file's name and row range. Then request one file at a time\n    by index, echoing back the plan's ``filename_timestamp`` so every file is\n    named for the same instant. A ``file_index`` past the last file is rejected.\n\n    Optional ``filters.ids`` limits the export to specific task uuids;\n    ``group_by_policy`` keeps each policy's tasks together in the file;\n    ``task_scopes`` names whether to include ``policy`` work, ``claim`` work or\n    both, so an export taken from the Underwriting queue matches what that queue\n    lists.\n\n    Requires read on ``britecore/tasks``.\n\n    Schemas: lib/api/api_specs/request-export_tasks.json and\n    response-export_tasks.json.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-export_tasks"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-export_tasks"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/tasks/modify_task": {
      "post": {
        "summary": "modify_task",
        "tags": [
          "tasks"
        ],
        "description": "Updates an existing task.\n\n    Partial: only the keys sent are changed. The stored selection strategy is\n    re-run -- which can move the task to a different assignee -- only when the\n    payload touches assignment, since ``modify_task`` merges that strategy onto\n    the partial payload and cannot tell a merged value from a sent one.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-modify_task"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-modify_task"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/tasks/modify_task_definition": {
      "post": {
        "summary": "modify_task_definition",
        "tags": [
          "tasks"
        ],
        "description": "Update an existing task definition.\n\n    Args:\n        task_definition_payload: The task definition data to update\n\n    Returns:\n        The updated task definition\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-modify_task_definition"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-modify_task_definition"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/tasks/modify_task_definitions_assignees": {
      "post": {
        "summary": "modify_task_definitions_assignees",
        "tags": [
          "tasks"
        ],
        "description": "Modify task definitions assignees by adding or deleting roles and user groups.\n\n    Args:\n        assignment_data: The assignment data containing task_definition_id,\n                        add_role_ids, add_user_group_ids, delete_role_ids, delete_user_group_ids\n\n    Returns:\n        List of current assignments after modifications\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-modify_task_definitions_assignees"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-modify_task_definitions_assignees"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/tasks/replace_task_definition_outcomes": {
      "post": {
        "summary": "replace_task_definition_outcomes",
        "tags": [
          "tasks"
        ],
        "description": "Replace the outcome catalog for a task definition.\n\n    Accepts the full desired outcome list for a task definition.  Rows the\n    payload keeps by id are updated in place; new entries are inserted;\n    entries the payload omits are soft-deleted.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/tasks/resolve_assignee_by_strategy": {
      "post": {
        "summary": "resolve_assignee_by_strategy",
        "tags": [
          "tasks"
        ],
        "description": "Resolve which contact would be auto-assigned using a given strategy.\n\n    Used by the task form to preview the assignee for a non-manual strategy\n    before the task is saved. An optional assigned subgroup restricts the\n    candidate pool to that single role / user group.\n\n    Args:\n        task_definition_id: The task definition to resolve against\n        strategy: The strategy to use (round_robin, availability, capacity)\n        assigned_role_id: Optional role subgroup to restrict the pool to\n        assigned_user_group_id: Optional user group subgroup to restrict the pool to\n\n    Returns:\n        Contact object or None\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/tasks/retrieve_common_allowed_assignees": {
      "post": {
        "summary": "retrieve_common_allowed_assignees",
        "tags": [
          "tasks"
        ],
        "description": "Retrieve contacts allowed to be assigned to tasks of every given task definition.\n\n    Returns the intersection, not the union: a bulk reassign validates each task\n    against its own definition, so only a contact allowed by all of the\n    definitions in the selection can be applied to the whole of it. Passing a\n    single id gives the same result as retrieve_task_definition_allowed_assignees\n    without an assigned subgroup.\n\n    Schemas: lib/api/api_specs/request-retrieve_common_allowed_assignees.json and\n    lib/api/api_specs/response-retrieve_common_allowed_assignees.json.\n\n    Args:\n        task_definition_ids: The IDs of the task definitions to intersect\n        limit: Optional maximum number of assignees to return\n        search: Optional search term to filter contacts by name or id\n        assigned_role_id: Optional role the selection is pinned to, narrowing\n            the result on top of the definitions\n        assigned_user_group_id: Optional user group the selection is pinned to\n\n    Returns:\n        List of contact objects allowed by every given task definition\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-retrieve_common_allowed_assignees"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-retrieve_common_allowed_assignees"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/tasks/retrieve_filter_options": {
      "post": {
        "summary": "retrieve_filter_options",
        "tags": [
          "tasks"
        ],
        "description": "\n    Retrieve available filter options for tasks.\n    Returns options for status, priority, and task types.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-retrieve_filter_options"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/tasks/retrieve_queue_capabilities": {
      "post": {
        "summary": "retrieve_queue_capabilities",
        "tags": [
          "tasks"
        ],
        "description": "Return the current user's queue capabilities and the lifecycle buckets.\n\n    The queue shows different affordances to different users (BC-23218). Each\n    capability resolves from a permission path server-side, so the client asks\n    for a capability by name instead of re-deriving permission rules of its own.\n    The lifecycle buckets ride along so the client keeps no copy of the\n    status-to-bucket mapping. Gating affordances is not access control:\n    endpoints keep their own permission decorators and scoping.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-retrieve_queue_capabilities"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-retrieve_queue_capabilities"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/tasks/retrieve_task": {
      "post": {
        "summary": "retrieve_task",
        "tags": [
          "tasks"
        ],
        "description": "Return a single task, with the policy context the detail sidebar needs.\n\n    Parameters\n    ----------\n    id : str\n        UUID of the task.\n\n    Returns\n    -------\n    dict\n        The task. ``policy_context`` carries agent, underwriter, agency group,\n        additional interest count and written premium. It is ``null`` without\n        ``britecore/policies/information`` read, and on every other endpoint\n        returning this shape.\n\n        ``trigger`` is the automation that created the task, ``null`` when a\n        person did. ``type`` is ``workflow``, ``stp_rule`` or\n        ``underwriting_rule``; ``trigger_id`` / ``trigger_name`` identify the\n        configured workflow or rule and ``run_id`` the one firing.\n        ``rule_description`` is that workflow's or rule's own text, not the\n        task's ``description``, which is editable.\n\n        ``trigger.linked_item`` is what the trigger was looking at, which can be\n        narrower than the task's policy -- a ``driver``-category rule fired on\n        one driver, and ``id`` is that contact. ``policy_id`` is the policy it\n        is reached through. ``label`` is best effort, and ``null`` once the record\n        is deleted or without ``britecore/policies/information`` read;\n        ``linked_item`` is ``null`` only on a triage task.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-retrieve_task"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-retrieve_task"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/tasks/retrieve_task_definition": {
      "post": {
        "summary": "retrieve_task_definition",
        "tags": [
          "tasks"
        ],
        "description": "retrieve_task_definition",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-retrieve_task_definition"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-retrieve_task_definition"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/tasks/retrieve_task_definition_allowed_assignees": {
      "post": {
        "summary": "retrieve_task_definition_allowed_assignees",
        "tags": [
          "tasks"
        ],
        "description": "Retrieve contacts that are allowed to be assigned to tasks for a given task definition.\n\n    This endpoint maps the configured roles and user groups to actual contacts/users.\n    An optional assigned subgroup narrows the result to that single role /\n    user group.\n\n    Schemas: lib/api/api_specs/request-retrieve_task_definition_allowed_assignees.json\n    and lib/api/api_specs/response-retrieve_task_definition_allowed_assignees.json.\n\n    Args:\n        task_definition_id: The ID of the task definition\n        limit: Optional maximum number of assignees to return\n        search: Optional search term to filter contacts by name or id\n        assigned_role_id: Optional role subgroup to restrict results to\n        assigned_user_group_id: Optional user group subgroup to restrict results to\n\n    Returns:\n        List of contact objects representing allowed assignees\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-retrieve_task_definition_allowed_assignees"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-retrieve_task_definition_allowed_assignees"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/tasks/retrieve_task_definition_outcomes": {
      "post": {
        "summary": "retrieve_task_definition_outcomes",
        "tags": [
          "tasks"
        ],
        "description": "Return the outcome catalog for a task definition.\n\n    Args:\n        task_definition_id: The ID of the task definition whose outcomes to return.\n\n    Returns:\n        List of active outcomes (id, key, name, description, sort order).\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/tasks/retrieve_task_definition_subgroups": {
      "post": {
        "summary": "retrieve_task_definition_subgroups",
        "tags": [
          "tasks"
        ],
        "description": "Return the roles / user groups wired to a task definition, as the\n    subgroup options a task instance can be pinned to.\n\n    Args:\n        task_definition_id: The ID of the task definition\n\n    Returns:\n        List of {id, type, name} entries (\"role\" or \"user_group\")\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/tasks/retrieve_task_definitions": {
      "post": {
        "summary": "retrieve_task_definitions",
        "tags": [
          "tasks"
        ],
        "description": "retrieve_task_definitions",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/tasks/retrieve_task_definitions_assignees": {
      "post": {
        "summary": "retrieve_task_definitions_assignees",
        "tags": [
          "tasks"
        ],
        "description": "Retrieve task definitions assignees.\n\n    Args:\n        params: Optional dict containing task_definition_id to filter by\n\n    Returns:\n        List of assignments (all if no task_definition_id provided, filtered otherwise)\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-retrieve_task_definitions_assignees"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-retrieve_task_definitions_assignees"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/tasks/retrieve_task_documents": {
      "post": {
        "summary": "retrieve_task_documents",
        "tags": [
          "tasks"
        ],
        "description": "Return the documents on the record a task is attached to, newest first.\n\n    Nothing links a file to a task, so these are the linked claim's files for a\n    claim task and the linked policy's for a policy task. Capped at the newest\n    ``domain.constants.TASK_DOCUMENT_LIST_LIMIT`` rows; folders, the emailed\n    duplicate of a printed deliverable, and private files the caller's roles may\n    not see are all left out.\n\n    Parameters\n    ----------\n    id : str\n        UUID of the task.\n\n    Returns\n    -------\n    dict\n        ``permitted`` is False when the caller may not read attachments on the\n        linked record, and ``documents`` is then empty -- an empty list alone\n        cannot say which of the two happened. ``truncated`` is True when the\n        record holds more files than the cap, so ``documents`` is a page and its\n        length is not the record's total.\n\n        Each entry in ``documents`` has ``id``, ``name``, ``mime_type``,\n        ``size`` (bytes), ``uploaded_at``, ``uploader``, ``is_system`` and\n        ``previewable``. ``is_system`` marks a file the system attached itself\n        -- a generated deliverable or a vendor push -- rather than one a person\n        uploaded, and those carry no ``uploader``. ``previewable`` is true only\n        for the types ``core.uploads.getAttachment`` serves inline (PDF,\n        non-SVG image); everything else downloads.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-retrieve_task_documents"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-retrieve_task_documents"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/tasks/retrieve_task_history": {
      "post": {
        "summary": "retrieve_task_history",
        "tags": [
          "tasks"
        ],
        "description": "retrieve_task_history",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-retrieve_task_history"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-retrieve_task_history"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/tasks/retrieve_task_notes": {
      "post": {
        "summary": "retrieve_task_notes",
        "tags": [
          "tasks"
        ],
        "description": "Return the notes written on a task, newest first.\n\n    Parameters\n    ----------\n    id : str\n        UUID of the task.\n\n    Returns\n    -------\n    list of dict\n        Each entry has ``id``, ``task_id``, ``contents``, ``author``,\n        ``created_at`` and ``shared_to_policy``. ``author`` is the name\n        recorded when the note was written, not a contact reference.\n        ``shared_to_policy`` marks a note that was promoted to the task's\n        policy when it was written, so it also appears on the policy's Notes\n        tab; the rest are readable only here.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-retrieve_task_notes"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-retrieve_task_notes"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/tasks/retrieve_task_provenance": {
      "post": {
        "summary": "retrieve_task_provenance",
        "tags": [
          "tasks"
        ],
        "description": "Return rule-execution provenance rows for a task created by an effect.\n\n    Returns ``None`` when the task was not created by a rule effect.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-retrieve_task_provenance"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-retrieve_task_provenance"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/tasks/retrieve_tasks": {
      "post": {
        "summary": "retrieve_tasks",
        "tags": [
          "tasks"
        ],
        "description": "retrieve_tasks",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-retrieve_tasks"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-retrieve_tasks"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/tasks/retrieve_team_workload": {
      "post": {
        "summary": "retrieve_team_workload",
        "tags": [
          "tasks"
        ],
        "description": "Return per-underwriter open / overdue / blocked task counts.\n\n    Backs the admin Team Workload view. This one is genuine access control, not\n    just an affordance: the response exposes other users' workload, so the\n    service refuses a caller without the ``view_team_workload`` capability rather\n    than relying on the client not to ask.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-retrieve_team_workload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-retrieve_team_workload"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/tasks/retrieve_underwriting_calendar": {
      "post": {
        "summary": "retrieve_underwriting_calendar",
        "tags": [
          "tasks"
        ],
        "description": "Return per-day counts of the caller's open tasks for one month.\n\n    Backs the Dashboard calendar, which is navigable: paging months must not\n    re-fetch the whole dashboard payload. ``month`` is ``YYYY-MM`` and defaults\n    to the current one; the response pads either side by\n    UW_DASHBOARD_CALENDAR_PAD_DAYS so adjacent-month days in the grid carry\n    their density too.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-retrieve_underwriting_calendar"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-retrieve_underwriting_calendar"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/tasks/retrieve_underwriting_dashboard": {
      "post": {
        "summary": "retrieve_underwriting_dashboard",
        "tags": [
          "tasks"
        ],
        "description": "Return the Underwriting Dashboard's My Dashboard payload.\n\n    The caller's own KPI counts, the premium their overdue work puts at risk,\n    their Priority Work rows, and their queue capabilities - one round trip.\n    Ungated beyond task read: every figure is derived from the caller's own\n    tasks.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-retrieve_underwriting_dashboard"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-retrieve_underwriting_dashboard"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/tasks/retrieve_underwriting_dashboard_panels": {
      "post": {
        "summary": "retrieve_underwriting_dashboard_panels",
        "tags": [
          "tasks"
        ],
        "description": "Return the Dashboard's Recent Activity, Upcoming Renewals and Pipeline.\n\n    Separate from retrieve_underwriting_dashboard so the KPI strip and Priority\n    Work are not held up by three secondary aggregates.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-retrieve_underwriting_dashboard_panels"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-retrieve_underwriting_dashboard_panels"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/tasks/retrieve_underwriting_team_performance": {
      "post": {
        "summary": "retrieve_underwriting_team_performance",
        "tags": [
          "tasks"
        ],
        "description": "Return the Team Performance payload: workload, On Hold, cycle time.\n\n    Enforces ``view_team_workload``: every figure here describes other people's\n    work, so this is access control and not an affordance.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-retrieve_underwriting_team_performance"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-retrieve_underwriting_team_performance"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/term_credit_scores/get_options": {
      "post": {
        "summary": "get_options",
        "tags": [
          "term_credit_scores"
        ],
        "description": "\n    Get available credit score options for a revision.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_options"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_options"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/term_credit_scores/update_selection": {
      "post": {
        "summary": "update_selection",
        "tags": [
          "term_credit_scores"
        ],
        "description": "\n    Update the credit score selection for a revision.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-update_selection"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-update_selection"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/terms/accept": {
      "post": {
        "summary": "accept",
        "tags": [
          "terms"
        ],
        "description": "Record acceptance of the terms version the caller was shown.\n\n    Request body: {\"key\": \"sql_editor\", \"version\": \"<content hash>\"}\n\n    ``version`` is required and must match the currently registered version. If\n    the notice changed after the page loaded, the request is rejected with a\n    ``version`` field error so the client can reload and show the current text\n    rather than filing an acceptance for text the user never read.\n\n    Acceptance is blocked while impersonating: a legal acknowledgment must be\n    made by the user directly, not on their behalf.\n\n    With ``reports.enable-sql-editor-terms`` off, the call succeeds without\n    recording an acceptance.\n\n    Request and response schemas are located at\n    'lib/api/api_specs/request-terms_accept.json' and\n    'lib/api/api_specs/response-terms_accept.json', respectively.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-terms_accept"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-terms_accept"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/terms/status": {
      "post": {
        "summary": "status",
        "tags": [
          "terms"
        ],
        "description": "Return the ToS acceptance status for the current user.\n\n    Request body: {\"key\": \"sql_editor\"}\n    Returns: {accepted, current_version, text, effective_date,\n              previously_accepted_older_version}\n\n    Request and response schemas are located at\n    'lib/api/api_specs/request-terms_status.json' and\n    'lib/api/api_specs/response-terms_status.json', respectively.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-terms_status"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-terms_status"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/uploads/attach_file": {
      "post": {
        "summary": "attach_file",
        "tags": [
          "uploads"
        ],
        "description": "\n    Attaches the provided file to an entity.\n\n    The input and output formats of this function are defined by the JSON schemas\n    located at 'lib/api/api_specs/request-attach_file.json' and\n    'lib/api/api_specs/response-attach_file.json', respectively.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-attach_file"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-attach_file"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/uploads/attach_file_to_policy": {
      "post": {
        "summary": "attach_file_to_policy",
        "tags": [
          "uploads"
        ],
        "description": "\n    Attaches provided file to a policy.\n\n    Parameters\n    ----------\n    policy_number: str\n        Optional. If provided, will be used to find the policy. If not provided, revision_id must be provided.\n    revision_id: str\n        Optional. If provided, will be used to find the policy. If not provided, policy_number must be provided.\n        If both are provided, policy_number will be used.\n    folder_name: str\n        Required. Folder name to attach file to. The folder will be created under the policy if it does not exist.\n    attachment: str\n        Required. Base64-encoded file content.\n    title: str\n        Required. File name.\n    mime_type: str\n        Required. File MIME type.\n    set_file_private: bool\n        Optional. If true, set the file to private. Defaults to False.\n    set_folder_private_if_new: bool\n        Optional. If true, set the folder to private if the folder does not already exist. Defaults to False.\n    date_added: bool\n        Optional. Set when the file was added. Defaults to now.\n        Format: YYYY-mm-ddTHH:MM:SSZ  (e.g. 2020-01-01T12:00:00Z). This is UTC time.\n\n    Returns\n    -------\n    success : bool\n        True if completely successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        A dictionary containing the following:\n        {\n            'policy_number': str,\n            'policy_id': UUID,\n            'attachment_id': UUID\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "policy_number": {
                    "type": "string"
                  },
                  "revision_id": {
                    "type": "string"
                  },
                  "folder_name": {
                    "type": "string"
                  },
                  "attachment": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "mime_type": {
                    "type": "string"
                  },
                  "set_file_private": {
                    "type": "string"
                  },
                  "set_folder_private_if_new": {
                    "type": "string"
                  },
                  "date_added": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/user_groups/add_group": {
      "post": {
        "summary": "add_group",
        "tags": [
          "user_groups"
        ],
        "description": "add_group",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/user_groups/delete_group": {
      "post": {
        "summary": "delete_group",
        "tags": [
          "user_groups"
        ],
        "description": "delete_group",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/user_groups/get_group": {
      "post": {
        "summary": "get_group",
        "tags": [
          "user_groups"
        ],
        "description": "get_group",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/user_groups/list_groups": {
      "post": {
        "summary": "list_groups",
        "tags": [
          "user_groups"
        ],
        "description": "list_groups",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/user_groups/list_permission_levels": {
      "post": {
        "summary": "list_permission_levels",
        "tags": [
          "user_groups"
        ],
        "description": "list_permission_levels",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/user_groups/update_group": {
      "post": {
        "summary": "update_group",
        "tags": [
          "user_groups"
        ],
        "description": "update_group",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/utils/add_britedocs_reference": {
      "post": {
        "summary": "add_britedocs_reference",
        "tags": [
          "utils"
        ],
        "description": "Associates a Report for a given Location with a deliverable template in BriteDocs\n\n    Parameters\n    ----------\n    x_report_location_id : str\n        The UUID of the Report for a given Location (the id of a row in\n         x_report_locations table).\n    britedocs_id : str, required\n        The UUID of the Deliverable template in BriteDocs.\n    report_type_name : str\n        The report type name of the Deliverable template in BriteCore.\n    location_name : str\n        The location name in BriteCore.\n    product_name : str\n        The product name in BriteLines.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not.\n    messages : list\n        A list of human-readable error messages.\n    data : dict\n        An empty dict emulating a 204 response from the server.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "x_report_location_id": {
                    "type": "string"
                  },
                  "britedocs_id": {
                    "type": "string"
                  },
                  "report_type_name": {
                    "type": "string"
                  },
                  "location_name": {
                    "type": "string"
                  },
                  "product_name": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/utils/generate_receipt": {
      "post": {
        "summary": "generate_receipt",
        "tags": [
          "utils"
        ],
        "description": "Generates a Receipt file related to the given Payment record.\n\n    Parameters\n    ----------\n    payment_id : str, required\n        The database UUID for the specified Payment record\n\n    Returns\n    -------\n    success : bool\n        True if the receipt was successfully generated\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "payment_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/utils/get_effective_dates": {
      "post": {
        "summary": "get_effective_dates",
        "tags": [
          "utils"
        ],
        "description": "get_effective_dates",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/utils/get_navigation_links": {
      "post": {
        "summary": "get_navigation_links",
        "tags": [
          "utils"
        ],
        "description": "API method to retrieve links to display in navigation headers based\n    on contact and chosen role info available in user's session.\n\n    Parameters\n    ----------\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict containing the links\n        ::\n        {\n            \"data\": {\n                \"briteapps\": str,\n                \"contacts\": str,\n                \"settings\": str,\n                \"lines\": str,\n                \"reports\": str,\n                \"oops\": str,\n                \"quotes\": str,\n                \"dashboard\": str,\n                \"policies\": str,\n                \"claims\": str,\n                \"support_tools\": str,\n                \"payments\": str\n            },\n            \"messages\": [],\n            \"success\": bool\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/utils/get_policies": {
      "post": {
        "summary": "get_policies",
        "tags": [
          "utils"
        ],
        "description": "get_policies",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contact_id": {},
                  "from_date": {},
                  "to_date": {},
                  "sorting_order": {},
                  "page_number": {},
                  "page_size": {},
                  "include_policy_photo": {},
                  "include_canceled": {},
                  "policy_statuses": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/utils/get_release_info": {
      "post": {
        "summary": "get_release_info",
        "tags": [
          "utils"
        ],
        "description": "API method to retrieve the BriteCore release info based on britecore.cfg\n\n    Parameters\n    ----------\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The data response having the form:\n        ::\n            {\n                'tag': str,\n                'timestamp': str | null\n            }\n\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/utils/get_signable_deliverable_names": {
      "post": {
        "summary": "get_signable_deliverable_names",
        "tags": [
          "utils"
        ],
        "description": "get_signable_deliverable_names",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/utils/mark_file_as_signed": {
      "post": {
        "summary": "mark_file_as_signed",
        "tags": [
          "utils"
        ],
        "description": "Use this function for marking file in files table\n    signed e.g. esigned=True after all participants signed document.\n\n    Parameters\n    ----------\n    file_id : str, required\n        UUID of the existing File instance\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "file_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/utils/mark_return_premium_or_claim_payment_as_exported_with_check_details": {
      "post": {
        "summary": "mark_return_premium_or_claim_payment_as_exported_with_check_details",
        "tags": [
          "utils"
        ],
        "description": "\n    Mark return premium or claim payment as exported. Optionally assign check numbers and dates to the payments.\n\n    Parameters\n    ----------\n    table_name : str, required\n        Table name to mark as exported, return_premium or claim_transaction.\n        Only claim_transaction.type = 'payment' is supported for claim_transaction table.\n        check_date is persisted on both return_premium and claim_transaction.\n\n        A return premium is exported through the same guarded routine as the Return\n        Premiums UI, so a record that must not be exported -- one already exported, or\n        voided, canceled, rejected, transferred back to the policy by a reinstatement, or\n        unauthorized while `billing / use_authorize_return_premium` is on -- is refused\n        and reported in `failed_to_export` rather than marked exported (BC-25040).\n    records_to_export = dict, required\n        Dictionary of records to export with the form:\n        ::\n            {\n                '123': {'check_number': '001', 'check_date': '2024-01-01'},\n                '456': {'check_number': '002', 'check_date': None},\n                '789': {'check_number': None, 'check_date': None},\n            }\n        The keys are the record ids and the values are dictionaries with the check_number and check_date to assign\n        to the record. If the check_number or check_date is None, it will not be assigned to the record.\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not. It returns True if at least one record is exported.\n    messages : list of str\n        List of human-readable error messages. If the function executed successfully, this list will be empty.\n        Includes error details if any record fails to be processed.\n    data : dict\n        The data response having the form:\n        ::\n            {\n                'successfully_exported': list of str,\n                'failed_to_export': list of str\n            }\n        successfully_exported is a list of record ids that were successfully exported.\n        failed_to_export is a list of record ids that failed to be exported.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "table_name": {
                    "type": "string"
                  },
                  "records_to_export = dict, required": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/utils/meta": {
      "post": {
        "summary": "meta",
        "tags": [
          "utils"
        ],
        "description": "\n    Get meta data about britecore\n    Currently this is only returning the live_status,\n    policy_prefix, and claim_prefix\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/utils/rebuild_search_index": {
      "post": {
        "summary": "rebuild_search_index",
        "tags": [
          "utils"
        ],
        "description": "Rebuilds Elastic Search indexes for select or all index maps\n\n    Parameters\n    ----------\n    only_build : list of str\n        Which of the index maps to rebuild, options are\n        ['contacts', 'policies', 'properties', 'claims', 'protection_classes']\n    chunk_size : int\n        How many records should be queried at a time? Default is 2500, use 0 for no chunking (memory hungry, but faster)\n\n    Returns\n    -------\n    success : bool\n        True if successful, false if not\n    messages : list of str\n        List of human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "only_build": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "chunk_size": {
                    "type": "integer"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/utils/refund": {
      "post": {
        "summary": "refund",
        "tags": [
          "utils"
        ],
        "description": "Creates a refund on the given policy regardless of the policy balance.\n\n    Parameters\n    ----------\n    policy_number : str, required\n        Any valid policy_number.\n    refund_amount : float, required\n        The amount of the refund.\n    refund_reason : str, required\n        The reason for creating a refund.\n    transfer_policy_number : str, optional\n        Optionally transfer the refund amount to another policy with this number.\n    policy_term_id : basestring\n        The term to apply the refund to.\n    rebill_returned_premium : bool, optional\n        Bill this refund back on the remaining installments. The portion of it that leaves\n        premium still owed goes back into unbilled premium, so the next rebuild collects\n        that instead of spreading the whole premium difference. Defaults to False, which is\n        the behaviour every other refund producer has always had. BC-24303.\n\n        Deliberately an operator input rather than something inferred here. A\n        'Return Premium' row records that cash left, not why, and the same adjustment is a\n        true restatement of over-billed premium or a false one depending on which - nothing\n        at this layer can tell them apart, so it is not guessed. The portion rule in\n        `PolicyAccounting.rebill_returned_premium` still decides how much, and can decide\n        none: a refund that only hands back a credit re-bills nothing however this is set.\n\n    Returns\n    -------\n    success : bool\n        True if the refund was successfully created.\n    messages : list\n        List of human-readable messages including information regarding encountered errors.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "policy_number": {
                    "type": "string"
                  },
                  "refund_amount": {
                    "type": "number"
                  },
                  "refund_reason": {
                    "type": "string"
                  },
                  "transfer_policy_number": {
                    "type": "string"
                  },
                  "policy_term_id": {
                    "type": "string"
                  },
                  "rebill_returned_premium": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/utils/retrieve_background_job": {
      "post": {
        "summary": "retrieve_background_job",
        "tags": [
          "utils"
        ],
        "description": "Retrieves the background job info.\n\n    Parameters\n    ----------\n    job_id : uuid, required\n        The database UUID associated with the background job\n\n    Returns\n    -------\n    success : bool\n        True if the query was succesful.\n    messages : list\n        List of human-readable messages including information regarding encountered errors.\n    data : dict\n        The data response having the form:\n        ::\n            {\n                'job_id'  uuid: ID of the async task\n                'group_id' uuid:\n                'task'  str: task name\n                'contact_id' uuid:\n                'file_id'  uuid:\n                'arguments' list: arguments passed for task\n                'queue_time'  timestamp:\n                'start_time' timestamp: Time when task started\n                'end_time'  timestamp: Time when task finished\n                'complete' bool: Indicate whether task completed\n                'failed'  bool: Indicate whether task failed\n                'acknowledged' bool: Indicate whether task got acknowledged\n                'retries'  int: Number of retries of task\n                'exception' str: Error during job execution. For Debugging purposes only. Front end should not consume.\n                'results'  obj: task result\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "job_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/utils/retrieve_payments_on_policy": {
      "post": {
        "summary": "retrieve_payments_on_policy",
        "tags": [
          "utils"
        ],
        "description": "Gets all Payment records made against a particular policy.\n\n    Parameters\n    ----------\n    policy_number : str, required\n        The identifying Policy Number for a particular policy\n    only_missing_receipts : bool, optional\n        If True, only return payments that have missing receipts\n\n    Returns\n    -------\n    success : bool\n        True if payments were successfully able to be returned\n    data : list\n        List of Payment records\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "policy_number": {
                    "type": "string"
                  },
                  "only_missing_receipts": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/utils/retrieve_receipts": {
      "post": {
        "summary": "retrieve_receipts",
        "tags": [
          "utils"
        ],
        "description": "This utility will return a number of the most recently added DCR / Sweep Payment receipts.\n\n    Parameters\n    ----------\n    number : int, optional\n        The number of receipts needing to be retrieved.\n\n    Returns\n    -------\n    success : bool\n        True if records were successfully gathered\n    data : list\n        List containing objects with the following format:\n            {\"id\": \"FILE UUID\", \"title\": \"Name of File\"}\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "number": {
                    "type": "integer"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/utils/revert_agentcy_transfer": {
      "post": {
        "summary": "revert_agentcy_transfer",
        "tags": [
          "utils"
        ],
        "description": "Reverts the transfer of all policies between two Agents or Agencies.\n\n    Parameters\n    ----------\n    archive_id : str, required\n        The database UUID associated with the Archive that tracks the specific execution of\n        the Agent/Agency Switch Tool that is wished to be reverted.\n\n    Returns\n    -------\n    success : bool\n        True if the process was evaluated for all policies.\n    messages : list\n        List of human-readable messages including information regarding encountered errors.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "archive_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/utils/revert_mortgagee_transfer": {
      "post": {
        "summary": "revert_mortgagee_transfer",
        "tags": [
          "utils"
        ],
        "description": "Reverts the transfer of all policies between two Mortgagee.\n\n    Parameters\n    ----------\n    archive_id : str\n        The database UUID associated with the Archive that tracks the specific execution of the\n        Mortgagee Switch Tool that is wished to be reverted.\n\n    Returns\n    -------\n    success : bool\n        True if the process was evaluated for all policies.\n    messages : list\n        List of human-readable messages including information regarding encountered errors.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "archive_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/utils/transfer_agentcy_policies": {
      "post": {
        "summary": "transfer_agentcy_policies",
        "tags": [
          "utils"
        ],
        "description": "Transfers all policies connected an Agent/Agency to another Agent/Agency.\n\n    Parameters\n    ----------\n    from_contact_id : str, required\n        Database UUID associated with the current Agent/Agency contact being\n         taken off of the policies.\n    to_contact_id : str, required\n        Database UUID associated with the new Agent/Agency contact that the policies\n         should be transferred to.\n    effective_date : str, required\n        String in some common date format. Should be the date agent/agency transfer\n         should become effective.\n    print_decs : bool, optional\n        True/False, whether or not the Declarations should be regenerated for the policies\n         being transferred.\n\n    Returns\n    -------\n    success : bool\n        True if the process was evaluated for all policies.\n    success_messages : list\n        List of human-readable messages including information regarding policies that were successfully transferred.\n    failure_messages : list\n        List of human-readable messages including details for policies that may not have been able to be transferred.\n    data : dict\n        Mapping of information regarding an asynchronous task, handling the act of transferring policies. This\n        identifier can be used as a reference to poll the status of that action\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "from_contact_id": {
                    "type": "string"
                  },
                  "to_contact_id": {
                    "type": "string"
                  },
                  "effective_date": {
                    "type": "string"
                  },
                  "print_decs": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/utils/transfer_mortgagee_policies": {
      "post": {
        "summary": "transfer_mortgagee_policies",
        "tags": [
          "utils"
        ],
        "description": "Transfers all policies associated with a mortgagee, to another\n\n    Parameters\n    ----------\n    from_contact_id : str\n        Database UUID associated with the current Mortgagee contact being taken off of the policies.\n    to_contact_id : str\n        Database UUID associated with the new Mortgagee contact that the policies should be transferred to.\n    effective_date : str\n        String in some common date format. Should be the date agent/agency transfer should become effective.\n\n    Returns\n    -------\n    success : bool\n        True if the process was evaluated for all policies.\n    success_messages : list\n        List of human-readable messages including information regarding policies that were successfully transferred.\n    failure_messages : list\n        List of human-readable messages including details for policies that may not have been able to be transferred.\n    data : dict\n        Mapping of information regarding an asynchronous task, handling the act of transferring policies. This\n        identifier can be used as a reference to poll the status of that action\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "from_contact_id": {
                    "type": "string"
                  },
                  "to_contact_id": {
                    "type": "string"
                  },
                  "effective_date": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/utils/unarchive_record": {
      "post": {
        "summary": "unarchive_record",
        "tags": [
          "utils"
        ],
        "description": "Unarchives a record from the contacts, claims, or policies modules.\n    Updates one entry at a time.\n\n    Parameters\n    ----------\n    db_table : str, required\n        One of the following values: contacts | claims | policies\n    unique_value : str, required\n        The defining column value for the chosen db table.\n        Example :\n            contacts --> id\n            claims --> claim number\n            policies --> policy number\n\n    Returns\n    -------\n    success : bool\n        True if the record was found and updated, False otherwise\n    messages : list of str\n        List of human-readable messages, descriptive of what occurred.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "db_table": {
                    "type": "string"
                  },
                  "unique_value": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/utils/update_revision": {
      "post": {
        "summary": "update_revision",
        "tags": [
          "utils"
        ],
        "description": "Performs the given action on the given Revision, assuming the action is supported.\n\n    Parameters\n    ----------\n    revision_id : str, required\n        The database UUID associated with the Revision that needs modification\n    action : str, required\n        The action to perform on the Revision ('delete', 'hard delete', or 'archive')\n\n    Returns\n    -------\n    success : bool\n        True if the action was performed on the Revision successfully\n    messages : list\n        List of human-readable messages, descriptive of what occurred\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "revision_id": {
                    "type": "string"
                  },
                  "action": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/utils/update_search_index": {
      "post": {
        "summary": "update_search_index",
        "tags": [
          "utils"
        ],
        "description": "Updates the Search Index.\n\n    Parameters\n    ----------\n    index_name : str, optional\n        policies | claims | contacts | properties | protection_classes\n    identifiers : list, optional\n        A list of data where each value is unique to its table.\n        Could be policy numbers, claim numbers, or UUIDs from\n        policies, claims, contacts, properties, or\n        protection_classes tables.\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    messages : list of str\n        List of human-readable error messages\n    data : None\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "index_name": {
                    "type": "string"
                  },
                  "identifiers": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/utils/validate_and_clean_claim_numbers_list": {
      "post": {
        "summary": "validate_and_clean_claim_numbers_list",
        "tags": [
          "utils"
        ],
        "description": "Given a list of dicts, format: [{'claim_number': SOME_NUMBER}]\n    check if claim exists. Will raise NoResultFound Exception\n    if list is empty or a given claim number does not exists\n\n    Parameters\n    ----------\n    claim_numbers_list : list, required\n\n    Returns\n    -------\n    claim_numbers : list\n        a list of claim numbers\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "claim_numbers_list": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/vehicles/check_vehicle_prefill_fallback_configured": {
      "post": {
        "summary": "check_vehicle_prefill_fallback_configured",
        "tags": [
          "vehicles"
        ],
        "description": "\n    Checks if vehicle prefill fallback is configured in the system.\n\n    Returns\n    -------\n    bool\n        True if a fallback table is configured, False otherwise\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/vehicles/create_vehicle": {
      "post": {
        "summary": "create_vehicle",
        "tags": [
          "vehicles"
        ],
        "description": "create_vehicle",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/vehicles/delete_vehicle": {
      "post": {
        "summary": "delete_vehicle",
        "tags": [
          "vehicles"
        ],
        "description": "delete_vehicle",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/vehicles/get_vehicle": {
      "post": {
        "summary": "get_vehicle",
        "tags": [
          "vehicles"
        ],
        "description": "get_vehicle",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/vehicles/list_custom_fields_types": {
      "post": {
        "summary": "list_custom_fields_types",
        "tags": [
          "vehicles"
        ],
        "description": "list_custom_fields_types",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-list_custom_fields_types"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-list_custom_fields_types"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/vehicles/list_vehicles_for_quote": {
      "post": {
        "summary": "list_vehicles_for_quote",
        "tags": [
          "vehicles"
        ],
        "description": "list_vehicles_for_quote",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/vehicles/update_vehicle": {
      "post": {
        "summary": "update_vehicle",
        "tags": [
          "vehicles"
        ],
        "description": "update_vehicle",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/vehicles/vehicle_prefill_fallback": {
      "post": {
        "summary": "vehicle_prefill_fallback",
        "tags": [
          "vehicles"
        ],
        "description": "\n    Retrieves fallback data for vehicle prefill when VIN lookup fails.\n\n    Parameters\n    ----------\n    quote_id : str, required\n        The ID of the quote to determine location and renewal status\n    vehicle_year : int, required\n        The year of the vehicle\n    cost_new : decimal, required\n        The cost of the vehicle when new (decimal with 2 decimal places)\n\n    Returns\n    -------\n    dict\n        Fallback data with:\n        - symbol_comprehensive : int\n            The comprehensive symbol value\n        - symbol_collision : int\n            The collision symbol value\n\n    Raises\n    ------\n    NotFound\n        When either:\n        - No fallback table is configured (\"No fallback table is configured\")\n        - No results match the provided year and cost (\"No results matching that year and cost\")\n        - Quote ID is not found\n    BCValidationError\n        When quote_id, vehicle_year or cost_new is not provided\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-vehicle_prefill_fallback"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-vehicle_prefill_fallback"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/vendors/build_ivans_manual_claim": {
      "post": {
        "summary": "build_ivans_manual_claim",
        "tags": [
          "vendors"
        ],
        "description": "Builds an XML file for specific claims and prepares it to be sent to IVANS.\n\n    Parameters\n    ----------\n    data_list : list, required\n        A list of claim numbers to be used to generate the files\n    file_date : date, required\n        The date for which the file should be generated for\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    messages : list of str\n        List of human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data_list": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "file_date": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/vendors/build_nxtech_initial_load": {
      "post": {
        "summary": "build_nxtech_initial_load",
        "tags": [
          "vendors"
        ],
        "description": "Builds an XML file for policies for specified Contact, changing all Transaction Codes to SYN.\n\n    The build process will be done on the background cluster if available.\n\n    Parameters\n    ----------\n    contact_id : str, required\n        The id of the contact to build for\n    file_date : date, required\n        The date for which the file should be generated for\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    messages : list of str\n        List of human-readable messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contact_id": {
                    "type": "string"
                  },
                  "file_date": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/vendors/build_nxtech_manual_transactions": {
      "post": {
        "summary": "build_nxtech_manual_transactions",
        "tags": [
          "vendors"
        ],
        "description": "Builds an XML file for specific policies and prepares it to be sent to NxTech.\n\n    Parameters\n    ----------\n    data_list : list, required\n        Objects with key-value pairs matching the following format:\n        ::\n            {\n                \"policy_number\": \"SOME-POLICY\",\n                \"transaction_code\": \"NxTech-Trans-Code\"\n            }\n        The \"transaction_code\" choices can be found at\n        https://help.britecore.com/hc/en-us/articles/8723472807443-IVANS-Download-overview\n\n    file_date : date, optional\n        The date for which the manual file should be generated for.\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    messages : list of str\n        List of human-readable error messages\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data_list": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "file_date": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/vendors/commercial_munichre_indepth_eligibility": {
      "post": {
        "summary": "commercial_munichre_indepth_eligibility",
        "tags": [
          "vendors"
        ],
        "description": "Checks and returns indepth inland_flood eligibility\n\n    Parameters\n    ----------\n    property_id : str, required\n        UUID of a BriteCore property, must have core address fields defined\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    messages : list of str\n        List of human readable messages\n    data : dict\n        A dict containing the following data:\n            KatRiskFloodScore : str\n                1-10 score indicating how flood-prone a property is, 1 being least, 10 most\n            FloodEligible : bool\n                True means property is eligible for coverage, False means ineligible\n            Message : str\n                Human readable / user presentable message on whether / why not eligible\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "property_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/vendors/fetch_motor_vehicle_report_for_drivers": {
      "post": {
        "summary": "fetch_motor_vehicle_report_for_drivers",
        "tags": [
          "vendors"
        ],
        "description": "Requests and retrieves Motor Vehicle Reports (MVR) for drivers.\n\n    Parameters\n    ----------\n    drivers : list, required\n        Objects with key-value pairs matching the following format:\n        ::\n            {\n                \"driversLicenseNumber\": \"123456789\",\n                \"driversLicenseState\": \"MO\",\n                \"driverFirstName\": \"John\",\n                \"driverLastName\": \"Doe\",\n                \"driverDateOfBirth\": \"1990-01-01\"\n            }\n    store_no_hit : bool, optional\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        The data response having the form:\n        ::\n        {\n            \"123456789\": {\"accidents_count\": 0, \"violations_count\": 1},\n            \"987654321\": {\"accidents_count\": 1, \"violations_count\": 0}\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "drivers": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "store_no_hit": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/vendors/get_aon_cat_score": {
      "post": {
        "summary": "get_aon_cat_score",
        "tags": [
          "vendors"
        ],
        "description": "Submit a request to AON Cat Scoring vendor services, if enabled, for the given risk.\n\n    Parameters\n    ----------\n    risk_id : str\n        UUID of a property/risk that needs to be scored.\n    geocoding_service : str\n        Optional. The geocoder to be used by AON. Supported values are: Google, Pitney Bowes, or Bing\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    messages : list of str\n        List of human readable messages\n    data : dict\n    ::\n        {\n            \"air\": {\n                \"data\": {\n                    \"TVGScore\": Decimal,\n                    \"DistanceToCoast\": Decimal,\n                    \"GeocoderAccuracy\": str,\n                    \"GeocoderServiceProviderUsed\": str,\n                    \"GeocoderServiceProviderRequested\": str,\n                    \"NonCatCost\": Decimal,\n                    \"FipsCode\": int\n                },\n                \"errors\": [],\n            },\n            \"rms\": {\n                \"data\": {\n                    \"TVGScore\": Decimal,\n                    \"DistanceToCoast\": Decimal,\n                    \"GeocoderAccuracy\": str,\n                    \"GeocoderServiceProviderUsed\": str,\n                    \"GeocoderServiceProviderRequested\": str,\n                    \"NonCatCost\": Decimal,\n                    \"FipsCode\": int\n                },\n                \"errors\": [],\n            }\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "risk_id": {
                    "type": "string"
                  },
                  "geocoding_service": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/vendors/get_prefill_services_data": {
      "post": {
        "summary": "get_prefill_services_data",
        "tags": [
          "vendors"
        ],
        "description": "Return a token to initiate a 360Value Prefill data call.\n\n    Parameters\n    ----------\n    property_id : str, required\n        UUID of the property being valuated.\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    messages : list of str\n        List of human readable messages\n    data : dict\n        A dict containing the following data :\n            token : str\n                String that is used to initiate a valuation.\n            script_src : str\n                Location from where the 360 value script must be loaded.\n            report_id : str\n                UUID of the Value360Report for the current valuation.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "property_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/vendors/get_value360_token": {
      "post": {
        "summary": "get_value360_token",
        "tags": [
          "vendors"
        ],
        "description": "Return a token to initiate a 360 Value property valuation.\n\n    Parameters\n    ----------\n    property_id : str, required\n        UUID of the property being valuated.\n    home_type : str\n        The type of home we expect to show on value360 plugin form, the default\n        is ``residential`` for 1-4 Family\n        The value could be one of the fallowing also:\n        ``condo_iu`` for Condo Interior Unit,\n        ``manufactured_mobile`` for Manufactured/Mobile\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    messages : list of str\n        List of human readable messages\n    data : dict\n        A dict containing the following data :\n            token : str\n                String that is used to initiate a valuation.\n            script_src : str\n                Location from where the 360 value script must be loaded.\n            report_id : str\n                UUID of the Value360Report for the current valuation.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "property_id": {
                    "type": "string"
                  },
                  "home_type": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/vendors/get_wtw_score": {
      "post": {
        "summary": "get_wtw_score",
        "tags": [
          "vendors"
        ],
        "description": "\n    Parameters\n    ----------\n    property : str\n        ID of the property/risk that the WTW STS will be calculated for.\n\n    Returns\n    -------\n    data : dict\n        Set of named scores returned from the WTW STS service.\n        The scores include:\n            - allperils\n            - fire\n            - liability\n            - theft\n            - water\n            - weather\n            - other\n\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "property": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/vendors/import_credit_report": {
      "post": {
        "summary": "import_credit_report",
        "tags": [
          "vendors"
        ],
        "description": "\n    Import a credit report into the system. This is a restricted endpoint and only available to is_god users.\n\n    Parameters\n    ----------\n    contact_id : str, required\n        The contact id to associate the credit report with.\n    date_added : str, required\n        The date the credit report is considered added. Format: YYYY-mm-ddTHH:MM:SSZ (in UTC)\n    report_number : str, required\n        The report number of the credit report. Max length 20.\n    content : str\n        Optional. The content of the credit report.\n    score : str\n        Optional. The score of the credit report. Max length 20.\n    warning : str\n        Optional. The warning message of the credit report. Max length 1024.\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    messages : list of str\n        List of human readable messages\n    data : dict\n        A dict containing the following data:\n        ::\n            {\n                \"id\": str  // The id of the credit report\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contact_id": {
                    "type": "string"
                  },
                  "date_added": {
                    "type": "string"
                  },
                  "report_number": {
                    "type": "string"
                  },
                  "content": {
                    "type": "string"
                  },
                  "score": {
                    "type": "string"
                  },
                  "warning": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/vendors/import_motor_vehicle_report": {
      "post": {
        "summary": "import_motor_vehicle_report",
        "tags": [
          "vendors"
        ],
        "description": "\n    Import a motor vehicle report into the system. This is a restricted endpoint and only available to is_god users.\n\n    Parameters\n    ----------\n    date_added : str, required\n        The date the motor vehicle report is considered added. Format: YYYY-mm-ddTHH:MM:SSZ (in UTC)\n    contact_id : str, required\n        The contact id to associate the motor vehicle report with.\n    report_number : str, required\n        The report number of the motor vehicle report. Max length 20.\n    report_content : str, required\n        The content of the motor vehicle report.\n    drivers_license_number : str, required\n        The driver's license number. Max length 260.\n    drivers_license_state : str, required\n        BusinessLocation ID as driver's license state.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "date_added": {
                    "type": "string"
                  },
                  "contact_id": {
                    "type": "string"
                  },
                  "report_number": {
                    "type": "string"
                  },
                  "report_content": {
                    "type": "string"
                  },
                  "drivers_license_number": {
                    "type": "string"
                  },
                  "drivers_license_state": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/vendors/invoice_cloud_autopay_enroll": {
      "post": {
        "summary": "invoice_cloud_autopay_enroll",
        "tags": [
          "vendors"
        ],
        "description": "Handles enrolling or un-enrolling an account on auto-pay for Invoice Cloud.\n    Parameters\n    ----------\n    policy_number : str, required\n        value for Policy.policy_number\n    enable : bool, optional\n        ``true if setting up for autopay, false if disabling autopay``\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        Representation of dict result:\n        ::\n            {\n                'success': true,\n                'messages': []\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "policy_number": {},
                  "enable": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/vendors/invoice_cloud_autopay_is_enrolled": {
      "post": {
        "summary": "invoice_cloud_autopay_is_enrolled",
        "tags": [
          "vendors"
        ],
        "description": "Returns whether a policy is enrolled for auto-pay with Invoice Cloud.\n\n    Parameters\n    ----------\n    policy_number : str, required\n        value for Policy.policy_number\n\n    Returns\n    -------\n    bool\n        True if enrolled, False if not\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "policy_number": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/vendors/invoice_cloud_suppress_insured_deliverable_printings": {
      "post": {
        "summary": "invoice_cloud_suppress_insured_deliverable_printings",
        "tags": [
          "vendors"
        ],
        "description": "Handle enrolling or un-enrolling an account/policy on eDelivery for\n    Installment Billing Statements. When enabled the system toggles the flag\n    `suppress-primary-insured-billing-printing` in XVendorPolicySetting table.\n\n    This will then mark all future InvoiceCloudEDelivery.DOCUMENTS_FOR_EDELIVERY\n    as `do not print` for the primary insured, as Invoice Cloud will become responsible\n    in retrieving the document and emailing it.\n\n    Parameters\n    ----------\n    policy_number : str, required\n        Policy.policy_number\n    enable : bool, optional\n        True if setting policy primary insured for eDelivery\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    messages : list of str containing possible failure messages\n    data : dict\n        ::\n        {\n            'invoiceNumbers': [  # list of invoice ids that had documents affected\n                # 36 charactor UUID strings referencing AccountHistory.id\n            ],\n            'suppressedPrinting':  # True if InvoiceCloud Edelivery was set active, else False\n        }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "policy_number": {
                    "type": "string"
                  },
                  "enable": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/vendors/ivans_edocs_build": {
      "post": {
        "summary": "ivans_edocs_build",
        "tags": [
          "vendors"
        ],
        "description": "Builds a manual edocs file for IVANS and automatically uploads it to IVANS.\n\n    The generated XML files is not like the daily automated files and can be distinguished by the name\n    of the XML containing ``_manual``.\n\n    Parameters\n    ----------\n    date_cursor : str, required\n      ``YYYY-MM-DD``\n    file_ids : list, required\n        ``['UUID1', 'UUID2']``\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    messages : list of str\n        List of human-readable error messages\n    data : dict\n        Representation of dict result:\n        ::\n            {\n                'data':{\n                    'file_name': 'britecore_edocs_manual20180601.xml',\n                    'success': True\n                    'active': True,\n                    'actual_print_date': None,\n                    'added_to_zip': False,\n                    'batch': '',\n                    'contact_id':None,\n                    'date_added': date,\n                    'date_updated': date,\n                    'email_only':False,\n                    'emailed':False,\n                    'esigned':False,\n                    'folder_id':None,\n                    'id': '6f22957c-de5a-426c-a819-ea94a0d25ac6',\n                    'isdir':False,\n                    'isphoto':False,\n                    'label':None,\n                    'mime_type': 'application/xml',\n                    'print_date':None,\n                    'print_location':None,\n                    'print_state': 'do not print',\n                    'private':False,\n                    'read_only':False,\n                    'received_meta_data': '',\n                    'reference_id':None,\n                    'revision_id':None,\n                    'size':9591,\n                    'sub_type':None,\n                    'successful_upload':False,\n                    'title': 'britecore_edocs_manual20180601.xml',\n                    'type': 'nxtech_edocs',\n                    'uploaded_by':None,\n                    'uploading_to_s3':False,\n                    'url': 'uploads/vendors/nxtech/edocs/britecore_edocs_manual20180601.xml',\n                    'vendor_upload':None,\n                    'virus_scan':False,\n                    'x_report_location_id':None\n                },\n                'success': True,\n                'messages': []\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "date_cursor": {
                    "type": "string"
                  },
                  "file_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/vendors/ivans_file_upload": {
      "post": {
        "summary": "ivans_file_upload",
        "tags": [
          "vendors"
        ],
        "description": "Uploads an XML file and all it's related files/transactions into IVANS servers\n\n    Parameters\n    ----------\n    file_name : str, required\n        The name of the XML file record to be uploaded.\n    ivans_type : str, required\n        The type of IVANS service. Value of type must be one of the following:\n        ``claims``, ``edocs``, ``dbcs``, ``transactions``\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    messages : list of str\n        List of human-readable error messages\n    data : list of dict\n        The data response having list of result uploads:\n        ::\n            {\n                'data':[{\n                    'file_name': 'britecore_edocs_manual20180601.xml',\n                    'success': True\n                }],\n                'success': True,\n                'messages': []\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "file_name": {
                    "type": "string"
                  },
                  "ivans_type": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/vendors/munichre_indepth_eligibility": {
      "post": {
        "summary": "munichre_indepth_eligibility",
        "tags": [
          "vendors"
        ],
        "description": "Checks and returns indepth inland_flood eligibility\n\n    Parameters\n    ----------\n    property_id : str, required\n        UUID of a BriteCore property, must have core address fields defined\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    messages : list of str\n        List of human readable messages\n    data : dict\n        A dict containing the following data:\n            KatRiskFloodScore : str\n                1-10 score indicating how flood-prone a property is, 1 being least, 10 most\n            FloodEligible : bool\n                True means property is eligible for coverage, False means ineligible\n            Message : str\n                Human readable / user presentable message on whether / why not eligible\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "property_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/vendors/stripe_replay_missed_webhooks": {
      "post": {
        "summary": "stripe_replay_missed_webhooks",
        "tags": [
          "vendors"
        ],
        "description": "Re-process missed Stripe webhooks events from the last 30 days.\n    Currently, only `payment_method.attached` events are replayed.\n\n    Parameters\n    ----------\n    contact_id : str, required\n        The contact id to replay the missed webhooks for.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contact_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/vendors/sungard_retry_send_file": {
      "post": {
        "summary": "sungard_retry_send_file",
        "tags": [
          "vendors"
        ],
        "description": "Retry sending a file to SunGard.\n\n    This function attempts to send a file to SunGard. It first validates the file_name and file_date parameters.\n    If the parameters are valid, it proceeds to send the file. If any error occurs during the process,\n    it logs the error and returns a standard error response.\n\n    Parameters\n    ----------\n    file_name : str, required\n        The name of the file to be sent. It should be either 'Return_Premium' or 'Claims'. Defaults to None.\n    file_date : str, required\n        The date associated with the file in 'YYYY-MM-DD' format. Defaults to None.\n\n    Returns\n    -------\n    success : bool\n        True if the operation is successful, False otherwise.\n    messages : list of str\n        List of human-readable error messages.\n    data : dict\n        The data response having the result of the operation:\n        ::\n            {\n                'success': True,\n                'messages': [],\n                'data': {}\n            }\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "file_name": {
                    "type": "string"
                  },
                  "file_date": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/vendors/update_value360_replacement_cost_value": {
      "post": {
        "summary": "update_value360_replacement_cost_value",
        "tags": [
          "vendors"
        ],
        "description": "Update the replacement cost value of a property from 360 Value valuation.\n\n    Parameters\n    ----------\n    report_id : str, required\n        UUID of a report that will be updated with the result received.\n    result : dict, required\n        The replacement cost value and the valuation id are present in the result.\n            erc : float\n                Property's replacement_cost_value\n            valuationId : str\n                value360_report valuation_id\n\n    Returns\n    -------\n    success : bool\n        True if successful, False if not\n    messages : list of str\n        List of human readable messages\n    data : dict\n        report_file_id: str\n            New Value360 report file (pdf) id\n        rating_invalidated: bool\n            True when the new replacement cost sent the property and its revision\n            back to unrated, so the quote must be rated again.\n    ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "report_id": {
                    "type": "string"
                  },
                  "result": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/violations/create_driver_mvr_report_file": {
      "post": {
        "summary": "create_driver_mvr_report_file",
        "tags": [
          "violations"
        ],
        "description": "create_driver_mvr_report_file",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/violations/create_violation": {
      "post": {
        "summary": "create_violation",
        "tags": [
          "violations"
        ],
        "description": "create_violation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/violations/create_violations": {
      "post": {
        "summary": "create_violations",
        "tags": [
          "violations"
        ],
        "description": "create_violations",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/violations/delete_violation": {
      "post": {
        "summary": "delete_violation",
        "tags": [
          "violations"
        ],
        "description": "delete_violation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/violations/dispute_violation": {
      "post": {
        "summary": "dispute_violation",
        "tags": [
          "violations"
        ],
        "description": "dispute_violation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/violations/get_violation": {
      "post": {
        "summary": "get_violation",
        "tags": [
          "violations"
        ],
        "description": "get_violation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/violations/list_violation_for_driver": {
      "post": {
        "summary": "list_violation_for_driver",
        "tags": [
          "violations"
        ],
        "description": "list_violation_for_driver",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/violations/remove_violation_dispute": {
      "post": {
        "summary": "remove_violation_dispute",
        "tags": [
          "violations"
        ],
        "description": "remove_violation_dispute",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/violations/update_violation": {
      "post": {
        "summary": "update_violation",
        "tags": [
          "violations"
        ],
        "description": "update_violation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/watercrafts/create_watercraft": {
      "post": {
        "summary": "create_watercraft",
        "tags": [
          "watercrafts"
        ],
        "description": "create_watercraft",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-create_watercraft"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-create_watercraft"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/watercrafts/delete_watercraft": {
      "post": {
        "summary": "delete_watercraft",
        "tags": [
          "watercrafts"
        ],
        "description": "delete_watercraft",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-delete_watercraft"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-delete_watercraft"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/watercrafts/get_watercraft": {
      "post": {
        "summary": "get_watercraft",
        "tags": [
          "watercrafts"
        ],
        "description": "get_watercraft",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-get_watercraft"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-get_watercraft"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/watercrafts/list_custom_fields_types": {
      "post": {
        "summary": "list_custom_fields_types",
        "tags": [
          "watercrafts"
        ],
        "description": "list_custom_fields_types",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-list_custom_fields_types"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-list_custom_fields_types"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/watercrafts/list_watercrafts_for_quote": {
      "post": {
        "summary": "list_watercrafts_for_quote",
        "tags": [
          "watercrafts"
        ],
        "description": "list_watercrafts_for_quote",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-list_watercrafts_for_quote"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-list_watercrafts_for_quote"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/watercrafts/update_watercraft": {
      "post": {
        "summary": "update_watercraft",
        "tags": [
          "watercrafts"
        ],
        "description": "update_watercraft",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-update_watercraft"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-update_watercraft"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/workflows/copy_workflow": {
      "post": {
        "summary": "copy_workflow",
        "tags": [
          "workflows"
        ],
        "description": "copy_workflow",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/workflows/create_workflow": {
      "post": {
        "summary": "create_workflow",
        "tags": [
          "workflows"
        ],
        "description": "create_workflow",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/workflows/delete_workflow": {
      "post": {
        "summary": "delete_workflow",
        "tags": [
          "workflows"
        ],
        "description": "delete_workflow",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/workflows/export_workflow": {
      "post": {
        "summary": "export_workflow",
        "tags": [
          "workflows"
        ],
        "description": "export_workflow",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/workflows/get_lookups": {
      "post": {
        "summary": "get_lookups",
        "tags": [
          "workflows"
        ],
        "description": "get_lookups",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/workflows/get_policy_type_coverages": {
      "post": {
        "summary": "get_policy_type_coverages",
        "tags": [
          "workflows"
        ],
        "description": "get_policy_type_coverages",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/workflows/get_policy_type_versions": {
      "post": {
        "summary": "get_policy_type_versions",
        "tags": [
          "workflows"
        ],
        "description": "get_policy_type_versions",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/workflows/get_run": {
      "post": {
        "summary": "get_run",
        "tags": [
          "workflows"
        ],
        "description": "get_run",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/workflows/get_workflow": {
      "post": {
        "summary": "get_workflow",
        "tags": [
          "workflows"
        ],
        "description": "get_workflow",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/workflows/import_workflow": {
      "post": {
        "summary": "import_workflow",
        "tags": [
          "workflows"
        ],
        "description": "import_workflow",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/workflows/list_executions": {
      "post": {
        "summary": "list_executions",
        "tags": [
          "workflows"
        ],
        "description": "list_executions",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/workflows/list_workflows": {
      "post": {
        "summary": "list_workflows",
        "tags": [
          "workflows"
        ],
        "description": "list_workflows",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-workflows_list_workflows"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-workflows_list_workflows"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/workflows/publish_workflow": {
      "post": {
        "summary": "publish_workflow",
        "tags": [
          "workflows"
        ],
        "description": "publish_workflow",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-workflows_publish_workflow"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-workflows_publish_workflow"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/workflows/resume_run": {
      "post": {
        "summary": "resume_run",
        "tags": [
          "workflows"
        ],
        "description": "resume_run",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/workflows/retry_run": {
      "post": {
        "summary": "retry_run",
        "tags": [
          "workflows"
        ],
        "description": "retry_run",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/workflows/revert_workflow_draft": {
      "post": {
        "summary": "revert_workflow_draft",
        "tags": [
          "workflows"
        ],
        "description": "revert_workflow_draft",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/workflows/set_workflow_status": {
      "post": {
        "summary": "set_workflow_status",
        "tags": [
          "workflows"
        ],
        "description": "set_workflow_status",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/workflows/update_workflow": {
      "post": {
        "summary": "update_workflow",
        "tags": [
          "workflows"
        ],
        "description": "update_workflow",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/workflows/validate_all_references": {
      "post": {
        "summary": "validate_all_references",
        "tags": [
          "workflows"
        ],
        "description": "validate_all_references",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/workflows/validate_workflow": {
      "post": {
        "summary": "validate_workflow",
        "tags": [
          "workflows"
        ],
        "description": "validate_workflow",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "account_history-def": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Account History ID"
          },
          "revisionId": {
            "type": "string",
            "format": "uuid",
            "description": "Revision ID"
          },
          "policyTermId": {
            "type": "string",
            "format": "uuid",
            "description": "Policy Term ID"
          },
          "fileId": {
            "type": "string",
            "format": "uuid",
            "description": "File ID"
          },
          "paymentId": {
            "type": "string",
            "format": "uuid",
            "description": "Payment ID"
          },
          "waiveId": {
            "type": "string",
            "format": "uuid",
            "description": "Waive ID"
          },
          "creditTransferId": {
            "type": "string",
            "format": "uuid"
          },
          "debitTransferId": {
            "type": "string",
            "format": "uuid"
          },
          "transactionDateTime": {
            "type": "object",
            "description": "Transaction Date Time. It is returned as a datetime python object in Jinja."
          },
          "transactionType": {
            "type": "string",
            "enum": [
              "Revision",
              "Invoice",
              "Payment",
              "Non Pay",
              "Reinstatement",
              "Adjustment",
              "Return Premium",
              "NSF",
              "Waive",
              "Return Premium Transfer",
              "Credit Transfer",
              "Debit Transfer",
              "Exported Return Premium",
              "Fee"
            ]
          },
          "generatedBy": {
            "type": "string",
            "description": "Username of the contact that generated the transaction.",
            "default": "system"
          },
          "description": {
            "type": "string"
          },
          "dueDate": {
            "type": "object",
            "description": "Due Date. It is returned as a date python object in Jinja."
          },
          "cancelDate": {
            "type": "object",
            "description": "Cancel Date. It is returned as a date python object in Jinja."
          },
          "dayZeroDate": {
            "type": "object",
            "description": "Day Zero Date. It is returned as a date python object in Jinja."
          },
          "backCancelDate": {
            "type": "object",
            "description": "Back Cancel Date. It is returned as a datetime python object in Jinja."
          },
          "paymentAmount": {
            "type": "number"
          },
          "debitPremiumFullyBilled": {
            "type": "number"
          },
          "debitPremiumFullyEarned": {
            "type": "number"
          },
          "debitPremiumProRata": {
            "type": "number"
          },
          "debitCustomFeeFullyBilled": {
            "type": "number"
          },
          "debitCustomFeeFullyEarned": {
            "type": "number"
          },
          "debitCustomFeeProRata": {
            "type": "number"
          },
          "debitSystemFee": {
            "type": "number"
          },
          "paidInFull": {
            "type": "boolean"
          },
          "accountBalance": {
            "type": "number"
          },
          "deleted": {
            "type": "boolean"
          },
          "voided": {
            "type": "boolean"
          },
          "dirty": {
            "type": "boolean"
          },
          "snapshot": {
            "type": "object",
            "properties": {
              "details": {
                "type": "object",
                "properties": {
                  "description": {
                    "type": "string"
                  },
                  "policy_status": {
                    "type": "string",
                    "enum": [
                      "Active",
                      "Submitted",
                      "Unsubmitted",
                      "Canceled",
                      "Canceled, Non-Payment of Premium",
                      "Cancellation Pending, Non-Payment of Premium",
                      "Expired",
                      "Rejected",
                      "Pending E-Signature"
                    ]
                  },
                  "bill_date": {
                    "type": "string",
                    "description": "Transaction_date_time of the Account History row. It is a date formatted as %m/%d/%Y"
                  },
                  "due_date": {
                    "type": "string",
                    "description": "Due date of the Account History row. It is a date formatted as %m/%d/%Y"
                  },
                  "paid_in_full": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "description",
                  "policy_status",
                  "bill_date",
                  "due_date",
                  "paid_in_full"
                ]
              },
              "premium_overview": {
                "type": "object",
                "properties": {
                  "debit_premium_pro_rata": {
                    "type": "number"
                  },
                  "debit_premium_fully_earned": {
                    "type": "number"
                  },
                  "debit_premium_fully_billed": {
                    "type": "number"
                  },
                  "debit_custom_fee_fully_billed": {
                    "type": "number"
                  },
                  "debit_custom_fee_fully_earned": {
                    "type": "number"
                  },
                  "debit_custom_fee_pro_rata": {
                    "type": "number"
                  },
                  "debit_system_fee": {
                    "type": "number"
                  },
                  "payment_amount": {
                    "type": "number"
                  },
                  "revision_written_premium": {
                    "type": "number"
                  },
                  "revision_written_fee": {
                    "type": "number"
                  },
                  "revision_annual_premium": {
                    "type": "number"
                  },
                  "revision_annual_fee": {
                    "type": "number"
                  },
                  "premium_billed": {
                    "type": "number"
                  },
                  "custom_fees_billed": {
                    "type": "number"
                  },
                  "payoff_amount": {
                    "type": "number"
                  }
                },
                "required": [
                  "debit_premium_pro_rata",
                  "debit_premium_fully_earned",
                  "debit_premium_fully_billed",
                  "debit_custom_fee_fully_billed",
                  "debit_custom_fee_fully_earned",
                  "debit_custom_fee_pro_rata",
                  "debit_system_fee",
                  "payment_amount",
                  "revision_written_premium",
                  "revision_written_fee",
                  "revision_annual_premium",
                  "revision_annual_fee",
                  "premium_billed",
                  "custom_fees_billed",
                  "payoff_amount"
                ]
              },
              "amount": {
                "type": "number"
              },
              "schedule": {
                "type": "object",
                "properties": {
                  "premium": {
                    "type": "number"
                  },
                  "custom_fees": {
                    "type": "number"
                  },
                  "system_fees": {
                    "type": "number"
                  }
                },
                "required": [
                  "premium",
                  "custom_fees",
                  "system_fees"
                ]
              }
            },
            "required": [
              "details",
              "premium_overview",
              "amount",
              "schedule"
            ]
          },
          "dateAdded": {
            "type": "object",
            "description": "Date Added. It is returned as a date python object in Jinja."
          },
          "dateAddedMicro": {
            "type": "number"
          },
          "dateUpdated": {
            "type": "object",
            "description": "Date Updated. It is returned as a date python object in Jinja."
          },
          "dateDeleted": {
            "type": "object",
            "description": "Date Deleted. It is returned as a date python object in Jinja."
          },
          "dateVoided": {
            "type": "object",
            "description": "Date Voided. It is returned as a date python object in Jinja."
          },
          "cancellationRevisionId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "id",
          "revisionId",
          "policyTermId",
          "transactionDateTime",
          "transactionType",
          "paymentAmount",
          "debitPremiumFullyBilled",
          "debitPremiumFullyEarned",
          "debitPremiumProRata",
          "debitCustomFeeFullyBilled",
          "debitCustomFeeFullyEarned",
          "debitCustomFeeProRata",
          "debitSystemFee",
          "paidInFull",
          "accountBalance",
          "deleted",
          "voided",
          "dirty",
          "snapshot",
          "dateAdded",
          "dateAddedMicro",
          "dateUpdated"
        ]
      },
      "additional_interest-def": {
        "type": "object",
        "description": "Additional interest definition. Either revision-level (quote_id) or risk-level (vehicle_id or risk_id).",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Additional interest ID"
          },
          "contact_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the contact associated with this interest"
          },
          "quote_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the quote/revision this interest belongs to (revision-level only)"
          },
          "vehicle_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the vehicle this interest belongs to (risk-level only)"
          },
          "risk_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the risk/property this interest belongs to (risk-level only)"
          },
          "interest_type": {
            "type": "string",
            "description": "Interest type label resolved from ADDITIONAL_INTEREST_TYPES QuickCode at response-serialization time (e.g. 'Loss Payee'). Read-only surface: writes go through `interest`."
          },
          "loan_number": {
            "type": "string",
            "maxLength": 100,
            "description": "Loan number associated with the interest (risk-level only)"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 1024,
            "description": "Free-text additional notes for the interest"
          },
          "interest": {
            "type": "string",
            "description": "ADDITIONAL_INTEREST_TYPES codeValueType stored on the row (e.g. 'LOSS_PAYEE', 'ADDITIONAL_INTEREST'). Codes are stable; labels are derived at read time on `interest_type`.",
            "minLength": 1
          },
          "name": {
            "type": "string",
            "description": "Contact name",
            "minLength": 1
          },
          "type": {
            "type": "string",
            "enum": [
              "individual",
              "organization"
            ],
            "description": "Contact type"
          },
          "ssn": {
            "type": "string",
            "description": "Social Security Number (masked in responses: xxx-xx-LAST4)"
          },
          "date_of_birth": {
            "type": "string",
            "description": "Date of birth (masked in responses: xx-xx-YEAR)"
          },
          "fein_tax_id": {
            "type": "string",
            "description": "Federal EIN/Tax ID for organizations"
          },
          "legal_entity_type": {
            "type": "string",
            "description": "Legal entity type for organizations"
          },
          "phones": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/phone-def"
            },
            "description": "Contact phone numbers"
          },
          "addresses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/address-def"
            },
            "description": "Contact addresses"
          },
          "emails": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/email-def"
            },
            "description": "Contact email addresses"
          },
          "can_edit": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the contact can be edited; false when the contact appears on another active policy. Null when context is insufficient to determine."
          }
        }
      },
      "address-def": {
        "type": "object",
        "properties": {
          "city": {
            "type": "string"
          },
          "county": {
            "type": "string"
          },
          "street": {
            "type": "string"
          },
          "line2": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "zipcode": {
            "type": "string"
          },
          "is_preferred": {
            "type": "boolean"
          },
          "type": {
            "type": "string",
            "enum": [
              "Mailing/Billing",
              "Mailing",
              "Billing",
              "Other"
            ]
          }
        },
        "required": [
          "city",
          "street",
          "state",
          "zipcode",
          "is_preferred"
        ]
      },
      "adjuster_assignment-def": {
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "contact_id": {
            "type": "string",
            "format": "uuid"
          },
          "active": {
            "type": "boolean"
          },
          "hour_assign_from": {
            "type": [
              "string",
              "null"
            ],
            "format": "time"
          },
          "hour_assign_to": {
            "type": [
              "string",
              "null"
            ],
            "format": "time"
          },
          "monday": {
            "type": "boolean"
          },
          "tuesday": {
            "type": "boolean"
          },
          "wednesday": {
            "type": "boolean"
          },
          "thursday": {
            "type": "boolean"
          },
          "friday": {
            "type": "boolean"
          },
          "saturday": {
            "type": "boolean"
          },
          "sunday": {
            "type": "boolean"
          },
          "max_claims_per_day": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "maximum": 9999
          },
          "max_claims_per_week": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "maximum": 9999
          },
          "max_claims_per_month": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "maximum": 9999
          },
          "business_location_ids": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "zip_codes": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "policy_types": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "object",
              "properties": {
                "policy_type_name": {
                  "type": "string"
                },
                "business_location_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "policy_types_ids": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "readOnly": true
                }
              },
              "required": [
                "policy_type_name",
                "business_location_id"
              ]
            }
          },
          "peril_ids": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "catastrophe_ids": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "ptos": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "start_date": {
                  "type": "string",
                  "format": "date-time"
                },
                "end_date": {
                  "type": "string",
                  "format": "date-time"
                },
                "description": {
                  "type": "string"
                }
              },
              "required": [
                "start_date",
                "end_date"
              ]
            }
          },
          "total_assignments_today": {
            "type": [
              "integer",
              "null"
            ]
          },
          "total_assignments_week": {
            "type": [
              "integer",
              "null"
            ]
          },
          "total_assignments_month": {
            "type": [
              "integer",
              "null"
            ]
          },
          "contact_group_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_assignment_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "is_internal_adjuster": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "is_external_adjuster": {
            "type": [
              "boolean",
              "null"
            ]
          }
        }
      },
      "agency-def": {
        "type": "object",
        "properties": {
          "purchase_date": {
            "type": "string",
            "format": "date",
            "description": "Date of purchase"
          },
          "agency_inception_date": {
            "type": "string",
            "format": "date",
            "description": "Agency inception date"
          },
          "fein_tax_id": {
            "type": "string",
            "description": "Federal Employer Identification Number"
          },
          "website": {
            "type": "string",
            "description": "website"
          },
          "agency_number": {
            "type": "string",
            "description": "Agency number"
          },
          "dba": {
            "type": "string"
          },
          "agency_termination_date": {
            "type": "string",
            "format": "date",
            "description": "Agency termination date"
          },
          "company_id": {
            "type": "string",
            "description": "Company ID"
          },
          "date_business_started": {
            "type": "string",
            "format": "date",
            "description": "Date business started"
          },
          "commission_structure": {
            "type": "string"
          },
          "date_of_birth": {
            "type": "string",
            "format": "date-time"
          },
          "ssn": {
            "type": "string"
          },
          "phones": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/phone-def"
            }
          },
          "ssn_group": {
            "type": "string"
          },
          "addresses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/address-def"
            }
          },
          "type": {
            "type": "string",
            "enum": [
              "individual",
              "organization"
            ]
          },
          "primary_email_id": {
            "type": "string"
          },
          "emails": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/email-def"
            }
          },
          "primary_phone_id": {
            "type": "string"
          },
          "confirmation_email": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "hicn_number": {
            "type": "string"
          },
          "legal_entity_type": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "primary_address_id": {
            "type": "string"
          },
          "source_update_date": {
            "type": "string",
            "format": "date-time"
          },
          "last_synched_date": {
            "type": "string",
            "format": "date-time"
          },
          "external_system_reference": {
            "type": "string",
            "description": "External system reference"
          }
        },
        "required": [
          "purchase_date",
          "agency_inception_date",
          "fein_tax_id",
          "website",
          "agency_number",
          "dba",
          "agency_termination_date",
          "company_id",
          "date_business_started",
          "commission_structure",
          "date_of_birth",
          "ssn",
          "phones",
          "ssn_group",
          "addresses",
          "type",
          "primary_email_id",
          "emails",
          "primary_phone_id",
          "confirmation_email",
          "username",
          "id",
          "hicn_number",
          "legal_entity_type",
          "name",
          "primary_address_id",
          "source_update_date",
          "last_synched_date",
          "external_system_reference"
        ]
      },
      "agency_group-def": {
        "type": "object",
        "properties": {
          "purchase_date": {
            "type": "string",
            "format": "date",
            "description": "Date of purchase"
          },
          "agency_inception_date": {
            "type": "string",
            "format": "date",
            "description": "Agency inception date"
          },
          "fein_tax_id": {
            "type": "string",
            "description": "Federal Employer Identification Number"
          },
          "website": {
            "type": "string",
            "description": "website"
          },
          "agency_group_number": {
            "type": "string",
            "description": "Agency Group number"
          },
          "dba": {
            "type": "string"
          },
          "agency_termination_date": {
            "type": "string",
            "format": "date",
            "description": "Agency termination date"
          },
          "company_id": {
            "type": "string",
            "description": "Company ID"
          },
          "date_business_started": {
            "type": "string",
            "format": "date",
            "description": "Date business started"
          },
          "commission_structure": {
            "type": "string"
          },
          "date_of_birth": {
            "type": "string",
            "format": "date-time"
          },
          "ssn": {
            "type": "string"
          },
          "phones": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/phone-def"
            }
          },
          "ssn_group": {
            "type": "string"
          },
          "addresses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/address-def"
            }
          },
          "type": {
            "type": "string",
            "enum": [
              "individual",
              "organization"
            ]
          },
          "primary_email_id": {
            "type": "string"
          },
          "emails": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/email-def"
            }
          },
          "primary_phone_id": {
            "type": "string"
          },
          "confirmation_email": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "hicn_number": {
            "type": "string"
          },
          "legal_entity_type": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "primary_address_id": {
            "type": "string"
          },
          "source_update_date": {
            "type": "string",
            "format": "date-time"
          },
          "last_synched_date": {
            "type": "string",
            "format": "date-time"
          },
          "external_system_reference": {
            "type": "string",
            "description": "External system reference"
          }
        },
        "required": [
          "purchase_date",
          "agency_inception_date",
          "fein_tax_id",
          "website",
          "agency_group_number",
          "dba",
          "agency_termination_date",
          "company_id",
          "date_business_started",
          "commission_structure",
          "date_of_birth",
          "ssn",
          "phones",
          "ssn_group",
          "addresses",
          "type",
          "primary_email_id",
          "emails",
          "primary_phone_id",
          "confirmation_email",
          "username",
          "id",
          "hicn_number",
          "legal_entity_type",
          "name",
          "primary_address_id",
          "source_update_date",
          "last_synched_date",
          "external_system_reference"
        ]
      },
      "agent-def": {
        "type": "object",
        "properties": {
          "gender": {
            "type": [
              "string",
              "null"
            ]
          },
          "position": {
            "type": [
              "string",
              "null"
            ]
          },
          "date_of_death": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "license_state": {
            "type": [
              "string",
              "null"
            ]
          },
          "commission_structure": {
            "type": [
              "string",
              "null"
            ]
          },
          "added_by": {
            "type": [
              "string",
              "null"
            ]
          },
          "date_of_birth": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "ssn": {
            "type": [
              "string",
              "null"
            ]
          },
          "external_system_reference": {
            "type": [
              "string",
              "null"
            ]
          },
          "phones": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/phone-def"
            }
          },
          "ssn_group": {
            "type": [
              "string",
              "null"
            ]
          },
          "addresses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/address-def"
            }
          },
          "type": {
            "type": "string",
            "enum": [
              "individual"
            ]
          },
          "primary_email_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "emails": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/email-def"
            }
          },
          "drivers_license": {
            "type": [
              "string",
              "null"
            ]
          },
          "primary_phone_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "confirmation_email": {
            "type": [
              "string",
              "null"
            ]
          },
          "username": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "hicn_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "driver_license_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "legal_entity_type": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "primary_address_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "producer_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "source_update_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "last_synched_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "required": [
          "gender",
          "position",
          "date_of_death",
          "license_state",
          "commission_structure",
          "added_by",
          "date_of_birth",
          "ssn",
          "external_system_reference",
          "phones",
          "ssn_group",
          "addresses",
          "type",
          "primary_email_id",
          "emails",
          "drivers_license",
          "primary_phone_id",
          "confirmation_email",
          "username",
          "id",
          "hicn_number",
          "driver_license_date",
          "legal_entity_type",
          "name",
          "primary_address_id",
          "producer_number",
          "source_update_date",
          "last_synched_date"
        ]
      },
      "applicable_form-def": {
        "type": "object",
        "description": "A single form applicable to a quote. The frontend builds the download URL from form_id using the standard core.uploads.getAttachment gateway shape.",
        "properties": {
          "form_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "File.id of the form. The wizard frontend builds the preview URL itself as /gateway?file=core.uploads&method=getAttachment&id=<form_id> -- the same shape every other File download uses. The applicability gate stays server-side: only ids returned in this response are previewable."
          },
          "form_number": {
            "type": [
              "string",
              "null"
            ],
            "description": "Form code / number (e.g. HO-3, FL-5)"
          },
          "form_title": {
            "type": [
              "string",
              "null"
            ],
            "description": "Display title pulled from the underlying File"
          },
          "form_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "File sub_type (e.g. New Policy, Renewal, Endorsement)"
          },
          "applicability": {
            "type": "string",
            "description": "Human-readable scope: 'Policy-wide' for policy-level forms or the coverage name (e.g. 'Dwelling') for coverage-specific forms."
          },
          "edition_number": {
            "type": [
              "string",
              "null"
            ],
            "description": "Edition / version of the form"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Form description"
          },
          "has_preview": {
            "type": "boolean",
            "description": "True iff the underlying File has a usable URL. UI must disable the Preview action when false."
          },
          "mime_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "MIME type of the form file (e.g. application/pdf)"
          }
        },
        "required": [
          "form_id",
          "form_number",
          "form_title",
          "form_type",
          "applicability",
          "has_preview"
        ]
      },
      "billing_schedule-def": {
        "title": "BillingSchedule",
        "description": "Billing schedule for a policy life cycle",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "life_cycle_id": {
            "type": "string",
            "format": "uuid"
          },
          "order": {
            "type": "integer"
          },
          "custom_term": {
            "type": "boolean"
          },
          "nine_months_term": {
            "type": "boolean"
          },
          "eighteen_months_term": {
            "type": "boolean"
          },
          "six_months_term": {
            "type": "boolean"
          },
          "three_months_term": {
            "type": "boolean"
          },
          "one_year_term": {
            "type": "boolean"
          },
          "three_years_term": {
            "type": "boolean"
          },
          "bill_to_insured": {
            "type": "boolean"
          },
          "bill_to_agency": {
            "type": "boolean"
          },
          "bill_to_mortgagee": {
            "type": "boolean"
          },
          "bill_to_add_int": {
            "type": "boolean"
          },
          "initial_invoice": {
            "type": "integer"
          },
          "initial_due": {
            "type": "integer"
          },
          "mid_term_invoice": {
            "type": "integer"
          },
          "mid_term_due": {
            "type": "integer"
          },
          "renewal_invoice": {
            "type": "integer"
          },
          "renewal_due": {
            "type": "integer"
          },
          "trans_new_business": {
            "type": "boolean"
          },
          "trans_renewal": {
            "type": "boolean"
          },
          "trans_mid_term_charges": {
            "type": "boolean"
          },
          "trans_cancellation": {
            "type": "boolean"
          },
          "trans_reinstatement": {
            "type": "boolean"
          },
          "default_schedule": {
            "type": "boolean"
          },
          "show_on_invoices": {
            "type": "boolean"
          },
          "show_in_public_gateway": {
            "type": "boolean"
          },
          "show_in_payment_sweep": {
            "type": "boolean"
          },
          "automatic_payment_reminder": {
            "type": "boolean"
          },
          "min_amount_due": {
            "type": "string",
            "description": "Minimum amount due (decimal as string)"
          },
          "migrate_on_renewal": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Schedule ID to migrate to on renewal"
          },
          "use_initial_ach_installment_fee": {
            "type": "boolean"
          },
          "initial_ach_installment_fee_amount": {
            "type": "string"
          },
          "use_recurring_ach_installment_fee": {
            "type": "boolean"
          },
          "recurring_ach_installment_fee_amount": {
            "type": "string"
          },
          "use_initial_credit_card_installment_fee": {
            "type": "boolean"
          },
          "initial_credit_card_installment_fee_amount": {
            "type": "string"
          },
          "use_recurring_credit_card_installment_fee": {
            "type": "boolean"
          },
          "recurring_credit_card_installment_fee_amount": {
            "type": "string"
          },
          "billing_schedule_installments": {
            "type": "array",
            "description": "Installment definitions for this billing schedule",
            "items": {
              "$ref": "#/components/schemas/billing_schedule_installment-def"
            }
          }
        },
        "required": [
          "id",
          "name",
          "life_cycle_id"
        ]
      },
      "billing_schedule_installment-def": {
        "title": "BillingScheduleInstallment",
        "description": "Installment definition for a billing schedule",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "bill_sched_id": {
            "type": "string",
            "format": "uuid"
          },
          "installment_fee": {
            "type": "string",
            "description": "Fee amount (decimal as string)"
          },
          "months_after_eff_date": {
            "type": "integer"
          },
          "is_renewal": {
            "type": "boolean"
          },
          "payment_instrument_installments": {
            "type": "array",
            "description": "Payment instrument allocations for this installment",
            "items": {
              "$ref": "#/components/schemas/payment_instrument_installment-def"
            }
          }
        },
        "required": [
          "id",
          "bill_sched_id",
          "installment_fee",
          "months_after_eff_date",
          "is_renewal"
        ]
      },
      "brand-def": {
        "type": "object",
        "description": "Brand definition schema",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier for the brand"
          },
          "name": {
            "type": "string",
            "maxLength": 100,
            "description": "Brand name"
          },
          "logo_file_id": {
            "type": "string",
            "description": "File ID for the brand logo"
          },
          "signature_file_id": {
            "type": "string",
            "description": "File ID for the brand signature"
          },
          "header_line_1": {
            "type": "string",
            "description": "Header line 1"
          },
          "header_line_2": {
            "type": "string",
            "description": "Header line 2"
          },
          "header_line_3": {
            "type": "string",
            "description": "Header line 3"
          },
          "header_line_4": {
            "type": "string",
            "description": "Header line 4"
          },
          "active": {
            "type": "boolean",
            "description": "Whether the brand is active"
          },
          "date_created": {
            "type": "string",
            "format": "date-time",
            "description": "Date the brand was created"
          },
          "date_updated": {
            "type": "string",
            "format": "date-time",
            "description": "Date the brand was last updated"
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "brand_association-def": {
        "type": "object",
        "description": "Brand association definition schema",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier for the brand association"
          },
          "brand_id": {
            "type": "string",
            "description": "Brand identifier"
          },
          "location_id": {
            "type": "string",
            "description": "Business location identifier"
          },
          "policy_type_definition_id": {
            "type": "string",
            "description": "Policy type definition identifier"
          },
          "date_created": {
            "type": "string",
            "format": "date-time",
            "description": "Date the association was created"
          },
          "date_updated": {
            "type": "string",
            "format": "date-time",
            "description": "Date the association was last updated"
          }
        },
        "required": [
          "id"
        ]
      },
      "bulk_create_dispute_date_item-def": {
        "type": "object",
        "description": "A claim_dates row for bulk_create_disputes. Same fields as dispute_date-def, but claim_id may be omitted; the top-level request claim_id is injected before validation.",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "readOnly": true,
            "description": "ID of the claim_date row"
          },
          "claim_id": {
            "type": "string",
            "format": "uuid",
            "description": "Optional. Overwritten by the top-level bulk_create_disputes claim_id."
          },
          "dispute_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "ID of the parent dispute"
          },
          "date": {
            "type": "string",
            "format": "date",
            "description": "Date value (YYYY-MM-DD)"
          },
          "type": {
            "type": "string",
            "description": "CLAIM_DATE_TYPE quick code value (e.g. assigned, suitOpened)"
          },
          "date_updated": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "readOnly": true,
            "description": "Last update timestamp (YYYY-MM-DDTHH:MM:SS)"
          }
        },
        "required": [
          "date",
          "type"
        ]
      },
      "bulk_create_dispute_item-def": {
        "type": "object",
        "description": "Dispute payload for bulk_create_disputes. Same fields as dispute-def, but nested claim_id (and dispute_dates[].claim_id) may be omitted; the top-level request claim_id is injected before validation. Any nested claim_id is overwritten by the top-level value.",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "readOnly": true,
            "description": "ID of the dispute"
          },
          "claim_id": {
            "type": "string",
            "format": "uuid",
            "description": "Optional. Overwritten by the top-level bulk_create_disputes claim_id."
          },
          "name": {
            "type": "string",
            "description": "Free-text name of the dispute"
          },
          "type": {
            "type": "string",
            "enum": [
              "n/a",
              "pre-litigation",
              "litigation"
            ],
            "description": "Dispute classification"
          },
          "handling_claims_adjuster_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "ID of the handling claims adjuster contact"
          },
          "handling_claims_adjuster_name": {
            "type": [
              "string",
              "null"
            ],
            "readOnly": true,
            "description": "Display name of the handling claims adjuster"
          },
          "handling_external_legal_staff": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Contact IDs assigned as external legal staff for this dispute"
          },
          "is_codefendant": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "is_structured_settlement": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "is_appraisal_requested": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "is_bad_faith": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "is_economic_damage": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "is_excess_policy": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "lawsuit_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "lawsuit_status": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "string",
                "enum": [
                  "open",
                  "closed"
                ]
              }
            ]
          },
          "lawsuit_state": {
            "type": [
              "string",
              "null"
            ]
          },
          "lawsuit_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "LAWSUIT_TYPE quick code value"
          },
          "docket_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "case_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "defendant_firm_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "defendant_attorney_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "court_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "CLAIMS_COURT_TYPE quick code value (e.g. FEDERAL_COURT, STATE_COURT, MEDIATION, OTHER). The set of allowed values is configurable through the Lookups UI."
          },
          "judge_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "plaintiff_firm_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "plaintiff_attorney_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "remarks": {
            "type": [
              "string",
              "null"
            ]
          },
          "dispute_dates": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/bulk_create_dispute_date_item-def"
            }
          },
          "dispute_settlements": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/dispute_settlement-def"
            }
          }
        },
        "required": [
          "name",
          "type"
        ]
      },
      "bulk_create_disputes-def": {
        "type": "object",
        "description": "Bulk create disputes request payload. Nested dispute claim_id values may be omitted; the top-level claim_id is injected before validation.",
        "properties": {
          "claim_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the owning claim. Applied to every dispute item (and nested dispute_dates) before validation."
          },
          "disputes": {
            "type": "array",
            "minItems": 1,
            "maxItems": 500,
            "items": {
              "$ref": "#/components/schemas/bulk_create_dispute_item-def"
            },
            "description": "List of disputes to create. Nested claim_id may be omitted."
          }
        },
        "required": [
          "claim_id",
          "disputes"
        ]
      },
      "calculated_field-def": {
        "type": "object",
        "description": "A calculated field definition for Carbone document templates",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier"
          },
          "x_report_location_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Template deliverable ID. Null for global fields."
          },
          "field_name": {
            "type": "string",
            "pattern": "^[a-zA-Z_][a-zA-Z0-9_]*$",
            "description": "Valid Python identifier used as calculated.field_name"
          },
          "path": {
            "type": "string",
            "description": "Dot-notation path where the field is evaluated (e.g. 'drivers', 'coverages.deductibles'). Empty string for root."
          },
          "expression": {
            "type": "string",
            "description": "RestrictedPython expression to evaluate"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional description of what the field computes"
          },
          "sort_order": {
            "type": "integer",
            "description": "Evaluation order within scope (lower = evaluated first)"
          },
          "field_type": {
            "type": "string",
            "enum": [
              "global",
              "template"
            ],
            "description": "Computed field: 'global' if x_report_location_id is null, 'template' otherwise"
          }
        },
        "required": [
          "id",
          "field_name",
          "expression",
          "sort_order",
          "field_type"
        ]
      },
      "cancellation_reason-def": {
        "title": "CancellationReason",
        "description": "Cancellation reason for a policy life cycle",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "reason": {
            "type": "string"
          },
          "policy_life_cycle_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "print_description": {
            "type": [
              "string",
              "null"
            ]
          },
          "category": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_modifiable": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "reason"
        ]
      },
      "claim_estimation-def": {
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "readOnly": true
          },
          "claim_id": {
            "type": "string",
            "format": "uuid"
          },
          "xact_assignment_id": {
            "type": "string",
            "readOnly": true
          },
          "assignment_type": {
            "type": "string",
            "enum": [
              "initial",
              "supplemental"
            ]
          },
          "xact_analysis_status": {
            "type": "string"
          },
          "sent_date": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "sent_by": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "assignment_date": {
            "type": "string",
            "format": "date-time"
          },
          "inspection_date": {
            "type": "string",
            "format": "date-time"
          },
          "contact_date": {
            "type": "string",
            "format": "date-time"
          },
          "estimate_date": {
            "type": "string",
            "format": "date-time"
          },
          "appointment_date": {
            "type": "string",
            "format": "date-time"
          },
          "estimate_approval_date": {
            "type": "string",
            "format": "date-time"
          },
          "building_estimate_amount": {
            "type": "number"
          },
          "contents_estimate_amount": {
            "type": "number"
          },
          "icc_estimate_amount": {
            "type": "number"
          },
          "status": {
            "type": "string",
            "enum": [
              "requested",
              "canceled",
              "completed"
            ]
          },
          "canceled_by": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "canceled_date": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "is_canceled": {
            "type": "boolean",
            "readOnly": true
          }
        },
        "required": [
          "claim_id"
        ]
      },
      "claim_exposure_payment-def": {
        "type": "object",
        "description": "Schema for ClaimExposurePaymentModel (exposure-level payment)",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Unique identifier for the payment"
          },
          "exposure_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the exposure this payment is for"
          },
          "payee_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "List of payee contact IDs"
          },
          "date": {
            "type": "string",
            "format": "date",
            "description": "Date of the payment"
          },
          "deductible_amount": {
            "type": "number",
            "description": "Deductible amount for the payment",
            "default": 0.0
          },
          "display_on_check": {
            "type": [
              "string",
              "null"
            ],
            "description": "Text to display on the check"
          },
          "payment_classification": {
            "type": [
              "string",
              "null"
            ],
            "description": "Classification of the payment"
          },
          "payment_method": {
            "type": [
              "string",
              "null"
            ],
            "description": "Payment method used"
          },
          "address_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Address ID for the payment (if applicable)"
          },
          "loss_paid": {
            "type": "number",
            "description": "Loss paid amount",
            "default": 0.0
          },
          "adjusting_paid": {
            "type": "number",
            "description": "Adjusting paid amount",
            "default": 0.0
          },
          "legal_paid": {
            "type": "number",
            "description": "Legal paid amount",
            "default": 0.0
          },
          "memo": {
            "type": [
              "string",
              "null"
            ],
            "description": "Memo for the payment"
          },
          "system_tags": {
            "type": [
              "object",
              "null"
            ],
            "description": "System tags for the payment (key-value pairs)"
          }
        },
        "required": [
          "exposure_id",
          "payee_ids",
          "date"
        ]
      },
      "claim_multi_exposure_payment-def": {
        "type": "object",
        "description": "Schema for ClaimMultiExposurePaymentModel (multi-exposure payment)",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Unique identifier for the payment"
          },
          "exposures": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "ID of the exposure this payment is for"
                },
                "loss_paid": {
                  "type": "number",
                  "description": "Loss paid amount",
                  "default": 0.0
                },
                "adjusting_paid": {
                  "type": "number",
                  "description": "Adjusting paid amount",
                  "default": 0.0
                },
                "legal_paid": {
                  "type": "number",
                  "description": "Legal paid amount",
                  "default": 0.0
                }
              }
            },
            "description": "List of payments for exposures"
          },
          "payee_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "List of payee contact IDs"
          },
          "date": {
            "type": "string",
            "format": "date",
            "description": "Date of the payment"
          },
          "deductible_amount": {
            "type": "number",
            "description": "Deductible amount for the payment",
            "default": 0.0
          },
          "display_on_check": {
            "type": [
              "string",
              "null"
            ],
            "description": "Text to display on the check"
          },
          "payment_classification": {
            "type": [
              "string",
              "null"
            ],
            "description": "Classification of the payment"
          },
          "payment_method": {
            "type": [
              "string",
              "null"
            ],
            "description": "Payment method used"
          },
          "address_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Address ID for the payment (if applicable)"
          },
          "memo": {
            "type": [
              "string",
              "null"
            ],
            "description": "Memo for the payment"
          },
          "system_tags": {
            "type": [
              "object",
              "null"
            ],
            "description": "System tags for the payment (key-value pairs)"
          }
        },
        "required": [
          "claim_id",
          "payee_ids",
          "date"
        ]
      },
      "claim_transaction-def": {
        "type": "object",
        "description": "Definition schema for claim accounting transaction objects",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier for the transaction"
          },
          "transaction_type": {
            "type": "string",
            "enum": [
              "reserve",
              "payment",
              "recovery",
              "recovery_reserve"
            ],
            "description": "Type of accounting transaction"
          },
          "transaction_category": {
            "type": "string",
            "enum": [
              "loss",
              "adjuster",
              "legal",
              "reinsurance",
              "subrogation",
              "salvage",
              "reinsurancelae"
            ],
            "description": "Category of the transaction"
          },
          "amount": {
            "type": "number",
            "description": "Transaction amount"
          },
          "new_amount": {
            "type": "number",
            "description": "New amount after transaction"
          },
          "previous_amount": {
            "type": "number",
            "description": "Previous amount before transaction"
          },
          "exported": {
            "type": "boolean",
            "description": "Whether the transaction has been exported"
          },
          "exported_datetime": {
            "type": "string",
            "format": "date-time",
            "description": "Date and time when transaction was exported"
          },
          "voided": {
            "type": "boolean",
            "description": "Whether the transaction has been voided"
          },
          "voided_datetime": {
            "type": "string",
            "format": "date-time",
            "description": "Date and time when transaction was voided"
          },
          "transaction_datetime": {
            "type": "string",
            "format": "date-time",
            "description": "Date and time of the transaction"
          },
          "modified_by_username": {
            "type": "string",
            "description": "Username of the person who modified the transaction"
          },
          "description": {
            "type": "string",
            "description": "Description of the transaction"
          },
          "memo": {
            "type": "string",
            "description": "Memo associated with the transaction"
          },
          "recovery_category": {
            "type": "string",
            "enum": [
              "reinsurance",
              "subrogation",
              "salvage",
              "reinsurancelae"
            ],
            "description": "Category of recovery (only for recovery transactions)"
          },
          "contact_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the contact associated with the transaction"
          },
          "address_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the address associated with the transaction"
          },
          "exposure_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the claim exposure associated with the transaction"
          },
          "payee_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "List of payee IDs associated with the transaction"
          },
          "payment_classification": {
            "type": "string",
            "description": "Classification of the payment"
          },
          "payment_method_account_name": {
            "type": "string",
            "description": "Name of the payment method account"
          },
          "payment_method_masked_number": {
            "type": "string",
            "description": "Masked payment method number"
          },
          "payment_method": {
            "type": "string",
            "description": "Method of payment used"
          },
          "check_number": {
            "type": "integer",
            "description": "Check number assigned to the payment"
          },
          "payees": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Payee ID"
                },
                "name": {
                  "type": "string",
                  "description": "Payee name"
                }
              },
              "required": [
                "id",
                "name"
              ]
            },
            "description": "List of payees associated with the transaction"
          },
          "modified_by": {
            "type": "string",
            "description": "Name of the person who modified the transaction"
          },
          "claim_level_transaction": {
            "type": "boolean",
            "description": "Whether this is a claim-level transaction (affects multiple exposures)"
          },
          "exposure_details": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "Exposure ID"
              },
              "claimant_name": {
                "type": "string",
                "description": "Name of the claimant"
              },
              "coverage_name": {
                "type": "string",
                "description": "Name of the coverage"
              },
              "loss_name": {
                "type": "string",
                "description": "Name of the loss type"
              },
              "reinsurance_reserve": {
                "type": "number",
                "description": "Reinsurance reserve amount"
              },
              "reinsurancelae_reserve": {
                "type": "number",
                "description": "Reinsurance LAE reserve amount"
              },
              "salvage_reserve": {
                "type": "number",
                "description": "Salvage reserve amount"
              },
              "subrogation_reserve": {
                "type": "number",
                "description": "Subrogation reserve amount"
              },
              "adjusting_reserve": {
                "type": "number",
                "description": "Adjusting reserve amount"
              },
              "legal_reserve": {
                "type": "number",
                "description": "Legal reserve amount"
              },
              "loss_reserve": {
                "type": "number",
                "description": "Loss reserve amount"
              }
            },
            "description": "Details about the claim exposure associated with this transaction"
          }
        },
        "required": [
          "id",
          "transaction_type",
          "transaction_category",
          "amount",
          "transaction_datetime"
        ]
      },
      "copilot_skill-def": {
        "type": "object",
        "description": "A carrier-configurable copilot skill (copilot instruction).",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier for the skill"
          },
          "name": {
            "type": "string",
            "maxLength": 120,
            "description": "Display name of the skill"
          },
          "description": {
            "type": "string",
            "maxLength": 500,
            "description": "Short summary of the skill"
          },
          "body": {
            "type": "string",
            "maxLength": 20000,
            "description": "Markdown instruction body consumed by agents"
          },
          "status": {
            "type": "string",
            "enum": [
              "DRAFT",
              "ACTIVE",
              "ARCHIVED"
            ],
            "description": "Lifecycle status of the skill"
          },
          "applicable_copilots": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9_-]{0,48}$"
            },
            "description": "Copilot identifiers this skill applies to. Empty means all copilots."
          },
          "added_by": {
            "type": "string",
            "format": "uuid",
            "description": "User ID of the creator"
          },
          "updated_by": {
            "type": "string",
            "format": "uuid",
            "description": "User ID of the last modifier"
          },
          "updated_by_username": {
            "type": [
              "string",
              "null"
            ],
            "description": "Resolved username of the last modifier"
          },
          "date_added": {
            "type": "string",
            "format": "date-time",
            "description": "ISO 8601 creation timestamp"
          },
          "date_updated": {
            "type": "string",
            "format": "date-time",
            "description": "ISO 8601 last-update timestamp"
          }
        },
        "required": [
          "id",
          "name",
          "body",
          "status",
          "applicable_copilots",
          "date_added",
          "date_updated"
        ]
      },
      "create_full_quote_async_request-def": {
        "description": "Request body shape for create_full_quote_async. Inherits all fields from create_full_quote_request-def via allOf and adds async-only fields (e.g. options) on top.",
        "allOf": [
          {
            "$ref": "#/components/schemas/create_full_quote_request-def"
          }
        ],
        "properties": {
          "options": {
            "type": "object",
            "description": "Optional async-creation toggles.",
            "properties": {
              "underwriting_rule": {
                "type": "object",
                "description": "Controls underwriting-rule evaluation during async creation.",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "description": "When true, underwriting rules run as part of async quote creation. Defaults to false.",
                    "default": false
                  }
                }
              }
            }
          }
        }
      },
      "create_full_quote_request-def": {
        "type": "object",
        "description": "Shared request body for create_full_quote and create_full_quote_async. Both endpoints deserialize via CreateFullQuoteRequestModel and therefore accept an identical payload shape; the async variant merely offloads heavy creation to a background worker.",
        "properties": {
          "external_system_reference": {
            "type": "string",
            "description": "External ID of the Quote"
          },
          "policy_type_id": {
            "type": "string",
            "format": "uuid",
            "description": "Policy Type ID"
          },
          "policy_type_external_system_reference": {
            "type": "string",
            "description": "External ID of the Policy Type"
          },
          "effective_date": {
            "type": "string",
            "format": "date",
            "description": "Quote Effective Date"
          },
          "term_type": {
            "type": "string",
            "enum": [
              "3 Years",
              "18 Months",
              "1 Year",
              "Annual",
              "9 Months",
              "6 Months",
              "3 Months",
              "1 Month",
              "Monthly",
              "Custom"
            ],
            "description": "Term Type"
          },
          "agent_id": {
            "type": "string",
            "format": "uuid",
            "description": "The UUID of the Agent"
          },
          "agent_external_system_reference": {
            "type": "string",
            "description": "External ID of the Agent"
          },
          "agency_id": {
            "type": "string",
            "format": "uuid",
            "description": "The UUID of the Agency"
          },
          "agency_external_system_reference": {
            "type": "string",
            "description": "External ID of the Agency"
          },
          "underwriting_questions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "question_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Underwriting Question ID"
                },
                "yes_no_answer": {
                  "enum": [
                    "yes",
                    "no",
                    "none"
                  ]
                },
                "explanation": {
                  "type": "string"
                }
              },
              "required": [
                "question_id",
                "yes_no_answer"
              ]
            }
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/item-def"
            }
          },
          "sub_lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/subline-def"
            }
          },
          "transaction_type": {
            "enum": [
              "new-business",
              "endorsement",
              "renewal"
            ],
            "default": "new-business"
          },
          "named_insureds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/named_insured-def"
            }
          },
          "risks": {
            "type": "array",
            "description": "List of Risks, required if require_risk_address line configuration is true",
            "items": {
              "$ref": "#/components/schemas/risk-def"
            }
          },
          "vehicles": {
            "type": "array",
            "description": "Optional list of auto vehicles to create and associate with the quote",
            "items": {
              "$ref": "#/components/schemas/vehicle-def"
            }
          },
          "drivers": {
            "type": "array",
            "description": "Optional list of drivers to create and associate with the quote",
            "items": {
              "$ref": "#/components/schemas/driver-def"
            }
          },
          "billing_information": {
            "type": "object",
            "properties": {
              "billing_schedule": {
                "type": "string",
                "description": "Billing Schedule"
              },
              "withdraw_when": {
                "type": "string",
                "description": "Withdraw Funds When. Examples: 'On Due Date', '15 Days Before Due Date' etc."
              },
              "bill_whom_id": {
                "type": "string",
                "format": "uuid",
                "description": "The UUID of the Bill Whom"
              },
              "bill_whom_external_system_reference": {
                "type": "string",
                "description": "External ID of the Bill Whom"
              }
            }
          },
          "policy_term_external_reference": {
            "type": "string",
            "description": "External Reference of the Policy Term"
          },
          "number": {
            "type": "string",
            "description": "Policy Number"
          },
          "number_origin": {
            "type": "string",
            "enum": [
              "system",
              "manual"
            ],
            "description": "Origin of the Policy Number"
          },
          "copy_template_risks": {
            "type": "boolean",
            "description": "Whether to copy risks from template if available. Defaults to false.",
            "default": false
          },
          "renewal_status": {
            "type": "string",
            "enum": [
              "Renew",
              "Non-Renewal"
            ],
            "description": "Renewal status for the policy. If not provided, uses the default from policy lifecycle settings."
          }
        },
        "required": [
          "effective_date",
          "term_type",
          "underwriting_questions"
        ],
        "anyOf": [
          {},
          {}
        ]
      },
      "disbursement_attempt-def": {
        "type": "object",
        "description": "Outbound disbursement attempt definition schema (BC-22436). One attempt to pay a source obligation (Commission Payment / Return Premium / Claim Payment) over a rail (ach / check / manual).",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Disbursement attempt ID."
          },
          "transaction_type": {
            "type": "string",
            "enum": [
              "Commission Payment",
              "Return Premium",
              "Claim Payment"
            ],
            "description": "The source obligation type."
          },
          "transaction_id": {
            "type": "string",
            "format": "uuid",
            "description": "The source obligation id (for a Commission Payment, == commission_payments.id)."
          },
          "rail": {
            "type": "string",
            "enum": [
              "ach",
              "check",
              "manual"
            ],
            "description": "Disbursement rail."
          },
          "state": {
            "type": "string",
            "enum": [
              "pending",
              "in_transit",
              "settled",
              "failed"
            ],
            "description": "Lifecycle state (disbursementState)."
          },
          "amount": {
            "type": "string",
            "description": "Disbursement amount (USD, 2 decimal places)."
          },
          "direct_payee_contact_id": {
            "type": "string",
            "format": "uuid",
            "description": "Contact the disbursement is paid to."
          },
          "payment_method_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "description": "Payment method used (ACH rail), if any."
          },
          "integration_instance_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "description": "ACH_ISSUANCE integration instance the attempt dispatches through (null for manual)."
          },
          "vendor_reference_id": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The IS/vendor handle for the operation (set-once after the vendor accepts)."
          },
          "check_number": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Check number (check / manual rails)."
          },
          "failure_origin": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "vendor_rejected",
                  "recipient_returned",
                  "operator_canceled",
                  "admin_terminate",
                  "dispatch_failed"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Populated when state == 'failed'."
          },
          "failure_code": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Failure code (populated when failed)."
          },
          "ach_return_code": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "ACH return code (populated when failed via a recipient return)."
          },
          "ach_return_label": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Derived (never stored): the short operator-facing phrase for ach_return_code, e.g. 'no account' for R03. Null when there is no return code OR when the code is not one BriteCore has a phrase for -- an unrecognised code is not an error, and clients render ach_return_code on its own in that case. Source of truth is DISBURSEMENT_ACH_RETURN_CODE_LABELS in lib/domain/constants.py (BC-24977)."
          },
          "failure_reason": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Human-readable failure detail."
          },
          "in_transit_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the attempt entered in_transit."
          },
          "settled_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the attempt settled."
          },
          "failed_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the attempt failed."
          },
          "date_added": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp."
          },
          "date_updated": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp."
          },
          "initiated_by_contact_id": {
            "type": "string",
            "format": "uuid",
            "description": "Operator who initiated the attempt."
          },
          "retry_count": {
            "type": "integer",
            "description": "Number of retry rounds for this attempt."
          },
          "method_details": {
            "type": "object",
            "description": "Redacted point-in-time audit snapshot of the source rows the attempt was built from, discriminated by `rail`. Present on the full/action responses (get_detail, cancel, admin_terminate, record_manual, and the issue IssuanceResult); the lean list / obligation_history / needs_attention responses OMIT it (this property is optional here for that reason). SECURITY: the ACH vendor-vault tokens `customer_profile_id` and `vendor_payment_method_id` are intentionally REDACTED and never appear in any API response or the request/result log (see the DisbursementAttemptModel post_dump scrub); the engine reads them only from the in-memory row when building the ACH_ISSUANCE dispatch payload.",
            "properties": {
              "rail": {
                "type": "string",
                "enum": [
                  "ach",
                  "check",
                  "manual"
                ],
                "description": "Discriminator for which sub-block applies."
              },
              "ach": {
                "type": "object",
                "description": "ACH-rail snapshot (present when rail == 'ach'). REDACTED: `customer_profile_id` / `vendor_payment_method_id` are stripped and MUST NOT be present.",
                "properties": {
                  "account_description": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "account_type": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "account_name": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "name_on_account": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "masked_number": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "masked_routing": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "not": {}
              },
              "manual": {
                "type": "object",
                "description": "Manual-rail snapshot (present when rail == 'manual').",
                "properties": {
                  "justification": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "external_reference": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "recorded_by_contact_id": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              },
              "direct_payee": {
                "type": "object",
                "description": "Snapshot of the direct payee (name / type) at issue time.",
                "properties": {
                  "name": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "type": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              },
              "integration_instance": {
                "type": "object",
                "description": "Snapshot of the ACH_ISSUANCE instance (external_id / name) at issue time.",
                "properties": {
                  "external_id": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "name": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            },
            "required": [
              "rail"
            ]
          },
          "enrichment": {
            "type": "object",
            "description": "Folded single-row source enrichment returned by get_detail (payee_name, obligation_has_live_successor, source block).",
            "properties": {
              "payee_name": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "obligation_has_live_successor": {
                "type": "boolean"
              },
              "source": {
                "type": "object",
                "description": "Commission source block for Commission Payment obligations; empty object for Return Premium / Claim Payment."
              }
            }
          }
        },
        "required": [
          "id",
          "transaction_type",
          "transaction_id",
          "rail",
          "state",
          "amount",
          "direct_payee_contact_id",
          "initiated_by_contact_id",
          "date_added",
          "date_updated"
        ]
      },
      "disbursement_funding_account-def": {
        "description": "A BriteCore financial-account anchor. A pure handle: the vendor reference plus its integration binding. Everything displayable about the account (balance, status, nickname, features) is vendor-owned and read live, never stored here.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "BriteCore anchor id."
          },
          "integration_instance_id": {
            "type": "string",
            "format": "uuid",
            "description": "The funding integration instance the anchor is bound to."
          },
          "vendor_reference_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "description": "The vendor's financial-account handle."
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Set when the anchor is archived; null while active."
          },
          "date_added": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the anchor was created."
          },
          "date_updated": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the anchor was last written."
          }
        },
        "required": [
          "id",
          "integration_instance_id",
          "vendor_reference_id"
        ]
      },
      "disbursement_funding_request-def": {
        "description": "One row of BriteCore's append-only money-IN log: a top-up BriteCore asked the vendor to perform, and how that call turned out. This is BriteCore's own record, not vendor state, so it can legitimately disagree with the live balance and transaction feeds while a pull settles.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 36,
            "description": "The request id. Caller-supplied for a manual top-up, and ALSO the vendor Idempotency-Key, which is what makes a double submit dedupe to one row and one pull."
          },
          "financial_account_id": {
            "type": "string",
            "format": "uuid",
            "description": "The BriteCore financial-account anchor the money was pulled into."
          },
          "funding_source_id": {
            "type": "string",
            "format": "uuid",
            "description": "The BriteCore funding-source row the money was pulled from."
          },
          "amount": {
            "type": [
              "number",
              "string"
            ],
            "description": "Amount in DOLLARS, serialized. Whole cents only; a zero-amount request is never persisted. Emitted as a JSON NUMBER: the schema dumps a Decimal and simplejson renders it natively (and parses it back to Decimal). The string form is accepted for clients that stringify money."
          },
          "trigger": {
            "type": "string",
            "enum": [
              "manual",
              "min_balance"
            ],
            "description": "What caused the pull. 'manual' is an operator using Add money; 'min_balance' is the auto top-up rule, which is not part of the MVP UI."
          },
          "outcome": {
            "type": "string",
            "enum": [
              "succeeded",
              "vendor_rejected",
              "transport_failed",
              "settled",
              "returned"
            ],
            "description": "What became of the request, and the only field the console's status column reads. 'succeeded' renders as Submitted: the bank accepted the pull, arrival not yet known. 'settled' renders as Funded: the settlement sweep saw the money arrive. 'returned' renders as Returned: the bank sent the money back, before or after settlement; error_code / error carry the return code and reason. 'vendor_rejected' renders as Declined and means the pull definitively did NOT happen. 'transport_failed' renders as Needs review: the response was lost, the outcome is UNKNOWN, and MONEY MAY HAVE MOVED -- it must never be shown as a clean failure. 'succeeded' becomes 'settled' or 'returned' when the sweep sees the transfer's fate; 'settled' can still become 'returned' inside the return window; 'transport_failed' changes when a retry resolves it. 'returned' and 'vendor_rejected' are terminal."
          },
          "error_code": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 64,
            "description": "Machine-readable code behind a non-success outcome: the vendor error on a rejection, the bank return code (e.g. R01) on a return; null otherwise."
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable context behind a non-success outcome: the vendor error on a rejection, the return reason on a return; null otherwise."
          },
          "note": {
            "type": [
              "string",
              "null"
            ],
            "description": "Free-text operator note carried on the row."
          },
          "vendor_reference_id": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255,
            "description": "The vendor's handle for the resulting transfer, set on success so the row can be correlated against the live feed. Null until then."
          },
          "initiated_by_contact_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Who initiated a manual top-up. Always set for trigger 'manual' and always null for an auto trigger, where there is no human in the loop. Pinned server-side to the authenticated session, never taken from the request."
          },
          "date_added": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the row was appended -- the 'When' column, and the sort key of the log (newest first)."
          },
          "date_updated": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the row was last written. A 'succeeded' row is written again when the settlement sweep flips it to 'settled' or 'returned', so on a 'settled' row this is when BriteCore saw the money arrive; a 'transport_failed' row changes when a retry or reconciliation resolves it."
          }
        },
        "required": [
          "id",
          "financial_account_id",
          "funding_source_id",
          "amount",
          "trigger",
          "outcome"
        ]
      },
      "disbursement_funding_source-def": {
        "description": "A BriteCore funding-source row. Stores only the waterfall priority policy for a vendor source; display and status stay vendor-owned.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "BriteCore funding-source row id."
          },
          "integration_instance_id": {
            "type": "string",
            "format": "uuid",
            "description": "The funding integration instance the row is bound to."
          },
          "vendor_reference_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "description": "The vendor's funding-source handle."
          },
          "priority": {
            "type": "integer",
            "minimum": 1,
            "description": "Waterfall position; 1 is tried first."
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Set when the row is archived; null while active."
          },
          "date_added": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the row was created."
          },
          "date_updated": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the row was last written."
          }
        },
        "required": [
          "id",
          "integration_instance_id",
          "vendor_reference_id",
          "priority"
        ]
      },
      "disbursement_funding_vendor_account-def": {
        "description": "A financial account as the integration system reports it. Read live and never persisted: the vendor_* fields are free-form display payloads BriteCore renders verbatim and models nothing about.",
        "type": "object",
        "properties": {
          "vendor_reference_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "description": "The vendor's financial-account handle."
          },
          "vendor_display": {
            "type": "string",
            "description": "Vendor-provided label for the account."
          },
          "vendor_status": {
            "type": "string",
            "description": "Vendor-provided status string."
          },
          "vendor_features": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Free-form feature labels composed by the integration system."
          },
          "vendor_requirements": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Free-form outstanding-requirement labels; empty when nothing is outstanding."
          },
          "ready_state": {
            "type": "string",
            "enum": [
              "ready",
              "not_ready",
              "unknown"
            ],
            "description": "Neutral readiness badge computed by the integration system."
          }
        },
        "required": [
          "vendor_reference_id",
          "vendor_display",
          "vendor_status",
          "vendor_features",
          "vendor_requirements",
          "ready_state"
        ]
      },
      "dispute-def": {
        "type": "object",
        "description": "A claim Dispute, including litigation details, settlements, and dates.",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "readOnly": true,
            "description": "ID of the dispute"
          },
          "claim_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the owning claim"
          },
          "name": {
            "type": "string",
            "description": "Free-text name of the dispute"
          },
          "type": {
            "type": "string",
            "enum": [
              "n/a",
              "pre-litigation",
              "litigation"
            ],
            "description": "Dispute classification"
          },
          "handling_claims_adjuster_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "ID of the handling claims adjuster contact"
          },
          "handling_claims_adjuster_name": {
            "type": [
              "string",
              "null"
            ],
            "readOnly": true,
            "description": "Display name of the handling claims adjuster"
          },
          "handling_external_legal_staff": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Contact IDs assigned as external legal staff for this dispute"
          },
          "is_codefendant": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "is_structured_settlement": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "is_appraisal_requested": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "is_bad_faith": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "is_economic_damage": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "is_excess_policy": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "lawsuit_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "lawsuit_status": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "string",
                "enum": [
                  "open",
                  "closed"
                ]
              }
            ]
          },
          "lawsuit_state": {
            "type": [
              "string",
              "null"
            ]
          },
          "lawsuit_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "LAWSUIT_TYPE quick code value"
          },
          "docket_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "case_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "defendant_firm_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "defendant_attorney_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "court_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "CLAIMS_COURT_TYPE quick code value (e.g. FEDERAL_COURT, STATE_COURT, MEDIATION, OTHER). The set of allowed values is configurable through the Lookups UI."
          },
          "judge_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "plaintiff_firm_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "plaintiff_attorney_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "remarks": {
            "type": [
              "string",
              "null"
            ]
          },
          "dispute_dates": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/dispute_date-def"
            }
          },
          "dispute_settlements": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/dispute_settlement-def"
            }
          }
        },
        "required": [
          "claim_id",
          "name",
          "type"
        ]
      },
      "dispute_date-def": {
        "type": "object",
        "description": "A claim_dates row attached to a dispute (dispute_id is set).",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "readOnly": true,
            "description": "ID of the claim_date row"
          },
          "claim_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the owning claim"
          },
          "dispute_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "ID of the parent dispute"
          },
          "date": {
            "type": "string",
            "format": "date",
            "description": "Date value (YYYY-MM-DD)"
          },
          "type": {
            "type": "string",
            "description": "CLAIM_DATE_TYPE quick code value (e.g. assigned, suitOpened)"
          },
          "date_updated": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "readOnly": true,
            "description": "Last update timestamp (YYYY-MM-DDTHH:MM:SS)"
          }
        },
        "required": [
          "claim_id",
          "date",
          "type"
        ]
      },
      "dispute_settlement-def": {
        "type": "object",
        "description": "A dispute settlement entry attached to a claim dispute.",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "readOnly": true,
            "description": "ID of the dispute settlement"
          },
          "dispute_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "ID of the parent dispute"
          },
          "type": {
            "type": "string",
            "description": "SETTLEMENT_TYPE quick code value"
          },
          "amount": {
            "type": [
              "number",
              "string"
            ],
            "description": "Settlement amount (decimal)"
          },
          "date": {
            "type": "string",
            "format": "date",
            "description": "Settlement date (YYYY-MM-DD)"
          }
        },
        "required": [
          "type",
          "amount",
          "date"
        ]
      },
      "driver-def": {
        "type": "object",
        "description": "Driver definition for create_full_quote and response schemas",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ]
          },
          "quote_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "contact_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "UUID or $named_insured[N] placeholder"
          },
          "full_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "date_of_birth": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "gender": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "string",
                "enum": [
                  "Male",
                  "Female",
                  "Undisclosed",
                  "Other"
                ]
              }
            ]
          },
          "marital_status": {
            "type": [
              "string",
              "null"
            ]
          },
          "license_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "license_state": {
            "type": [
              "string",
              "null"
            ]
          },
          "issuing_country": {
            "type": [
              "string",
              "null"
            ]
          },
          "date_licensed": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "driver_license_status": {
            "type": [
              "string",
              "null"
            ]
          },
          "foreign_license": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "social_security_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "education_level": {
            "type": [
              "string",
              "null"
            ]
          },
          "driver_training": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "driver_training_completion_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "good_student": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "student_over_100_miles": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "current_occupation": {
            "type": [
              "string",
              "null"
            ]
          },
          "current_employer": {
            "type": [
              "string",
              "null"
            ]
          },
          "years_with_current_employer": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "maximum": 100
          },
          "govt_employee": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "address_owned": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "relation_to_applicant": {
            "type": [
              "string",
              "null"
            ]
          },
          "non_inclusion_reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "included_in_policy": {
            "type": [
              "boolean",
              "null"
            ],
            "default": true
          },
          "is_primary_named_insured": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "accidents_and_violations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "driver_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "accident_violation_code": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "maxLength": 17
                },
                "accident_violation_date": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date"
                },
                "accident_violation_description": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "maxLength": 1000
                },
                "accident_violation_location": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "maxLength": 260
                },
                "violation_type": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "damage_total_amount": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "bodily_injury": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "is_fatality": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "property_damage": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "is_chargeable": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "num_surcharge_points": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "excess_speed": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "speed_limit": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "actual_speed": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "conviction_date": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date"
                }
              }
            }
          }
        },
        "additionalProperties": true
      },
      "driver_template-def": {
        "type": "object",
        "description": "Schema for driver data in Quick Quote Templates",
        "properties": {
          "full_name": {
            "type": "string",
            "maxLength": 250,
            "description": "Driver's full name (required)"
          },
          "type": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "individual",
              "organization"
            ],
            "description": "Contact type",
            "default": "individual"
          },
          "date_of_birth": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "Driver's date of birth in YYYY-MM-DD format"
          },
          "gender": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "Male",
              "Female",
              "Undisclosed",
              "Other"
            ],
            "description": "Driver's gender"
          },
          "license_state": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[A-Z]{2}$",
            "description": "State where driver's license was issued (2-letter code)"
          },
          "license_number": {
            "type": [
              "string",
              "null"
            ],
            "description": "Driver's license number"
          },
          "marital_status": {
            "type": [
              "string",
              "null"
            ],
            "description": "Driver's marital status"
          },
          "relation_to_applicant": {
            "type": [
              "string",
              "null"
            ],
            "description": "Relationship to policy applicant"
          },
          "included_in_policy": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether driver is included in policy",
            "default": true
          }
        },
        "required": [
          "full_name"
        ]
      },
      "dynamic_field-def": {
        "title": "DynamicField",
        "description": "A single dynamic (user-input) field configured on a Carbone deliverable template.",
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Present when updating an existing field; absent/omitted when adding a new one."
          },
          "field_type": {
            "type": "string",
            "enum": [
              "text",
              "html",
              "dropdown"
            ]
          },
          "field_label": {
            "type": "string"
          },
          "field_key": {
            "type": "string"
          },
          "default_value": {
            "type": [
              "string",
              "null"
            ]
          },
          "option_source": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "static",
              "dynamic"
            ],
            "description": "Required when field_type is 'dropdown'."
          },
          "options": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Required (non-empty) when option_source is 'static'."
          },
          "source_key": {
            "type": [
              "string",
              "null"
            ],
            "description": "Required when option_source is 'dynamic'. Context array to resolve options from, e.g. 'vehicles', 'parties' (dotted paths supported)."
          },
          "display_field": {
            "type": [
              "string",
              "null"
            ],
            "description": "For a dynamic dropdown: the field on each resolved item to use as the option label (defaults to 'name')."
          }
        },
        "required": [
          "field_type",
          "field_label",
          "field_key"
        ]
      },
      "email-def": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "Personal",
              "Work",
              "Notifications",
              "Other"
            ]
          },
          "is_preferred": {
            "type": "boolean"
          }
        },
        "required": [
          "email",
          "type",
          "is_preferred"
        ]
      },
      "erp_item-def": {
        "type": "object",
        "description": "An Extended Reporting Period (ERP) item associated with a policy or property",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier for the ERP item record"
          },
          "revision_id": {
            "type": "string",
            "format": "uuid",
            "description": "The revision ID this ERP item belongs to"
          },
          "item_id": {
            "type": "string",
            "format": "uuid",
            "description": "The line item ID (revision_item or property_item)"
          },
          "item_name": {
            "type": "string",
            "description": "Name of the line item"
          },
          "category": {
            "type": "string",
            "enum": [
              "policy",
              "property"
            ],
            "description": "Category of the item: 'policy' for revision items, 'property' for property items"
          },
          "erp_duration": {
            "type": [
              "integer",
              "null"
            ],
            "description": "ERP duration in days"
          },
          "erp_start_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "ERP start date (YYYY-MM-DD)"
          },
          "erp_end_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "ERP end date (YYYY-MM-DD)"
          },
          "property_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Property ID for property-level items (null for policy-level items)"
          },
          "property_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Property name for property-level items (null for policy-level items)"
          }
        },
        "required": [
          "id",
          "revision_id",
          "item_id",
          "item_name",
          "category"
        ]
      },
      "file-def": {
        "type": "object",
        "description": "A File / attachment row. Marshmallow FileModel field names (snake_case). extra fields are ignored on deserialize; only title, description, code_value_type, and quick_code are persisted by edit_attachment.",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "File / attachment UUID"
          },
          "title": {
            "type": [
              "string",
              "null"
            ],
            "description": "Display title / file name"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Attachment description"
          },
          "code_value_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "Tag code (FK to quick_code_values.codeValueType)"
          },
          "quick_code": {
            "type": [
              "string",
              "null"
            ],
            "description": "Parent tag category (FK to quick_code_values.quickCode). Defaults to CLAIMS_FILE_TAG when tag is supplied without code_value_type."
          },
          "tag": {
            "type": [
              "string",
              "null"
            ],
            "description": "Request-only alias for code_value_type. On edit_attachment, copied onto code_value_type when code_value_type is omitted."
          },
          "mime_type": {
            "type": [
              "string",
              "null"
            ],
            "readOnly": true,
            "description": "MIME type"
          },
          "size": {
            "type": [
              "integer",
              "null"
            ],
            "readOnly": true,
            "description": "File size in bytes"
          },
          "reference_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Owning entity UUID (claim, policy, or contact)"
          },
          "type": {
            "type": [
              "string",
              "null"
            ],
            "description": "Owning entity type, e.g. claims, policies, contacts"
          },
          "active": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "private": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "read_only": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "isdir": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "True when this row is a folder, not a file"
          },
          "folder_private": {
            "type": [
              "boolean",
              "null"
            ],
            "readOnly": true,
            "description": "True when the parent folder is private"
          },
          "label": {
            "type": [
              "string",
              "null"
            ]
          },
          "date_added": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "full_quote-def": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Quote ID"
          },
          "external_system_reference": {
            "type": "string",
            "description": "External ID of the Quote"
          },
          "policy_type_id": {
            "type": "string",
            "format": "uuid",
            "description": "Policy Type ID"
          },
          "policy_type_external_system_reference": {
            "type": "string",
            "description": "External ID of the Policy Type"
          },
          "effective_date": {
            "type": "string",
            "format": "date",
            "description": "Quote Effective Date"
          },
          "agent_id": {
            "type": "string",
            "format": "uuid",
            "description": "The UUID of the Agent"
          },
          "agent_external_system_reference": {
            "type": "string",
            "description": "External ID of the Agent"
          },
          "agency_id": {
            "type": "string",
            "format": "uuid",
            "description": "The UUID of the Agency"
          },
          "agency_external_system_reference": {
            "type": "string",
            "description": "External ID of the Agency"
          },
          "policy_revisions": {
            "type": "array",
            "items": {
              "type": "object",
              "allOf": [
                {
                  "$ref": "#/components/schemas/revision_summary-def"
                }
              ]
            }
          },
          "underwriting_questions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "question_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Underwriting Question ID"
                },
                "yes_no_answer": {
                  "enum": [
                    "yes",
                    "no",
                    "none"
                  ]
                },
                "yes_no_prevent_continue": {
                  "type": "string"
                },
                "explanation": {
                  "type": "string"
                }
              },
              "required": [
                "question_id",
                "yes_no_answer"
              ]
            }
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "allOf": [
                {
                  "$ref": "#/components/schemas/item-def"
                }
              ],
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Item ID"
                }
              }
            }
          },
          "sub_lines": {
            "type": "array",
            "items": {
              "type": "object",
              "allOf": [
                {
                  "$ref": "#/components/schemas/subline-def"
                }
              ],
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Sub Line ID"
                },
                "items": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/item-def"
                      }
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "description": "Item ID"
                      }
                    }
                  }
                }
              }
            }
          },
          "named_insureds": {
            "type": "array",
            "items": {
              "type": "object",
              "allOf": [
                {
                  "$ref": "#/components/schemas/named_insured-def"
                }
              ],
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Named Insured ID"
                }
              }
            }
          },
          "risks": {
            "type": "array",
            "items": {
              "type": "object",
              "allOf": [
                {
                  "$ref": "#/components/schemas/risk-def"
                }
              ],
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Risk ID"
                },
                "items": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/item-def"
                      }
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "description": "Item ID"
                      }
                    }
                  }
                },
                "sub_lines": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/subline-def"
                      }
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "description": "Sub Line ID"
                      },
                      "items": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/item-def"
                            }
                          ],
                          "properties": {
                            "id": {
                              "type": "string",
                              "format": "uuid",
                              "description": "Item ID"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "vehicles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/vehicle-def"
            }
          },
          "drivers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/driver-def"
            }
          },
          "policy_id": {
            "type": "string",
            "format": "uuid",
            "description": "Policy ID"
          },
          "primary_property_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "ID of the revision's primary property. Null when the revision has no primary property. One of the identifiers callers can chain on after quote operations."
          },
          "policy_number": {
            "type": "string",
            "description": "Policy Number"
          },
          "transaction_type": {
            "enum": [
              "new-business",
              "renewal"
            ],
            "description": "Transaction Type"
          },
          "billing_information": {
            "type": "object",
            "properties": {
              "billing_schedule": {
                "type": "string",
                "description": "Billing Schedule"
              },
              "withdraw_when": {
                "type": "string",
                "description": "Withdraw Funds When"
              },
              "bill_whom_id": {
                "type": "string",
                "format": "uuid",
                "description": "The UUID of the Bill Whom"
              },
              "bill_whom_external_system_reference": {
                "type": "string",
                "description": "External ID of the Bill Whom"
              }
            }
          },
          "status": {
            "type": "string",
            "description": "Quote Status"
          },
          "written_fee": {
            "type": "number",
            "description": "Written Fee"
          },
          "written_premium": {
            "type": "number",
            "description": "Written Premium"
          },
          "annual_premium": {
            "type": "number",
            "description": "Annual Premium"
          },
          "written_premium_pro_rata": {
            "type": "number",
            "description": "Written Premium Pro Rata"
          },
          "annual_premium_pro_rata": {
            "type": "number",
            "description": "Annual Premium Pro Rata"
          },
          "annual_fee": {
            "type": "number",
            "description": "Annual Fee"
          },
          "cancellation_date": {
            "type": "string",
            "format": "date",
            "description": "Date on which the policy was cancelled"
          },
          "renewal_status": {
            "type": "string",
            "enum": [
              "Renew",
              "Non-Renewal"
            ],
            "description": "Renewal status for the policy"
          }
        },
        "required": [
          "id",
          "external_system_reference",
          "policy_type_id",
          "policy_type_external_system_reference",
          "effective_date",
          "agent_id",
          "agent_external_system_reference",
          "agency_id",
          "agency_external_system_reference",
          "underwriting_questions",
          "items",
          "sub_lines",
          "named_insureds",
          "risks",
          "policy_id",
          "policy_number",
          "transaction_type",
          "billing_information",
          "status",
          "written_fee",
          "written_premium",
          "annual_premium",
          "annual_fee",
          "written_premium_pro_rata",
          "annual_premium_pro_rata"
        ]
      },
      "full_quote_async_status-def": {
        "type": "object",
        "description": "Status payload for async full-quote creation. Each branch below is a discriminated variant keyed on 'status' \u2014 result/policy_id/policy_url are only ever populated in the combinations the service actually produces. 'result_available' is always present and is false only when the job's stored results BLOB could not be read.",
        "oneOf": [
          {
            "description": "The worker produced a result (or an existing quote was recovered via external_system_reference). result.response is a compact 5-field summary (not the full quote) and result.warnings is capped, so the pickled BackgroundJob.results stays within the 64KB BLOB cap. If a stored result is corrupt or was truncated in the database, result is null and result_available is false \u2014 the job still completed, so status remains 'success'.",
            "type": "object",
            "properties": {
              "status": {
                "const": "success"
              },
              "reference_id": {
                "type": "string",
                "description": "Identifier used to poll for the status of the async quote creation job."
              },
              "result": {
                "type": [
                  "object",
                  "null"
                ],
                "description": "Created or recovered quote envelope, or null when result_available is false. 'response' is the summary shape (id, policy_id, policy_number, created_date, updated_date) emitted identically by the worker success path and the duplicate-recovery path. The full quote's policy_status/status/state/items/sub_lines/risks and request-echo fields are intentionally omitted \u2014 fetch the full quote separately if needed.",
                "properties": {
                  "response": {
                    "type": "object",
                    "description": "Compact async-result summary (CreateFullQuoteResponseSummaryModel).",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "description": "Quote/revision id."
                      },
                      "policy_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "policy_number": {
                        "type": "string"
                      },
                      "created_date": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date-time",
                        "description": "ISO-8601 timezone-aware; null when unset."
                      },
                      "updated_date": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date-time",
                        "description": "ISO-8601 timezone-aware; null when unset."
                      }
                    },
                    "required": [
                      "id",
                      "policy_id",
                      "policy_number"
                    ]
                  },
                  "warnings": {
                    "type": "array",
                    "description": "Validation warnings, capped for storage: at most 50 entries of 500 UTF-8 bytes each (a byte budget, not a character count -- BLOB_MAX is in bytes and warning text may be non-ASCII), plus a trailing '... and N more warnings (truncated for storage)' note when entries were dropped.",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "response",
                  "warnings"
                ]
              },
              "result_available": {
                "type": "boolean",
                "description": "False when the stored results BLOB was corrupt or truncated and could not be unpickled, in which case result is null. The recovery path is to re-submit with the same external_system_reference, which is idempotent."
              },
              "policy_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "UUID of the policy, copied from result.response.policy_id (a required UUID on CreateFullQuoteResponseSummaryModel). Populated on a normal success; null when result_available is false."
              },
              "policy_url": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uri-reference",
                "description": "URL to the created policy information page. Null when web.ctx.homedomain is unset or when result_available is false; a full URL otherwise."
              }
            },
            "required": [
              "status",
              "reference_id",
              "result",
              "result_available",
              "policy_id",
              "policy_url"
            ]
          },
          {
            "description": "The job is queued or running; no result is available yet.",
            "type": "object",
            "properties": {
              "status": {
                "const": "in_progress"
              },
              "reference_id": {
                "type": "string"
              },
              "result": {
                "type": "null"
              },
              "result_available": {
                "const": true,
                "description": "True \u2014 there is no stored result to have failed to read."
              },
              "policy_id": {
                "type": "null"
              },
              "policy_url": {
                "type": "null"
              }
            },
            "required": [
              "status",
              "reference_id",
              "result",
              "result_available",
              "policy_id",
              "policy_url"
            ]
          },
          {
            "description": "The worker raised and the BackgroundJob row is terminal; result carries the extracted error message.",
            "type": "object",
            "properties": {
              "status": {
                "const": "failure"
              },
              "reference_id": {
                "type": "string"
              },
              "result": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Sanitized error message extracted from the worker exception; null when result_available is false."
              },
              "result_available": {
                "type": "boolean",
                "description": "True in normal operation. A corrupt `exception` BLOB is not expected to surface as a truncation marker here \u2014 CreateFullQuoteAsyncView.poll routes it through _extract_error_message, whose blanket except converts an unreadable value into the string 'Failed to convert exception to string' first \u2014 but _build_status_response applies its marker check to every status rather than special-casing by branch, so false is declared here to match what the code can emit."
              },
              "policy_id": {
                "type": "null"
              },
              "policy_url": {
                "type": "null"
              }
            },
            "required": [
              "status",
              "reference_id",
              "result",
              "result_available",
              "policy_id",
              "policy_url"
            ]
          },
          {
            "description": "No BackgroundJob row exists for the reference_id.",
            "type": "object",
            "properties": {
              "status": {
                "const": "not_found"
              },
              "reference_id": {
                "type": "string"
              },
              "result": {
                "type": "null"
              },
              "result_available": {
                "const": true,
                "description": "True \u2014 there is no stored result to have failed to read."
              },
              "policy_id": {
                "type": "null"
              },
              "policy_url": {
                "type": "null"
              }
            },
            "required": [
              "status",
              "reference_id",
              "result",
              "result_available",
              "policy_id",
              "policy_url"
            ]
          }
        ]
      },
      "html_deliverable-def": {
        "title": "HTMLDeliverable",
        "description": "Schema definition for an HTML deliverable (non-Carbone x_report_location) with optional nested template and dynamic fields",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier"
          },
          "report_type": {
            "type": "string",
            "description": "Report type name (e.g. Custom Deliverable, Declaration)"
          },
          "location_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Business location ID"
          },
          "policy_type_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Policy type name (null for global deliverables)"
          },
          "custom_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Display name of the deliverable"
          },
          "module": {
            "type": "string",
            "enum": [
              "policies",
              "claims"
            ],
            "description": "Module this deliverable belongs to"
          },
          "include_mortgagee": {
            "type": "boolean"
          },
          "include_insured": {
            "type": "boolean"
          },
          "include_addt_int": {
            "type": "boolean"
          },
          "include_agent": {
            "type": "boolean"
          },
          "include_primary_insured": {
            "type": "boolean"
          },
          "eligible_for_insured_edelivery": {
            "type": "boolean"
          },
          "forms_mortgagee": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "string",
                "enum": [
                  "None",
                  "Include",
                  "Exclude"
                ]
              }
            ]
          },
          "forms_insured": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "string",
                "enum": [
                  "None",
                  "Include",
                  "Exclude"
                ]
              }
            ]
          },
          "forms_agent": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "string",
                "enum": [
                  "None",
                  "Include",
                  "Exclude"
                ]
              }
            ]
          },
          "forms_addt_int": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "string",
                "enum": [
                  "None",
                  "Include",
                  "Exclude"
                ]
              }
            ]
          },
          "dec_footer": {
            "type": [
              "string",
              "null"
            ]
          },
          "dec_signature": {
            "type": [
              "string",
              "null"
            ]
          },
          "dec_signature_image": {
            "type": "boolean"
          },
          "dec_blurb": {
            "type": [
              "string",
              "null"
            ]
          },
          "show_fixed_dec_sig": {
            "type": "boolean"
          },
          "print_on_initial_dec": {
            "type": "boolean"
          },
          "print_on_renewal_dec": {
            "type": "boolean"
          },
          "print_on_non_autopay": {
            "type": "boolean"
          },
          "certified_mail": {
            "type": "boolean"
          },
          "built_in_html": {
            "type": "boolean"
          },
          "wkhtmltopdf_options": {
            "type": [
              "object",
              "null"
            ],
            "description": "Per-document wkhtmltopdf options"
          },
          "requires_user_input": {
            "type": "boolean"
          },
          "use_dynamic_fields": {
            "type": "boolean"
          },
          "send_dec": {
            "type": "boolean"
          },
          "overwrite_stock": {
            "type": "boolean"
          },
          "default_print_state": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "string",
                "enum": [
                  "do not print",
                  "tbd"
                ]
              }
            ]
          },
          "esign_enabled": {
            "type": "boolean"
          },
          "generated_per": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "string",
                "enum": [
                  "Property",
                  "None"
                ]
              }
            ]
          },
          "allow_britequote_creation": {
            "type": "boolean"
          },
          "britedocs_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "product_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "html_template": {
            "type": [
              "object",
              "null"
            ],
            "description": "Linked HTML template (matched by name)",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              },
              "html": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Jinja HTML template content"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "enabled": {
                "type": "boolean"
              },
              "show_as_custom_deliverable": {
                "type": "boolean"
              },
              "use_new_html_render": {
                "type": "boolean"
              },
              "use_new_pdf_render": {
                "type": "boolean"
              },
              "preview_object": {
                "type": [
                  "object",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "name"
            ]
          },
          "html_template_locations": {
            "type": [
              "array",
              "null"
            ],
            "description": "Business location mappings for the HTML template",
            "items": {
              "type": "object",
              "properties": {
                "location_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "active": {
                  "type": "boolean"
                }
              },
              "required": [
                "location_id"
              ]
            }
          },
          "dynamic_fields": {
            "type": [
              "array",
              "null"
            ],
            "description": "Dynamic fields for user input on this deliverable",
            "items": {
              "type": "object",
              "properties": {
                "field_type": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "type": "string",
                      "enum": [
                        "text",
                        "html"
                      ]
                    }
                  ]
                },
                "field_label": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "field_key": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "default_value": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            }
          }
        },
        "required": [
          "id",
          "report_type",
          "module"
        ]
      },
      "insight-def": {
        "type": "object",
        "description": "An insight (Co-Pilot alert) for a claim or policy, with type, severity, product-area placement, and optional card selector.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true,
            "description": "Server-assigned insight UUID"
          },
          "reference_type": {
            "type": "string",
            "enum": [
              "CLAIM",
              "POLICY"
            ],
            "description": "Type of resource the insight is attached to"
          },
          "reference_id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the owning claim or policy"
          },
          "insight_type": {
            "type": "string",
            "enum": [
              "MISSING",
              "WORKFLOW",
              "ADVISORY",
              "QUALITY",
              "CONFLICT",
              "FRAUD",
              "GAPS",
              "DOC"
            ],
            "description": "Insight category (immutable after create)"
          },
          "insight_severity": {
            "type": "string",
            "enum": [
              "IMMEDIATE_BLOCKING",
              "ACTION_NEEDED",
              "RECOMMENDED_REVIEW",
              "INFORMATIONAL"
            ],
            "description": "Urgency level (immutable after create)"
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120,
            "description": "Short headline"
          },
          "description": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4000,
            "description": "Adjuster-readable narrative"
          },
          "product_area": {
            "type": [
              "string",
              "null"
            ],
            "description": "Product-area placement; null means reference-wide. Valid values depend on reference_type. CLAIM: INFORMATION, PARTIES, VEHICLES, DAMAGED_PROPERTIES, INJURIES, ESTIMATIONS, ACCOUNTING, DISPUTES, NOTES, ATTACHMENTS. POLICY: INFORMATION, UNDERWRITING, SUBJECTIVITIES, CONTACTS, PROPERTY, VEHICLES, DRIVERS, COVERAGES, RATING, NOTES, ATTACHMENTS, RENEWAL."
          },
          "first_seen_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "last_evaluated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "date_added": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "date_updated": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "reshow": {
            "type": "string",
            "enum": [
              "UNTIL_RESOLVED",
              "ON_DATA_CHANGE",
              "ONCE_ONLY"
            ],
            "description": "Acknowledge re-show policy (settable on create; defaults to UNTIL_RESOLVED)"
          },
          "snooze_days": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Per-insight snooze-window override in days; null falls back to the severity default (settable on create)"
          },
          "last_acknowledged_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "readOnly": true
          },
          "last_acknowledged_by": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "readOnly": true
          },
          "snoozed_until": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "readOnly": true
          },
          "dismissed": {
            "type": "boolean",
            "readOnly": true
          },
          "selector": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional card-level deep-link within product_area. Requires a non-null product_area. CLAIM selectors are per product area (e.g. INFORMATION: CLAIM_INFORMATION, POLICY_INFORMATION, ADDITIONAL_INFORMATION, CLAIM_ASSIGNMENTS, CLAIMS_HISTORY, LOSS_ADDRESS, CATASTROPHE, REINSURANCE_CONTRACTS, DATES, REPORTS, PHOTOS; ACCOUNTING: ACCOUNTING_OVERVIEW, RECOVERIES, EXPOSURE_INFORMATION; PARTIES: PARTIES_LIST; VEHICLES: VEHICLES_LIST; DAMAGED_PROPERTIES: DAMAGED_PROPERTIES_LIST; INJURIES: INJURIES_LIST; ESTIMATIONS: ESTIMATIONS_LIST; DISPUTES: DISPUTES_LIST, LITIGATION_DETAILS; NOTES: NOTES_LIST; ATTACHMENTS: ATTACHMENTS_LIST). POLICY selectors are per product area (INFORMATION: EFFECTIVE_DATES, POLICY_STATUS, REVISION, PREMIUM_TOTALS; UNDERWRITING: STP_STATUS, UW_RULES, UW_QUESTIONS, UW_CONTACT; SUBJECTIVITIES: SUBJECTIVITIES_LIST, ESIGNATURE; CONTACTS: NAMED_INSURED, ADDITIONAL_INTERESTS, AGENT, PREMIUM_FINANCE, SURPLUS_LINE_PRODUCER, CONTACTS_SECTION; PROPERTY: PROPERTIES_LIST; VEHICLES: VEHICLES_LIST; DRIVERS: DRIVERS_LIST; COVERAGES: PRIMARY_EXPOSURES, POLICY_WIDE; RATING: PREMIUM_TOTALS, COMMISSION_RATE, CREDIT_SCORE; NOTES: NOTES_LIST; ATTACHMENTS: ATTACHMENTS_LIST; RENEWAL: RENEWAL_STATUS, POLICY_STATUS)."
          }
        },
        "required": [
          "id",
          "reference_type",
          "reference_id",
          "insight_type",
          "insight_severity",
          "title",
          "description"
        ]
      },
      "item-def": {
        "type": "object",
        "properties": {
          "item_id": {
            "type": "string",
            "format": "uuid",
            "description": "Policy Type Item ID"
          },
          "item_external_system_reference": {
            "type": "string",
            "description": "External ID of the Policy Type Item"
          },
          "manual_premium": {
            "type": "boolean",
            "description": "Whether the premium is set manually",
            "default": false
          },
          "limit": {
            "type": "number",
            "description": "Limit of the Policy Type Item"
          },
          "item_premium": {
            "type": "number",
            "description": "Annual Premium of the Item, if manual_premium is true"
          },
          "item_fee": {
            "type": "number",
            "description": "Annual fee for the item"
          },
          "pro_rated_premium": {
            "type": "number",
            "description": "Pro-rated premium for the item. This is calculated based on the original premium and the duration the change/endorsement is effective for."
          },
          "pro_rated_fee": {
            "type": "number",
            "description": "Pro-rated fee for the item"
          },
          "deductible": {
            "type": "number",
            "description": "Deductible of the Policy Type Item"
          },
          "erp_duration": {
            "type": "number",
            "description": "Extended Reporting Period (ERP) duration in days"
          },
          "erp_limit_reinstatement": {
            "type": "boolean",
            "description": "Whether ERP limits are reinstated for this coverage item"
          },
          "item_data": {
            "type": "object",
            "description": "Builder Object for the Item",
            "properties": {
              "categories": {
                "type": "object",
                "description": "Object with category name as key and category value as value",
                "additionalProperties": {
                  "type": "string"
                }
              },
              "questions": {
                "type": "object",
                "additionalProperties": {
                  "type": "array",
                  "items": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "text": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "text"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "dob": {
                            "type": "string"
                          },
                          "ssn": {
                            "type": "string"
                          },
                          "feinTax": {
                            "type": "string"
                          },
                          "legalEntityType": {
                            "type": "string"
                          },
                          "dateBusinessStarted": {
                            "type": "string"
                          },
                          "riskIdNumber": {
                            "type": "string"
                          },
                          "dba": {
                            "type": "string"
                          },
                          "hasMvrReports": {
                            "type": "boolean"
                          },
                          "purchaseDate": {
                            "type": "string"
                          },
                          "website": {
                            "type": "string"
                          },
                          "addedBy": {
                            "type": "string"
                          }
                        }
                      },
                      {
                        "type": "object",
                        "properties": {
                          "addressCity": {
                            "type": "string"
                          },
                          "addressCounty": {
                            "type": "string"
                          },
                          "addressLine1": {
                            "type": "string"
                          },
                          "addressLine2": {
                            "type": "string"
                          },
                          "addressState": {
                            "type": "string"
                          },
                          "addressZip": {
                            "type": "string"
                          },
                          "addressCountry": {
                            "type": "string"
                          },
                          "latitude": {
                            "type": "number"
                          },
                          "longitude": {
                            "type": "number"
                          },
                          "id": {
                            "type": "string"
                          },
                          "contactId": {
                            "type": "string"
                          },
                          "attention": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          },
                          "typeLabel": {
                            "type": "string"
                          }
                        }
                      },
                      {
                        "type": "object",
                        "properties": {
                          "contactInfo": {
                            "type": "object",
                            "properties": {
                              "contactId": {
                                "type": "string"
                              },
                              "contactType": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "addressCity": {
                                "type": "string"
                              },
                              "addressCounty": {
                                "type": "string"
                              },
                              "addressLine1": {
                                "type": "string"
                              },
                              "addressLine2": {
                                "type": "string"
                              },
                              "addressState": {
                                "type": "string"
                              },
                              "addressZip": {
                                "type": "string"
                              },
                              "addressCountry": {
                                "type": "string"
                              },
                              "latitude": {
                                "type": "number"
                              },
                              "longitude": {
                                "type": "number"
                              },
                              "id": {
                                "type": "string"
                              },
                              "attention": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string"
                              },
                              "typeLabel": {
                                "type": "string"
                              },
                              "dateUpdated": {
                                "type": "string"
                              },
                              "effectiveStartDate": {
                                "type": "string"
                              },
                              "effectiveEndDate": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    ]
                  }
                }
              },
              "override_categories": {
                "type": "array",
                "items": {
                  "type": "string",
                  "description": "Category Name"
                }
              },
              "premium_basis": {
                "type": "object",
                "properties": {
                  "selected": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "Selected Premium Basis"
                    }
                  },
                  "options": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "Available Premium Basis"
                    }
                  },
                  "value": {
                    "type": "number",
                    "description": "Value of the Premium Basis"
                  }
                }
              },
              "scheduled_item": {
                "type": "array",
                "items": {
                  "type": "array",
                  "description": "Scheduled Item row",
                  "items": {
                    "type": "string",
                    "description": "Value of the scheduled item column for the row based on the index"
                  }
                }
              },
              "coinsurance_factor": {
                "type": "string",
                "description": "Coinsurance Factor"
              },
              "user_inputs": {
                "type": "object",
                "description": "Object with user input name as key and user input value as value",
                "additionalProperties": {
                  "type": [
                    "string",
                    "number"
                  ]
                }
              },
              "loss_payees": {
                "type": "array",
                "items": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Loss Payee ID"
                  }
                }
              },
              "property_valuations": {
                "type": "array",
                "description": "Array of property valuation integration instances",
                "items": {
                  "type": "object",
                  "properties": {
                    "integration_instance_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "ID of the integration instance"
                    }
                  },
                  "required": [
                    "integration_instance_id"
                  ]
                }
              },
              "integration_selection_options": {
                "type": "object",
                "description": "Integration-provided selection options for categories and user inputs",
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "options": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Array of available selection options"
                    },
                    "display_suffixes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Optional display suffixes to append to option text"
                    }
                  },
                  "required": [
                    "options"
                  ]
                }
              },
              "integration_values": {
                "type": "object",
                "readOnly": true,
                "description": "BC-24445 (L4). The vendor's last recorded proposal per field, keyed by category or user-input label; stored on the item's builderObj as integrationValues. SERVER-OWNED: a value sent in a request is ignored - repository rebuilds start from an empty builder object, copy only caller-editable fields, and restore the stored proposals - so a caller cannot forge a value for the Revert affordance to restore. readOnly because this schema is shared with the create request.",
                "additionalProperties": {
                  "description": "The vendor's recorded value for that field; absent when none was recorded."
                }
              }
            }
          },
          "system_tags": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Tag ID"
                },
                "tag_name": {
                  "type": "string",
                  "description": "Tag Name"
                },
                "tag_value": {
                  "type": [
                    "string",
                    "boolean",
                    "number"
                  ],
                  "description": "Tag Value"
                }
              }
            }
          }
        },
        "dependentRequired": {
          "manual_premium": [
            "item_premium"
          ]
        }
      },
      "item_update-def": {
        "type": "object",
        "properties": {
          "item_id": {
            "type": "string",
            "format": "uuid",
            "description": "Policy Type Item ID"
          },
          "manual_premium": {
            "type": "boolean",
            "description": "Whether the premium is set manually",
            "default": false
          },
          "limit": {
            "type": "number",
            "description": "Limit of the Policy Type Item"
          },
          "item_premium": {
            "type": "number",
            "description": "Annual Premium of the Item, if manual_premium is true"
          },
          "item_fee": {
            "type": "number",
            "description": "Annual fee for the item"
          },
          "pro_rated_premium": {
            "type": "number",
            "description": "Pro-rated premium for the item"
          },
          "pro_rated_fee": {
            "type": "number",
            "description": "Pro-rated fee for the item"
          },
          "deductible": {
            "type": "number",
            "description": "Deductible of the Policy Type Item"
          },
          "erp_duration": {
            "type": "number",
            "description": "Extended Reporting Period (ERP) duration in days"
          },
          "erp_limit_reinstatement": {
            "type": "boolean",
            "description": "Whether ERP limits are reinstated for this coverage item"
          },
          "item_data": {
            "type": "object",
            "description": "Builder Object for the Item",
            "properties": {
              "categories": {
                "type": "object",
                "description": "Object with category name as key and category value as value",
                "additionalProperties": {
                  "type": "string"
                }
              },
              "questions": {
                "type": "object",
                "additionalProperties": {
                  "type": "array",
                  "items": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "text": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "text"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "dob": {
                            "type": "string"
                          },
                          "ssn": {
                            "type": "string"
                          },
                          "feinTax": {
                            "type": "string"
                          },
                          "legalEntityType": {
                            "type": "string"
                          },
                          "dateBusinessStarted": {
                            "type": "string"
                          },
                          "riskIdNumber": {
                            "type": "string"
                          },
                          "dba": {
                            "type": "string"
                          },
                          "hasMvrReports": {
                            "type": "boolean"
                          },
                          "purchaseDate": {
                            "type": "string"
                          },
                          "website": {
                            "type": "string"
                          },
                          "addedBy": {
                            "type": "string"
                          }
                        }
                      },
                      {
                        "type": "object",
                        "properties": {
                          "addressCity": {
                            "type": "string"
                          },
                          "addressCounty": {
                            "type": "string"
                          },
                          "addressLine1": {
                            "type": "string"
                          },
                          "addressLine2": {
                            "type": "string"
                          },
                          "addressState": {
                            "type": "string"
                          },
                          "addressZip": {
                            "type": "string"
                          },
                          "addressCountry": {
                            "type": "string"
                          },
                          "latitude": {
                            "type": "number"
                          },
                          "longitude": {
                            "type": "number"
                          },
                          "id": {
                            "type": "string"
                          },
                          "contactId": {
                            "type": "string"
                          },
                          "attention": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          },
                          "typeLabel": {
                            "type": "string"
                          }
                        }
                      },
                      {
                        "type": "object",
                        "properties": {
                          "contactInfo": {
                            "type": "object",
                            "properties": {
                              "contactId": {
                                "type": "string"
                              },
                              "contactType": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "addressCity": {
                                "type": "string"
                              },
                              "addressCounty": {
                                "type": "string"
                              },
                              "addressLine1": {
                                "type": "string"
                              },
                              "addressLine2": {
                                "type": "string"
                              },
                              "addressState": {
                                "type": "string"
                              },
                              "addressZip": {
                                "type": "string"
                              },
                              "addressCountry": {
                                "type": "string"
                              },
                              "latitude": {
                                "type": "number"
                              },
                              "longitude": {
                                "type": "number"
                              },
                              "id": {
                                "type": "string"
                              },
                              "attention": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string"
                              },
                              "typeLabel": {
                                "type": "string"
                              },
                              "dateUpdated": {
                                "type": "string"
                              },
                              "effectiveStartDate": {
                                "type": "string"
                              },
                              "effectiveEndDate": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    ]
                  }
                }
              },
              "override_categories": {
                "type": "array",
                "items": {
                  "type": "string",
                  "description": "Category Name"
                }
              },
              "premium_basis": {
                "type": "object",
                "properties": {
                  "selected": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "Selected Premium Basis"
                    }
                  },
                  "options": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "Available Premium Basis"
                    }
                  },
                  "value": {
                    "type": "number",
                    "description": "Value of the Premium Basis"
                  }
                }
              },
              "scheduled_item": {
                "type": "array",
                "items": {
                  "type": "array",
                  "description": "Scheduled Item row",
                  "items": {
                    "type": "string",
                    "description": "Value of the scheduled item column for the row based on the index"
                  }
                }
              },
              "coinsurance_factor": {
                "type": "string",
                "description": "Coinsurance Factor"
              },
              "user_inputs": {
                "type": "object",
                "description": "Object with user input name as key and user input value as value",
                "additionalProperties": {
                  "type": [
                    "string",
                    "number"
                  ]
                }
              },
              "loss_payees": {
                "type": "array",
                "items": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Loss Payee ID"
                  }
                }
              },
              "property_valuations": {
                "type": "array",
                "description": "Array of property valuation integration instances",
                "items": {
                  "type": "object",
                  "properties": {
                    "integration_instance_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "ID of the integration instance"
                    }
                  },
                  "required": [
                    "integration_instance_id"
                  ]
                }
              },
              "integration_selection_options": {
                "type": "object",
                "description": "Integration-provided selection options for categories and user inputs",
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "options": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Array of available selection options"
                    },
                    "display_suffixes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Optional display suffixes to append to option text"
                    }
                  },
                  "required": [
                    "options"
                  ]
                }
              }
            }
          }
        },
        "dependentRequired": {
          "manual_premium": [
            "item_premium"
          ]
        }
      },
      "ivans_dbcs_agency-def": {
        "type": "object",
        "description": "One row of the IVANS DBCS agency picker. Every row the search returns is eligible by construction, so the row carries the two picker flags and no eligibility verdict.",
        "properties": {
          "contact_id": {
            "type": "string",
            "format": "uuid",
            "description": "contacts.id of the agency."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "contacts.name. Null when the column is null."
          },
          "agency_number": {
            "type": [
              "string",
              "null"
            ],
            "description": "contacts.agencyNumber, in its stored casing. The column collates case-insensitively, so two agencies whose numbers differ only in case are the same number as far as a generated DBCS file is concerned."
          },
          "selected": {
            "type": "boolean",
            "description": "True when this agency is in the stored selection."
          },
          "agency_number_conflict": {
            "type": "boolean",
            "description": "True when another eligible agency anywhere in the roster -- not only on this page -- carries the same agency number, compared case-insensitively. A display warning: selecting one of a conflicting pair is allowed, selecting both is refused on save because a generated DBCS file could not tell them apart."
          }
        },
        "required": [
          "contact_id",
          "name",
          "agency_number",
          "selected",
          "agency_number_conflict"
        ]
      },
      "ivans_dbcs_resolved_agency-def": {
        "type": "object",
        "description": "One resolved IVANS DBCS agency. The resolver answers for ANY contact, eligible or not, so the row carries the verdict and the axes it fails and neither picker flag.",
        "properties": {
          "contact_id": {
            "type": "string",
            "format": "uuid",
            "description": "contacts.id of the agency."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "contacts.name. Null when the column is null."
          },
          "agency_number": {
            "type": [
              "string",
              "null"
            ],
            "description": "contacts.agencyNumber, in its stored casing. The column collates case-insensitively, so two agencies whose numbers differ only in case are the same number as far as a generated DBCS file is concerned."
          },
          "eligible": {
            "type": "boolean",
            "description": "True when the contact may be selected for IVANS DBCS. Equivalent to failed_reasons being empty."
          },
          "failed_reasons": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "NOT_AN_AGENCY",
                "NO_AGENCY_NUMBER",
                "INACTIVE",
                "TERMINATED",
                "AGENCY_INACTIVE"
              ]
            },
            "description": "Every eligibility axis this contact fails, not just the first. Empty when eligible is true. A contact id with no contacts row at all never becomes a row here -- it is reported in unknown_contact_ids instead, which is why there is no not-found token in this list."
          }
        },
        "required": [
          "contact_id",
          "name",
          "agency_number",
          "eligible",
          "failed_reasons"
        ]
      },
      "messages-def": {
        "oneOf": [
          {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Any messages or errors related to the request"
          },
          {
            "type": "object",
            "properties": {
              "_base_": {
                "type": "array",
                "description": "Base error message(s)",
                "items": {
                  "type": "string"
                }
              }
            },
            "additionalProperties": {
              "oneOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "string"
                }
              ]
            },
            "description": "Any messages or errors related to the request"
          }
        ]
      },
      "minimum_earned_premium_calendar_entry-def": {
        "title": "MinimumEarnedPremiumCalendarEntry",
        "description": "Minimum earned premium calendar entry for a policy life cycle",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "policy_life_cycle_id": {
            "type": "string",
            "format": "uuid"
          },
          "initial_date": {
            "type": "string",
            "format": "date"
          },
          "final_date": {
            "type": "string",
            "format": "date"
          },
          "percentage": {
            "type": "string",
            "description": "Percentage (decimal as string)"
          }
        },
        "required": [
          "id",
          "policy_life_cycle_id",
          "initial_date",
          "final_date"
        ]
      },
      "mortgagee-def": {
        "type": "object",
        "description": "Mortgagee information",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier for the mortgagee"
          },
          "confirmation_email": {
            "type": "string",
            "pattern": "^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$"
          },
          "date_of_birth": {
            "type": "string",
            "format": "date"
          },
          "drivers_license": {
            "type": "string"
          },
          "external_system_reference": {
            "type": "string",
            "description": "External ID of the Named Insured",
            "minLength": 1
          },
          "last_synched_date": {
            "type": "string",
            "format": "date-time"
          },
          "source_update_date": {
            "type": "string",
            "format": "date-time"
          },
          "fein_tax_id": {
            "type": "string"
          },
          "legal_entity_type": {
            "type": "string"
          },
          "date_business_started": {
            "type": "string",
            "format": "date"
          },
          "dba": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "description": "Named Insured Name",
            "minLength": 1
          },
          "added_by": {
            "type": "string"
          },
          "purchase_date": {
            "type": "string",
            "format": "date"
          },
          "position": {
            "type": "string"
          },
          "website": {
            "type": "string"
          },
          "ssn_group": {
            "type": "string"
          },
          "ssn": {
            "type": "string"
          },
          "agency_inception_date": {
            "type": "string",
            "format": "date"
          },
          "agency_termination_date": {
            "type": "string",
            "format": "date"
          },
          "type": {
            "type": "string",
            "enum": [
              "individual",
              "organization"
            ]
          },
          "username": {
            "type": "string"
          },
          "gender": {
            "type": "string",
            "enum": [
              "Male",
              "Female",
              "Undisclosed",
              "Other"
            ]
          },
          "driver_license_date": {
            "type": "string",
            "format": "date"
          },
          "license_state": {
            "type": "string",
            "pattern": "^[A-Z]{2}$"
          },
          "date_of_death": {
            "type": "string",
            "format": "date"
          },
          "hicn_number": {
            "type": "string"
          },
          "phones": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/phone-def"
            }
          },
          "addresses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/address-def"
            }
          },
          "emails": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/email-def"
            }
          },
          "company_id": {
            "type": "string"
          },
          "is_primary": {
            "type": "boolean",
            "description": "Indicates if this is the primary named insured",
            "default": false
          },
          "contact_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the contact to be added as named insured"
          },
          "description": {
            "type": "string",
            "description": "Description of the mortgagee"
          },
          "loan_number": {
            "type": "string",
            "description": "Loan number associated with this mortgagee"
          },
          "mortgagee_type": {
            "type": "string",
            "description": "Type of mortgagee (e.g., primary, secondary)"
          },
          "mortgagee_statement": {
            "type": "string",
            "description": "Statement to be included on declarations for this mortgagee"
          }
        }
      },
      "named_insured-def": {
        "description": "Shared named insured for the canonical quote family: the create_full_quote, create_full_quote_async and modify_full_quote requests, and the full_quote responses. On these endpoints email is carried by `emails` entries only. The scalar `email`/`email_type` shape belongs to create_quote_extended, which publishes its own named-insured object in request-create_quote_extended.",
        "type": "object",
        "properties": {
          "confirmation_email": {
            "type": "string",
            "pattern": "^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$"
          },
          "date_of_birth": {
            "type": "string",
            "format": "date"
          },
          "drivers_license": {
            "type": "string"
          },
          "external_system_reference": {
            "type": "string",
            "description": "External ID of the Named Insured",
            "minLength": 1
          },
          "last_synched_date": {
            "type": "string",
            "format": "date-time"
          },
          "source_update_date": {
            "type": "string",
            "format": "date-time"
          },
          "fein_tax_id": {
            "type": "string"
          },
          "legal_entity_type": {
            "type": "string"
          },
          "date_business_started": {
            "type": "string",
            "format": "date"
          },
          "dba": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "description": "Named Insured Name",
            "minLength": 1
          },
          "added_by": {
            "type": "string"
          },
          "purchase_date": {
            "type": "string",
            "format": "date"
          },
          "position": {
            "type": "string"
          },
          "website": {
            "type": "string"
          },
          "ssn_group": {
            "type": "string"
          },
          "ssn": {
            "type": "string"
          },
          "agency_inception_date": {
            "type": "string",
            "format": "date"
          },
          "agency_termination_date": {
            "type": "string",
            "format": "date"
          },
          "type": {
            "type": "string",
            "enum": [
              "individual",
              "organization"
            ]
          },
          "username": {
            "type": "string"
          },
          "gender": {
            "type": "string",
            "enum": [
              "Male",
              "Female",
              "Undisclosed",
              "Other"
            ]
          },
          "driver_license_date": {
            "type": "string",
            "format": "date"
          },
          "license_state": {
            "type": "string",
            "pattern": "^[A-Z]{2}$"
          },
          "date_of_death": {
            "type": "string",
            "format": "date"
          },
          "hicn_number": {
            "type": "string"
          },
          "phone_number": {
            "type": "string",
            "description": "Optional scalar phone. When BriteQuote required contact fields include phone number, integrators may send this field or a non-empty `phones` entry (`number` and `type`) on create_quote_extended; either satisfies the requirement."
          },
          "phones": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/phone-def"
            }
          },
          "addresses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/address-def"
            }
          },
          "emails": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/email-def"
            }
          },
          "company_id": {
            "type": "string"
          },
          "is_primary": {
            "type": "boolean",
            "description": "Indicates if this is the primary named insured",
            "default": false
          },
          "contact_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the contact to be added as named insured"
          }
        }
      },
      "nonrenewal_reason-def": {
        "title": "NonrenewalReason",
        "description": "Non-renewal reason for a policy life cycle",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "policy_life_cycle_id": {
            "type": "string",
            "format": "uuid"
          },
          "reason": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_modifiable": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "policy_life_cycle_id",
          "reason"
        ]
      },
      "payment-def": {
        "type": "object",
        "description": "Payment definition schema",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Payment ID."
          },
          "nsf": {
            "type": "boolean",
            "description": "Whether the payment is marked as NSF.",
            "const": true
          },
          "account_name": {
            "type": "string",
            "description": "Name on the payment account."
          },
          "authorization_state": {
            "type": "string",
            "description": "Current authorization state of the payment."
          },
          "check_number": {
            "oneOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Check number if applicable."
          },
          "comm_pay_id": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Commission payment ID."
          },
          "commission_payment": {
            "type": "boolean",
            "description": "Whether this is a commission payment."
          },
          "committer": {
            "type": "string",
            "description": "Entity that committed the payment."
          },
          "complete": {
            "type": "boolean",
            "description": "Whether the payment is complete."
          },
          "confirmation_number": {
            "type": "string",
            "description": "Payment confirmation number."
          },
          "date_updated": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp."
          },
          "deleted": {
            "type": "boolean",
            "description": "Whether the payment is deleted."
          },
          "distribution": {
            "oneOf": [
              {
                "type": "object",
                "description": "Payment distribution information as a JSON object."
              },
              {
                "type": "null"
              }
            ],
            "description": "Payment distribution information as a JSON object or null."
          },
          "entry_date_time": {
            "type": "string",
            "format": "date-time",
            "description": "Payment entry timestamp."
          },
          "file_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "List of associated file IDs."
          },
          "invoice_number": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Invoice number if applicable."
          },
          "invoices_paid": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "List of invoice IDs that were paid by this payment."
          },
          "is_auto_payment": {
            "type": "boolean",
            "description": "Whether this is an automatic payment."
          },
          "masked_number": {
            "type": "string",
            "description": "Masked payment method number."
          },
          "payment_instrument": {
            "type": "string",
            "description": "Type of payment instrument used."
          },
          "payment_interface": {
            "type": "string",
            "description": "Payment interface used."
          },
          "payment_method_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "description": "Payment method ID."
          },
          "payor_id": {
            "type": "string",
            "format": "uuid",
            "description": "Payor contact ID."
          },
          "payor_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Name of the payor from payment gateway billing details (e.g., Stripe)."
          },
          "payor_email": {
            "type": [
              "string",
              "null"
            ],
            "format": "email",
            "description": "Email address of the payor from payment gateway billing details (e.g., Stripe)."
          },
          "printed_to_deposit": {
            "type": "boolean",
            "description": "Whether payment was printed to deposit."
          },
          "remote_ip": {
            "type": "string",
            "description": "Remote IP address of payment origin."
          },
          "selected_on_deposit": {
            "type": "boolean",
            "description": "Whether payment was selected on deposit."
          },
          "sweep": {
            "type": "boolean",
            "description": "Whether this is a sweep payment."
          },
          "transaction_amount": {
            "type": "number",
            "description": "Payment transaction amount."
          },
          "transaction_date_time": {
            "type": "string",
            "format": "date-time",
            "description": "Transaction timestamp."
          },
          "transaction_type": {
            "type": "string",
            "description": "Type of transaction."
          },
          "vendor_message": {
            "type": "string",
            "description": "Message from payment vendor."
          },
          "vendor_stage": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Current vendor processing stage."
          },
          "vendor_stage_success": {
            "type": "boolean",
            "description": "Whether vendor stage was successful."
          }
        },
        "required": [
          "id",
          "nsf",
          "account_name",
          "authorization_state",
          "commission_payment",
          "committer",
          "complete",
          "confirmation_number",
          "date_updated",
          "deleted",
          "entry_date_time",
          "file_ids",
          "invoices_paid",
          "is_auto_payment",
          "masked_number",
          "payment_instrument",
          "payment_interface",
          "printed_to_deposit",
          "remote_ip",
          "selected_on_deposit",
          "sweep",
          "transaction_amount",
          "transaction_date_time",
          "transaction_type",
          "vendor_message",
          "vendor_stage_success"
        ]
      },
      "payment_instrument_installment-def": {
        "title": "PaymentInstrumentInstallment",
        "description": "Payment instrument allocation for a billing schedule installment",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "billing_schedule_installment_id": {
            "type": "string",
            "format": "uuid"
          },
          "payment_instrument": {
            "type": "string"
          },
          "factor_total_prem": {
            "type": "string",
            "description": "Premium factor (decimal as string)"
          }
        },
        "required": [
          "id",
          "billing_schedule_installment_id",
          "payment_instrument",
          "factor_total_prem"
        ]
      },
      "phone-def": {
        "type": "object",
        "properties": {
          "phone": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "Home",
              "Work",
              "Cell",
              "Fax",
              "Other"
            ]
          },
          "is_preferred": {
            "type": "boolean"
          }
        },
        "required": [
          "phone",
          "type",
          "is_preferred"
        ]
      },
      "policy_life_cycle-def": {
        "title": "PolicyLifeCycle",
        "description": "Policy life cycle with all settings and nested child entities",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier for the policy life cycle"
          },
          "location_id": {
            "type": "string",
            "format": "uuid",
            "description": "Business location ID this life cycle belongs to"
          },
          "policy_type_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Policy type name this life cycle is associated with (null for global/shared lifecycle)"
          },
          "endorsement_invoice_fee": {
            "type": "string",
            "description": "Fee charged for endorsement invoices"
          },
          "nsf_fee": {
            "type": "string",
            "description": "Non-sufficient funds fee"
          },
          "non_pay_fee": {
            "type": "string",
            "description": "Non-payment fee"
          },
          "continuation_fee": {
            "type": "string",
            "description": "Continuation fee"
          },
          "non_pay_cancel_fee": {
            "type": "string",
            "description": "Non-payment cancellation fee"
          },
          "bill_less_than_amount": {
            "type": "string",
            "description": "Minimum billing threshold amount"
          },
          "bill_less_than_checked": {
            "type": "boolean",
            "description": "Whether the bill-less-than threshold is enabled"
          },
          "billing_endorsements": {
            "type": "string",
            "description": "Endorsement billing mode (e.g. 'endorse_invoice')"
          },
          "auto_change_billing_schedules": {
            "type": [
              "object",
              "null"
            ],
            "description": "Auto-change billing schedule configuration (JSON)"
          },
          "always_bill_auto_pay": {
            "type": "boolean",
            "description": "Whether to always bill for auto-pay policies"
          },
          "waive_installment_fees_for_pre_paid_invoices": {
            "type": "boolean",
            "description": "Whether to waive installment fees for pre-paid invoices"
          },
          "send_negative_endorsement_invoice": {
            "type": "boolean",
            "description": "Whether to send invoices for negative endorsements"
          },
          "disallow_nsf_duplicate_non_pay": {
            "type": "boolean",
            "description": "Whether to disallow duplicate NSF non-pay fees"
          },
          "length_of_cancellation_pending_notice": {
            "type": "integer",
            "description": "Days of cancellation pending notice"
          },
          "length_of_cancellation_pending_new_business": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Days of cancellation pending notice for new business (JSON, may be null)"
          },
          "length_of_cancellation_pending_renewal": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Days of cancellation pending notice for renewals"
          },
          "length_of_non_pay_cancellation": {
            "type": "integer",
            "description": "Days before non-pay cancellation"
          },
          "length_of_cancellation_category_overrides": {
            "type": [
              "object",
              "null"
            ],
            "description": "Category-specific cancellation period overrides (JSON)"
          },
          "cancel_on_due_date": {
            "type": "boolean",
            "description": "Whether to cancel on the due date"
          },
          "print_during_cancel": {
            "type": "boolean",
            "description": "Whether to print during cancellation"
          },
          "print_confirmation_of_cancellation": {
            "type": "boolean",
            "description": "Whether to print cancellation confirmation"
          },
          "suppress_confirmation_of_cancellation": {
            "type": "boolean",
            "description": "Whether to suppress cancellation confirmation"
          },
          "print_cancellation_invoices": {
            "type": "boolean",
            "description": "Whether to print cancellation invoices"
          },
          "enforce_underwriting_cancellation": {
            "type": "boolean",
            "description": "Whether to enforce underwriting cancellation rules"
          },
          "non_renew_notify_january": {
            "type": "integer",
            "description": "Non-renewal notification days for January"
          },
          "non_renew_notify_february": {
            "type": "integer",
            "description": "Non-renewal notification days for February"
          },
          "non_renew_notify_march": {
            "type": "integer",
            "description": "Non-renewal notification days for March"
          },
          "non_renew_notify_april": {
            "type": "integer",
            "description": "Non-renewal notification days for April"
          },
          "non_renew_notify_may": {
            "type": "integer",
            "description": "Non-renewal notification days for May"
          },
          "non_renew_notify_june": {
            "type": "integer",
            "description": "Non-renewal notification days for June"
          },
          "non_renew_notify_july": {
            "type": "integer",
            "description": "Non-renewal notification days for July"
          },
          "non_renew_notify_august": {
            "type": "integer",
            "description": "Non-renewal notification days for August"
          },
          "non_renew_notify_september": {
            "type": "integer",
            "description": "Non-renewal notification days for September"
          },
          "non_renew_notify_october": {
            "type": "integer",
            "description": "Non-renewal notification days for October"
          },
          "non_renew_notify_november": {
            "type": "integer",
            "description": "Non-renewal notification days for November"
          },
          "non_renew_notify_december": {
            "type": "integer",
            "description": "Non-renewal notification days for December"
          },
          "default_renewal_status": {
            "type": "string",
            "description": "Default renewal status (e.g. 'Renew')"
          },
          "renewal_reminder_override": {
            "type": "boolean",
            "description": "Whether to override renewal reminders"
          },
          "reinstatement_fee": {
            "type": "string",
            "description": "Reinstatement fee amount"
          },
          "reinstatement_expired_fee": {
            "type": "string",
            "description": "Reinstatement fee for expired policies"
          },
          "reinstatement_prompt": {
            "type": "string",
            "description": "Custom reinstatement prompt text"
          },
          "reinstate_expired": {
            "type": "boolean",
            "description": "Whether to allow reinstatement of expired policies"
          },
          "send_notice_on_reinstatement": {
            "type": "boolean",
            "description": "Whether to send notice on reinstatement"
          },
          "send_declaration_on_reinstatement": {
            "type": "boolean",
            "description": "Whether to send declaration on reinstatement"
          },
          "enforce_min_max_payment_public": {
            "type": "boolean",
            "description": "Enforce min/max payment for public portal"
          },
          "enforce_min_max_payment_underwriter": {
            "type": "boolean",
            "description": "Enforce min/max payment for underwriters"
          },
          "enforce_min_max_payment_agent": {
            "type": "boolean",
            "description": "Enforce min/max payment for agents"
          },
          "enforce_min_max_agent_sweep_payment": {
            "type": "boolean",
            "description": "Enforce min/max for agent sweep payments"
          },
          "minimum_threshold": {
            "type": "string",
            "description": "Minimum payment threshold amount"
          },
          "minimum_threshold_premium_factor": {
            "type": "string",
            "description": "Premium factor for minimum threshold calculation"
          },
          "allow_recurring_payments": {
            "type": "string",
            "description": "Recurring payment mode (e.g. 'all')"
          },
          "allow_bypass_threshold": {
            "type": "boolean",
            "description": "Whether to allow bypassing the payment threshold"
          },
          "disallow_payments_scope": {
            "type": "string",
            "description": "Scope for disallowed payments (e.g. 'external')"
          },
          "disallow_external_payments_non_pay": {
            "type": "boolean",
            "description": "Disallow external payments for non-pay"
          },
          "disallow_external_payments_non_pay_poor_payor": {
            "type": "boolean",
            "description": "Disallow external payments for poor payor non-pay"
          },
          "disallow_external_payments_underwriting": {
            "type": "boolean",
            "description": "Disallow external payments for underwriting cancellation"
          },
          "disallow_schedule_changes_mid_term": {
            "type": "boolean",
            "description": "Disallow billing schedule changes mid-term"
          },
          "min_return_premium": {
            "type": "string",
            "description": "Minimum return premium amount"
          },
          "minimum_earned_premium": {
            "type": "string",
            "description": "Minimum earned premium amount"
          },
          "minimum_earned_premium_start_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "Start date for minimum earned premium"
          },
          "always_print_initial": {
            "type": "boolean",
            "description": "Always print initial policy documents"
          },
          "always_print_renewal": {
            "type": "boolean",
            "description": "Always print renewal documents"
          },
          "silence_non_pay": {
            "type": "boolean",
            "description": "Silence non-pay notifications"
          },
          "silence_non_pay_renewal": {
            "type": "boolean",
            "description": "Silence non-pay notifications for renewals"
          },
          "print_for_bill_whom_only": {
            "type": "boolean",
            "description": "Only print for bill-to party"
          },
          "allow_mortgagee_extension": {
            "type": "boolean",
            "description": "Allow mortgagee extension"
          },
          "allow_mortgagee_extension_days": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Number of days for mortgagee extension"
          },
          "continuation_notification": {
            "type": "boolean",
            "description": "Enable continuation notifications"
          },
          "zero_dollar_nonpay_and_continuation_renewal_invoices": {
            "type": "boolean",
            "description": "Allow zero-dollar non-pay and continuation renewal invoices"
          },
          "rewrite_transfer_rp": {
            "type": "boolean",
            "description": "Transfer return premium on policy rewrite"
          },
          "rewrite_sync_bill_dates_on_commit": {
            "type": "boolean",
            "description": "Sync billing dates on commit for rewrites"
          },
          "carry_over_cp_to_future_terms": {
            "type": "boolean",
            "description": "Carry over credit premium to future terms"
          },
          "report_due_date_minus_x": {
            "type": "integer",
            "description": "Report due date offset in days"
          },
          "always_process_as_non_renewal": {
            "type": "boolean",
            "description": "Always process as non-renewal (deprecated)"
          },
          "billing_schedules": {
            "type": "array",
            "description": "Billing schedules for this life cycle",
            "items": {
              "$ref": "#/components/schemas/billing_schedule-def"
            }
          },
          "cancellation_reasons": {
            "type": "array",
            "description": "Cancellation reasons for this life cycle",
            "items": {
              "$ref": "#/components/schemas/cancellation_reason-def"
            }
          },
          "nonrenewal_reasons": {
            "type": "array",
            "description": "Non-renewal reasons for this life cycle",
            "items": {
              "$ref": "#/components/schemas/nonrenewal_reason-def"
            }
          },
          "reinstatement_reasons": {
            "type": "array",
            "description": "Reinstatement reasons for this life cycle",
            "items": {
              "$ref": "#/components/schemas/reinstatement_reason-def"
            }
          },
          "minimum_earned_premium_calendar_entries": {
            "type": "array",
            "description": "Minimum earned premium calendar entries for this life cycle",
            "items": {
              "$ref": "#/components/schemas/minimum_earned_premium_calendar_entry-def"
            }
          }
        },
        "required": [
          "id",
          "location_id"
        ]
      },
      "policy_type_def-def": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "ID to be set for the Policy Type (optional)"
          },
          "external_system_reference": {
            "type": "string",
            "description": "External System Reference for the Policy Type"
          },
          "name": {
            "type": "string",
            "description": "Name of the Policy Type"
          },
          "description": {
            "type": "string",
            "description": "Description of the Policy Type"
          },
          "renewal_effective_date": {
            "type": "string",
            "format": "date-time",
            "description": "The renewal effective date for this policy type"
          },
          "underwriting_text": {
            "type": "string",
            "description": "Underwriting text for the Policy Type"
          },
          "application_form_number": {
            "type": "string",
            "default": "",
            "description": "Application Form Number"
          },
          "sort_order": {
            "type": "integer",
            "description": "Sort order of the Policy Type"
          },
          "allow_multiple_risks": {
            "type": "boolean",
            "default": false,
            "description": "Whether multiple risks are allowed"
          },
          "require_credit_score": {
            "type": "boolean",
            "default": false,
            "description": "Whether credit score is required"
          },
          "credit_score_permission_prompt": {
            "type": "string",
            "default": "",
            "description": "Prompt for credit score permission"
          },
          "term_credit_score_combination_strategy": {
            "type": "string",
            "enum": [
              "USE_AVERAGE",
              "USE_HIGHEST",
              "USE_LOWEST"
            ],
            "default": "USE_AVERAGE",
            "description": "Strategy for combining term credit scores"
          },
          "term_credit_score_fallback": {
            "type": "integer",
            "default": 0,
            "description": "Fallback value for term credit score"
          },
          "terms_credit_score_valid": {
            "type": "integer",
            "default": 0,
            "description": "Number of policy terms the rated credit score stays locked (0 = always rate on the most recent score)"
          },
          "terms_credit_score_pull_interval": {
            "type": "integer",
            "default": 0,
            "description": "Number of policy terms that must elapse before ordering a new credit report on the renewal schedule (0 = no scheduled ordering; the global contacts/auto-fetch-credit-score setting can still order a report when an insured is edited)"
          },
          "always_display_wizard_credit_score_button": {
            "type": "boolean",
            "default": false,
            "description": "Whether to always display the credit score button in the wizard"
          },
          "open_to_quoting": {
            "type": "boolean",
            "default": true,
            "description": "Whether the Policy Type is open to quoting"
          },
          "quote_terms": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "THREE_YEAR",
                "EIGHTEEN_MONTH",
                "ONE_YEAR",
                "NINE_MONTH",
                "SIX_MONTH",
                "THREE_MONTH"
              ]
            },
            "description": "Available quote terms"
          },
          "terms": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "name"
              ],
              "properties": {
                "name": {
                  "type": "string",
                  "enum": [
                    "THREE_YEAR",
                    "EIGHTEEN_MONTH",
                    "ONE_YEAR",
                    "NINE_MONTH",
                    "SIX_MONTH",
                    "THREE_MONTH"
                  ],
                  "description": "Name of the term"
                },
                "factor": {
                  "type": "number",
                  "description": "Factor for the term"
                }
              }
            },
            "description": "Terms and their factors"
          },
          "dec_sections": {
            "type": "string",
            "default": "Section I,Section II,Optional Items",
            "description": "Declaration sections"
          },
          "separate_dec_sections": {
            "type": "boolean",
            "default": false,
            "description": "Whether to separate declaration sections"
          },
          "system_tags": {
            "type": "object",
            "description": "System tags"
          },
          "protection_class": {
            "type": "string",
            "enum": [
              "ISO",
              "AAIS"
            ],
            "default": "ISO",
            "description": "Protection class type"
          },
          "limit_threshold": {
            "type": "number",
            "description": "Limit threshold"
          },
          "limit_breach_warning": {
            "type": "string",
            "description": "Warning message for limit breach"
          },
          "requires_approval": {
            "type": "boolean",
            "default": false,
            "description": "Whether approval is required"
          },
          "use_rating_v1": {
            "type": "boolean",
            "default": false,
            "description": "Whether to use rating v1"
          },
          "trust_risk_premiums": {
            "type": "boolean",
            "default": true,
            "description": "Whether to trust risk premiums"
          },
          "rating_info_title": {
            "type": "string",
            "default": "RATING INFORMATION",
            "description": "Title for rating information"
          },
          "show_optional_builder_items_inline": {
            "type": "boolean",
            "default": false,
            "description": "Whether to show optional builder items inline"
          },
          "skip_insured_quoting_step": {
            "type": "boolean",
            "default": false,
            "description": "Whether to skip the insured quoting step"
          },
          "sequence_id": {
            "type": "string",
            "format": "uuid",
            "description": "Sequence ID"
          },
          "claim_sequence_id": {
            "type": "string",
            "format": "uuid",
            "description": "Claim sequence ID"
          },
          "allow_risk_valuation": {
            "type": "boolean",
            "default": true,
            "description": "Whether to allow risk valuation"
          },
          "maximum_risk_count": {
            "type": "integer",
            "default": 500,
            "description": "Maximum number of risks allowed"
          },
          "require_risk_address": {
            "type": "boolean",
            "default": true,
            "description": "Whether risk address is required"
          },
          "require_insured_name": {
            "type": "boolean",
            "default": false,
            "description": "Whether insured name is required"
          },
          "allow_motor_vehicle_reports": {
            "type": "boolean",
            "default": false,
            "description": "Whether to allow motor vehicle reports"
          },
          "britelines_product_name": {
            "type": "string",
            "default": "",
            "description": "BriteLines product name"
          },
          "acres_visibility": {
            "type": "string",
            "enum": [
              "NONE",
              "BRITECORE",
              "BRITECORE_AND_BRITEQUOTE",
              "BRITECORE_AND_BRITEQUOTE_REQUIRED"
            ],
            "default": "NONE",
            "description": "Visibility setting for acres"
          },
          "legal_description_visibility": {
            "type": "string",
            "enum": [
              "NONE",
              "BRITECORE",
              "BRITECORE_AND_BRITEQUOTE",
              "BRITECORE_AND_BRITEQUOTE_REQUIRED"
            ],
            "default": "NONE",
            "description": "Visibility setting for legal description"
          },
          "commission_calculation_item_id": {
            "type": "string",
            "format": "uuid",
            "description": "Commission calculation item ID"
          },
          "type": {
            "type": "string",
            "enum": [
              "PROPERTY"
            ],
            "default": "PROPERTY",
            "description": "Type of the policy"
          },
          "months_mvr_valid": {
            "type": "integer",
            "default": 0,
            "description": "Number of months MVR is valid"
          },
          "mid_term_quoting": {
            "type": "boolean",
            "default": false,
            "description": "Whether mid-term quoting is allowed"
          },
          "billing_schedule_in_rating": {
            "type": "boolean",
            "default": false,
            "description": "Whether billing schedule is included in rating"
          },
          "edelivery_enabled": {
            "type": "boolean",
            "default": false,
            "description": "Whether e-delivery is enabled"
          },
          "allow_zero_risks": {
            "type": "boolean",
            "default": false,
            "description": "Whether zero risks are allowed"
          },
          "last_synched_date": {
            "type": "string",
            "format": "date-time",
            "description": "Date of last synchronization"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/policy_type_item-def"
            }
          },
          "sub_lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/sub_line_def-def"
            }
          }
        }
      },
      "policy_type_item-def": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "ID to be set for the Line Item (optional)"
          },
          "external_system_reference": {
            "type": "string",
            "description": "External System Reference for the Line Item"
          },
          "name": {
            "type": "string",
            "description": "Name of the Line Item"
          },
          "description": {
            "type": "string",
            "description": "Description of the Line Item"
          },
          "system_tags": {
            "type": "object",
            "description": "System-specific tags associated with the Line Item"
          },
          "category": {
            "type": "string",
            "enum": [
              "POLICY",
              "RISK"
            ],
            "description": "Category of the Line Item (Policy or Risk)"
          },
          "type": {
            "type": "string",
            "enum": [
              "COVERAGE",
              "ADJUSTMENT",
              "NON_RATE",
              "FEE",
              "CALCULATION",
              "DIVIDEND"
            ],
            "description": "Type of the Line Item"
          },
          "has_limit": {
            "type": "boolean",
            "default": false,
            "description": "Indicates if the Line Item has a limit"
          },
          "has_rate_or_deductible": {
            "type": "boolean",
            "default": false,
            "description": "Indicates if the Line Item has a rate or deductible"
          },
          "has_loss_payee": {
            "type": "boolean",
            "default": false,
            "description": "Indicates if the Line Item has a loss payee"
          },
          "requirement_type": {
            "type": "string",
            "enum": [
              "MANDATORY",
              "DEFAULT",
              "OPTIONAL"
            ],
            "description": "Requirement type of the Line Item"
          },
          "allow_multiples": {
            "type": "boolean",
            "default": false,
            "description": "Indicates if multiple instances of this Line Item are allowed"
          },
          "premium_fully_billed": {
            "type": "boolean",
            "default": false,
            "description": "Indicates if the premium is fully billed"
          },
          "premium_fully_earned_at_inception": {
            "type": "boolean",
            "default": false,
            "description": "Indicates if the premium is fully earned at inception"
          },
          "premium_added_to_other_item": {
            "type": "boolean",
            "default": false,
            "description": "Indicates if the premium is added to another item"
          },
          "disallow_submit_bound": {
            "type": "boolean",
            "default": false,
            "description": "Indicates if submitting bound is disallowed"
          },
          "display_on_dec_as": {
            "type": "string",
            "description": "How the item should be displayed on declaration"
          },
          "dec_font_size": {
            "type": "integer",
            "default": 10,
            "description": "Font size for declaration"
          },
          "dec_font_bold": {
            "type": "boolean",
            "default": false,
            "description": "Indicates if the font should be bold in declaration"
          },
          "dec_font_italic": {
            "type": "boolean",
            "default": false,
            "description": "Indicates if the font should be italic in declaration"
          },
          "dec_aliases": {
            "type": "object",
            "description": "Aliases for declarations display"
          },
          "do_not_display_in_dec_rating_information": {
            "type": "boolean",
            "default": false,
            "description": "Indicates if the item should not be displayed in declaration rating information"
          },
          "do_not_display_in_dec_when_zero_premium": {
            "type": "boolean",
            "default": false,
            "description": "Indicates if the item should not be displayed in declaration when premium is zero"
          },
          "display_in_dec_as_incl_when_zero_premium": {
            "type": "boolean",
            "default": false,
            "description": "Indicates if the item should be displayed as included in declaration when premium is zero"
          },
          "show_limit_and_premium_on_dec": {
            "type": "boolean",
            "default": false,
            "description": "Indicates if limit and premium should be shown on declaration"
          },
          "dividend_factor": {
            "type": "number",
            "default": 0,
            "description": "Dividend factor for the Line Item"
          },
          "show_in_builder": {
            "type": "string",
            "enum": [
              "NONE",
              "BRITECORE_AND_BRITEQUOTE",
              "BRITECORE"
            ],
            "default": "NONE",
            "description": "Specifies where the item should be shown in the builder"
          },
          "hide_in_britequote": {
            "type": "boolean",
            "default": false,
            "description": "Indicates if the item should be hidden in BriteQuote"
          },
          "limit_availability": {
            "type": "string",
            "description": "Specifies the limit availability for the Line Item"
          },
          "loss_exposure": {
            "type": "boolean",
            "default": false,
            "description": "Indicates if the item represents a loss exposure"
          },
          "loss_free_credit": {
            "type": "object",
            "description": "Details about loss-free credit"
          },
          "no_commission_paid_on_line_item": {
            "type": "boolean",
            "default": false,
            "description": "Indicates if no commission is paid on this Line Item"
          },
          "override_limit": {
            "type": "boolean",
            "default": false,
            "description": "Indicates if the limit can be overridden"
          },
          "not_applicable_for_agency_billing": {
            "type": "boolean",
            "default": false,
            "description": "Indicates if the item is not applicable for agency billing"
          },
          "prevent_from_being_deleted": {
            "type": "boolean",
            "default": false,
            "description": "Indicates if the item should be prevented from being deleted"
          },
          "display_user_inputs_above_rate_categories": {
            "type": "boolean",
            "default": false,
            "description": "Indicates if user inputs should be displayed above rate categories"
          },
          "renewal_amount": {
            "type": "number",
            "default": 0,
            "description": "Renewal amount for the Line Item"
          },
          "default_loss_reserve": {
            "type": "number",
            "default": 0,
            "description": "Default loss reserve amount"
          },
          "default_adjusting_reserve": {
            "type": "number",
            "default": 0,
            "description": "Default adjusting reserve amount"
          },
          "default_legal_reserve": {
            "type": "number",
            "default": 0,
            "description": "Default legal reserve amount"
          },
          "modifies_other_items_on_renewal": {
            "type": "boolean",
            "default": false,
            "description": "Indicates if this item modifies other items on renewal"
          },
          "not_rated_by_prorata_and_factor": {
            "type": "boolean",
            "default": false,
            "description": "Indicates if the item is not rated by pro-rata and factor"
          },
          "rate_chain": {
            "type": "array",
            "items": {
              "type": "object",
              "$ref": "#/components/schemas/rate_chain-def"
            },
            "description": "Rate chain for the Line Item"
          },
          "renewal_split_by": {
            "type": "string",
            "enum": [
              "SINGLE_FACTOR",
              "ZIPCODE",
              "CONSTANT_AMOUNT",
              "AMOUNT_ZIPCODE"
            ],
            "default": "SINGLE_FACTOR",
            "description": "Specifies how renewal is split"
          },
          "renewal_zip_factors": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Zip code factors for renewal"
          },
          "renewal_factor_item_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Line item IDs whose limit this item inflates at renewal (inflation guard targets)"
          },
          "round_method": {
            "type": "string",
            "enum": [
              "ROUND_HALF_UP",
              "ROUND_CEILING",
              "ROUND_FLOOR"
            ],
            "default": "ROUND_HALF_UP",
            "description": "Rounding method for calculations"
          },
          "round_to": {
            "type": "string",
            "enum": [
              "1.0",
              "1.00",
              "1"
            ],
            "default": "1",
            "description": "Specifies to what decimal place to round"
          },
          "round_pro_rata": {
            "type": "boolean",
            "default": false,
            "description": "Indicates if pro-rata should be rounded"
          },
          "scheduled_item": {
            "type": "object",
            "description": "Details about scheduled item"
          },
          "skip_persistent_builder_when_added_mandatorily": {
            "type": "boolean",
            "default": false,
            "description": "Indicates if persistent builder should be skipped when added mandatorily"
          },
          "skip_persistent_builder_when_new_category_added": {
            "type": "boolean",
            "default": false,
            "description": "Indicates if persistent builder should be skipped when new category is added"
          },
          "disallow_submit_bound_if_limit_exceeds": {
            "type": "boolean",
            "default": false,
            "description": "Indicates if submitting bound should be disallowed if limit exceeds"
          },
          "submit_bound_upper_limit": {
            "type": "number",
            "default": 0,
            "description": "Upper limit for submitting bound"
          },
          "pro_rate_fee": {
            "type": "boolean",
            "default": false,
            "description": "Indicates if fee should be pro-rated"
          },
          "sort_order": {
            "type": "integer",
            "description": "Sort order for the Line Item"
          },
          "claim_coverage_party_type": {
            "type": "string",
            "enum": [
              "FIRST_PARTY",
              "THIRD_PARTY",
              "BOTH"
            ],
            "description": "Specifies the claim coverage party type"
          },
          "calculate_item_commission_rate": {
            "type": "boolean",
            "default": false,
            "description": "Indicates if item commission rate should be calculated"
          },
          "commission_rate_eval": {
            "type": "string",
            "description": "Commission rate evaluation"
          },
          "erp_enabled": {
            "type": "boolean",
            "default": false,
            "description": "Indicates if Extended Reporting Period (ERP) is enabled for this Line Item"
          },
          "default_erp_duration_days": {
            "type": "integer",
            "description": "Default duration in days for the Extended Reporting Period (ERP)"
          },
          "erp_line_item_id": {
            "type": "string",
            "format": "uuid",
            "description": "Reference to the Line Item used for ERP calculations"
          }
        },
        "required": [
          "name",
          "category",
          "type",
          "requirement_type"
        ]
      },
      "property_template-def": {
        "type": "object",
        "description": "Schema for property data in Quick Quote Templates",
        "properties": {
          "address_city": {
            "type": [
              "string",
              "null"
            ],
            "description": "Property city"
          },
          "address_county": {
            "type": [
              "string",
              "null"
            ],
            "description": "Property county"
          },
          "address_line1": {
            "type": [
              "string",
              "null"
            ],
            "description": "Property address line 1"
          },
          "address_line2": {
            "type": [
              "string",
              "null"
            ],
            "description": "Property address line 2"
          },
          "address_state": {
            "type": [
              "string",
              "null"
            ],
            "description": "Property state"
          },
          "address_zip": {
            "type": [
              "string",
              "null"
            ],
            "description": "Property ZIP code"
          },
          "year_built": {
            "type": [
              "string",
              "null"
            ],
            "description": "Year the property was built"
          },
          "stories": {
            "type": [
              "string",
              "integer",
              "null"
            ],
            "description": "Number of stories"
          },
          "square_footage": {
            "type": [
              "number",
              "null"
            ],
            "description": "Square footage of the property"
          }
        }
      },
      "quote_wizard_plugin-def": {
        "title": "QuoteWizardPlugin",
        "type": "object",
        "description": "Quote wizard plugin model with embed URL",
        "properties": {
          "embed_url": {
            "type": "string",
            "description": "URL to embed in an iframe to display the quote wizard plugin"
          }
        },
        "required": [
          "embed_url"
        ]
      },
      "rate_chain-def": {
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "CATEGORIES",
              "FLAT_RATE",
              "FACTOR_TABLE",
              "RATE_TABLE",
              "PREMIUM_BASIS",
              "DEDUCTIBLE",
              "MINIMUM_PREMIUM",
              "MAXIMUM_PREMIUM",
              "EVALUATION",
              "LIMIT",
              "RATE_PER"
            ]
          },
          "description": {
            "type": "string",
            "description": "A description of the rate chain object",
            "default": ""
          },
          "var_name": {
            "type": "string",
            "description": "The variable name of the rate chain object",
            "default": ""
          },
          "omit_from_total": {
            "type": "boolean",
            "description": "Whether or not to omit this rate chain object from the total",
            "default": false
          }
        },
        "oneOf": [
          {
            "properties": {
              "type": {
                "const": "CATEGORIES"
              },
              "categories": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/rate_chain-def-defs-Category"
                },
                "description": "An array of category objects"
              }
            },
            "required": [
              "categories"
            ]
          },
          {
            "properties": {
              "type": {
                "const": "FLAT_RATE"
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-FlatRate"
          },
          {
            "properties": {
              "type": {
                "const": "FACTOR_TABLE"
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-FactorTable"
          },
          {
            "properties": {
              "type": {
                "const": "RATE_TABLE"
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-RateTable"
          },
          {
            "properties": {
              "type": {
                "const": "PREMIUM_BASIS"
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-PremiumBasis"
          },
          {
            "properties": {
              "type": {
                "const": "DEDUCTIBLE"
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-Deductible"
          },
          {
            "properties": {
              "type": {
                "const": "MINIMUM_PREMIUM"
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-MinimumPremium"
          },
          {
            "properties": {
              "type": {
                "const": "MAXIMUM_PREMIUM"
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-MaximumPremium"
          },
          {
            "properties": {
              "type": {
                "const": "EVALUATION"
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-Evaluation"
          },
          {
            "properties": {
              "type": {
                "const": "LIMIT"
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-Limit"
          },
          {
            "properties": {
              "type": {
                "const": "RATE_PER"
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-RatePer"
          }
        ],
        "$defs": {
          "BaseCategory": {
            "type": "object",
            "required": [
              "options",
              "disallow_options",
              "category_name",
              "type"
            ],
            "properties": {
              "options": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "An array of category options"
              },
              "disallow_options": {
                "type": "array",
                "items": {
                  "type": "boolean"
                },
                "description": "An array of booleans indicating whether or not each option is disallowed"
              },
              "category_name": {
                "type": "string",
                "description": "The name of the category"
              },
              "type": {
                "type": "string",
                "enum": [
                  "STANDARD",
                  "MAPPED",
                  "REFERENCED_CATEGORY",
                  "AGE",
                  "ZIP_CODE",
                  "LIMIT_OF_SELECTED_LINE_ITEM",
                  "LOCATION_CODE",
                  "CREDIT_TIER",
                  "DEDUCTIBLE",
                  "YEARS_SINCE_LAST_CLAIM_MADE",
                  "NUMBER_OF_CLAIMS",
                  "PROTECTION_CLASS",
                  "BCEGS_CODE",
                  "DISTANCE_TO_COAST",
                  "NUMBER_INPUT"
                ]
              },
              "print_on_declaration": {
                "type": "boolean",
                "description": "Whether or not to print the category on the declaration",
                "default": true
              },
              "print_order_in_dec": {
                "type": "string",
                "description": "The order in which to print the category on the declaration",
                "default": ""
              },
              "enabled_in_britequote": {
                "type": "boolean",
                "description": "Whether the category is enabled/disabled in BriteQuote.",
                "default": true
              },
              "visible_in_britequote": {
                "type": "boolean",
                "description": "Whether the category is shown in BriteQuote.",
                "default": true
              },
              "sync_across_line_items": {
                "type": "boolean",
                "description": "Whether the category value is synced with other categories across line items. Other categories should also have the same name and this value set to `true` to sync.",
                "default": true
              },
              "sync_always": {
                "type": "boolean",
                "description": "Whether the category values are synced every time a change is made to the category or only once.",
                "default": false
              },
              "require_explicit_selection_in_wizard": {
                "type": "boolean",
                "description": "Whether the category requires an explicit selection in the wizard.",
                "default": false
              },
              "renew_with_default": {
                "type": "boolean",
                "description": "Renew with the Default Category if no Category selection was previously made.",
                "default": false
              },
              "is_required": {
                "type": "boolean",
                "description": "Whether the category is required.",
                "default": false
              },
              "show_message_popup_in_builder": {
                "type": "boolean",
                "description": "Whether to show a message popup in the builder.",
                "default": false
              },
              "message_popup_text": {
                "type": "string",
                "description": "The text to show in the message popup.",
                "default": ""
              },
              "selected_by_lookup": {
                "type": "boolean",
                "description": "Whether the category is selected by a lookup table.",
                "default": false
              },
              "lookup_table": {
                "type": "object",
                "description": "The lookup table to use for selecting the category.",
                "properties": {
                  "label": {
                    "type": "string",
                    "description": "The name of the lookup table."
                  },
                  "values": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "A list of strings that represent the values in the lookup table."
                    }
                  },
                  "category_options": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "A list of strings that represent the category options. Corresponds to the `options` field in the category object."
                    }
                  }
                },
                "required": [
                  "label",
                  "values",
                  "category_options"
                ]
              },
              "preservation_uuids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "description": "UUIDs of the `options` for Credit Tier, Location Code, Zip Code. These ids correspond to the options using the same index in the `options` list."
              },
              "default_option": {
                "type": "string",
                "description": "The default option for the category."
              },
              "line_item_id": {
                "type": "string",
                "format": "uuid",
                "description": "ID of the referenced category's line item."
              }
            }
          },
          "Category": {
            "type": "object",
            "oneOf": [
              {
                "properties": {
                  "type": {
                    "const": "STANDARD"
                  }
                },
                "$ref": "#/components/schemas/rate_chain-def-defs-BaseCategory"
              },
              {
                "properties": {
                  "type": {
                    "const": "MAPPED"
                  },
                  "categories": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "A list of category names that this category uses to map its options."
                  },
                  "mapping": {
                    "type": "object",
                    "description": "Object that represents the mapping of the options of the categories in `categories`.",
                    "$ref": "#/components/schemas/rate_chain-def-defs-MappedCategoryMapping"
                  }
                },
                "required": [
                  "categories",
                  "mapping"
                ],
                "$ref": "#/components/schemas/rate_chain-def-defs-BaseCategory"
              },
              {
                "properties": {
                  "type": {
                    "const": "REFERENCED_CATEGORY"
                  }
                },
                "$ref": "#/components/schemas/rate_chain-def-defs-BaseCategory"
              },
              {
                "properties": {
                  "type": {
                    "const": "AGE"
                  }
                },
                "$ref": "#/components/schemas/rate_chain-def-defs-BaseCategory"
              },
              {
                "properties": {
                  "type": {
                    "const": "ZIP_CODE"
                  }
                },
                "$ref": "#/components/schemas/rate_chain-def-defs-BaseCategory"
              },
              {
                "properties": {
                  "type": {
                    "const": "LIMIT_OF_SELECTED_LINE_ITEM"
                  }
                },
                "$ref": "#/components/schemas/rate_chain-def-defs-BaseCategory"
              },
              {
                "properties": {
                  "type": {
                    "const": "LOCATION_CODE"
                  }
                },
                "$ref": "#/components/schemas/rate_chain-def-defs-BaseCategory"
              },
              {
                "properties": {
                  "type": {
                    "const": "CREDIT_TIER"
                  }
                },
                "$ref": "#/components/schemas/rate_chain-def-defs-BaseCategory"
              },
              {
                "properties": {
                  "type": {
                    "const": "DEDUCTIBLE"
                  }
                },
                "$ref": "#/components/schemas/rate_chain-def-defs-BaseCategory"
              },
              {
                "properties": {
                  "type": {
                    "const": "YEARS_SINCE_LAST_CLAIM_MADE"
                  }
                },
                "$ref": "#/components/schemas/rate_chain-def-defs-BaseCategory"
              },
              {
                "properties": {
                  "type": {
                    "const": "NUMBER_OF_CLAIMS"
                  }
                },
                "$ref": "#/components/schemas/rate_chain-def-defs-BaseCategory"
              },
              {
                "properties": {
                  "type": {
                    "const": "PROTECTION_CLASS"
                  }
                },
                "$ref": "#/components/schemas/rate_chain-def-defs-BaseCategory"
              },
              {
                "properties": {
                  "type": {
                    "const": "BCEGS_CODE"
                  }
                },
                "$ref": "#/components/schemas/rate_chain-def-defs-BaseCategory"
              },
              {
                "properties": {
                  "type": {
                    "const": "DISTANCE_TO_COAST"
                  }
                },
                "$ref": "#/components/schemas/rate_chain-def-defs-BaseCategory"
              },
              {
                "properties": {
                  "type": {
                    "const": "NUMBER_INPUT"
                  }
                },
                "$ref": "#/components/schemas/rate_chain-def-defs-BaseCategory"
              }
            ]
          },
          "MappedCategoryMapping": {
            "type": "object",
            "required": [
              "map_from",
              "map_to"
            ],
            "properties": {
              "map_from": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "A list of options to map from."
              },
              "map_to": {
                "type": "string",
                "description": "An option to map to."
              }
            }
          },
          "FlatRate": {
            "type": "object",
            "properties": {
              "categories": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "A list of category names that this flat rate object uses."
              },
              "rates": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/rate_chain-def-defs-MappedCategoryMapping"
                },
                "description": "A list that represents the rates for the categories in `categories`."
              }
            },
            "required": [
              "categories",
              "rates"
            ]
          },
          "BaseFactorTable": {
            "type": "object",
            "required": [
              "factor_table_type",
              "applies_to",
              "between_intervals",
              "round_to",
              "round_method",
              "rates",
              "categories",
              "tiers"
            ],
            "properties": {
              "factor_table_type": {
                "type": "string",
                "enum": [
                  "REMAINING_LIMIT",
                  "SELECTED_LIMITS",
                  "USER_INPUT",
                  "SELECTED_PREMIUMS",
                  "EXCLUDED_PREMIUMS",
                  "PREVIOUS_PREMIUM",
                  "PREVIOUS_NON_ZERO_PREMIUM",
                  "CATEGORIES_ONLY",
                  "CREDIT_SCORE",
                  "SELF_LIMIT"
                ]
              },
              "applies_to": {
                "type": "string",
                "enum": [
                  "AGGREGATE_PREMIUM",
                  "PREVIOUS_PREMIUM"
                ],
                "description": "Rate applies to."
              },
              "between_intervals": {
                "type": "string",
                "enum": [
                  "INTERPOLATE",
                  "USE_LOWER_LIMIT",
                  "USE_UPPER_LIMIT"
                ],
                "description": "How to the interval between the rates."
              },
              "round_to": {
                "type": "string",
                "enum": [
                  "1.000000",
                  "1.00000",
                  "1.0000",
                  "1.000",
                  "1.00",
                  "1.0",
                  "1"
                ],
                "description": "The round to value for the rates."
              },
              "round_method": {
                "type": "string",
                "enum": [
                  "ROUND_HALF_UP",
                  "ROUND_CEILING",
                  "ROUND_FLOOR"
                ],
                "description": "The round method for the rates."
              },
              "rates": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/rate_chain-def-defs-MappedCategoryMapping"
                }
              },
              "categories": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "A list of category names that this factor table uses."
              },
              "tiers": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "A list of tiers."
              },
              "referenced_items": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "A list of referenced line items."
              }
            }
          },
          "FactorTable": {
            "type": "object",
            "oneOf": [
              {
                "properties": {
                  "factor_table_type": {
                    "const": "REMAINING_LIMIT"
                  }
                },
                "$ref": "#/components/schemas/rate_chain-def-defs-BaseFactorTable"
              },
              {
                "properties": {
                  "factor_table_type": {
                    "const": "SELECTED_LIMITS"
                  }
                },
                "$ref": "#/components/schemas/rate_chain-def-defs-BaseFactorTable"
              },
              {
                "properties": {
                  "factor_table_type": {
                    "const": "USER_INPUT"
                  },
                  "label": {
                    "type": "string",
                    "description": "The label for the user input."
                  }
                },
                "$ref": "#/components/schemas/rate_chain-def-defs-BaseFactorTable",
                "required": [
                  "label"
                ]
              },
              {
                "properties": {
                  "factor_table_type": {
                    "const": "SELECTED_PREMIUMS"
                  }
                },
                "$ref": "#/components/schemas/rate_chain-def-defs-BaseFactorTable"
              },
              {
                "properties": {
                  "factor_table_type": {
                    "const": "EXCLUDED_PREMIUMS"
                  }
                },
                "$ref": "#/components/schemas/rate_chain-def-defs-BaseFactorTable"
              },
              {
                "properties": {
                  "factor_table_type": {
                    "const": "PREVIOUS_PREMIUM"
                  }
                },
                "$ref": "#/components/schemas/rate_chain-def-defs-BaseFactorTable"
              },
              {
                "properties": {
                  "factor_table_type": {
                    "const": "PREVIOUS_NON_ZERO_PREMIUM"
                  }
                },
                "$ref": "#/components/schemas/rate_chain-def-defs-BaseFactorTable"
              },
              {
                "properties": {
                  "factor_table_type": {
                    "const": "CATEGORIES_ONLY"
                  }
                },
                "$ref": "#/components/schemas/rate_chain-def-defs-BaseFactorTable"
              },
              {
                "properties": {
                  "factor_table_type": {
                    "const": "CREDIT_SCORE"
                  }
                },
                "$ref": "#/components/schemas/rate_chain-def-defs-BaseFactorTable"
              }
            ]
          },
          "BaseRateTable": {
            "type": "object",
            "required": [
              "rate_table_type",
              "between_intervals",
              "round_to",
              "round_method",
              "rates",
              "categories",
              "tiers"
            ],
            "properties": {
              "rate_table_type": {
                "type": "string",
                "enum": [
                  "REMAINING_LIMIT",
                  "SELECTED_LIMITS",
                  "USER_INPUT",
                  "SELECTED_PREMIUMS",
                  "EXCLUDED_PREMIUMS",
                  "PREVIOUS_PREMIUM",
                  "PREVIOUS_NON_ZERO_PREMIUM",
                  "CREDIT_SCORE"
                ]
              },
              "between_intervals": {
                "type": "string",
                "enum": [
                  "INTERPOLATE",
                  "USE_LOWER_LIMIT",
                  "USE_UPPER_LIMIT"
                ],
                "description": "How to the interval between the rates."
              },
              "round_to": {
                "type": "string",
                "enum": [
                  "1.000000",
                  "1.00000",
                  "1.0000",
                  "1.000",
                  "1.00",
                  "1.0",
                  "1"
                ],
                "description": "The round to value for the rates."
              },
              "round_method": {
                "type": "string",
                "enum": [
                  "ROUND_HALF_UP",
                  "ROUND_CEILING",
                  "ROUND_FLOOR"
                ],
                "description": "The round method for the rates."
              },
              "rates": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/rate_chain-def-defs-MappedCategoryMapping"
                }
              },
              "categories": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "A list of category names that this rate table uses."
              },
              "tiers": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "A list of tiers."
              },
              "referenced_items": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "A list of referenced line items."
              }
            }
          },
          "RateTable": {
            "type": "object",
            "oneOf": [
              {
                "properties": {
                  "rate_table_type": {
                    "const": "REMAINING_LIMIT"
                  }
                },
                "$ref": "#/components/schemas/rate_chain-def-defs-BaseRateTable"
              },
              {
                "properties": {
                  "rate_table_type": {
                    "const": "SELECTED_LIMITS"
                  }
                },
                "$ref": "#/components/schemas/rate_chain-def-defs-BaseRateTable"
              },
              {
                "properties": {
                  "rate_table_type": {
                    "const": "USER_INPUT"
                  },
                  "label": {
                    "type": "string",
                    "description": "The label for the user input."
                  }
                },
                "$ref": "#/components/schemas/rate_chain-def-defs-BaseRateTable",
                "required": [
                  "label"
                ]
              },
              {
                "properties": {
                  "rate_table_type": {
                    "const": "SELECTED_PREMIUMS"
                  }
                },
                "$ref": "#/components/schemas/rate_chain-def-defs-BaseRateTable"
              },
              {
                "properties": {
                  "rate_table_type": {
                    "const": "EXCLUDED_PREMIUMS"
                  }
                },
                "$ref": "#/components/schemas/rate_chain-def-defs-BaseRateTable"
              },
              {
                "properties": {
                  "rate_table_type": {
                    "const": "PREVIOUS_PREMIUM"
                  }
                },
                "$ref": "#/components/schemas/rate_chain-def-defs-BaseRateTable"
              },
              {
                "properties": {
                  "rate_table_type": {
                    "const": "PREVIOUS_NON_ZERO_PREMIUM"
                  }
                },
                "$ref": "#/components/schemas/rate_chain-def-defs-BaseRateTable"
              },
              {
                "properties": {
                  "rate_table_type": {
                    "const": "CREDIT_SCORE"
                  }
                },
                "$ref": "#/components/schemas/rate_chain-def-defs-BaseRateTable"
              }
            ]
          },
          "BasePremiumBasis": {
            "type": "object",
            "required": [
              "premium_basis_type",
              "round_to",
              "round_method",
              "rates",
              "categories",
              "tiers"
            ],
            "properties": {
              "premium_basis_type": {
                "type": "string",
                "enum": [
                  "PREVIOUS_PREMIUM",
                  "PREVIOUS_NON_ZERO_PREMIUM",
                  "AGGREGATE_PREMIUM"
                ]
              },
              "round_to": {
                "type": "string",
                "enum": [
                  "1.000000",
                  "1.00000",
                  "1.0000",
                  "1.000",
                  "1.00",
                  "1.0",
                  "1"
                ],
                "description": "The round to value for the rates."
              },
              "round_method": {
                "type": "string",
                "enum": [
                  "ROUND_HALF_UP",
                  "ROUND_CEILING",
                  "ROUND_FLOOR"
                ],
                "description": "The round method for the rates."
              },
              "rates": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/rate_chain-def-defs-MappedCategoryMapping"
                }
              },
              "categories": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "A list of category names that this table uses."
              },
              "tiers": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "A list of tiers."
              }
            }
          },
          "PremiumBasis": {
            "type": "object",
            "oneOf": [
              {
                "properties": {
                  "premium_basis_type": {
                    "const": "PREVIOUS_PREMIUM"
                  }
                },
                "$ref": "#/components/schemas/rate_chain-def-defs-BasePremiumBasis"
              },
              {
                "properties": {
                  "premium_basis_type": {
                    "const": "PREVIOUS_NON_ZERO_PREMIUM"
                  }
                },
                "$ref": "#/components/schemas/rate_chain-def-defs-BasePremiumBasis"
              },
              {
                "properties": {
                  "premium_basis_type": {
                    "const": "AGGREGATE_PREMIUM"
                  }
                },
                "$ref": "#/components/schemas/rate_chain-def-defs-BasePremiumBasis"
              }
            ]
          },
          "BaseDeductible": {
            "type": "object",
            "required": [
              "deductible_type",
              "deductibles"
            ],
            "properties": {
              "deductible_type": {
                "type": "string",
                "enum": [
                  "INDEPENDENT",
                  "GROUP",
                  "EVALUATION"
                ]
              },
              "deductibles": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "amount",
                    "modification",
                    "unit"
                  ],
                  "properties": {
                    "amount": {
                      "type": "string",
                      "description": "The amount of the deductible."
                    },
                    "modification": {
                      "type": "string",
                      "description": "The modification of the deductible."
                    },
                    "unit": {
                      "type": "string",
                      "enum": [
                        "DOLLAR",
                        "FACTOR"
                      ],
                      "description": "The unit of the deductible."
                    },
                    "default": {
                      "type": "boolean",
                      "description": "The default deductible.",
                      "default": false
                    }
                  }
                }
              }
            }
          },
          "Deductible": {
            "type": "object",
            "oneOf": [
              {
                "properties": {
                  "deductible_type": {
                    "const": "INDEPENDENT"
                  },
                  "round_to": {
                    "type": "string",
                    "enum": [
                      "1.000000",
                      "1.00000",
                      "1.0000",
                      "1.000",
                      "1.00",
                      "1.0",
                      "1"
                    ],
                    "description": "The round to value for the deductible."
                  },
                  "round_method": {
                    "type": "string",
                    "enum": [
                      "ROUND_HALF_UP",
                      "ROUND_CEILING",
                      "ROUND_FLOOR"
                    ],
                    "description": "The round method for the deductible."
                  }
                },
                "$ref": "#/components/schemas/rate_chain-def-defs-BaseDeductible",
                "required": [
                  "round_to",
                  "round_method"
                ]
              },
              {
                "properties": {
                  "deductible_type": {
                    "const": "GROUP"
                  },
                  "deductible_group_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "The ID of the deductible group."
                  }
                },
                "$ref": "#/components/schemas/rate_chain-def-defs-BaseDeductible",
                "required": [
                  "deductible_group_id"
                ]
              },
              {
                "properties": {
                  "deductible_type": {
                    "const": "EVALUATION"
                  },
                  "eval_code": {
                    "type": "string",
                    "description": "The evaluation code for the deductible."
                  }
                },
                "$ref": "#/components/schemas/rate_chain-def-defs-BaseDeductible",
                "required": [
                  "eval_code"
                ]
              }
            ]
          },
          "MinimumPremium": {
            "type": "object",
            "required": [
              "minimum_premium_type",
              "categories",
              "rates"
            ],
            "properties": {
              "minimum_premium_type": {
                "type": "string",
                "enum": [
                  "AGGREGATE_PREMIUM",
                  "EXCLUDED_PREMIUMS",
                  "SELECTED_PREMIUMS"
                ]
              },
              "categories": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "A list of category names that this minimum premium object uses."
              },
              "rates": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/rate_chain-def-defs-MappedCategoryMapping"
                },
                "description": "A list of objects that represents the rates for the categories in `categories`."
              },
              "referenced_items": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "A list of referenced policy type items."
              }
            }
          },
          "MaximumPremium": {
            "type": "object",
            "required": [
              "maximum_premium_type",
              "categories",
              "rates"
            ],
            "properties": {
              "maximum_premium_type": {
                "type": "string",
                "enum": [
                  "AGGREGATE_PREMIUM",
                  "EXCLUDED_PREMIUMS",
                  "SELECTED_LIMITS"
                ]
              },
              "categories": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "A list of category names that this maximum premium object uses."
              },
              "rates": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/rate_chain-def-defs-MappedCategoryMapping"
                },
                "description": "A list of objects that represents the rates for the categories in `categories`."
              },
              "referenced_items": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "A list of referenced policy type items."
              }
            }
          },
          "Evaluation": {
            "type": "object",
            "properties": {
              "eval_code": {
                "type": "string",
                "description": "Python code for the evaluation."
              },
              "assignment": {
                "type": "string",
                "enum": [
                  "NEW_VARIABLE",
                  "PREMIUM"
                ]
              },
              "final": {
                "type": "boolean",
                "description": "Whether this is the final premium."
              },
              "new_var_name": {
                "type": "string",
                "description": "The new variable name for the evaluation result."
              }
            },
            "required": [
              "eval_code",
              "assignment",
              "final"
            ]
          },
          "BaseLimit": {
            "type": "object",
            "required": [
              "limit_type",
              "unit",
              "round",
              "source"
            ],
            "properties": {
              "limit_type": {
                "type": "string",
                "enum": [
                  "USER_ENTERED",
                  "USER_CHOSEN",
                  "SYSTEM_AUTOMATIC",
                  "SPLIT_USER_ENTERED",
                  "SPLIT_USER_CHOSEN",
                  "SPLIT_SYSTEM_AUTOMATIC"
                ]
              },
              "unit": {
                "type": "string",
                "description": "The unit of the limit."
              },
              "round": {
                "type": "string",
                "enum": [
                  "1.000000",
                  "1.00000",
                  "1.0000",
                  "1.000",
                  "1.00",
                  "1.0",
                  "1"
                ],
                "description": "The round to value for the limit."
              },
              "set_limit_to_min": {
                "type": "boolean",
                "description": "Whether to set the limit to the minimum automatically.",
                "default": false
              }
            }
          },
          "LimitNested": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "NONE",
                  "FIXED",
                  "FACTOR",
                  "EVALUATION"
                ]
              },
              "amount": {
                "type": "string",
                "description": "The amount of the limit."
              },
              "min_limit_line_item_ref_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "description": "A list of entered min limit line item reference ids."
              },
              "max_limit_line_item_ref_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "description": "A list of entered max limit line item reference ids."
              },
              "shared_limits": {
                "type": "boolean",
                "description": "Whether the limits are shared."
              },
              "eval_code": {
                "type": "string",
                "description": "Python code for the evaluation."
              },
              "name": {
                "type": "string",
                "description": "The name of the user chosen limit."
              },
              "limits": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "The name of the user chosen limit."
                    },
                    "limits": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "A list user chosen of limits."
                    }
                  }
                },
                "description": "A list of user chosen limits."
              },
              "default_limit_row": {
                "type": "string",
                "description": "The default limit row for chosen limits."
              }
            },
            "required": [
              "type",
              "amount"
            ]
          },
          "Limit": {
            "type": "object",
            "oneOf": [
              {
                "properties": {
                  "limit_type": {
                    "const": "USER_ENTERED"
                  },
                  "source": {
                    "type": "object",
                    "properties": {
                      "minimum": {
                        "type": "object",
                        "$ref": "#/components/schemas/rate_chain-def-defs-LimitNested"
                      },
                      "maximum": {
                        "type": "object",
                        "$ref": "#/components/schemas/rate_chain-def-defs-LimitNested"
                      }
                    },
                    "required": [
                      "minimum",
                      "maximum"
                    ]
                  }
                },
                "$ref": "#/components/schemas/rate_chain-def-defs-BaseLimit",
                "required": [
                  "source"
                ]
              },
              {
                "properties": {
                  "limit_type": {
                    "const": "USER_CHOSEN"
                  },
                  "source": {
                    "type": "object",
                    "$ref": "#/components/schemas/rate_chain-def-defs-LimitNested"
                  }
                },
                "$ref": "#/components/schemas/rate_chain-def-defs-BaseLimit",
                "required": [
                  "source"
                ]
              },
              {
                "properties": {
                  "limit_type": {
                    "const": "SYSTEM_AUTOMATIC"
                  },
                  "source": {
                    "type": "object",
                    "$ref": "#/components/schemas/rate_chain-def-defs-LimitNested"
                  }
                },
                "$ref": "#/components/schemas/rate_chain-def-defs-BaseLimit",
                "required": [
                  "source"
                ]
              }
            ]
          },
          "BaseRatePer": {
            "type": "object",
            "properties": {
              "rate_per_type": {
                "type": "string",
                "enum": [
                  "REMAINING_LIMIT",
                  "SELECTED_LIMITS",
                  "SELECTED_PREMIUMS",
                  "EXCLUDED_PREMIUMS",
                  "PREVIOUS_PREMIUM",
                  "PREVIOUS_NON_ZERO_PREMIUM",
                  "AGGREGATE_PREMIUM",
                  "USER_INPUT",
                  "SELF_LIMIT"
                ]
              },
              "round_to": {
                "type": "string",
                "enum": [
                  "1.000000",
                  "1.00000",
                  "1.0000",
                  "1.000",
                  "1.00",
                  "1.0",
                  "1"
                ],
                "description": "The round to value for the rates."
              },
              "round_method": {
                "type": "string",
                "enum": [
                  "ROUND_HALF_UP",
                  "ROUND_CEILING",
                  "ROUND_FLOOR"
                ],
                "description": "The round method for the rates."
              },
              "rates": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/rate_chain-def-defs-MappedCategoryMapping"
                }
              },
              "categories": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "A list of category names that this rate per object uses."
              },
              "same_for_all": {
                "type": "boolean",
                "description": "Whether the rate per is the same for all.",
                "default": false
              },
              "referenced_items": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "A list of referenced policy type items."
              }
            }
          },
          "RatePer": {
            "type": "object",
            "oneOf": [
              {
                "properties": {
                  "type": {
                    "const": "REMAINING_LIMIT"
                  }
                },
                "$ref": "#/components/schemas/rate_chain-def-defs-BaseRatePer"
              },
              {
                "properties": {
                  "type": {
                    "const": "SELECTED_LIMITS"
                  }
                },
                "$ref": "#/components/schemas/rate_chain-def-defs-BaseRatePer"
              },
              {
                "properties": {
                  "type": {
                    "const": "SELECTED_PREMIUMS"
                  }
                },
                "$ref": "#/components/schemas/rate_chain-def-defs-BaseRatePer"
              },
              {
                "properties": {
                  "type": {
                    "const": "EXCLUDED_PREMIUMS"
                  }
                },
                "$ref": "#/components/schemas/rate_chain-def-defs-BaseRatePer"
              },
              {
                "properties": {
                  "type": {
                    "const": "PREVIOUS_PREMIUM"
                  }
                },
                "$ref": "#/components/schemas/rate_chain-def-defs-BaseRatePer"
              },
              {
                "properties": {
                  "type": {
                    "const": "PREVIOUS_NON_ZERO_PREMIUM"
                  }
                },
                "$ref": "#/components/schemas/rate_chain-def-defs-BaseRatePer"
              },
              {
                "properties": {
                  "type": {
                    "const": "AGGREGATE_PREMIUM"
                  }
                },
                "$ref": "#/components/schemas/rate_chain-def-defs-BaseRatePer"
              },
              {
                "properties": {
                  "type": {
                    "const": "SELF_LIMIT"
                  }
                },
                "$ref": "#/components/schemas/rate_chain-def-defs-BaseRatePer"
              },
              {
                "properties": {
                  "type": {
                    "const": "USER_INPUT"
                  },
                  "label": {
                    "type": "string",
                    "description": "The label for the user input."
                  },
                  "default_value": {
                    "type": "string",
                    "description": "The default value for the user input.",
                    "default": ""
                  },
                  "validation": {
                    "type": "string",
                    "enum": [
                      "NONE",
                      "DATE",
                      "PERCENTAGE",
                      "NON_NEGATIVE_INTEGER",
                      "POSITIVE_INTEGER",
                      "NON_POSITIVE_INTEGER",
                      "NEGATIVE_INTEGER",
                      "DECIMAL_NUMBER",
                      "INTEGER"
                    ],
                    "default": "NONE"
                  },
                  "date_prior_than_effective_date": {
                    "type": "boolean",
                    "description": "Whether the date prior than the effective date is required.",
                    "default": false
                  },
                  "date_greater_than_effective_date": {
                    "type": "boolean",
                    "description": "Whether the date greater than the effective date is required.",
                    "default": false
                  },
                  "date_is_required": {
                    "type": "boolean",
                    "description": "Whether the date is required.",
                    "default": false
                  },
                  "decimal_precision": {
                    "type": "string",
                    "description": "The decimal precision for the user input.",
                    "default": "1"
                  }
                },
                "$ref": "#/components/schemas/rate_chain-def-defs-BaseRatePer"
              }
            ]
          }
        }
      },
      "reinstatement_reason-def": {
        "title": "ReinstatementReason",
        "description": "Reinstatement reason for a policy life cycle",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "policy_life_cycle_id": {
            "type": "string",
            "format": "uuid"
          },
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "policy_life_cycle_id",
          "reason"
        ]
      },
      "request-activate_copilot_skill": {
        "type": "object",
        "description": "Request schema for /api/v2/copilot_skills/activate_copilot_skill",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the copilot skill to activate"
          }
        },
        "required": [
          "id"
        ]
      },
      "request-add_brand": {
        "type": "object",
        "description": "Request payload for /api/v2/brands/add_brand",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 100,
            "description": "Brand name"
          },
          "logo_file_id": {
            "type": "string",
            "description": "File ID for the brand logo"
          },
          "signature_file_id": {
            "type": "string",
            "description": "File ID for the brand signature"
          },
          "header_line_1": {
            "type": "string",
            "description": "Header line 1"
          },
          "header_line_2": {
            "type": "string",
            "description": "Header line 2"
          },
          "header_line_3": {
            "type": "string",
            "description": "Header line 3"
          },
          "header_line_4": {
            "type": "string",
            "description": "Header line 4"
          },
          "active": {
            "type": "boolean",
            "default": true,
            "description": "Whether the brand is active"
          }
        },
        "required": [
          "name"
        ]
      },
      "request-add_contact_to_role": {
        "description": "Request payload for /api/v2/contacts/add_contact_to_role",
        "type": "object",
        "properties": {
          "contact_id": {
            "type": "string",
            "description": "The unique identifier of the contact"
          },
          "role_name": {
            "type": "string",
            "description": "The name of the role to add the contact to"
          }
        },
        "required": [
          "id",
          "role_name"
        ]
      },
      "request-add_recovery": {
        "description": "Request payload for /api/v2/claim_exposures/add_recovery",
        "type": "object",
        "properties": {
          "api_key": {
            "type": "string",
            "description": "API key for authentication"
          },
          "recovery_details": {
            "type": "object",
            "description": "The recovery object ClaimExposureRecoveryModel",
            "properties": {
              "exposure_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "ID of the exposure (optional if claim_id is provided)"
              },
              "claim_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "ID of the claim (optional if exposure_id is provided)"
              },
              "category": {
                "type": "string",
                "description": "Recovery category (e.g., reinsurance, subrogation, etc.)"
              },
              "amount": {
                "type": "number",
                "description": "Recovery amount"
              },
              "description": {
                "type": "string",
                "description": "Description of the recovery"
              },
              "date": {
                "type": "string",
                "anyOf": [
                  {
                    "format": "date",
                    "description": "A YYYY-MM-DD calendar day, stored as-is. This is what the UI sends."
                  },
                  {
                    "format": "date-time",
                    "description": "An ISO 8601 date-time. Its America/Chicago calendar day is stored (BC-24141)."
                  }
                ],
                "description": "Date of the recovery transaction"
              }
            },
            "required": [
              "category",
              "amount",
              "description",
              "date"
            ]
          }
        },
        "required": [
          "api_key",
          "recovery_details"
        ]
      },
      "request-add_recovery_reserve": {
        "description": "Request payload for /api/v2/claim_exposures/add_recovery_reserve",
        "type": "object",
        "properties": {
          "api_key": {
            "type": "string",
            "description": "API key for authentication"
          },
          "recovery_reserve_details": {
            "type": "object",
            "description": "The recovery reserve object ClaimExposureRecoveryReserveModel",
            "properties": {
              "exposure_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "ID of the exposure (optional if claim_id is provided)"
              },
              "claim_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "ID of the claim (optional if exposure_id is provided)"
              },
              "reinsurance_amount": {
                "type": "number",
                "description": "Reinsurance recovery reserve amount"
              },
              "reinsurancelae_amount": {
                "type": "number",
                "description": "Reinsurance LAE recovery reserve amount"
              },
              "salvage_amount": {
                "type": "number",
                "description": "Salvage recovery reserve amount"
              },
              "subrogation_amount": {
                "type": "number",
                "description": "Subrogation recovery reserve amount"
              },
              "transaction_date": {
                "type": "string",
                "anyOf": [
                  {
                    "format": "date",
                    "description": "A YYYY-MM-DD calendar day, stored as-is."
                  },
                  {
                    "format": "date-time",
                    "description": "An ISO 8601 date-time. Its America/Chicago calendar day is stored (BC-24141)."
                  }
                ],
                "description": "Date of the transaction"
              }
            },
            "required": [
              "reinsurance_amount",
              "reinsurancelae_amount",
              "salvage_amount",
              "subrogation_amount",
              "transaction_date"
            ]
          }
        },
        "required": [
          "api_key",
          "recovery_reserve_details"
        ]
      },
      "request-add_template_to_policy_type": {
        "type": "object",
        "description": "Request schema for /api/v2/quick_quote_templates/add_template_to_policy_type",
        "properties": {
          "policy_type_id": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of the policy type"
          },
          "quick_quote_template_id": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of the Quick Quote Template to associate"
          }
        },
        "required": [
          "policy_type_id",
          "quick_quote_template_id"
        ]
      },
      "request-agents_agent_config": {
        "type": "object",
        "description": "Request schema for agents/agent_config \u2014 fetch runtime UI configuration for the agent identified by `agent`.",
        "properties": {
          "agent": {
            "type": "string",
            "description": "Frontend chat-mode key identifying the target agent (mapped server-side to the internal agent name).",
            "enum": [
              "insured",
              "adjuster",
              "dashboard",
              "lines",
              "rules",
              "quote",
              "document_templates"
            ],
            "example": "rules"
          }
        },
        "required": [
          "agent"
        ]
      },
      "request-agents_agent_create_job": {
        "type": "object",
        "description": "Request schema for agents/agent_create_job \u2014 create an async job for the agent identified by `agent`. Only agents that expose jobs are valid. Per-agent validation is applied server-side (e.g. the Rules agent requires context.policy_type_id).",
        "properties": {
          "agent": {
            "type": "string",
            "description": "Frontend chat-mode key identifying the target agent. Only agents that expose async jobs are valid.",
            "enum": [
              "lines",
              "rules"
            ],
            "example": "rules"
          },
          "job_name": {
            "type": "string",
            "description": "Type of job to execute.",
            "example": "INGEST_RULES_SPREADSHEET"
          },
          "prompt": {
            "type": "string",
            "description": "User instructions for the job.",
            "example": "Import underwriting rules for Auto, effective Jan 1, 2026"
          },
          "context": {
            "type": "object",
            "description": "Additional context parameters. For the Rules agent, policy_type_id is required (enforced server-side); for the Lines agent it is optional.",
            "properties": {
              "policy_type_id": {
                "type": "string",
                "format": "uuid",
                "description": "Policy type the rules apply to (required for rules ingestion)."
              },
              "policy_type_name": {
                "type": "string",
                "description": "Policy type display name."
              },
              "line_id": {
                "type": "string",
                "format": "uuid",
                "description": "Line ID."
              },
              "line_name": {
                "type": "string",
                "description": "Line name."
              },
              "effective_date_id": {
                "type": "string",
                "format": "uuid",
                "description": "Effective date ID."
              },
              "effective_date": {
                "type": "string",
                "description": "Effective date display value."
              },
              "location_id": {
                "type": "string",
                "format": "uuid",
                "description": "Business location / state ID."
              },
              "location": {
                "type": "string",
                "description": "Location display value."
              },
              "document_name": {
                "type": "string",
                "description": "Optional source document name (PDF jobs only)."
              }
            },
            "additionalProperties": true
          },
          "files": {
            "type": "array",
            "description": "File attachments for processing.",
            "items": {
              "type": "object",
              "properties": {
                "filename": {
                  "type": "string",
                  "description": "Original filename.",
                  "example": "underwriting_rules.xlsx"
                },
                "content": {
                  "type": "string",
                  "description": "Base64-encoded file content."
                },
                "content_type": {
                  "type": "string",
                  "description": "MIME type of the file.",
                  "example": "application/pdf"
                }
              },
              "required": [
                "filename",
                "content",
                "content_type"
              ]
            }
          }
        },
        "required": [
          "agent",
          "job_name",
          "prompt"
        ]
      },
      "request-agents_agent_delete_session": {
        "type": "object",
        "description": "Request schema for agents/agent_delete_session \u2014 delete a conversation and its message history for the agent identified by `agent`.",
        "properties": {
          "agent": {
            "type": "string",
            "description": "Frontend chat-mode key identifying the target agent (mapped server-side to the internal agent name).",
            "enum": [
              "insured",
              "adjuster",
              "dashboard",
              "lines",
              "rules",
              "quote",
              "document_templates"
            ],
            "example": "rules"
          },
          "session_id": {
            "type": "string",
            "description": "Session identifier to delete."
          }
        },
        "required": [
          "agent",
          "session_id"
        ]
      },
      "request-agents_agent_get_job": {
        "type": "object",
        "description": "Request schema for agents/agent_get_job \u2014 fetch a single job for the agent identified by `agent`.",
        "properties": {
          "agent": {
            "type": "string",
            "description": "Frontend chat-mode key identifying the target agent. Only agents that expose async jobs are valid.",
            "enum": [
              "lines",
              "rules"
            ],
            "example": "rules"
          },
          "job_id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the job to retrieve."
          }
        },
        "required": [
          "agent",
          "job_id"
        ]
      },
      "request-agents_agent_list_jobs": {
        "type": "object",
        "description": "Request schema for agents/agent_list_jobs \u2014 list jobs for the agent identified by `agent`.",
        "properties": {
          "agent": {
            "type": "string",
            "description": "Frontend chat-mode key identifying the target agent. Only agents that expose async jobs are valid.",
            "enum": [
              "lines",
              "rules"
            ],
            "example": "rules"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "running",
              "paused",
              "completed",
              "failed"
            ],
            "description": "Filter by job status."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000,
            "default": 100,
            "description": "Maximum number of jobs to return."
          }
        },
        "required": [
          "agent"
        ]
      },
      "request-agents_agent_resume_job": {
        "type": "object",
        "description": "Request schema for agents/agent_resume_job \u2014 resume a paused job for the agent identified by `agent`.",
        "properties": {
          "agent": {
            "type": "string",
            "description": "Frontend chat-mode key identifying the target agent. Only agents that expose async jobs are valid.",
            "enum": [
              "lines",
              "rules"
            ],
            "example": "rules"
          },
          "job_id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the paused job to resume."
          },
          "message": {
            "type": "string",
            "description": "Free text response (for free_text input type)."
          },
          "selected_option": {
            "type": "string",
            "description": "ID of selected option (for form_selection input type).",
            "example": "HO-3"
          },
          "data": {
            "type": "object",
            "description": "Freeform data (for missing_data input type).",
            "additionalProperties": true
          }
        },
        "required": [
          "agent",
          "job_id"
        ]
      },
      "request-agents_agent_session_messages": {
        "type": "object",
        "description": "Request schema for agents/agent_session_messages \u2014 load the message history of a single conversation for the agent identified by `agent`.",
        "properties": {
          "agent": {
            "type": "string",
            "description": "Frontend chat-mode key identifying the target agent (mapped server-side to the internal agent name).",
            "enum": [
              "insured",
              "adjuster",
              "dashboard",
              "lines",
              "rules",
              "quote",
              "document_templates"
            ],
            "example": "rules"
          },
          "session_id": {
            "type": "string",
            "description": "Session identifier whose messages should be returned."
          }
        },
        "required": [
          "agent",
          "session_id"
        ]
      },
      "request-agents_agent_sessions": {
        "type": "object",
        "description": "Request schema for agents/agent_sessions \u2014 list conversation sessions for the agent identified by `agent`.",
        "properties": {
          "agent": {
            "type": "string",
            "description": "Frontend chat-mode key identifying the target agent (mapped server-side to the internal agent name).",
            "enum": [
              "insured",
              "adjuster",
              "dashboard",
              "lines",
              "rules",
              "quote",
              "document_templates"
            ],
            "example": "rules"
          },
          "limit": {
            "type": "integer",
            "description": "Maximum number of sessions to return (defaults to 100).",
            "minimum": 1,
            "maximum": 1000,
            "example": 100
          }
        },
        "required": [
          "agent"
        ]
      },
      "request-agents_agent_status": {
        "type": "object",
        "description": "Request schema for agents/agent_status \u2014 whether the agent identified by `agent` is available to the caller.",
        "properties": {
          "agent": {
            "type": "string",
            "description": "Frontend chat-mode key identifying the target agent (mapped server-side to the internal agent name).",
            "enum": [
              "insured",
              "adjuster",
              "dashboard",
              "lines",
              "rules",
              "quote",
              "document_templates"
            ],
            "example": "quote"
          }
        },
        "required": [
          "agent"
        ]
      },
      "request-agents_report_copilot_attach_entity": {
        "type": "object",
        "description": "Request schema for agents/report_copilot_attach_entity \u2014 attach an opaque (entity_type, entity_id) tag to a Report Copilot conversation. Idempotent on the AIAgents side via INSERT IGNORE; re-attaching the same triple is a no-op.",
        "properties": {
          "session_id": {
            "type": "string",
            "description": "Session identifier of the conversation to attach to."
          },
          "entity_type": {
            "type": "string",
            "description": "Opaque external entity type owned by the calling agent (e.g. 'report' for the Report Copilot saved-report use case). Max 64 chars.",
            "minLength": 1,
            "maxLength": 64,
            "example": "report"
          },
          "entity_id": {
            "type": "string",
            "description": "Opaque external entity id (e.g. the BriteCore report uuid). Max 128 chars.",
            "minLength": 1,
            "maxLength": 128
          }
        },
        "required": [
          "session_id",
          "entity_type",
          "entity_id"
        ]
      },
      "request-agents_report_copilot_capabilities": {
        "type": "object",
        "description": "Request schema for agents/report_copilot_capabilities \u2014 probe the report-agent runtime capability flags so the SQL Editor can adapt its UI. Takes no parameters beyond the API key required by every v2 agents endpoint.",
        "properties": {}
      },
      "request-agents_report_copilot_client_error": {
        "type": "object",
        "description": "Request schema for agents/report_copilot_client_error - count one error the Report Copilot UI actually displayed to a user. Most error sites in the SQL editor never reach the server (a failed fetch, an oversized attachment, a FileReader failure, an unparseable migration response), so this counter is fed from the browser rather than derived from the streaming proxy. Fire-and-forget: the browser has already rendered the error and ignores the response.",
        "properties": {
          "error_class": {
            "type": "string",
            "description": "Which user-visible error site this was. Any value is accepted: one outside the recognised set below is recorded as 'other' rather than rejected, so a frontend that adds a site before the backend knows about it still counts. Recognised values: agent_frame, stream_connection, request_failed, file_too_large, file_read_failed, migration_response_invalid, other.",
            "example": "stream_connection"
          },
          "failure_class": {
            "type": [
              "string",
              "null"
            ],
            "description": "Only read for 'agent_frame', where the browser echoes back the class the proxy put on the error frame. Same key and closed set as the proxy turn metric's failure_class, so the two series join. Anything else is bounded to 'other', an unparseable value to 'invalid'.",
            "maxLength": 64,
            "example": "post_timeout"
          },
          "upstream_failure_class": {
            "type": [
              "string",
              "null"
            ],
            "description": "Only read for 'agent_frame', where the browser echoes back the class the agent assigned. Present only when the failure originated upstream rather than in the proxy. Bounded to the agent's own closed set.",
            "maxLength": 64,
            "example": "recursion_limit"
          }
        },
        "required": [
          "error_class"
        ]
      },
      "request-agents_report_copilot_delete_session": {
        "type": "object",
        "description": "Request schema for agents/report_copilot_delete_session \u2014 delete a conversation and its message history.",
        "properties": {
          "session_id": {
            "type": "string",
            "description": "Session identifier to delete."
          }
        },
        "required": [
          "session_id"
        ]
      },
      "request-agents_report_copilot_session_messages": {
        "type": "object",
        "description": "Request schema for agents/report_copilot_session_messages \u2014 load the message history of a single conversation.",
        "properties": {
          "session_id": {
            "type": "string",
            "description": "Session identifier whose messages should be returned."
          }
        },
        "required": [
          "session_id"
        ]
      },
      "request-agents_report_copilot_session_state": {
        "type": "object",
        "description": "Request schema for agents/report_copilot_session_state \u2014 fetch the UI-restore payload for a single conversation so the Report Copilot frontend can redraw its phase pills, report plan, per-sheet SQL, and validation flags on reload or conversation switch.",
        "properties": {
          "session_id": {
            "type": "string",
            "description": "Session identifier whose state snapshot should be returned."
          }
        },
        "required": [
          "session_id"
        ]
      },
      "request-agents_report_copilot_sessions": {
        "type": "object",
        "description": "Request schema for agents/report_copilot_sessions \u2014 list conversation sessions for the Report Copilot agent. Optional entity_type+entity_id filter restricts the listing to conversations attached to that external entity (e.g. all chats for a saved report).",
        "properties": {
          "limit": {
            "type": "integer",
            "description": "Maximum number of sessions to return (defaults to 100).",
            "minimum": 1,
            "maximum": 1000,
            "example": 100
          },
          "entity_type": {
            "type": "string",
            "description": "Optional opaque entity type to filter by (e.g. 'report'). Must be supplied with entity_id.",
            "minLength": 1,
            "maxLength": 64,
            "example": "report"
          },
          "entity_id": {
            "type": "string",
            "description": "Optional opaque entity id to filter by, paired with entity_type.",
            "minLength": 1,
            "maxLength": 128
          }
        },
        "dependentRequired": {
          "entity_type": [
            "entity_id"
          ],
          "entity_id": [
            "entity_type"
          ]
        }
      },
      "request-approve_pending_payment": {
        "description": "Request schema for /api/v2/payments/approve_pending_payment",
        "type": "object",
        "properties": {
          "payment_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Unique identifier for the payment to approve. Exactly one of payment_id or reference_id must be provided."
          },
          "reference_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "External reference identifier for the payment to approve. Exactly one of payment_id or reference_id must be provided."
          },
          "integration_instance_external_id": {
            "type": "string",
            "description": "External ID of the integration instance."
          },
          "set_reference_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional reference ID to set on the payment."
          },
          "settlement_date_time": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Date and time when the payment was settled."
          },
          "vendor_processing_fee_in_cents": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "description": "Optional processing fee charged by the vendor in cents."
          }
        },
        "required": [
          "integration_instance_external_id"
        ]
      },
      "request-archive_copilot_skill": {
        "type": "object",
        "description": "Request schema for /api/v2/copilot_skills/archive_copilot_skill",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the copilot skill to archive"
          }
        },
        "required": [
          "id"
        ]
      },
      "request-assign_business_location": {
        "type": "object",
        "description": "Request payload for /api/v2/brands/assign_business_location",
        "properties": {
          "brand_id": {
            "type": "string",
            "description": "Brand identifier"
          },
          "location_id": {
            "type": "string",
            "description": "Business location identifier"
          }
        },
        "required": [
          "brand_id",
          "location_id"
        ]
      },
      "request-assign_policy_contact": {
        "type": "object",
        "description": "Request payload for /api/v2/contacts/assign_policy_contact",
        "properties": {
          "policy_id": {
            "type": "string",
            "format": "uuid",
            "description": "The policy ID to assign the contact to"
          },
          "contact_id": {
            "type": "string",
            "format": "uuid",
            "description": "The contact ID to assign to the policy"
          },
          "role": {
            "type": "string",
            "enum": [
              "Agency Contact",
              "Surplus Line Producer"
            ],
            "description": "The role of the contact in the policy"
          }
        },
        "required": [
          "policy_id",
          "contact_id",
          "role"
        ]
      },
      "request-assign_policy_type_definition": {
        "type": "object",
        "description": "Request payload for /api/v2/brands/assign_policy_type_definition",
        "properties": {
          "brand_id": {
            "type": "string",
            "description": "Brand identifier"
          },
          "location_id": {
            "type": "string",
            "description": "Business location identifier"
          },
          "policy_type_definition_id": {
            "type": "string",
            "description": "Policy type definition identifier"
          }
        },
        "required": [
          "brand_id",
          "location_id",
          "policy_type_definition_id"
        ]
      },
      "request-assign_quote_contact": {
        "type": "object",
        "description": "Request payload for /api/v2/contacts/assign_quote_contact",
        "properties": {
          "quote_id": {
            "type": "string",
            "format": "uuid",
            "description": "The quote ID to assign the contact to."
          },
          "contact_id": {
            "type": "string",
            "format": "uuid",
            "description": "The contact ID to assign to the quote"
          },
          "role": {
            "type": "string",
            "enum": [
              "Named Insured",
              "Driver",
              "Agent",
              "Creator",
              "Finance Company",
              "Underwriter"
            ],
            "description": "The role of the contact in the quote. Additional Interest roles are configured on Settings > Policies page."
          }
        },
        "required": [
          "quote_id",
          "contact_id",
          "role"
        ]
      },
      "request-assign_risk_contact": {
        "type": "object",
        "description": "Request payload for /api/v2/contacts/assign_risk_contact",
        "properties": {
          "risk_id": {
            "type": "string",
            "format": "uuid",
            "description": "The risk ID to assign the contact to"
          },
          "contact_id": {
            "type": "string",
            "format": "uuid",
            "description": "The contact ID to assign to the risk"
          },
          "role": {
            "type": "string",
            "enum": [
              "Mortgagee",
              "Inspector",
              "Driver",
              "Tenant"
            ],
            "description": "The role of the contact in the risk"
          }
        },
        "required": [
          "risk_id",
          "contact_id",
          "role"
        ]
      },
      "request-attach_file": {
        "description": "Request payload for /api/v2/uploads/attach_file.",
        "type": "object",
        "properties": {
          "entity_id": {
            "type": "string",
            "format": "uuid",
            "description": "Entity ID to attach the file to. The id must be for an entity of the type specified in entity_type."
          },
          "entity_type": {
            "type": "string",
            "enum": [
              "policies",
              "revisions",
              "subjectivities"
            ],
            "description": "Defines the entity type to attach the file to. If revisions is used, the File will be linked to the entity_id."
          },
          "folder_name": {
            "type": "string",
            "description": "Folder name to attach file to. The folder will be created under the policy if it does not exist."
          },
          "attachment": {
            "type": "string",
            "description": "Base64 encoded file content"
          },
          "title": {
            "type": "string",
            "description": "File name."
          },
          "mime_type": {
            "type": "string",
            "description": "File MIME type. Example: application/pdf"
          },
          "set_file_private": {
            "type": "boolean",
            "description": "If true, set the file to private. Defaults to False."
          },
          "set_folder_private_if_new": {
            "type": "boolean",
            "description": "If true, set the folder to private if the folder does not already exist. Defaults to False."
          },
          "date_added": {
            "type": "string",
            "format": "date-time",
            "description": "Set when the file was added. Defaults to now. Format: YYYY-mm-ddTHH:MM:SSZ  (e.g. 2020-01-01T12:00:00Z). This is UTC time."
          }
        },
        "required": [
          "entity_id",
          "entity_type",
          "folder_name",
          "attachment",
          "title",
          "mime_type"
        ]
      },
      "request-attach_file_to_brand": {
        "description": "Request payload for /api/v2/brands/attach_file.",
        "type": "object",
        "properties": {
          "brand_id": {
            "type": "string",
            "format": "uuid",
            "description": "Brand ID to attach the file to"
          },
          "attachment": {
            "type": "string",
            "description": "Base64 encoded file content"
          },
          "file_type": {
            "type": "string",
            "enum": [
              "logo",
              "signature"
            ],
            "description": "Type of file to attach"
          },
          "mime_type": {
            "type": "string",
            "enum": [
              "image/jpeg",
              "image/gif",
              "image/png"
            ],
            "description": "MIME type of the file"
          }
        },
        "required": [
          "brand_id",
          "attachment",
          "file_type",
          "mime_type"
        ]
      },
      "request-attach_form_to_policy_type": {
        "description": "Request payload for /api/v2/lines/attach_form_to_policy_type.",
        "type": "object",
        "properties": {
          "policy_type_id": {
            "type": "string",
            "format": "uuid",
            "description": "Policy Type to attach the form to."
          },
          "file_name": {
            "type": "string",
            "description": "File name, stored as the File record's title."
          },
          "file_base64": {
            "type": "string",
            "description": "Base64 encoded file content. Limited to 10MB decoded."
          },
          "mime_type": {
            "type": "string",
            "description": "File MIME type. Defaults to application/pdf."
          },
          "metadata": {
            "type": "object",
            "description": "Print-flag metadata. Only the 7 policy-type-level fields are accepted (PolicyTypeFormMetadataSchema) - item-only fields are not declared on this schema and are dropped, not persisted.",
            "properties": {
              "form_code": {
                "type": "string"
              },
              "edition_number": {
                "type": "string"
              },
              "description": {
                "type": "string"
              },
              "suppress_printing": {
                "type": "boolean"
              },
              "always_print_on_renewal": {
                "type": "boolean"
              },
              "always_print_on_endorsement": {
                "type": "boolean"
              },
              "mortgagee_types": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        },
        "required": [
          "policy_type_id",
          "file_name",
          "file_base64"
        ]
      },
      "request-attach_form_to_policy_type_item": {
        "description": "Request payload for /api/v2/lines/attach_form_to_policy_type_item.",
        "type": "object",
        "properties": {
          "policy_type_item_id": {
            "type": "string",
            "format": "uuid",
            "description": "Policy Type Item to attach the form to."
          },
          "file_name": {
            "type": "string",
            "description": "File name, stored as the File record's title."
          },
          "file_base64": {
            "type": "string",
            "description": "Base64 encoded file content. Limited to 10MB decoded."
          },
          "mime_type": {
            "type": "string",
            "description": "File MIME type. Defaults to application/pdf."
          },
          "metadata": {
            "type": "object",
            "description": "Print-flag metadata. All 14 fields are accepted (PolicyTypeItemFormMetadataSchema).",
            "properties": {
              "form_code": {
                "type": "string"
              },
              "edition_number": {
                "type": "string"
              },
              "description": {
                "type": "string"
              },
              "suppress_printing": {
                "type": "boolean"
              },
              "always_print_on_renewal": {
                "type": "boolean"
              },
              "always_print_on_endorsement": {
                "type": "boolean"
              },
              "mortgagee_types": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "conditional_print": {
                "type": "boolean"
              },
              "conditional_values": {
                "type": "object"
              },
              "notice_to_policy_holder": {
                "type": "boolean"
              },
              "ntp_start_date": {
                "type": "string",
                "format": "date"
              },
              "ntp_end_date": {
                "type": "string",
                "format": "date"
              },
              "conditional_premium_print": {
                "type": "boolean"
              },
              "conditional_premium_select": {
                "type": "string",
                "enum": [
                  "gt",
                  "gte",
                  "eq",
                  "neq",
                  "lte",
                  "lt"
                ]
              }
            }
          }
        },
        "required": [
          "policy_type_item_id",
          "file_name",
          "file_base64"
        ]
      },
      "request-auth_session": {
        "description": "Request payload for /api/v2/auth/session. Authenticate with api_key in the body, the api key in the Authorization header (sites without BriteAuth), or a session cookie previously minted by this endpoint; the gateway consumes api_key before dispatch, so the handler itself takes no parameters.",
        "type": "object",
        "properties": {
          "api_key": {
            "type": "string",
            "description": "The caller's api key. Optional when the key is sent in the Authorization header or a minted session cookie is presented."
          }
        },
        "required": []
      },
      "request-auto_assign_claim": {
        "type": "object",
        "description": "Request Schema for /api/v2/claims/auto_assign_claim",
        "properties": {
          "claim_id": {
            "type": "string",
            "format": "uuid",
            "description": "Claim ID"
          }
        }
      },
      "request-batch_export_payments": {
        "type": "object",
        "description": "Request payload for /api/v2/commissions/batch_export_payments (BC-22436, Story C). Exports commission payments for issuance: on a site with an active ACH_ISSUANCE integration instance the ACH-eligible subset is CLAIMED (a pending disbursement attempt per obligation) and dispatched through the outbound-disbursement engine; the structural remainder flows the legacy commission writer. With zero active instances everything flows the legacy path (regression-safe); with more than one the call halts with an ambiguous-routing validation error. Money-moving: requires rw on either britecore/policies/pendingCommissionPayments or britecore/policies/agency-commissions.",
        "properties": {
          "api_key": {
            "type": "string",
            "description": "API key for the caller (consumed by the gateway for authentication). Optional here; the endpoint authorizes the session operator via permissions."
          },
          "commission_payment_ids": {
            "description": "The export selection. Exactly the string \"all\" (Process All Eligible, scoped by the sibling filters) OR a non-empty list of commission-payment id (UUID) strings. Any other value (a non-\"all\" scalar, an object, an empty list, or a non-UUID element) is rejected with success=false before any money moves.",
            "oneOf": [
              {
                "type": "string",
                "const": "all",
                "description": "Process All Eligible: resolve the selection through the same filtered grid query the list view uses (scoped by commission_month / status / search / is_electronic_payment)."
              },
              {
                "type": "array",
                "minItems": 1,
                "maxItems": 5000,
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "description": "Explicit selection: the operator picked these commission-payment ids (at most 5000; use \"all\" for larger filtered exports). Every requested id must exist or the whole call fails with a validation error naming the missing ids."
              }
            ]
          },
          "is_electronic_payment": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Grid filter; only applied when commission_payment_ids == \"all\". Ignored for an explicit id list."
          },
          "commission_month": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^\\d{4}-(0[1-9]|1[0-2])$",
            "description": "YYYY-MM report month (month 01-12); only applied when commission_payment_ids == \"all\". Ignored for an explicit id list."
          },
          "status": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "pending",
                  "reviewed",
                  "exported"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Grid status filter; only applied when commission_payment_ids == \"all\". Ignored for an explicit id list."
          },
          "search": {
            "type": [
              "object",
              "null"
            ],
            "description": "Grid search filter; only applied when commission_payment_ids == \"all\". Ignored for an explicit id list.",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "Agency Group",
                  "Agency",
                  "Policy Number"
                ],
                "description": "What to search by."
              },
              "value": {
                "type": "string",
                "description": "The search term."
              }
            },
            "required": [
              "type",
              "value"
            ]
          }
        },
        "required": [
          "commission_payment_ids"
        ]
      },
      "request-bifurcate_claim": {
        "type": "object",
        "description": "Request Schema for /api/v2/claims/bifurcate_claim",
        "properties": {
          "claim_id": {
            "type": "string",
            "format": "uuid",
            "description": "Claim ID"
          }
        }
      },
      "request-bind_full_quote": {
        "type": "object",
        "description": "Request payload for /api/v2/quotes/bind_full_quote. Two tenant advanced settings, enforced at the shared new-business bind choke point (so they govern this API and the agent UI new-business submit identically; mid-term change/endorsement binds are out of scope and unaffected), can additionally gate the bind, and both default off (behavior is unchanged until a tenant opts in): 'integrations'/'contact-screening-require-completion-before-bind' refuses the bind unless every in-scope contact has a complete screening result. IMPORTANT: the pre-existing implicit OFAC hit-block (which refuses a bind when the vendor returned a screening hit) DOES execute on this programmatic bind path (reached via agent_submission), but it only returns a failure rather than raising and the programmatic bind discards that return, so it is a no-op here; it is effective only on the agent-UI submit, which surfaces the failure. On the API path this setting is therefore the ONLY effective bind-time OFAC enforcement, so a programmatic binder that leaves it off gets no bind-time OFAC protection (a flagged contact will bind) and must enable it for any bind-time OFAC enforcement. 'policies'/'enforce-business-rules-at-bind' gates the bind by the KNOCKOUT business rules (disallowed category options, required / List-Disallow supplemental-question knockouts, and revision-level underwriting prevent-continue blocks); it intentionally does not enforce the completeness/boundary checks (item mandatoriness, multiplicity, deductible/limit boundaries), which are build-time input guards that false-positive on a fully rated quote. When either gate trips the bind is refused.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The quote ID to bind"
          },
          "external_system_reference": {
            "type": "string",
            "description": "Reference to the quote in an external system"
          },
          "submit_bound": {
            "type": "boolean",
            "description": "Whether to submit the quote as bound or not",
            "default": false
          }
        }
      },
      "request-bulk_create_disputes": {
        "type": "object",
        "description": "Request Schema for /api/v2/disputes/bulk_create_disputes. Nested dispute claim_id values may be omitted; the top-level claim_id is injected before validation.",
        "properties": {
          "claim_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the owning claim. Applied to every dispute item (and nested dispute_dates) before validation."
          },
          "disputes": {
            "type": "array",
            "minItems": 1,
            "maxItems": 500,
            "items": {
              "$ref": "#/components/schemas/bulk_create_dispute_item-def"
            },
            "description": "List of disputes to create. Nested claim_id may be omitted."
          }
        },
        "required": [
          "claim_id",
          "disputes"
        ]
      },
      "request-bulk_modify_tasks": {
        "type": "object",
        "description": "Request payload for /api/v2/tasks/bulk_modify_tasks. Applies one action to an explicit set of selected tasks. Each task is updated individually, so every task keeps its own history entry and emits its own events; a batch that fails for some tasks still applies to the rest. Each action carries exactly one target field and the request is rejected if it carries any field belonging to a different action.",
        "required": [
          "task_ids",
          "action"
        ],
        "properties": {
          "task_ids": {
            "type": "array",
            "minItems": 1,
            "maxItems": 500,
            "description": "Ids of the tasks to act on. Duplicates are collapsed, so a task reached both by a policy header checkbox and by its own row counts once. Capped at 500: each task in a batch costs a read, its own history rows, an update and an event inside one transaction, and the queue can only select a single page.",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "action": {
            "type": "string",
            "enum": [
              "reassign",
              "archive",
              "set_priority",
              "set_status",
              "mark_complete",
              "link_to_policy"
            ],
            "description": "reassign moves the tasks to assignee_id. archive moves the tasks to Canceled, which is what places them in the archived lifecycle bucket. set_priority sets priority. set_status sets status. mark_complete sets Completed and emits TaskCompletedEvent per task. link_to_policy attaches unattached triage tasks to policy_id - attach only, so a task that already has a parent fails individually."
          },
          "assignee_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Contact to reassign to. Required for reassign, rejected for every other action. An unknown id fails the whole request rather than every task individually."
          },
          "priority": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "Low",
              "Medium",
              "High",
              null
            ],
            "description": "Required for set_priority, rejected for every other action."
          },
          "status": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "Open",
              "In Progress",
              "Blocked",
              "Escalated",
              "Completed",
              "Canceled",
              null
            ],
            "description": "Required for set_status, rejected for every other action. Terminal targets are validated per task by the FSM, which forbids modifying a task that is already terminal."
          },
          "policy_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Required for link_to_policy, rejected for every other action. An unknown id fails the whole request rather than every task individually."
          }
        }
      },
      "request-bulk_upsert": {
        "type": "object",
        "description": "Request Schema for /api/v2/medical_codes/bulk_upsert",
        "properties": {
          "code_system": {
            "type": "string",
            "minLength": 1,
            "maxLength": 20,
            "pattern": ".*\\S.*",
            "description": "Code system this batch belongs to (e.g. 'ICD10')"
          },
          "source_version": {
            "type": "string",
            "minLength": 1,
            "maxLength": 20,
            "pattern": ".*\\S.*",
            "description": "Release version stamped on every row in this batch; used later by finalize_sync"
          },
          "codes": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1000,
            "description": "Batch of codes to upsert (max 1000 rows per request)",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 20,
                  "pattern": ".*\\S.*",
                  "description": "The diagnosis code (e.g. 'S52.501')"
                },
                "description": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 512,
                  "pattern": ".*\\S.*",
                  "description": "Human-readable description of the code"
                }
              },
              "required": [
                "code",
                "description"
              ]
            }
          }
        },
        "required": [
          "code_system",
          "source_version",
          "codes"
        ]
      },
      "request-cancel_claim_estimation": {
        "type": "object",
        "description": "Request Schema for /api/v2/claim_estimations/cancel_claim_estimation",
        "properties": {
          "estimation_id": {
            "type": "string",
            "format": "uuid",
            "description": "Estimation ID"
          }
        },
        "required": [
          "estimation_id"
        ]
      },
      "request-cancel_policy_v2": {
        "description": "Request schema for /api/v2/policies/cancel_policy_v2",
        "type": "object",
        "properties": {
          "policy_id": {
            "type": "string",
            "format": "uuid",
            "description": "The UUID of the policy to cancel"
          },
          "policy_term_id": {
            "type": "string",
            "format": "uuid",
            "description": "The UUID of the policy term to cancel"
          },
          "policy_term_external_system_reference": {
            "type": "string",
            "description": "The external system reference for the policy term"
          },
          "cancellation_reason_id": {
            "type": "string",
            "format": "uuid",
            "description": "The UUID of the cancellation reason from the cancellation_reasons table"
          },
          "cancellation_reason": {
            "type": "string",
            "description": "The cancellation reason text"
          },
          "cancellation_date": {
            "type": "string",
            "format": "date",
            "description": "The cancellation date in YYYY-MM-DD format. Must not be in the future.",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "cancellation_pending_date": {
            "type": "string",
            "format": "date",
            "description": "The cancellation pending date in YYYY-MM-DD format. Takes precedence over cancel_date.",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "print_description": {
            "type": "string",
            "description": "Optional print description for the cancellation. Used in cancellation documents and notices.",
            "maxLength": 2000
          },
          "additional_description": {
            "type": "string",
            "description": "Optional additional description or notes for the cancellation. For internal use and documentation.",
            "maxLength": 5000
          },
          "apply_mep": {
            "type": "boolean",
            "description": "Whether to apply minimum earned premium (MEP) when calculating cancellation refund. When true, ensures the earned premium meets the minimum earned premium requirement configured in the policy lifecycle. Defaults to false.",
            "default": false
          }
        },
        "required": [
          "policy_id",
          "cancellation_date"
        ],
        "allOf": [
          {},
          {}
        ]
      },
      "request-change_with_remap": {
        "type": "object",
        "description": "Request payload for /api/v2/exposure_remap/change_with_remap - atomically save the loss date and apply the adjuster's decision for each exposure.",
        "properties": {
          "api_key": {
            "type": "string",
            "description": "API key for authentication"
          },
          "claim_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the claim"
          },
          "loss_date": {
            "type": "string",
            "description": "Loss date to persist (ISO 8601 or MM/DD/YYYY[ hh:mm A])"
          },
          "decisions": {
            "type": "array",
            "description": "Per-exposure decisions. Exposures already on the target revision can be omitted.",
            "items": {
              "type": "object",
              "properties": {
                "exposure_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "action": {
                  "type": "string",
                  "enum": [
                    "remap",
                    "assign",
                    "discard"
                  ],
                  "description": "remap = re-point to the matched coverage; assign = re-point to target_coverage_id; discard = release reserve and soft-delete"
                },
                "target_coverage_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid",
                  "description": "Target RevisionItem on the loss-date revision. Required for remap and assign."
                }
              },
              "required": [
                "exposure_id",
                "action"
              ]
            }
          }
        },
        "required": [
          "claim_id",
          "loss_date",
          "decisions"
        ]
      },
      "request-claims": {
        "type": "object",
        "description": "Request Schema for POST /api/v2/agents/claims. Authentication is handled via the api_key parameter (passed for BriteCore API authentication).",
        "properties": {
          "api_key": {
            "type": "string",
            "description": "API key for BriteCore authentication"
          },
          "prompt": {
            "type": "string",
            "description": "The user's message/question"
          },
          "session_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "description": "Session ID for conversation continuity"
          },
          "context": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Additional context information"
          }
        },
        "required": [
          "api_key",
          "prompt"
        ]
      },
      "request-claims_analytics": {
        "type": "object",
        "description": "Request Schema for POST /api/v2/agents/claims_analytics. Claims Analytics is the Claims Analytics Copilot that provides insights and analysis based on claims data. Authentication is handled via the api_key parameter.",
        "properties": {
          "api_key": {
            "type": "string",
            "description": "API key for BriteCore authentication"
          },
          "prompt": {
            "type": "string",
            "description": "The user's message/question about claims data"
          },
          "session_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Session ID for conversation continuity"
          },
          "context": {
            "type": [
              "string",
              "null"
            ],
            "description": "Context data (JSON string with metrics, filters, claims data, etc.)"
          }
        },
        "required": [
          "api_key",
          "prompt"
        ]
      },
      "request-claims_analytics_stream": {
        "type": "object",
        "description": "Request Schema for POST /api/v2/agents/claims_analytics_stream. Claims Analytics Copilot streaming endpoint for real-time chat responses. Authentication is handled via the api_key parameter.",
        "properties": {
          "api_key": {
            "type": "string",
            "description": "API key for BriteCore authentication"
          },
          "prompt": {
            "type": "string",
            "description": "The user's message/question about claims data"
          },
          "session_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Session ID for conversation continuity"
          },
          "context": {
            "type": [
              "string",
              "null"
            ],
            "description": "Context data (JSON string with metrics, filters, claims data, etc.)"
          }
        },
        "required": [
          "api_key",
          "prompt"
        ]
      },
      "request-claims_stream": {
        "type": "object",
        "description": "Request Schema for POST /api/v2/agents/claims_stream",
        "properties": {
          "api_key": {
            "type": "string",
            "description": "API key for authentication"
          },
          "prompt": {
            "type": "string",
            "description": "The user's message/question"
          },
          "session_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "description": "Session ID for conversation continuity"
          },
          "context": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Additional context information"
          }
        },
        "required": [
          "api_key",
          "prompt"
        ]
      },
      "request-claimsearch_sso_data": {
        "type": "object",
        "description": "Request Schema for /api/v2/claims/claimsearch_sso_data",
        "properties": {
          "claim_id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the claim"
          },
          "vendor_reference_id": {
            "type": "string",
            "description": "ISO file number for deep-linking to a specific match report. If omitted, lands on the ClaimSearch home page."
          }
        },
        "required": [
          "claim_id"
        ]
      },
      "request-create_additional_interest": {
        "type": "object",
        "description": "Request payload for /api/v2/additional_interests/create_additional_interest. Provide quote_id for revision-level or vehicle_id/risk_id for risk-level.",
        "properties": {
          "additional_interest": {
            "type": "object",
            "properties": {
              "quote_id": {
                "type": "string",
                "description": "ID of the quote/revision to attach the interest to (revision-level)",
                "format": "uuid"
              },
              "vehicle_id": {
                "type": "string",
                "format": "uuid",
                "description": "ID of the vehicle to attach the interest to (risk-level)"
              },
              "risk_id": {
                "type": "string",
                "format": "uuid",
                "description": "ID of the risk/property to attach the interest to (risk-level)"
              },
              "risk_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "minItems": 1,
                "description": "IDs of multiple risks to attach the same interest to atomically (bulk create). All risks must belong to the same revision."
              },
              "contact_id": {
                "type": "string",
                "format": "uuid",
                "description": "ID of existing contact (if attaching existing contact)"
              },
              "interest": {
                "type": "string",
                "description": "Type of interest (e.g., 'Additional Interest', 'Liability Interest')",
                "minLength": 1
              },
              "interest_type": {
                "type": "string",
                "description": "Interest type code from ADDITIONAL_INTEREST_TYPES QuickCode (risk-level only)"
              },
              "loan_number": {
                "type": "string",
                "maxLength": 100,
                "description": "Loan number associated with the interest (risk-level only)"
              },
              "notes": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 1024,
                "description": "Free-text additional notes for the interest"
              },
              "name": {
                "type": "string",
                "description": "Contact name",
                "minLength": 1
              },
              "type": {
                "type": "string",
                "enum": [
                  "individual",
                  "organization"
                ],
                "description": "Contact type"
              },
              "ssn": {
                "type": "string",
                "description": "Social Security Number"
              },
              "date_of_birth": {
                "type": "string",
                "format": "date",
                "description": "Date of birth"
              },
              "fein_tax_id": {
                "type": "string",
                "description": "Federal EIN/Tax ID"
              },
              "legal_entity_type": {
                "type": "string",
                "description": "Legal entity type"
              },
              "phones": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/phone-def"
                }
              },
              "addresses": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/address-def"
                }
              },
              "emails": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/email-def"
                }
              }
            }
          }
        },
        "required": [
          "additional_interest"
        ]
      },
      "request-create_adjuster_assignment_config": {
        "type": "object",
        "description": "Request Schema for /api/v2/claim_adjuster_assignment_configs/create_adjuster_assignment_config",
        "properties": {
          "adjuster_assignment_config": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/adjuster_assignment-def"
              },
              {
                "type": "object",
                "required": [
                  "contact_id",
                  "active",
                  "monday",
                  "tuesday",
                  "wednesday",
                  "thursday",
                  "friday",
                  "saturday",
                  "sunday"
                ]
              }
            ]
          }
        }
      },
      "request-create_adjuster_license": {
        "type": "object",
        "description": "Request payload for /api/v2/contacts/create_adjuster_license.",
        "required": [
          "contact_id",
          "business_location_id",
          "license_number"
        ],
        "properties": {
          "contact_id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the contact"
          },
          "business_location_id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the business location (state)"
          },
          "license_number": {
            "type": "string",
            "maxLength": 64,
            "description": "License number"
          },
          "effective_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "Effective date in YYYY-MM-DD format"
          },
          "expiration_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "Expiration date in YYYY-MM-DD format"
          }
        }
      },
      "request-create_adjustment": {
        "description": "Request payload for POST /api/v2/commissions/create_adjustment. Creates a commission accounting adjustment entry. Two shapes are supported. SOURCE-FUL: supply source_accounting_id and the policy, agency and agent are copied from that source commission_accounting row. SOURCE-LESS (policy-free agency chargeback, BC-23072): omit source_accounting_id, in which case agency_id, agent_id, adjustment_amount, period_start, period_end and a non-blank adjustment_reason are ALL REQUIRED and the request is rejected with a validation error if any of them is missing or blank. On the source-less path agency_id must be a contact holding the `Agency` role and agent_id must be a contact holding the `Agent` role; both checks verify role membership only -- they do not verify the contact is active. This conditional requirement is enforced server-side by the DTO schema and cannot be expressed in the JSON-Schema 'required' array, which lists only the fields required on both paths.",
        "type": "object",
        "properties": {
          "source_accounting_id": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of the source commission_accounting row to copy the policy, agency and agent from. OMIT this field to use the source-less path (policy-free agency chargeback), which instead requires agency_id, agent_id, adjustment_amount, period_start and period_end."
          },
          "adjustment_amount": {
            "type": [
              "string",
              "number"
            ],
            "description": "The adjustment amount (USD, 2 decimal places). Required on both the source-ful and source-less paths. Negative values are chargebacks (money taken back from the agency). Accepted as a JSON number or as a decimal string; a string form is coerced server-side."
          },
          "adjustment_reason": {
            "type": "string",
            "description": "Free-text cause for the adjustment. Stored in commission_accounting.why. On the SOURCE-LESS path it is REQUIRED: it must be present, non-blank, and 150 characters or fewer. Non-blankness is evaluated AFTER server-side sanitization, so a markup-only value such as '<b></b>' (which sanitizes to an empty string) is rejected; the 150-character limit is measured on the submitted value, and a longer value is rejected with a validation error rather than truncated. On the SOURCE-FUL path it remains optional, and an omitted value defaults to the literal 'User generated manual adjustment'. The 150-character limit is source-less-only, which is why it is described here in prose instead of as a JSON-Schema maxLength keyword. For MVR chargebacks the orchestrator supplies a human-readable cause built from the quote number, named insured and MVR pull date."
          },
          "reason_code": {
            "type": "string",
            "description": "Categorization code for the adjustment. Validated dynamically against the COMMISSION_ADJUSTMENT_REASONS quick code rather than a fixed enum, so the accepted values are whatever that quick code contains for the site. Seeded values are CORRECTION (the system default), BONUS and CHARGEBACK. When omitted on the source-less path the quick-code default (CORRECTION) is applied."
          },
          "agency_id": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of the agency the adjustment is booked against (the payee). Required on the source-less path. Must be a contact holding the `Agency` role. The check verifies role membership only -- it does not verify the contact is active. Ignored on the source-ful path, where the agency is copied from the source commission_accounting row."
          },
          "agent_id": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of the crediting agent for the adjustment. Required on the source-less path. Must be a contact holding the `Agent` role. The check verifies role membership only -- it does not verify the contact is active. Ignored on the source-ful path, where the agent is copied from the source commission_accounting row."
          },
          "period_start": {
            "type": "string",
            "format": "date-time",
            "description": "Start of the commission period the adjustment covers. Required on the source-less path. Format: YYYY-mm-ddTHH:MM:SSZ  (e.g. 2020-01-01T12:00:00Z). This is UTC time."
          },
          "period_end": {
            "type": "string",
            "format": "date-time",
            "description": "End of the commission period the adjustment covers. Required on the source-less path. This value is snapped to the end of its month (last day, 23:59:59) and the snapped value is stored as the row's transaction date, so it determines which monthly commission payment period the chargeback rolls up into. The month is chosen AFTER the value is converted to America/Chicago, so a UTC instant just past midnight on the 1st (e.g. 2026-08-01T00:00:00Z) lands in the PREVIOUS month (July 31, not August 31). Policy-free rows are not yet rendered on the monthly commission statement document (BC-23074): the chargeback changes the agency's commission payment amount but does not appear as a statement detail line. Format: YYYY-mm-ddTHH:MM:SSZ  (e.g. 2020-01-01T12:00:00Z). This is UTC time."
          }
        },
        "required": [
          "adjustment_amount"
        ]
      },
      "request-create_and_rate_endorsement_quote": {
        "type": "object",
        "description": "Request Schema for create_and_rate_endorsement_quote - creates and optionally rates an endorsement quote with configurable stateless behavior",
        "properties": {
          "endorsement_context": {
            "type": "object",
            "description": "The endorsement request data",
            "allOf": [
              {
                "$ref": "#/components/schemas/request-create_endorsement_quote"
              }
            ]
          },
          "rate_quote": {
            "type": "boolean",
            "description": "Flag indicating whether to rate the endorsement after creation",
            "default": true
          },
          "quote": {
            "type": "object",
            "description": "Optional quote data to apply to the endorsement (items, risks, named_insureds, vehicles, drivers, sub_lines, billing_information). Uses definition IDs (item_id, sub_line_id) - instance IDs are resolved automatically from the endorsement revision.",
            "allOf": [
              {
                "$ref": "#/components/schemas/request-create_full_quote"
              }
            ]
          },
          "stateless": {
            "type": "boolean",
            "description": "Flag indicating whether the operation should be stateless (do not store any data)",
            "default": true
          }
        },
        "required": [
          "endorsement_context"
        ]
      },
      "request-create_and_rate_full_quote": {
        "type": "object",
        "description": "Request Schema for create_and_rate_full_quote - creates and optionally rates a full quote with configurable stateless behavior",
        "properties": {
          "quote": {
            "type": "object",
            "description": "The full quote request data",
            "allOf": [
              {
                "$ref": "#/components/schemas/request-create_full_quote"
              }
            ]
          },
          "rate_quote": {
            "type": "boolean",
            "description": "Flag indicating whether to rate the quote after creation",
            "default": true
          },
          "stateless": {
            "type": "boolean",
            "description": "Flag indicating whether the operation should be stateless (do not store any data)",
            "default": true
          }
        },
        "required": [
          "quote",
          "rate",
          "stateless"
        ]
      },
      "request-create_calculated_field": {
        "type": "object",
        "description": "Request payload for /api/v2/document_templates/create_calculated_field",
        "properties": {
          "field_name": {
            "type": "string",
            "pattern": "^[a-zA-Z_][a-zA-Z0-9_]*$",
            "description": "Valid Python identifier for the calculated field"
          },
          "expression": {
            "type": "string",
            "description": "RestrictedPython expression to evaluate"
          },
          "path": {
            "type": "string",
            "default": "",
            "description": "Dot-notation path (e.g. 'drivers', 'coverages.deductibles'). Empty for root."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional description"
          },
          "x_report_location_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Template deliverable ID. Null for global fields."
          }
        },
        "required": [
          "field_name",
          "expression"
        ]
      },
      "request-create_carbone_custom_deliverable": {
        "type": "object",
        "description": "Request payload for /api/v2/settings/create_carbone_custom_deliverable. The request body IS the deliverable object directly (unpack_payload=False) - not wrapped in a 'deliverable' key.",
        "properties": {
          "overwrite_stock": {
            "type": "boolean"
          },
          "location_id": {
            "type": "string",
            "format": "uuid"
          },
          "policy_type_name": {
            "type": "string"
          },
          "custom_name": {
            "type": "string",
            "description": "The deliverable name.",
            "minLength": 1,
            "maxLength": 255
          },
          "print_on_initial_dec": {
            "type": "boolean"
          },
          "print_on_renewal_dec": {
            "type": "boolean"
          },
          "print_on_non_autopay": {
            "type": "boolean"
          },
          "allow_britequote_creation": {
            "type": "boolean"
          },
          "module": {
            "type": "string",
            "enum": [
              "claims",
              "policies"
            ]
          },
          "generated_per": {
            "type": "string"
          },
          "carbone_template_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "source_file_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "draft_carbone_template_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "draft_source_file_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_preview_entity_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "use_dynamic_fields": {
            "type": "boolean"
          },
          "dynamic_fields": {
            "type": "array",
            "description": "Optional list of dynamic fields to associate with this template. Validated (and, for a dropdown field, its option_source-specific requirements) before the deliverable row is created.",
            "items": {
              "$ref": "#/components/schemas/dynamic_field-def"
            }
          }
        },
        "required": [
          "location_id",
          "policy_type_name",
          "custom_name",
          "module"
        ]
      },
      "request-create_configuration_import": {
        "type": "object",
        "description": "Request Schema for /api/v2/settings/create_configuration_import. Records a configuration package so it can be validated and applied. Takes exactly one of file_id, for a package already uploaded here through core.uploads uploadAttachment with type 'config_package', or url, for a presigned Amazon S3 link to one on the exporting site. A link is fetched and stored before the call returns, so the record always names a package held on this site and the signed link never reaches a task argument. Nothing is executed: hand the returned id to import_configuration to validate it, and again to apply it.",
        "properties": {
          "file_id": {
            "type": "string",
            "format": "uuid",
            "description": "A configuration package already stored on this site. Must be active and of the configuration package file type."
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "Presigned Amazon S3 https link to the package. Only Amazon S3 hosts are accepted and redirects are refused, because the fetch is made from inside the cluster."
          }
        }
      },
      "request-create_contact": {
        "type": "object",
        "description": "Request payload for /api/v2/contacts/create_contact.",
        "properties": {
          "confirmation_email": {
            "type": "string",
            "pattern": "^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$"
          },
          "date_of_birth": {
            "type": "string",
            "format": "date"
          },
          "drivers_license": {
            "type": "string"
          },
          "external_system_reference": {
            "type": "string"
          },
          "last_synched_date": {
            "type": "string",
            "format": "date-time"
          },
          "source_update_date": {
            "type": "string",
            "format": "date-time"
          },
          "fein_tax_id": {
            "type": "string"
          },
          "legal_entity_type": {
            "type": "string"
          },
          "date_business_started": {
            "type": "string",
            "format": "date"
          },
          "dba": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "added_by": {
            "type": "string"
          },
          "purchase_date": {
            "type": "string",
            "format": "date"
          },
          "position": {
            "type": "string"
          },
          "website": {
            "type": "string"
          },
          "ssn_group": {
            "type": "string"
          },
          "ssn": {
            "type": "string"
          },
          "agency_inception_date": {
            "type": "string",
            "format": "date"
          },
          "agency_termination_date": {
            "type": "string",
            "format": "date"
          },
          "follow_agency_quoting_restriction": {
            "type": "boolean",
            "default": true
          },
          "type": {
            "type": "string",
            "enum": [
              "individual",
              "organization"
            ]
          },
          "username": {
            "type": "string"
          },
          "gender": {
            "type": "string",
            "enum": [
              "Male",
              "Female",
              "Undisclosed",
              "Other"
            ]
          },
          "driver_license_date": {
            "type": "string",
            "format": "date"
          },
          "license_state": {
            "type": "string",
            "pattern": "^[A-Z]{2}$"
          },
          "date_of_death": {
            "type": "string",
            "format": "date"
          },
          "hicn_number": {
            "type": "string"
          },
          "phones": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/phone-def"
            }
          },
          "addresses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/address-def"
            }
          },
          "emails": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/email-def"
            }
          },
          "company_id": {
            "type": "string",
            "format": "uuid"
          },
          "agency_group_number": {
            "type": "string"
          },
          "agency_number": {
            "type": "string"
          },
          "producer_number": {
            "type": "string"
          },
          "agency_group_id": {
            "type": "string",
            "format": "uuid"
          },
          "agency_id": {
            "type": "string",
            "format": "uuid"
          },
          "agent_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "commission_structure": {
            "type": "string"
          },
          "roles": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                }
              },
              "required": [
                "name"
              ]
            }
          }
        },
        "required": [
          "type",
          "name"
        ],
        "allOf": [
          {},
          {}
        ]
      },
      "request-create_copilot_skill": {
        "type": "object",
        "description": "Request schema for /api/v2/copilot_skills/create_copilot_skill",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 120,
            "description": "Display name of the skill"
          },
          "description": {
            "type": "string",
            "maxLength": 500,
            "description": "Short summary of the skill"
          },
          "body": {
            "type": "string",
            "maxLength": 20000,
            "description": "Markdown instruction body consumed by agents"
          },
          "status": {
            "type": "string",
            "enum": [
              "DRAFT",
              "ACTIVE",
              "ARCHIVED"
            ],
            "default": "DRAFT",
            "description": "Initial status. Defaults to DRAFT if omitted."
          },
          "applicable_copilots": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9_-]{0,48}$"
            },
            "default": [],
            "description": "Copilot identifiers this skill applies to. Empty means all copilots."
          }
        },
        "required": [
          "name",
          "body"
        ]
      },
      "request-create_custom_error_code": {
        "type": "object",
        "description": "Request schema for /api/v2/configurations/create_custom_error_code",
        "properties": {
          "custom_error_code": {
            "type": "object",
            "description": "The custom error code to create",
            "properties": {
              "module": {
                "type": "string",
                "description": "The module this error code belongs to",
                "enum": [
                  "stp"
                ]
              },
              "code": {
                "type": "string",
                "minLength": 1,
                "maxLength": 10,
                "description": "The error code (max 10 characters)"
              },
              "description": {
                "type": "string",
                "minLength": 1,
                "maxLength": 2000,
                "description": "The error description (max 2000 characters)"
              }
            },
            "required": [
              "module",
              "code",
              "description"
            ]
          }
        },
        "required": [
          "custom_error_code"
        ]
      },
      "request-create_dispute": {
        "type": "object",
        "description": "Request Schema for /api/v2/disputes/create_dispute",
        "properties": {
          "dispute": {
            "$ref": "#/components/schemas/dispute-def"
          }
        },
        "required": [
          "dispute"
        ]
      },
      "request-create_effective_date": {
        "type": "object",
        "description": "Request schema for /api/v2/lines/create_effective_date",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The id of the effective date"
          },
          "effective_date": {
            "type": "string",
            "format": "date",
            "description": "The effective date"
          },
          "description": {
            "type": "string",
            "description": "The description of the effective date"
          },
          "policy_type_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The policy type ids"
          },
          "policy_type_external_system_references": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The policy type external system references"
          },
          "force": {
            "type": "boolean",
            "description": "When true, skips all validations during effective date creation",
            "default": false
          }
        },
        "required": [
          "effective_date"
        ]
      },
      "request-create_endorsement_quote": {
        "type": "object",
        "description": "Request payload for /api/v2/quotes/create_endorsement_quote",
        "properties": {
          "quote_id": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of the Quote to endorse"
          },
          "quote_external_system_reference": {
            "type": "string",
            "description": "The external system reference of the Quote to endorse"
          },
          "endorsement_date": {
            "type": "string",
            "format": "date",
            "description": "The date of the endorsement"
          }
        }
      },
      "request-create_exposures": {
        "type": "object",
        "description": "Request payload for /api/v2/claim_exposures/create_exposures - Create one or more claim exposures",
        "properties": {
          "api_key": {
            "type": "string",
            "description": "API key for authentication"
          },
          "claim_exposures": {
            "type": "array",
            "description": "List of exposure objects to create",
            "items": {
              "type": "object",
              "properties": {
                "claim_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "ID of the claim"
                },
                "coverage_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "ID of the coverage (PropertyItem)"
                },
                "loss_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid",
                  "description": "ID of the loss (ClaimProperty or Injury), or null"
                },
                "claimant_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid",
                  "description": "ID of the claimant contact, or null"
                },
                "loss_type": {
                  "description": "Type of loss when loss_id is set",
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "type": "string",
                      "enum": [
                        "vehicle",
                        "property",
                        "injury"
                      ]
                    }
                  ]
                }
              },
              "required": [
                "claim_id",
                "coverage_id"
              ]
            },
            "minItems": 1
          }
        },
        "required": [
          "claim_exposures"
        ]
      },
      "request-create_full_quote": {
        "description": "Request Schema for create_full_quote",
        "allOf": [
          {
            "$ref": "#/components/schemas/create_full_quote_request-def"
          }
        ]
      },
      "request-create_full_quote_async": {
        "description": "Request Schema for create_full_quote_async. Inherits the sync payload shape and will diverge as async-specific fields are added. Heavy creation is offloaded to a background worker; the caller polls via get_full_quote_async_status using the returned reference_id. When external_system_reference is provided, the endpoint derives a deterministic reference_id so retried submissions collide and dedupe server-side.",
        "allOf": [
          {
            "$ref": "#/components/schemas/create_full_quote_async_request-def"
          }
        ]
      },
      "request-create_insight": {
        "type": "object",
        "description": "Request payload for /api/v2/insights/create_insight.",
        "properties": {
          "reference_type": {
            "type": "string",
            "enum": [
              "CLAIM",
              "POLICY"
            ],
            "description": "Type of resource to attach the insight to"
          },
          "reference_id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the claim or policy to attach the insight to"
          },
          "insight_type": {
            "type": "string",
            "enum": [
              "MISSING",
              "WORKFLOW",
              "ADVISORY",
              "QUALITY",
              "CONFLICT",
              "FRAUD",
              "GAPS",
              "DOC"
            ],
            "description": "Insight category"
          },
          "insight_severity": {
            "type": "string",
            "enum": [
              "IMMEDIATE_BLOCKING",
              "ACTION_NEEDED",
              "RECOMMENDED_REVIEW",
              "INFORMATIONAL"
            ],
            "description": "Urgency level assigned by the copilot"
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120,
            "description": "Short headline"
          },
          "description": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4000,
            "description": "Adjuster-readable narrative"
          },
          "product_area": {
            "type": [
              "string",
              "null"
            ],
            "description": "Product-area placement; omit or null for reference-wide insights. Valid values depend on reference_type. CLAIM: INFORMATION, PARTIES, VEHICLES, DAMAGED_PROPERTIES, INJURIES, ESTIMATIONS, ACCOUNTING, DISPUTES, NOTES, ATTACHMENTS. POLICY: INFORMATION, UNDERWRITING, SUBJECTIVITIES, CONTACTS, PROPERTY, VEHICLES, DRIVERS, COVERAGES, RATING, NOTES, ATTACHMENTS, RENEWAL."
          },
          "reshow": {
            "type": "string",
            "enum": [
              "UNTIL_RESOLVED",
              "ON_DATA_CHANGE",
              "ONCE_ONLY"
            ],
            "description": "Acknowledge re-show policy; omit to default to UNTIL_RESOLVED"
          },
          "snooze_days": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Per-insight snooze-window override in days; omit or null to fall back to the severity default"
          },
          "selector": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional card-level deep-link within product_area. Requires a non-null product_area. CLAIM selectors are per product area (e.g. INFORMATION: CLAIM_INFORMATION, POLICY_INFORMATION, ADDITIONAL_INFORMATION, CLAIM_ASSIGNMENTS, CLAIMS_HISTORY, LOSS_ADDRESS, CATASTROPHE, REINSURANCE_CONTRACTS, DATES, REPORTS, PHOTOS; ACCOUNTING: ACCOUNTING_OVERVIEW, RECOVERIES, EXPOSURE_INFORMATION; PARTIES: PARTIES_LIST; VEHICLES: VEHICLES_LIST; DAMAGED_PROPERTIES: DAMAGED_PROPERTIES_LIST; INJURIES: INJURIES_LIST; ESTIMATIONS: ESTIMATIONS_LIST; DISPUTES: DISPUTES_LIST, LITIGATION_DETAILS; NOTES: NOTES_LIST; ATTACHMENTS: ATTACHMENTS_LIST). POLICY selectors are per product area (INFORMATION: EFFECTIVE_DATES, POLICY_STATUS, REVISION, PREMIUM_TOTALS; UNDERWRITING: STP_STATUS, UW_RULES, UW_QUESTIONS, UW_CONTACT; SUBJECTIVITIES: SUBJECTIVITIES_LIST, ESIGNATURE; CONTACTS: NAMED_INSURED, ADDITIONAL_INTERESTS, AGENT, PREMIUM_FINANCE, SURPLUS_LINE_PRODUCER, CONTACTS_SECTION; PROPERTY: PROPERTIES_LIST; VEHICLES: VEHICLES_LIST; DRIVERS: DRIVERS_LIST; COVERAGES: PRIMARY_EXPOSURES, POLICY_WIDE; RATING: PREMIUM_TOTALS, COMMISSION_RATE, CREDIT_SCORE; NOTES: NOTES_LIST; ATTACHMENTS: ATTACHMENTS_LIST; RENEWAL: RENEWAL_STATUS, POLICY_STATUS)."
          }
        },
        "required": [
          "reference_type",
          "reference_id",
          "insight_type",
          "insight_severity",
          "title",
          "description"
        ]
      },
      "request-create_line": {
        "type": "object",
        "description": "Request Schema for /api/v2/policy_types/create_line",
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the line to create",
            "minLength": 1,
            "maxLength": 255
          },
          "business_location_id": {
            "type": "string",
            "format": "uuid",
            "description": "The UUID of the business location"
          }
        },
        "required": [
          "name",
          "business_location_id"
        ]
      },
      "request-create_policy_type": {
        "type": "object",
        "description": "Request Schema for /api/v2/lines/create_policy_type",
        "properties": {
          "effective_date_id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the Effective Date"
          },
          "location_id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the Location (State)"
          },
          "line": {
            "type": "object",
            "description": "Line of Business. Provide ID to use existing line, or name to create a new line.",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "UUID of the Line"
              },
              "name": {
                "type": "string",
                "description": "Name of the Line"
              }
            }
          },
          "policy_type": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/policy_type_def-def"
              }
            ]
          }
        },
        "required": [
          "effective_date_id",
          "location_id",
          "line",
          "policy_type"
        ]
      },
      "request-create_policy_type_item": {
        "type": "object",
        "description": "Request Schema for /api/v2/lines/create_policy_type_item",
        "allOf": [
          {
            "$ref": "#/components/schemas/policy_type_item-def"
          }
        ],
        "required": [
          "policy_type_id",
          "name",
          "category",
          "type"
        ]
      },
      "request-create_policy_type_relation": {
        "type": "object",
        "description": "Request Schema for /api/v2/policy_types/create_policy_type_relation",
        "properties": {
          "policy_type_id": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of the primary policy type"
          },
          "related_policy_type_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "The name of the related policy type"
          },
          "related_line_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "The name of the related line"
          },
          "relationship_type": {
            "type": "string",
            "enum": [
              "underlying"
            ],
            "default": "underlying",
            "description": "The type of relationship"
          }
        },
        "required": [
          "policy_type_id",
          "related_policy_type_name",
          "related_line_name",
          "relationship_type"
        ]
      },
      "request-create_quick_code_value": {
        "type": "object",
        "description": "Request payload for /api/v2/quick_code_values/create_quick_code_value.",
        "properties": {
          "quick_code_value": {
            "type": "object",
            "properties": {
              "quick_code": {
                "type": "string",
                "description": "The quick code identifier this value belongs to",
                "maxLength": 100
              },
              "code_value_type": {
                "type": "string",
                "description": "The unique code value identifier",
                "maxLength": 100
              },
              "label": {
                "type": "string",
                "description": "Display label for the quick code value",
                "maxLength": 255
              },
              "description": {
                "type": "string",
                "description": "Description of the quick code value"
              },
              "active": {
                "type": "boolean",
                "description": "Whether the quick code value is active",
                "default": true
              },
              "default": {
                "type": "boolean",
                "description": "Whether this is the default value for the quick code",
                "default": false
              },
              "sort_order": {
                "type": "integer",
                "description": "Sort order for display purposes"
              }
            },
            "required": [
              "quick_code",
              "code_value_type"
            ]
          }
        },
        "required": [
          "quick_code_value"
        ]
      },
      "request-create_quick_quote_template": {
        "type": "object",
        "description": "Request schema for /api/v2/quick_quote_templates/create_quick_quote_template",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 250,
            "description": "The name of the Quick Quote Template"
          },
          "quote_template": {
            "type": "object",
            "description": "Quote-wide data containing coverage items",
            "properties": {
              "items": {
                "type": "array",
                "description": "List of coverage items",
                "items": {
                  "type": "object",
                  "description": "Coverage item definition",
                  "properties": {
                    "id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Coverage ID"
                    },
                    "name": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Coverage name"
                    },
                    "limit1": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Primary coverage limit"
                    },
                    "limit1_type": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Type of primary limit"
                    },
                    "limit2": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Secondary coverage limit"
                    },
                    "limit2_type": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Type of secondary limit"
                    },
                    "limit3": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Tertiary coverage limit"
                    },
                    "limit3_type": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Type of tertiary limit"
                    },
                    "deductible": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Coverage deductible amount"
                    },
                    "coverage_type_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Coverage type identifier"
                    }
                  }
                }
              }
            },
            "required": [
              "items"
            ]
          },
          "policy_type_ids": {
            "type": "array",
            "description": "List of policy type IDs to associate with this template",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        },
        "required": [
          "name",
          "quote_template"
        ]
      },
      "request-create_quote_extended": {
        "type": "object",
        "description": "Request Schema for create_quote_extended",
        "properties": {
          "run_stateless": {
            "type": [
              "boolean",
              "string"
            ],
            "enum": [
              true,
              false,
              "debug"
            ],
            "default": false,
            "description": "If true, run the quote in stateless mode. This will create a stateless_quote_id in response. If 'debug', it will run the quote and include execution details, but NOT create a stateless_quote_id. If false (default), the quote will be stored in the database and a policy number/ID is returned."
          },
          "run_uw_rules": {
            "type": "boolean",
            "default": false,
            "description": "Run Underwriting Rules and calculate limits of Property Items. If run_stateless is set, this will be ignored, as Underwriting Rules are always run in stateless mode."
          },
          "requote": {
            "type": "boolean",
            "default": false,
            "description": "Only works when run_stateless is false."
          },
          "quote_info": {
            "description": "Information about the quote content, or a previously created stateless_quote_id",
            "oneOf": [
              {
                "type": "object",
                "required": [
                  "stateless_quote_id"
                ],
                "properties": {
                  "stateless_quote_id": {
                    "type": "string",
                    "description": "A previously created Stateless Quote ID"
                  },
                  "activated": {
                    "type": "boolean"
                  },
                  "soft_geoservice_bypass": {
                    "type": "boolean"
                  },
                  "hard_geoservice_bypass": {
                    "type": "boolean"
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "effective_date",
                  "line_name",
                  "policy_type_name",
                  "named_insureds",
                  "locations",
                  "items"
                ],
                "properties": {
                  "inception_date": {
                    "type": "string",
                    "description": "Inception Date"
                  },
                  "effective_date": {
                    "type": "string",
                    "description": "Effective Date"
                  },
                  "line_name": {
                    "type": "string",
                    "description": "Line Name"
                  },
                  "policy_type_name": {
                    "type": "string",
                    "description": "Policy Type Name"
                  },
                  "underwriting_questions": {
                    "type": "array",
                    "description": "Revision-level underwriting question answers. Each entry identifies its question by questionId (UUID) or questionText (a case-insensitive substring of the question's text), plus a yesNoAnswer and an optional explanation.",
                    "items": {
                      "type": "object",
                      "properties": {
                        "questionId": {
                          "type": "string",
                          "format": "uuid",
                          "description": "Underwriting Question ID. Precise but changes per policy-type effective date. Provide this or questionText."
                        },
                        "questionText": {
                          "type": "string",
                          "description": "Case-insensitive substring of the question's text. Resolved within this policy type's effective version (or the site-wide NULL question) and must match exactly one question. Provide this or questionId."
                        },
                        "yesNoAnswer": {
                          "type": "string",
                          "enum": [
                            "yes",
                            "no",
                            "none",
                            "Yes",
                            "No",
                            "None"
                          ],
                          "description": "The answer to the underwriting question. 'none' marks it unanswered (not a completed answer for bind gating). Matched case-insensitively at runtime."
                        },
                        "explanation": {
                          "type": "string",
                          "description": "Optional explanation for the answer."
                        }
                      },
                      "required": [
                        "yesNoAnswer"
                      ]
                    }
                  },
                  "underwriting_options": {
                    "type": "array",
                    "description": "Revision-level underwriting OPTION answers (distinct from underwriting_questions, which are yes/no). Each entry names its answer by the option's own option_code; the endpoint resolves that to the option and its parent UnderwritingOption row. Note the narrow support on this path: create_new_policy_extended only looks up the policy type's 'SIC Code' underwriting option, and a non-empty list that does not match one of its option_codes fails the call with 'Underwriting option not found.'. Omit the key, or send an empty list, when the product has no SIC Code option.",
                    "items": {
                      "type": "object",
                      "required": [
                        "answer"
                      ],
                      "properties": {
                        "answer": {
                          "type": "string",
                          "description": "The option_code of the chosen option on the policy type's 'SIC Code' underwriting option."
                        }
                      }
                    }
                  },
                  "named_insureds": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "name",
                        "addresses"
                      ],
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "description": "individual | organization. Defaults to 'individual' when omitted."
                        },
                        "gender": {
                          "type": "string",
                          "description": "Contact gender. The valid values are the site's `contacts / gender-list` setting, not a fixed list.",
                          "x-enum-setting": "contacts/gender-list"
                        },
                        "dob": {
                          "type": "string"
                        },
                        "fein_tax": {
                          "type": "string"
                        },
                        "ssn": {
                          "type": "string"
                        },
                        "date_business_started": {
                          "type": "string"
                        },
                        "website": {
                          "type": "string",
                          "format": "uri"
                        },
                        "legal_entity_type": {
                          "type": "string"
                        },
                        "phone_number": {
                          "type": "string",
                          "description": "Optional scalar phone on the named insured. When the site setting Contacts > Required Fields > BriteQuote includes Phone Number, a phone may be supplied either as this field or as at least one entry in `phones` where each entry has non-empty `number` and `type` (both forms satisfy the required-phone check for create_quote_extended)."
                        },
                        "phones": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "number": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "number",
                              "type"
                            ]
                          }
                        },
                        "email": {
                          "type": "string",
                          "description": "Optional scalar email on the named insured. When the site setting Contacts > Required Fields > BriteQuote includes Email, either this field or an `emails` entry with a `type` and a non-empty `email` satisfies the requirement. The scalar is stored only when it is a valid email address, and an address already in `emails` is stored once. A blank or invalid value still satisfies the requirement, but nothing is stored."
                        },
                        "email_type": {
                          "type": "string",
                          "examples": [
                            "Personal",
                            "Work",
                            "Notifications",
                            "Other"
                          ],
                          "default": "Personal",
                          "description": "Type stored for the scalar `email`: one of Personal, Work, Notifications or Other. Personal when absent; any other value is accepted and stored as Other."
                        },
                        "emails": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "email": {
                                "type": "string",
                                "format": "email"
                              },
                              "type": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "email",
                              "type"
                            ]
                          }
                        },
                        "addresses": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "address_line1": {
                                "type": "string"
                              },
                              "address_line2": {
                                "type": "string"
                              },
                              "address_city": {
                                "type": "string"
                              },
                              "address_state": {
                                "type": "string"
                              },
                              "address_county": {
                                "type": "string"
                              },
                              "address_country": {
                                "type": "string"
                              },
                              "address_zip": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "description": "Address kind. The valid values are the site's `policies / address_type_options` setting for this contact shape -- a named insured's list is narrower than the default one. Defaults to 'Mailing/Billing' when omitted.",
                                "x-enum-setting": "policies/address_type_options"
                              }
                            },
                            "required": [
                              "address_line1",
                              "address_city",
                              "address_state",
                              "address_country",
                              "address_zip"
                            ]
                          }
                        },
                        "retrieve_credit_report": {
                          "type": "boolean"
                        },
                        "retrieve_credit_report_timeout": {
                          "type": "integer"
                        }
                      }
                    }
                  },
                  "agency_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "The UUID of the Agency. Used when agency_number is absent. NOT required: an agent resolves its own agency."
                  },
                  "agency_number": {
                    "type": "string",
                    "description": "Agency Number. One of several ways to identify the agency -- see agent_username. Overrides agency_id. NOT required: an agent identified by agent_id, agent_username or agent_number resolves its own agency."
                  },
                  "agent_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "The UUID of the Agent. Highest-priority agent identifier (agent_id > agent_username > agent_number). Required if policy-go-to=agent."
                  },
                  "locations": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "address_county_specify": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Optional county-specification (free text). Stored as NULL when omitted; production reads it via .get(..., None)."
                        },
                        "address_line1": {
                          "type": "string"
                        },
                        "address_line2": {
                          "type": "string"
                        },
                        "address_city": {
                          "type": "string"
                        },
                        "address_state": {
                          "type": "string"
                        },
                        "address_county": {
                          "type": "string"
                        },
                        "address_country": {
                          "type": "string"
                        },
                        "address_zip": {
                          "type": "string"
                        },
                        "primary": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "address_line1",
                        "address_city",
                        "address_state",
                        "address_country",
                        "address_zip"
                      ]
                    }
                  },
                  "items": {
                    "description": "Rating items keyed by item name (primary form): property key = item name, value = that item's fields (questions/sub_line/limit/deductible). An item's value may be {} or [] when it carries no fields (many item keys commonly resolve to empty), or a LIST of instance objects when the item is configured allow_multiples (e.g. several scheduled articles under one coverage). The keyed-object form is preferred because it lets the JSONSchema validate the questions keys/values under each named item. An array of {name, ...} objects is also accepted (legacy); the intake normalizes object -> array.",
                    "oneOf": [
                      {
                        "type": "object",
                        "description": "x-item-keyed (primary): property key = item name; value = that item's fields; [] when the item carries none; or a LIST of instances when the item is allow_multiples.",
                        "additionalProperties": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "questions": {
                                  "type": "object",
                                  "description": "Question/category name -> answer value.",
                                  "additionalProperties": {
                                    "type": [
                                      "string",
                                      "number",
                                      "boolean",
                                      "null"
                                    ]
                                  }
                                },
                                "sub_line": {
                                  "type": "string",
                                  "description": "Sub Line Name"
                                },
                                "limit": {
                                  "type": [
                                    "string",
                                    "number"
                                  ],
                                  "description": "Coverage limit."
                                },
                                "deductible": {
                                  "type": [
                                    "string",
                                    "number"
                                  ],
                                  "description": "Deductible."
                                }
                              }
                            },
                            {
                              "type": "array",
                              "description": "Either an EMPTY item (carries no fields), or -- for an item configured allow_multiples -- one element per instance. The intake expands each element into its own rating entry under this item name.",
                              "items": {
                                "type": "object",
                                "description": "One instance of this item.",
                                "properties": {
                                  "questions": {
                                    "type": "object",
                                    "description": "Question/category name -> answer value.",
                                    "additionalProperties": {
                                      "type": [
                                        "string",
                                        "number",
                                        "boolean",
                                        "null"
                                      ]
                                    }
                                  },
                                  "sub_line": {
                                    "type": "string",
                                    "description": "Sub Line Name"
                                  },
                                  "limit": {
                                    "type": [
                                      "string",
                                      "number"
                                    ],
                                    "description": "Coverage limit."
                                  },
                                  "deductible": {
                                    "type": [
                                      "string",
                                      "number"
                                    ],
                                    "description": "Deductible."
                                  }
                                }
                              }
                            }
                          ]
                        }
                      },
                      {
                        "type": "array",
                        "description": "Legacy array of {name, ...} objects.",
                        "items": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "description": "Item Name"
                            },
                            "questions": {
                              "type": "object",
                              "description": "Rating categories and user inputs. Keyed by category or input name.",
                              "additionalProperties": {
                                "type": [
                                  "string",
                                  "number",
                                  "boolean",
                                  "null"
                                ]
                              }
                            },
                            "sub_line": {
                              "type": "string",
                              "description": "Sub Line Name"
                            }
                          },
                          "required": [
                            "name"
                          ]
                        }
                      }
                    ]
                  },
                  "billing_schedule": {
                    "type": "string",
                    "description": "The name/label of the billing schedule to use (e.g., '2-Pay (EFT)'). If not provided, the default billing schedule for the policy life cycle will be used. Must be validated against available options from retrieve_billing_schedule_options."
                  },
                  "activated": {
                    "type": "boolean"
                  },
                  "soft_geoservice_bypass": {
                    "type": "boolean"
                  },
                  "hard_geoservice_bypass": {
                    "type": "boolean"
                  },
                  "agent_username": {
                    "type": "string",
                    "description": "The agent's login (cognito_username, else username). Identifies the agent when agent_id is absent, and the AGENCY IS RESOLVED FROM THAT AGENT -- so supplying this alone satisfies the agency requirement. This is where a carrier feed's sign-on login belongs; putting it in agency_number is rejected as an unknown agency."
                  },
                  "agent_number": {
                    "type": "string",
                    "description": "The agent's producer number. Lowest-priority agent identifier, used when neither agent_id nor agent_username is given. Resolves the agency too."
                  },
                  "additional_interests": {
                    "type": "array",
                    "description": "Additional interests (mortgagees, lienholders, ...) stored against the new revision. Each entry is a contact in the same shape as named_insureds; `interest` names the interest type recorded on the revision-contact link.",
                    "items": {
                      "type": "object",
                      "required": [
                        "name"
                      ],
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "description": "individual | organization. Defaults to 'individual' when omitted."
                        },
                        "gender": {
                          "type": "string",
                          "description": "Contact gender. The valid values are the site's `contacts / gender-list` setting, not a fixed list.",
                          "x-enum-setting": "contacts/gender-list"
                        },
                        "dob": {
                          "type": "string"
                        },
                        "fein_tax": {
                          "type": "string"
                        },
                        "ssn": {
                          "type": "string"
                        },
                        "date_business_started": {
                          "type": "string"
                        },
                        "website": {
                          "type": "string",
                          "format": "uri"
                        },
                        "legal_entity_type": {
                          "type": "string"
                        },
                        "phone_number": {
                          "type": "string",
                          "description": "Optional scalar phone on the named insured. When the site setting Contacts > Required Fields > BriteQuote includes Phone Number, a phone may be supplied either as this field or as at least one entry in `phones` where each entry has non-empty `number` and `type` (both forms satisfy the required-phone check for create_quote_extended)."
                        },
                        "phones": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "number": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "number",
                              "type"
                            ]
                          }
                        },
                        "emails": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "email": {
                                "type": "string",
                                "format": "email"
                              },
                              "type": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "email",
                              "type"
                            ]
                          }
                        },
                        "addresses": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "address_line1": {
                                "type": "string"
                              },
                              "address_line2": {
                                "type": "string"
                              },
                              "address_city": {
                                "type": "string"
                              },
                              "address_state": {
                                "type": "string"
                              },
                              "address_county": {
                                "type": "string"
                              },
                              "address_country": {
                                "type": "string"
                              },
                              "address_zip": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "description": "Address kind. The valid values are the site's `policies / address_type_options` setting for this contact shape -- a named insured's list is narrower than the default one. Defaults to 'Mailing/Billing' when omitted.",
                                "x-enum-setting": "policies/address_type_options"
                              }
                            },
                            "required": [
                              "address_line1",
                              "address_city",
                              "address_state",
                              "address_country",
                              "address_zip"
                            ]
                          }
                        },
                        "retrieve_credit_report": {
                          "type": "boolean"
                        },
                        "retrieve_credit_report_timeout": {
                          "type": "integer"
                        },
                        "interest": {
                          "type": "string",
                          "description": "Interest type recorded against this additional interest."
                        }
                      }
                    }
                  },
                  "tenants": {
                    "type": "array",
                    "description": "Tenants stored against the new revision, in the same contact shape as named_insureds. `property_number` selects which location the tenant is attached to; it defaults to 1.",
                    "items": {
                      "type": "object",
                      "required": [
                        "name"
                      ],
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "description": "individual | organization. Defaults to 'individual' when omitted."
                        },
                        "gender": {
                          "type": "string",
                          "description": "Contact gender. The valid values are the site's `contacts / gender-list` setting, not a fixed list.",
                          "x-enum-setting": "contacts/gender-list"
                        },
                        "dob": {
                          "type": "string"
                        },
                        "fein_tax": {
                          "type": "string"
                        },
                        "ssn": {
                          "type": "string"
                        },
                        "date_business_started": {
                          "type": "string"
                        },
                        "website": {
                          "type": "string",
                          "format": "uri"
                        },
                        "legal_entity_type": {
                          "type": "string"
                        },
                        "phone_number": {
                          "type": "string",
                          "description": "Optional scalar phone on the named insured. When the site setting Contacts > Required Fields > BriteQuote includes Phone Number, a phone may be supplied either as this field or as at least one entry in `phones` where each entry has non-empty `number` and `type` (both forms satisfy the required-phone check for create_quote_extended)."
                        },
                        "phones": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "number": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "number",
                              "type"
                            ]
                          }
                        },
                        "emails": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "email": {
                                "type": "string",
                                "format": "email"
                              },
                              "type": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "email",
                              "type"
                            ]
                          }
                        },
                        "addresses": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "address_line1": {
                                "type": "string"
                              },
                              "address_line2": {
                                "type": "string"
                              },
                              "address_city": {
                                "type": "string"
                              },
                              "address_state": {
                                "type": "string"
                              },
                              "address_county": {
                                "type": "string"
                              },
                              "address_country": {
                                "type": "string"
                              },
                              "address_zip": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "description": "Address kind. The valid values are the site's `policies / address_type_options` setting for this contact shape -- a named insured's list is narrower than the default one. Defaults to 'Mailing/Billing' when omitted.",
                                "x-enum-setting": "policies/address_type_options"
                              }
                            },
                            "required": [
                              "address_line1",
                              "address_city",
                              "address_state",
                              "address_country",
                              "address_zip"
                            ]
                          }
                        },
                        "retrieve_credit_report": {
                          "type": "boolean"
                        },
                        "retrieve_credit_report_timeout": {
                          "type": "integer"
                        },
                        "property_number": {
                          "type": "integer",
                          "description": "1-based location number this tenant belongs to. Defaults to 1."
                        }
                      }
                    }
                  },
                  "policy_number": {
                    "type": "string",
                    "description": "Manual policy number for the new quote. When present (and not a requote) the number is treated as manually assigned; omit it to have one generated."
                  },
                  "new_policy_number": {
                    "type": "string",
                    "description": "Manual policy number to assign on a REQUOTE (requote=true). Ignored otherwise."
                  },
                  "is_renewal": {
                    "type": "boolean",
                    "default": false,
                    "description": "Process the new policy as a renewal."
                  },
                  "external_system_reference": {
                    "type": "string",
                    "description": "Caller's own reference for this policy, stored on the created policy."
                  },
                  "validate_agent_agency_association": {
                    "type": "boolean",
                    "default": false,
                    "description": "Also require that the resolved agent actually belongs to the resolved agency; the call fails with an agency-validation error if not. Off by default, which resolves each independently. When true, an agent found by producer number through agent_id is not rejected: it is left unlinked and the quote files under the agency. On the unified engine, an absent flag keeps an agent outside the agency and returns an \"is not associated\" warning; an explicit false returns none."
                  }
                },
                "description": "AGENCY/AGENT RESOLUTION: the quote must reach an agency. Give it one directly (agency_number, else agency_id) OR name an agent (agent_id, else agent_username, else agent_number) and the agency is resolved from that agent -- via its default agency, else its company, else the first agency it belongs to. Supplying an agency AND an agent additionally requires the two to be associated."
              }
            ]
          }
        },
        "required": [
          "quote_info"
        ]
      },
      "request-create_rating_table_definition": {
        "type": "object",
        "description": "Request payload for /api/v2/lines/create_rating_table_definition",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the rating table definition."
          },
          "location_id": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of the location (state) for this rating table definition."
          },
          "type ": {
            "type": "string",
            "description": "The type of the rating table definition.",
            "enum": [
              "grid_points",
              "prefill_vehicle"
            ]
          }
        },
        "required": [
          "name",
          "location_id",
          "type"
        ]
      },
      "request-create_renewal_quote": {
        "type": "object",
        "description": "Request Schema for /api/v2/quotes/create_renewal_quote",
        "properties": {
          "quote_id": {
            "type": "string",
            "format": "uuid",
            "description": "Quote ID"
          },
          "external_system_reference": {
            "type": "string",
            "description": "External ID of the Quote"
          },
          "policy_number": {
            "type": "string",
            "description": "Policy Number"
          }
        }
      },
      "request-create_rule": {
        "type": "object",
        "description": "Request payload for /api/v2/rules/create_rule",
        "properties": {
          "policy_type_id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the policy type"
          },
          "name": {
            "type": "string",
            "maxLength": 100,
            "description": "Rule name"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Rule description"
          },
          "category": {
            "type": "string",
            "description": "Rule category (policy, property, vehicle, driver, claim, etc.)"
          },
          "module": {
            "type": "string",
            "description": "Module the rule applies to (all, bc, bq, events, stp)"
          },
          "severity": {
            "type": [
              "string",
              "null"
            ],
            "description": "Severity level for STP rules (critical, high, medium, low)"
          },
          "waiver_behavior": {
            "type": [
              "string",
              "null"
            ],
            "description": "Waiver behavior for STP rules (run_always, waived_for_x_terms)"
          },
          "waiver_terms": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Number of terms for waiver (when waiver_behavior is waived_for_x_terms)"
          },
          "enabled_for_renewal": {
            "type": "boolean",
            "default": true,
            "description": "Whether rule runs on renewals"
          },
          "enabled_for_endorsement": {
            "type": "boolean",
            "default": true,
            "description": "Whether rule runs on endorsements"
          },
          "enabled_for_new_business": {
            "type": "boolean",
            "default": true,
            "description": "Whether rule runs on new business"
          },
          "sort_order": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Rule sort order"
          },
          "valid_from_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "Start date for rule validity (YYYY-MM-DD)"
          },
          "valid_to_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "End date for rule validity (YYYY-MM-DD)"
          },
          "properties_affected": {
            "type": [
              "string",
              "null"
            ],
            "description": "Which properties are affected (null, primary, non-primary)"
          },
          "exception_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "Exception type (include, exclude)"
          },
          "exception_agencies": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "List of agency IDs for exceptions"
          },
          "event": {
            "type": [
              "string",
              "null"
            ],
            "description": "Event type for events module rules"
          },
          "triggers": {
            "type": "array",
            "description": "Array of rule triggers",
            "items": {
              "type": "object",
              "properties": {
                "policy_type_item_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "UUID of the policy type item"
                },
                "trigger_type": {
                  "type": "string",
                  "description": "Trigger type (category, question, exists, advanced, eval, catastrophe, geography, loss-cause)"
                },
                "label_name": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Label name for the trigger"
                },
                "value": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "items": {
                    "type": "string"
                  },
                  "description": "Trigger values"
                }
              },
              "required": [
                "policy_type_item_id",
                "trigger_type"
              ]
            }
          },
          "effects": {
            "type": "array",
            "description": "Array of rule effects",
            "items": {
              "type": "object",
              "properties": {
                "target_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid",
                  "description": "UUID of the target policy type item, sub line, or subjectivity definition. Used by most effects to identify the item they act on. For 'Add Subjectivity' effects, this is the subjectivity definition ID."
                },
                "action": {
                  "type": "string",
                  "description": "Effect action (Add Line Item, Remove Line Item, Set Category Option, Set Field Value, Set STP Error, Add Subjectivity, etc.)"
                },
                "label_name": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Label or category name for the effect. Required for category/deductible/field effects."
                },
                "value": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Effect value. Usage varies by action: category option name for Set/Remove Category Option, code string for Set Field Value, error message for Validation Error, deliverable ID for Generate Deliverable, integration instance ID for Attach Property Valuation."
                },
                "mandatory": {
                  "type": "boolean",
                  "default": false,
                  "description": "Whether the effect creates a mandatory coverage"
                },
                "hard_reverse": {
                  "type": "boolean",
                  "default": false,
                  "description": "Whether to hard reverse the effect when conditions are no longer met"
                },
                "hide_category": {
                  "type": "boolean",
                  "default": false,
                  "description": "Whether to hide the category in the UI (optional for Set Category Option)"
                },
                "popup_message": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Message text for 'Add Popup Message' or 'Block Quote' effects"
                },
                "custom_error_code_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid",
                  "description": "UUID of the custom error code. Required for 'Set STP Error' effects."
                }
              },
              "required": [
                "action"
              ]
            }
          }
        },
        "required": [
          "policy_type_id",
          "name",
          "category",
          "module"
        ]
      },
      "request-create_sub_line": {
        "type": "object",
        "description": "Request Schema for /api/v2/lines/create_sub_line",
        "allOf": [
          {
            "$ref": "#/components/schemas/sub_line_def-def"
          }
        ],
        "required": [
          "policy_type_id",
          "name",
          "category",
          "type"
        ]
      },
      "request-create_subjectivity": {
        "type": "object",
        "description": "Request schema for /api/v2/subjectivities/create_subjectivity",
        "properties": {
          "revision_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the revision"
          },
          "external_system_reference": {
            "type": "string",
            "description": "Reference to the revision in an external system"
          },
          "subjectivity_definition_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the subjectivity definition"
          },
          "status": {
            "type": "string",
            "enum": [
              "Satisfied",
              "Not Satisfied",
              "Waived",
              "Expired",
              "Canceled"
            ],
            "description": "Status of the subjectivity"
          },
          "due_date": {
            "type": "string",
            "format": "date-time",
            "description": "Due date for this subjectivity to be met before"
          },
          "assignee": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the assignee"
          },
          "description": {
            "type": "string",
            "description": "Description of the subjectivity"
          },
          "statement": {
            "type": "string",
            "description": "Statement for the subjectivity. Copied from the subjectivity definition if not provided."
          }
        },
        "required": [
          "subjectivity_definition_id",
          "status"
        ]
      },
      "request-create_subjectivity_definition": {
        "type": "object",
        "description": "Request schema for /api/v2/subjectivities/create_subjectivity_definition",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 100,
            "description": "Name for the subjectivity definition"
          },
          "description": {
            "type": "string",
            "maxLength": 500,
            "description": "Description for the subjectivity definition"
          },
          "policy_type_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the associated policy type"
          },
          "mandatory": {
            "type": "boolean",
            "description": "true for mandatory and false for non-mandatory. Default is false"
          },
          "active": {
            "type": "boolean",
            "description": "true for active and false for inactive. Default is true"
          },
          "due_within_days": {
            "type": "integer",
            "minimum": 0,
            "description": "Days the subjectivity definition is due within"
          },
          "due_date_type": {
            "type": "string",
            "enum": [
              "Pre Bind",
              "Post Bind",
              "Post Issue"
            ],
            "description": "Type of due date (e.g., Post Bind, Post Issue)"
          },
          "statement": {
            "type": "string",
            "description": "Statement for the subjectivity definition"
          }
        },
        "required": [
          "name",
          "mandatory",
          "active"
        ]
      },
      "request-create_system_tags": {
        "type": "object",
        "description": "Request Schema for /api/v2/settings/create_system_tags",
        "properties": {
          "system_tags": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "Name of the System Tag"
                },
                "required": {
                  "type": "boolean",
                  "default": false,
                  "description": "Whether the System Tag is required"
                },
                "show_on_declaration": {
                  "type": "boolean",
                  "default": false,
                  "description": "Whether the System Tag is shown on the Declaration"
                },
                "tag_type": {
                  "type": "string",
                  "enum": [
                    "VENDOR",
                    "REPORT",
                    "INTERNAL",
                    "CUSTOM"
                  ],
                  "default": "CUSTOM"
                },
                "tag_for": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "LINE",
                      "POLICY_TYPE",
                      "POLICY_TYPE_ITEM",
                      "SUB_LINE",
                      "CATEGORY",
                      "QUESTION",
                      "QUESTION_OPTION",
                      "CLAIM",
                      "CONTACT",
                      "POLICY"
                    ]
                  }
                },
                "style": {
                  "type": "string",
                  "enum": [
                    "TEXT",
                    "CHECKBOX",
                    "SELECT"
                  ],
                  "default": "TEXT"
                }
              },
              "required": [
                "name"
              ]
            }
          }
        },
        "required": [
          "system_tags"
        ]
      },
      "request-create_task": {
        "type": "object",
        "description": "Request payload for /api/v2/tasks/create_task. A task is attached to exactly ONE of claim_id / policy_id (providing both is rejected). Unattached tasks (neither id) are accepted only when the tenant's Underwriting module toggle (underwriting / feature-toggle-enable-underwriting-module) is on; they land in the triage bucket and can later be attached via modify_task.",
        "properties": {
          "claim_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Optional ID of the claim associated with this task. Mutually exclusive with policy_id."
          },
          "policy_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Optional ID of the policy associated with this task. Mutually exclusive with claim_id."
          },
          "task_definition_id": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of the task definition to use when creating this task."
          },
          "description": {
            "type": "string",
            "description": "Description of the task."
          },
          "priority": {
            "type": "string",
            "enum": [
              "Low",
              "Medium",
              "High"
            ],
            "description": "Priority level of the task."
          },
          "due_date": {
            "type": "string",
            "format": "date-time",
            "description": "When this task is due (must be greater than or equal to today)."
          },
          "assignee_id": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of the user to assign this task to."
          },
          "mandatory": {
            "type": "boolean",
            "description": "Whether this task is mandatory.",
            "default": false
          },
          "orkes_task_id": {
            "type": "string",
            "description": "The Orkes workflow task ID associated with this task."
          }
        },
        "required": [
          "task_definition_id"
        ],
        "not": {
          "description": "A task cannot be attached to both a claim and a policy.",
          "type": "object",
          "properties": {
            "claim_id": {
              "type": "string"
            },
            "policy_id": {
              "type": "string"
            }
          },
          "required": [
            "claim_id",
            "policy_id"
          ]
        }
      },
      "request-create_task_definition": {
        "type": "object",
        "description": "Request payload for /api/v2/tasks/create_task_definition",
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the task definition."
          },
          "scope": {
            "type": "string",
            "enum": [
              "claim",
              "policy"
            ],
            "description": "The scope of the task definition (claim or policy)."
          },
          "description": {
            "type": "string",
            "description": "Description of the task definition."
          }
        },
        "required": [
          "name",
          "scope"
        ]
      },
      "request-create_task_definitions_assignees": {
        "type": "object",
        "description": "Request payload for /api/v2/tasks/create_task_definitions_assignees",
        "properties": {
          "task_definition_id": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of the task definition to assign roles and user groups to."
          },
          "role_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "List of role IDs to assign to the task definition.",
            "default": []
          },
          "user_group_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "List of user group IDs to assign to the task definition.",
            "default": []
          },
          "added_by": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The ID of the user creating the assignments."
          }
        },
        "required": [
          "task_definition_id"
        ]
      },
      "request-create_task_note": {
        "type": "object",
        "description": "Request payload for /api/v2/tasks/create_task_note",
        "properties": {
          "task_id": {
            "type": "string",
            "format": "uuid",
            "description": "The id of the task the note belongs to."
          },
          "contents": {
            "type": "string",
            "minLength": 1,
            "maxLength": 10000,
            "description": "The note body."
          },
          "share_to_policy": {
            "type": "boolean",
            "default": false,
            "description": "Also publish the note to the task's policy, where it appears on the Notes tab. Needs no permission beyond this endpoint's own, but the task must be attached to a policy. Defaults to false and cannot be changed after the note is written."
          }
        },
        "required": [
          "task_id",
          "contents"
        ]
      },
      "request-create_template_risk_default_value": {
        "type": "object",
        "description": "Request schema for /api/v2/quick_quote_templates/create_template_risk_default_value",
        "properties": {
          "quick_quote_template_id": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of the Quick Quote Template this risk value belongs to"
          },
          "risk_defaults": {
            "description": "Risk-specific data structure that varies based on risk_type",
            "oneOf": [
              {
                "title": "Property Risk Value",
                "$ref": "#/components/schemas/property_template-def"
              },
              {
                "title": "Vehicle Risk Value",
                "$ref": "#/components/schemas/vehicle_template-def"
              },
              {
                "title": "Watercraft Risk Value",
                "$ref": "#/components/schemas/watercraft_template-def"
              },
              {
                "title": "Driver Risk Value",
                "$ref": "#/components/schemas/driver_template-def"
              }
            ]
          },
          "risk_type": {
            "type": "string",
            "enum": [
              "Property",
              "Vehicle",
              "Driver",
              "Watercraft"
            ],
            "description": "The type of risk (Property, Vehicle, Driver, or Watercraft)"
          },
          "version": {
            "type": "integer",
            "default": 1,
            "description": "Version number for the risk default value"
          }
        },
        "required": [
          "quick_quote_template_id",
          "risk_defaults",
          "risk_type"
        ]
      },
      "request-create_watercraft": {
        "type": "object",
        "description": "Request Schema for /api/v2/watercrafts/create_watercraft",
        "properties": {
          "watercraft": {
            "allOf": [
              {
                "$ref": "#/components/schemas/watercraft-def"
              },
              {
                "type": "object",
                "properties": {
                  "quote_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "ID of the associated quote"
                  }
                },
                "required": [
                  "quote_id"
                ],
                "not": {}
              }
            ]
          },
          "skip_rules": {
            "type": "boolean",
            "default": false,
            "description": "Whether to skip business rules validation"
          }
        },
        "required": [
          "watercraft"
        ]
      },
      "request-decline_pending_payment": {
        "description": "Request schema for /api/v2/payments/decline_pending_payment",
        "type": "object",
        "properties": {
          "payment_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Unique identifier for the payment to decline. Exactly one of payment_id or reference_id must be provided."
          },
          "reference_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "External reference identifier for the payment to decline. Exactly one of payment_id or reference_id must be provided."
          },
          "integration_instance_external_id": {
            "type": "string",
            "description": "External ID of the integration instance."
          },
          "vendor_message": {
            "type": "string",
            "description": "Message from the vendor explaining the reason for declining the payment."
          },
          "requester_contact_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Optional. Contact id of the BriteCore user who originated the payment, derived from the authenticated user by request_payment_entry and echoed back via the Stripe PaymentIntent metadata. When provided, the \"Payment Declined\" policy note is attributed to that user instead of the integration service account (srv_integrations). See BC-19725."
          }
        },
        "required": [
          "integration_instance_external_id",
          "vendor_message"
        ]
      },
      "request-delete_additional_interest": {
        "type": "object",
        "description": "Request payload for /api/v2/additional_interests/delete_additional_interest.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Additional interest ID to delete"
          }
        },
        "required": [
          "id"
        ]
      },
      "request-delete_adjuster_license": {
        "type": "object",
        "description": "Request payload for /api/v2/contacts/delete_adjuster_license.",
        "required": [
          "license_id"
        ],
        "properties": {
          "license_id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the license to delete"
          }
        }
      },
      "request-delete_brand": {
        "description": "Request payload for /api/v2/brands/delete_brand",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique identifier of the brand to delete"
          }
        },
        "required": [
          "id"
        ]
      },
      "request-delete_calculated_field": {
        "type": "object",
        "description": "Request payload for /api/v2/document_templates/delete_calculated_field",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the field to delete"
          }
        },
        "required": [
          "id"
        ]
      },
      "request-delete_config": {
        "type": "object",
        "description": "Request payload for /api/v2/convenience_fees/delete_config. Removes a per-state scope's convenience-fee rows so reads fall back to the broader tier. Admin-only. Global cannot be reset, so location_id is required.",
        "properties": {
          "location_id": {
            "type": "string",
            "format": "uuid",
            "description": "Business-location UUID whose override should be removed."
          }
        },
        "required": [
          "location_id"
        ]
      },
      "request-delete_copilot_skill": {
        "type": "object",
        "description": "Request schema for /api/v2/copilot_skills/delete_copilot_skill",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the copilot skill to delete"
          }
        },
        "required": [
          "id"
        ]
      },
      "request-delete_custom_error_code": {
        "type": "object",
        "description": "Request schema for /api/v2/configurations/delete_custom_error_code",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The error code ID to delete"
          }
        },
        "required": [
          "id"
        ]
      },
      "request-delete_dispute": {
        "type": "object",
        "description": "Request Schema for /api/v2/disputes/delete_dispute",
        "properties": {
          "dispute_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the dispute to delete"
          }
        },
        "required": [
          "dispute_id"
        ]
      },
      "request-delete_full_quote": {
        "type": "object",
        "description": "Request Schema for delete_full_quote",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Quote ID"
          },
          "external_system_reference": {
            "type": "string",
            "description": "Reference to the quote in an external system"
          }
        }
      },
      "request-delete_html_template": {
        "type": "object",
        "description": "Request payload for /api/v2/deliverables/delete_html_template",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the template to delete."
          }
        },
        "required": [
          "name"
        ]
      },
      "request-delete_quick_code_value": {
        "type": "object",
        "description": "Request payload for /api/v2/quick_code_values/delete_quick_code_value.",
        "properties": {
          "code_value_type": {
            "type": "string",
            "description": "The unique code value identifier to delete",
            "maxLength": 100
          },
          "quick_code": {
            "type": "string",
            "description": "The quick code identifier this value belongs to",
            "maxLength": 100
          }
        },
        "required": [
          "code_value_type",
          "quick_code"
        ]
      },
      "request-delete_quick_quote_template": {
        "type": "object",
        "description": "Request schema for /api/v2/quick_quote_templates/delete_quick_quote_template",
        "properties": {
          "template_id": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of the Quick Quote Template to delete"
          }
        },
        "required": [
          "template_id"
        ]
      },
      "request-delete_rule": {
        "type": "object",
        "description": "Request payload for /api/v2/rules/delete_rule",
        "properties": {
          "rule_id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the rule to delete"
          }
        },
        "required": [
          "rule_id"
        ]
      },
      "request-delete_sub_line": {
        "type": "object",
        "description": "Request payload for /api/v2/lines/delete_sub_line",
        "properties": {
          "id": {
            "type": "string",
            "description": "UUID of the subline to delete"
          }
        },
        "required": [
          "id"
        ]
      },
      "request-delete_subjectivity": {
        "type": "object",
        "description": "Request schema for /api/v2/subjectivities/delete_subjectivity",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the subjectivity to delete"
          }
        },
        "required": [
          "id"
        ]
      },
      "request-delete_task_definition": {
        "type": "object",
        "description": "Request schema for /api/v2/tasks/delete_task_definition",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of the Task Definition to delete"
          }
        },
        "required": [
          "id"
        ]
      },
      "request-delete_template_risk_default_value": {
        "type": "object",
        "description": "Request schema for /api/v2/quick_quote_templates/delete_template_risk_default_value",
        "properties": {
          "value_id": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of the Template Risk Default Value to delete"
          }
        },
        "required": [
          "value_id"
        ]
      },
      "request-delete_watercraft": {
        "type": "object",
        "description": "Request Schema for /api/v2/watercrafts/delete_watercraft",
        "properties": {
          "id": {
            "type": "string",
            "description": "The ID of the watercraft to delete"
          }
        },
        "required": [
          "id"
        ]
      },
      "request-disbursement_funding_archive_account": {
        "description": "Request schema for /api/v2/disbursement_funding/archive_account",
        "type": "object",
        "properties": {
          "financial_account_id": {
            "type": "string",
            "format": "uuid",
            "description": "The BriteCore anchor to archive."
          }
        },
        "required": [
          "financial_account_id"
        ]
      },
      "request-disbursement_funding_check_source_balance": {
        "description": "Request schema for /api/v2/disbursement_funding/check_source_balance",
        "type": "object",
        "properties": {
          "integration_instance_id": {
            "type": "string",
            "format": "uuid",
            "description": "The funding integration instance, from describe_connection."
          },
          "funding_source_id": {
            "type": "string",
            "format": "uuid",
            "description": "The BriteCore funding-source row id, from list_funding_sources. A source the vendor lists but BriteCore has never linked has a null source_id there and cannot be checked until it is linked."
          }
        },
        "required": [
          "integration_instance_id",
          "funding_source_id"
        ]
      },
      "request-disbursement_funding_describe_connection": {
        "description": "Request schema for /api/v2/disbursement_funding/describe_connection",
        "type": "object",
        "properties": {},
        "required": []
      },
      "request-disbursement_funding_get_financial_account_balance": {
        "description": "Request schema for /api/v2/disbursement_funding/get_financial_account_balance",
        "type": "object",
        "properties": {
          "integration_instance_id": {
            "type": "string",
            "format": "uuid",
            "description": "The funding integration instance, from describe_connection."
          },
          "financial_account_id": {
            "type": "string",
            "format": "uuid",
            "description": "The BriteCore financial-account anchor to read, from reconcile_view. The stored vendor handle is resolved server-side; a vendor reference is deliberately NOT accepted here."
          }
        },
        "required": [
          "integration_instance_id",
          "financial_account_id"
        ]
      },
      "request-disbursement_funding_link_funding_source": {
        "description": "Request schema for /api/v2/disbursement_funding/link_funding_source",
        "type": "object",
        "properties": {
          "integration_instance_id": {
            "type": "string",
            "format": "uuid",
            "description": "The funding integration instance, from describe_connection."
          },
          "vendor_reference_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "description": "The live vendor source handle to link."
          },
          "priority": {
            "type": "integer",
            "minimum": 1,
            "description": "Waterfall position; defaults to 1 when omitted."
          }
        },
        "required": [
          "integration_instance_id",
          "vendor_reference_id"
        ]
      },
      "request-disbursement_funding_list_financial_account_transactions": {
        "description": "Request schema for /api/v2/disbursement_funding/list_financial_account_transactions",
        "type": "object",
        "properties": {
          "integration_instance_id": {
            "type": "string",
            "format": "uuid",
            "description": "The funding integration instance, from describe_connection."
          },
          "financial_account_id": {
            "type": "string",
            "format": "uuid",
            "description": "The BriteCore financial-account anchor whose ledger to read, from reconcile_view. The stored vendor handle is resolved server-side."
          },
          "cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Opaque vendor pagination cursor. Omit for the first page; pass the previous response's next_pagination_cursor for the next. User-paged ('Load more'), not a background sweep."
          }
        },
        "required": [
          "integration_instance_id",
          "financial_account_id"
        ]
      },
      "request-disbursement_funding_list_funding_requests": {
        "description": "Request schema for /api/v2/disbursement_funding/list_funding_requests. Takes no integration_instance_id: this reads BriteCore's own append-only log by financial-account id and makes no vendor call, so there is no instance to dispatch against.",
        "type": "object",
        "properties": {
          "financial_account_id": {
            "type": "string",
            "format": "uuid",
            "description": "The BriteCore financial-account anchor whose money-IN log to read."
          },
          "limit": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "maximum": 100,
            "description": "Page size, default 25 and capped at 100. Out-of-range and missing values are clamped rather than rejected: a bad page size on a read has an obvious safe answer, unlike a bad id. The cap is what matters -- the log is never pruned."
          },
          "offset": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "description": "Rows to skip, default 0. Combined with has_more this drives Load more."
          }
        },
        "required": [
          "financial_account_id"
        ]
      },
      "request-disbursement_funding_list_funding_sources": {
        "description": "Request schema for /api/v2/disbursement_funding/list_funding_sources",
        "type": "object",
        "properties": {
          "integration_instance_id": {
            "type": "string",
            "format": "uuid",
            "description": "The funding integration instance, from describe_connection."
          }
        },
        "required": [
          "integration_instance_id"
        ]
      },
      "request-disbursement_funding_manage_account": {
        "description": "Request schema for /api/v2/disbursement_funding/manage_account",
        "type": "object",
        "properties": {
          "integration_instance_id": {
            "type": "string",
            "format": "uuid",
            "description": "The funding integration instance, from describe_connection."
          },
          "vendor_reference_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "description": "The discoverable vendor account handle to onboard."
          }
        },
        "required": [
          "integration_instance_id",
          "vendor_reference_id"
        ]
      },
      "request-disbursement_funding_reconcile_view": {
        "description": "Request schema for /api/v2/disbursement_funding/reconcile_view",
        "type": "object",
        "properties": {
          "integration_instance_id": {
            "type": "string",
            "format": "uuid",
            "description": "The funding integration instance, from describe_connection."
          }
        },
        "required": [
          "integration_instance_id"
        ]
      },
      "request-disbursement_funding_request_source_entry": {
        "description": "Request schema for /api/v2/disbursement_funding/request_source_entry",
        "type": "object",
        "properties": {
          "integration_instance_id": {
            "type": "string",
            "format": "uuid",
            "description": "The funding integration instance, from describe_connection."
          }
        },
        "required": [
          "integration_instance_id"
        ]
      },
      "request-disbursement_funding_set_source_priority": {
        "description": "Request schema for /api/v2/disbursement_funding/set_source_priority",
        "type": "object",
        "properties": {
          "funding_source_id": {
            "type": "string",
            "format": "uuid",
            "description": "The stored BriteCore source row."
          },
          "priority": {
            "type": "integer",
            "minimum": 1,
            "description": "New waterfall position; 1 is tried first."
          }
        },
        "required": [
          "funding_source_id",
          "priority"
        ]
      },
      "request-disbursement_funding_top_up": {
        "description": "Request schema for /api/v2/disbursement_funding/top_up. THIS MOVES MONEY. Note what is deliberately absent: no initiated_by_contact_id (the initiator is pinned to the authenticated session server-side, because the permission gate proves the caller MAY move money, not that they ARE the submitted initiator) and no vendor references (the pull rides on the stored anchors, so a caller cannot aim it at another vendor account under the same instance).",
        "type": "object",
        "properties": {
          "integration_instance_id": {
            "type": "string",
            "format": "uuid",
            "description": "The funding integration instance, from describe_connection."
          },
          "financial_account_id": {
            "type": "string",
            "format": "uuid",
            "description": "The BriteCore financial-account anchor to pull money INTO."
          },
          "funding_source_id": {
            "type": "string",
            "format": "uuid",
            "description": "The BriteCore funding-source row to pull money FROM, from list_funding_sources. Must already be linked; a never-linked source has a null source_id there."
          },
          "amount": {
            "type": [
              "string",
              "number"
            ],
            "description": "Amount in DOLLARS. Whole cents only -- a sub-cent value is refused rather than rounded, and zero is refused outright. Validated in the service against the funding schema before any vendor call."
          },
          "request_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 36,
            "description": "Caller-supplied idempotency key, and ALSO the vendor Idempotency-Key. MINT THIS WHEN THE ADD MONEY MODAL OPENS, not on submit: that is what makes a double-click dedupe to one pull. Re-sending the same id replays the recorded outcome; re-sending it with a DIFFERENT amount, account, or source is rejected, so a client bug cannot masquerade as idempotent success."
          }
        },
        "required": [
          "integration_instance_id",
          "financial_account_id",
          "funding_source_id",
          "amount",
          "request_id"
        ]
      },
      "request-disbursements_admin_terminate": {
        "description": "Request schema for /api/v2/disbursements/admin_terminate",
        "type": "object",
        "properties": {
          "disbursement_attempt_id": {
            "type": "string",
            "format": "uuid",
            "description": "The pending ACH attempt to terminate."
          },
          "justification": {
            "type": "string",
            "minLength": 1,
            "pattern": "\\S",
            "description": "Operator justification (required; must not be blank/whitespace)."
          }
        },
        "required": [
          "disbursement_attempt_id",
          "justification"
        ]
      },
      "request-disbursements_aggregates": {
        "description": "Request schema for /api/v2/disbursements/aggregates",
        "type": "object",
        "properties": {
          "transaction_type": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "Commission Payment",
                  "Return Premium",
                  "Claim Payment"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Filter by transaction type."
          },
          "rail": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "ach",
                  "check",
                  "manual"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Filter by rail."
          },
          "integration_instance_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "description": "Filter by integration instance."
          },
          "added_from": {
            "type": [
              "string",
              "null"
            ],
            "description": "Inclusive dateAdded lower bound (ISO date/datetime); mirrors the list grid so a date-filtered view gets a matching aggregate card.",
            "pattern": "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])([ T]([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d)?$"
          },
          "added_to": {
            "type": [
              "string",
              "null"
            ],
            "description": "Inclusive dateAdded upper bound (date-only widened to end-of-day).",
            "pattern": "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])([ T]([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d)?$"
          }
        },
        "required": []
      },
      "request-disbursements_cancel": {
        "description": "Request schema for /api/v2/disbursements/cancel",
        "type": "object",
        "properties": {
          "disbursement_attempt_id": {
            "type": "string",
            "format": "uuid",
            "description": "The in_transit ACH attempt to cancel."
          },
          "justification": {
            "type": "string",
            "minLength": 1,
            "pattern": "\\S",
            "description": "Operator justification (required; must not be blank/whitespace)."
          }
        },
        "required": [
          "disbursement_attempt_id",
          "justification"
        ]
      },
      "request-disbursements_check_vendor": {
        "description": "Request schema for /api/v2/disbursements/check_vendor",
        "type": "object",
        "properties": {
          "disbursement_attempt_id": {
            "type": "string",
            "format": "uuid",
            "description": "The pending ACH attempt to reconcile."
          }
        },
        "required": [
          "disbursement_attempt_id"
        ]
      },
      "request-disbursements_get_detail": {
        "description": "Request schema for /api/v2/disbursements/get_detail",
        "type": "object",
        "properties": {
          "disbursement_attempt_id": {
            "type": "string",
            "format": "uuid",
            "description": "The disbursement attempt id."
          }
        },
        "required": [
          "disbursement_attempt_id"
        ]
      },
      "request-disbursements_issue": {
        "description": "Request schema for /api/v2/disbursements/issue",
        "type": "object",
        "properties": {
          "integration_instance_id": {
            "type": "string",
            "format": "uuid",
            "description": "Active ACH_ISSUANCE instance id."
          },
          "items": {
            "type": "array",
            "minItems": 1,
            "maxItems": 5000,
            "items": {
              "type": "object",
              "properties": {
                "commission_payment_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Commission payment id."
                },
                "payment_method_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "ACH payment method id."
                }
              },
              "required": [
                "commission_payment_id",
                "payment_method_id"
              ]
            },
            "description": "Commission Payment issuance items."
          }
        },
        "required": [
          "integration_instance_id",
          "items"
        ]
      },
      "request-disbursements_list_disbursements": {
        "description": "Request schema for /api/v2/disbursements/list_disbursements",
        "type": "object",
        "properties": {
          "transaction_type": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "Commission Payment",
                  "Return Premium",
                  "Claim Payment"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Route to by-type when set."
          },
          "state": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "pending",
                  "in_transit",
                  "settled",
                  "failed"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Filter by disbursement state."
          },
          "rail": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "ach",
                  "check",
                  "manual"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Filter by rail."
          },
          "integration_instance_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "description": "Filter by integration instance."
          },
          "added_from": {
            "type": [
              "string",
              "null"
            ],
            "description": "Inclusive dateAdded lower bound (ISO date/datetime).",
            "pattern": "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])([ T]([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d)?$"
          },
          "added_to": {
            "type": [
              "string",
              "null"
            ],
            "description": "Inclusive dateAdded upper bound (date-only widened to end-of-day).",
            "pattern": "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])([ T]([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d)?$"
          },
          "page": {
            "type": [
              "integer",
              "null"
            ],
            "description": "1-based page number (>= 1).",
            "minimum": 1
          },
          "page_size": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Page size (1..200).",
            "minimum": 1,
            "maximum": 200
          }
        },
        "required": []
      },
      "request-disbursements_needs_attention": {
        "description": "Request schema for /api/v2/disbursements/needs_attention",
        "type": "object",
        "properties": {
          "transaction_type": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "Commission Payment",
                  "Return Premium",
                  "Claim Payment"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Filter by transaction type."
          },
          "rail": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "ach",
                  "check",
                  "manual"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Filter by rail (mirrors the list grid). No state filter -- the surface is inherently the terminal failed set."
          },
          "integration_instance_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "description": "Filter by integration instance."
          },
          "added_from": {
            "type": [
              "string",
              "null"
            ],
            "description": "Inclusive dateAdded lower bound (ISO date/datetime); mirrors the list grid so a date-filtered view gets a matching worklist total.",
            "pattern": "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])([ T]([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d)?$"
          },
          "added_to": {
            "type": [
              "string",
              "null"
            ],
            "description": "Inclusive dateAdded upper bound (date-only widened to end-of-day).",
            "pattern": "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])([ T]([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d)?$"
          },
          "page": {
            "type": [
              "integer",
              "null"
            ],
            "description": "1-based page number (>= 1).",
            "minimum": 1
          },
          "page_size": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Page size (1..200).",
            "minimum": 1,
            "maximum": 200
          }
        },
        "required": []
      },
      "request-disbursements_obligation_history": {
        "description": "Request schema for /api/v2/disbursements/obligation_history",
        "type": "object",
        "properties": {
          "transaction_type": {
            "enum": [
              "Commission Payment",
              "Return Premium",
              "Claim Payment"
            ],
            "description": "Obligation transaction type."
          },
          "transaction_id": {
            "type": "string",
            "format": "uuid",
            "description": "Obligation transaction id."
          }
        },
        "required": [
          "transaction_type",
          "transaction_id"
        ]
      },
      "request-disbursements_record_manual": {
        "description": "Request schema for /api/v2/disbursements/record_manual",
        "type": "object",
        "properties": {
          "transaction_type": {
            "enum": [
              "Commission Payment",
              "Return Premium",
              "Claim Payment"
            ],
            "description": "Obligation transaction type."
          },
          "transaction_id": {
            "type": "string",
            "format": "uuid",
            "description": "Obligation transaction id."
          },
          "amount": {
            "type": [
              "string",
              "number"
            ],
            "minimum": 0.01,
            "maximum": 90071992547409.9,
            "description": "Amount (USD, 2 decimal places), between 0.01 and 90071992547409.91 (DISBURSEMENT_AMOUNT_MIN..DISBURSEMENT_AMOUNT_MAX). For a Commission Payment the server DERIVES the amount from the commission source and ignores this value; it is authoritative only for non-commission obligations. minimum/maximum bind when a JSON number is sent; a string form is coerced and range-checked server-side."
          },
          "direct_payee_contact_id": {
            "type": "string",
            "format": "uuid",
            "description": "Payee contact id."
          },
          "justification": {
            "type": "string",
            "minLength": 1,
            "pattern": "\\S",
            "description": "Operator justification (required; must not be blank/whitespace)."
          },
          "check_number": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 32,
            "description": "Optional check number."
          },
          "external_reference": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255,
            "description": "Optional external reference (max 255 chars); persisted into the encrypted method_details audit blob."
          }
        },
        "required": [
          "transaction_type",
          "transaction_id",
          "amount",
          "direct_payee_contact_id",
          "justification"
        ]
      },
      "request-disbursements_source_enrichment": {
        "description": "Request schema for /api/v2/disbursements/source_enrichment",
        "type": "object",
        "properties": {
          "disbursement_attempt_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "minItems": 1,
            "maxItems": 200,
            "description": "Attempt ids to enrich (1 to 200)."
          }
        },
        "required": [
          "disbursement_attempt_ids"
        ]
      },
      "request-disbursements_unissued_obligations": {
        "description": "Request schema for /api/v2/disbursements/unissued_obligations (BC-24980). Commission obligations that are claimable but have no disbursement attempt yet, tagged ready_to_send / awaiting_funds by the same funding-gate verdict the commission export applies. Requires britecore/payments/disbursements (r).",
        "type": "object",
        "properties": {
          "transaction_type": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "Commission Payment"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional. Only Commission Payment is accepted in this build (the one obligation type with an engine-read queue); any other value is a validation error, not an empty page."
          },
          "page": {
            "type": [
              "integer",
              "null"
            ],
            "description": "1-based page number (>= 1).",
            "minimum": 1
          },
          "page_size": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Page size (1..200).",
            "minimum": 1,
            "maximum": 200
          }
        },
        "required": []
      },
      "request-documents_templates": {
        "type": "object",
        "description": "Request Schema for POST /api/v2/agents/documents_templates. Authentication is handled via the api_key parameter (passed for BriteCore API authentication).",
        "properties": {
          "api_key": {
            "type": "string",
            "description": "API key for BriteCore authentication"
          },
          "prompt": {
            "type": "string",
            "description": "The user's message/question"
          },
          "session_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "description": "Session ID for conversation continuity"
          },
          "context": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Template editor context (entity type, policy number, policy type, deliverable ID) - human-readable summary for the LLM."
          },
          "initial_state_params": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "JSON-encoded structured editor params for the agent state. Document Templates uses keys: deliverable_id, entity_number, entity_type, policy_type_name. Forwarded verbatim to AIAgents' initial_state_params; each agent's merge_initial_params hook decides what to do with it."
          }
        },
        "required": [
          "api_key",
          "prompt"
        ]
      },
      "request-documents_templates_carbone_context": {
        "type": "object",
        "description": "Request Schema for POST /api/v2/agents/documents_templates_carbone_context. Returns the Carbone context the Documents and Forms Copilot should reason over, with calculated fields applied and a schema map attached. With an entity_number it is that entity's live context; without one it is an EXAMPLE context - the shipped fixture, or, when policy_type_name resolves a policy type, that policy type's own configured line items. Called by the bc-documents-templates MCP server. Authentication is handled via the api_key parameter.",
        "properties": {
          "api_key": {
            "type": "string",
            "description": "API key for BriteCore authentication"
          },
          "entity_number": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Policy or claim number. When present, returns the live SQLRunner-derived context for that entity. When absent, returns the canonical example context shipped with BriteCore."
          },
          "entity_type": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "policy",
                  "claim"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Either 'policy' or 'claim'. Defaults to 'policy'. Authoritative only when entity_number is provided; the MCP server omits it otherwise. In example mode the DELIVERABLE decides which fixture is returned (see deliverable_id), so a claim template is not served the policy example just because the caller defaulted."
          },
          "deliverable_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "description": "XReportLocation id of the deliverable being authored. Drives the calculated-field schema scope: globals only when absent, globals plus template-scoped fields when present. In example mode it also decides which fixture is returned - the deliverable's own module (policies/claims) wins over entity_type."
          },
          "policy_type_name": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The Carbone-template page's policy-type dropdown selection. EXAMPLE MODE: this is what makes the returned items this site's rather than the fixture's - they are generated from that policy type's configured policy_type_items, with the real names a [name='...'] filter must match. LIVE MODE: a validator only. Absent, the fixture's own items are returned."
          },
          "location_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business location narrowing policy_type_name to one location's configuration. Absent ('All Locations Default') the name may resolve several policy types across locations and their configured items are merged."
          }
        },
        "required": [
          "api_key"
        ]
      },
      "request-documents_templates_download": {
        "type": "object",
        "description": "Request Schema for GET /api/v2/agents/documents_templates_download. Returns binary file content generated by the Documents and Forms Copilot.",
        "properties": {
          "api_key": {
            "type": "string",
            "description": "API key for BriteCore authentication"
          },
          "session_id": {
            "type": "string",
            "description": "Agent session ID (returned in the SSE start event)"
          },
          "filename": {
            "type": "string",
            "description": "File to download (e.g., document_template.docx). Must not contain path traversal characters (.. / \\)"
          }
        },
        "required": [
          "api_key",
          "session_id",
          "filename"
        ]
      },
      "request-documents_templates_stream": {
        "type": "object",
        "description": "Request Schema for POST /api/v2/agents/documents_templates_stream",
        "properties": {
          "api_key": {
            "type": "string",
            "description": "API key for authentication"
          },
          "prompt": {
            "type": "string",
            "description": "The user's message/question"
          },
          "session_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "description": "Session ID for conversation continuity"
          },
          "context": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Template editor context (entity type, policy number, policy type, deliverable ID) - human-readable summary for the LLM."
          },
          "initial_state_params": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "JSON-encoded structured editor params for the agent state. Document Templates uses keys: deliverable_id, entity_number, entity_type, policy_type_name. Forwarded verbatim to AIAgents' initial_state_params; each agent's merge_initial_params hook decides what to do with it."
          }
        },
        "required": [
          "api_key",
          "prompt"
        ]
      },
      "request-download_import_schema": {
        "type": "object",
        "description": "Request schema for /api/v2/imports/download_import_schema",
        "properties": {
          "schema_type": {
            "type": "string",
            "description": "Type of schema to generate. If omitted, returns all fixed schemas.",
            "examples": [
              "insureds",
              "agencies",
              "producers",
              "mortgagees",
              "additional_insured",
              "dates_to_remember",
              "addresses",
              "payments",
              "account_history",
              "notes",
              "credit_reports",
              "policy_transactions"
            ]
          },
          "policy_type_id": {
            "type": "string",
            "format": "uuid",
            "description": "Policy type UUID. Required for dynamic schemas like policy_transactions. If provided without schema_type, returns all schemas for that policy type."
          }
        }
      },
      "request-download_report_file": {
        "type": "object",
        "description": "Request schema for /api/v2/reports/download_report_file",
        "properties": {
          "file_id": {
            "type": "string",
            "format": "uuid",
            "title": "file_id",
            "description": "The id of the report file to download"
          },
          "as_url": {
            "type": "boolean",
            "title": "as_url",
            "description": "Answer 200 with the presigned url in the body instead of a 303 to it. Browsers need this, because fetch() follows a redirect as a cross-origin request and the storage buckets carry no CORS configuration. The gateway passes this field through untyped, so strings are coerced: \"1\", \"true\", \"yes\" and \"on\" are true, anything else is false."
          }
        },
        "required": [
          "file_id"
        ]
      },
      "request-edit_attachment": {
        "type": "object",
        "description": "Request Schema for /api/v2/attachments/edit_attachment. Partial metadata update: only supplied writable fields are persisted (title, description, code_value_type, quick_code). tag is an alias for code_value_type. reference_type / reference_id / claim_id are optional ownership hints used when hardening delegated edits.",
        "properties": {
          "attachment": {
            "allOf": [
              {
                "$ref": "#/components/schemas/file-def"
              },
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "ID of the attachment to edit"
                  }
                },
                "required": [
                  "id"
                ]
              }
            ]
          },
          "reference_type": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "claims",
              "policies",
              "contacts",
              null
            ],
            "description": "Expected owning entity type when hardening the edit. Must match the attachment's type."
          },
          "reference_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Expected owning entity id when hardening the edit. Must match the attachment's reference_id."
          },
          "claim_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Legacy claim ownership hint. Same as reference_id when the attachment belongs to a claim; ignored if reference_id is also supplied."
          }
        },
        "required": [
          "attachment"
        ]
      },
      "request-enable_business_location_with_all_counties": {
        "type": "object",
        "description": "Request payload for /api/v2/business_locations/enable_business_location_with_all_counties",
        "properties": {
          "location_id": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of the business location to enable"
          },
          "country": {
            "type": "string",
            "enum": [
              "US",
              "CA"
            ],
            "description": "Country code ('US' or 'CA'), defaults to 'US'"
          }
        },
        "required": [
          "location_id"
        ]
      },
      "request-enable_disable_contact": {
        "description": "Request payload for /api/v2/contacts/enable_or_disable_contact",
        "type": "object",
        "properties": {
          "contact_id": {
            "type": "string",
            "description": "The unique identifier of the contact"
          },
          "active": {
            "type": "boolean",
            "description": "The status of the contact. True to enable, false to disable. Default is false"
          }
        },
        "required": [
          "id"
        ]
      },
      "request-ensure_receipt": {
        "type": "object",
        "description": "Request schema for /api/v2/payments/ensure_receipt",
        "properties": {
          "payment_id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the payment"
          },
          "policy_number": {
            "type": "string",
            "description": "Policy number to get the receipt for"
          }
        },
        "required": [
          "payment_id",
          "policy_number"
        ]
      },
      "request-evaluate_contact_screening": {
        "description": "Request payload for /api/v2/quotes/evaluate_contact_screening",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the quote or revision to evaluate contact screening for"
          },
          "skip_integrations": {
            "type": "boolean",
            "description": "If true, skip external integration calls and only use existing screening results. Defaults to false.",
            "default": false
          }
        },
        "required": [
          "id"
        ]
      },
      "request-evaluate_convenience_fee_formula": {
        "type": "object",
        "description": "Request payload for /api/v2/payments/evaluate_convenience_fee_formula. Design-time tester for unsaved convenience-fee formulas. Evaluates each supplied per-method formula against the test amount and returns the resolved fee. Admin-only.",
        "properties": {
          "amount": {
            "oneOf": [
              {
                "type": "string",
                "pattern": "^\\d+(\\.\\d{1,2})?$",
                "description": "Test amount to evaluate each formula against (string format preferred for precision)."
              },
              {
                "type": "number",
                "exclusiveMinimum": 0,
                "description": "Test amount as a numeric literal."
              }
            ]
          },
          "formulas": {
            "type": "object",
            "description": "Per-method formula strings. Every key is optional. Empty / omitted values surface as inheritance markers in the response so the admin UI can render `(inherits)` instead of an error.",
            "properties": {
              "cc": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Formula for credit-card payments. Uses `amount` as the payment variable; supports `min()`, `max()`, percentages, and fixed values. Empty / omitted -> inheritance marker."
              },
              "ach": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Formula for ACH/bank-transfer payments. Same syntax as cc."
              },
              "debit": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Formula for debit-card payments. Same syntax as cc."
              }
            }
          },
          "disclosure_style": {
            "type": "string",
            "enum": [
              "standard",
              "new_york"
            ],
            "description": "Preview-message style for the returned `messages`. Defaults to `standard`; any unrecognized value is treated as `standard`."
          }
        },
        "required": [
          "amount"
        ]
      },
      "request-execute_dummy_task": {
        "type": "object",
        "description": "Request payload for /api/v2/background_jobs/execute_dummy_task",
        "properties": {
          "message": {
            "type": "string",
            "description": "Message to pass to the task.",
            "default": "Hello from API"
          },
          "fail_task": {
            "type": "boolean",
            "description": "If true, the task will raise an exception intentionally.",
            "default": false
          },
          "hold_transaction_seconds": {
            "type": "integer",
            "minimum": 0,
            "description": "If > 0, holds the transaction open for this many seconds before committing. This simulates the race condition where a task is queued inside atomic_operation but the BackgroundJob is not yet visible to the worker.",
            "default": 0
          }
        },
        "required": []
      },
      "request-export_configuration": {
        "type": "object",
        "description": "Request Schema for /api/v2/settings/export_configuration. Builds the configuration package for a policy type: effective dates, lines, policy types, forms, items, quick quote templates, underlying relationships and quickcode values. On a site with Celery enabled the work is queued and the configuration export record is returned immediately; poll /api/v2/settings/get_configuration_export with its id for the outcome. Otherwise the work runs in the request and the record comes back already complete. The package itself is never in this response: read it from the file the record names, through /api/v2/files/generate_download_url.",
        "properties": {
          "policy_type_id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the policy type to export along with its dependencies (effective date, line, forms) and any related/underlying policy types."
          },
          "skip_forms": {
            "type": "boolean",
            "default": false,
            "description": "If true, skip exporting form files (PDF forms and item forms) from S3"
          }
        },
        "required": [
          "policy_type_id"
        ]
      },
      "request-export_tasks": {
        "type": "object",
        "description": "Request payload for /api/v2/tasks/export_tasks. Exports the queue's current query as CSV. Takes the same query / filters / sorting / view as retrieve_tasks and runs through that same service path, so the file mirrors the tab, status chip, search term, toolbar filters and sort order that produced the rows on screen. Pagination is deliberately absent: the export covers the entire filtered set, not the current page. That set is split into files of TASK_EXPORT_ROWS_PER_FILE rows rather than capped, so nothing is ever truncated. Omit file_index to get the plan alone (row total, file count, and each file's name and row range); supply it to build one file. Guarded by britecore/tasks r, the same permission as retrieve_tasks.",
        "properties": {
          "query": {
            "type": "string",
            "description": "Search query for tasks. Matches task fields, claim number, policy number (including claim-attached tasks reached through the claim's policy), and named insureds."
          },
          "view": {
            "type": "string",
            "enum": [
              "all_tasks",
              "my_tasks",
              "my_team",
              "claim_tasks",
              "policy_tasks",
              "submissions",
              "triage"
            ],
            "description": "Named view applying server-side scoping. submissions = policy tasks whose latest revision is in submission; triage = open, unassigned tasks."
          },
          "file_index": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "description": "0-based index of the file to build. Omitted or null, the response carries the plan only and builds no CSV. A file_index beyond the current file count is rejected rather than answered with an empty file: it means the filtered set shrank since the plan was made."
          },
          "filename_timestamp": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^\\d{8}-\\d{6}$",
            "description": "Site-local timestamp baked into the exported filenames, as YYYYMMDD-HHMMSS. Echo back the value the plan response returned so that every file of one export is named for the same instant and the filenames match the ones the preview listed; stamping per request instead would give a three-file export three different timestamps. Omitted, the service stamps the current time -- so a caller that ignores this field still gets a timestamped filename, it just cannot span files. Validated against exactly the shape the server emits, because it is interpolated into a filename."
          },
          "group_by_policy": {
            "type": "boolean",
            "default": false,
            "description": "Send true when the queue is in By Policy mode. Keeps every task of a policy contiguous in the file, with unattached (triage) tasks in a leading bucket, since a CSV cannot express grouping. This is ORDERING ONLY -- unlike retrieve_tasks' `group_by`, it does not switch to group pagination, which would break the row-based file split. The screen's group *ranking* (unattached first, then overdue count desc, then top priority desc) is deliberately not reproduced: it would need an aggregate join on every export, and every column it derives from is already in the file. Must match between the plan request and each file request, or the files would be cut from a differently ordered result than the plan measured."
          },
          "task_scopes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "claim",
                "policy"
              ]
            },
            "minItems": 1,
            "uniqueItems": true,
            "description": "Whether to return CLAIM work, POLICY work, or both. Omitted (the default) means both, so existing callers are unaffected. The Underwriting Workbench sends [\"policy\"]; claim work belongs to the Claims module's own task tab. An explicit list rather than something derived from `view`, because my_tasks / my_team / all_tasks are shared with the legacy Tasks Workbench, which lists every task on the site. THE RULE: the attachment decides when there is one, and the task's definition decides when there is not. `policy` = claimId IS NULL AND (policyId IS NOT NULL OR the task's definition is policy-scoped); `claim` is its exact complement. The two partition the table, so any subset selects a well-defined set of rows, and a task carrying BOTH columns is `claim`. Why the attachment wins where both could speak: task_definitions.scope was added NOT NULL DEFAULT 'claim' and backfilled every pre-existing definition, so a policy-attached task whose definition says 'claim' is ordinary legacy data and is still policy work. Why the definition decides an UNATTACHED task: it is binding, not advisory -- modify_task refuses to attach a claim-scoped task to a policy, so an unattached claim-scoped task can only ever become a claim task. The scope applies to the rows, to filter_counts / bucket_counts / view_counts and to group_by, so every number describes the rows returned. retrieve_task, modify_task and bulk_modify_tasks are unaffected and still serve both. An empty list is rejected."
          },
          "filters": {
            "type": "object",
            "description": "Filter criteria for tasks",
            "properties": {
              "assignee_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "description": "Filter by assignee IDs"
              },
              "task_numbers": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Filter by task NUMBER (tasks.taskId) -- the human-facing number, not the uuid primary key. Use `ids` to filter by uuid. Bounded by TASK_FILTER_MAX_IDS: an unbounded list becomes an unbounded IN (), whose bind parameters cost CPU to compile and escape before the database sees them. Deliberately ABOVE bulk_modify_tasks' own 500 cap, because in By Policy mode a page is 15 policy GROUPS and the server returns every task in them, so a select-all there can reach four figures. An empty list is rejected rather than read as 'no filter', which would otherwise return the whole unfiltered set.",
                "maxItems": 2000,
                "minItems": 1
              },
              "task_ids": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "DEPRECATED alias of `task_numbers`; merged with it when both are sent. Matches the task NUMBER column (tasks.taskId), never the uuid. Bounded by TASK_FILTER_MAX_IDS: an unbounded list becomes an unbounded IN (), whose bind parameters cost CPU to compile and escape before the database sees them. Deliberately ABOVE bulk_modify_tasks' own 500 cap, because in By Policy mode a page is 15 policy GROUPS and the server returns every task in them, so a select-all there can reach four figures. An empty list is rejected rather than read as 'no filter', which would otherwise return the whole unfiltered set.",
                "maxItems": 2000,
                "minItems": 1
              },
              "ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "description": "Filter by task uuid (tasks.id). This is the id the queue's row selection and bulk_modify_tasks carry. Bounded by TASK_FILTER_MAX_IDS: an unbounded list becomes an unbounded IN (), whose bind parameters cost CPU to compile and escape before the database sees them. Deliberately ABOVE bulk_modify_tasks' own 500 cap, because in By Policy mode a page is 15 policy GROUPS and the server returns every task in them, so a select-all there can reach four figures. An empty list is rejected rather than read as 'no filter', which would otherwise return the whole unfiltered set.",
                "maxItems": 2000,
                "minItems": 1
              },
              "claim_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "description": "Filter by Claim IDs"
              },
              "policy_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "description": "Filter by Policy IDs (the direct tasks.policy_id column only; claim-tasks carry NULL there, so use effective_policy_ids to reach them)"
              },
              "effective_policy_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "description": "Filter by the task's EFFECTIVE policy: the direct policy_id column, or the claim's policy for a claim-task (whose column is NULL). This is the membership By Policy grouping uses, so it exports exactly one policy group's contents -- which is also what group_by_policy keeps contiguous in the file. policy_ids matches the direct column only -- a policy's own task list -- so the two differ for any policy whose claims have tasks. Either one satisfies the policy_tasks view's requirement for a policy scope. Bounded by TASK_FILTER_MAX_IDS; an empty list is rejected rather than read as 'no filter'.",
                "maxItems": 2000,
                "minItems": 1
              },
              "status": {
                "type": "string",
                "enum": [
                  "Open",
                  "In Progress",
                  "Blocked",
                  "Escalated",
                  "Completed",
                  "Canceled"
                ],
                "description": "Filter by a single task status"
              },
              "statuses": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "Open",
                    "In Progress",
                    "Blocked",
                    "Escalated",
                    "Completed",
                    "Canceled"
                  ]
                },
                "description": "Filter by multiple task statuses"
              },
              "status_filter": {
                "type": "string",
                "enum": [
                  "all",
                  "overdue",
                  "due_today",
                  "blocked",
                  "unassigned"
                ],
                "description": "Status quick-filter bucket applied server-side; 'all' (or omitted) means no quick-filter. overdue = past due date AND status not in {Completed, Canceled}."
              },
              "bucket": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "active",
                  "on_hold",
                  "archived"
                ],
                "description": "Lifecycle bucket applied server-side, ahead of status_filter and pagination, so filter_counts describes the bucket too (view_counts never does - see there). The buckets partition the statuses: active = {Open, In Progress, Escalated}, on_hold = {Blocked}, archived = {Completed, Canceled}. Omitted means no bucket filter."
              },
              "task_types": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Filter by task types"
              },
              "priority": {
                "type": "string",
                "enum": [
                  "Low",
                  "Medium",
                  "High"
                ],
                "description": "Filter by a single priority"
              },
              "priorities": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "Low",
                    "Medium",
                    "High"
                  ]
                },
                "description": "Filter by multiple priorities"
              },
              "transaction_types": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "New Business",
                    "Renewal",
                    "Endorsement",
                    "Cancellation",
                    "Reinstatement"
                  ]
                },
                "description": "Filter by the policy's transaction type (canonical display taxonomy, evaluated on the policy's latest revision)"
              },
              "lobs": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Filter by line of business (policy type name of the policy's latest revision)"
              },
              "stages": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Filter by policy stage (derived from the latest revision's policy status)"
              },
              "due_date_start": {
                "type": "string",
                "format": "date-time",
                "description": "Filter by due date (start range, inclusive). ISO-8601 date-time; a value without a UTC offset is interpreted as UTC, matching the frame due_date is returned in"
              },
              "due_date_end": {
                "type": "string",
                "format": "date-time",
                "description": "Filter by due date (end range, inclusive). ISO-8601 date-time; a value without a UTC offset is interpreted as UTC, matching the frame due_date is returned in"
              }
            }
          },
          "sorting": {
            "type": "object",
            "description": "Sorting parameters, applied server-side over the whole filtered set rather than the returned page. Nullable keys place missing values last regardless of direction; task number is the final tiebreaker, so paging cannot repeat or skip a row. An unrecognised sort_by leaves only that tiebreaker.",
            "properties": {
              "sort_by": {
                "type": "string",
                "enum": [
                  "due_date",
                  "priority",
                  "status",
                  "task_age",
                  "insured",
                  "agency",
                  "lob"
                ],
                "default": "due_date",
                "description": "Field to sort by. insured, agency and lob are reached through the task's policy -- the insured and LOB off its latest revision, the agency off the policy -- and resolve to what the matching column displays. The nullable keys (due_date, insured, agency, lob) place rows with no value LAST in both directions. priority sorts by urgency, ascending meaning Low first. status follows the declared lifecycle order (Open, In Progress, Blocked, Escalated, Completed, Canceled), not alphabetical. task_age ascending puts the oldest task first."
              },
              "sort_order": {
                "type": "string",
                "enum": [
                  "asc",
                  "desc"
                ],
                "default": "desc",
                "description": "Sort direction"
              }
            }
          }
        }
      },
      "request-exposure_remap_preview": {
        "type": "object",
        "description": "Request payload for /api/v2/exposure_remap/preview - dry-run classification of a claim's exposures against the policy revision applicable to a loss date. Mutates nothing.",
        "properties": {
          "api_key": {
            "type": "string",
            "description": "API key for authentication"
          },
          "claim_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the claim"
          },
          "loss_date": {
            "type": "string",
            "description": "Loss date to evaluate the exposures against (ISO 8601 or MM/DD/YYYY[ hh:mm A])"
          }
        },
        "required": [
          "claim_id",
          "loss_date"
        ]
      },
      "request-files_generate_upload_url_for_tmp_file": {
        "description": "Request payload for /api/v2/files/generate_upload_url_for_tmp_file.",
        "type": "object",
        "properties": {
          "content_type": {
            "type": "string",
            "description": "MIME type the uploaded object will be stored with. Also used to derive the S3 key's file extension. Example: application/pdf"
          },
          "key_suffix": {
            "type": "string",
            "description": "Relative sub-path (no leading slash, no '..' segments) appended after the enforced 'uploads/tmp_files/' base. Example: 'carbone/' yields 'uploads/tmp_files/carbone/'."
          },
          "expires_in": {
            "type": "integer",
            "minimum": 1,
            "maximum": 604800,
            "description": "Presigned POST TTL in seconds. Defaults to 600; cannot exceed 7 days (604800)."
          },
          "max_size": {
            "type": "integer",
            "minimum": 1,
            "description": "Maximum allowed upload size in bytes, enforced via the presigned POST's content-length-range condition. Defaults to 26214400 (25MB)."
          }
        },
        "required": [
          "content_type"
        ]
      },
      "request-filter_subjectivities": {
        "type": "object",
        "description": "Request schema for /api/v2/subjectivities/filter_subjectivities",
        "properties": {
          "start_date": {
            "type": "string",
            "format": "date",
            "description": "Start date of the date range to filter subjectivities by"
          },
          "end_date": {
            "type": "string",
            "format": "date",
            "description": "End date of the date range to filter subjectivities by"
          },
          "revision_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "IDs of the revisions to retrieve subjectivities from"
          },
          "external_system_references": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "External system references to filter subjectivities by"
          },
          "assignee_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "IDs of the assignees to filter subjectivities by"
          },
          "page": {
            "type": "integer",
            "description": "Page number"
          },
          "page_size": {
            "type": "integer",
            "description": "Number of items per page"
          }
        }
      },
      "request-finalize_recovery_candidate": {
        "type": "object",
        "description": "Request payload for /api/v2/deliverables/finalize_recovery_candidate",
        "properties": {
          "job_id": {
            "type": "string",
            "format": "uuid",
            "description": "BackgroundJob ID of the completed recovery task."
          },
          "candidate_id": {
            "type": "string",
            "description": "Candidate identifier being finalized, e.g. 'file:uuid'."
          }
        },
        "required": [
          "job_id",
          "candidate_id"
        ]
      },
      "request-finalize_sync": {
        "type": "object",
        "description": "Request Schema for /api/v2/medical_codes/finalize_sync",
        "properties": {
          "code_system": {
            "type": "string",
            "minLength": 1,
            "maxLength": 20,
            "pattern": ".*\\S.*",
            "description": "Code system to finalize (e.g. 'ICD10')"
          },
          "source_version": {
            "type": "string",
            "minLength": 1,
            "maxLength": 20,
            "pattern": ".*\\S.*",
            "description": "The just-loaded release version; every active row in the code system NOT at this version is deactivated"
          }
        },
        "required": [
          "code_system",
          "source_version"
        ]
      },
      "request-find_contact_by_params": {
        "type": "object",
        "title": "Find Contact By Params Request",
        "description": "Request payload for /api/v2/contacts/find_contact_by_params",
        "properties": {
          "name": {
            "type": "string",
            "description": "Contact name to search for (full or partial). Cannot be empty.",
            "minLength": 1
          },
          "role_name": {
            "type": "string",
            "description": "Optional. Filter contacts by a specific role name (e.g., 'Agent', 'Administrator')"
          },
          "dob": {
            "type": "string",
            "description": "Optional. Contact's date of birth in mm/dd/yyyy format",
            "pattern": "^(0[1-9]|1[0-2])/(0[1-9]|[12][0-9]|3[01])/\\d{4}$"
          },
          "exclude_roles": {
            "type": "array",
            "description": "Optional. Array of role names to exclude from results. Mutually exclusive with role_name.",
            "items": {
              "type": "string"
            }
          },
          "exclude_empty_usernames": {
            "type": "boolean",
            "description": "Optional. If true, excludes contacts with empty usernames",
            "default": false
          },
          "requires_login_information": {
            "type": "boolean",
            "description": "Optional. If true, only returns contacts whose roles have the 'loginInformation' aspect",
            "default": false
          },
          "page_size": {
            "type": "integer",
            "description": "Optional. Maximum number of results to return",
            "minimum": 1,
            "maximum": 1000,
            "default": 50
          }
        },
        "required": [
          "name"
        ]
      },
      "request-fnol": {
        "type": "object",
        "description": "Request Schema for POST /api/v2/agents/fnol. Authentication is handled via the api_key parameter (passed for BriteCore API authentication).",
        "properties": {
          "api_key": {
            "type": "string",
            "description": "API key for BriteCore authentication"
          },
          "prompt": {
            "type": "string",
            "description": "The user's message/question"
          },
          "session_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Session ID for conversation continuity"
          },
          "context": {
            "type": [
              "string",
              "null"
            ],
            "description": "Additional context information"
          }
        },
        "required": [
          "api_key",
          "prompt"
        ]
      },
      "request-fnol_stream": {
        "type": "object",
        "description": "Request Schema for POST /api/v2/agents/fnol_stream",
        "properties": {
          "api_key": {
            "type": "string",
            "description": "API key for authentication"
          },
          "prompt": {
            "type": "string",
            "description": "The user's message/question"
          },
          "session_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Session ID for conversation continuity"
          },
          "context": {
            "type": [
              "string",
              "null"
            ],
            "description": "Additional context information"
          }
        },
        "required": [
          "api_key",
          "prompt"
        ]
      },
      "request-get_accounting_loss_details": {
        "description": "Request payload for /api/v2/claim_exposures/get_accounting_loss_details",
        "type": "object",
        "properties": {
          "api_key": {
            "type": "string",
            "description": "API key for authentication"
          },
          "claim_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the claim for which to retrieve loss details data"
          },
          "page": {
            "type": "integer",
            "description": "Page number for paginated exposures (default: 1)",
            "minimum": 1
          },
          "page_size": {
            "type": "integer",
            "description": "Number of exposures per page (default: 100)",
            "minimum": 1
          }
        },
        "required": [
          "api_key",
          "claim_id"
        ]
      },
      "request-get_accounting_overview": {
        "description": "Request payload for /api/v2/claim_exposures/get_accounting_overview",
        "type": "object",
        "properties": {
          "api_key": {
            "type": "string",
            "description": "API key for authentication"
          },
          "claim_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the claim for which to retrieve accounting overview data"
          },
          "page": {
            "type": "integer",
            "description": "Page number for paginated exposures (default: 1)",
            "minimum": 1
          },
          "page_size": {
            "type": "integer",
            "description": "Number of exposures per page (default: 100)",
            "minimum": 1
          }
        },
        "required": [
          "api_key",
          "claim_id"
        ]
      },
      "request-get_accounting_recoveries_data": {
        "description": "Request payload for /api/v2/claim_exposures/get_accounting_recoveries_data",
        "type": "object",
        "properties": {
          "api_key": {
            "type": "string",
            "description": "API key for authentication"
          },
          "claim_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the claim for which to retrieve recoveries data"
          },
          "page": {
            "type": "integer",
            "description": "Page number for paginated exposures (default: 1)",
            "minimum": 1
          },
          "page_size": {
            "type": "integer",
            "description": "Number of exposures per page (default: 100)",
            "minimum": 1
          }
        },
        "required": [
          "api_key",
          "claim_id"
        ]
      },
      "request-get_additional_interest": {
        "type": "object",
        "description": "Request payload for /api/v2/additional_interests/get_additional_interest.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Additional interest ID",
            "format": "uuid"
          }
        },
        "required": [
          "id"
        ]
      },
      "request-get_adjuster_assignment_config": {
        "type": "object",
        "description": "Request Schema for /api/v2/claim_adjuster_assignment_configs/get_adjuster_assignment_config",
        "properties": {
          "contact_id": {
            "type": "string",
            "format": "uuid",
            "description": "Contact ID"
          }
        }
      },
      "request-get_all_associated_claims_parties": {
        "description": "Request payload for POST /api/v2/claims/get_all_associated_claims_parties",
        "type": "object",
        "properties": {
          "claim_id": {
            "type": "string",
            "format": "uuid",
            "description": "Claim ID whose associated parties should be returned"
          }
        },
        "required": [
          "claim_id"
        ]
      },
      "request-get_all_claim_transactions": {
        "type": "object",
        "description": "Request Schema for /api/v2/claims/get_all_claim_transactions - Retrieves all accounting transactions for a claim with optional filtering and sorting",
        "properties": {
          "claim_id": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of the claim for which to retrieve transactions data"
          },
          "page": {
            "type": "integer",
            "minimum": 1,
            "default": 1,
            "description": "The page number for paginated transactions (default: 1)"
          },
          "page_size": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "maximum": 1000,
            "default": 100,
            "description": "The number of transactions per page (default: 100, max: 1000, null for all)"
          },
          "transaction_types": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "reserve",
                "payment",
                "recovery",
                "recovery_reserve"
              ]
            },
            "description": "Filter by transaction type(s). If not provided, all types are returned."
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "loss",
                "adjuster",
                "legal",
                "reinsurance",
                "subrogation",
                "salvage",
                "reinsurancelae"
              ]
            },
            "description": "Filter by transaction category(ies). If not provided, all categories are returned."
          },
          "statuses": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "voided"
              ]
            },
            "description": "Filter by transaction status(es). Currently supports 'voided' to show only voided transactions."
          },
          "payment_methods": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "CC",
                "ACH",
                "NoAuth"
              ]
            },
            "description": "Filter by payment method(s). Only applies to payment transactions."
          },
          "date_from": {
            "type": "string",
            "format": "date",
            "description": "Filter transactions on or after this date (YYYY-MM-DD format)"
          },
          "date_to": {
            "type": "string",
            "format": "date",
            "description": "Filter transactions on or before this date (YYYY-MM-DD format)"
          },
          "sort_by": {
            "type": "string",
            "enum": [
              "transaction_datetime",
              "amount",
              "payee",
              "transaction_category"
            ],
            "default": "transaction_datetime",
            "description": "Field to sort results by (default: transaction_datetime)"
          },
          "sort_order": {
            "type": "string",
            "enum": [
              "asc",
              "desc"
            ],
            "default": "desc",
            "description": "Sort order: ascending or descending (default: desc)"
          }
        },
        "required": [
          "claim_id"
        ]
      },
      "request-get_all_html_templates": {
        "type": "object",
        "description": "Request payload for /api/v2/deliverables/get_all_html_templates",
        "properties": {}
      },
      "request-get_applicable_forms": {
        "type": "object",
        "description": "Request payload for /api/v2/quotes/get_applicable_forms",
        "properties": {
          "quote_id": {
            "type": "string",
            "format": "uuid",
            "description": "Revision id of the in-progress quote"
          }
        },
        "required": [
          "quote_id"
        ]
      },
      "request-get_billing_contact_emails": {
        "type": "object",
        "description": "Request schema for /api/v2/payments/get_billing_contact_emails",
        "properties": {
          "policy_number": {
            "type": "string",
            "description": "Policy number to get billing contact emails for"
          }
        },
        "required": [
          "policy_number"
        ]
      },
      "request-get_brand": {
        "description": "Request payload for /api/v2/brands/get_brand",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique identifier of the brand"
          }
        },
        "required": [
          "id"
        ]
      },
      "request-get_claim_estimation": {
        "type": "object",
        "description": "Request Schema for /api/v2/claim_estimations/get_claim_estimation",
        "properties": {
          "estimation_id": {
            "type": "string",
            "format": "uuid",
            "description": "Estimation ID"
          }
        },
        "required": [
          "estimation_id"
        ]
      },
      "request-get_claims_tabs_visibility": {
        "description": "Request payload for /api/v2/claims/get_claims_tabs_visibility",
        "type": "object",
        "properties": {
          "claim_id": {
            "type": "string",
            "description": "Claim ID for retrieving claims tabs visibility"
          }
        },
        "required": [
          "claim_id"
        ]
      },
      "request-get_configuration_export": {
        "type": "object",
        "description": "Request Schema for /api/v2/settings/get_configuration_export. Returns one configuration export record by its own id. This is what the Configuration Promotion page polls while a job runs.",
        "properties": {
          "export_id": {
            "type": "string",
            "format": "uuid",
            "description": "The record id returned when the job was queued"
          }
        },
        "required": [
          "export_id"
        ]
      },
      "request-get_configuration_import": {
        "type": "object",
        "description": "Request Schema for /api/v2/settings/get_configuration_import. Returns one configuration package by its own id, with the outcome of the latest run against it. This is what the Configuration Promotion page polls while a run is in flight. A missing id comes back as found false rather than an error, so a poller can tell \"this will never exist\" from \"the request failed\".",
        "properties": {
          "import_id": {
            "type": "string",
            "format": "uuid",
            "description": "The configuration import id returned by create_configuration_import"
          }
        },
        "required": [
          "import_id"
        ]
      },
      "request-get_contact_by_agency": {
        "type": "object",
        "description": "Request schema for /api/v2/contact/get_contact_by_agency",
        "properties": {
          "agency_number": {
            "type": "string",
            "description": "Agency number"
          }
        },
        "required": [
          "agency_number"
        ]
      },
      "request-get_contact_by_agency_group": {
        "type": "object",
        "description": "Request schema for /api/v2/contact/get_contact_by_agency_group",
        "properties": {
          "agency_group_number": {
            "type": "string",
            "description": "Agency group number"
          }
        },
        "required": [
          "agency_group_number"
        ]
      },
      "request-get_contact_by_agent": {
        "type": "object",
        "description": "Request schema for /api/v2/contact/get_contact_by_agent",
        "properties": {
          "producer_number": {
            "type": "string",
            "description": "Agent producer number"
          }
        },
        "required": [
          "producer_number"
        ]
      },
      "request-get_contact_screening_status": {
        "description": "Request payload for /api/v2/quotes/get_contact_screening_status",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Revision id whose screening status should be reported"
          }
        },
        "required": [
          "id"
        ]
      },
      "request-get_copilot_skill": {
        "type": "object",
        "description": "Request schema for /api/v2/copilot_skills/get_copilot_skill",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the copilot skill to retrieve"
          }
        },
        "required": [
          "id"
        ]
      },
      "request-get_delayed_commission_accounting_entries": {
        "type": "object",
        "description": "Request payload for /api/v2/commissions/get_delayed_commission_accounting_entries. This endpoint does not require any parameters beyond authentication.",
        "properties": {},
        "required": []
      },
      "request-get_deliverable_preview_json": {
        "type": "object",
        "description": "Request payload for /api/v2/settings/get_deliverable_preview_json. Loads the JSON context Carbone Studio's data panel renders. Two modes: LIVE, against a policy/revision/claim named by entity_id or entity_number; and EXAMPLE, when neither is supplied - the normal case while a template is being authored, before any entity exists to preview against. Example mode returns a full renderable context rather than a warning: the shipped fixture, or, when policy_type_name resolves a policy type, that policy type's own configured line items. Both modes apply calculated fields and any in-progress dynamic/calculated field definitions posted from Carbone Studio's form state.",
        "properties": {
          "deliverable_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "XReportLocation id of the deliverable being previewed. Optional in both modes. It scopes the calculated- and dynamic-field passes to that template (globals only when absent), and in EXAMPLE mode it also decides which fixture is loaded: the deliverable's own module wins over entity_type, so a claim deliverable gets the claim example even when the caller sends the default 'policy'."
          },
          "entity_type": {
            "type": "string",
            "enum": [
              "policy",
              "revision",
              "claim"
            ],
            "description": "The kind of entity to preview against. Authoritative in LIVE mode. In EXAMPLE mode it only decides the fixture when deliverable_id is absent (a template being authored before it has been saved, where the page's trigger-type select is the only signal); with a deliverable_id the deliverable's module decides. 'revision' resolves to the policy context."
          },
          "entity_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "ID of the entity to preview. Optional: with neither entity_id nor entity_number the endpoint returns an EXAMPLE context."
          },
          "entity_number": {
            "type": [
              "string",
              "null"
            ],
            "description": "Policy or claim number of the entity to preview. Optional: with neither entity_number nor entity_id the endpoint returns an EXAMPLE context."
          },
          "location_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Business location. In LIVE mode a validator: a resolved entity belonging elsewhere returns a warning instead of a context. In EXAMPLE mode a SELECTOR: it narrows policy_type_name to one location's configuration. Absent ('All Locations Default') the name may resolve several policy types across locations, and their configured items are merged."
          },
          "policy_type_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Policy type. In LIVE mode a validator, as location_id is. In EXAMPLE mode a SELECTOR, and the one that decides what the panel shows: with it, the context's line items are generated from that policy type's configured policy_type_items - real names, dec sections, ordering, limits, deductibles and rating categories - instead of the fixture's. Without it the fixture's own items are left in place."
          },
          "dynamic_field_values": {
            "type": [
              "object",
              "null"
            ],
            "description": "Simulated dynamic-field values keyed by field_key, used to preview the `dynamic` namespace (see CarboneDeliverableTemplateService.apply_dynamic_fields)."
          },
          "dynamic_fields": {
            "type": [
              "array",
              "null"
            ],
            "description": "In-progress (not yet saved) dynamic-field definitions from Carbone Studio's local form state, used INSTEAD OF the database so an unsaved field still previews.",
            "items": {
              "type": "object"
            }
          },
          "calc_fields": {
            "type": [
              "object",
              "null"
            ],
            "description": "In-progress (not yet saved) calculated-field definitions, used INSTEAD OF the database so an unsaved field still previews.",
            "properties": {
              "global": {
                "type": "array",
                "items": {
                  "type": "object"
                }
              },
              "template": {
                "type": "array",
                "items": {
                  "type": "object"
                }
              }
            }
          }
        },
        "required": []
      },
      "request-get_dynamic_fields": {
        "type": "object",
        "description": "Request payload for /api/v2/deliverables/get_dynamic_fields",
        "properties": {
          "deliverable_template_id": {
            "type": "string",
            "description": "id of the template (x_report_location.id) that has the dynamic_field."
          },
          "reference_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional claim or revision ID. Used to render Jinja templates in default values and, for a dropdown field, to resolve live options (static list directly, dynamic against this entity's context)."
          }
        },
        "required": [
          "deliverable_template_id"
        ]
      },
      "request-get_effective_date": {
        "type": "object",
        "description": "Request schema for /api/v2/lines/get_effective_date",
        "properties": {
          "effective_date_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "request-get_erp_items": {
        "type": "object",
        "description": "Request payload for /api/v2/erp/get_erp_items",
        "properties": {
          "policy_id": {
            "type": "string",
            "format": "uuid",
            "description": "The policy ID to retrieve ERP items for"
          },
          "revision_id": {
            "type": "string",
            "format": "uuid",
            "description": "Optional revision ID. When supplied, only that revision's ERP items are returned; otherwise all non-archived revisions are included"
          }
        },
        "required": [
          "policy_id"
        ]
      },
      "request-get_estimated_quote": {
        "title": "Get Estimated Quote Request",
        "type": "object",
        "description": "Request schema for the get_estimated_quote API endpoint. It generates an estimated underlying quote based on an existing quote.",
        "properties": {
          "quote_id": {
            "type": "string",
            "format": "uuid",
            "description": "The unique identifier (UUID) of the source quote/revision to use for the estimation."
          },
          "rate_quote": {
            "type": "boolean",
            "description": "If true, the underlying quote will be rated to estimate a premium. If false, only a basic quote structure will be created.",
            "default": false
          },
          "stateless": {
            "type": "boolean",
            "description": "If true, the generated estimated quote is not persisted in the database. If false, a new persistent quote is created.",
            "default": true
          }
        },
        "required": [
          "quote_id"
        ]
      },
      "request-get_event_types": {
        "type": "object",
        "description": "Request payload for /api/v2/rules/get_event_types. This endpoint requires no parameters.",
        "properties": {}
      },
      "request-get_exposure_edit_status": {
        "description": "Request payload for /api/v2/claim_exposures/get_exposure_edit_status - Whether an exposure can be edited or deleted",
        "type": "object",
        "properties": {
          "api_key": {
            "type": "string",
            "description": "API key for authentication"
          },
          "exposure_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the exposure"
          }
        },
        "required": [
          "exposure_id"
        ]
      },
      "request-get_exposure_transactions": {
        "type": "object",
        "description": "Request Schema for /api/v2/claim_exposures/get_exposure_transactions - Retrieves all accounting transactions for a specific exposure with optional filtering and sorting",
        "properties": {
          "exposure_id": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of the exposure for which to retrieve transactions data"
          },
          "transaction_types": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "reserve",
                "payment",
                "recovery",
                "recovery_reserve"
              ]
            },
            "description": "Filter by transaction type(s). If not provided, all types are returned."
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "loss",
                "adjuster",
                "legal",
                "reinsurance",
                "subrogation",
                "salvage",
                "reinsurancelae"
              ]
            },
            "description": "Filter by transaction category(ies). If not provided, all categories are returned."
          },
          "statuses": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "voided"
              ]
            },
            "description": "Filter by transaction status(es). Currently supports 'voided' to show only voided transactions."
          },
          "payment_methods": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "CC",
                "ACH",
                "NoAuth"
              ]
            },
            "description": "Filter by payment method(s). Only applies to payment transactions."
          },
          "date_from": {
            "type": "string",
            "format": "date",
            "description": "Filter transactions on or after this date (YYYY-MM-DD format)"
          },
          "date_to": {
            "type": "string",
            "format": "date",
            "description": "Filter transactions on or before this date (YYYY-MM-DD format)"
          },
          "sort_by": {
            "type": "string",
            "enum": [
              "transaction_datetime",
              "amount",
              "payee",
              "transaction_category"
            ],
            "default": "transaction_datetime",
            "description": "Field to sort results by (default: transaction_datetime)"
          },
          "sort_order": {
            "type": "string",
            "enum": [
              "asc",
              "desc"
            ],
            "default": "desc",
            "description": "Sort order: ascending or descending (default: desc)"
          }
        },
        "required": [
          "exposure_id"
        ]
      },
      "request-get_full_quote_async_status": {
        "type": "object",
        "description": "Request Schema for get_full_quote_async_status. Polls for the status of an async quote creation job using the reference_id returned by create_full_quote_async.",
        "properties": {
          "reference_id": {
            "type": "string",
            "description": "Reference ID returned by create_full_quote_async."
          }
        },
        "required": [
          "reference_id"
        ]
      },
      "request-get_html_template": {
        "type": "object",
        "description": "Request payload for /api/v2/deliverables/get_html_template",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the template to retrieve."
          }
        },
        "required": [
          "name"
        ]
      },
      "request-get_installed_integrations": {
        "type": "object",
        "description": "Request Schema for /api/v2/integrations/get_installed_integrations",
        "properties": {
          "policy_type_id": {
            "type": "string",
            "format": "uuid",
            "description": "The policy type ID to retrieve the installed integrations for. If not provided, returns all installed integrations."
          },
          "integration_point_code": {
            "type": "string",
            "description": "The integration point code to filter integrations by (e.g., 'PROPERTY_VALUATION'). If not provided, returns all integration types."
          }
        }
      },
      "request-get_invoices": {
        "title": "Get Invoices Request",
        "description": "Request schema for the api/v2/accounting/get_invoices API.",
        "type": "object",
        "properties": {
          "policy_id": {
            "type": "string",
            "format": "uuid",
            "description": "The unique identifier of the policy to retrieve invoices for."
          },
          "bill_from_date": {
            "type": "string",
            "description": "Filter for invoices with a bill date on or after this date. Format: MM/DD/YYYY.",
            "pattern": "^(0[1-9]|1[0-2])\\/(0[1-9]|[12][0-9]|3[01])\\/\\d{4}$",
            "example": "01/01/2025"
          },
          "bill_to_date": {
            "type": "string",
            "description": "Filter for invoices with a bill date on or before this date. Format: MM/DD/YYYY.",
            "pattern": "^(0[1-9]|1[0-2])\\/(0[1-9]|[12][0-9]|3[01])\\/\\d{4}$",
            "example": "01/01/2026"
          },
          "due_from_date": {
            "type": "string",
            "description": "Filter for invoices with a due date on or after this date. Format: MM/DD/YYYY.",
            "pattern": "^(0[1-9]|1[0-2])\\/(0[1-9]|[12][0-9]|3[01])\\/\\d{4}$",
            "example": "01/01/2025"
          },
          "due_to_date": {
            "type": "string",
            "description": "Filter for invoices with a due date on or before this date. Format: MM/DD/YYYY.",
            "pattern": "^(0[1-9]|1[0-2])\\/(0[1-9]|[12][0-9]|3[01])\\/\\d{4}$",
            "example": "01/01/2026"
          },
          "sorting_order": {
            "type": "string",
            "enum": [
              "asc",
              "desc"
            ],
            "default": "asc",
            "description": "The sorting order for the invoices, based on their date."
          },
          "page_number": {
            "type": "integer",
            "minimum": 1,
            "default": 1,
            "description": "The page number of the result set to retrieve."
          },
          "page_size": {
            "type": "integer",
            "minimum": 1,
            "default": 50,
            "description": "The number of invoices to return per page."
          }
        },
        "required": [
          "policy_id"
        ]
      },
      "request-get_last_prefill_quote_execution_date": {
        "type": "object",
        "description": "Request Schema for /api/v2/quotes/get_last_prefill_quote_execution_date",
        "properties": {
          "policy_id": {
            "type": "string",
            "format": "uuid",
            "description": "Policy ID to get the last prefill execution date for"
          }
        },
        "required": [
          "policy_id"
        ]
      },
      "request-get_migration_job_status": {
        "type": "object",
        "description": "Request schema for /api/v2/imports/get_migration_job_status",
        "properties": {
          "job_id": {
            "type": "string",
            "format": "uuid",
            "description": "Specific job UUID returned from run_migration. If omitted, returns list of recent jobs (last 24 hours)."
          },
          "include_logs": {
            "type": "boolean",
            "description": "If true, include ERROR level logs in response (only applies when job_id is provided)",
            "default": false
          }
        }
      },
      "request-get_options": {
        "type": "object",
        "title": "Get Credit Score Options Request",
        "description": "Request to get available credit score options for a revision",
        "properties": {
          "revision_id": {
            "type": "string",
            "description": "The ID of the revision to get credit score options for"
          }
        },
        "required": [
          "revision_id"
        ]
      },
      "request-get_payment": {
        "description": "Request payload for /api/v2/claim_exposures/get_payment",
        "type": "object",
        "properties": {
          "payment_id": {
            "type": "string",
            "description": "The unique identifier of the payment (claim transaction id)"
          }
        },
        "required": [
          "payment_id"
        ]
      },
      "request-get_policies_with_sub_line": {
        "type": "object",
        "description": "Request payload for /api/v2/lines/get_policies_with_sub_line",
        "properties": {
          "sub_line_id": {
            "type": "string",
            "description": "UUID of the subline whose affected policies should be returned"
          },
          "limit": {
            "type": "integer",
            "minimum": 0,
            "default": 0,
            "description": "Maximum number of policies to return. 0 means all."
          }
        },
        "required": [
          "sub_line_id"
        ]
      },
      "request-get_policy_applicable_suspensions": {
        "title": "Get Policy Applicable Suspensions Request",
        "description": "Request schema for the get_policy_applicable_suspensions endpoint",
        "type": "object",
        "properties": {
          "policy_id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier for the policy"
          },
          "suspension_actions": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "Suspend Binding Authority",
                "Suspend Application Submission",
                "Suspend Quoting",
                "Suspend Straight Through Processing",
                "Suspend Endorsement",
                "Suspend Cancellation"
              ]
            },
            "description": "Array of suspension actions to filter applicable suspensions",
            "minItems": 1
          }
        },
        "required": [
          "policy_id",
          "suspension_actions"
        ]
      },
      "request-get_policy_number_history": {
        "type": "object",
        "description": "Request payload for /api/v2/policies/get_policy_number_history.",
        "properties": {
          "policy_number": {
            "type": "string",
            "description": "The policy number for search."
          }
        },
        "required": [
          "policy_number"
        ]
      },
      "request-get_policy_type": {
        "type": "object",
        "description": "Request Schema for /api/v2/lines/get_policy_type. Rating categories are returned the way the quote wizard presents them: options listed in the britequote/default-category-values setting (e.g. 'Please Select An Answer') are removed from the option list, and a default_option holding such a placeholder is cleared to null. is_required is set to true only when no usable default survives -- so a category trimmed of a placeholder option but still carrying a real default comes back with is_required false, because the configuration already answers it. is_required false therefore does NOT mean the category was untouched: check default_option to decide whether a value is still needed. The trimmed option list is not what the carrier has stored, so this is not the endpoint to read when configuring lines.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the Policy Type"
          }
        },
        "required": [
          "id"
        ]
      },
      "request-get_policy_type_item": {
        "type": "object",
        "description": "Request Schema for /api/v2/lines/get_policy_type_item",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the Policy Type Item (line item)"
          }
        },
        "required": [
          "id"
        ]
      },
      "request-get_policy_type_minimal": {
        "type": "object",
        "description": "Request Schema for /api/v2/lines/get_policy_type_minimal",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the Policy Type"
          }
        },
        "required": [
          "id"
        ]
      },
      "request-get_quick_quote_template": {
        "type": "object",
        "description": "Request schema for /api/v2/quick_quote_templates/get_quick_quote_template",
        "properties": {
          "template_id": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of the Quick Quote Template to retrieve"
          }
        },
        "required": [
          "template_id"
        ]
      },
      "request-get_quote_schema": {
        "type": "object",
        "description": "Request Schema for /api/v2/quotes/get_quote_schema. Returns the draft-07 JSON Schema for the canonical create_full_quote payload for one policy type. Rating category enums exclude the values listed in the britequote/default-category-values setting, and such a value is never published as a category's default, because the rating engine rejects it. A category left with no usable value is named in the enclosing required array, which binds through item_data. That required is a contract document rather than a gate: nothing validates an incoming create_full_quote payload against this schema (CreateFullQuoteRequestModel remains the validator of record), so an omitted category fails later in rating rather than at the door. The risks, vehicles, watercrafts, drivers and named_insureds arrays are derived from the Marshmallow request models, so their field types, nullability and required lists follow CreateFullQuoteRequestModel. Configuration that JSON Schema cannot state as a constraint is annotated under x-britecore: normalized category types and matrix lookups (a matrix category's enum is the resolved names its options also list, whatever its type; a name the matrix carries but options does not is reported under matrix.unlisted_options, an option no lookup row resolves to under matrix.unmatched_options, and a default the enum does not list is not published), disallowed options the enum offers, user-input validation and date rules, premium basis, scheduled-item headers with the include_limit and include_coinsurance flags, deductible groups, and the entity fields the server assigns (server_generated) or backs with a quick-code vocabulary (quick_code_type). The envelope's x-britecore carries the policy type's kind (policy_type_kind), and each item its applicable_to_risk_type (All, Property, Vehicle or Watercraft). An Umbrella type adds x-britecore.underlying, with allowed_policy_types (the policy types its underlying policy may be) and copies (what linking one copies onto the quote), and accepts underlying_policy_ids.",
        "properties": {
          "policy_type_id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the Policy Type to describe"
          }
        },
        "required": [
          "policy_type_id"
        ]
      },
      "request-get_quote_wizard_plugin": {
        "type": "object",
        "description": "Request payload for /api/v2/quotes/get_quote_wizard_plugin",
        "properties": {
          "revision_id": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of the policy revision"
          },
          "integration_instance_id": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of the integration instance to use"
          },
          "integration_point_code": {
            "type": "string",
            "enum": [
              "QUOTE_WIZARD_PLUGIN_AFTER_RISK_RATING",
              "QUOTE_WIZARD_PLUGIN_ABOVE_SUBMIT_BUTTON"
            ],
            "description": "The integration point code. Must be one of the supported values."
          },
          "property_id": {
            "type": "string",
            "format": "uuid",
            "description": "Property ID for property-specific content. Required when integration_point_code is QUOTE_WIZARD_PLUGIN_AFTER_RISK_RATING."
          }
        },
        "required": [
          "revision_id",
          "integration_instance_id",
          "integration_point_code"
        ]
      },
      "request-get_rate_chains": {
        "type": "object",
        "description": "Request Schema for /api/v2/lines/get_rate_chains",
        "properties": {
          "effective_date_id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the effective date. Required unless policy_type_ids is provided. All policy types under this effective date are included."
          },
          "location_id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of a location/state to narrow the effective date scope (optional)"
          },
          "policy_type_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Explicit policy type UUIDs. When given, effective_date_id and location_id are ignored (optional)"
          },
          "step_types": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "CATEGORIES",
                "FLAT_RATE",
                "FACTOR_TABLE",
                "RATE_TABLE",
                "PREMIUM_BASIS",
                "DEDUCTIBLE",
                "MINIMUM_PREMIUM",
                "MAXIMUM_PREMIUM",
                "EVALUATION",
                "EVALUATION_TABLE",
                "LIMIT",
                "RATE_PER"
              ]
            },
            "description": "Rate chain step types to include (e.g. [\"CATEGORIES\"]). Steps of other types are excluded server-side. When omitted, full rate chains are returned (optional)"
          }
        }
      },
      "request-get_regenerate_statements_status": {
        "type": "object",
        "description": "Request payload for /api/v2/commissions/get_regenerate_statements_status. Polls the state of an async commission statements regeneration job started via /api/v2/commissions/regenerate_statements. The job is identified by its target report month (year + month). The reference_id returned by regenerate_statements is not accepted here because it is a deterministic hash of the month and therefore redundant -- callers simply re-send the same year + month they started with (or omit both to query the default month).",
        "properties": {
          "year": {
            "type": "integer",
            "minimum": 1900,
            "maximum": 9999,
            "description": "Four-digit calendar year of the report month (e.g. 2026). Must be supplied together with `month`."
          },
          "month": {
            "type": "integer",
            "minimum": 1,
            "maximum": 12,
            "description": "Calendar month of the report month, 1-12. Must be supplied together with `year`."
          }
        },
        "dependentRequired": {
          "year": [
            "month"
          ],
          "month": [
            "year"
          ]
        },
        "required": []
      },
      "request-get_revision_history": {
        "type": "object",
        "description": "Request schema for /api/v2/revision_history/get_revision_history",
        "properties": {
          "api_key": {
            "type": "string",
            "description": "API key for authentication"
          },
          "policy_id": {
            "type": "string",
            "format": "uuid",
            "description": "Policy ID to retrieve revision history for"
          }
        },
        "required": [
          "api_key",
          "policy_id"
        ]
      },
      "request-get_risks": {
        "type": "object",
        "description": "Request Schema for get_risks endpoint",
        "properties": {
          "quote_id": {
            "type": "string",
            "format": "uuid",
            "description": "The UUID of the quote to retrieve risks for"
          }
        },
        "required": [
          "quote_id"
        ]
      },
      "request-get_rule": {
        "type": "object",
        "description": "Request payload for /api/v2/rules/get_rule",
        "properties": {
          "rule_id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the rule to retrieve"
          }
        },
        "required": [
          "rule_id"
        ]
      },
      "request-get_rules_config": {
        "type": "object",
        "description": "Request payload for /api/v2/rules/get_rules_config. This endpoint requires no parameters.",
        "properties": {}
      },
      "request-get_rules_documentation": {
        "type": "object",
        "description": "Request payload for /api/v2/rules/get_rules_documentation. This endpoint requires no parameters.",
        "properties": {}
      },
      "request-get_screening_history": {
        "description": "Request payload for /api/v2/contacts/get_screening_history",
        "type": "object",
        "properties": {
          "contact_id": {
            "type": "string",
            "format": "uuid",
            "description": "The unique identifier of the contact"
          }
        },
        "required": [
          "contact_id"
        ]
      },
      "request-get_status": {
        "type": "object",
        "description": "Request payload for /api/v2/background_jobs/get_status",
        "properties": {
          "task_id": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of the background job to retrieve status for."
          }
        },
        "required": [
          "task_id"
        ]
      },
      "request-get_underlying_policy_changes": {
        "type": "object",
        "description": "Request payload for /api/v2/policies/get_underlying_policy_changes",
        "properties": {
          "revision_id": {
            "type": "string",
            "format": "uuid",
            "description": "The UUID of the current umbrella revision"
          }
        },
        "required": [
          "revision_id"
        ]
      },
      "request-get_underwriting_question_autofill_answers": {
        "type": "object",
        "description": "Request Schema for get_underwriting_question_autofill_answers",
        "properties": {
          "policy_type_id": {
            "type": "string",
            "format": "uuid",
            "description": "Policy Type ID to get auto-fill answers for"
          }
        },
        "required": [
          "policy_type_id"
        ]
      },
      "request-get_upload_url": {
        "type": "object",
        "description": "Request schema for /api/v2/imports/get_upload_url",
        "properties": {
          "schema_type": {
            "type": "string",
            "description": "Schema identifier for the file to be uploaded. For fixed schemas like 'insureds', 'agencies', etc., no policy_type_id is needed. For dynamic schemas like 'policy_transactions', policy_type_id is required.",
            "examples": [
              "insureds",
              "agencies",
              "producers",
              "mortgagees",
              "additional_insured",
              "dates_to_remember",
              "addresses",
              "payments",
              "account_history",
              "notes",
              "credit_reports",
              "policy_transactions"
            ]
          },
          "policy_type_id": {
            "type": "string",
            "format": "uuid",
            "description": "Policy type UUID (required for dynamic schemas like 'policy_transactions'). The first 8 characters will be used in the generated filename.",
            "examples": [
              "a320737f-2aef-42cf-957e-5c5da0e46aa1"
            ]
          }
        },
        "required": [
          "schema_type"
        ]
      },
      "request-get_user_suspensions_with_geometries": {
        "type": "object",
        "description": "Request schema for /api/v2/suspensions/get_user_suspensions_with_geometries",
        "properties": {
          "date": {
            "type": "string",
            "pattern": "^(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])-\\d{4}$",
            "description": "Date to filter suspensions in MM-DD-YYYY format",
            "example": "09-03-2025"
          },
          "state": {
            "type": "string",
            "pattern": "^[A-Z]{2}$",
            "description": "2-letter state abbreviation to filter suspensions",
            "example": "MA"
          }
        },
        "required": [
          "date",
          "state"
        ]
      },
      "request-get_watercraft": {
        "type": "object",
        "description": "Request Schema for /api/v2/watercrafts/get_watercraft",
        "properties": {
          "id": {
            "type": "string",
            "description": "The ID of the watercraft to retrieve"
          }
        },
        "required": [
          "id"
        ]
      },
      "request-get_zip_geometry": {
        "type": "object",
        "description": "Request schema for /api/v2/geometry/get_zip_geometry",
        "properties": {
          "zip_code": {
            "type": "string",
            "pattern": "^\\d{5}$",
            "description": "5-digit zip code to retrieve geometry for",
            "example": "02115"
          }
        },
        "required": [
          "zip_code"
        ]
      },
      "request-grant_report_permission": {
        "type": "object",
        "description": "Request payload for POST /api/v2/reports/grant_report_permission (upsert a grant).",
        "properties": {
          "report_id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the report."
          },
          "grantee_type": {
            "type": "string",
            "enum": [
              "contact",
              "user_group",
              "role",
              "permission_level"
            ],
            "description": "Kind of grantee receiving access."
          },
          "grantee_id": {
            "type": "string",
            "description": "Identifier of the grantee (UUID for contact, role, user_group, permission_level)."
          },
          "access": {
            "type": "string",
            "enum": [
              "none",
              "read",
              "write"
            ],
            "description": "Access level to grant (write implies read for resolution; none blocks at this grantee row)."
          },
          "api_key": {
            "type": "string",
            "description": "API key for external / programmatic clients."
          }
        },
        "required": [
          "report_id",
          "grantee_type",
          "grantee_id",
          "access"
        ]
      },
      "request-import_configuration": {
        "type": "object",
        "description": "Request Schema for /api/v2/settings/import_configuration. Runs against a configuration package already recorded here by create_configuration_import, named by import_id; the package itself is never sent to this endpoint. Where Celery is enabled this queues a background job and returns the record at status queued, to be polled with /api/v2/settings/get_configuration_import; where it is not, the work happens in the request and the record comes back already complete. Sent twice in the ordinary flow, once with dry_run to see what would change and once without to apply it, and both runs hang off the one record, the later replacing the earlier one's outcome.",
        "properties": {
          "import_id": {
            "type": "string",
            "format": "uuid",
            "description": "The configuration import to run against, as returned by create_configuration_import."
          },
          "dry_run": {
            "type": "boolean",
            "default": false,
            "description": "Validate the package without applying it. Default false."
          }
        },
        "required": [
          "import_id"
        ]
      },
      "request-import_disclosures": {
        "type": "object",
        "description": "Request schema for /api/v2/imports/import_disclosures",
        "properties": {
          "override": {
            "type": "boolean",
            "title": "override",
            "description": "A flag to determine whether to override existing disclosures for the given properties",
            "default": false
          },
          "disclosures": {
            "type": "array",
            "title": "disclosures",
            "description": "List of disclosure data to be imported",
            "items": {
              "type": "object",
              "properties": {
                "property_id": {
                  "type": "string",
                  "format": "uuid",
                  "title": "property_id",
                  "description": "The property ID"
                },
                "loss_date": {
                  "type": "string",
                  "format": "date",
                  "title": "loss_date",
                  "description": "Date of the loss"
                },
                "description": {
                  "type": "string",
                  "title": "description",
                  "description": "Description of the loss"
                },
                "loss_amount": {
                  "type": "number",
                  "title": "loss_amount",
                  "description": "Amount of the loss"
                },
                "loss_cause": {
                  "type": "string",
                  "title": "loss_cause",
                  "description": "Cause of the loss"
                }
              },
              "required": [
                "property_id"
              ]
            }
          }
        },
        "required": [
          "disclosures"
        ]
      },
      "request-import_loss_report": {
        "type": "object",
        "description": "Request schema for /api/v2/imports/import_loss_report",
        "properties": {
          "property_id": {
            "type": "string",
            "format": "uuid",
            "title": "property_id",
            "description": "The property ID"
          },
          "loss_reports": {
            "type": "array",
            "title": "loss_reports",
            "description": "List of loss report records to be imported",
            "items": {
              "type": "object",
              "properties": {
                "carrier": {
                  "type": "string",
                  "title": "carrier",
                  "description": "Insurance carrier name"
                },
                "policy_number": {
                  "type": "string",
                  "title": "policy_number",
                  "description": "Policy number"
                },
                "loss_date": {
                  "type": "string",
                  "format": "date",
                  "title": "loss_date",
                  "description": "Date of the loss"
                },
                "primary_insured_name": {
                  "type": "string",
                  "title": "primary_insured_name",
                  "description": "Primary insured name"
                },
                "secondary_insured_name": {
                  "type": "string",
                  "title": "secondary_insured_name",
                  "description": "Secondary insured name"
                },
                "current_address": {
                  "type": "string",
                  "title": "current_address",
                  "description": "Current address"
                },
                "loss_address": {
                  "type": "string",
                  "title": "loss_address",
                  "description": "Address where the loss occurred"
                },
                "loss_cause": {
                  "type": "string",
                  "title": "loss_cause",
                  "description": "Cause of the loss"
                },
                "loss_amount": {
                  "type": "number",
                  "title": "loss_amount",
                  "description": "Amount of the loss"
                },
                "catastrophe_code": {
                  "type": "string",
                  "title": "catastrophe_code",
                  "description": "Catastrophe code"
                },
                "claim_filed_against": {
                  "type": "string",
                  "title": "claim_filed_against",
                  "description": "Party the claim was filed against"
                },
                "claim_number": {
                  "type": "string",
                  "title": "claim_number",
                  "description": "Claim number"
                },
                "claim_status": {
                  "type": "string",
                  "title": "claim_status",
                  "description": "Status of the claim"
                }
              },
              "required": [
                "policy_number",
                "loss_date",
                "loss_cause",
                "loss_amount"
              ]
            }
          },
          "loss_history_report_number": {
            "type": "string",
            "title": "loss_history_report_number",
            "description": "Loss history report number"
          },
          "loss_history_retrieved_date": {
            "type": "string",
            "format": "date",
            "title": "loss_history_retrieved_date",
            "description": "Date when loss history report was retrieved"
          },
          "loss_history_vendor_status": {
            "type": "string",
            "title": "loss_history_vendor_status",
            "description": "Loss history report vendor status"
          },
          "cache_key": {
            "type": "string",
            "title": "cache_key",
            "description": "Cache key for the loss history report"
          },
          "created_by": {
            "type": "string",
            "format": "uuid",
            "title": "created_by",
            "description": "Contact ID of the user who requested the loss history report"
          }
        },
        "required": [
          "property_id",
          "loss_reports"
        ]
      },
      "request-import_payment_method": {
        "description": "Request schema for /api/v2/payments/import_payment_method",
        "type": "object",
        "properties": {
          "contact_id": {
            "type": "string",
            "format": "uuid",
            "description": "Contact ID to which the payment method should be associated with."
          },
          "contact_external_system_reference": {
            "type": "string",
            "description": "External System Reference of the Contact to which the payment method should be associated with."
          },
          "vendor_customer_id": {
            "type": "string",
            "description": "Vendor Customer ID. This is the ID of the customer in the vendor system."
          },
          "vendor_payment_method_id": {
            "type": "string",
            "description": "Vendor Payment Method ID. This is the ID of the payment method in the vendor system."
          },
          "payment_method_type": {
            "type": "string",
            "enum": [
              "CC",
              "ACH"
            ]
          },
          "policy_term_id": {
            "type": "string",
            "format": "uuid",
            "description": "Policy Term ID to which the payment method should be associated with."
          },
          "policy_term_external_system_reference": {
            "type": "string",
            "description": "External System Reference of the Policy Term to which the payment method should be associated with."
          },
          "requester_contact_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Contact ID of the BriteCore user who originally requested that this payment method be created. When provided, this user (rather than the integration server's service account) is recorded as the author of the resulting note. The integration server should forward the requester_contact_id it received on the matching request_payment_method_entry call."
          }
        },
        "required": [
          "vendor_customer_id",
          "vendor_payment_method_id",
          "payment_method_type"
        ]
      },
      "request-import_policy_number": {
        "type": "object",
        "description": "Request payload for /api/v2/imports/import_policy_number.",
        "properties": {
          "policy_id": {
            "type": "string",
            "format": "uuid",
            "description": "The unique identifier of the policy to be imported."
          },
          "policy_number": {
            "type": "string",
            "description": "The policy number to be imported."
          }
        },
        "required": [
          "policy_id",
          "policy_number"
        ]
      },
      "request-import_raiting_table": {
        "title": "ImportRatingTableRequest",
        "type": "object",
        "properties": {
          "location_id": {
            "type": "string",
            "format": "uuid",
            "title": "id",
            "description": "Id of the State"
          },
          "table_definition_id": {
            "type": "string",
            "format": "uuid",
            "title": "id",
            "description": "Id of the Rating Table Definition"
          },
          "effective_date": {
            "format": "date",
            "type": "string",
            "title": "effective_date",
            "description": "Effective date of the rating table"
          },
          "renewal_effective_date": {
            "format": "date",
            "type": "string",
            "title": "renewal_effective_date",
            "description": "Renewal effective date of the rating table"
          },
          "file_id": {
            "type": "string",
            "format": "uuid",
            "title": "file_id",
            "description": "File ID of the rating table"
          }
        }
      },
      "request-io_mapping_add_memory_decision": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/add_memory_decision. Body: ``{mappingId, topic, decision, rationale?}``.",
        "properties": {
          "decision": {
            "type": "string"
          },
          "mappingId": {
            "type": "string",
            "description": "The mapping id."
          },
          "topic": {
            "type": "string"
          },
          "rationale": {
            "type": "string"
          }
        },
        "required": [
          "decision",
          "mappingId",
          "topic"
        ]
      },
      "request-io_mapping_add_memory_followup": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/add_memory_followup. Body: ``{mappingId, topic, status}``.",
        "properties": {
          "mappingId": {
            "type": "string",
            "description": "The mapping id."
          },
          "status": {
            "type": "string"
          },
          "topic": {
            "type": "string"
          }
        },
        "required": [
          "mappingId",
          "status",
          "topic"
        ]
      },
      "request-io_mapping_add_memory_ruled_out": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/add_memory_ruled_out. Body: ``{mappingId, approach, reason}``.",
        "properties": {
          "approach": {
            "type": "string"
          },
          "mappingId": {
            "type": "string",
            "description": "The mapping id."
          },
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "approach",
          "mappingId",
          "reason"
        ]
      },
      "request-io_mapping_add_note": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/add_note. Anchor a note to a place in the mapping. To ASK somebody, prefer",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          },
          "body": {
            "type": "string",
            "description": "The note body."
          },
          "anchorKind": {
            "type": "string"
          },
          "anchorRef": {
            "type": "string"
          },
          "variant": {
            "type": "string",
            "description": "The product variant, e.g. an HO-6 overlay. Omit for the base layer."
          },
          "authorKind": {
            "type": "string"
          },
          "replyTo": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "description": "The record kind to filter by."
          },
          "audience": {
            "type": "string"
          }
        },
        "required": [
          "slug"
        ]
      },
      "request-io_mapping_ask_insurance_expert": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/ask_insurance_expert. Ask a product lead or underwriter a question about how the CARRIER'S PRODUCT",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          },
          "question": {
            "type": "string"
          },
          "anchorKind": {
            "type": "string"
          },
          "anchorRef": {
            "type": "string"
          },
          "variant": {
            "type": "string",
            "description": "The product variant, e.g. an HO-6 overlay. Omit for the base layer."
          },
          "authorKind": {
            "type": "string"
          }
        }
      },
      "request-io_mapping_ask_technical_expert": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/ask_technical_expert. Ask an engineer a question about the SYSTEM -- the endpoint, the schema, the",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          },
          "question": {
            "type": "string"
          },
          "anchorKind": {
            "type": "string"
          },
          "anchorRef": {
            "type": "string"
          },
          "variant": {
            "type": "string",
            "description": "The product variant, e.g. an HO-6 overlay. Omit for the base layer."
          },
          "authorKind": {
            "type": "string"
          }
        }
      },
      "request-io_mapping_assess_variant_fit": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/assess_variant_fit. Should this policy type be a variant of this mapping, or its own mapping?",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          },
          "policyType": {
            "type": "string",
            "description": "The policy type name, e.g. HO-3."
          },
          "state": {
            "type": "string",
            "description": "Two-letter state abbreviation."
          },
          "effectiveDate": {
            "type": "string",
            "description": "The effective date the policy type resolves on."
          }
        },
        "required": [
          "policyType",
          "slug",
          "state"
        ]
      },
      "request-io_mapping_call_wrapped_api": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/call_wrapped_api. Render this mapping's request and CALL the endpoint it wraps, for real.",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          },
          "fixtureId": {
            "type": "string",
            "description": "A fixture id; defaults to the mapping's default fixture."
          },
          "confirm": {
            "type": "boolean",
            "description": "Required on a production site, and only with agreement given in this turn."
          },
          "store": {
            "type": "boolean"
          },
          "intent": {
            "type": "string",
            "description": "One sentence stating what this call creates and why."
          }
        },
        "required": [
          "slug"
        ]
      },
      "request-io_mapping_capture_reconcile_snapshot": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/capture_reconcile_snapshot. Pin the live definition's domains onto the spec as the authoring snapshot",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          },
          "policyType": {
            "type": "string",
            "description": "The policy type name, e.g. HO-3."
          },
          "state": {
            "type": "string",
            "description": "Two-letter state abbreviation."
          },
          "effectiveDate": {
            "type": "string",
            "description": "The effective date the policy type resolves on."
          },
          "capturedAt": {
            "type": "string"
          }
        },
        "required": [
          "slug"
        ]
      },
      "request-io_mapping_clear_agent_memory": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/clear_agent_memory. Wipe the agent_memory column.",
        "properties": {
          "mappingId": {
            "type": "string",
            "description": "The mapping id."
          },
          "mapping_id": {
            "type": "string"
          }
        }
      },
      "request-io_mapping_compile_analytics_preview": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/compile_analytics_preview. Compile a WORKING spec's ANALYTICS section for live preview.",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          },
          "spec": {
            "type": "object"
          }
        }
      },
      "request-io_mapping_compile_resolver_preview": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/compile_resolver_preview. Compile a WORKING (unsaved) spec to its Jinja template for live preview \u2014",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          },
          "spec": {
            "type": "object"
          },
          "variant": {
            "type": "string",
            "description": "The product variant, e.g. an HO-6 overlay. Omit for the base layer."
          },
          "policyType": {
            "type": "string",
            "description": "The policy type name, e.g. HO-3."
          },
          "state": {
            "type": "string",
            "description": "Two-letter state abbreviation."
          }
        },
        "required": [
          "slug"
        ]
      },
      "request-io_mapping_compile_response_preview": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/compile_response_preview. Compile a WORKING spec's RESPONSE section (``spec['response']``) for live preview.",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          },
          "spec": {
            "type": "object"
          }
        }
      },
      "request-io_mapping_copilot": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/copilot. SSE streaming endpoint (mirrors ``reports.py:send_prompt``).",
        "properties": {
          "mappingId": {
            "type": "string",
            "description": "The mapping id."
          },
          "fixtureId": {
            "type": "string",
            "description": "A fixture id; defaults to the mapping's default fixture."
          },
          "prompt": {
            "type": "string"
          },
          "sessionId": {
            "type": "string"
          },
          "selection": {
            "type": "object"
          },
          "activeTemplateSide": {
            "type": "string"
          },
          "turnIntent": {
            "type": "string"
          },
          "requestTemplate": {
            "type": "string"
          },
          "responseTemplate": {
            "type": "string"
          },
          "requestFixture": {
            "type": "string"
          },
          "responseFixture": {
            "type": "string"
          }
        },
        "required": [
          "mappingId",
          "prompt"
        ]
      },
      "request-io_mapping_create_fixture": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/create_fixture. IO mapping endpoint create_fixture.",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          },
          "name": {
            "type": "string",
            "description": "Display name."
          },
          "contentType": {
            "type": "string"
          },
          "content": {
            "type": "string",
            "description": "The document body."
          },
          "apiResponseContent": {
            "type": "string"
          },
          "isDefault": {
            "type": "boolean"
          }
        },
        "required": [
          "content",
          "contentType",
          "name",
          "slug"
        ]
      },
      "request-io_mapping_create_mapping": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/create_mapping. IO mapping endpoint create_mapping.",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          },
          "name": {
            "type": "string",
            "description": "Display name."
          },
          "kind": {
            "type": "string",
            "description": "The record kind to filter by."
          },
          "inputFormat": {
            "type": "string"
          },
          "outputFormat": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "description": "Free-text description."
          },
          "apiCall": {
            "type": "string"
          },
          "inputSchema": {
            "type": "string"
          },
          "inputSchemaId": {
            "type": "string"
          },
          "analyticsSchemaId": {
            "type": "string"
          },
          "draftTemplate": {
            "type": "string"
          },
          "responseDraftTemplate": {
            "type": "string"
          }
        },
        "required": [
          "inputFormat",
          "kind",
          "name",
          "outputFormat",
          "slug"
        ]
      },
      "request-io_mapping_delete_fixture": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/delete_fixture. IO mapping endpoint delete_fixture.",
        "properties": {
          "fixtureId": {
            "type": "string",
            "description": "A fixture id; defaults to the mapping's default fixture."
          }
        },
        "required": [
          "fixtureId"
        ]
      },
      "request-io_mapping_delete_mapping": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/delete_mapping. IO mapping endpoint delete_mapping.",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          }
        },
        "required": [
          "slug"
        ]
      },
      "request-io_mapping_delete_schema": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/delete_schema. Delete a BYOS schema library row.",
        "properties": {
          "force": {
            "type": "boolean",
            "description": "Proceed even when the target is still referenced."
          },
          "id": {
            "type": "string",
            "description": "The schema-library row id."
          },
          "specId": {
            "type": "string",
            "description": "A schema-library spec id. ``spec_id`` is accepted as well."
          },
          "spec_id": {
            "type": "string",
            "description": "A schema-library spec id. ``specId`` is accepted as well."
          }
        }
      },
      "request-io_mapping_discard_draft_note": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/discard_draft_note. Drop one unsent note.",
        "properties": {
          "noteId": {
            "type": "string",
            "description": "An existing note id."
          }
        },
        "required": [
          "noteId"
        ]
      },
      "request-io_mapping_dismiss_memory_decision": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/dismiss_memory_decision. Body: ``{mappingId, topic}``.",
        "properties": {
          "mappingId": {
            "type": "string",
            "description": "The mapping id."
          },
          "topic": {
            "type": "string"
          }
        },
        "required": [
          "mappingId",
          "topic"
        ]
      },
      "request-io_mapping_dismiss_memory_ruled_out": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/dismiss_memory_ruled_out. Body: ``{mappingId, approach}``.",
        "properties": {
          "approach": {
            "type": "string"
          },
          "mappingId": {
            "type": "string",
            "description": "The mapping id."
          }
        },
        "required": [
          "approach",
          "mappingId"
        ]
      },
      "request-io_mapping_export_mapping": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/export_mapping. Return the portable JSON blob for ``slug`` at the given version.",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          },
          "versionId": {
            "type": "string",
            "description": "A stamped version id; defaults to the active version."
          },
          "includeInputSchema": {
            "type": "boolean"
          }
        },
        "required": [
          "slug"
        ]
      },
      "request-io_mapping_find_live_copilot_job": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/find_live_copilot_job. The job already working on this mapping, if there is one.",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          }
        },
        "required": [
          "slug"
        ]
      },
      "request-io_mapping_find_policy_type": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/find_policy_type. As-of resolve ``(name, state, effectiveDate[, lineName])`` to a minimal PT summary.",
        "properties": {
          "effectiveDate": {
            "type": "string",
            "description": "The effective date the policy type resolves on."
          },
          "effective_date": {
            "type": "string"
          },
          "lineName": {
            "type": "string"
          },
          "line_name": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "description": "Display name."
          },
          "state": {
            "type": "string",
            "description": "Two-letter state abbreviation."
          }
        }
      },
      "request-io_mapping_generate_sample": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/generate_sample. Generate a valid, complete sample instance from a schema.",
        "properties": {
          "effectiveDate": {
            "type": "string",
            "description": "The effective date the policy type resolves on."
          },
          "effective_date": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "description": "Display name."
          },
          "schema": {
            "type": "string"
          },
          "state": {
            "type": "string",
            "description": "Two-letter state abbreviation."
          },
          "validate": {
            "type": "string"
          }
        }
      },
      "request-io_mapping_get_analytics_slots": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/get_analytics_slots. The slot grid for the ANALYTICS direction: the mapping's analytics schema",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          },
          "spec": {
            "type": "object"
          }
        },
        "required": [
          "slug"
        ]
      },
      "request-io_mapping_get_copilot_job": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/get_copilot_job. A running job's status, next to what the review still owes.",
        "properties": {
          "jobId": {
            "type": "string"
          },
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          },
          "variant": {
            "type": "string",
            "description": "The product variant, e.g. an HO-6 overlay. Omit for the base layer."
          }
        },
        "required": [
          "jobId"
        ]
      },
      "request-io_mapping_get_endpoint_slots": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/get_endpoint_slots. The endpoint's own schema flattened into the slot grid: one section per top-level",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          },
          "direction": {
            "type": "string",
            "description": "Which side of the mapping to act on: request, response or analytics."
          }
        },
        "required": [
          "slug"
        ]
      },
      "request-io_mapping_get_mapping": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/get_mapping. IO mapping endpoint get_mapping.",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          }
        },
        "required": [
          "slug"
        ]
      },
      "request-io_mapping_get_policy_type_definition": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/get_policy_type_definition. Walkable PT definition (mapping scope: sub_lines + items + item_questions +",
        "properties": {
          "effectiveDate": {
            "type": "string",
            "description": "The effective date the policy type resolves on."
          },
          "effective_date": {
            "type": "string"
          },
          "jmespathQuery": {
            "type": "string"
          },
          "jmespath_query": {
            "type": "string"
          },
          "lineName": {
            "type": "string"
          },
          "line_name": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "description": "Display name."
          },
          "state": {
            "type": "string",
            "description": "Two-letter state abbreviation."
          }
        }
      },
      "request-is_stp_enabled": {
        "type": "object",
        "description": "Request payload for /api/v2/policies/is_stp_enabled",
        "properties": {
          "revision_id": {
            "type": "string",
            "description": "Revision ID to check STP enablement for"
          }
        },
        "required": [
          "revision_id"
        ]
      },
      "request-io_mapping_get_policy_type_schema": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/get_policy_type_schema. Synthesize the extended JSON Schema (the RH mapping target) for a resolved policy",
        "properties": {
          "effectiveDate": {
            "type": "string",
            "description": "The effective date the policy type resolves on."
          },
          "effective_date": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "description": "Display name."
          },
          "state": {
            "type": "string",
            "description": "Two-letter state abbreviation."
          }
        }
      },
      "request-io_mapping_get_resolver_constructs": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/get_resolver_constructs. Everything a mapping DECLARES for its slots to share \u2014 each of it a cell: derived",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          }
        },
        "required": [
          "slug"
        ]
      },
      "request-io_mapping_get_resolver_paths": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/get_resolver_paths. The mapping's named path aliases ({name: absolute-path}) \u2014 the path analogue of",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          }
        },
        "required": [
          "slug"
        ]
      },
      "request-io_mapping_get_resolver_spec": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/get_resolver_spec. The mapping's full resolver spec \u2014 the seed for the client's working copy.",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          }
        },
        "required": [
          "slug"
        ]
      },
      "request-io_mapping_get_review": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/get_review. The mapping stated in the carrier's language -- one row per slot.",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          },
          "policyType": {
            "type": "string",
            "description": "The policy type name, e.g. HO-3."
          },
          "state": {
            "type": "string",
            "description": "Two-letter state abbreviation."
          },
          "versionId": {
            "type": "string",
            "description": "A stamped version id; defaults to the active version."
          },
          "fixtureId": {
            "type": "string",
            "description": "A fixture id; defaults to the mapping's default fixture."
          },
          "includeResolved": {
            "type": "boolean"
          }
        },
        "required": [
          "slug"
        ]
      },
      "request-io_mapping_get_schema": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/get_schema. One schema library row WITH content.",
        "properties": {
          "id": {
            "type": "string",
            "description": "The schema-library row id."
          },
          "specId": {
            "type": "string",
            "description": "A schema-library spec id. ``spec_id`` is accepted as well."
          },
          "spec_id": {
            "type": "string",
            "description": "A schema-library spec id. ``specId`` is accepted as well."
          }
        }
      },
      "request-io_mapping_get_schema_index": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/get_schema_index. Parsed ACORD schema index (codes, code lists, elements, aggregates) for ``schema_id``.",
        "properties": {
          "id": {
            "type": "string"
          },
          "schema_id": {
            "type": "string"
          }
        }
      },
      "request-io_mapping_get_slotfill_context": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/get_slotfill_context. Data for the schema-bound slotFill table editor: source.codes \u2014 the LEFT key",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          },
          "name": {
            "type": "string",
            "description": "Display name."
          },
          "effectiveDate": {
            "type": "string",
            "description": "The effective date the policy type resolves on."
          }
        },
        "required": [
          "slug"
        ]
      },
      "request-io_mapping_get_source_paths": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/get_source_paths. Flatten the inbound document to candidate SOURCE paths + sample values in one",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          },
          "fixtureId": {
            "type": "string",
            "description": "A fixture id; defaults to the mapping's default fixture."
          }
        },
        "required": [
          "slug"
        ]
      },
      "request-io_mapping_get_spec_overview": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/get_spec_overview. Top-level snapshot of one spec.",
        "properties": {
          "specId": {
            "type": "string",
            "description": "A schema-library spec id. ``spec_id`` is accepted as well."
          },
          "spec_id": {
            "type": "string",
            "description": "A schema-library spec id. ``specId`` is accepted as well."
          }
        }
      },
      "request-io_mapping_get_variant_slots": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/get_variant_slots. The Resolver Stack FORM contract for one (policyType, state) variant: the",
        "properties": {
          "policyType": {
            "type": "string",
            "description": "The policy type name, e.g. HO-3."
          },
          "state": {
            "type": "string",
            "description": "Two-letter state abbreviation."
          },
          "effectiveDate": {
            "type": "string",
            "description": "The effective date the policy type resolves on."
          },
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          },
          "variant": {
            "type": "string",
            "description": "The product variant, e.g. an HO-6 overlay. Omit for the base layer."
          },
          "fixtureId": {
            "type": "string",
            "description": "A fixture id; defaults to the mapping's default fixture."
          },
          "includeSuggestions": {
            "type": "boolean"
          },
          "includeTemplate": {
            "type": "boolean"
          },
          "spec": {
            "type": "object"
          }
        }
      },
      "request-io_mapping_import_mapping": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/import_mapping. Create a new mapping from an export blob.",
        "properties": {
          "payload": {
            "type": "object",
            "description": "The exported mapping document to import."
          },
          "slugOverride": {
            "type": "string"
          }
        }
      },
      "request-io_mapping_infer_schema_from_workbook": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/infer_schema_from_workbook. Propose a JSON Schema from an uploaded workbook. Writes nothing -- confirm by",
        "properties": {
          "content": {
            "type": "string",
            "description": "The document body."
          },
          "filename": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "description": "Display name."
          }
        },
        "required": [
          "content"
        ]
      },
      "request-io_mapping_introspect_fixture": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/introspect_fixture. Tag tree for ``document.<...>`` autocomplete.",
        "properties": {
          "fixtureId": {
            "type": "string",
            "description": "A fixture id; defaults to the mapping's default fixture."
          },
          "content": {
            "type": "string",
            "description": "The document body."
          },
          "contentType": {
            "type": "string"
          }
        }
      },
      "request-io_mapping_list_bruno_examples": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/list_bruno_examples. Bruno-collection examples ``{name, collection, method, url, body}``, optionally",
        "properties": {
          "apiCall": {
            "type": "string"
          }
        }
      },
      "request-io_mapping_list_endpoints": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/list_endpoints. Dotted api paths the apiCall pill suggests.",
        "properties": {
          "refresh": {
            "type": "string"
          }
        }
      },
      "request-io_mapping_list_fixture_coordinates": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/list_fixture_coordinates. Every fixture on the mapping, with the COORDINATE its request resolves to.",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          },
          "spec": {
            "type": "object"
          }
        },
        "required": [
          "slug"
        ]
      },
      "request-io_mapping_list_fixtures": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/list_fixtures. Return every fixture on the mapping, **with content**.",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          }
        },
        "required": [
          "slug"
        ]
      },
      "request-io_mapping_list_mappings": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/list_mappings. IO mapping endpoint list_mappings.",
        "properties": {
          "kind": {
            "type": "string",
            "description": "The record kind to filter by."
          }
        }
      },
      "request-io_mapping_list_notes": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/list_notes. Note threads on a mapping.",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          },
          "status": {
            "type": "string"
          },
          "anchorKind": {
            "type": "boolean"
          },
          "anchorRef": {
            "type": "string"
          },
          "variant": {
            "type": "string",
            "description": "The product variant, e.g. an HO-6 overlay. Omit for the base layer."
          }
        },
        "required": [
          "slug"
        ]
      },
      "request-io_mapping_list_policy_types": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/list_policy_types. Every PolicyType row for the carrier -- used by the copilot's discovery flow",
        "properties": {}
      },
      "request-io_mapping_list_schemas": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/list_schemas. Schema library for the manager UI.",
        "properties": {
          "role": {
            "type": "string"
          }
        }
      },
      "request-io_mapping_list_spec_indexes": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/list_spec_indexes. Named query targets in a spec (code lists, aggregates, enums, ...).",
        "properties": {
          "kind": {
            "type": "boolean",
            "description": "The record kind to filter by."
          },
          "specId": {
            "type": "string",
            "description": "A schema-library spec id. ``spec_id`` is accepted as well."
          },
          "spec_id": {
            "type": "string",
            "description": "A schema-library spec id. ``specId`` is accepted as well."
          }
        }
      },
      "request-io_mapping_list_specs": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/list_specs. Every spec the registry knows, sorted ``(source, spec_id)``.",
        "properties": {}
      },
      "request-io_mapping_list_versions": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/list_versions. IO mapping endpoint list_versions.",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          }
        },
        "required": [
          "slug"
        ]
      },
      "request-io_mapping_load_revision_quote": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/load_revision_quote. Reconstruct an existing revision as a ``create_quote_extended`` ``quote_info``",
        "properties": {
          "policyId": {
            "type": "string"
          },
          "revisionId": {
            "type": "string"
          }
        }
      },
      "request-io_mapping_lookup_spec_enum": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/lookup_spec_enum. Members of a named code list / enum within a spec.",
        "properties": {
          "code": {
            "type": "string"
          },
          "limit": {
            "type": "integer",
            "description": "Maximum rows to return."
          },
          "listName": {
            "type": "string"
          },
          "listNames": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Names of the code lists to read."
          },
          "list_name": {
            "type": "string"
          },
          "list_names": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Names of the code lists to read."
          },
          "query": {
            "type": "string"
          },
          "specId": {
            "type": "string",
            "description": "A schema-library spec id. ``spec_id`` is accepted as well."
          },
          "spec_id": {
            "type": "string",
            "description": "A schema-library spec id. ``specId`` is accepted as well."
          }
        }
      },
      "request-io_mapping_lookup_spec_path": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/lookup_spec_path. Resolve a path within a spec (ACORD: dotted element/aggregate; JSONSchema: dotted",
        "properties": {
          "path": {
            "type": "string"
          },
          "specId": {
            "type": "string",
            "description": "A schema-library spec id. ``spec_id`` is accepted as well."
          },
          "spec_id": {
            "type": "string",
            "description": "A schema-library spec id. ``specId`` is accepted as well."
          }
        }
      },
      "request-io_mapping_note_follow_up": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/note_follow_up. Record a JOB for later -- not a question, so nobody owes a reply and it does",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          },
          "body": {
            "type": "string",
            "description": "The note body."
          },
          "audience": {
            "type": "string"
          },
          "anchorKind": {
            "type": "string"
          },
          "anchorRef": {
            "type": "string"
          },
          "variant": {
            "type": "string",
            "description": "The product variant, e.g. an HO-6 overlay. Omit for the base layer."
          },
          "authorKind": {
            "type": "string"
          }
        },
        "required": [
          "slug"
        ]
      },
      "request-io_mapping_promote_slot_to_base": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/promote_slot_to_base. Factor a slot's per-variant override UP into the shared base catalog: the overlay",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          },
          "variant": {
            "type": "string",
            "description": "The product variant, e.g. an HO-6 overlay. Omit for the base layer."
          },
          "item": {
            "type": "string"
          },
          "field": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "description": "The record kind to filter by."
          },
          "recompile": {
            "type": "boolean"
          },
          "policyType": {
            "type": "string",
            "description": "The policy type name, e.g. HO-3."
          },
          "state": {
            "type": "string",
            "description": "Two-letter state abbreviation."
          }
        },
        "required": [
          "slug"
        ]
      },
      "request-io_mapping_reconcile_mapping": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/reconcile_mapping. Reconcile a mapping against the LIVE policy-type definition for one variant.",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          },
          "policyType": {
            "type": "string",
            "description": "The policy type name, e.g. HO-3."
          },
          "state": {
            "type": "string",
            "description": "Two-letter state abbreviation."
          },
          "effectiveDate": {
            "type": "string",
            "description": "The effective date the policy type resolves on."
          },
          "variant": {
            "type": "string",
            "description": "The product variant, e.g. an HO-6 overlay. Omit for the base layer."
          }
        },
        "required": [
          "slug"
        ]
      },
      "request-io_mapping_rename_mapping_slug": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/rename_mapping_slug. Rename an existing mapping's slug.",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          },
          "newSlug": {
            "type": "string"
          }
        },
        "required": [
          "newSlug",
          "slug"
        ]
      },
      "request-io_mapping_render": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/render. Live preview -- render an in-flight (mapping, fixture, template) triple.",
        "properties": {
          "policyTypeEffectiveDate": {
            "type": "string"
          },
          "policyTypeState": {
            "type": "string"
          },
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          },
          "mappingId": {
            "type": "string",
            "description": "The mapping id."
          },
          "fixtureId": {
            "type": "string",
            "description": "A fixture id; defaults to the mapping's default fixture."
          },
          "templateOverride": {
            "type": "string"
          },
          "fixtureContentOverride": {
            "type": "string"
          },
          "fixtureContentType": {
            "type": "string"
          },
          "apiResponseOverride": {
            "type": "string"
          },
          "templateSha256": {
            "type": "string",
            "description": "SHA-256 (hex) of the client's copy, sent in place of templateOverride. The stored copy is rendered only when its digest matches; otherwise the response is `resend`."
          },
          "fixtureContentSha256": {
            "type": "string",
            "description": "SHA-256 (hex) of the client's copy, sent in place of fixtureContentOverride. The stored copy is rendered only when its digest matches; otherwise the response is `resend`."
          },
          "apiResponseSha256": {
            "type": "string",
            "description": "SHA-256 (hex) of the client's copy, sent in place of apiResponseOverride. The stored copy is rendered only when its digest matches; otherwise the response is `resend`."
          },
          "direction": {
            "type": "string",
            "description": "Which side of the mapping to act on: request, response or analytics."
          },
          "outputFormat": {
            "type": "string"
          }
        }
      },
      "request-io_mapping_reply_to_note": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/reply_to_note. Answer one review note, with an outcome.",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          },
          "noteId": {
            "type": "string",
            "description": "An existing note id."
          },
          "body": {
            "type": "string",
            "description": "The note body."
          },
          "outcome": {
            "type": "string"
          }
        },
        "required": [
          "noteId",
          "slug"
        ]
      },
      "request-io_mapping_resolve_memory_followup": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/resolve_memory_followup. Body: ``{mappingId, topic}``.",
        "properties": {
          "mappingId": {
            "type": "string",
            "description": "The mapping id."
          },
          "topic": {
            "type": "string"
          }
        },
        "required": [
          "mappingId",
          "topic"
        ]
      },
      "request-io_mapping_resolve_note": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/resolve_note. Close a note thread, or reopen it.",
        "properties": {
          "noteId": {
            "type": "string",
            "description": "An existing note id."
          },
          "resolved": {
            "type": "boolean"
          }
        },
        "required": [
          "noteId"
        ]
      },
      "request-io_mapping_review_inbox": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/review_inbox. Review notes still waiting on a reply.",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          },
          "variant": {
            "type": "string",
            "description": "The product variant, e.g. an HO-6 overlay. Omit for the base layer."
          }
        },
        "required": [
          "slug"
        ]
      },
      "request-io_mapping_review_index": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/review_index. The mapping's products and what each still owes -- the review's front door, for",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          }
        },
        "required": [
          "slug"
        ]
      },
      "request-io_mapping_save_draft_note": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/save_draft_note. Store a reviewer's unsent answer so a reload does not discard it. Invisible to",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          },
          "body": {
            "type": "string",
            "description": "The note body."
          },
          "anchorKind": {
            "type": "string"
          },
          "anchorRef": {
            "type": "string"
          },
          "variant": {
            "type": "string",
            "description": "The product variant, e.g. an HO-6 overlay. Omit for the base layer."
          },
          "replyTo": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "description": "The record kind to filter by."
          },
          "audience": {
            "type": "string"
          },
          "noteId": {
            "type": "string",
            "description": "An existing note id."
          },
          "outcome": {
            "type": "string"
          }
        },
        "required": [
          "slug"
        ]
      },
      "request-io_mapping_save_resolver_spec": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/save_resolver_spec. Persist the client's working resolver spec \u2014 Save Mapping.",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          },
          "spec": {
            "type": "object"
          },
          "variant": {
            "type": "string",
            "description": "The product variant, e.g. an HO-6 overlay. Omit for the base layer."
          },
          "policyType": {
            "type": "string",
            "description": "The policy type name, e.g. HO-3."
          },
          "state": {
            "type": "string",
            "description": "Two-letter state abbreviation."
          },
          "baseFingerprint": {
            "type": "string"
          }
        },
        "required": [
          "slug"
        ]
      },
      "request-io_mapping_search_policies": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/search_policies. Typeahead search for policies of a given policy type, to load a sample revision",
        "properties": {
          "limit": {
            "type": "integer",
            "description": "Maximum rows to return."
          },
          "policyTypeId": {
            "type": "string"
          },
          "query": {
            "type": "string"
          }
        }
      },
      "request-io_mapping_search_spec": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/search_spec. Fuzzy search across a spec's named entities.",
        "properties": {
          "limit": {
            "type": "integer",
            "description": "Maximum rows to return."
          },
          "query": {
            "type": "string"
          },
          "specId": {
            "type": "string",
            "description": "A schema-library spec id. ``spec_id`` is accepted as well."
          },
          "spec_id": {
            "type": "string",
            "description": "A schema-library spec id. ``specId`` is accepted as well."
          }
        }
      },
      "request-io_mapping_set_active_version": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/set_active_version. IO mapping endpoint set_active_version.",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          },
          "versionId": {
            "type": "string",
            "description": "A stamped version id; defaults to the active version."
          }
        },
        "required": [
          "slug",
          "versionId"
        ]
      },
      "request-io_mapping_set_analytics_resolvers": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/set_analytics_resolvers. BATCH-write ANALYTICS cells -- the dimensions to derive from an inbound",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          },
          "cells": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Resolver cells to author in this call."
          }
        },
        "required": [
          "slug"
        ]
      },
      "request-io_mapping_set_declarations": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/set_declarations. Declare aliases, shared logic and the variant key in ONE transaction.",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          },
          "aliases": {
            "type": "string"
          },
          "derived": {
            "type": "string"
          },
          "channels": {
            "type": "string"
          },
          "variantKey": {
            "type": "string"
          },
          "replace": {
            "type": "boolean"
          },
          "recompile": {
            "type": "boolean"
          },
          "variant": {
            "type": "string",
            "description": "The product variant, e.g. an HO-6 overlay. Omit for the base layer."
          },
          "policyType": {
            "type": "string",
            "description": "The policy type name, e.g. HO-3."
          },
          "state": {
            "type": "string",
            "description": "Two-letter state abbreviation."
          },
          "preview": {
            "type": "string"
          }
        },
        "required": [
          "slug"
        ]
      },
      "request-io_mapping_set_endpoint_slot_source": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/set_endpoint_slot_source. Write (or clear, with ``cell=None``) a ROOT resolver cell, addressed by its",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          },
          "path": {
            "type": "string"
          },
          "cell": {
            "type": "object"
          },
          "direction": {
            "type": "string",
            "description": "Which side of the mapping to act on: request, response or analytics."
          },
          "recompile": {
            "type": "boolean"
          }
        },
        "required": [
          "slug"
        ]
      },
      "request-io_mapping_set_item_repeat": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/set_item_repeat. Make an item emit ONE INSTANCE PER SOURCE ELEMENT, or stop it doing so.",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          },
          "variant": {
            "type": "string",
            "description": "The product variant, e.g. an HO-6 overlay. Omit for the base layer."
          },
          "item": {
            "type": "string"
          },
          "over": {
            "type": "string"
          },
          "scope": {
            "type": "string",
            "enum": [
              "base",
              "overlay"
            ],
            "description": "Which layer the write lands on."
          },
          "distinctBy": {
            "type": "string"
          },
          "keepEmpty": {
            "type": "string"
          },
          "recompile": {
            "type": "boolean"
          },
          "policyType": {
            "type": "string",
            "description": "The policy type name, e.g. HO-3."
          },
          "state": {
            "type": "string",
            "description": "Two-letter state abbreviation."
          }
        },
        "required": [
          "slug"
        ]
      },
      "request-io_mapping_set_lookup_table": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/set_lookup_table. Create or replace a shared lookup table's ``map`` (code\u2192value) and/or ``default``",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          },
          "table": {
            "type": "string"
          },
          "map": {
            "type": "string"
          },
          "default": {
            "type": "string"
          },
          "recompile": {
            "type": "boolean"
          },
          "variant": {
            "type": "string",
            "description": "The product variant, e.g. an HO-6 overlay. Omit for the base layer."
          },
          "policyType": {
            "type": "string",
            "description": "The policy type name, e.g. HO-3."
          },
          "state": {
            "type": "string",
            "description": "Two-letter state abbreviation."
          },
          "sourcePath": {
            "type": "string"
          },
          "targetItem": {
            "type": "string"
          },
          "targetField": {
            "type": "string"
          },
          "tables": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Lookup tables to define in this call."
          },
          "forVariant": {
            "type": "string"
          },
          "preview": {
            "type": "string"
          },
          "mode": {
            "type": "string"
          },
          "standalone": {
            "type": "string"
          }
        },
        "required": [
          "slug"
        ]
      },
      "request-io_mapping_set_resolver_construct": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/set_resolver_construct. Replace one construct section (``derived``/``channels``/``variantKey``) and",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          },
          "section": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "recompile": {
            "type": "boolean"
          },
          "variant": {
            "type": "string",
            "description": "The product variant, e.g. an HO-6 overlay. Omit for the base layer."
          },
          "policyType": {
            "type": "string",
            "description": "The policy type name, e.g. HO-3."
          },
          "state": {
            "type": "string",
            "description": "Two-letter state abbreviation."
          },
          "merge": {
            "type": "boolean"
          },
          "preview": {
            "type": "string"
          }
        },
        "required": [
          "slug"
        ]
      },
      "request-io_mapping_set_resolver_path": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/set_resolver_path. Create / rename / update named path aliases, ONE OR MANY.",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          },
          "name": {
            "type": "string",
            "description": "Display name."
          },
          "path": {
            "type": "string"
          },
          "paths": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Path aliases to write, as {name: path}."
          },
          "recompile": {
            "type": "boolean"
          },
          "variant": {
            "type": "string",
            "description": "The product variant, e.g. an HO-6 overlay. Omit for the base layer."
          },
          "policyType": {
            "type": "string",
            "description": "The policy type name, e.g. HO-3."
          },
          "state": {
            "type": "string",
            "description": "Two-letter state abbreviation."
          },
          "preview": {
            "type": "string"
          }
        },
        "required": [
          "slug"
        ]
      },
      "request-io_mapping_set_resolver_table": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/set_resolver_table. Create / replace / delete one entry in the reference-table library",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          },
          "name": {
            "type": "string",
            "description": "Display name."
          },
          "table": {
            "type": "string"
          },
          "delete": {
            "type": "boolean"
          },
          "recompile": {
            "type": "boolean"
          },
          "variant": {
            "type": "string",
            "description": "The product variant, e.g. an HO-6 overlay. Omit for the base layer."
          },
          "policyType": {
            "type": "string",
            "description": "The policy type name, e.g. HO-3."
          },
          "state": {
            "type": "string",
            "description": "Two-letter state abbreviation."
          },
          "preview": {
            "type": "string"
          }
        },
        "required": [
          "slug"
        ]
      },
      "request-io_mapping_set_resolvers": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/set_resolvers. BATCH-write resolver cells -- the copilot's core authoring primitive (the shift",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          },
          "cells": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Resolver cells to author in this call."
          },
          "variant": {
            "type": "string",
            "description": "The product variant, e.g. an HO-6 overlay. Omit for the base layer."
          },
          "policyType": {
            "type": "string",
            "description": "The policy type name, e.g. HO-3."
          },
          "state": {
            "type": "string",
            "description": "Two-letter state abbreviation."
          },
          "preview": {
            "type": "string"
          },
          "unsourced": {
            "type": "object",
            "description": "Slots this document cannot fill, keyed by target with the reason."
          },
          "tables": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Lookup tables to define in this call."
          },
          "declarations": {
            "type": "object",
            "description": "Tables, variables and variant wiring to declare."
          }
        },
        "required": [
          "slug"
        ]
      },
      "request-io_mapping_set_response_resolvers": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/set_response_resolvers. BATCH-write RESPONSE cells -- the FIELDS dialect, for a response the mapping",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          },
          "cells": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Resolver cells to author in this call."
          },
          "replace_dialect": {
            "type": "boolean"
          }
        },
        "required": [
          "slug"
        ]
      },
      "request-io_mapping_set_response_rewrite": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/set_response_rewrite. Write the RESPONSE REWRITE list -- the dialect for a response that ECHOES the",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          },
          "edits": {
            "type": "string"
          },
          "replace_dialect": {
            "type": "boolean"
          }
        },
        "required": [
          "slug"
        ]
      },
      "request-io_mapping_set_slot_source": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/set_slot_source. Write (or clear) a resolver cell for one slot of a LAYERED mapping -- the",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          },
          "variant": {
            "type": "string",
            "description": "The product variant, e.g. an HO-6 overlay. Omit for the base layer."
          },
          "item": {
            "type": "string"
          },
          "field": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "description": "The record kind to filter by."
          },
          "cell": {
            "type": "object"
          },
          "scope": {
            "type": "string",
            "enum": [
              "base",
              "overlay"
            ],
            "description": "Which layer the write lands on."
          },
          "recompile": {
            "type": "boolean"
          },
          "policyType": {
            "type": "string",
            "description": "The policy type name, e.g. HO-3."
          },
          "state": {
            "type": "string",
            "description": "Two-letter state abbreviation."
          }
        },
        "required": [
          "slug"
        ]
      },
      "request-io_mapping_stamp_version": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/stamp_version. IO mapping endpoint stamp_version.",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          },
          "semverTag": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "setActive": {
            "type": "boolean"
          }
        },
        "required": [
          "semverTag",
          "slug"
        ]
      },
      "request-io_mapping_start_copilot_job": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/start_copilot_job. Hand a submitted review to the copilot as a background job.",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          },
          "variant": {
            "type": "string",
            "description": "The product variant, e.g. an HO-6 overlay. Omit for the base layer."
          },
          "prompt": {
            "type": "string"
          },
          "fixtureId": {
            "type": "string",
            "description": "A fixture id; defaults to the mapping's default fixture."
          }
        },
        "required": [
          "slug"
        ]
      },
      "request-io_mapping_stop_copilot_job": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/stop_copilot_job. Stop a running copilot job.",
        "properties": {
          "jobId": {
            "type": "string"
          }
        },
        "required": [
          "jobId"
        ]
      },
      "request-io_mapping_submit_review": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/submit_review. Send this reviewer's drafts as a batch the copilot is expected to answer.",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          },
          "variant": {
            "type": "string",
            "description": "The product variant, e.g. an HO-6 overlay. Omit for the base layer."
          }
        },
        "required": [
          "slug"
        ]
      },
      "request-io_mapping_update_fixture": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/update_fixture. IO mapping endpoint update_fixture.",
        "properties": {
          "fixtureId": {
            "type": "string",
            "description": "A fixture id; defaults to the mapping's default fixture."
          },
          "name": {
            "type": "string",
            "description": "Display name."
          },
          "contentType": {
            "type": "string"
          },
          "content": {
            "type": "string",
            "description": "The document body."
          },
          "apiResponseContent": {
            "type": "string"
          },
          "isDefault": {
            "type": "boolean"
          }
        },
        "required": [
          "fixtureId"
        ]
      },
      "request-io_mapping_update_mapping_metadata": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/update_mapping_metadata. IO mapping endpoint update_mapping_metadata.",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The mapping slug."
          },
          "name": {
            "type": "string",
            "description": "Display name."
          },
          "description": {
            "type": "string",
            "description": "Free-text description."
          },
          "kind": {
            "type": "string",
            "description": "The record kind to filter by."
          },
          "inputFormat": {
            "type": "string"
          },
          "outputFormat": {
            "type": "string"
          },
          "apiCall": {
            "type": "string"
          },
          "inputSchema": {
            "type": "string"
          },
          "inputSchemaId": {
            "type": "string"
          },
          "analyticsSchemaId": {
            "type": "string"
          },
          "analyticsEnabled": {
            "type": "boolean"
          },
          "analyticsTemplate": {
            "type": "string"
          },
          "redactionRules": {
            "type": "object"
          }
        },
        "required": [
          "slug"
        ]
      },
      "request-io_mapping_update_memory_summary": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/update_memory_summary. Body: ``{mappingId, summary}``.",
        "properties": {
          "mappingId": {
            "type": "string",
            "description": "The mapping id."
          },
          "summary": {
            "type": "string"
          },
          "mapping_id": {
            "type": "string"
          }
        },
        "required": [
          "mappingId",
          "summary"
        ]
      },
      "request-io_mapping_upload_schema": {
        "type": "object",
        "description": "Request schema for POST /api/v2/io_mapping/upload_schema. Create or replace a BYOS schema library row after validating content.",
        "properties": {
          "content": {
            "type": "string",
            "description": "The document body."
          },
          "format": {
            "type": "string",
            "description": "The content format, e.g. jsonschema."
          },
          "name": {
            "type": "string",
            "description": "Display name."
          },
          "description": {
            "type": "string",
            "description": "Free-text description."
          },
          "specId": {
            "type": "string",
            "description": "A schema-library spec id. ``spec_id`` is accepted as well."
          },
          "spec_id": {
            "type": "string",
            "description": "A schema-library spec id. ``specId`` is accepted as well."
          }
        },
        "required": [
          "content",
          "format",
          "name"
        ]
      },
      "request-issue_full_quote": {
        "type": "object",
        "description": "Request payload for /api/v2/quotes/issue_full_quote",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the Quote to issue"
          },
          "external_system_reference": {
            "type": "string",
            "description": "Reference to the quote in an external system"
          }
        }
      },
      "request-ivans_dbcs_abandon_build": {
        "type": "object",
        "description": "Request schema for /api/v2/ivans_dbcs/abandon_build. Marks the month's in-flight build failed so it can be resubmitted. Does not stop a running worker. Refused with NO_BUILD_IN_FLIGHT when nothing is in flight.",
        "properties": {
          "year": {
            "type": "integer",
            "minimum": 1900,
            "maximum": 9999,
            "description": "Four-digit calendar year of the report month."
          },
          "month": {
            "type": "integer",
            "minimum": 1,
            "maximum": 12,
            "description": "Calendar month of the report month, 1-12."
          }
        },
        "required": [
          "year",
          "month"
        ]
      },
      "request-ivans_dbcs_get_build_status": {
        "type": "object",
        "description": "Request schema for /api/v2/ivans_dbcs/get_build_status. Idempotent: polling never consumes the result.",
        "properties": {
          "year": {
            "type": "integer",
            "minimum": 1900,
            "maximum": 9999,
            "description": "Four-digit calendar year of the report month."
          },
          "month": {
            "type": "integer",
            "minimum": 1,
            "maximum": 12,
            "description": "Calendar month of the report month, 1-12."
          }
        },
        "required": [
          "year",
          "month"
        ]
      },
      "request-ivans_dbcs_get_configuration": {
        "type": "object",
        "description": "Request schema for /api/v2/ivans_dbcs/get_configuration. Takes no parameters: the DBCS vendor row is a singleton per tenant.",
        "properties": {}
      },
      "request-ivans_dbcs_get_existing_artifacts": {
        "type": "object",
        "description": "Request schema for /api/v2/ivans_dbcs/get_existing_artifacts.",
        "properties": {
          "year": {
            "type": "integer",
            "minimum": 1900,
            "maximum": 9999,
            "description": "Four-digit calendar year of the report month."
          },
          "month": {
            "type": "integer",
            "minimum": 1,
            "maximum": 12,
            "description": "Calendar month of the report month, 1-12."
          }
        },
        "required": [
          "year",
          "month"
        ]
      },
      "request-ivans_dbcs_get_selected_agencies": {
        "type": "object",
        "description": "Request schema for /api/v2/ivans_dbcs/get_selected_agencies. Takes no parameters and is not paginated.",
        "properties": {}
      },
      "request-ivans_dbcs_rebuild": {
        "type": "object",
        "description": "Request schema for /api/v2/ivans_dbcs/rebuild. submit_build plus the earlier file this build replaces.",
        "properties": {
          "year": {
            "type": "integer",
            "minimum": 1900,
            "maximum": 9999,
            "description": "Four-digit calendar year of the report month."
          },
          "month": {
            "type": "integer",
            "minimum": 1,
            "maximum": 12,
            "description": "Calendar month of the report month, 1-12."
          },
          "supersedes_file_id": {
            "type": "string",
            "maxLength": 36,
            "description": "id of the earlier nxtech_dbcs XML this build replaces. Must exist, be DBCS XML and cover the requested month, or the request is refused before anything is queued. Recorded only on the NEW file's metadata; the superseded file is never modified.",
            "minLength": 1
          },
          "acknowledged_unverified_month": {
            "type": "boolean",
            "default": false,
            "description": "Required true for a month older than last month, whose commission checkpoint is not checked. Ignored for last month. Acknowledgement alone is not enough: the month must still have commission payments."
          }
        },
        "required": [
          "year",
          "month",
          "supersedes_file_id"
        ]
      },
      "request-ivans_dbcs_resolve_agencies": {
        "type": "object",
        "description": "Request schema for /api/v2/ivans_dbcs/resolve_agencies. Resolves a batch of contact ids to rows plus their eligibility verdicts, with no eligibility filter applied -- which is what makes it useful for auditing a stored selection rather than browsing a filtered roster.",
        "properties": {
          "contact_ids": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "maxItems": 2000,
            "description": "Contact ids to resolve. Null or omitted is treated as an empty list and resolves nothing. Repeats are allowed. Ids with no contacts row come back in unknown_contact_ids."
          }
        }
      },
      "request-ivans_dbcs_save_selected_agencies": {
        "type": "object",
        "description": "Request schema for /api/v2/ivans_dbcs/save_selected_agencies. REPLACE THE WHOLE SET: the submitted list becomes the entire stored selection, so adding or dropping a single agency means resubmitting the complete list. Delivered over POST because the api/v2 gateway implements only GET and POST -- there is no PUT handler to route replace semantics to.",
        "properties": {
          "contact_ids": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "maxItems": 2000,
            "description": "The complete new selection. Null or omitted is treated as an empty list, which CLEARS the selection and therefore requires confirmation_text. Every id must be an eligible agency or the whole request is refused and nothing is written. Repeats collapse rather than erroring. The bound of 2000 is generous because a whole-roster save has to fit in one request."
          },
          "confirmation_text": {
            "type": [
              "string",
              "null"
            ],
            "description": "Required, and must be exactly 'CLEAR', only when contact_ids is empty -- clearing the selection stops DBCS file generation entirely, so it is never an accidental empty list. Ignored outright when contact_ids is non-empty."
          }
        }
      },
      "request-ivans_dbcs_search_agencies": {
        "type": "object",
        "description": "Request schema for /api/v2/ivans_dbcs/search_agencies. Field names match the repository-wide pagination schema so a later consumer never has to special-case this endpoint.",
        "properties": {
          "search_text": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 250,
            "description": "Case-insensitive substring match against contacts.name OR contacts.agencyNumber. Null or omitted returns the whole eligible roster. Bounded at 250 because contacts.name is VARCHAR(250): a longer term cannot match either column."
          },
          "page": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000,
            "default": 1,
            "description": "1-based page number. Bounded because it becomes the query's OFFSET, and an unbounded offset costs the same scan however far it walks. A page past the last one is not an error: it returns an empty agencies list with the real total_count."
          },
          "page_size": {
            "type": "integer",
            "minimum": 1,
            "maximum": 25,
            "default": 25,
            "description": "Rows per page. 25 is both the default and the maximum; a larger value is refused rather than clamped."
          }
        }
      },
      "request-ivans_dbcs_submit_build": {
        "type": "object",
        "description": "Request schema for /api/v2/ivans_dbcs/submit_build. Admits and queues a DBCS build for one completed calendar month. Gates, each with its own refusal_code: vendor enabled, agency selection non-empty, month completed, and then for last month a FINISHED commissions checkpoint with commission payments, or for an older month an acknowledgement with commission payments.",
        "properties": {
          "year": {
            "type": "integer",
            "minimum": 1900,
            "maximum": 9999,
            "description": "Four-digit calendar year of the report month."
          },
          "month": {
            "type": "integer",
            "minimum": 1,
            "maximum": 12,
            "description": "Calendar month of the report month, 1-12."
          },
          "acknowledged_unverified_month": {
            "type": "boolean",
            "default": false,
            "description": "Required true for a month older than last month, whose commission checkpoint is not checked. Ignored for last month. Acknowledgement alone is not enough: the month must still have commission payments."
          }
        },
        "required": [
          "year",
          "month"
        ]
      },
      "request-ivr_policy_lookup": {
        "type": "object",
        "description": "Request Schema for /api/v2/policies/ivr_lookup",
        "properties": {
          "digits": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "description": "Policy number without letters and dashes, digits only"
          },
          "property_address_zip": {
            "type": "string",
            "pattern": "^[0-9]{5}$",
            "description": "5-digit US zip code"
          }
        },
        "required": [
          "digits"
        ]
      },
      "request-link_underlying_policy": {
        "type": "object",
        "description": "Request payload for /api/v2/policies/link_underlying_policy",
        "properties": {
          "revision_id": {
            "type": "string",
            "format": "uuid",
            "description": "The UUID of the target revision to link underlying policy to"
          },
          "underlying_policy_id": {
            "type": "string",
            "format": "uuid",
            "description": "The UUID of the underlying policy to copy from"
          }
        },
        "required": [
          "revision_id",
          "underlying_policy_id"
        ]
      },
      "request-list_additional_interests": {
        "type": "object",
        "description": "Request payload for /api/v2/additional_interests/list_additional_interests. Accepts either a risk scope (risk_id) or a revision scope (quote_id).",
        "properties": {
          "quote_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the quote/revision to list interests for (revision scope)"
          },
          "risk_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the risk/property to list interests for (risk scope)"
          }
        }
      },
      "request-list_available_schemas": {
        "type": "object",
        "description": "Request schema for /api/v2/imports/list_available_schemas",
        "properties": {}
      },
      "request-list_brand_associations": {
        "type": "object",
        "description": "Request Schema for /api/v2/brands/list_brand_associations",
        "properties": {}
      },
      "request-list_brands": {
        "type": "object",
        "description": "Request Schema for /api/v2/brands/list_brands",
        "properties": {}
      },
      "request-list_calculated_fields": {
        "type": "object",
        "description": "Request payload for /api/v2/document_templates/list_calculated_fields",
        "properties": {
          "x_report_location_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Template deliverable ID. If provided, returns global + template-specific fields. If null/omitted, returns global fields only."
          }
        }
      },
      "request-list_claim_changes": {
        "type": "object",
        "description": "Request Schema for /api/v2/claim_changes/list_claim_changes",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the Policy Type"
          }
        },
        "required": [
          "id"
        ]
      },
      "request-list_claim_estimations": {
        "type": "object",
        "description": "Request Schema for /api/v2/claim_estimations/list_claim_estimations",
        "properties": {
          "claim_id": {
            "type": "string",
            "format": "uuid",
            "description": "Claim ID"
          }
        },
        "required": [
          "claim_id"
        ]
      },
      "request-list_configuration_exports": {
        "type": "object",
        "description": "Request Schema for /api/v2/settings/list_configuration_exports. Returns configuration exports newest first. Paged: the listing is a site's whole promotion history and would otherwise grow without limit.",
        "properties": {
          "limit": {
            "type": "integer",
            "default": 25,
            "minimum": 1,
            "maximum": 200,
            "description": "Page size. Defaults to 25; values outside the range are clamped rather than rejected."
          },
          "offset": {
            "type": "integer",
            "default": 0,
            "minimum": 0,
            "description": "How many to skip. Ordering is dateAdded descending with id as a tiebreaker, so paging is stable for rows written in the same second."
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "processing",
              "complete",
              "failed"
            ],
            "description": "Optional filter. An unrecognised value is rejected rather than ignored, so a typo cannot read as 'none found'."
          }
        }
      },
      "request-list_configuration_imports": {
        "type": "object",
        "description": "Request Schema for /api/v2/settings/list_configuration_imports. Returns configuration imports newest first. Paged: the listing is a site's whole promotion history and would otherwise grow without limit.",
        "properties": {
          "limit": {
            "type": "integer",
            "default": 25,
            "minimum": 1,
            "maximum": 200,
            "description": "Page size. Defaults to 25; values outside the range are clamped rather than rejected."
          },
          "offset": {
            "type": "integer",
            "default": 0,
            "minimum": 0,
            "description": "How many to skip. Ordering is dateAdded descending with id as a tiebreaker, so paging is stable for rows written in the same second."
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "processing",
              "complete",
              "failed"
            ],
            "description": "Filter to packages whose runs include one in this status. Matching is against the runs, because a package has no status of its own. An unknown value is rejected rather than ignored: ignoring it would answer a typo with the whole listing."
          }
        }
      },
      "request-list_contacts_by_role_code": {
        "type": "object",
        "description": "Request schema for /api/v2/contacts/list_contacts_by_role_code",
        "properties": {
          "role": {
            "type": "string",
            "description": "The role type to search",
            "enum": [
              "agency",
              "agency_group",
              "agent"
            ]
          },
          "filter": {
            "type": "string",
            "description": "The prefix to match against the role code. Minimum 5 characters after trimming whitespace.",
            "minLength": 5
          },
          "limit": {
            "type": "integer",
            "description": "Maximum number of results to return. Defaults to 50.",
            "minimum": 1,
            "maximum": 50
          }
        },
        "required": [
          "role",
          "filter"
        ]
      },
      "request-list_container_coverages_summary": {
        "type": "object",
        "description": "Request schema for POST /api/v2/coverages/list_container_coverages_summary. Exactly one of quote_id (Policy Wide) or property_id (Property) must be provided, not both.",
        "properties": {
          "quote_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Quote (revision) ID for Policy Wide container"
          },
          "property_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Property ID for a specific property container"
          },
          "query": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional filter to match coverages by name or description"
          },
          "pagination": {
            "type": [
              "object",
              "null"
            ],
            "description": "Optional pagination",
            "properties": {
              "page": {
                "type": "integer",
                "description": "Page number (1-based)"
              },
              "page_size": {
                "type": "integer",
                "description": "Number of items per page"
              }
            }
          }
        }
      },
      "request-list_containers": {
        "type": "object",
        "description": "Request schema for POST /api/v2/coverages/list_containers. Lists containers (Policy Wide and Properties) that have coverages matching the optional query.",
        "properties": {
          "quote_id": {
            "type": "string",
            "description": "Quote (revision) ID to list containers for"
          },
          "query": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional filter to match container coverages by name or description"
          }
        },
        "required": [
          "quote_id"
        ]
      },
      "request-list_copilot_skills": {
        "type": "object",
        "description": "Request schema for /api/v2/copilot_skills/list_copilot_skills",
        "properties": {
          "status": {
            "description": "Filter by skill status. Omit or null for all statuses.",
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "string",
                "enum": [
                  "DRAFT",
                  "ACTIVE",
                  "ARCHIVED"
                ]
              }
            ]
          },
          "copilot": {
            "type": [
              "string",
              "null"
            ],
            "description": "Filter by applicable copilot identifier (e.g. 'claim-insights'). Returns skills whose applicable_copilots is empty or contains this value."
          },
          "search": {
            "type": [
              "string",
              "null"
            ],
            "description": "Case-insensitive substring match on name and description."
          }
        }
      },
      "request-list_custom_error_codes": {
        "type": "object",
        "description": "Request schema for /api/v2/configurations/list_custom_error_codes",
        "properties": {
          "module": {
            "type": "string",
            "description": "Optional filter by module (e.g., 'stp')",
            "enum": [
              "stp"
            ]
          }
        },
        "required": []
      },
      "request-list_custom_fields_types": {
        "type": "object",
        "description": "Request Schema for /api/v2/watercrafts/list_custom_fields_types",
        "properties": {
          "quote_id": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of the quote to get custom field types for"
          }
        },
        "required": [
          "quote_id"
        ]
      },
      "request-list_definition_overrides": {
        "type": "object",
        "description": "Request payload for /api/v2/quick_code_values/list_definition_overrides.",
        "properties": {
          "quick_code": {
            "type": "string",
            "description": "The quick code whose policy type definition overrides are reported",
            "maxLength": 200
          },
          "code_value_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional quick code value. When provided, definitions_for_value lists the definitions holding an override row for it; when omitted, that list is empty.",
            "maxLength": 200
          }
        },
        "required": [
          "quick_code"
        ]
      },
      "request-list_disputes": {
        "type": "object",
        "description": "Request Schema for /api/v2/disputes/list_disputes",
        "properties": {
          "claim_id": {
            "type": "string",
            "format": "uuid",
            "description": "Claim ID"
          }
        },
        "required": [
          "claim_id"
        ]
      },
      "request-list_effective_dates": {
        "type": "object",
        "description": "Request schema for /api/v2/lines/list_effective_dates",
        "properties": {
          "page": {
            "type": "integer",
            "description": "Page number"
          },
          "page_size": {
            "type": "integer",
            "description": "Number of items per page"
          },
          "sort_order": {
            "type": "string",
            "enum": [
              "asc",
              "desc"
            ],
            "description": "Sort order"
          }
        }
      },
      "request-list_forms_for_policy_type": {
        "description": "Request payload for /api/v2/lines/list_forms_for_policy_type.",
        "type": "object",
        "properties": {
          "policy_type_id": {
            "type": "string",
            "format": "uuid",
            "description": "Policy Type to list forms for."
          }
        },
        "required": [
          "policy_type_id"
        ]
      },
      "request-list_forms_for_policy_type_item": {
        "description": "Request payload for /api/v2/lines/list_forms_for_policy_type_item.",
        "type": "object",
        "properties": {
          "policy_type_item_id": {
            "type": "string",
            "format": "uuid",
            "description": "Policy Type Item to list forms for."
          }
        },
        "required": [
          "policy_type_item_id"
        ]
      },
      "request-list_grantee_options": {
        "type": "object",
        "description": "Request payload for POST /api/v2/reports/list_grantee_options",
        "properties": {
          "grantee_type": {
            "type": "string",
            "enum": [
              "contact",
              "user_group",
              "role",
              "permission_level"
            ],
            "description": "Which picker list to populate."
          },
          "api_key": {
            "type": "string",
            "description": "API key for external / programmatic clients."
          }
        },
        "required": [
          "grantee_type"
        ]
      },
      "request-list_insights": {
        "type": "object",
        "description": "Request payload for /api/v2/insights/list_insights.",
        "properties": {
          "reference_type": {
            "type": "string",
            "enum": [
              "CLAIM",
              "POLICY"
            ],
            "description": "Type of resource whose insights are being listed"
          },
          "reference_id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the claim or policy whose insights are being listed"
          },
          "product_area": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional product-area filter. Omit or null to return insights from every product area. Pass the literal string \"__NULL__\" to limit results to reference-wide insights (rows whose product_area is null). For CLAIM references: INFORMATION, PARTIES, VEHICLES, DAMAGED_PROPERTIES, INJURIES, ESTIMATIONS, ACCOUNTING, DISPUTES, NOTES, ATTACHMENTS. For POLICY references: INFORMATION, UNDERWRITING, SUBJECTIVITIES, CONTACTS, PROPERTY, VEHICLES, DRIVERS, COVERAGES, RATING, NOTES, ATTACHMENTS, RENEWAL."
          },
          "include_hidden": {
            "type": "boolean",
            "default": false,
            "description": "When false (default), exclude dismissed insights and insights still inside an active snooze window from both the insight list and counts. When true, return the full permitted set including hidden rows."
          }
        },
        "required": [
          "reference_type",
          "reference_id"
        ]
      },
      "request-list_interest_type_labels_by_code": {
        "type": "object",
        "description": "Request payload for /api/v2/additional_interests/list_interest_type_labels_by_code. No parameters: the endpoint returns the tenant-wide code -> label map for ADDITIONAL_INTEREST_TYPES, including inactive rows, so display seams can resolve labels for historical AIs whose stored code was since deactivated.",
        "properties": {}
      },
      "request-list_interest_type_options": {
        "type": "object",
        "description": "Request payload for /api/v2/additional_interests/list_interest_type_options. Resolves the selectable Additional Interest type QuickCode values for a revision, scoped by either a revision (quote_id) or a risk (risk_id). When neither is provided the global active set is returned.",
        "properties": {
          "quote_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the quote/revision to resolve interest type options for (revision scope)"
          },
          "risk_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the risk/property whose revision is used to resolve interest type options (risk scope)"
          }
        }
      },
      "request-list_policy_parties": {
        "type": "object",
        "description": "Request Schema for /api/v2/policies/list_policy_parties",
        "properties": {
          "policy_ids": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "string",
              "description": "Policy id"
            },
            "description": "Policies to collect parties from. Several ids at once are supported (a policy group)."
          },
          "roles": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "named_insured",
                "addtl_interest",
                "mortgagee",
                "agent",
                "finance_company"
              ]
            },
            "description": "Restrict to these roles. A contact is included when it holds at least one requested role, and its roles list is intersected with the request. Omitted: all party roles."
          }
        },
        "required": [
          "policy_ids"
        ]
      },
      "request-list_policy_type_definitions": {
        "type": "object",
        "description": "Request payload for /api/v2/policy_types/list_policy_type_definitions. Takes no business parameters.",
        "properties": {}
      },
      "request-list_policy_types": {
        "type": "object",
        "description": "Request Schema for /api/v2/lines/list_policy_types",
        "properties": {
          "effective_date": {
            "type": "string",
            "format": "date",
            "description": "The effective date of the policy type"
          },
          "effective_date_id": {
            "type": "string",
            "format": "uuid",
            "description": "The effective date ID of the policy type"
          },
          "location_id": {
            "type": "string",
            "format": "uuid",
            "description": "The location ID of the policy type"
          },
          "external_system_reference": {
            "type": "string",
            "description": "External ID of the policy type"
          }
        }
      },
      "request-list_quick_code_values": {
        "type": "object",
        "description": "Request payload for /api/v2/quick_code_values/list_quick_code_values.",
        "properties": {
          "quick_codes": {
            "description": "A single quick code or a list of quick codes to list values for. When definition_code is provided, exactly one quick code is required.",
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "active_only": {
            "type": "boolean",
            "description": "When true, only globally-active values are returned. Ignored when definition_code is provided: the definition decides for itself, and one with its own list keeps returning a value that has since been retired globally.",
            "default": false
          },
          "definition_code": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional policy type definition code. When provided, only the values enabled for that definition are returned; if the definition has no overrides, all globally-active values are returned. Requires exactly one quick code.",
            "maxLength": 200
          }
        },
        "required": [
          "quick_codes"
        ]
      },
      "request-list_quick_quote_templates": {
        "type": "object",
        "description": "Request schema for /api/v2/quick_quote_templates/list_quick_quote_templates",
        "properties": {}
      },
      "request-list_rating_grids": {
        "title": "ListRatingGridsRequest",
        "type": "object",
        "properties": {
          "page": {
            "type": "integer",
            "minimum": 0
          },
          "page_size": {
            "type": "integer",
            "minimum": 1
          },
          "sort_order": {
            "type": "string",
            "enum": [
              "asc",
              "desc"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "uploaded",
              "pending",
              "processing",
              "success",
              "warning",
              "error"
            ]
          }
        },
        "dependentRequired": {
          "page": [
            "page_size"
          ],
          "page_size": [
            "page"
          ]
        }
      },
      "request-list_report_permissions": {
        "type": "object",
        "description": "Request payload for POST /api/v2/reports/list_report_permissions",
        "properties": {
          "report_id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the report whose ACL rows to return."
          },
          "api_key": {
            "type": "string",
            "description": "API key for external / programmatic clients."
          }
        },
        "required": [
          "report_id"
        ]
      },
      "request-list_rules": {
        "type": "object",
        "description": "Request payload for /api/v2/rules/list_rules. Lists all underwriting rules for a policy type.",
        "properties": {
          "policy_type_id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the policy type to list rules for"
          }
        },
        "required": [
          "policy_type_id"
        ]
      },
      "request-list_rules_stp_results": {
        "type": "object",
        "description": "Request payload for /api/v2/rules/list_rules_stp_results. Lists STP execution results for a revision.",
        "properties": {
          "revision_id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the revision to get STP results for"
          },
          "page": {
            "type": "integer",
            "minimum": 1,
            "default": 1,
            "description": "Page number for pagination (default: 1)"
          },
          "page_size": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "default": 25,
            "description": "Number of executions per page, max 100 (default: 25)"
          }
        },
        "required": [
          "revision_id"
        ]
      },
      "request-list_scopes": {
        "type": "object",
        "description": "Request payload for /api/v2/convenience_fees/list_scopes. Takes no parameters -- returns every business-location scope plus integration/admin flags for the Payments settings page.",
        "properties": {}
      },
      "request-list_stp_results": {
        "type": "object",
        "description": "Request payload for /api/v2/rules/list_rules_stp_results",
        "properties": {
          "revision_id": {
            "type": "string",
            "description": "Revision ID to retrieve STP results for"
          },
          "page": {
            "type": "integer",
            "minimum": 1,
            "default": 1,
            "description": "Page number for pagination"
          },
          "page_size": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "default": 25,
            "description": "Number of items per page"
          }
        },
        "required": [
          "revision_id"
        ]
      },
      "request-list_subjectivities": {
        "type": "object",
        "description": "Request schema for /api/v2/subjectivities/list_subjectivities",
        "properties": {
          "revision_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the revision to retrieve subjectivities from"
          },
          "external_system_reference": {
            "type": "string",
            "description": "Reference to the revision in an external system"
          }
        }
      },
      "request-list_subjectivity_definitions": {
        "title": "ListSubjectivitiesRequest",
        "type": "object",
        "description": "Request schema for /api/v2/subjectivities/list_subjectivity_definitions",
        "anyOf": [
          {
            "properties": {
              "active": {
                "type": "boolean",
                "description": "Filter subjectivity definitions by active status"
              }
            }
          },
          {
            "oneOf": [
              {
                "properties": {
                  "policy_type_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "ID of the policy type to filter subjectivity definitions"
                  },
                  "active": {
                    "type": "boolean",
                    "description": "Filter subjectivity definitions by active status"
                  }
                },
                "required": [
                  "policy_type_id"
                ]
              },
              {
                "properties": {
                  "policy_type_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "List of policy type IDs to filter subjectivity definitions"
                  },
                  "active": {
                    "type": "boolean",
                    "description": "Filter subjectivity definitions by active status"
                  }
                },
                "required": [
                  "policy_type_ids"
                ]
              }
            ]
          }
        ],
        "not": {
          "properties": {
            "policy_type_id": {
              "type": "string"
            },
            "policy_type_ids": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "required": [
            "policy_type_id",
            "policy_type_ids"
          ]
        }
      },
      "request-list_system_tags": {
        "type": "object",
        "description": "Request Schema for /api/v2/settings/list_system_tags",
        "properties": {}
      },
      "request-list_watercrafts_for_quote": {
        "type": "object",
        "description": "Request Schema for /api/v2/watercrafts/list_watercrafts_for_quote",
        "properties": {
          "quote_id": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of the quote to list watercrafts for"
          }
        },
        "required": [
          "quote_id"
        ]
      },
      "request-make_multi_exposure_payment": {
        "type": "object",
        "description": "Request Schema for /api/v2/claim_exposures/make_multi_exposures_payment",
        "properties": {
          "payment_details": {
            "$ref": "#/components/schemas/claim_multi_exposure_payment-def"
          }
        },
        "required": [
          "payment_details"
        ]
      },
      "request-make_note": {
        "description": "Request schema for /api/v2/integrations/make_note",
        "type": "object",
        "properties": {
          "integration_instance_external_id": {
            "type": "string",
            "description": "External ID of the integration instance creating the note."
          },
          "reference_id": {
            "type": "string",
            "description": "Reference ID to associate the note with (e.g., policy number, claim ID)."
          },
          "title": {
            "type": "string",
            "maxLength": 250,
            "description": "Title of the note. Will be prefixed with the integration instance name."
          },
          "contents": {
            "type": "string",
            "description": "Content/body of the note."
          }
        },
        "required": [
          "integration_instance_external_id",
          "reference_id",
          "title",
          "contents"
        ]
      },
      "request-make_payment_by_contact_and_payment_method": {
        "description": "Request schema for /api/v2/payments/make_payment_by_contact_and_payment_method",
        "type": "object",
        "properties": {
          "contact_id": {
            "type": "string",
            "format": "uuid",
            "description": "Contact ID"
          },
          "payment_method_id": {
            "type": "string",
            "format": "uuid",
            "description": "Britecore Payment Method ID"
          },
          "payment_amount": {
            "type": [
              "number",
              "string"
            ],
            "description": "Payment Amount: min/max/next_term or Explicit Amount to Pay"
          },
          "policy_id": {
            "type": "string",
            "format": "uuid",
            "description": "Policy ID"
          },
          "payor_name": {
            "type": "string",
            "description": "Payor name: contact name of the person who initiated payment for the policy(optional)"
          },
          "payor_email": {
            "type": "string",
            "format": "email",
            "description": "Payor email: contact email of the person who initiated payment for the policy(optional). When present and valid, the standard payment confirmation is auto-emailed to it; when absent or invalid, no confirmation email is sent."
          },
          "bypass_cannotpay_guard": {
            "type": "boolean",
            "default": false,
            "description": "Skip the payability guard and accept the payment on a policy the carrier's configuration would otherwise refuse -- a pending non-pay cancellation flagged Poor Payment History, an expired or rejected policy, one canceled past its payment window (BC-24420). For internal callers acting on behalf of staff, who may take a payment the insured cannot make themselves: the life-cycle options behind the refusal are scoped to external payments. Must be a real boolean: a non-boolean is rejected with error_code invalid_parameter rather than coerced, so a stringy \"false\" cannot be read as an enabled bypass. Omit it, or send false, on any insured-facing channel."
          }
        },
        "required": [
          "payment_method_id",
          "payment_amount"
        ],
        "$comment": "The endpoint charges either one policy or every policy of a contact, so policy_id and contact_id are not both required -- at least one must be present. `policy_id` wins when both are sent: the handler takes the single-policy path and never reads `contact_id`. Previously both were listed as unconditionally required, which no caller satisfied on the single-policy path and which generated clients enforced wrongly (BC-24420)."
      },
      "request-mark_failed": {
        "description": "Request schema for /api/v2/disbursements/mark_failed (IS reports a terminal failure). Source state is derived from failure_origin: vendor_rejected<-pending, recipient_returned/cancel_acknowledged<-in_transit.",
        "type": "object",
        "properties": {
          "api_key": {
            "type": "string",
            "description": "API key for the internal-integrations caller (consumed by the gateway for authentication)."
          },
          "integration_instance_external_id": {
            "type": "string",
            "description": "External ID of the caller's ACH_ISSUANCE integration instance."
          },
          "disbursement_attempt_id": {
            "type": "string",
            "format": "uuid",
            "description": "The disbursement_attempts row to transition."
          },
          "failure_origin": {
            "type": "string",
            "enum": [
              "vendor_rejected",
              "recipient_returned",
              "cancel_acknowledged",
              "admin_terminate"
            ],
            "description": "Why the disbursement failed. vendor_rejected / recipient_returned / cancel_acknowledged drive the terminal transition. admin_terminate is a RECOGNIZED but operator-only value: the endpoint accepts it and returns a policy rejection (HTTP 200, success=true, data.accepted=false, rejection_reason=incompatible_current_state) rather than treating it as malformed input. Any value outside this enum is a malformed request (success=false)."
          },
          "failure_code": {
            "type": "string",
            "maxLength": 64,
            "description": "Machine-readable failure code (e.g. an ACH/vendor code)."
          },
          "failure_reason": {
            "type": "string",
            "description": "Human-readable failure detail."
          },
          "ach_return_code": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 8,
            "description": "Optional NACHA ACH return code (e.g. R01)."
          }
        },
        "required": [
          "api_key",
          "integration_instance_external_id",
          "disbursement_attempt_id",
          "failure_origin",
          "failure_code",
          "failure_reason"
        ]
      },
      "request-mark_in_transit": {
        "description": "Request schema for /api/v2/disbursements/mark_in_transit (IS reports the vendor accepted the submission: pending -> in_transit).",
        "type": "object",
        "properties": {
          "api_key": {
            "type": "string",
            "description": "API key for the internal-integrations caller (consumed by the gateway for authentication)."
          },
          "integration_instance_external_id": {
            "type": "string",
            "description": "External ID of the caller's ACH_ISSUANCE integration instance."
          },
          "disbursement_attempt_id": {
            "type": "string",
            "format": "uuid",
            "description": "The disbursement_attempts row to transition."
          },
          "vendor_reference_id": {
            "type": "string",
            "maxLength": 255,
            "description": "The IS/vendor handle for the operation (set-once on the row). Normally supplied by the IS, but it may be omitted/blank when the row already has a previously snapshotted vendor reference (e.g. recovered via admin_terminate's get_vendor_reference) -- in that case the existing value carries forward. It is only rejected (missing_vendor_reference) when both the incoming value and the row's stored value are blank."
          }
        },
        "required": [
          "api_key",
          "integration_instance_external_id",
          "disbursement_attempt_id"
        ]
      },
      "request-mark_settled": {
        "description": "Request schema for /api/v2/disbursements/mark_settled (IS reports the vendor settled the funds: in_transit -> settled).",
        "type": "object",
        "properties": {
          "api_key": {
            "type": "string",
            "description": "API key for the internal-integrations caller (consumed by the gateway for authentication)."
          },
          "integration_instance_external_id": {
            "type": "string",
            "description": "External ID of the caller's ACH_ISSUANCE integration instance."
          },
          "disbursement_attempt_id": {
            "type": "string",
            "format": "uuid",
            "description": "The disbursement_attempts row to transition."
          }
        },
        "required": [
          "api_key",
          "integration_instance_external_id",
          "disbursement_attempt_id"
        ]
      },
      "request-medical_codes_search": {
        "type": "object",
        "description": "Request Schema for /api/v2/medical_codes/search",
        "properties": {
          "code_system": {
            "type": "string",
            "minLength": 1,
            "maxLength": 20,
            "pattern": ".*\\S.*",
            "description": "Code system to search within (e.g. 'ICD10')"
          },
          "terms": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": ".*\\S.*",
            "description": "Lookup term matched against the code prefix or the description (FULLTEXT)"
          },
          "count": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "default": 10,
            "description": "Maximum number of results to return (1-100, default 10)"
          }
        },
        "required": [
          "code_system",
          "terms"
        ]
      },
      "request-modify_contact": {
        "type": "object",
        "description": "Request payload for /api/v2/contacts/modify_contact.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "confirmation_email": {
            "type": "string",
            "pattern": "^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$"
          },
          "date_of_birth": {
            "type": "string",
            "format": "date"
          },
          "drivers_license": {
            "type": "string"
          },
          "external_system_reference": {
            "type": "string"
          },
          "last_synched_date": {
            "type": "string",
            "format": "date-time"
          },
          "source_update_date": {
            "type": "string",
            "format": "date-time"
          },
          "fein_tax_id": {
            "type": "string"
          },
          "legal_entity_type": {
            "type": "string"
          },
          "date_business_started": {
            "type": "string",
            "format": "date"
          },
          "dba": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "added_by": {
            "type": "string"
          },
          "purchase_date": {
            "type": "string",
            "format": "date"
          },
          "position": {
            "type": "string"
          },
          "website": {
            "type": "string"
          },
          "ssn_group": {
            "type": "string"
          },
          "ssn": {
            "type": "string"
          },
          "agency_inception_date": {
            "type": "string",
            "format": "date"
          },
          "agency_termination_date": {
            "type": "string",
            "format": "date"
          },
          "follow_agency_quoting_restriction": {
            "type": "boolean",
            "default": true
          },
          "type": {
            "type": "string",
            "enum": [
              "individual",
              "organization"
            ]
          },
          "username": {
            "type": "string"
          },
          "gender": {
            "type": "string",
            "enum": [
              "Male",
              "Female",
              "Undisclosed",
              "Other"
            ]
          },
          "driver_license_date": {
            "type": "string",
            "format": "date"
          },
          "license_state": {
            "type": "string",
            "pattern": "^[A-Z]{2}$"
          },
          "date_of_death": {
            "type": "string",
            "format": "date"
          },
          "hicn_number": {
            "type": "string"
          },
          "phones": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/phone-def"
            }
          },
          "addresses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/address-def"
            }
          },
          "emails": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/email-def"
            }
          },
          "company_id": {
            "type": "string"
          },
          "agency_group_number": {
            "type": "string"
          },
          "agency_number": {
            "type": "string"
          },
          "agent_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "commission_structure": {
            "type": "string"
          },
          "roles": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                }
              },
              "required": [
                "name"
              ]
            }
          }
        },
        "required": [
          "id",
          "type",
          "name"
        ],
        "allOf": [
          {},
          {}
        ]
      },
      "request-modify_effective_date": {
        "type": "object",
        "description": "Request schema for /api/v2/lines/modify_effective_date",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The id of the effective date"
          },
          "effective_date": {
            "type": "string",
            "format": "date",
            "description": "The effective date"
          },
          "description": {
            "type": "string",
            "description": "The description of the effective date"
          },
          "force": {
            "type": "boolean",
            "description": "When true, skips all validations during effective date modification",
            "default": false
          }
        },
        "required": [
          "effective_date",
          "id"
        ]
      },
      "request-modify_full_quote": {
        "type": "object",
        "description": "Request Schema for modify_full_quote",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Quote ID"
          },
          "external_system_reference": {
            "type": "string",
            "description": "External ID of the Quote. Also updates the revision's external system reference."
          },
          "effective_date": {
            "type": "string",
            "format": "date",
            "description": "Quote Effective Date. For new business, synced with term_effective_date."
          },
          "term_effective_date": {
            "type": "string",
            "format": "date",
            "description": "Term Effective Date. For new business, takes precedence over effective_date when both are provided."
          },
          "term_type": {
            "type": "string",
            "enum": [
              "3 Years",
              "18 Months",
              "1 Year",
              "Annual",
              "9 Months",
              "6 Months",
              "3 Months",
              "1 Month",
              "Monthly",
              "Custom"
            ],
            "description": "Term Type. Only applied for new business quotes."
          },
          "expiration_date": {
            "type": "string",
            "format": "date",
            "description": "Policy Expiration Date. Only applied when term_type is Custom."
          },
          "renewal_type": {
            "type": "string",
            "enum": [
              "3 Years",
              "18 Months",
              "1 Year",
              "Annual",
              "9 Months",
              "6 Months",
              "3 Months",
              "1 Month",
              "Monthly"
            ],
            "description": "Renewal Term Type. Only applied when term_type is Custom."
          },
          "renewal_status": {
            "type": "string",
            "enum": [
              "Renew",
              "Non-Renewal"
            ],
            "description": "Renewal status for the policy. Only applied for new business quotes."
          },
          "agent_id": {
            "type": "string",
            "format": "uuid",
            "description": "The UUID of the Agent"
          },
          "agency_id": {
            "type": "string",
            "format": "uuid",
            "description": "The UUID of the Agency"
          },
          "commission_rate": {
            "type": "number",
            "description": "Commission rate"
          },
          "underwriting_questions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "question_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Underwriting Question ID"
                },
                "yes_no_explain": {
                  "enum": [
                    "yes",
                    "no",
                    "none"
                  ]
                },
                "explanation": {
                  "type": "string"
                }
              },
              "required": [
                "question_id",
                "yes_no_explain"
              ]
            }
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Items with no id are considered new items. Items with an id are considered existing items.",
              "allOf": [
                {
                  "$ref": "#/components/schemas/item_update-def"
                }
              ],
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Item ID"
                }
              }
            }
          },
          "sub_lines": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Sub Lines with no id are considered new sub lines. Sub Lines with an id are considered existing sub lines.",
              "allOf": [
                {
                  "$ref": "#/components/schemas/subline_update-def"
                }
              ],
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Sub Line ID"
                },
                "items": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/item_update-def"
                      }
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "description": "Item ID"
                      }
                    }
                  }
                }
              }
            }
          },
          "named_insureds": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Named Insureds with no id are considered new named insureds. Named Insureds with an id are considered existing named insureds.",
              "allOf": [
                {
                  "$ref": "#/components/schemas/named_insured-def"
                }
              ],
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Named Insured ID"
                }
              }
            }
          },
          "risks": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Risks with no id are considered new risks. Risks with an id are considered existing risks.",
              "allOf": [
                {
                  "$ref": "#/components/schemas/risk-def"
                }
              ],
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Risk ID"
                },
                "items": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "description": "Items with no id are considered new items. Items with an id are considered existing items.",
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/item_update-def"
                      }
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "description": "Item ID"
                      }
                    }
                  }
                },
                "sub_lines": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "description": "Sub Lines with no id are considered new sub lines. Sub Lines with an id are considered existing sub lines.",
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/subline_update-def"
                      }
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "description": "Sub Line ID"
                      },
                      "items": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "description": "Items with no id are considered new items. Items with an id are considered existing items.",
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/item_update-def"
                            }
                          ],
                          "properties": {
                            "id": {
                              "type": "string",
                              "format": "uuid",
                              "description": "Item ID"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "billing_information": {
            "type": "object",
            "properties": {
              "billing_schedule": {
                "type": "string",
                "description": "Billing Schedule"
              },
              "withdraw_when": {
                "type": "string",
                "description": "Withdraw Funds When. Examples: 'On Due Date', '15 Days Before Due Date' etc."
              },
              "bill_whom_id": {
                "type": "string",
                "format": "uuid",
                "description": "Bill Whom ID"
              },
              "bill_whom_external_system_reference": {
                "type": "string",
                "description": "Bill Whom External System Reference"
              }
            }
          },
          "underlying_policy_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "List of underlying policy IDs to copy data from"
          }
        }
      },
      "request-modify_policy_type": {
        "type": "object",
        "description": "Request Schema for /api/v2/lines/modify_policy_type",
        "allOf": [
          {
            "$ref": "#/components/schemas/policy_type_def-def"
          }
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Policy Type ID"
          },
          "items": {
            "type": "array",
            "description": "Policy Type Items",
            "items": {
              "type": "object",
              "$ref": "#/components/schemas/policy_type_item-def",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Line Item ID"
                }
              },
              "required": [
                "id"
              ]
            }
          },
          "sub_lines": {
            "type": "array",
            "description": "Policy Type Sub Lines",
            "items": {
              "type": "object",
              "$ref": "#/components/schemas/sub_line_def-def",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Sub Line ID"
                },
                "items": {
                  "type": "array",
                  "description": "Sub Line Items",
                  "items": {
                    "type": "object",
                    "$ref": "#/components/schemas/policy_type_item-def",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "description": "Line Item ID"
                      }
                    },
                    "required": [
                      "id"
                    ]
                  }
                }
              },
              "required": [
                "id"
              ]
            }
          }
        },
        "required": [
          "id"
        ]
      },
      "request-modify_policy_type_item": {
        "type": "object",
        "description": "Request Schema for /api/v2/lines/modify_policy_type_item. Partial update \u2014 only provided fields are modified.",
        "allOf": [
          {
            "$ref": "#/components/schemas/policy_type_item-def"
          }
        ],
        "required": [
          "id"
        ]
      },
      "request-modify_sub_line": {
        "type": "object",
        "description": "Request Schema for /api/v2/lines/modify_sub_line. Partial update -- only provided fields are modified.",
        "allOf": [
          {
            "$ref": "#/components/schemas/sub_line_def-def"
          }
        ],
        "required": [
          "id"
        ]
      },
      "request-modify_subjectivity": {
        "type": "object",
        "description": "Request schema for /api/v2/subjectivities/modify_subjectivity",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the revision subjectivity"
          },
          "status": {
            "type": "string",
            "enum": [
              "Satisfied",
              "Not Satisfied",
              "Waived",
              "Expired",
              "Canceled"
            ],
            "description": "Status of the subjectivity"
          },
          "due_date": {
            "type": "string",
            "format": "date-time",
            "description": "Due date for this subjectivity to be met before"
          },
          "assignee": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the assignee"
          },
          "description": {
            "type": "string",
            "description": "Description of the subjectivity"
          },
          "statement": {
            "type": "string",
            "description": "Statement for the subjectivity."
          }
        },
        "required": [
          "id"
        ]
      },
      "request-modify_subjectivity_definition": {
        "type": "object",
        "description": "Request schema for /api/v2/subjectivities/modify_subjectivity_definition",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the subjectivity to be Modified"
          },
          "name": {
            "type": "string",
            "maxLength": 100,
            "description": "Name for the subjectivity definition"
          },
          "description": {
            "type": "string",
            "maxLength": 500,
            "description": "Description for the subjectivity definition"
          },
          "policy_type_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the associated policy type"
          },
          "mandatory": {
            "type": "boolean",
            "description": "true for mandatory and false for non-mandatory. Default is false"
          },
          "active": {
            "type": "boolean",
            "description": "true for active and false for inactive. Default is true"
          },
          "due_within_days": {
            "type": "integer",
            "minimum": 0,
            "description": "Days the subjectivity is due within"
          },
          "due_date_type": {
            "type": "string",
            "enum": [
              "Pre Bind",
              "Post Bind",
              "Post Issue"
            ],
            "description": "Type of due date (e.g., 'Post Bind' or 'Post Issue')"
          },
          "statement": {
            "type": "string",
            "description": "Statement for the subjectivity definition"
          }
        },
        "required": [
          "id"
        ]
      },
      "request-modify_task": {
        "type": "object",
        "description": "Request payload for /api/v2/tasks/modify_task",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of the task to modify."
          },
          "claim_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Attach an unattached (triage) task to this claim. Attach-only: rejected if the task already has a claim or policy, if policy_id is also supplied, or if the task definition is policy-scoped."
          },
          "policy_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Attach an unattached (triage) task to this policy. Attach-only: rejected if the task already has a claim or policy, if claim_id is also supplied, or if the task definition is claim-scoped."
          },
          "description": {
            "type": "string",
            "description": "Updated description of the task."
          },
          "priority": {
            "type": "string",
            "enum": [
              "Low",
              "Medium",
              "High"
            ],
            "description": "Updated priority level of the task."
          },
          "due_date": {
            "type": "string",
            "format": "date-time",
            "description": "Updated due date for the task (must be greater than or equal to today)."
          },
          "assignee_id": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of the user to assign this task to."
          },
          "status": {
            "type": "string",
            "enum": [
              "Open",
              "In Progress",
              "Blocked",
              "Escalated",
              "Completed",
              "Canceled"
            ],
            "description": "Updated status of the task."
          },
          "mandatory": {
            "type": "boolean",
            "description": "Indicates if the task is mandatory."
          }
        },
        "required": [
          "id"
        ]
      },
      "request-modify_task_definition": {
        "type": "object",
        "description": "Request payload for /api/v2/tasks/modify_task_definition",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of the task definition to modify."
          },
          "name": {
            "type": "string",
            "description": "Updated name of the task definition."
          },
          "description": {
            "type": "string",
            "description": "Updated description of the task definition."
          },
          "deleted": {
            "type": "boolean",
            "description": "Whether to soft delete the task definition."
          }
        },
        "required": [
          "id"
        ]
      },
      "request-modify_task_definitions_assignees": {
        "type": "object",
        "description": "Request payload for /api/v2/tasks/modify_task_definitions_assignees",
        "properties": {
          "task_definition_id": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of the task definition to modify assignments for."
          },
          "add_role_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "List of role IDs to add to the task definition.",
            "default": []
          },
          "add_user_group_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "List of user group IDs to add to the task definition.",
            "default": []
          },
          "delete_role_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "List of role IDs to remove from the task definition.",
            "default": []
          },
          "delete_user_group_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "List of user group IDs to remove from the task definition.",
            "default": []
          }
        },
        "required": [
          "task_definition_id"
        ]
      },
      "request-override_screening_check_result": {
        "description": "Request payload for /api/v2/contacts/override_screening_check_result",
        "type": "object",
        "properties": {
          "screening_check_result_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the screening check result to override"
          },
          "override_reason": {
            "type": "string",
            "description": "Reason for the override"
          }
        },
        "required": [
          "screening_check_result_id",
          "override_reason"
        ]
      },
      "request-prefill_property_loss_history": {
        "description": "Request payload for /api/v2/quotes/prefill_property_loss_history",
        "type": "object",
        "properties": {
          "revision_id": {
            "type": "string",
            "format": "uuid",
            "description": "Revision whose property/properties should have loss history pulled."
          },
          "property_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Restrict the pull to specific properties on this revision. Ids that don't belong to the revision are silently skipped. When omitted, all properties on the revision are pulled."
          },
          "force_run": {
            "type": "boolean",
            "default": false,
            "description": "When false (default), CLUE's property-level 30-day check applies: a recent report on the property is reused without burning another vendor call. When true, that property-level check is bypassed. Note that CLUE's separate <=30-day VendorCache (keyed on the named insureds) may STILL serve a cached result even with force_run=true, so a fresh vendor order is not guaranteed - inspect the per-property pull_performed flag to know whether an order actually ran. ISOLoss has no equivalent cache; this is a no-op there."
          }
        },
        "required": [
          "revision_id"
        ]
      },
      "request-prefill_quote": {
        "type": "object",
        "description": "Request Schema for /api/v2/quotes/prefill_quote",
        "properties": {
          "api_key": {
            "type": "string",
            "description": "API key for authentication"
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Quote ID to prefill"
          },
          "force_run": {
            "type": "boolean",
            "default": false,
            "description": "Force ADP execution regardless of existing data. false (default): Only runs if no vehicles exist. true: Always runs and uses match-and-update strategy"
          }
        },
        "required": [
          "api_key",
          "id"
        ]
      },
      "request-purge_migration_data": {
        "type": "object",
        "description": "Request schema for /api/v2/imports/purge_migration_data. Launches a tracked purge job that deletes contacts listed in the migration contact files and policies whose every revision is listed in the mapped policy transaction / historical terms files; records from any other source are preserved. Allowed only on lower environments and requires the britecore/imports/migration_purge rw permission.",
        "properties": {
          "targets": {
            "description": "Purge targets to run. A list of target names or a comma-separated string. Defaults to both targets.",
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "contacts",
                    "policy"
                  ]
                },
                "uniqueItems": true,
                "minItems": 1
              },
              {
                "type": "string",
                "pattern": "^(contacts|policy)(,(contacts|policy))*$"
              }
            ],
            "examples": [
              [
                "contacts",
                "policy"
              ],
              "policy"
            ]
          },
          "policy_type_mappings": {
            "type": "object",
            "description": "Map of execution names to policy type UUIDs, as passed to run_migration. Defines which policy transaction / historical terms files scope the policy purge. Required when targets include \"policy\".",
            "patternProperties": {
              "^[a-zA-Z0-9_-]+$": {
                "type": "string",
                "format": "uuid",
                "description": "Policy type UUID"
              }
            },
            "examples": [
              {
                "HO3_Texas": "a320737f-2aef-42cf-957e-5c5da0e46aa1"
              }
            ]
          }
        }
      },
      "request-queue_recovery_candidate": {
        "type": "object",
        "description": "Request payload for /api/v2/deliverables/queue_recovery_candidate",
        "properties": {
          "candidate_id": {
            "type": "string",
            "description": "Candidate identifier to queue for recovery, e.g. 'file:uuid' or 'folder:uuid'."
          }
        },
        "required": [
          "candidate_id"
        ]
      },
      "request-quote": {
        "type": "object",
        "description": "Request Schema for POST /api/v2/agents/quote. AI Quote Agent non-streaming endpoint.",
        "properties": {
          "api_key": {
            "type": "string",
            "description": "API key for BriteCore authentication"
          },
          "prompt": {
            "type": "string",
            "description": "The user's message/question"
          },
          "session_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Session ID for conversation continuity"
          },
          "context": {
            "type": [
              "string",
              "null"
            ],
            "description": "Additional context information"
          }
        },
        "required": [
          "api_key",
          "prompt"
        ]
      },
      "request-quote_stream": {
        "type": "object",
        "description": "Request Schema for POST /api/v2/agents/quote_stream. AI Quote Agent streaming endpoint for real-time chat responses.",
        "properties": {
          "api_key": {
            "type": "string",
            "description": "API key for BriteCore authentication"
          },
          "prompt": {
            "type": "string",
            "description": "The user's message/question"
          },
          "session_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Session ID for conversation continuity"
          },
          "context": {
            "type": [
              "string",
              "null"
            ],
            "description": "Additional context information"
          }
        },
        "required": [
          "api_key",
          "prompt"
        ]
      },
      "request-rate": {
        "title": "Rate Quote Request",
        "type": "object",
        "description": "Request payload for /api/v2/quotes/rate. Rates the persisted quote revision with the unified quote engine (hydrate, UWR, rate, persist the rate delta) in one call, replacing the Quote Wizard's reset/rate_risk/rate_revision/details cascade. The endpoint rates through the unified engine only: it requires the britequote/toggle-feature-enable-rate-revision-unified-engine advanced setting to be on and a rating-v2 Property new-business/renewal revision (the rate_capability the revision-details payload carries). A call that misses rate_capability is refused with success false and a flat messages list; there is no in-process fallback. The Quote Wizard reads rate_capability before its first call and runs the legacy Rate cascade itself for an unsupported revision -- this endpoint never does. The call assumes POST /api/v2/quotes/run_pre_rate_integrations already ran for this Rate action: HazardHub and the property lookups write rating inputs the engine reads (item-question answers), and quotes/rate deliberately does not run them itself, so a caller that skips pre-rate rates on whatever inputs are already stored. There is no per-risk parameter: the engine rates every property of the revision in one pass, so the response always carries the rated figures for all of them.",
        "properties": {
          "quote_id": {
            "type": "string",
            "format": "uuid",
            "description": "The unique identifier (UUID) of the quote revision to rate. Per the quotes v2 API convention this is the revision id."
          }
        },
        "required": [
          "quote_id"
        ]
      },
      "request-rate_full_quote": {
        "type": "object",
        "description": "Request payload for /api/v2/quotes/rate_full_quote",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The quote ID to bind"
          },
          "external_system_reference": {
            "type": "string",
            "description": "Reference to the quote in an external system"
          },
          "debug": {
            "type": "boolean",
            "description": "Whether to enable debug mode or not",
            "default": false
          }
        }
      },
      "request-reconcile_insights": {
        "type": "object",
        "description": "Request payload for /api/v2/insights/reconcile_insights.",
        "properties": {
          "reference_type": {
            "type": "string",
            "enum": [
              "CLAIM",
              "POLICY"
            ],
            "description": "Type of resource under reconciliation"
          },
          "reference_id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the claim or policy under reconciliation"
          },
          "keep": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Insight IDs to retain (bumps last_evaluated_at)",
            "default": []
          },
          "update": {
            "type": "array",
            "description": "Per-row partial updates (title, description, product_area, selector only)",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Insight UUID to update"
                },
                "title": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                },
                "description": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 4000
                },
                "product_area": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Product-area placement; null means reference-wide. Valid values depend on reference_type. CLAIM: INFORMATION, PARTIES, VEHICLES, DAMAGED_PROPERTIES, INJURIES, ESTIMATIONS, ACCOUNTING, DISPUTES, NOTES, ATTACHMENTS. POLICY: INFORMATION, UNDERWRITING, SUBJECTIVITIES, CONTACTS, PROPERTY, VEHICLES, DRIVERS, COVERAGES, RATING, NOTES, ATTACHMENTS, RENEWAL."
                },
                "selector": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Optional card-level deep-link within product_area. Requires a non-null product_area. CLAIM selectors are per product area (e.g. INFORMATION: CLAIM_INFORMATION, POLICY_INFORMATION, ADDITIONAL_INFORMATION, CLAIM_ASSIGNMENTS, CLAIMS_HISTORY, LOSS_ADDRESS, CATASTROPHE, REINSURANCE_CONTRACTS, DATES, REPORTS, PHOTOS; ACCOUNTING: ACCOUNTING_OVERVIEW, RECOVERIES, EXPOSURE_INFORMATION; PARTIES: PARTIES_LIST; VEHICLES: VEHICLES_LIST; DAMAGED_PROPERTIES: DAMAGED_PROPERTIES_LIST; INJURIES: INJURIES_LIST; ESTIMATIONS: ESTIMATIONS_LIST; DISPUTES: DISPUTES_LIST, LITIGATION_DETAILS; NOTES: NOTES_LIST; ATTACHMENTS: ATTACHMENTS_LIST). POLICY selectors are per product area (INFORMATION: EFFECTIVE_DATES, POLICY_STATUS, REVISION, PREMIUM_TOTALS; UNDERWRITING: STP_STATUS, UW_RULES, UW_QUESTIONS, UW_CONTACT; SUBJECTIVITIES: SUBJECTIVITIES_LIST, ESIGNATURE; CONTACTS: NAMED_INSURED, ADDITIONAL_INTERESTS, AGENT, PREMIUM_FINANCE, SURPLUS_LINE_PRODUCER, CONTACTS_SECTION; PROPERTY: PROPERTIES_LIST; VEHICLES: VEHICLES_LIST; DRIVERS: DRIVERS_LIST; COVERAGES: PRIMARY_EXPOSURES, POLICY_WIDE; RATING: PREMIUM_TOTALS, COMMISSION_RATE, CREDIT_SCORE; NOTES: NOTES_LIST; ATTACHMENTS: ATTACHMENTS_LIST; RENEWAL: RENEWAL_STATUS, POLICY_STATUS)."
                }
              },
              "required": [
                "id"
              ]
            },
            "default": []
          },
          "remove": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Insight IDs to delete",
            "default": []
          },
          "create": {
            "type": "array",
            "description": "New insights to insert (reference_type and reference_id taken from parent envelope)",
            "items": {
              "type": "object",
              "properties": {
                "insight_type": {
                  "type": "string",
                  "enum": [
                    "MISSING",
                    "WORKFLOW",
                    "ADVISORY",
                    "QUALITY",
                    "CONFLICT",
                    "FRAUD",
                    "GAPS",
                    "DOC"
                  ]
                },
                "insight_severity": {
                  "type": "string",
                  "enum": [
                    "IMMEDIATE_BLOCKING",
                    "ACTION_NEEDED",
                    "RECOMMENDED_REVIEW",
                    "INFORMATIONAL"
                  ]
                },
                "title": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                },
                "description": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 4000
                },
                "product_area": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Product-area placement; null means reference-wide. Valid values depend on reference_type. CLAIM: INFORMATION, PARTIES, VEHICLES, DAMAGED_PROPERTIES, INJURIES, ESTIMATIONS, ACCOUNTING, DISPUTES, NOTES, ATTACHMENTS. POLICY: INFORMATION, UNDERWRITING, SUBJECTIVITIES, CONTACTS, PROPERTY, VEHICLES, DRIVERS, COVERAGES, RATING, NOTES, ATTACHMENTS, RENEWAL."
                },
                "reshow": {
                  "type": "string",
                  "enum": [
                    "UNTIL_RESOLVED",
                    "ON_DATA_CHANGE",
                    "ONCE_ONLY"
                  ],
                  "description": "Acknowledge re-show policy; omit to default to UNTIL_RESOLVED"
                },
                "snooze_days": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "description": "Per-insight snooze-window override in days; omit or null to fall back to the severity default"
                },
                "selector": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Optional card-level deep-link within product_area. Requires a non-null product_area. CLAIM selectors are per product area (e.g. INFORMATION: CLAIM_INFORMATION, POLICY_INFORMATION, ADDITIONAL_INFORMATION, CLAIM_ASSIGNMENTS, CLAIMS_HISTORY, LOSS_ADDRESS, CATASTROPHE, REINSURANCE_CONTRACTS, DATES, REPORTS, PHOTOS; ACCOUNTING: ACCOUNTING_OVERVIEW, RECOVERIES, EXPOSURE_INFORMATION; PARTIES: PARTIES_LIST; VEHICLES: VEHICLES_LIST; DAMAGED_PROPERTIES: DAMAGED_PROPERTIES_LIST; INJURIES: INJURIES_LIST; ESTIMATIONS: ESTIMATIONS_LIST; DISPUTES: DISPUTES_LIST, LITIGATION_DETAILS; NOTES: NOTES_LIST; ATTACHMENTS: ATTACHMENTS_LIST). POLICY selectors are per product area (INFORMATION: EFFECTIVE_DATES, POLICY_STATUS, REVISION, PREMIUM_TOTALS; UNDERWRITING: STP_STATUS, UW_RULES, UW_QUESTIONS, UW_CONTACT; SUBJECTIVITIES: SUBJECTIVITIES_LIST, ESIGNATURE; CONTACTS: NAMED_INSURED, ADDITIONAL_INTERESTS, AGENT, PREMIUM_FINANCE, SURPLUS_LINE_PRODUCER, CONTACTS_SECTION; PROPERTY: PROPERTIES_LIST; VEHICLES: VEHICLES_LIST; DRIVERS: DRIVERS_LIST; COVERAGES: PRIMARY_EXPOSURES, POLICY_WIDE; RATING: PREMIUM_TOTALS, COMMISSION_RATE, CREDIT_SCORE; NOTES: NOTES_LIST; ATTACHMENTS: ATTACHMENTS_LIST; RENEWAL: RENEWAL_STATUS, POLICY_STATUS)."
                }
              },
              "required": [
                "insight_type",
                "insight_severity",
                "title",
                "description"
              ]
            },
            "default": []
          }
        },
        "required": [
          "reference_type",
          "reference_id"
        ]
      },
      "request-record_saved_method_authorization": {
        "type": "object",
        "description": "Request payload for /api/v2/payments/record_saved_method_authorization",
        "properties": {
          "contact_id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the policyholder the payment method is being stored for."
          },
          "authorization_confirmed": {
            "type": "boolean",
            "description": "The affirmative attestation captured by the consent UI. Proof is recorded only when this is a strict boolean true; a truthy-but-non-affirmative value is rejected."
          }
        },
        "required": [
          "contact_id",
          "authorization_confirmed"
        ]
      },
      "request-regenerate_statements": {
        "type": "object",
        "description": "Request payload for /api/v2/commissions/regenerate_statements. Starts an asynchronous Celery job that rebuilds every eligible agency's monthly commission PDF. Returns immediately with a reference_id the caller uses to poll /api/v2/commissions/get_regenerate_statements_status for completion. Supplying year + month targets a specific report month; omitting both defaults to the month immediately preceding the current month.",
        "properties": {
          "year": {
            "type": "integer",
            "minimum": 1900,
            "maximum": 9999,
            "description": "Four-digit calendar year of the report month (e.g. 2026). Must be supplied together with `month`."
          },
          "month": {
            "type": "integer",
            "minimum": 1,
            "maximum": 12,
            "description": "Calendar month of the report month, 1-12. Must be supplied together with `year`."
          }
        },
        "dependentRequired": {
          "year": [
            "month"
          ],
          "month": [
            "year"
          ]
        },
        "required": []
      },
      "request-reinstate_policy": {
        "description": "Request schema for /api/v2/policies/reinstate_policy. Requires the britecore/policies/reinstatePolicy permission at read-write. Expired policies are out of reach here: reaching them needs britecore/policies/reinstateExpired, which only the gateway's reinstateExpiredPolicy carries.",
        "type": "object",
        "properties": {
          "policy_id": {
            "type": "string",
            "format": "uuid",
            "description": "The UUID of the policy to reinstate"
          },
          "policy_term_id": {
            "type": "string",
            "format": "uuid",
            "description": "The UUID of the policy term to reinstate. Optional: the service falls back to the term on the resolved revision, which is correct for a single-term policy and ambiguous otherwise."
          },
          "revision_id": {
            "type": "string",
            "format": "uuid",
            "description": "The UUID of the revision to reinstate from. Optional: the service resolves the cancelling revision when omitted."
          },
          "reinstatement_date": {
            "type": "string",
            "format": "date",
            "description": "Effective date of the reinstatement in YYYY-MM-DD format. Required when lapse is true.",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "reinstate_reason": {
            "type": "string",
            "description": "The UUID of a configured reinstatement reason, recorded as the policy status reason"
          },
          "assess_fee": {
            "type": "string",
            "description": "Which reinstatement fee to assess. Mirrors REINSTATEMENT_FEE_TYPES, which the request schema validates with OneOf. Omit to let the policy life cycle decide; sending a value overrides it.",
            "enum": [
              "now",
              "defer",
              "waive"
            ]
          },
          "custom_reinstatement_fee": {
            "type": "string",
            "description": "Overrides the configured fee amount. Decimal sent as a string to avoid float rounding."
          },
          "lapse": {
            "type": "boolean",
            "description": "Reinstate on a date AFTER the cancel date, leaving a gap in coverage. The service computes and books the gap-credit premium for the uncovered window. Requires reinstatement_date.",
            "default": false
          },
          "propagate": {
            "type": "boolean",
            "description": "Whether legacy accounting recursively reinstates future terms. The billing engine sets this false so cross-term reinstatement is represented by explicit engine events and audit rows.",
            "default": true
          },
          "create_notice_deliverable": {
            "type": "boolean",
            "description": "Expired path only, and therefore inert on this endpoint, which cannot reach expired policies. The Notice of Reinstatement on the Cancelled path is gated on the policy life cycle's send_notice_on_reinstatement, not on this flag.",
            "default": false
          },
          "push_invoice_dates": {
            "type": "boolean",
            "description": "Expired path only, and therefore inert on this endpoint. Pushes out due and cancel dates on renewal invoices.",
            "default": false
          },
          "date_cursor": {
            "type": "string",
            "format": "date-time",
            "description": "Processing date-time. Omit to use now."
          }
        },
        "required": [
          "policy_id"
        ]
      },
      "request-remove_contact_from_role": {
        "description": "Request payload for /api/v2/contacts/remove_contact_from_role",
        "type": "object",
        "properties": {
          "contact_id": {
            "type": "string",
            "description": "The unique identifier of the contact"
          },
          "role_name": {
            "type": "string",
            "description": "The name of the role to add the contact to"
          }
        },
        "required": [
          "id",
          "role_name"
        ]
      },
      "request-remove_form_from_policy_type": {
        "description": "Request payload for /api/v2/lines/remove_form_from_policy_type.",
        "type": "object",
        "properties": {
          "form_id": {
            "type": "string",
            "format": "uuid",
            "description": "The x_policy_types_docs row's own id (NOT File.id). The row and stored file are kept for audit purposes; only File.active is set to false."
          }
        },
        "required": [
          "form_id"
        ]
      },
      "request-remove_form_from_policy_type_item": {
        "description": "Request payload for /api/v2/lines/remove_form_from_policy_type_item.",
        "type": "object",
        "properties": {
          "form_id": {
            "type": "string",
            "format": "uuid",
            "description": "The x_policy_type_items_docs row's own id (NOT File.id). The row and stored file are kept for audit purposes; only File.active is set to false."
          }
        },
        "required": [
          "form_id"
        ]
      },
      "request-remove_policy_contact": {
        "type": "object",
        "description": "Request payload for /api/v2/contacts/remove_policy_contact",
        "properties": {
          "policy_id": {
            "type": "string",
            "format": "uuid",
            "description": "The policy ID to remove the contact from"
          },
          "contact_id": {
            "type": "string",
            "format": "uuid",
            "description": "The contact ID to remove from the policy"
          },
          "role": {
            "type": "string",
            "enum": [
              "Agency Contact",
              "Surplus Line Producer"
            ],
            "description": "The role of the contact in the policy"
          }
        },
        "required": [
          "policy_id",
          "contact_id",
          "role"
        ]
      },
      "request-remove_policy_type_relations": {
        "type": "object",
        "description": "Request Schema for /api/v2/policy_types/remove_policy_type_relations",
        "properties": {
          "policy_type_id": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of the policy type"
          },
          "relationship_type": {
            "type": "string",
            "enum": [
              "underlying"
            ],
            "default": "underlying",
            "description": "The type of relationships to remove"
          }
        },
        "required": [
          "policy_type_id"
        ]
      },
      "request-remove_quote_contact": {
        "type": "object",
        "description": "Request payload for /api/v2/contacts/remove_quote_contact",
        "properties": {
          "quote_id": {
            "type": "string",
            "format": "uuid",
            "description": "The quote ID to remove the contact from"
          },
          "contact_id": {
            "type": "string",
            "format": "uuid",
            "description": "The contact ID to remove from the quote"
          },
          "role": {
            "type": "string",
            "enum": [
              "Named Insured",
              "Driver",
              "Additional Interest",
              "Agent",
              "Creator",
              "Finance Company",
              "Underwriter"
            ],
            "description": "The role of the contact in the quote"
          }
        },
        "required": [
          "quote_id",
          "contact_id",
          "role"
        ]
      },
      "request-remove_risk_contact": {
        "type": "object",
        "description": "Request payload for /api/v2/contacts/remove_risk_contact",
        "properties": {
          "risk_id": {
            "type": "string",
            "format": "uuid",
            "description": "The risk ID to remove the contact from"
          },
          "contact_id": {
            "type": "string",
            "format": "uuid",
            "description": "The contact ID to remove from the risk"
          },
          "role": {
            "type": "string",
            "enum": [
              "Agency Contact",
              "Surplus Line Producer"
            ],
            "description": "The role of the contact in the risk"
          }
        },
        "required": [
          "risk_id",
          "contact_id",
          "role"
        ]
      },
      "request-reports_export_report": {
        "type": "object",
        "description": "Request schema for /api/v2/reports/export_report",
        "properties": {
          "report_id": {
            "type": "string",
            "format": "uuid",
            "title": "report_id",
            "description": "The id of the report to export"
          }
        },
        "required": [
          "report_id"
        ]
      },
      "request-reports_import_report": {
        "type": "object",
        "description": "Request schema for /api/v2/reports/import_report",
        "properties": {
          "report_data": {
            "type": "object",
            "title": "report_data",
            "description": "The report definition to import (same shape produced by /api/v2/reports/export_report). Any id / sheet id carried in the payload is ignored: an import always creates a new report and fails if the name already exists.",
            "properties": {
              "name": {
                "type": "string",
                "title": "name",
                "description": "The report name (must be unique)"
              },
              "description": {
                "type": "string",
                "title": "description",
                "description": "The report description"
              },
              "output_format": {
                "type": "string",
                "title": "output_format",
                "description": "The output format (e.g. excel, text)"
              },
              "output_file_delimiter": {
                "type": "string",
                "title": "output_file_delimiter",
                "description": "The delimiter used for delimited output"
              },
              "date_type": {
                "type": "string",
                "title": "date_type",
                "description": "The report date type (single or range)"
              },
              "category_name": {
                "type": "string",
                "title": "category_name",
                "description": "Category name resolved in the target environment; ignored when no such category exists"
              },
              "report_parameters": {
                "type": "array",
                "title": "report_parameters",
                "description": "Parameter definitions for the report",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "Parameter name"
                    },
                    "type": {
                      "type": "string",
                      "description": "Parameter type (String, Number, Date, DateTime, UUID, Enum)"
                    },
                    "label": {
                      "type": "string",
                      "description": "Display label"
                    },
                    "extra_info": {
                      "type": "object",
                      "description": "Parameter metadata (default_value, default_value_type, enumOptions, hidden, ...)"
                    }
                  },
                  "required": [
                    "name"
                  ]
                }
              },
              "export_options": {
                "type": "object",
                "title": "export_options",
                "description": "Delivery/output options (e.g. filename). A password set to the redaction sentinel is dropped; a real password is kept."
              },
              "report_sheets": {
                "type": "array",
                "title": "report_sheets",
                "description": "The report sheets (SQL tabs); at least one is required",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "Sheet name"
                    },
                    "order": {
                      "type": "integer",
                      "description": "Sheet order"
                    },
                    "sql_query": {
                      "type": "string",
                      "description": "The sheet's SQL query"
                    },
                    "include_totals_row": {
                      "type": "boolean",
                      "description": "Whether to append a totals row"
                    },
                    "formatting": {
                      "type": "object",
                      "description": "Per-column formatting metadata"
                    }
                  },
                  "required": [
                    "name",
                    "sql_query"
                  ]
                }
              }
            },
            "required": [
              "name",
              "report_sheets"
            ]
          },
          "file_data": {
            "type": "string",
            "title": "file_data",
            "description": "Alternative to report_data: the JSON text of an exported report file (or base64 of it), following the file_data convention used by /api/v2/lines/import_line. Takes precedence over report_data."
          }
        }
      },
      "request-request_claim_estimation": {
        "type": "object",
        "description": "Request Schema for /api/v2/claim_estimations/request_claim_estimation",
        "properties": {
          "claim_id": {
            "type": "string",
            "format": "uuid",
            "description": "Claim ID"
          },
          "assignment_type": {
            "type": "string",
            "enum": [
              "initial",
              "supplemental"
            ],
            "description": "Type of assignment"
          }
        },
        "required": [
          "claim_id",
          "assignment_type"
        ]
      },
      "request-request_claims_search": {
        "type": "object",
        "description": "Request Schema for /api/v2/claims/request_claims_search",
        "properties": {
          "claim_id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the claim to search"
          }
        },
        "required": [
          "claim_id"
        ]
      },
      "request-resolve_property_geolocation": {
        "description": "Request payload for /api/v2/policies/resolve_property_geolocation",
        "type": "object",
        "properties": {
          "location": {
            "type": "object",
            "description": "The property and the address to resolve. Accepts the same shape as update_property_location: 'id' selects the property, and every other recognised key is compared against the stored value and written only when it differs. A key left out is left alone; an empty value clears the column. Unrecognised keys are ignored rather than rejected.",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "The property to resolve. Required."
              },
              "address_line1": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "address_line2": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "address_city": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "address_state": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Only enters the writable diff when non-primary multi-state properties are enabled for the tenant. On a single-state site a differing state is NOT written, and the provider is asked about the address that will actually be written."
              },
              "address_zip": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "address_county": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "A county UUID, or a name normalised to one in place. Picking a county does NOT invalidate the stored ranked-county list, because the list is what the pick came from."
              },
              "county_specify": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "year_built": {
                "type": [
                  "string",
                  "integer",
                  "null"
                ]
              },
              "acres": {
                "type": [
                  "string",
                  "number",
                  "null"
                ]
              },
              "legal_description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "copy_address": {
                "type": "boolean",
                "description": "Null is NOT accepted: the column is nullable=False, and a null against a stored true compares as a change and is written through. Rejected at the boundary by ensure_location_booleans."
              },
              "primary": {
                "type": "boolean",
                "description": "Make this property the revision's primary. Omitted or false means 'fill the slot only if it is empty', decided against committed revision state rather than the pre-call snapshot."
              }
            },
            "required": [
              "id"
            ]
          },
          "context_identifier": {
            "type": [
              "string",
              "null"
            ],
            "description": "Reported to integration logging. Usually the policy number."
          }
        },
        "required": [
          "location"
        ]
      },
      "request-retrieve_adjuster_licenses": {
        "type": "object",
        "description": "Request payload for /api/v2/contacts/retrieve_adjuster_licenses.",
        "required": [
          "contact_id"
        ],
        "properties": {
          "contact_id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the contact whose adjuster licenses to retrieve"
          }
        }
      },
      "request-retrieve_claim_payments": {
        "type": "object",
        "description": "Request payload for /api/v2/claims/retrieve_claim_payments",
        "properties": {
          "policy_type_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "List of policy type ids to filter the claim payments. The function will return only the claim payments that have a policy type id in this list."
          },
          "transaction_date_from": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "description": "The start date for the transaction date range. The date should be in the format 'YYYY-mm-dd HH:MM:SS'."
          },
          "transaction_date_to": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "description": "The end date for the transaction date range. The date should be in the format 'YYYY-mm-dd HH:MM:SS'."
          },
          "exported": {
            "type": "boolean",
            "description": "If provided, the function will return only the claim payments that have the exported flag set to this value."
          },
          "voided": {
            "type": "boolean",
            "description": "If provided, the function will return only the claim payments that have the voided flag set to this value."
          },
          "historical": {
            "type": "boolean",
            "description": "If provided, the function will return only the claim payments that have the historical flag set to this value."
          }
        },
        "required": [
          "transaction_date_from",
          "transaction_date_to"
        ]
      },
      "request-retrieve_common_allowed_assignees": {
        "type": "object",
        "description": "Request payload for /api/v2/tasks/retrieve_common_allowed_assignees",
        "properties": {
          "task_definition_ids": {
            "type": "array",
            "description": "The task definitions to intersect. Only contacts allowed by every one of them are returned.",
            "minItems": 1,
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "description": "Maximum number of assignees to return. Omit for no cap."
          },
          "search": {
            "type": "string",
            "description": "Filters the assignees by name or id (substring match)."
          },
          "assigned_role_id": {
            "type": "string",
            "format": "uuid",
            "description": "Role the selection is pinned to. Narrows the result on top of the task definitions, when it is one they are configured with."
          },
          "assigned_user_group_id": {
            "type": "string",
            "format": "uuid",
            "description": "User group the selection is pinned to. Narrows the result on top of the task definitions, when it is one they are configured with."
          }
        },
        "required": [
          "task_definition_ids"
        ]
      },
      "request-retrieve_config": {
        "type": "object",
        "description": "Request payload for /api/v2/convenience_fees/retrieve_config. Returns the convenience-fee config stored at one scope plus the inherited placeholders. Admin-only.",
        "properties": {
          "location_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Business-location UUID for a per-state scope. Omit or pass null for the carrier-wide global default."
          }
        }
      },
      "request-retrieve_contact": {
        "description": "Request payload for /api/v2/contacts/retrieve_contact",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique identifier of the contact"
          },
          "external_system_reference": {
            "type": "string",
            "description": "The external identifier of the contact"
          }
        }
      },
      "request-retrieve_convenience_fee": {
        "description": "Request schema for /api/v2/payments/retrieve_convenience_fee",
        "type": "object",
        "properties": {
          "payment_amount": {
            "oneOf": [
              {
                "type": "string",
                "pattern": "^\\d+(\\.\\d{1,2})?$",
                "description": "Amount of the payment being made (string format preferred for precision)"
              },
              {
                "type": "number",
                "minimum": 0.01,
                "description": "Amount of the payment being made"
              }
            ]
          },
          "account_type": {
            "type": "string",
            "description": "The type of the account being charged. For PaymentProcessor integration: 'ACH', 'CC', or 'DEBIT'. For legacy vendors: 'ACH', 'MasterCard', 'VISA', 'AmericanExpress', 'Discover'"
          },
          "policy_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Policy ID (Optional)"
          }
        },
        "required": [
          "payment_amount",
          "account_type"
        ]
      },
      "request-retrieve_convenience_fee_preview": {
        "description": "Request schema for /api/v2/payments/retrieve_convenience_fee_preview",
        "type": "object",
        "properties": {
          "payment_amount": {
            "oneOf": [
              {
                "type": "string",
                "pattern": "^\\d+(\\.\\d{1,2})?$",
                "description": "Amount of the payment being made (string format preferred for precision)"
              },
              {
                "type": "number",
                "minimum": 0.01,
                "description": "Amount of the payment being made"
              }
            ]
          },
          "payment_methods": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "ach",
                "cc",
                "debit"
              ],
              "description": "Payment method code"
            },
            "description": "List of payment methods to calculate fees for. If not provided, defaults to all payment methods (ach, cc, debit)",
            "minItems": 1,
            "uniqueItems": true
          },
          "policy_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Policy ID (optional)"
          }
        },
        "required": [
          "payment_amount"
        ]
      },
      "request-retrieve_full_quote": {
        "type": "object",
        "description": "Request Schema for retrieve_full_quote",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Quote ID"
          },
          "external_system_reference": {
            "type": "string",
            "description": "External ID of the Quote"
          }
        }
      },
      "request-retrieve_my_permissions": {
        "description": "Request payload for /api/v2/auth/retrieve_my_permissions. Identity and OAuth grant context come from the bearer token.",
        "type": "object",
        "properties": {},
        "required": []
      },
      "request-retrieve_my_roles": {
        "description": "Request payload for /api/v2/auth/retrieve_my_roles. Identity and OAuth grant context come from the bearer token.",
        "type": "object",
        "properties": {},
        "required": []
      },
      "request-retrieve_payment": {
        "type": "object",
        "description": "Request payload for /api/v2/payments/retrieve_payment",
        "properties": {
          "payment_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "payment_id"
        ]
      },
      "request-retrieve_payment_method_creation_details": {
        "description": "Request schema for /api/v2/payments/retrieve_payment_method_creation_details",
        "type": "object",
        "properties": {
          "contact_id": {
            "type": "string",
            "format": "uuid",
            "description": "Contact ID for which to retrieve payment method creation details."
          },
          "types": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "CC",
                "ACH"
              ]
            },
            "description": "Optional list of payment method types to include in the creation details."
          },
          "policy_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional list of policy IDs to associate with the payment method."
          },
          "success_url": {
            "type": "string",
            "format": "uri",
            "description": "Optional URL to redirect to after successful payment method creation."
          },
          "cancel_url": {
            "type": "string",
            "format": "uri",
            "description": "Optional URL to redirect to if payment method creation is cancelled."
          },
          "requester_contact_id": {
            "type": "string",
            "format": "uuid",
            "description": "Optional contact ID of the requester. If not provided, defaults to the currently logged-in user."
          }
        },
        "required": [
          "contact_id"
        ]
      },
      "request-retrieve_payment_methods": {
        "description": "Request schema for /api/v2/payments/retrieve_payment_methods",
        "type": "object",
        "properties": {
          "exp_less_than": {
            "type": "integer",
            "description": "Optional. Filter all payment methods where expiration date is less than or equal to (current date + exp_less_than days). If not provided, all active payment methods are returned."
          },
          "contact_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Required. List of contact IDs to filter payment methods by."
          },
          "min_updated_on": {
            "type": "string",
            "format": "date-time",
            "description": "Optional. Filter payment methods created after the given date in ISO 8601 format (e.g. 2025-01-01T00:00:00Z)."
          }
        },
        "required": [
          "contact_ids"
        ]
      },
      "request-retrieve_pending_payments_for_settlement": {
        "description": "Request schema for /api/v2/payments/retrieve_pending_payments_for_settlement",
        "type": "object",
        "properties": {
          "integration_instance_external_id": {
            "type": "string",
            "description": "External ID of the integration instance. Only pending payments owned by this instance are returned."
          }
        },
        "required": [
          "integration_instance_external_id"
        ]
      },
      "request-retrieve_permissions": {
        "description": "Request payload for /api/v2/settings/retrieve_permissions",
        "type": "object",
        "properties": {
          "prefixes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "List of filtering prefixes for permissions list."
          }
        },
        "required": []
      },
      "request-retrieve_policy_billing_information": {
        "type": "object",
        "description": "Request schema for api/v2/payments/retrieve_policy_billing_information",
        "properties": {
          "policy_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the Policy"
          },
          "policy_term_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the Policy Term"
          },
          "billing_only": {
            "type": "boolean",
            "default": true,
            "description": "Flag to indicate that the response should only include billingSetup information."
          }
        },
        "required": [
          "policy_id"
        ]
      },
      "request-retrieve_policy_change_logs": {
        "type": "object",
        "description": "Request schema for /api/v2/policies/retrieve_policy_change_logs",
        "properties": {
          "api_key": {
            "type": "string",
            "description": "API key for authentication"
          },
          "filter_by": {
            "type": "string",
            "enum": [
              "date_stamp",
              "date_cursor",
              "revision_commit_date_time"
            ],
            "description": "The date field to filter by. 'date_stamp' - The date the change was made (in CST timezone). Supports time-based filtering if 'allow_timestamp' is set to True. 'date_cursor' - The calculated date in effect upon revision commit. Does not support time-based filtering. 'revision_commit_date_time' - The date and time when the revision was committed. Supports time-based filtering if 'allow_timestamp' is set to True."
          },
          "from_date": {
            "type": "string",
            "description": "The start date of the search. If allow_timestamp is True and filter_by is 'date_stamp' or 'revision_commit_date_time', format is 'YYYY-mm-dd HH:MM:SS'. Otherwise, format is 'YYYY-mm-dd'."
          },
          "to_date": {
            "type": "string",
            "description": "The end date of the search. If allow_timestamp is True and filter_by is 'date_stamp' or 'revision_commit_date_time', format is 'YYYY-mm-dd HH:MM:SS'. Otherwise, format is 'YYYY-mm-dd'."
          },
          "allow_timestamp": {
            "type": "boolean",
            "default": false,
            "description": "If True and 'filter_by' is set to 'date_stamp' or 'revision_commit_date_time', the 'from_date' and 'to_date' arguments will be treated as datetime with format 'YYYY-mm-dd HH:MM:SS'. If False or not provided, or if 'filter_by' is 'date_cursor', the 'from_date' and 'to_date' arguments will be treated as date with format 'YYYY-mm-dd'."
          },
          "transactions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Limit the search to the specified transactions"
          },
          "policy_type_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Limit the search to the specified policy types"
          },
          "revision_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Limit the search to the specified revisions"
          },
          "policy_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Limit the search to the specified policies"
          }
        },
        "required": [
          "api_key",
          "filter_by",
          "from_date",
          "to_date"
        ]
      },
      "request-retrieve_policy_snapshot": {
        "type": "object",
        "description": "Request payload for /api/v2/policies/retrieve_policy_snapshot",
        "properties": {
          "policy_number": {
            "type": "string",
            "description": "The policy number to retrieve snapshot information for"
          },
          "date": {
            "type": "string",
            "format": "date",
            "description": "The date for which to retrieve the policy snapshot (YYYY-MM-DD)"
          }
        },
        "required": [
          "policy_number",
          "date"
        ]
      },
      "request-retrieve_policy_type_claims_tabs_visibility": {
        "description": "Request payload for /api/v2/lines/retrieve_policy_type_claims_tabs_visibility",
        "type": "object",
        "properties": {
          "policy_type_id": {
            "type": "string",
            "description": "Policy Type ID for retrieving claims tabs visibility"
          }
        },
        "required": [
          "policy_type_id"
        ]
      },
      "request-retrieve_policy_types": {
        "type": "object",
        "description": "Request Schema for /api/v2/policy_types/retrieve_policy_types",
        "properties": {
          "effective_date_id": {
            "type": "string",
            "format": "uuid",
            "description": "If provided, scopes the result to policy types belonging to this single effective date"
          },
          "date_cursor": {
            "type": "string",
            "format": "date",
            "description": "If provided, resolves policy types the way quoting does: the governing effective date for this date, including policy types inherited from an earlier effective date that did not redefine them (gaps, BC-14373). Takes precedence over effective_date_id if both are sent."
          }
        }
      },
      "request-retrieve_queue_capabilities": {
        "type": "object",
        "description": "Request payload for /api/v2/tasks/retrieve_queue_capabilities. Takes no parameters: the role and capabilities are resolved from the calling user.",
        "properties": {}
      },
      "request-retrieve_rating_table": {
        "type": "object",
        "description": "Request Schema for retrieve_rating_table",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Rating Table ID"
          },
          "page": {
            "type": "integer",
            "description": "Number of page of the pagination for the grid point factors",
            "minimum": 0
          },
          "page_size": {
            "type": "integer",
            "description": "Page size of the pagination for the grid point factors",
            "minimum": 1
          },
          "sort_by": {
            "type": "string",
            "description": "Grid point column to sort by",
            "enum": [
              "id",
              "latitude",
              "longitude",
              "point_group"
            ]
          },
          "sort_order": {
            "type": "string",
            "enum": [
              "asc",
              "desc"
            ]
          }
        },
        "required": [
          "id"
        ]
      },
      "request-retrieve_recovery_statuses": {
        "type": "object",
        "description": "Request payload for /api/v2/deliverables/retrieve_recovery_statuses",
        "properties": {
          "job_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "List of BackgroundJob IDs to retrieve recovery status for."
          }
        },
        "required": [
          "job_ids"
        ]
      },
      "request-retrieve_revision_billing_schedule_context": {
        "type": "object",
        "description": "Request schema for POST /api/v2/policies/retrieve_revision_billing_schedule_context. Returns the signals the legacy Builder uses to gate the Change Billing Schedule preserve/regenerate dialog, computed from the term of the revision being edited (BC-22886). Replaces DB access that previously ran inline in builder.html.",
        "properties": {
          "policy_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the policy whose term is inspected."
          },
          "revision_id": {
            "type": "string",
            "format": "uuid",
            "description": "Optional. ID of the revision being edited in the Builder. When supplied, the gating signals are computed from this revision's own policy term rather than the policy's in-force term, so the dialog stays suppressed on a manual renewal (whose revision lives on a new term with no committed revisions). Omitted -> the policy's current term is used."
          }
        },
        "required": [
          "policy_id"
        ]
      },
      "request-retrieve_risk_details": {
        "type": "object",
        "description": "Request payload for /api/v2/policies/retrieve_risk_details.",
        "properties": {
          "risk_id": {
            "type": "string",
            "format": "uuid",
            "description": "The UUID of an existing risk/property"
          }
        },
        "required": [
          "risk_id"
        ]
      },
      "request-retrieve_saved_method_authorization": {
        "type": "object",
        "description": "Request payload for /api/v2/payments/retrieve_saved_method_authorization. This endpoint requires no parameters: the saved-method consent capability is resolved carrier-wide (Global scope), so no payment amount, account type, or policy is needed.",
        "properties": {}
      },
      "request-retrieve_settings": {
        "description": "Request payload for /api/v2/settings/retrieve_settings",
        "type": "object",
        "properties": {
          "section": {
            "type": "string",
            "description": "Optional section name. When provided, only that section is returned; otherwise every section is returned."
          }
        },
        "required": []
      },
      "request-retrieve_subjectivity": {
        "type": "object",
        "description": "Request schema for /api/v2/subjectivities/retrieve_subjectivity",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the subjectivity to retrieve"
          }
        },
        "required": [
          "id"
        ]
      },
      "request-retrieve_subjectivity_definition": {
        "type": "object",
        "description": "Request schema for /api/v2/subjectivities/retrieve_subjectivity_definition",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the subjectivity definition to be retrieved"
          }
        },
        "required": [
          "id"
        ]
      },
      "request-retrieve_subjectivity_provenance": {
        "type": "object",
        "description": "Request payload for /api/v2/subjectivities/retrieve_subjectivity_provenance",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The id of the revision subjectivity whose rule-execution lineage to retrieve."
          }
        },
        "required": [
          "id"
        ]
      },
      "request-retrieve_task": {
        "type": "object",
        "description": "Request payload for /api/v2/tasks/retrieve_task",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The id of the task to retrieve."
          }
        },
        "required": [
          "id"
        ]
      },
      "request-retrieve_task_definition": {
        "type": "object",
        "description": "Request payload for /api/v2/tasks/retrieve_task_definition",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The id of the task definition to retrieve."
          }
        },
        "required": [
          "id"
        ]
      },
      "request-retrieve_task_definition_allowed_assignees": {
        "type": "object",
        "description": "Request payload for /api/v2/tasks/retrieve_task_definition_allowed_assignees",
        "properties": {
          "task_definition_id": {
            "type": "string",
            "format": "uuid",
            "description": "The id of the task definition to retrieve allowed assignees for."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "description": "Maximum number of assignees to return. Omit for no cap."
          },
          "search": {
            "type": "string",
            "description": "Filters the assignees by name or id (substring match)."
          },
          "assigned_role_id": {
            "type": "string",
            "format": "uuid",
            "description": "Narrows the result to this role, when it is one the task definition is configured with."
          },
          "assigned_user_group_id": {
            "type": "string",
            "format": "uuid",
            "description": "Narrows the result to this user group, when it is one the task definition is configured with."
          }
        },
        "required": [
          "task_definition_id"
        ]
      },
      "request-retrieve_task_definitions_assignees": {
        "type": "object",
        "description": "Request payload for /api/v2/tasks/retrieve_task_definitions_assignees",
        "properties": {
          "task_definition_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Optional task definition ID to filter by. If not provided, returns all assignments."
          }
        }
      },
      "request-retrieve_task_documents": {
        "type": "object",
        "description": "Request payload for /api/v2/tasks/retrieve_task_documents",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The id of the task whose linked record's documents to retrieve."
          }
        },
        "required": [
          "id"
        ]
      },
      "request-retrieve_task_filter_options": {
        "type": "object",
        "description": "Request payload for /api/v2/tasks/retrieve_filter_options",
        "properties": {
          "view": {
            "type": "string",
            "enum": [
              "all_tasks",
              "my_tasks",
              "my_team",
              "claim_tasks",
              "policy_tasks",
              "submissions",
              "triage"
            ],
            "default": "all_tasks",
            "description": "View type to scope the assignee options"
          },
          "include_uw_options": {
            "type": "boolean",
            "default": false,
            "description": "When true, the response also populates the underwriting dropdown options (transaction_types, lobs, stages). Callers that do not render those dropdowns should omit this to skip the extra queries."
          },
          "task_scopes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "claim",
                "policy"
              ]
            },
            "minItems": 1,
            "uniqueItems": true,
            "description": "The same scope the caller's retrieve_tasks request carries, so a dropdown cannot offer a value that selects an empty queue -- an assignee who holds only claim work, or a line of business reached only through it. Omitted means both scopes. Distinct from include_uw_options, which decides whether the expensive LOB / stage aggregates run at all: that flag is about COST, this one is about WHICH ROWS. See retrieve_tasks for the scope rule itself. An empty list is rejected."
          }
        }
      },
      "request-retrieve_task_history": {
        "type": "object",
        "description": "Request payload for /api/v2/tasks/retrieve_task_history",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The id of the task to retrieve history."
          }
        },
        "required": [
          "id"
        ]
      },
      "request-retrieve_task_notes": {
        "type": "object",
        "description": "Request payload for /api/v2/tasks/retrieve_task_notes",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The id of the task whose notes are returned."
          }
        },
        "required": [
          "id"
        ]
      },
      "request-retrieve_task_provenance": {
        "type": "object",
        "description": "Request payload for /api/v2/tasks/retrieve_task_provenance",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The id of the task whose rule-execution lineage to retrieve."
          }
        },
        "required": [
          "id"
        ]
      },
      "request-retrieve_tasks": {
        "type": "object",
        "description": "Request payload for /api/v2/tasks/retrieve_tasks",
        "properties": {
          "query": {
            "type": "string",
            "description": "Search query for tasks. Matches task fields, claim number, policy number (including claim-attached tasks reached through the claim's policy), and named insureds."
          },
          "view": {
            "type": "string",
            "enum": [
              "all_tasks",
              "my_tasks",
              "my_team",
              "claim_tasks",
              "policy_tasks",
              "submissions",
              "triage"
            ],
            "description": "Named view applying server-side scoping. submissions = policy tasks whose latest revision is in submission; triage = open, unassigned tasks."
          },
          "include_filter_counts": {
            "type": "boolean",
            "default": false,
            "description": "When true, the response includes filter_counts (status quick-filter bucket totals over the full filtered set)."
          },
          "include_view_counts": {
            "type": "boolean",
            "default": false,
            "description": "When true, the response includes view_counts: totals for the my_tasks / all_tasks / submissions / triage views in one aggregate, unfiltered by every queue control (including filters.bucket) so the tab numbers stay put as filters change."
          },
          "include_bucket_counts": {
            "type": "boolean",
            "default": false,
            "description": "When true, the response includes bucket_counts (per-lifecycle-bucket totals over the filtered set, computed before filters.bucket narrows it, so every bucket tab shows its own total). Only callers that render the admin bucket tabs request them."
          },
          "group_by": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "policy"
            ],
            "description": "When set to 'policy', pagination counts whole policy groups instead of task rows: pagination.page/page_size select groups (unattached tasks form one bucket, sorted first; then overdue count desc, top priority desc), the response returns every task belonging to the page's groups (a policy's tasks never split across pages), and pagination carries total_groups. total_count still reports the task total. sorting orders the tasks WITHIN each group and does not reorder the groups, whose rank is an aggregate over their tasks; insured, agency and lob hold one value per group, so the queue offers only task-level keys in this mode."
          },
          "suggest": {
            "type": "boolean",
            "default": false,
            "description": "Lightweight typeahead mode: returns only the LIMITed rows for the query, skipping the aggregate COUNT over the search predicate and the transaction-type enrichment. The response omits pagination in this mode."
          },
          "task_scopes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "claim",
                "policy"
              ]
            },
            "minItems": 1,
            "uniqueItems": true,
            "description": "Whether to return CLAIM work, POLICY work, or both. Omitted (the default) means both, so existing callers are unaffected. The Underwriting Workbench sends [\"policy\"]; claim work belongs to the Claims module's own task tab. An explicit list rather than something derived from `view`, because my_tasks / my_team / all_tasks are shared with the legacy Tasks Workbench, which lists every task on the site. THE RULE: the attachment decides when there is one, and the task's definition decides when there is not. `policy` = claimId IS NULL AND (policyId IS NOT NULL OR the task's definition is policy-scoped); `claim` is its exact complement. The two partition the table, so any subset selects a well-defined set of rows, and a task carrying BOTH columns is `claim`. Why the attachment wins where both could speak: task_definitions.scope was added NOT NULL DEFAULT 'claim' and backfilled every pre-existing definition, so a policy-attached task whose definition says 'claim' is ordinary legacy data and is still policy work. Why the definition decides an UNATTACHED task: it is binding, not advisory -- modify_task refuses to attach a claim-scoped task to a policy, so an unattached claim-scoped task can only ever become a claim task. The scope applies to the rows, to filter_counts / bucket_counts / view_counts and to group_by, so every number describes the rows returned. retrieve_task, modify_task and bulk_modify_tasks are unaffected and still serve both. An empty list is rejected."
          },
          "filters": {
            "type": "object",
            "description": "Filter criteria for tasks",
            "properties": {
              "assignee_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "description": "Filter by assignee IDs"
              },
              "task_numbers": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Filter by task NUMBER (tasks.taskId) -- the human-facing number, not the uuid primary key. Use `ids` to filter by uuid. Bounded by TASK_FILTER_MAX_IDS: an unbounded list becomes an unbounded IN (), whose bind parameters cost CPU to compile and escape before the database sees them. Deliberately ABOVE bulk_modify_tasks' own 500 cap, because in By Policy mode a page is 15 policy GROUPS and the server returns every task in them, so a select-all there can reach four figures. An empty list is rejected rather than read as 'no filter', which would otherwise return the whole unfiltered set.",
                "maxItems": 2000,
                "minItems": 1
              },
              "task_ids": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "deprecated": true,
                "description": "DEPRECATED alias of `task_numbers`; merged with it when both are sent. Matches the task NUMBER column (tasks.taskId), never the uuid. Bounded by TASK_FILTER_MAX_IDS: an unbounded list becomes an unbounded IN (), whose bind parameters cost CPU to compile and escape before the database sees them. Deliberately ABOVE bulk_modify_tasks' own 500 cap, because in By Policy mode a page is 15 policy GROUPS and the server returns every task in them, so a select-all there can reach four figures. An empty list is rejected rather than read as 'no filter', which would otherwise return the whole unfiltered set.",
                "maxItems": 2000,
                "minItems": 1
              },
              "ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "description": "Filter by task uuid (tasks.id). This is the id the queue's row selection and bulk_modify_tasks carry. Bounded by TASK_FILTER_MAX_IDS: an unbounded list becomes an unbounded IN (), whose bind parameters cost CPU to compile and escape before the database sees them. Deliberately ABOVE bulk_modify_tasks' own 500 cap, because in By Policy mode a page is 15 policy GROUPS and the server returns every task in them, so a select-all there can reach four figures. An empty list is rejected rather than read as 'no filter', which would otherwise return the whole unfiltered set.",
                "maxItems": 2000,
                "minItems": 1
              },
              "claim_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "description": "Filter by Claim IDs"
              },
              "policy_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "description": "Filter by Policy IDs (the direct tasks.policy_id column only; claim-tasks carry NULL there, so use effective_policy_ids to reach them)"
              },
              "effective_policy_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "description": "Filter by the task's EFFECTIVE policy: the direct policy_id column, or the claim's policy for a claim-task (whose column is NULL). This is the membership By Policy grouping uses, so it returns exactly one policy group's contents. policy_ids matches the direct column only -- a policy's own task list -- so the two differ for any policy whose claims have tasks. Either one satisfies the policy_tasks view's requirement for a policy scope. Bounded by TASK_FILTER_MAX_IDS; an empty list is rejected rather than read as 'no filter'.",
                "maxItems": 2000,
                "minItems": 1
              },
              "status": {
                "type": "string",
                "enum": [
                  "Open",
                  "In Progress",
                  "Blocked",
                  "Escalated",
                  "Completed",
                  "Canceled"
                ],
                "description": "Filter by a single task status"
              },
              "statuses": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "Open",
                    "In Progress",
                    "Blocked",
                    "Escalated",
                    "Completed",
                    "Canceled"
                  ]
                },
                "description": "Filter by multiple task statuses"
              },
              "status_filter": {
                "type": "string",
                "enum": [
                  "all",
                  "overdue",
                  "due_today",
                  "blocked",
                  "unassigned"
                ],
                "description": "Status quick-filter bucket applied server-side; 'all' (or omitted) means no quick-filter. overdue = past due date AND status not in {Completed, Canceled}."
              },
              "bucket": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "active",
                  "on_hold",
                  "archived"
                ],
                "description": "Lifecycle bucket applied server-side, ahead of status_filter and pagination, so filter_counts describes the bucket too (view_counts never does - see there). The buckets partition the statuses: active = {Open, In Progress, Escalated}, on_hold = {Blocked}, archived = {Completed, Canceled}. Omitted means no bucket filter."
              },
              "task_types": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Filter by task types"
              },
              "priority": {
                "type": "string",
                "enum": [
                  "Low",
                  "Medium",
                  "High"
                ],
                "description": "Filter by a single priority"
              },
              "priorities": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "Low",
                    "Medium",
                    "High"
                  ]
                },
                "description": "Filter by multiple priorities"
              },
              "transaction_types": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "New Business",
                    "Renewal",
                    "Endorsement",
                    "Cancellation",
                    "Reinstatement"
                  ]
                },
                "description": "Filter by the policy's transaction type (canonical display taxonomy, evaluated on the policy's latest revision)"
              },
              "lobs": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Filter by line of business (policy type name of the policy's latest revision)"
              },
              "stages": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Filter by policy stage (derived from the latest revision's policy status)"
              },
              "due_date_start": {
                "type": "string",
                "format": "date-time",
                "description": "Filter by due date (start range, inclusive). ISO-8601 date-time; a value without a UTC offset is interpreted as UTC, matching the frame due_date is returned in"
              },
              "due_date_end": {
                "type": "string",
                "format": "date-time",
                "description": "Filter by due date (end range, inclusive). ISO-8601 date-time; a value without a UTC offset is interpreted as UTC, matching the frame due_date is returned in"
              }
            }
          },
          "pagination": {
            "type": "object",
            "description": "Pagination parameters",
            "properties": {
              "page": {
                "type": "integer",
                "minimum": 1,
                "default": 1,
                "description": "Page number"
              },
              "page_size": {
                "type": "integer",
                "minimum": 1,
                "default": 20,
                "description": "Number of items per page"
              }
            }
          },
          "sorting": {
            "type": "object",
            "description": "Sorting parameters, applied server-side over the whole filtered set rather than the returned page. Nullable keys place missing values last regardless of direction; task number is the final tiebreaker, so paging cannot repeat or skip a row. An unrecognised sort_by leaves only that tiebreaker.",
            "properties": {
              "sort_by": {
                "type": "string",
                "enum": [
                  "due_date",
                  "priority",
                  "status",
                  "task_age",
                  "insured",
                  "agency",
                  "lob"
                ],
                "default": "due_date",
                "description": "Field to sort by. insured, agency and lob are reached through the task's policy -- the insured and LOB off its latest revision, the agency off the policy -- and resolve to what the matching column displays. The nullable keys (due_date, insured, agency, lob) place rows with no value LAST in both directions. priority sorts by urgency, ascending meaning Low first. status follows the declared lifecycle order (Open, In Progress, Blocked, Escalated, Completed, Canceled), not alphabetical. task_age ascending puts the oldest task first."
              },
              "sort_order": {
                "type": "string",
                "enum": [
                  "asc",
                  "desc"
                ],
                "default": "desc",
                "description": "Sort direction"
              }
            }
          }
        }
      },
      "request-retrieve_team_workload": {
        "type": "object",
        "description": "Request payload for /api/v2/tasks/retrieve_team_workload. Takes no parameters: the roster follows the caller's own task-queue assignee scope, and access is resolved from the view_team_workload capability.",
        "properties": {}
      },
      "request-retrieve_underwriting_calendar": {
        "type": "object",
        "description": "Request payload for /api/v2/tasks/retrieve_underwriting_calendar. Per-day counts of the caller's open tasks for one month, so paging the Dashboard calendar does not re-fetch the whole dashboard payload.",
        "properties": {
          "month": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[0-9]{4}-[0-9]{2}$",
            "description": "The month to report, as YYYY-MM. Defaults to the current month when omitted. Rejected beyond five years either side of today."
          }
        }
      },
      "request-retrieve_underwriting_dashboard": {
        "type": "object",
        "description": "Request payload for /api/v2/tasks/retrieve_underwriting_dashboard. Takes no parameters beyond the API key: every figure in the response is derived from the calling user's own tasks, so there is nothing to scope by.",
        "properties": {}
      },
      "request-retrieve_underwriting_dashboard_panels": {
        "type": "object",
        "description": "Request payload for /api/v2/tasks/retrieve_underwriting_dashboard_panels. Takes no parameters beyond the API key. Separate from retrieve_underwriting_dashboard so the KPI strip and Priority Work are not held up by three secondary aggregates.",
        "properties": {}
      },
      "request-retrieve_underwriting_team_performance": {
        "type": "object",
        "description": "Request payload for /api/v2/tasks/retrieve_underwriting_team_performance. Takes no parameters beyond the API key: the roster is the caller's team, resolved server-side. Enforces the view_team_workload capability, which is access control here rather than an affordance - every figure describes other people's work.",
        "properties": {}
      },
      "request-review_revision": {
        "type": "object",
        "description": "Request payload for /api/v2/policies/review_revision",
        "properties": {
          "revision_id": {
            "type": "string",
            "description": "Revision ID to run STP against"
          }
        },
        "required": [
          "revision_id"
        ]
      },
      "request-revoke_report_permission": {
        "type": "object",
        "description": "Request payload for POST /api/v2/reports/revoke_report_permission",
        "properties": {
          "report_id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the report."
          },
          "grantee_type": {
            "type": "string",
            "enum": [
              "contact",
              "user_group",
              "role",
              "permission_level"
            ],
            "description": "Kind of grantee whose row to remove."
          },
          "grantee_id": {
            "type": "string",
            "description": "Identifier of the grantee matching the row to revoke."
          },
          "api_key": {
            "type": "string",
            "description": "API key for external / programmatic clients."
          }
        },
        "required": [
          "report_id",
          "grantee_type",
          "grantee_id"
        ]
      },
      "request-revoke_screening_override": {
        "description": "Request payload for /api/v2/contacts/revoke_screening_override",
        "type": "object",
        "properties": {
          "screening_check_result_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the screening check result to revoke override from"
          }
        },
        "required": [
          "screening_check_result_id"
        ]
      },
      "request-rewrite_policy": {
        "type": "object",
        "description": "Request payload for /api/v2/policies/rewrite_policy",
        "properties": {
          "revision_id": {
            "type": "string",
            "format": "uuid",
            "description": "The revision ID of the policy to be rewritten"
          },
          "revision_external_system_reference": {
            "type": "string",
            "description": "The external system reference of the revision of the policy to be rewritten"
          },
          "rewritten_revision_external_system_reference": {
            "type": "string",
            "description": "The external system reference of the revision of the rewritten policy"
          },
          "policy_number": {
            "type": "string",
            "description": "The policy number of the policy to be rewritten"
          },
          "rewritten_policy_number": {
            "type": "string",
            "description": "The policy number of the rewritten policy"
          },
          "policy_number_option": {
            "type": "string",
            "enum": [
              "new",
              "current",
              "manual"
            ],
            "description": "The option to use for the policy number of the policy to be rewritten"
          },
          "effective_date": {
            "type": "string",
            "format": "date",
            "description": "The effective date of the policy to be rewritten"
          },
          "term": {
            "type": "string",
            "description": "The term of the policy to be rewritten"
          },
          "reason": {
            "type": "string",
            "description": "The reason for rewriting the policy"
          },
          "reason_id": {
            "type": "string",
            "description": "The ID of the reason for rewriting the policy"
          },
          "expiration_date": {
            "type": "string",
            "format": "date",
            "description": "The expiration date of the policy to be rewritten"
          },
          "at_renewal_set_policy_term_to": {
            "type": "string",
            "description": "The term to be set to the policy at renewal"
          }
        },
        "required": [
          "rewritten_revision_external_system_reference",
          "policy_number_option",
          "effective_date"
        ],
        "allOf": [
          {},
          {},
          {},
          {},
          {}
        ]
      },
      "request-run_migration": {
        "type": "object",
        "description": "Request schema for /api/v2/imports/run_migration. Requires the britecore/imports/migration_jobs rw permission.",
        "properties": {
          "policy_type_mappings": {
            "type": "object",
            "description": "Map of execution names to policy type UUIDs",
            "patternProperties": {
              "^[a-zA-Z0-9_-]+$": {
                "type": "string",
                "format": "uuid",
                "description": "Policy type UUID"
              }
            },
            "minProperties": 1,
            "examples": [
              {
                "HO3_Texas": "a320737f-2aef-42cf-957e-5c5da0e46aa1",
                "HO6_Louisiana": "78777dba-2244-4d5b-b7ce-5ce323005065"
              }
            ]
          },
          "disable_rules": {
            "type": "object",
            "description": "Map of execution names to semicolon-separated rule IDs to disable",
            "patternProperties": {
              "^[a-zA-Z0-9_-]+$": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9_-]+(;[a-zA-Z0-9_-]+)*$",
                "description": "Semicolon-separated rule IDs"
              }
            },
            "examples": [
              {
                "HO3_Texas": "rule-id-1;rule-id-2",
                "HO6_Louisiana": "rule-id-3"
              }
            ]
          },
          "filters": {
            "type": "object",
            "description": "Runtime filters to control which migration scripts execute",
            "properties": {
              "skip_scripts": {
                "type": "array",
                "description": "List of migration scripts to skip (mutually exclusive with run_scripts)",
                "items": {
                  "type": "string",
                  "enum": [
                    "policy",
                    "analyze",
                    "contacts",
                    "payments",
                    "accounts",
                    "notes",
                    "credit_reports",
                    "location_restrictions",
                    "policy_type_restrictions",
                    "elasticsearch"
                  ]
                },
                "uniqueItems": true
              },
              "run_scripts": {
                "type": "array",
                "description": "List of migration scripts to run exclusively (mutually exclusive with skip_scripts)",
                "items": {
                  "type": "string",
                  "enum": [
                    "policy",
                    "analyze",
                    "contacts",
                    "payments",
                    "accounts",
                    "notes",
                    "credit_reports",
                    "location_restrictions",
                    "policy_type_restrictions",
                    "elasticsearch"
                  ]
                },
                "uniqueItems": true
              }
            }
          },
          "dry_run": {
            "type": "boolean",
            "description": "If true, validates configuration without executing",
            "default": false
          }
        },
        "required": [
          "policy_type_mappings"
        ]
      },
      "request-run_pre_rate_integrations": {
        "title": "Run Pre-Rate Integrations Request",
        "type": "object",
        "description": "Request payload for /api/v2/quotes/run_pre_rate_integrations. Runs the Rate click's vendor integrations for every live risk of the revision in one call: HazardHub when the vendor is configured with triggerOnRateAndSave, and the property lookup integrations configured with the runWhenQWUserClicksCalculateRate option. The legacy rate_risk ran these inline before rating; the unified quotes/rate is integration-free, so the Quote Wizard calls this first and only rates when it succeeds. Sites with nothing configured for the rate click answer immediately.",
        "properties": {
          "quote_id": {
            "type": "string",
            "format": "uuid",
            "description": "The unique identifier (UUID) of the quote revision to run the integrations for. Per the quotes v2 API convention this is the revision id."
          }
        },
        "required": [
          "quote_id"
        ]
      },
      "request-run_property_lookup": {
        "type": "object",
        "description": "Request payload for POST /api/v2/policies/run_property_lookup. Runs PROPERTY_LOOKUP for a property and stores rating / property-information updates. The lookup is seed-only for property_val / replacement_cost_value: it fills a blank and never overwrites a stored value (BC-24446).",
        "properties": {
          "property_id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the Property to look up. Required."
          },
          "integration_instance_id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the IntegrationInstance to run. Required when headless is omitted or false. Ignored when headless is true or a PropertyLookupOptions string."
          },
          "headless": {
            "description": "When true, run every PROPERTY_LOOKUP instance on the property's policy type (integration_instance_id is not required). When a string, run only instances whose property-lookup-options setting includes that option. Quote Wizard property-details save sends runWhenQWUserSavesPropertyDetails.",
            "oneOf": [
              {
                "type": "boolean"
              },
              {
                "type": "string",
                "enum": [
                  "runWhenQWUserSavesPropertyDetails",
                  "runWhenQWUserClicksCalculateRate",
                  "runWhenQWUserSubmitsApplicationQuestions",
                  "runWhenPolicyBuilderUserClicksRateAndSave",
                  "runWhenPolicyRenews",
                  "runDuringFullQuoteAsync",
                  "displayButtonOnQWPropertyDetails",
                  "doNotResetRatedPremium",
                  "doNotRunUnderwritingRules"
                ]
              }
            ]
          },
          "dependencies": {
            "type": "array",
            "description": "Optional rating values to persist on the property before the vendor call. Each entry is a category or a user-input label.",
            "items": {
              "type": "object",
              "properties": {
                "category": {
                  "type": "string",
                  "description": "Category name. Required when label is absent."
                },
                "label": {
                  "type": "string",
                  "description": "User-input label. Required when category is absent."
                },
                "itemId": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Property item to write. Omitted writes the value onto every matching item on the property."
                },
                "value": {
                  "type": "string",
                  "description": "Value to store for the category or user input. Required."
                }
              },
              "required": [
                "value"
              ]
            }
          }
        },
        "required": [
          "property_id"
        ]
      },
      "request-run_rules": {
        "type": "object",
        "description": "Request payload for /api/v2/rules/run. Executes underwriting rules for a quote.",
        "properties": {
          "quote_id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the quote/revision to run rules for"
          },
          "property_id": {
            "type": "string",
            "format": "uuid",
            "description": "Optional UUID of a specific property to run rules for. If not provided, runs for all properties."
          },
          "ui_context": {
            "type": "object",
            "description": "Optional UI context data for running UI-specific rules. When provided, runs UI rules instead of quoting rules.",
            "properties": {
              "driver": {
                "type": "object",
                "description": "Driver data for UI rules"
              },
              "drivers": {
                "type": "array",
                "description": "List of drivers for UI rules",
                "items": {
                  "type": "object"
                }
              },
              "vehicle": {
                "type": "object",
                "description": "Vehicle data for UI rules"
              },
              "vehicles": {
                "type": "array",
                "description": "List of vehicles for UI rules",
                "items": {
                  "type": "object"
                }
              },
              "watercraft": {
                "type": "object",
                "description": "Watercraft data for UI rules"
              },
              "watercrafts": {
                "type": "array",
                "description": "List of watercrafts for UI rules",
                "items": {
                  "type": "object"
                }
              }
            }
          }
        },
        "required": [
          "quote_id"
        ]
      },
      "request-save_definition_quick_code_value_toggle": {
        "type": "object",
        "description": "Request payload for /api/v2/quick_code_values/save_definition_quick_code_value_toggle.",
        "properties": {
          "definition_code": {
            "type": "string",
            "description": "Policy type definition code the toggle applies to",
            "maxLength": 200
          },
          "quick_code": {
            "type": "string",
            "description": "The quick code the value belongs to",
            "maxLength": 100
          },
          "code_value_type": {
            "type": "string",
            "description": "The code value type being enabled or disabled for the definition",
            "maxLength": 100
          },
          "enabled": {
            "type": "boolean",
            "description": "True to enable the value for the definition, false to disable it"
          }
        },
        "required": [
          "definition_code",
          "quick_code",
          "code_value_type",
          "enabled"
        ]
      },
      "request-save_html_template": {
        "type": "object",
        "description": "Request payload for /api/v2/deliverables/save_html_template",
        "properties": {
          "name": {
            "type": "string",
            "description": "The name to use when referencing the template. Globally unique. If a template with the same name already exists, it will be updated."
          },
          "html": {
            "type": "string",
            "description": "The HTML string (Jinja template) to be converted into a deliverable."
          },
          "use_new_html_render": {
            "type": "boolean",
            "description": "Whether or not to use the new render.py to render the Jinja template.",
            "default": false
          },
          "use_new_pdf_render": {
            "type": "boolean",
            "description": "Whether or not to use the new render.py to render the PDF deliverable.",
            "default": true
          },
          "enabled": {
            "type": "boolean",
            "description": "Whether the template is enabled or not.",
            "default": false
          },
          "show_as_custom_deliverable": {
            "type": "boolean",
            "description": "Whether the template should be shown as a custom deliverable in the UI.",
            "default": false
          }
        },
        "required": [
          "name",
          "html"
        ]
      },
      "request-save_remove_value_from_definitions_and_deactivate": {
        "type": "object",
        "description": "Request payload for /api/v2/quick_code_values/save_remove_value_from_definitions_and_deactivate.",
        "properties": {
          "quick_code": {
            "type": "string",
            "description": "The quick code the value belongs to",
            "maxLength": 100
          },
          "code_value_type": {
            "type": "string",
            "description": "The code value type to strip from every policy type definition and then deactivate globally",
            "maxLength": 100
          }
        },
        "required": [
          "quick_code",
          "code_value_type"
        ]
      },
      "request-save_reset_definition_quick_code_values": {
        "type": "object",
        "description": "Request payload for /api/v2/quick_code_values/save_reset_definition_quick_code_values.",
        "properties": {
          "definition_code": {
            "type": "string",
            "description": "Policy type definition code whose overrides are cleared so it inherits the global values again",
            "maxLength": 200
          },
          "quick_code": {
            "type": "string",
            "description": "The quick code the reset is scoped to; other quick codes on the same definition are untouched",
            "maxLength": 100
          }
        },
        "required": [
          "definition_code",
          "quick_code"
        ]
      },
      "request-search_names_emails": {
        "type": "object",
        "title": "Search Names Emails Request",
        "description": "Request payload for /api/v2/contacts/search_names_emails",
        "properties": {
          "query": {
            "type": "string",
            "description": "Search query for email addresses or usernames. Must be at least 2 characters long.",
            "minLength": 2
          },
          "limit": {
            "type": "integer",
            "description": "Maximum number of results to return",
            "minimum": 1,
            "maximum": 1000,
            "default": 300
          }
        },
        "required": [
          "query"
        ]
      },
      "request-search_recovery_candidates": {
        "type": "object",
        "description": "Request payload for /api/v2/deliverables/search_recovery_candidates",
        "properties": {
          "start_date": {
            "type": "string",
            "format": "date",
            "description": "Start of the print-date range to scan for broken deliverables."
          },
          "end_date": {
            "type": "string",
            "format": "date",
            "description": "End of the print-date range to scan for broken deliverables."
          },
          "include_empty_s3_file_content": {
            "type": "boolean",
            "description": "Include files whose S3 object has zero bytes."
          },
          "include_zero_sized_file_record": {
            "type": "boolean",
            "description": "Include files whose DB size field is 0."
          },
          "include_mismatched_size_record": {
            "type": "boolean",
            "description": "Include files where the DB size does not match the S3 content length."
          },
          "include_empty_folder": {
            "type": "boolean",
            "description": "Include deliverable folders that contain no child files."
          }
        },
        "required": [
          "start_date",
          "end_date",
          "include_empty_s3_file_content",
          "include_zero_sized_file_record",
          "include_mismatched_size_record",
          "include_empty_folder"
        ]
      },
      "request-select_my_role": {
        "description": "Request payload for /api/v2/auth/select_my_role.",
        "type": "object",
        "properties": {
          "role_id": {
            "type": "string",
            "format": "uuid",
            "description": "Exact role identifier returned by retrieve_my_roles."
          }
        },
        "required": [
          "role_id"
        ]
      },
      "request-send_payment_receipt_email": {
        "type": "object",
        "description": "Request schema for /api/v2/payments/send_payment_receipt_email",
        "properties": {
          "payment_id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the payment"
          },
          "policy_number": {
            "type": "string",
            "description": "Policy number; must belong to the payment. Does not select the attached document -- multi-policy payments email the group confirmation"
          },
          "recipient_email": {
            "type": "string",
            "format": "email",
            "description": "Recipient email address (from UI dropdown or free-form entry)"
          },
          "subject": {
            "type": "string",
            "description": "Optional email subject; defaults to a standard receipt subject if omitted"
          },
          "body": {
            "type": "string",
            "description": "Optional email body; defaults to a standard message if omitted"
          }
        },
        "required": [
          "payment_id",
          "policy_number",
          "recipient_email"
        ]
      },
      "request-send_scheduled_alerts": {
        "type": "object",
        "description": "Request Schema for /api/v2/alerts/send_scheduled_alerts",
        "properties": {}
      },
      "request-set_binder_to_active": {
        "type": "object",
        "description": "Request payload for /api/v2/policies/set_binder_to_active",
        "properties": {
          "revision_id": {
            "type": "string",
            "format": "uuid",
            "description": "The revision ID to bind"
          },
          "external_system_reference": {
            "type": "string",
            "description": "Reference to the revision in an external system. If provided, and multiple revisions are found, the latest non archived revision will be used."
          }
        }
      },
      "request-set_html_templates_locations": {
        "type": "object",
        "description": "Request schema for /api/v2/deliverables/set_html_templates_locations",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "templates": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string"
                    },
                    "location_ids": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid"
                      }
                    }
                  },
                  "required": [
                    "location_ids"
                  ]
                }
              }
            },
            "required": []
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "request-simulate_rule": {
        "type": "object",
        "description": "Request payload for /api/v2/rules/simulate_rule. Simulates rule execution against a revision (or, for claim-scoped rules, a claim) without persisting.",
        "properties": {
          "quote_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "UUID of the revision to simulate the rule against. Required for every rule category except 'claim'."
          },
          "claim_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "UUID of the claim to simulate the rule against. Required when the rule's category is 'claim'; ignored otherwise. The rule is simulated once against the whole claim: triggers are evaluated for the claim itself, and each effect is previewed against every exposure whose coverage type the effect targets. The policy revision comes from the claim, falling back to an exposure's coverage when the claim carries none."
          },
          "property_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Optional UUID of a specific risk/property to scope the simulation. Ignored for UI-scoped rule categories (vehicle-ui, driver-ui, watercraft-ui) and for claim-scoped rules."
          },
          "ui_context": {
            "type": [
              "object",
              "null"
            ],
            "description": "Optional override for UI-scoped rule categories (vehicle-ui, driver-ui, watercraft-ui). When omitted, the simulation fans out across every matching risk on the revision: vehicles for vehicle-ui, drivers for driver-ui, watercrafts for watercraft-ui. Pass an explicit context to scope the simulation to a single risk or to inject custom field values. Same shape as the production run_quoting_ui_rules payload -- must contain at least one of: 'driver', 'drivers', 'vehicle', 'vehicles', 'watercraft', 'watercrafts'."
          },
          "rule": {
            "type": "object",
            "description": "Full rule definition (same structure as create_rule/update_rule)",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "policy_type_id": {
                "type": "string",
                "format": "uuid",
                "description": "UUID of the policy type"
              },
              "name": {
                "type": "string",
                "maxLength": 100,
                "description": "Rule name"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Rule description"
              },
              "category": {
                "type": "string",
                "description": "Rule category (policy, property, vehicle, driver, claim, etc.)"
              },
              "module": {
                "type": "string",
                "description": "Module the rule applies to (all, bc, bq, events, stp)"
              },
              "severity": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Severity level for STP rules (critical, high, medium, low)"
              },
              "waiver_behavior": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Waiver behavior for STP rules (run_always, waived_for_x_terms)"
              },
              "waiver_terms": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Number of terms for waiver (when waiver_behavior is waived_for_x_terms)"
              },
              "enabled_for_renewal": {
                "type": "boolean",
                "default": true,
                "description": "Whether rule runs on renewals"
              },
              "enabled_for_endorsement": {
                "type": "boolean",
                "default": true,
                "description": "Whether rule runs on endorsements"
              },
              "enabled_for_new_business": {
                "type": "boolean",
                "default": true,
                "description": "Whether rule runs on new business"
              },
              "sort_order": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Rule sort order"
              },
              "valid_from_date": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date",
                "description": "Start date for rule validity (YYYY-MM-DD)"
              },
              "valid_to_date": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date",
                "description": "End date for rule validity (YYYY-MM-DD)"
              },
              "properties_affected": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Which properties are affected (null, primary, non-primary)"
              },
              "exception_type": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Exception type (include, exclude)"
              },
              "exception_agencies": {
                "type": [
                  "array",
                  "null"
                ],
                "items": {
                  "type": "string"
                },
                "description": "List of agency IDs for exceptions"
              },
              "event": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Event type for events module rules"
              },
              "triggers": {
                "type": "array",
                "description": "Array of rule triggers",
                "items": {
                  "$ref": "#/components/schemas/underwriting_rules_trigger-def"
                }
              },
              "effects": {
                "type": "array",
                "description": "Array of rule effects",
                "items": {
                  "$ref": "#/components/schemas/underwriting_rules_effect-def"
                }
              }
            },
            "required": [
              "policy_type_id",
              "name",
              "category",
              "module"
            ]
          }
        },
        "required": [
          "rule"
        ],
        "allOf": [
          {}
        ]
      },
      "request-sort_calculated_field": {
        "type": "object",
        "description": "Request payload for /api/v2/document_templates/sort_calculated_field. Same pattern as sortUnderwritingRules.",
        "properties": {
          "field_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the field to move"
          },
          "new_order": {
            "type": "integer",
            "minimum": 0,
            "description": "New 0-based index position"
          }
        },
        "required": [
          "field_id",
          "new_order"
        ]
      },
      "request-store_claims_search": {
        "type": "object",
        "description": "Request Schema for /api/v2/claims/store_claims_search (Tray.io callback)",
        "properties": {
          "result": {
            "type": "object",
            "description": "Wrapper object added by Tray.io containing the actual response data",
            "properties": {
              "request_id": {
                "type": "string",
                "description": "Correlation ID matching the original request"
              },
              "status": {
                "type": "string",
                "enum": [
                  "Success",
                  "Failed",
                  "Timeout"
                ],
                "description": "Status of the ISO ClaimSearch response"
              },
              "vendor_reference_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "ISO file number reference"
              },
              "matches": {
                "type": "array",
                "description": "List of prior-loss match records",
                "items": {
                  "type": "object",
                  "properties": {
                    "match_id": {
                      "type": "string",
                      "description": "Unique identifier for the match"
                    },
                    "claim_number": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Claim number from the prior loss"
                    },
                    "loss_date": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date",
                      "description": "Date of the prior loss"
                    },
                    "carrier_name": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Name of the carrier for the prior claim"
                    },
                    "loss_type": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Type of loss"
                    },
                    "claim_amount": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Amount of the prior claim"
                    },
                    "match_score": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Confidence score of the match"
                    }
                  }
                }
              },
              "error_code": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Error code if status is Failed"
              },
              "error_message": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Error details if status is Failed"
              }
            },
            "required": [
              "request_id",
              "status"
            ]
          }
        },
        "required": [
          "result"
        ]
      },
      "request-store_config": {
        "type": "object",
        "description": "Request payload for /api/v2/convenience_fees/store_config. Persists convenience-fee config at one scope (Global when location_id is omitted/null, otherwise a per-state override). Admin-only. Every convenience_fees key is optional (partial update). BLANK-OVERRIDE fields -- the legacy fee text columns formula_*, description_*, disclosure_surcharge, disclosure_authorization: an explicit empty string clears the column to NULL, which the resolver treats as a BLANK OVERRIDE at this scope (resolves to $0 fee / blank copy) -- it does NOT re-inherit from the broader tier. To re-inherit, remove the entire scope via /api/v2/convenience_fees/delete_config (the admin Remove state override action). INHERIT-ON-NULL fields (BC-16104) -- disclosure_style, capture_authorization, disclosure_first_party, disclosure_third_party: a blank/NULL there has no override state and falls through to the broader tier rather than blanking.",
        "properties": {
          "location_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Business-location UUID for a per-state scope. Omit or pass null for the carrier-wide global default."
          },
          "convenience_fees": {
            "type": "object",
            "description": "Snake_case logical-key dict. Missing keys leave the existing column untouched. For the text columns, an empty string clears the column to NULL = a blank override at this scope ($0 fee / blank copy), NOT inherit; re-inherit only via delete_config. disclosure_style is the exception (a blank falls through to the broader tier).",
            "properties": {
              "disclosure_style": {
                "type": "string",
                "enum": [
                  "standard",
                  "new_york",
                  ""
                ],
                "description": "Disclosure style for fee messaging. Empty string clears it to NULL; unlike the text columns, a blank disclosure_style falls through to the broader tier (the enum has no blank-override state)."
              },
              "formula_cc": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 100,
                "description": "Convenience-fee formula for credit-card payments. Max 100 chars (matches VARCHAR(100) on the formula column and the Marshmallow validate.Length(max=100) on ConvenienceFeeConfigModel)."
              },
              "formula_ach": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 100,
                "description": "Convenience-fee formula for ACH payments. Max 100 chars."
              },
              "formula_debit": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 100,
                "description": "Convenience-fee formula for debit-card payments. Max 100 chars."
              },
              "description_cc": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 500,
                "description": "Description shown for credit-card fees. Max 500 chars (matches VARCHAR(500) on the description column and the Marshmallow validate.Length(max=500))."
              },
              "description_ach": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 500,
                "description": "Description shown for ACH fees. Max 500 chars."
              },
              "description_debit": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 500,
                "description": "Description shown for debit-card fees. Max 500 chars."
              },
              "disclosure_surcharge": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "HTML surcharge disclosure."
              },
              "disclosure_authorization": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "HTML authorization disclosure."
              },
              "capture_authorization": {
                "type": [
                  "boolean",
                  "null"
                ],
                "description": "capture provable saved-payment-method authorization at this scope. INHERIT-ON-NULL -- null falls through to the broader tier (NOT a blank override, unlike the text columns above)."
              },
              "disclosure_first_party": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "first-party (policyholder) authorization disclosure copy. INHERIT-ON-NULL -- null falls through to the broader tier."
              },
              "disclosure_third_party": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "third-party (agent attestation) authorization disclosure copy; may contain the {{agent_name}} merge tag (server-substituted, escaped). INHERIT-ON-NULL -- null falls through to the broader tier."
              }
            }
          }
        }
      },
      "request-store_contact_legal_entity_type": {
        "description": "Request payload for /api/v2/contacts/store_contact_legal_entity_type.",
        "type": "object",
        "properties": {
          "contact_id": {
            "type": "string",
            "format": "uuid",
            "description": "The unique identifier of the contact whose Legal Entity Type is being set."
          },
          "legal_entity_type": {
            "type": "string",
            "description": "Legal Entity Type value to set. A literal empty string clears the field. Null/omitted, non-string, and whitespace-only values are rejected. Surrounding whitespace on a real value is trimmed."
          }
        },
        "required": [
          "contact_id",
          "legal_entity_type"
        ]
      },
      "request-store_payment": {
        "description": "Request schema for /api/v2/payments/store_payment",
        "type": "object",
        "properties": {
          "integration_instance_external_id": {
            "type": "string",
            "description": "External ID of the integration instance."
          },
          "policy_numbers": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "List of policy numbers associated with the payment."
          },
          "transaction_amount_in_cents": {
            "type": "integer",
            "minimum": 1,
            "description": "Amount of the transaction in cents."
          },
          "convenience_fee_in_cents": {
            "type": "integer",
            "minimum": 0,
            "description": "Convenience fee charged for the transaction in cents."
          },
          "vendor_processing_fee_in_cents": {
            "type": "integer",
            "minimum": 0,
            "description": "Optional processing fee charged by the vendor in cents."
          },
          "pay_by": {
            "type": "string",
            "enum": [
              "cc",
              "ach"
            ],
            "description": "Method of payment."
          },
          "account_name": {
            "type": "string",
            "description": "Name associated with the payment account."
          },
          "masked_number": {
            "type": "string",
            "description": "Masked account number for security."
          },
          "transaction_date_time": {
            "type": "string",
            "format": "date-time",
            "description": "Date and time when the transaction occurred."
          },
          "vendor_message": {
            "type": "string",
            "description": "Message from the payment vendor."
          },
          "reference_id": {
            "type": "string",
            "description": "Unique reference ID for the transaction."
          },
          "vendor_response": {
            "type": "object",
            "description": "Raw response from the payment vendor."
          },
          "payor_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Name of the payor from payment gateway billing details (e.g., Stripe)."
          },
          "payor_email": {
            "type": [
              "string",
              "null"
            ],
            "format": "email",
            "description": "Email address of the payor from payment gateway billing details (e.g., Stripe)."
          },
          "britecore_confirmation_number": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 32,
            "description": "Optional. BriteCore confirmation (receipt) number minted up front by request_payment_entry and echoed back here so the stored Payment's confirmation number matches the value attached to the Stripe PaymentIntent metadata (BC-22803). When omitted, BriteCore generates one at store time. Capped at 32 chars to match the payments.confirmationNumber VARCHAR(32) column."
          },
          "requester_contact_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Optional. Contact id of the BriteCore user who originated the payment, derived from the authenticated user by request_payment_entry and echoed back via the Stripe PaymentIntent metadata. When provided, the \"Payment Received\" policy note is attributed to that user instead of the integration service account (srv_integrations). See BC-19725."
          }
        },
        "required": [
          "integration_instance_external_id",
          "policy_numbers",
          "transaction_amount_in_cents",
          "convenience_fee_in_cents",
          "pay_by",
          "account_name",
          "masked_number",
          "transaction_date_time",
          "vendor_message",
          "reference_id",
          "vendor_response"
        ]
      },
      "request-store_payment_nsf": {
        "description": "Request schema for /api/v2/payments/store_payment_nsf",
        "type": "object",
        "properties": {
          "payment_id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the payment to mark as NSF."
          },
          "assess_fee": {
            "type": "string",
            "enum": [
              "now",
              "next",
              "waive"
            ],
            "default": "now",
            "description": "When to assess NSF fee. 'now' = immediately, 'next' = on next invoice, 'waive' = no fee."
          },
          "allow_cancel": {
            "type": "boolean",
            "default": true,
            "description": "Whether to allow policy cancellation. Must be false if postpone_until_date is provided."
          },
          "postpone_until_date": {
            "type": "string",
            "description": "Date to postpone outstanding invoices. Accepts various date formats (YYYY-MM-DD recommended)."
          },
          "policy_id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the policy that the payment belongs to."
          },
          "policy_term_id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the policy term. Required if policy_term_external_system_reference is not provided."
          },
          "policy_term_external_system_reference": {
            "type": "string",
            "description": "External system reference for the policy term. Required if policy_term_id is not provided."
          }
        },
        "required": [
          "payment_id",
          "policy_id"
        ],
        "allOf": [
          {},
          {}
        ]
      },
      "request-sync_underlying_policy_changes": {
        "type": "object",
        "description": "Request payload for /api/v2/policies/sync_underlying_policy_changes",
        "properties": {
          "revision_id": {
            "type": "string",
            "format": "uuid",
            "description": "The UUID of the current umbrella revision"
          }
        },
        "required": [
          "revision_id"
        ]
      },
      "request-terms_accept": {
        "type": "object",
        "description": "Request payload for /api/v2/terms/accept - record that the current user accepted a specific version of a terms document. Appends an acceptance row and an audit note atomically. Refused while impersonating, and refused for users who cannot use the feature the terms cover (BriteCore staff, isGod, are exempt from that check).",
        "properties": {
          "api_key": {
            "type": "string",
            "description": "API key for authentication"
          },
          "key": {
            "type": "string",
            "description": "Identifier of the terms document, validated against the in-repo registry (core.terms_of_service). An unknown value is rejected.",
            "enum": [
              "sql_editor"
            ]
          },
          "version": {
            "type": "string",
            "description": "The version the caller actually displayed, as returned by /api/v2/terms/status. Always required. While the site shows the notice it must equal the currently registered version: sending the key alone would let a notice edit between page render and submit produce an audit row claiming the user accepted text they never saw, and a mismatch is rejected with a `version` field error so the client can reload and show the current notice. On a site where reports.enable-sql-editor-terms is off the notice is not in force, so nothing is recorded and a stale value is tolerated rather than rejected."
          }
        },
        "required": [
          "key",
          "version"
        ]
      },
      "request-terms_status": {
        "type": "object",
        "description": "Request payload for /api/v2/terms/status - read whether the current user has accepted the current version of a terms document. Read-only. Callers who cannot use the feature the terms cover are refused, matching the page gate, so that acceptance state is never surfaced or recorded for users without access (BriteCore staff, isGod, are exempt from that check).",
        "properties": {
          "api_key": {
            "type": "string",
            "description": "API key for authentication"
          },
          "key": {
            "type": "string",
            "description": "Identifier of the terms document, validated against the in-repo registry (core.terms_of_service). An unknown value is rejected.",
            "enum": [
              "sql_editor"
            ]
          }
        },
        "required": [
          "key"
        ]
      },
      "request-test_expression": {
        "type": "object",
        "description": "Request payload for /api/v2/document_templates/test_expression",
        "properties": {
          "expression": {
            "type": "string",
            "description": "RestrictedPython expression to evaluate"
          },
          "path": {
            "type": "string",
            "default": "",
            "description": "Path context (e.g. '' for root, 'drivers' for arrays)"
          },
          "context": {
            "type": "object",
            "description": "Template context data to evaluate the expression against"
          }
        },
        "required": [
          "expression"
        ]
      },
      "request-trigger_scheduled_claims_research": {
        "type": "object",
        "description": "Request Schema for /api/v2/claims/trigger_scheduled_claims_research",
        "properties": {
          "integration_instance_id": {
            "type": "string",
            "description": "External ID of the integration instance (as known by Tray.io)"
          },
          "research_interval_days": {
            "type": "integer",
            "description": "Minimum days since last successful search",
            "minimum": 1
          }
        },
        "required": [
          "integration_instance_id",
          "research_interval_days"
        ]
      },
      "request-unassign_business_location": {
        "type": "object",
        "description": "Request payload for /api/v2/brands/unassign_business_location",
        "properties": {
          "location_id": {
            "type": "string",
            "description": "Business location identifier"
          }
        },
        "required": [
          "location_id"
        ]
      },
      "request-unassign_policy_type_definition": {
        "type": "object",
        "description": "Request payload for /api/v2/brands/unassign_policy_type_definition",
        "properties": {
          "location_id": {
            "type": "string",
            "description": "Business location identifier"
          },
          "policy_type_definition_id": {
            "type": "string",
            "description": "Policy type definition identifier"
          }
        },
        "required": [
          "location_id",
          "policy_type_definition_id"
        ]
      },
      "request-update_additional_interest": {
        "type": "object",
        "description": "Request payload for /api/v2/additional_interests/update_additional_interest. Provide quote_id for revision-level or vehicle_id/risk_id for risk-level.",
        "properties": {
          "additional_interest": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "Additional interest ID to update"
              },
              "quote_id": {
                "type": "string",
                "format": "uuid",
                "description": "ID of the quote/revision (revision-level)"
              },
              "vehicle_id": {
                "type": "string",
                "format": "uuid",
                "description": "ID of the vehicle (risk-level)"
              },
              "risk_id": {
                "type": "string",
                "format": "uuid",
                "description": "ID of the risk/property (risk-level)"
              },
              "interest": {
                "type": "string",
                "description": "Type of interest",
                "minLength": 1
              },
              "interest_type": {
                "type": "string",
                "description": "Interest type code from ADDITIONAL_INTEREST_TYPES QuickCode (risk-level only)"
              },
              "loan_number": {
                "type": "string",
                "maxLength": 100,
                "description": "Loan number associated with the interest (risk-level only)"
              },
              "notes": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 1024,
                "description": "Free-text additional notes for the interest"
              },
              "name": {
                "type": "string",
                "description": "Contact name",
                "minLength": 1
              },
              "type": {
                "type": "string",
                "enum": [
                  "individual",
                  "organization"
                ],
                "description": "Contact type"
              },
              "ssn": {
                "type": "string",
                "description": "Social Security Number"
              },
              "date_of_birth": {
                "type": "string",
                "format": "date",
                "description": "Date of birth"
              },
              "fein_tax_id": {
                "type": "string",
                "description": "Federal EIN/Tax ID"
              },
              "legal_entity_type": {
                "type": "string",
                "description": "Legal entity type"
              },
              "phones": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/phone-def"
                }
              },
              "addresses": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/address-def"
                }
              },
              "emails": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/email-def"
                }
              }
            },
            "required": [
              "id"
            ]
          }
        },
        "required": [
          "additional_interest"
        ]
      },
      "request-update_additional_interest_associations": {
        "type": "object",
        "description": "Request payload for /api/v2/additional_interests/update_additional_interest_associations. Diffs current risk associations against risk_ids: missing risks are linked, removed risks are unlinked.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of an existing x_properties_contacts record for this AI"
          },
          "risk_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "minItems": 1,
            "description": "Complete desired set of risk IDs for this contact+interest. Risks present in the current set but absent here will be removed."
          }
        },
        "required": [
          "id",
          "risk_ids"
        ]
      },
      "request-update_adjuster_assignment_config": {
        "type": "object",
        "description": "Request Schema for /api/v2/claim_adjuster_assignment_configs/update_adjuster_assignment_config",
        "properties": {
          "adjuster_assignment_config": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/adjuster_assignment-def"
              },
              {
                "type": "object",
                "required": [
                  "id"
                ]
              }
            ]
          }
        }
      },
      "request-update_adjuster_license": {
        "type": "object",
        "description": "Request payload for /api/v2/contacts/update_adjuster_license.",
        "required": [
          "license_data"
        ],
        "properties": {
          "license_data": {
            "type": "object",
            "description": "License update data object",
            "required": [
              "id"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "UUID of the license to update"
              },
              "business_location_id": {
                "type": "string",
                "format": "uuid",
                "description": "UUID of the business location (state)"
              },
              "license_number": {
                "type": "string",
                "maxLength": 64,
                "description": "License number"
              },
              "effective_date": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date",
                "description": "Effective date in YYYY-MM-DD format, or empty string to clear"
              },
              "expiration_date": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date",
                "description": "Expiration date in YYYY-MM-DD format, or empty string to clear"
              }
            }
          }
        }
      },
      "request-update_billing_schedule": {
        "type": "object",
        "description": "Request schema for api/v2/policies/update_billing_schedule",
        "properties": {
          "policy_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the policy to update"
          },
          "billing_schedule": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the billing schedule to apply"
          },
          "policy_term_id": {
            "type": "string",
            "format": "uuid",
            "description": "Optional ID of the specific policy term to update. If not provided, the current term will be used."
          }
        },
        "required": [
          "policy_id",
          "billing_schedule"
        ]
      },
      "request-update_brand": {
        "type": "object",
        "description": "Request payload for /api/v2/brands/update_brand",
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique identifier of the brand"
          },
          "name": {
            "type": "string",
            "maxLength": 100,
            "description": "Brand name"
          },
          "logo_file_id": {
            "type": "string",
            "description": "File ID for the brand logo"
          },
          "signature_file_id": {
            "type": "string",
            "description": "File ID for the brand signature"
          },
          "header_line_1": {
            "type": "string",
            "description": "Header line 1"
          },
          "header_line_2": {
            "type": "string",
            "description": "Header line 2"
          },
          "header_line_3": {
            "type": "string",
            "description": "Header line 3"
          },
          "header_line_4": {
            "type": "string",
            "description": "Header line 4"
          },
          "active": {
            "type": "boolean",
            "description": "Whether the brand is active"
          }
        },
        "required": [
          "id"
        ]
      },
      "request-update_calculated_field": {
        "type": "object",
        "description": "Request payload for /api/v2/document_templates/update_calculated_field",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the field to update"
          },
          "field_name": {
            "type": "string",
            "pattern": "^[a-zA-Z_][a-zA-Z0-9_]*$",
            "description": "New field name"
          },
          "expression": {
            "type": "string",
            "description": "New expression"
          },
          "path": {
            "type": "string",
            "description": "New path"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "New description"
          }
        },
        "required": [
          "id"
        ]
      },
      "request-update_carbone_custom_deliverable": {
        "type": "object",
        "description": "Request payload for /api/v2/settings/update_carbone_custom_deliverable. The request body IS the deliverable object directly (unpack_payload=False) - not wrapped in a 'deliverable' key.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of the deliverable to update."
          },
          "location_id": {
            "type": "string",
            "format": "uuid"
          },
          "policy_type_name": {
            "type": "string"
          },
          "custom_name": {
            "type": "string",
            "description": "The deliverable name.",
            "minLength": 1,
            "maxLength": 255
          },
          "overwrite_stock": {
            "type": "boolean"
          },
          "carbone_template_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "source_file_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "draft_carbone_template_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "draft_source_file_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_preview_entity_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "print_on_initial_dec": {
            "type": "boolean"
          },
          "print_on_renewal_dec": {
            "type": "boolean"
          },
          "print_on_non_autopay": {
            "type": "boolean"
          },
          "allow_britequote_creation": {
            "type": "boolean"
          },
          "module": {
            "type": "string",
            "enum": [
              "claims",
              "policies"
            ]
          },
          "generated_per": {
            "type": "string"
          },
          "use_dynamic_fields": {
            "type": "boolean"
          },
          "dynamic_fields": {
            "type": "array",
            "description": "Optional list of dynamic fields to create/update on this template. Validated (and, for a dropdown field, its option_source-specific requirements) before any mutation - including deleted_dynamic_field_ids' deletions - is applied.",
            "items": {
              "$ref": "#/components/schemas/dynamic_field-def"
            }
          },
          "deleted_dynamic_field_ids": {
            "type": "array",
            "description": "Optional list of dynamic field IDs to delete.",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        },
        "required": [
          "id"
        ]
      },
      "request-update_claim_estimation": {
        "type": "object",
        "description": "Request Schema for /api/v2/claim_estimations/update_claim_estimation",
        "properties": {
          "claim_estimation": {
            "$ref": "#/components/schemas/claim_estimation-def"
          }
        },
        "required": [
          "claim_estimation"
        ]
      },
      "request-update_copilot_skill": {
        "type": "object",
        "description": "Request schema for /api/v2/copilot_skills/update_copilot_skill",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the skill to update"
          },
          "name": {
            "type": "string",
            "maxLength": 120,
            "description": "New display name"
          },
          "description": {
            "type": "string",
            "maxLength": 500,
            "description": "New short summary"
          },
          "body": {
            "type": "string",
            "maxLength": 20000,
            "description": "New markdown instruction body"
          },
          "status": {
            "type": "string",
            "enum": [
              "DRAFT",
              "ACTIVE",
              "ARCHIVED"
            ],
            "description": "New lifecycle status"
          },
          "applicable_copilots": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9_-]{0,48}$"
            },
            "description": "New copilot identifiers list. Empty means all copilots."
          }
        },
        "required": [
          "id"
        ]
      },
      "request-update_custom_error_code": {
        "type": "object",
        "description": "Request schema for /api/v2/configurations/update_custom_error_code",
        "properties": {
          "custom_error_code": {
            "type": "object",
            "description": "The custom error code to update",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "The error code ID to update"
              },
              "module": {
                "type": "string",
                "description": "The module this error code belongs to",
                "enum": [
                  "stp"
                ]
              },
              "code": {
                "type": "string",
                "minLength": 1,
                "maxLength": 10,
                "description": "The new error code (max 10 characters)"
              },
              "description": {
                "type": "string",
                "minLength": 1,
                "maxLength": 2000,
                "description": "The new error description (max 2000 characters)"
              }
            },
            "required": [
              "id"
            ]
          }
        },
        "required": [
          "custom_error_code"
        ]
      },
      "request-update_dispute": {
        "type": "object",
        "description": "Request Schema for /api/v2/disputes/update_dispute. Only the dispute fields supplied are modified; dispute_dates and dispute_settlements arrays, when present, fully replace the existing rows for the dispute (entries without an `id` are inserted, entries with an `id` are updated, and any persisted entries not in the array are soft-deleted).",
        "properties": {
          "dispute": {
            "allOf": [
              {
                "$ref": "#/components/schemas/dispute-def"
              },
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "ID of the dispute to update"
                  }
                },
                "required": [
                  "id"
                ]
              }
            ]
          }
        },
        "required": [
          "dispute"
        ]
      },
      "request-update_exported_check_details": {
        "description": "Request schema for /api/v2/disbursements/update_exported_check_details",
        "type": "object",
        "properties": {
          "records": {
            "type": "array",
            "minItems": 1,
            "maxItems": 2000,
            "description": "Batch of partial updates for already-exported outbound checks. Mixed payment types are allowed. Duplicate ids are rejected. Omitted fields are left alone; explicit null is treated as omit. Replacing an already-set check_number, check_date, or cleared_date requires force_update on that record. Voided, canceled, rejected, or transferred return premiums, voided claim payments, claim recoveries, untyped claims, and electronic, net, or negative commissions are rejected.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Return premium, claim payment, or commission payment id."
                },
                "check_number": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 2147483647
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Number printed on the outbound check. Integer from 1 to 2147483647."
                },
                "check_date": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Date printed on the outbound check. YYYY-MM-DD, YYYY-MM-DD HH:MM:SS, or YYYY-MM-DDTHH:MM:SS."
                },
                "cleared_date": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Date the outbound check cleared the bank. YYYY-MM-DD, YYYY-MM-DD HH:MM:SS, or YYYY-MM-DDTHH:MM:SS."
                },
                "force_update": {
                  "type": "boolean",
                  "description": "Required on this record to overwrite check_number, check_date, or cleared_date when that field is already set. Must be a JSON boolean when present; omit to default false; null is invalid. Does not override not-exported, voided, canceled, rejected, transferred, electronic-payment, net-commission, negative-commission, or claim-recovery rejections. A forced overwrite writes a system note on the related policy, claim, or payee contact."
                }
              },
              "required": [
                "id"
              ]
            }
          }
        },
        "required": [
          "records"
        ]
      },
      "request-update_exposure": {
        "description": "Request payload for /api/v2/claim_exposures/update_exposure - Update claimant, coverage, or loss/risk on an exposure",
        "type": "object",
        "properties": {
          "api_key": {
            "type": "string",
            "description": "API key for authentication"
          },
          "exposure_details": {
            "type": "object",
            "description": "Exposure update fields",
            "properties": {
              "exposure_id": {
                "type": "string",
                "format": "uuid",
                "description": "ID of the exposure to update"
              },
              "claimant_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "Claimant contact ID, or null to clear"
              },
              "coverage_id": {
                "type": "string",
                "format": "uuid",
                "description": "Coverage (PropertyItem) ID"
              },
              "loss_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "Loss (ClaimProperty or Injury) ID, or null to clear"
              },
              "loss_type": {
                "description": "Type of loss when loss_id is set",
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "type": "string",
                    "enum": [
                      "vehicle",
                      "property",
                      "injury"
                    ]
                  }
                ]
              }
            },
            "required": [
              "exposure_id"
            ]
          }
        },
        "required": [
          "exposure_details"
        ]
      },
      "request-update_form_on_policy_type": {
        "description": "Request payload for /api/v2/lines/update_form_on_policy_type.",
        "type": "object",
        "properties": {
          "form_id": {
            "type": "string",
            "format": "uuid",
            "description": "The x_policy_types_docs row's own id (NOT File.id) - see the 'form_id' field returned by list_forms_for_policy_type / attach_form_to_policy_type's metadata."
          },
          "title": {
            "type": [
              "string",
              "null"
            ],
            "description": "New file name for the File record. Left unchanged when omitted. Null is accepted and also leaves it unchanged."
          },
          "metadata": {
            "type": [
              "object",
              "null"
            ],
            "description": "Print-flag metadata. PARTIAL update (merge, not replace): only the keys present in the request are written, and every field omitted here keeps its stored value. To clear a field, send it explicitly - null for form_code/edition_number/description/mortgagee_types, false for the flags - which is honored, not silently ignored. Omitting this object entirely, or sending {}, leaves the metadata row untouched.",
            "properties": {
              "form_code": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Nullable: send null to clear."
              },
              "edition_number": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Nullable: send null to clear."
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Nullable: send null to clear."
              },
              "suppress_printing": {
                "type": "boolean",
                "description": "Not nullable: send false to clear."
              },
              "always_print_on_renewal": {
                "type": "boolean",
                "description": "Not nullable: send false to clear."
              },
              "always_print_on_endorsement": {
                "type": "boolean",
                "description": "Not nullable: send false to clear."
              },
              "mortgagee_types": {
                "type": [
                  "array",
                  "null"
                ],
                "items": {
                  "type": "string"
                },
                "description": "Nullable: send null to clear."
              }
            }
          }
        },
        "required": [
          "form_id"
        ]
      },
      "request-update_form_on_policy_type_item": {
        "description": "Request payload for /api/v2/lines/update_form_on_policy_type_item.",
        "type": "object",
        "properties": {
          "form_id": {
            "type": "string",
            "format": "uuid",
            "description": "The x_policy_type_items_docs row's own id (NOT File.id)."
          },
          "title": {
            "type": [
              "string",
              "null"
            ],
            "description": "New file name for the File record. Left unchanged when omitted. Null is accepted and also leaves it unchanged."
          },
          "metadata": {
            "type": [
              "object",
              "null"
            ],
            "description": "Print-flag metadata. PARTIAL update (merge, not replace): only the keys present in the request are written, and every field omitted here keeps its stored value. To clear a field, send it explicitly - null for form_code/edition_number/description/conditional_values/mortgagee_types/ntp_start_date/ntp_end_date, false for the flags, \"gt\" for conditional_premium_select - which is honored, not silently ignored. Omitting this object entirely, or sending {}, leaves the metadata row untouched.",
            "properties": {
              "form_code": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Nullable: send null to clear."
              },
              "edition_number": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Nullable: send null to clear."
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Nullable: send null to clear."
              },
              "suppress_printing": {
                "type": "boolean",
                "description": "Not nullable: send false to clear."
              },
              "always_print_on_renewal": {
                "type": "boolean",
                "description": "Not nullable: send false to clear."
              },
              "always_print_on_endorsement": {
                "type": "boolean",
                "description": "Not nullable: send false to clear."
              },
              "mortgagee_types": {
                "type": [
                  "array",
                  "null"
                ],
                "items": {
                  "type": "string"
                },
                "description": "Nullable: send null to clear."
              },
              "conditional_print": {
                "type": "boolean",
                "description": "Not nullable: send false to clear."
              },
              "conditional_values": {
                "type": [
                  "object",
                  "null"
                ],
                "description": "Nullable: send null to clear."
              },
              "notice_to_policy_holder": {
                "type": "boolean",
                "description": "Not nullable: send false to clear."
              },
              "ntp_start_date": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date",
                "description": "Nullable: send null to clear."
              },
              "ntp_end_date": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date",
                "description": "Nullable: send null to clear."
              },
              "conditional_premium_print": {
                "type": "boolean",
                "description": "Not nullable: send false to clear."
              },
              "conditional_premium_select": {
                "type": "string",
                "enum": [
                  "gt",
                  "gte",
                  "eq",
                  "neq",
                  "lte",
                  "lt"
                ],
                "description": "Not nullable: send \"gt\" to restore the default."
              }
            }
          }
        },
        "required": [
          "form_id"
        ]
      },
      "request-update_insight": {
        "type": "object",
        "description": "Request payload for /api/v2/insights/update_insight. Only title, description, product_area, and selector may change; reference_type, reference_id, insight_type, and insight_severity are immutable after create.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the insight to update"
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120,
            "description": "Short headline"
          },
          "description": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4000,
            "description": "Adjuster-readable narrative"
          },
          "product_area": {
            "type": [
              "string",
              "null"
            ],
            "description": "Product-area placement; null clears placement (reference-wide). Valid values depend on the insight's reference_type. CLAIM: INFORMATION, PARTIES, VEHICLES, DAMAGED_PROPERTIES, INJURIES, ESTIMATIONS, ACCOUNTING, DISPUTES, NOTES, ATTACHMENTS. POLICY: INFORMATION, UNDERWRITING, SUBJECTIVITIES, CONTACTS, PROPERTY, VEHICLES, DRIVERS, COVERAGES, RATING, NOTES, ATTACHMENTS, RENEWAL."
          },
          "selector": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional card-level deep-link within product_area. Requires a non-null product_area. CLAIM selectors are per product area (e.g. INFORMATION: CLAIM_INFORMATION, POLICY_INFORMATION, ADDITIONAL_INFORMATION, CLAIM_ASSIGNMENTS, CLAIMS_HISTORY, LOSS_ADDRESS, CATASTROPHE, REINSURANCE_CONTRACTS, DATES, REPORTS, PHOTOS; ACCOUNTING: ACCOUNTING_OVERVIEW, RECOVERIES, EXPOSURE_INFORMATION; PARTIES: PARTIES_LIST; VEHICLES: VEHICLES_LIST; DAMAGED_PROPERTIES: DAMAGED_PROPERTIES_LIST; INJURIES: INJURIES_LIST; ESTIMATIONS: ESTIMATIONS_LIST; DISPUTES: DISPUTES_LIST, LITIGATION_DETAILS; NOTES: NOTES_LIST; ATTACHMENTS: ATTACHMENTS_LIST). POLICY selectors are per product area (INFORMATION: EFFECTIVE_DATES, POLICY_STATUS, REVISION, PREMIUM_TOTALS; UNDERWRITING: STP_STATUS, UW_RULES, UW_QUESTIONS, UW_CONTACT; SUBJECTIVITIES: SUBJECTIVITIES_LIST, ESIGNATURE; CONTACTS: NAMED_INSURED, ADDITIONAL_INTERESTS, AGENT, PREMIUM_FINANCE, SURPLUS_LINE_PRODUCER, CONTACTS_SECTION; PROPERTY: PROPERTIES_LIST; VEHICLES: VEHICLES_LIST; DRIVERS: DRIVERS_LIST; COVERAGES: PRIMARY_EXPOSURES, POLICY_WIDE; RATING: PREMIUM_TOTALS, COMMISSION_RATE, CREDIT_SCORE; NOTES: NOTES_LIST; ATTACHMENTS: ATTACHMENTS_LIST; RENEWAL: RENEWAL_STATUS, POLICY_STATUS)."
          }
        },
        "required": [
          "id"
        ]
      },
      "request-update_payment": {
        "description": "Request payload for /api/v2/claim_exposures/update_payment",
        "type": "object",
        "properties": {
          "payment_details": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/claim_exposure_payment-def"
              }
            ],
            "description": "The payment object ClaimExposurePaymentModel"
          }
        },
        "required": [
          "payment_details"
        ]
      },
      "request-update_policy_type_claims_tab_visibility": {
        "description": "Request payload for /api/v2/lines/update_policy_type_claims_tab_visibility",
        "type": "object",
        "properties": {
          "policy_type_id": {
            "type": "string",
            "description": "Policy Type ID for updating claims tab visibility"
          },
          "code_value_type": {
            "type": "string",
            "description": "Claims tab visibility name"
          },
          "flagged": {
            "type": "boolean",
            "description": "Visibility value"
          }
        },
        "required": [
          "policy_type_id",
          "code_value_type",
          "flagged"
        ]
      },
      "request-update_quick_quote_template": {
        "type": "object",
        "description": "At least one field besides 'id' must be provided for update",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of the Quick Quote Template to update"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 250,
            "description": "The name of the Quick Quote Template"
          },
          "quote_template": {
            "type": "object",
            "description": "Quote-wide data containing coverage items",
            "properties": {
              "items": {
                "type": "array",
                "description": "List of coverage items",
                "items": {
                  "type": "object",
                  "description": "Coverage item definition",
                  "properties": {
                    "id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Coverage ID"
                    },
                    "name": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Coverage name"
                    },
                    "limit1": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Primary coverage limit"
                    },
                    "limit1_type": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Type of primary limit"
                    },
                    "limit2": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Secondary coverage limit"
                    },
                    "limit2_type": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Type of secondary limit"
                    },
                    "limit3": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Tertiary coverage limit"
                    },
                    "limit3_type": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Type of tertiary limit"
                    },
                    "deductible": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Coverage deductible amount"
                    },
                    "coverage_type_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Coverage type identifier"
                    }
                  }
                }
              }
            },
            "required": [
              "items"
            ]
          },
          "template_risk_values": {
            "type": "array",
            "description": "List of template risk default values",
            "items": {
              "type": "object",
              "description": "Template risk value definition",
              "properties": {
                "risk_type": {
                  "type": "string",
                  "description": "The type of risk this applies to"
                },
                "risk_defaults": {
                  "type": "object",
                  "description": "Default values for this risk type",
                  "additionalProperties": true
                }
              },
              "required": [
                "risk_type",
                "risk_defaults"
              ]
            }
          },
          "policy_type_ids": {
            "type": "array",
            "description": "List of policy type IDs to associate with this template",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        },
        "required": [
          "id"
        ]
      },
      "request-update_quote_details": {
        "description": "Request payload for /api/v2/policies/update_quote_details",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Revision id. One of id, external_system_reference, or property_id is required."
          },
          "external_system_reference": {
            "type": "string",
            "description": "Caller-side reference; alternative to id."
          },
          "property_id": {
            "type": "string",
            "format": "uuid",
            "description": "Property id. Derives the revision (via Property.revision_id) and scopes PropertyItem name resolution to this property. RevisionItem (policy-wide) name resolution is unaffected."
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Revision item or property item id. Required when a name resolves to multiple items (allow-multiple instances, or duplicate names across multiple sublines)."
                },
                "name": {
                  "type": "string",
                  "description": "Item name (line_item.name). Case-insensitive exact match wins; case-insensitive substring fallback is tried otherwise. Must resolve to exactly one item, or a warning is emitted and the entry is skipped."
                },
                "limit": {
                  "type": [
                    "number",
                    "string"
                  ]
                },
                "deductible": {
                  "type": [
                    "number",
                    "string"
                  ]
                },
                "questions": {
                  "type": "object",
                  "description": "Inputs to PATCH-merge onto the item's builder_obj. Each key is dynamically routed against the line item's definition: matches a Category go to builder_obj.categories (with overrideCategories updated); matches a userInput label go to builder_obj.userInputs; matches an item question label (exact or fragment) go to builder_obj.questions keyed by question UUID. Keys matching nothing produce a per-key warning; the rest of the call proceeds. Disallow values on List questions are STORED with a warning noting that bind will be blocked in that state."
                },
                "scheduledItem": {
                  "type": "array",
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "description": "List-of-lists for Scheduled Personal Property style items. When present, replaces the existing scheduledItem list (consistent with how the UI treats it); send an empty list to clear all scheduled rows."
                }
              }
            }
          },
          "underwriting_questions": {
            "type": "array",
            "description": "Revision-level UW questions, PATCH-merged into the existing list by questionId. Each entry takes questionId or questionText (case-insensitive substring of yes_no_question, scoped to this policy type's effective version) plus yesNoAnswer and optional explanation.",
            "items": {
              "type": "object",
              "properties": {
                "questionId": {
                  "type": "string",
                  "format": "uuid"
                },
                "questionText": {
                  "type": "string"
                },
                "yesNoAnswer": {
                  "type": "string",
                  "enum": [
                    "yes",
                    "no",
                    "none",
                    "Yes",
                    "No",
                    "None"
                  ]
                },
                "explanation": {
                  "type": "string"
                }
              },
              "required": [
                "yesNoAnswer"
              ]
            }
          },
          "rerate": {
            "type": "boolean",
            "default": false,
            "description": "When true, the revision is rated synchronously after updates are applied."
          },
          "run_uw_rules": {
            "type": "boolean",
            "default": false,
            "description": "When true, the UW rules engine is run after updates are applied. Useful for callers that want dynamic item mandatoriness recomputed on the new answers."
          }
        }
      },
      "request-update_rating_table": {
        "title": "UpdateRatingTableRequest",
        "type": "object",
        "description": "Request schema for /api/v2/lines/update_rating_table",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the existing rating table to update"
          },
          "file_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the new uploaded file that will replace the existing rating table data"
          }
        },
        "required": [
          "id",
          "file_id"
        ]
      },
      "request-update_revision_billing_schedule": {
        "type": "object",
        "description": "Request schema for POST /api/v2/coverages/update_revision_billing_schedule. Stages a billing-schedule change on an open revision and, for rating-driven policy types, records the admin's preserve/regenerate choice to apply at commit (BC-22886). The change is not applied to the policy term until the revision is committed.",
        "properties": {
          "policy_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the policy whose current term's revision is being updated."
          },
          "billing_schedule_id": {
            "type": "string",
            "format": "uuid",
            "description": "Billing schedule to stage on the revision."
          },
          "revision_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the open (uncommitted) revision to update."
          },
          "regenerate_installments": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Optional preserve/regenerate choice for already-sent invoices, persisted to revisions.regenerateInstallmentsOnCommit and consumed at commit by build_installments (BC-22886). true = regenerate, false = preserve, omitted/null = no decision recorded (treated as preserve at commit via bool(None) == False). Only meaningful on rating-driven policy types (policy_type.billing_schedule_in_rating = True); on the non-rating branch it is ignored and the column is left NULL."
          }
        },
        "required": [
          "policy_id",
          "billing_schedule_id",
          "revision_id"
        ]
      },
      "request-update_rule": {
        "type": "object",
        "description": "Request payload for /api/v2/rules/update_rule. Triggers and effects present in the database but absent from the payload are automatically soft-deleted.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the rule to update"
          },
          "policy_type_id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the policy type"
          },
          "name": {
            "type": "string",
            "maxLength": 100,
            "description": "Rule name"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Rule description"
          },
          "category": {
            "type": "string",
            "description": "Rule category (policy, property, vehicle, driver, claim, etc.)"
          },
          "module": {
            "type": "string",
            "description": "Module the rule applies to (all, bc, bq, events, stp)"
          },
          "severity": {
            "type": [
              "string",
              "null"
            ],
            "description": "Severity level for STP rules (critical, high, medium, low)"
          },
          "waiver_behavior": {
            "type": [
              "string",
              "null"
            ],
            "description": "Waiver behavior for STP rules (run_always, waived_for_x_terms)"
          },
          "waiver_terms": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Number of terms for waiver (when waiver_behavior is waived_for_x_terms)"
          },
          "enabled_for_renewal": {
            "type": "boolean",
            "description": "Whether rule runs on renewals"
          },
          "enabled_for_endorsement": {
            "type": "boolean",
            "description": "Whether rule runs on endorsements"
          },
          "enabled_for_new_business": {
            "type": "boolean",
            "description": "Whether rule runs on new business"
          },
          "sort_order": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Rule sort order"
          },
          "valid_from_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "Start date for rule validity (YYYY-MM-DD)"
          },
          "valid_to_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "End date for rule validity (YYYY-MM-DD)"
          },
          "properties_affected": {
            "type": [
              "string",
              "null"
            ],
            "description": "Which properties are affected (null, primary, non-primary)"
          },
          "exception_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "Exception type (include, exclude)"
          },
          "exception_agencies": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "List of agency IDs for exceptions"
          },
          "event": {
            "type": [
              "string",
              "null"
            ],
            "description": "Event type for events module rules"
          },
          "triggers": {
            "type": "array",
            "description": "Array of rule triggers. Include id to update existing triggers, omit id for new triggers. Existing triggers not included in this array are automatically soft-deleted.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "UUID of existing trigger (omit for new triggers)"
                },
                "policy_type_item_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "UUID of the policy type item"
                },
                "trigger_type": {
                  "type": "string",
                  "description": "Trigger type (category, question, exists, advanced, eval, catastrophe, geography, loss-cause)"
                },
                "label_name": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Label name for the trigger"
                },
                "value": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "items": {
                    "type": "string"
                  },
                  "description": "Trigger values"
                }
              },
              "required": [
                "policy_type_item_id",
                "trigger_type"
              ]
            }
          },
          "effects": {
            "type": "array",
            "description": "Array of rule effects. Include id to update existing effects, omit id for new effects. Existing effects not included in this array are automatically soft-deleted.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "UUID of existing effect (omit for new effects)"
                },
                "target_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid",
                  "description": "UUID of the target policy type item, sub line, or subjectivity definition. Used by most effects to identify the item they act on. For 'Add Subjectivity' effects, this is the subjectivity definition ID."
                },
                "action": {
                  "type": "string",
                  "description": "Effect action (Add Line Item, Remove Line Item, Set Category Option, Set Field Value, Set STP Error, Add Subjectivity, etc.)"
                },
                "label_name": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Label or category name for the effect. Required for category/deductible/field effects."
                },
                "value": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Effect value. Usage varies by action: category option name for Set/Remove Category Option, code string for Set Field Value, error message for Validation Error, deliverable ID for Generate Deliverable, integration instance ID for Attach Property Valuation."
                },
                "mandatory": {
                  "type": "boolean",
                  "default": false,
                  "description": "Whether the effect creates a mandatory coverage"
                },
                "hard_reverse": {
                  "type": "boolean",
                  "default": false,
                  "description": "Whether to hard reverse the effect when conditions are no longer met"
                },
                "hide_category": {
                  "type": "boolean",
                  "default": false,
                  "description": "Whether to hide the category in the UI (optional for Set Category Option)"
                },
                "popup_message": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Message text for 'Add Popup Message' or 'Block Quote' effects"
                },
                "custom_error_code_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid",
                  "description": "UUID of the custom error code. Required for 'Set STP Error' effects."
                }
              },
              "required": [
                "action"
              ]
            }
          }
        },
        "required": [
          "id",
          "policy_type_id",
          "name",
          "category",
          "module"
        ]
      },
      "request-update_selection": {
        "type": "object",
        "title": "Update Credit Score Selection Request",
        "description": "Request to update the credit score selection for a revision",
        "properties": {
          "revision_id": {
            "type": "string",
            "description": "The ID of the revision to update"
          },
          "selected_option": {
            "type": "string",
            "enum": [
              "historical",
              "calculated"
            ],
            "description": "The selected credit score option type"
          }
        },
        "required": [
          "revision_id",
          "selected_option"
        ]
      },
      "request-update_task_definition": {
        "type": "object",
        "description": "Request schema for /api/v2/tasks/update_task_definition",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of the Task Definition to update"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 250,
            "description": "The name of the Task Definition"
          },
          "scope": {
            "type": "string",
            "enum": [
              "policy",
              "claim"
            ],
            "description": "The scope of the task definition (policy or claim)"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Description of the task definition"
          }
        },
        "required": [
          "id"
        ]
      },
      "request-update_watercraft": {
        "type": "object",
        "description": "Request Schema for /api/v2/watercrafts/update_watercraft",
        "properties": {
          "watercraft": {
            "allOf": [
              {
                "$ref": "#/components/schemas/watercraft-def"
              },
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Unique identifier for the watercraft to update"
                  }
                },
                "required": [
                  "id"
                ]
              }
            ]
          },
          "skip_rules": {
            "type": "boolean",
            "default": false,
            "description": "Whether to skip business rules validation"
          }
        },
        "required": [
          "watercraft"
        ]
      },
      "request-user_has_permission": {
        "description": "Request payload for /api/v2/permissions/user_has_permission",
        "type": "object",
        "properties": {
          "permission": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "cognito_username": {
            "type": "string"
          },
          "access_level": {
            "type": "string",
            "default": "rw"
          }
        },
        "required": [
          "permission"
        ]
      },
      "request-validate_rule": {
        "type": "object",
        "description": "Request payload for /api/v2/rules/validate_rule. Validates a rule without creating it.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of existing rule (optional, for update validation)"
          },
          "policy_type_id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the policy type this rule belongs to"
          },
          "name": {
            "type": "string",
            "description": "Name of the rule"
          },
          "category": {
            "type": "string",
            "description": "Rule category (e.g., 'policy', 'property', 'vehicle', 'driver')"
          },
          "module": {
            "type": "string",
            "description": "Rule module (e.g., 'bc', 'bq', 'stp', 'events')"
          },
          "severity": {
            "type": "string",
            "description": "Severity level for STP rules (e.g., 'critical', 'high', 'medium', 'low')"
          },
          "description": {
            "type": "string",
            "description": "Description of the rule"
          },
          "enabled_for_new_business": {
            "type": "boolean",
            "description": "Whether the rule is enabled for new business"
          },
          "enabled_for_renewal": {
            "type": "boolean",
            "description": "Whether the rule is enabled for renewals"
          },
          "enabled_for_endorsement": {
            "type": "boolean",
            "description": "Whether the rule is enabled for endorsements"
          },
          "valid_from_date": {
            "type": "string",
            "format": "date",
            "description": "Start date for rule validity"
          },
          "valid_to_date": {
            "type": "string",
            "format": "date",
            "description": "End date for rule validity"
          },
          "triggers": {
            "type": "array",
            "description": "List of rule triggers",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "policy_type_item_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "trigger_type": {
                  "type": "string"
                },
                "label_name": {
                  "type": "string"
                },
                "value": {
                  "type": "array",
                  "items": {}
                }
              }
            }
          },
          "effects": {
            "type": "array",
            "description": "List of rule effects",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "target_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "action": {
                  "type": "string"
                },
                "label_name": {
                  "type": "string"
                },
                "value": {
                  "type": "string"
                }
              }
            }
          }
        },
        "required": [
          "policy_type_id",
          "name",
          "category",
          "module"
        ]
      },
      "request-validate_uploaded_files": {
        "type": "object",
        "description": "Request schema for /api/v2/imports/validate_uploaded_files",
        "properties": {}
      },
      "request-vehicle_in_force_status": {
        "type": "object",
        "description": "Request payload for /api/v2/policies/vehicle_in_force_status",
        "properties": {
          "vehicle_vin": {
            "type": "string",
            "minLength": 1,
            "description": "Vehicle Identification Number to resolve; matched case/whitespace-insensitively"
          },
          "as_of_date": {
            "type": "string",
            "format": "date",
            "description": "The YYYY-MM-DD date coverage is checked for; any in-term date is supported"
          },
          "policy_type_ids": {
            "type": [
              "array",
              "null"
            ],
            "minItems": 1,
            "items": {
              "type": "string",
              "minLength": 1
            },
            "description": "Optional hard filter: only these policy types are considered. Omitted/null returns all policy types and the caller filters on policy_type_id."
          }
        },
        "required": [
          "vehicle_vin",
          "as_of_date"
        ]
      },
      "request-vehicle_prefill_fallback": {
        "type": "object",
        "description": "Request Schema for /api/v2/vehicles/vehicle_prefill_fallback",
        "properties": {
          "quote_id": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of the quote to determine location and renewal status"
          },
          "vehicle_year": {
            "type": "integer",
            "description": "The year of the vehicle"
          },
          "cost_new": {
            "type": "number",
            "format": "decimal",
            "description": "The cost of the vehicle when new (decimal with 2 decimal places)"
          },
          "api_key": {
            "type": "string",
            "description": "API key for authentication"
          }
        },
        "required": [
          "quote_id",
          "vehicle_year",
          "cost_new",
          "api_key"
        ]
      },
      "request-workflows_list_workflows": {
        "type": "object",
        "description": "Request payload for /api/v2/workflows/list_workflows",
        "properties": {}
      },
      "request-workflows_publish_workflow": {
        "type": "object",
        "description": "Request payload for /api/v2/workflows/publish_workflow",
        "properties": {
          "id": {
            "type": "string",
            "description": "Draft workflow ID"
          }
        },
        "required": [
          "id"
        ]
      },
      "request-write_off_agency_commissions": {
        "type": "object",
        "description": "Request payload for /api/v2/commissions/write_off_agency_commissions. Writes off all delayed negative commission accounting entries for an entire agency.",
        "properties": {
          "agency_id": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of the agency to write off all negative entries for"
          },
          "write_off_reason": {
            "type": "string",
            "enum": [
              "collected_from_agency",
              "forgiven"
            ],
            "description": "The reason for writing off the commissions. 'collected_from_agency' indicates the balance was collected from the agency. 'forgiven' indicates the balance was written off/forgiven."
          },
          "why": {
            "type": "string",
            "description": "User-provided description/reason for the write-off. This is stored in the commission_accounting.why field."
          }
        },
        "required": [
          "agency_id",
          "write_off_reason",
          "why"
        ]
      },
      "response-activate_copilot_skill": {
        "type": "object",
        "description": "Response schema for /api/v2/copilot_skills/activate_copilot_skill",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "skill": {
                "$ref": "#/components/schemas/copilot_skill-def"
              }
            },
            "required": [
              "skill"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ],
            "description": "Any messages or errors related to the request"
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-add_brand": {
        "description": "Response payload for /api/v2/brands/add_brand",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "$ref": "#/components/schemas/brand-def"
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-add_contact_to_role": {
        "description": "Response payload for /api/v2/contacts/add_contact_to_role.",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "contact_id": {
                "type": "string",
                "format": "uuid"
              },
              "role_id": {
                "type": "string",
                "format": "uuid"
              },
              "role_name": {
                "type": "string"
              }
            }
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-add_recovery": {
        "description": "Response payload for /api/v2/claim_exposures/add_recovery.",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "amount": {
                "type": "number"
              },
              "category": {
                "type": "string"
              },
              "claim_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "date": {
                "type": "string",
                "format": "date"
              },
              "description": {
                "type": "string"
              },
              "exposure_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "reinsuranceContractContactId": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              }
            },
            "required": [
              "amount",
              "category",
              "claim_id",
              "date",
              "description",
              "exposure_id",
              "id",
              "reinsuranceContractContactId"
            ]
          }
        },
        "required": [
          "success",
          "messages",
          "data"
        ]
      },
      "response-add_recovery_reserve": {
        "description": "Response payload for /api/v2/claim_exposures/add_recovery_reserve.",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "claim_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "exposure_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "reinsurance_amount": {
                "type": "number"
              },
              "reinsurancelae_amount": {
                "type": "number"
              },
              "salvage_amount": {
                "type": "number"
              },
              "subrogation_amount": {
                "type": "number"
              },
              "transaction_date": {
                "type": "string",
                "format": "date"
              }
            },
            "required": [
              "claim_id",
              "exposure_id",
              "reinsurance_amount",
              "reinsurancelae_amount",
              "salvage_amount",
              "subrogation_amount",
              "transaction_date"
            ]
          }
        },
        "required": [
          "success",
          "messages",
          "data"
        ]
      },
      "response-add_template_to_policy_type": {
        "type": "object",
        "description": "Response schema for /api/v2/quick_quote_templates/add_template_to_policy_type",
        "properties": {
          "data": {
            "type": "object",
            "description": "The created association between template and policy type",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "Unique identifier for the association"
              },
              "policy_type_id": {
                "type": "string",
                "format": "uuid",
                "description": "The ID of the policy type"
              },
              "quick_quote_template_id": {
                "type": "string",
                "format": "uuid",
                "description": "The ID of the Quick Quote Template"
              }
            },
            "required": [
              "id",
              "policy_type_id",
              "quick_quote_template_id"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "string",
                    "description": "Base error message"
                  }
                },
                "additionalProperties": {
                  "type": "string"
                },
                "description": "Any error messages related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-agents_agent_config": {
        "type": "object",
        "description": "Response schema for agents/agent_config \u2014 runtime UI configuration for the agent.",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "history_enabled": {
                "type": "boolean",
                "description": "Whether the chat-history UI should be surfaced. True only when the agent records turns (use_memory) AND has durable, DB-backed storage active (ai_db_available). Fails open on an unreachable agent."
              },
              "jobs_enabled": {
                "type": "boolean",
                "description": "Whether the Jobs/Ingestion UI should be surfaced. Reflects the agent's JOBS_ENABLED (async job routes mounted on the pod) so clients never surface entry points that would 404. Fails open on an unreachable agent."
              }
            },
            "required": [
              "history_enabled",
              "jobs_enabled"
            ]
          }
        }
      },
      "response-agents_agent_create_job": {
        "type": "object",
        "description": "Response schema for agents/agent_create_job. The `data` object is the full AIAgentJobModel serialization.",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "job_id": {
                "type": "string",
                "format": "uuid",
                "description": "Unique job identifier."
              },
              "job_name": {
                "type": "string",
                "description": "Type of job."
              },
              "agent_name": {
                "type": "string",
                "description": "Internal agent name that will execute the job."
              },
              "status": {
                "type": "string",
                "enum": [
                  "pending",
                  "running",
                  "paused",
                  "completed",
                  "failed"
                ],
                "description": "Current job status."
              },
              "prompt": {
                "type": "string",
                "description": "User instructions."
              },
              "context": {
                "type": "object",
                "description": "Additional context parameters."
              },
              "files": {
                "type": "array",
                "description": "File attachments submitted with the job (empty array when none).",
                "items": {
                  "type": "object",
                  "properties": {
                    "filename": {
                      "type": "string"
                    },
                    "content": {
                      "type": "string",
                      "description": "Base64-encoded file content."
                    },
                    "content_type": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "filename",
                    "content",
                    "content_type"
                  ]
                }
              },
              "required_input": {
                "type": "object",
                "nullable": true,
                "description": "Required input when job is paused (null otherwise).",
                "properties": {
                  "input_type": {
                    "type": "string",
                    "enum": [
                      "form_selection",
                      "ambiguity_resolution",
                      "missing_data",
                      "free_text"
                    ],
                    "description": "Type of input required."
                  },
                  "prompt": {
                    "type": "string",
                    "description": "Human-readable question for the user."
                  },
                  "message": {
                    "type": "string",
                    "nullable": true,
                    "description": "Optional supplementary message."
                  },
                  "options": {
                    "type": "array",
                    "description": "Available choices (form_selection).",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "label"
                      ]
                    }
                  },
                  "schema": {
                    "type": "object",
                    "nullable": true,
                    "description": "JSON schema for freeform input validation."
                  }
                }
              },
              "current_step": {
                "type": "string",
                "nullable": true,
                "description": "Name of the agent step currently executing (null when not set)."
              },
              "result": {
                "type": "object",
                "nullable": true,
                "description": "Job output (null until completed)."
              },
              "error": {
                "type": "string",
                "nullable": true,
                "description": "Error message (null unless failed)."
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "Job creation timestamp."
              },
              "updated_at": {
                "type": "string",
                "format": "date-time",
                "description": "Last update timestamp."
              }
            },
            "required": [
              "job_id",
              "job_name",
              "agent_name",
              "status"
            ]
          }
        }
      },
      "response-agents_agent_delete_session": {
        "type": "object",
        "description": "Response schema for agents/agent_delete_session \u2014 pass-through of the agent service's delete confirmation.",
        "properties": {
          "data": {
            "type": "object",
            "description": "Delete confirmation payload from the agent service.",
            "properties": {
              "session_id": {
                "type": "string",
                "description": "The session that was deleted."
              },
              "deleted": {
                "type": "boolean",
                "description": "True when the session was removed."
              },
              "message": {
                "type": "string",
                "description": "Optional human-readable status message."
              }
            },
            "additionalProperties": true
          }
        }
      },
      "response-agents_agent_get_job": {
        "type": "object",
        "description": "Response schema for agents/agent_get_job. When the job is not found the handler returns None, which the @api_request wrapper serializes as an empty array (`data: []`).",
        "properties": {
          "data": {
            "type": [
              "object",
              "array"
            ],
            "description": "The full AIAgentJobModel object when the job is found, or an empty array `[]` when it is not.",
            "items": {
              "description": "Not-found responses serialize as an empty array, so this never holds items."
            },
            "properties": {
              "job_id": {
                "type": "string",
                "format": "uuid",
                "description": "Unique job identifier."
              },
              "job_name": {
                "type": "string",
                "description": "Type of job."
              },
              "agent_name": {
                "type": "string",
                "description": "Internal agent name executing the job."
              },
              "status": {
                "type": "string",
                "enum": [
                  "pending",
                  "running",
                  "paused",
                  "completed",
                  "failed"
                ],
                "description": "Current job status."
              },
              "prompt": {
                "type": "string",
                "description": "User instructions."
              },
              "context": {
                "type": "object",
                "description": "Additional context parameters."
              },
              "files": {
                "type": "array",
                "description": "File attachments submitted with the job (empty array when none).",
                "items": {
                  "type": "object",
                  "properties": {
                    "filename": {
                      "type": "string"
                    },
                    "content": {
                      "type": "string",
                      "description": "Base64-encoded file content."
                    },
                    "content_type": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "filename",
                    "content",
                    "content_type"
                  ]
                }
              },
              "required_input": {
                "type": "object",
                "nullable": true,
                "description": "Required input when job is paused (null otherwise).",
                "properties": {
                  "input_type": {
                    "type": "string",
                    "enum": [
                      "form_selection",
                      "ambiguity_resolution",
                      "missing_data",
                      "free_text"
                    ],
                    "description": "Type of input required."
                  },
                  "prompt": {
                    "type": "string",
                    "description": "Human-readable question for the user."
                  },
                  "message": {
                    "type": "string",
                    "nullable": true,
                    "description": "Optional supplementary message."
                  },
                  "options": {
                    "type": "array",
                    "description": "Available choices.",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Unique identifier for this option."
                        },
                        "label": {
                          "type": "string",
                          "description": "Display label."
                        },
                        "description": {
                          "type": "string",
                          "description": "Additional details."
                        }
                      },
                      "required": [
                        "id",
                        "label"
                      ]
                    }
                  },
                  "schema": {
                    "type": "object",
                    "nullable": true,
                    "description": "JSON schema for freeform input validation."
                  }
                }
              },
              "current_step": {
                "type": "string",
                "nullable": true,
                "description": "Name of the agent step currently executing (null when not set)."
              },
              "result": {
                "type": "object",
                "nullable": true,
                "description": "Job output (null until completed)."
              },
              "error": {
                "type": "string",
                "nullable": true,
                "description": "Error message (null unless failed)."
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "Job creation timestamp."
              },
              "updated_at": {
                "type": "string",
                "format": "date-time",
                "description": "Last update timestamp."
              }
            },
            "required": [
              "job_id",
              "job_name",
              "agent_name",
              "status"
            ]
          }
        }
      },
      "response-agents_agent_list_jobs": {
        "type": "object",
        "description": "Response schema for agents/agent_list_jobs.",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "job_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Unique job identifier."
                },
                "job_name": {
                  "type": "string",
                  "description": "Type of job."
                },
                "agent_name": {
                  "type": "string",
                  "description": "Internal agent name executing the job."
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "pending",
                    "running",
                    "paused",
                    "completed",
                    "failed"
                  ],
                  "description": "Current job status."
                },
                "prompt": {
                  "type": "string",
                  "nullable": true,
                  "description": "User instructions submitted with the job."
                },
                "context": {
                  "type": "object",
                  "nullable": true,
                  "description": "Additional context parameters."
                },
                "current_step": {
                  "type": "string",
                  "nullable": true,
                  "description": "Name of the agent step currently executing (null when not set)."
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Job creation timestamp."
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Last update timestamp."
                }
              },
              "required": [
                "job_id",
                "job_name",
                "agent_name",
                "status"
              ]
            }
          }
        }
      },
      "response-agents_agent_resume_job": {
        "type": "object",
        "description": "Response schema for agents/agent_resume_job. The `data` object is the full AIAgentJobModel serialization after the resume operation.",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "job_id": {
                "type": "string",
                "format": "uuid",
                "description": "Unique job identifier."
              },
              "job_name": {
                "type": "string",
                "description": "Type of job."
              },
              "agent_name": {
                "type": "string",
                "description": "Internal agent name executing the job."
              },
              "status": {
                "type": "string",
                "enum": [
                  "pending",
                  "running",
                  "paused",
                  "completed",
                  "failed"
                ],
                "description": "Current job status (typically 'running' after resume)."
              },
              "prompt": {
                "type": "string",
                "description": "User instructions."
              },
              "context": {
                "type": "object",
                "description": "Additional context parameters."
              },
              "files": {
                "type": "array",
                "description": "File attachments submitted with the job (empty array when none).",
                "items": {
                  "type": "object",
                  "properties": {
                    "filename": {
                      "type": "string"
                    },
                    "content": {
                      "type": "string",
                      "description": "Base64-encoded file content."
                    },
                    "content_type": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "filename",
                    "content",
                    "content_type"
                  ]
                }
              },
              "required_input": {
                "type": "object",
                "nullable": true,
                "description": "Required input when job is paused again (null otherwise).",
                "properties": {
                  "input_type": {
                    "type": "string",
                    "enum": [
                      "form_selection",
                      "ambiguity_resolution",
                      "missing_data",
                      "free_text"
                    ],
                    "description": "Type of input required."
                  },
                  "prompt": {
                    "type": "string",
                    "description": "Human-readable question for the user."
                  },
                  "message": {
                    "type": "string",
                    "nullable": true,
                    "description": "Optional supplementary message."
                  },
                  "options": {
                    "type": "array",
                    "description": "Available choices (form_selection).",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "label"
                      ]
                    }
                  },
                  "schema": {
                    "type": "object",
                    "nullable": true,
                    "description": "JSON schema for freeform input validation."
                  }
                }
              },
              "current_step": {
                "type": "string",
                "nullable": true,
                "description": "Name of the agent step currently executing (null when not set)."
              },
              "result": {
                "type": "object",
                "nullable": true,
                "description": "Job output (null until completed)."
              },
              "error": {
                "type": "string",
                "nullable": true,
                "description": "Error message (null unless failed)."
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "Job creation timestamp."
              },
              "updated_at": {
                "type": "string",
                "format": "date-time",
                "description": "Last update timestamp."
              }
            },
            "required": [
              "job_id",
              "job_name",
              "agent_name",
              "status"
            ]
          }
        }
      },
      "response-agents_agent_session_messages": {
        "type": "object",
        "description": "Response schema for agents/agent_session_messages \u2014 pass-through of the agent service's message list. Either an array of messages or an object wrapping a `messages` array.",
        "properties": {
          "data": {
            "oneOf": [
              {
                "type": "array",
                "description": "Array of message objects (legacy shape).",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "human",
                        "ai",
                        "tool"
                      ],
                      "description": "Message origin. `human` = user, `ai` = assistant, `tool` = internal tool result (skipped by the UI)."
                    },
                    "content": {
                      "type": "string",
                      "description": "Message content. For tool messages this is a JSON-encoded result."
                    },
                    "tool_calls": {
                      "type": "array",
                      "description": "Tool calls invoked by the assistant (only present on `ai` messages).",
                      "items": {
                        "type": "object"
                      }
                    },
                    "tool_call_id": {
                      "type": "string",
                      "description": "Identifier linking a tool message back to its assistant tool_call."
                    }
                  },
                  "required": [
                    "type",
                    "content"
                  ]
                }
              },
              {
                "type": "object",
                "description": "Wrapped object with a messages array.",
                "properties": {
                  "session_id": {
                    "type": "string",
                    "description": "Session identifier."
                  },
                  "messages": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "human",
                            "ai",
                            "tool"
                          ],
                          "description": "Message origin. `human` = user, `ai` = assistant, `tool` = internal tool result (skipped by the UI)."
                        },
                        "content": {
                          "type": "string",
                          "description": "Message content. For tool messages this is a JSON-encoded result."
                        },
                        "tool_calls": {
                          "type": "array",
                          "description": "Tool calls invoked by the assistant (only present on `ai` messages).",
                          "items": {
                            "type": "object"
                          }
                        },
                        "tool_call_id": {
                          "type": "string",
                          "description": "Identifier linking a tool message back to its assistant tool_call."
                        }
                      },
                      "required": [
                        "type",
                        "content"
                      ]
                    }
                  },
                  "message_count": {
                    "type": "integer",
                    "minimum": 0
                  }
                }
              }
            ]
          }
        }
      },
      "response-agents_agent_sessions": {
        "type": "object",
        "description": "Response schema for agents/agent_sessions \u2014 list of conversation sessions for the logged-in user, sorted most-recent first.",
        "properties": {
          "data": {
            "type": "array",
            "description": "Conversation sessions for the logged-in user.",
            "items": {
              "type": "object",
              "properties": {
                "session_id": {
                  "type": "string",
                  "description": "Unique session identifier."
                },
                "title": {
                  "type": "string",
                  "description": "Auto-generated conversation title (~50 chars from the first user message)."
                },
                "agent_name": {
                  "type": "string",
                  "description": "Agent that owns the conversation.",
                  "example": "rules_agent"
                },
                "user_id": {
                  "type": "string",
                  "description": "BriteCore contact id of the conversation owner."
                },
                "message_count": {
                  "type": "integer",
                  "description": "Number of messages in the conversation.",
                  "minimum": 0
                },
                "last_updated": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Timestamp of the last message in the session."
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "When the session was created."
                }
              },
              "required": [
                "session_id"
              ]
            }
          }
        }
      },
      "response-agents_agent_status": {
        "type": "object",
        "description": "Response schema for agents/agent_status \u2014 whether the caller should be offered the agent.",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "enabled": {
                "type": "boolean",
                "description": "True when every site setting the agent requires is on AND the caller holds one of the agent's data permissions. False for an agent the caller cannot use, and for an unknown agent key."
              }
            },
            "required": [
              "enabled"
            ]
          }
        }
      },
      "response-agents_report_copilot_attach_entity": {
        "type": "object",
        "description": "Response schema for agents/report_copilot_attach_entity \u2014 echo of the attached entity with an `inserted` flag indicating whether the row was newly inserted (true) or already existed (false). Idempotent: a 200 with `inserted=false` means the entity was previously attached.",
        "properties": {
          "data": {
            "type": "object",
            "description": "Attach confirmation payload from the AIAgents service.",
            "properties": {
              "session_id": {
                "type": "string",
                "description": "The session that the entity was attached to."
              },
              "entity_type": {
                "type": "string",
                "description": "Echo of the entity_type that was attached.",
                "example": "report"
              },
              "entity_id": {
                "type": "string",
                "description": "Echo of the entity_id that was attached."
              },
              "inserted": {
                "type": "boolean",
                "description": "True when a new row was inserted, false when the entity was already attached (idempotent re-attach)."
              }
            },
            "required": [
              "session_id",
              "entity_type",
              "entity_id",
              "inserted"
            ]
          }
        }
      },
      "response-agents_report_copilot_capabilities": {
        "type": "object",
        "description": "Response schema for agents/report_copilot_capabilities \u2014 the report-agent runtime capability flags the SQL Editor gates its UI on. Proxies the agent's `GET /` capability block; any failure degrades to the classic (legacy Explore/Build) shape so a slow or unreachable agent never hides UI controls.",
        "properties": {
          "data": {
            "type": "object",
            "description": "Capability flags describing which report agent the site is running.",
            "properties": {
              "report_agent_kind": {
                "type": "string",
                "enum": [
                  "deep",
                  "classic"
                ],
                "description": "Which report agent the site runs: `deep` (the unified Report Copilot flow) or `classic` (the legacy orchestrated Explore/Build agent). Defaults to `classic` on any probe failure."
              },
              "unified_explore_build": {
                "type": "boolean",
                "description": "True when the agent merges Explore and Build into a single unified flow (deep agent); classic keeps them as explicit modes."
              },
              "delivers_report_envelope": {
                "type": "boolean",
                "description": "True when the agent returns a machine-readable report delivery envelope."
              },
              "uses_plan_interrupt": {
                "type": "boolean",
                "description": "True when the agent surfaces a plan-approval interrupt (HITL) the UI must render."
              }
            },
            "required": [
              "report_agent_kind",
              "unified_explore_build",
              "delivers_report_envelope",
              "uses_plan_interrupt"
            ]
          }
        }
      },
      "response-agents_report_copilot_client_error": {
        "type": "object",
        "description": "Response schema for agents/report_copilot_client_error - the tags actually recorded, which may differ from what was sent when a value was coerced. The caller ignores this; it exists so a coercion is visible when debugging a dashboard.",
        "properties": {
          "data": {
            "type": "object",
            "description": "The metric tags recorded for this error.",
            "properties": {
              "error_class": {
                "type": "string",
                "description": "The bounded class the counter was incremented under. 'other' when the submitted value was outside the closed set.",
                "example": "stream_connection"
              },
              "failure_class": {
                "type": "string",
                "description": "The bounded proxy failure class, or 'none' for a client-only error class.",
                "example": "none"
              },
              "upstream_failure_class": {
                "type": "string",
                "description": "The bounded agent failure class, or 'none' when the failure did not originate upstream.",
                "example": "none"
              }
            },
            "required": [
              "error_class",
              "failure_class",
              "upstream_failure_class"
            ]
          }
        }
      },
      "response-agents_report_copilot_delete_session": {
        "type": "object",
        "description": "Response schema for agents/report_copilot_delete_session \u2014 pass-through of the agent service's delete confirmation.",
        "properties": {
          "data": {
            "type": "object",
            "description": "Delete confirmation payload from the agent service.",
            "properties": {
              "session_id": {
                "type": "string",
                "description": "The session that was deleted."
              },
              "deleted": {
                "type": "boolean",
                "description": "True when the session was removed."
              },
              "message": {
                "type": "string",
                "description": "Optional human-readable status message."
              }
            },
            "additionalProperties": true
          }
        }
      },
      "response-agents_report_copilot_session_messages": {
        "type": "object",
        "description": "Response schema for agents/report_copilot_session_messages \u2014 pass-through of the agent service's message list. Either an array of messages or an object wrapping a `messages` array.",
        "properties": {
          "data": {
            "oneOf": [
              {
                "type": "array",
                "description": "Array of message objects (legacy shape).",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "human",
                        "ai",
                        "tool"
                      ],
                      "description": "Message origin. `human` = user, `ai` = assistant, `tool` = internal tool result (skipped by the UI)."
                    },
                    "content": {
                      "type": "string",
                      "description": "Message content. For tool messages this is a JSON-encoded result."
                    },
                    "tool_calls": {
                      "type": "array",
                      "description": "Tool calls invoked by the assistant (only present on `ai` messages).",
                      "items": {
                        "type": "object"
                      }
                    },
                    "tool_call_id": {
                      "type": "string",
                      "description": "Identifier linking a tool message back to its assistant tool_call."
                    }
                  },
                  "required": [
                    "type",
                    "content"
                  ]
                }
              },
              {
                "type": "object",
                "description": "Wrapped object with a messages array.",
                "properties": {
                  "session_id": {
                    "type": "string",
                    "description": "Session identifier."
                  },
                  "messages": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "human",
                            "ai",
                            "tool"
                          ],
                          "description": "Message origin. `human` = user, `ai` = assistant, `tool` = internal tool result (skipped by the UI)."
                        },
                        "content": {
                          "type": "string",
                          "description": "Message content. For tool messages this is a JSON-encoded result."
                        },
                        "tool_calls": {
                          "type": "array",
                          "description": "Tool calls invoked by the assistant (only present on `ai` messages).",
                          "items": {
                            "type": "object"
                          }
                        },
                        "tool_call_id": {
                          "type": "string",
                          "description": "Identifier linking a tool message back to its assistant tool_call."
                        }
                      },
                      "required": [
                        "type",
                        "content"
                      ]
                    }
                  },
                  "message_count": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "session_id",
                  "messages"
                ]
              }
            ]
          }
        },
        "required": [
          "data"
        ]
      },
      "response-agents_report_copilot_session_state": {
        "type": "object",
        "description": "Response schema for agents/report_copilot_session_state \u2014 pass-through of the AIAgents `/sessions/{session_id}/state` envelope. The `state` object is the variant-A2 payload produced by the Report Agent's `aget_state_for_request` extractor (`source: \"extractor\"`), or a minimal `agent_conversations` metadata snapshot when no extractor is registered (`source: \"fallback\"`).",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "session_id": {
                "type": "string",
                "description": "Session identifier echoed back."
              },
              "agent_name": {
                "type": "string",
                "description": "AIAgents client name (e.g. `SQL Ai Agent`)."
              },
              "agent_type": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Registered agent type that produced the state, or null when none is registered (fallback path)."
              },
              "source": {
                "type": "string",
                "enum": [
                  "extractor",
                  "fallback"
                ],
                "description": "`extractor` when the Report Agent extractor returned the A2 payload; `fallback` when only conversation metadata was available."
              },
              "state": {
                "type": "object",
                "description": "Agent-specific UI-restore payload. For the Report Agent (BUILD mode) this carries `agent_mode`, `current_phase`, `phases`, `planning_sub_phase`, `report_plan`, `acting_progress`, `generated_sql`, `validation_attempts`, `validation_errors`, `iteration_count`. EXPLORATION mode drops all BUILD-only fields. Fallback shape carries `title`, `message_count`, `created_at`, `last_updated`, `system_prompt`. Frontend treats unknown keys as ignore so the backend can add fields without breaking clients.",
                "properties": {
                  "agent_mode": {
                    "type": "string",
                    "enum": [
                      "build",
                      "exploration"
                    ],
                    "description": "Report Agent operation mode."
                  },
                  "current_phase": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Active BUILD-mode phase as emitted by the upstream agent (e.g. `plan`, `build`, `review`). Null in EXPLORATION mode. Proxied verbatim; the value set is owned by the agent, not enforced here."
                  },
                  "phases": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "List of all BUILD-mode phases for the timeline UI."
                  },
                  "planning_sub_phase": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Active planning sub-phase (`collecting` / `clarifying` / `awaiting_approval` / `handling_question` / `handling_modification`)."
                  },
                  "report_plan": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "description": "Serialized ReportPlan (name, category, sheets, etc.). Null when planning has not produced a plan yet."
                  },
                  "acting_progress": {
                    "type": "object",
                    "description": "Per-sheet progress during ACTING.",
                    "properties": {
                      "current_sheet_index": {
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "current_sheet_name": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "all_sheets_processed": {
                        "type": "boolean"
                      }
                    }
                  },
                  "generated_sql": {
                    "type": "object",
                    "description": "Per-sheet generated SQL keyed by sheet name. Trimmed to `{sql, validated, last_validation_error}` to cap payload size.",
                    "additionalProperties": {
                      "type": "object",
                      "properties": {
                        "sql": {
                          "type": "string"
                        },
                        "validated": {
                          "type": "boolean"
                        },
                        "last_validation_error": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    }
                  },
                  "validation_attempts": {
                    "type": "object",
                    "description": "Per-sheet validation retry counts."
                  },
                  "validation_errors": {
                    "type": "object",
                    "description": "Per-sheet accumulated validation error messages."
                  },
                  "iteration_count": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "title": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Fallback shape: conversation title."
                  },
                  "message_count": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "Fallback shape: number of messages in the conversation."
                  },
                  "created_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Fallback shape: ISO timestamp the conversation was created."
                  },
                  "last_updated": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Fallback shape: ISO timestamp of the most recent update."
                  },
                  "system_prompt": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Fallback shape: stored system prompt for the conversation."
                  }
                }
              }
            },
            "required": [
              "session_id",
              "state",
              "source"
            ]
          }
        }
      },
      "response-agents_report_copilot_sessions": {
        "type": "object",
        "description": "Response schema for agents/report_copilot_sessions \u2014 list of conversation sessions, sorted most-recent first.",
        "properties": {
          "data": {
            "type": "array",
            "description": "Conversation sessions for the logged-in user.",
            "items": {
              "type": "object",
              "properties": {
                "session_id": {
                  "type": "string",
                  "description": "Unique session identifier."
                },
                "title": {
                  "type": "string",
                  "description": "Auto-generated conversation title (~50 chars from the first user message)."
                },
                "agent_name": {
                  "type": "string",
                  "description": "Agent that owns the conversation.",
                  "example": "report_copilot"
                },
                "user_id": {
                  "type": "string",
                  "description": "BriteCore contact id of the conversation owner."
                },
                "message_count": {
                  "type": "integer",
                  "description": "Number of messages in the conversation.",
                  "minimum": 0
                },
                "last_updated": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Timestamp of the last message in the session."
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "When the session was created."
                },
                "entities": {
                  "type": "array",
                  "description": "External entity tags attached to this conversation. Empty array when the conversation has no entities yet (orphan conversation).",
                  "items": {
                    "type": "object",
                    "properties": {
                      "entity_type": {
                        "type": "string",
                        "description": "Opaque entity type (e.g. 'report').",
                        "example": "report"
                      },
                      "entity_id": {
                        "type": "string",
                        "description": "Opaque entity id (e.g. the BriteCore report uuid)."
                      }
                    },
                    "required": [
                      "entity_type",
                      "entity_id"
                    ]
                  }
                }
              },
              "required": [
                "session_id"
              ]
            }
          }
        }
      },
      "response-approve_pending_payment": {
        "description": "Response schema for /api/v2/payments/approve_pending_payment",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Indicates whether the payment approval was successful."
          },
          "messages": {
            "type": "object",
            "description": "Error messages if the operation failed."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-archive_copilot_skill": {
        "type": "object",
        "description": "Response schema for /api/v2/copilot_skills/archive_copilot_skill",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "skill": {
                "$ref": "#/components/schemas/copilot_skill-def"
              }
            },
            "required": [
              "skill"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ],
            "description": "Any messages or errors related to the request"
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-assign_business_location": {
        "description": "Response payload for /api/v2/brands/assign_business_location",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "$ref": "#/components/schemas/brand_association-def"
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-assign_policy_contact": {
        "type": "object",
        "description": "Response payload for /api/v2/contacts/assign_policy_contact",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "policy_id": {
                "type": "string",
                "format": "uuid",
                "description": "The policy ID to assign the contact to"
              },
              "contact_id": {
                "type": "string",
                "format": "uuid",
                "description": "The contact ID to assign to the policy"
              },
              "role": {
                "type": "string",
                "enum": [
                  "Agency Contact",
                  "Surplus Line Producer"
                ],
                "description": "The role of the contact in the policy"
              }
            },
            "required": [
              "policy_id",
              "contact_id",
              "role"
            ]
          },
          "success": {
            "type": "boolean"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-assign_policy_type_definition": {
        "description": "Response payload for /api/v2/brands/assign_policy_type_definition",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "$ref": "#/components/schemas/brand_association-def"
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-assign_quote_contact": {
        "type": "object",
        "description": "Response payload for /api/v2/contacts/assign_quote_contact",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "quote_id": {
                "type": "string",
                "format": "uuid",
                "description": "The quote ID to assign the contact to"
              },
              "contact_id": {
                "type": "string",
                "format": "uuid",
                "description": "The contact ID to assign to the quote"
              },
              "role": {
                "type": "string",
                "enum": [
                  "Named Insured",
                  "Driver",
                  "Agent",
                  "Creator",
                  "Finance Company",
                  "Underwriter"
                ],
                "description": "The role of the contact in the quote. Additional Interest roles are configured on Settings > Policies page."
              }
            },
            "required": [
              "quote_id",
              "contact_id",
              "role"
            ]
          },
          "success": {
            "type": "boolean"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-assign_risk_contact": {
        "type": "object",
        "description": "Response payload for /api/v2/contacts/assign_risk_contact",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "risk_id": {
                "type": "string",
                "format": "uuid",
                "description": "The risk ID to assign the contact to"
              },
              "contact_id": {
                "type": "string",
                "format": "uuid",
                "description": "The contact ID to assign to the risk"
              },
              "role": {
                "type": "string",
                "enum": [
                  "Mortgagee",
                  "Inspector",
                  "Driver",
                  "Tenant"
                ],
                "description": "The role of the contact in the risk"
              }
            },
            "required": [
              "risk_id",
              "contact_id",
              "role"
            ]
          },
          "success": {
            "type": "boolean"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-attach_file": {
        "description": "Response payload for /api/v2/uploads/attach_file.",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "attachment_id": {
                "type": "string",
                "format": "uuid",
                "description": "The ID of the File object."
              },
              "entity_id": {
                "type": "string",
                "format": "uuid",
                "description": "The ID of the entity to which the file was attached."
              }
            },
            "required": [
              "attachment_id",
              "entity_id"
            ]
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-attach_file_to_brand": {
        "description": "Response payload for attach_file_to_brand endpoint.",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "attachment_id": {
                "type": "string",
                "format": "uuid",
                "description": "The ID of the attached file"
              },
              "brand_id": {
                "type": "string",
                "format": "uuid",
                "description": "The ID of the brand"
              },
              "file_type": {
                "type": "string",
                "enum": [
                  "logo",
                  "signature"
                ],
                "description": "Type of file attached"
              }
            },
            "required": [
              "attachment_id",
              "brand_id",
              "file_type"
            ]
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-attach_form_to_policy_type": {
        "description": "Response payload for /api/v2/lines/attach_form_to_policy_type.",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "file": {
                "type": "object",
                "description": "The created File record."
              },
              "metadata": {
                "type": [
                  "object",
                  "null"
                ],
                "description": "The created/updated x_policy_types_docs record (includes its own 'id', usable as form_id for update_form_on_policy_type/remove_form_from_policy_type), or null if no metadata was supplied."
              }
            },
            "required": [
              "file",
              "metadata"
            ]
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-attach_form_to_policy_type_item": {
        "description": "Response payload for /api/v2/lines/attach_form_to_policy_type_item.",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "file": {
                "type": "object",
                "description": "The created File record."
              },
              "metadata": {
                "type": [
                  "object",
                  "null"
                ],
                "description": "The created/updated x_policy_type_items_docs record (includes its own 'id', usable as form_id for update_form_on_policy_type_item/remove_form_from_policy_type_item), or null if no metadata was supplied."
              }
            },
            "required": [
              "file",
              "metadata"
            ]
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-auth_session": {
        "description": "Response payload for /api/v2/auth/session. The endpoint answers with one of three envelopes: success, a standard error, or a permission refusal, modelled separately so a validator does not reject a normal refusal. On success the session cookie is returned in the Set-Cookie: webpy_session_id header, never in the body. The caller must be authenticated with an api key and hold an explicit rw grant on the auth/apiKeySession permission path (isGod does not bypass it); any other caller receives the permission-denied envelope under HTTP 403.",
        "type": "object",
        "oneOf": [
          {
            "title": "Success",
            "type": "object",
            "required": [
              "success",
              "messages",
              "data"
            ],
            "properties": {
              "success": {
                "const": true
              },
              "messages": {
                "oneOf": [
                  {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  {
                    "type": "object",
                    "additionalProperties": {
                      "oneOf": [
                        {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        {
                          "type": "string"
                        }
                      ]
                    }
                  }
                ]
              },
              "data": {
                "type": "object",
                "properties": {
                  "contact_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "username": {
                    "type": "string"
                  },
                  "expires_in": {
                    "type": "integer",
                    "description": "Session lifetime in seconds, from the login/session-timeout setting."
                  },
                  "created": {
                    "type": "boolean",
                    "description": "True when this call minted a new session; false when it reused the presented session cookie."
                  }
                },
                "required": [
                  "contact_id",
                  "username",
                  "expires_in",
                  "created"
                ]
              }
            }
          },
          {
            "title": "Standard error",
            "description": "Validation or unexpected failure: @api_request answers through standard_error, which returns data as an empty list.",
            "type": "object",
            "required": [
              "success",
              "messages"
            ],
            "properties": {
              "success": {
                "const": false
              },
              "messages": {
                "oneOf": [
                  {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  {
                    "type": "object",
                    "additionalProperties": {
                      "oneOf": [
                        {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        {
                          "type": "string"
                        }
                      ]
                    }
                  }
                ]
              },
              "data": {
                "type": "array",
                "items": {},
                "maxItems": 0
              }
            }
          },
          {
            "title": "Permission denied",
            "description": "HTTP 403. Returned when the caller is not authenticated with an api key (a BriteAuth bearer does not count) or holds no explicit rw grant on auth/apiKeySession. It has neither messages nor data.",
            "type": "object",
            "properties": {
              "permissionDenied": {
                "type": "boolean",
                "const": true
              },
              "success": {
                "type": "boolean",
                "const": false
              }
            },
            "required": [
              "permissionDenied",
              "success"
            ]
          }
        ]
      },
      "response-auto_assign_claim": {
        "description": "Response payload for /api/v2/claims/auto_assign_claim",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "assigned": {
                "type": "boolean"
              },
              "assigned_contact_id": {
                "type": "string",
                "format": "uuid"
              },
              "is_external_adjuster": {
                "type": "boolean"
              },
              "assigned_supervisor_contact_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-batch_export_payments": {
        "description": "Response payload for /api/v2/commissions/batch_export_payments. The endpoint is @api_request()-wrapped, so the return is the standard {success, messages, data} envelope; the serialized DTO (total_processed, total_blocked, total_deferred, messages) is nested under data. Note data.messages is the export's own per-reason explanation and is distinct from the envelope's top-level messages, which carries request-level errors (BC-25115).",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the export request was accepted. False on request validation (bad commission_payment_ids, missing explicit id) or ambiguous routing (more than one active ACH_ISSUANCE instance)."
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Human-readable messages or errors related to the request (empty on success)."
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Field-keyed validation errors."
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "The export result.",
            "properties": {
              "total_processed": {
                "type": "integer",
                "minimum": 0,
                "description": "Count of commission payments the export actually processed: rows claimed through the outbound-disbursement engine plus rows the legacy writer actually reviewed/paid. Skipped/failed rows (e.g. electronic with no payment method) are NOT counted and stay in-queue for the next run, so a partial run is visible in this number."
              },
              "total_blocked": {
                "type": "integer",
                "minimum": 0,
                "description": "Count of commission payments the funding gate refused for insufficient pool balance. Blocked rows carry no attempt and stay in-queue for a rerun after a top-up. Nonzero only on a partially blocked selection: a fully blocked one fails the request (success=false) with a top-up message instead of reporting a 0-processed success."
              },
              "total_deferred": {
                "type": "integer",
                "minimum": 0,
                "description": "Count of commission payments the export SELECTED and deliberately left in the queue without issuing them: a manual row on a site with no connected Check Issuance integration (whose non-exported state legacy accounting integrations depend on), an electronic row with no payment method, a non-positive amount, a row still being issued in the background, a failed payment, or a row whose record could not be read back. NOT a failure -- the response stays success=true -- but without it an export that issued nothing was indistinguishable from an export with nothing to do (BC-25115)."
              },
              "messages": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "One operator-facing sentence per distinct reason behind total_deferred, in a stable order. Empty when nothing was deferred. Distinct from the envelope's top-level messages."
              }
            },
            "required": [
              "total_processed",
              "total_blocked",
              "total_deferred",
              "messages"
            ]
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-bifurcate_claim": {
        "description": "Response payload for /api/v2/claims/bifurcate_claim",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "claim_id": {
                "type": "string",
                "format": "uuid"
              },
              "claim_number": {
                "type": "string"
              }
            }
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-bind_full_quote": {
        "type": "object",
        "description": "Response payload for /api/v2/quotes/bind_full_quote",
        "properties": {
          "data": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/full_quote-def"
              }
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-bulk_create_disputes": {
        "type": "object",
        "description": "Response Schema for /api/v2/disputes/bulk_create_disputes",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/dispute-def"
            }
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-claims": {
        "description": "Response payload for POST /api/v2/agents/claims",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "data": {
            "type": "object",
            "properties": {
              "response": {
                "type": "string",
                "description": "Agent response text"
              },
              "session_id": {
                "type": "string",
                "format": "uuid",
                "description": "Session ID for conversation continuity"
              },
              "metadata": {
                "type": "object",
                "description": "Agent execution metadata",
                "properties": {
                  "agent": {
                    "type": "object",
                    "description": "Agent identification",
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "Agent identifier"
                      },
                      "display_name": {
                        "type": "string",
                        "description": "Agent display name"
                      }
                    }
                  },
                  "usage": {
                    "type": "object",
                    "description": "LLM usage statistics",
                    "properties": {
                      "prompt_tokens": {
                        "type": "integer",
                        "description": "Tokens in the prompt"
                      },
                      "completion_tokens": {
                        "type": "integer",
                        "description": "Tokens in the completion"
                      },
                      "total_tokens": {
                        "type": "integer",
                        "description": "Total tokens used"
                      },
                      "model_name": {
                        "type": "string",
                        "description": "LLM model used"
                      }
                    }
                  },
                  "tools_used": {
                    "type": "array",
                    "description": "List of tools invoked during execution",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "Tool name"
                        },
                        "execution_time_ms": {
                          "type": "integer",
                          "description": "Tool execution time in milliseconds"
                        }
                      }
                    }
                  },
                  "execution_time_ms": {
                    "type": "integer",
                    "description": "Total request execution time in milliseconds"
                  }
                }
              }
            }
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Error message if request failed"
          }
        },
        "required": [
          "success"
        ]
      },
      "response-bulk_modify_tasks": {
        "description": "Response payload for /api/v2/tasks/bulk_modify_tasks",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "required": [
              "action",
              "succeeded_count",
              "failed_count",
              "results"
            ],
            "properties": {
              "action": {
                "type": "string",
                "enum": [
                  "reassign",
                  "archive",
                  "set_priority",
                  "set_status",
                  "mark_complete",
                  "link_to_policy"
                ],
                "description": "The action that was requested, echoed back."
              },
              "succeeded_count": {
                "type": "integer",
                "description": "How many tasks the action was applied to, counting no-ops."
              },
              "failed_count": {
                "type": "integer",
                "description": "How many tasks could not be updated. Non-zero alongside a non-zero succeeded_count means the batch partially applied."
              },
              "results": {
                "type": "array",
                "description": "One entry per distinct requested task, in request order.",
                "items": {
                  "type": "object",
                  "required": [
                    "id",
                    "succeeded"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "The task's id, matching one of the requested task_ids."
                    },
                    "task_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The human-readable task number, for display in failure messages. Null when the id matched no task."
                    },
                    "succeeded": {
                      "type": "boolean",
                      "description": "Whether the action was applied to this task. A no-op counts as succeeded: archiving an already-archived task, or completing an already-complete one, reports success with a reason explaining why nothing changed."
                    },
                    "reason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Why the task failed, or why a successful task was a no-op. Null for a plain success. Failures include tasks in a terminal status, which cannot be modified, and tasks that no longer exist."
                    }
                  }
                }
              }
            }
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-bulk_upsert": {
        "type": "object",
        "description": "Response Schema for /api/v2/medical_codes/bulk_upsert",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "upserted": {
                "type": "integer",
                "description": "Number of rows in the batch that were inserted or updated"
              }
            },
            "required": [
              "upserted"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-cancel_claim_estimation": {
        "type": "object",
        "description": "Response Schema for /api/v2/claim_estimations/cancel_claim_estimation",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/claim_estimation-def"
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-cancel_policy_v2": {
        "description": "Response schema for /api/v2/policies/cancel_policy_v2",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the operation was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "policy_id": {
                "type": "string",
                "format": "uuid",
                "description": "The cancelled policy ID"
              },
              "policy_term_id": {
                "type": "string",
                "format": "uuid",
                "description": "The cancelled policy term ID"
              },
              "policy_term_external_system_reference": {
                "type": "string",
                "description": "The external system reference for the policy term"
              },
              "cancellation_date": {
                "type": "string",
                "format": "date",
                "description": "The effective cancellation date"
              },
              "cancellation_pending_date": {
                "type": "string",
                "format": "date",
                "description": "The cancellation pending date"
              },
              "cancellation_reason": {
                "type": "object",
                "description": "The cancellation reason",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "The cancellation reason ID"
                  },
                  "name": {
                    "type": "string",
                    "description": "The name of the cancellation reason"
                  }
                }
              },
              "revision_id": {
                "type": "string",
                "format": "uuid",
                "description": "The revision ID created for the cancellation"
              },
              "policy_number": {
                "type": "string",
                "description": "The policy number"
              },
              "policy_status": {
                "type": "string",
                "description": "The current status of the policy after cancellation"
              },
              "print_description": {
                "type": "string",
                "description": "The print description used for the cancellation"
              },
              "additional_description": {
                "type": "string",
                "description": "The additional description or notes for the cancellation"
              }
            },
            "required": [
              "policy_id",
              "policy_term_id",
              "cancellation_reason",
              "print_description",
              "additional_description",
              "cancellation_date",
              "cancellation_pending_date"
            ]
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "field": {
                  "type": "string",
                  "description": "The field that caused the error"
                },
                "message": {
                  "type": "string",
                  "description": "The error message"
                },
                "code": {
                  "type": "string",
                  "description": "Error code for programmatic handling"
                }
              },
              "required": [
                "field",
                "message"
              ]
            }
          }
        },
        "required": [
          "success",
          "messages",
          "data"
        ]
      },
      "response-change_with_remap": {
        "type": "object",
        "description": "Response payload for /api/v2/exposure_remap/change_with_remap - counts of exposures reconciled.",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "remapped": {
                "type": "integer",
                "description": "Number of exposures re-pointed (remap + assign)"
              },
              "discarded": {
                "type": "integer",
                "description": "Number of exposures discarded (reserve released, soft-deleted)"
              },
              "risks_repointed": {
                "type": "integer",
                "description": "Number of listed loss risks re-pointed to their lineage-equivalent property on the target revision"
              }
            }
          }
        }
      },
      "response-claims_analytics": {
        "description": "Response payload for POST /api/v2/agents/claims_analytics. Claims Analytics is the Claims Analytics Copilot.",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "data": {
            "type": "object",
            "properties": {
              "response": {
                "type": "string",
                "description": "Agent response text with insights and analysis"
              },
              "session_id": {
                "type": "string",
                "format": "uuid",
                "description": "Session ID for conversation continuity"
              },
              "metadata": {
                "type": "object",
                "description": "Agent execution metadata",
                "properties": {
                  "agent": {
                    "type": "object",
                    "description": "Agent identification",
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "Agent identifier (claims_analytics)"
                      },
                      "display_name": {
                        "type": "string",
                        "description": "Agent display name (Claims Analytics Copilot)"
                      }
                    }
                  },
                  "usage": {
                    "type": "object",
                    "description": "LLM usage statistics",
                    "properties": {
                      "prompt_tokens": {
                        "type": "integer",
                        "description": "Tokens in the prompt"
                      },
                      "completion_tokens": {
                        "type": "integer",
                        "description": "Tokens in the completion"
                      },
                      "total_tokens": {
                        "type": "integer",
                        "description": "Total tokens used"
                      },
                      "model_name": {
                        "type": "string",
                        "description": "LLM model used"
                      }
                    }
                  },
                  "tools_used": {
                    "type": "array",
                    "description": "List of tools invoked during execution",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "Tool name"
                        },
                        "execution_time_ms": {
                          "type": "integer",
                          "description": "Tool execution time in milliseconds"
                        }
                      }
                    }
                  },
                  "execution_time_ms": {
                    "type": "integer",
                    "description": "Total request execution time in milliseconds"
                  }
                }
              }
            }
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Error message if request failed"
          }
        },
        "required": [
          "success"
        ]
      },
      "response-claimsearch_sso_data": {
        "type": "object",
        "description": "Response Schema for /api/v2/claims/claimsearch_sso_data",
        "properties": {
          "acs_url": {
            "type": "string",
            "format": "uri",
            "description": "ClaimSearch ACS endpoint URL. The frontend navigates the SSO popup to this URL."
          },
          "saml_response": {
            "type": [
              "string",
              "null"
            ],
            "description": "Base64-encoded signed SAML Response, if provided by Tray.io"
          },
          "relay_state": {
            "type": [
              "string",
              "null"
            ],
            "description": "RelayState for deep-linking to a match report. Empty string for the ClaimSearch home page."
          }
        },
        "required": [
          "acs_url"
        ]
      },
      "response-create_additional_interest": {
        "description": "Response payload for /api/v2/additional_interests/create_additional_interest.",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Success or informational messages"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Validation or error messages"
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "description": "Created additional interest ID"
              },
              "contact_id": {
                "type": "string",
                "format": "uuid",
                "description": "Associated contact ID"
              },
              "quote_id": {
                "type": "string",
                "format": "uuid",
                "description": "Associated quote/revision ID (revision-level)"
              },
              "vehicle_id": {
                "type": "string",
                "format": "uuid",
                "description": "Associated vehicle ID (risk-level)"
              },
              "risk_id": {
                "type": "string",
                "format": "uuid",
                "description": "Associated risk/property ID (risk-level)"
              },
              "interest": {
                "type": "string",
                "description": "Type of interest"
              },
              "interest_type": {
                "type": "string",
                "description": "Interest type code (risk-level only)"
              },
              "loan_number": {
                "type": "string",
                "description": "Loan number (risk-level only)"
              },
              "name": {
                "type": "string",
                "description": "Contact name"
              },
              "type": {
                "type": "string",
                "enum": [
                  "individual",
                  "organization"
                ],
                "description": "Contact type"
              },
              "ssn": {
                "type": "string",
                "pattern": "^xxx-xx-[0-9]{4}$",
                "description": "Masked SSN"
              },
              "date_of_birth": {
                "type": "string",
                "pattern": "^xx-xx-[0-9]{4}$",
                "description": "Masked date of birth"
              },
              "fein_tax_id": {
                "type": "string",
                "description": "Federal EIN/Tax ID"
              },
              "legal_entity_type": {
                "type": "string",
                "description": "Legal entity type"
              },
              "phones": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/phone-def"
                }
              },
              "addresses": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/address-def"
                }
              },
              "emails": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/email-def"
                }
              },
              "can_edit": {
                "type": [
                  "boolean",
                  "null"
                ],
                "description": "Whether the contact can be edited; false when the contact appears on another active policy."
              }
            },
            "required": [
              "id",
              "interest",
              "name",
              "type"
            ]
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-create_adjuster_assignment_config": {
        "description": "Response payload for /api/v2/claim_adjuster_assignment_configs/create_adjuster_assignment_config",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "$ref": "#/components/schemas/adjuster_assignment-def"
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-create_adjuster_license": {
        "description": "Response payload for /api/v2/contacts/create_adjuster_license.",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request was successful"
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Any messages or errors related to the request"
          },
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "UUID of the created license"
              },
              "contact_id": {
                "type": "string",
                "format": "uuid",
                "description": "UUID of the contact"
              },
              "business_location_id": {
                "type": "string",
                "format": "uuid",
                "description": "UUID of the business location"
              },
              "business_location_name": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Name of the business location (state)"
              },
              "business_location_abbreviation": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Abbreviation of the business location (state)"
              },
              "license_number": {
                "type": "string",
                "description": "License number"
              },
              "effective_date": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Effective date in YYYY-MM-DD format"
              },
              "expiration_date": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Expiration date in YYYY-MM-DD format"
              },
              "date_added": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Date added in YYYY-MM-DD HH:MM:SS format"
              }
            }
          }
        }
      },
      "response-create_adjustment": {
        "description": "Response payload for /api/v2/commissions/create_adjustment.",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "The result of the commission adjustment operation",
            "properties": {
              "adjustment_id": {
                "type": "string",
                "format": "uuid",
                "description": "The ID of the created commission_accounting adjustment row"
              },
              "source_accounting_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "Echoes the source commission_accounting ID supplied in the request. NULL on the source-less path (policy-free agency chargeback), where no source row exists."
              },
              "new_payment_ids": {
                "type": [
                  "array",
                  "null"
                ],
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "description": "The IDs of any commission payments created during the rollup/recalculation triggered by the adjustment"
              }
            },
            "required": [
              "adjustment_id",
              "source_accounting_id"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Whether the operation was successful"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-create_and_rate_endorsement_quote": {
        "type": "object",
        "description": "Response Schema for create_and_rate_endorsement_quote - returns full quote data with optional rating and warnings",
        "properties": {
          "data": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/full_quote-def"
              }
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-create_and_rate_full_quote": {
        "type": "object",
        "description": "Response Schema for create_and_rate_full_quote - identical to create_full_quote response as it returns the same quote data structure",
        "properties": {
          "data": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/full_quote-def"
              }
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-create_calculated_field": {
        "description": "Response payload for /api/v2/document_templates/create_calculated_field",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object"
              }
            ]
          },
          "data": {
            "$ref": "#/components/schemas/calculated_field-def"
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-create_carbone_custom_deliverable": {
        "type": "object",
        "description": "Response payload for /api/v2/settings/create_carbone_custom_deliverable.",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "The created Carbone deliverable template (CarboneDeliverableModel).",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "location_id": {
                "type": "string",
                "format": "uuid"
              },
              "policy_type_name": {
                "type": "string"
              },
              "custom_name": {
                "type": "string"
              },
              "module": {
                "type": "string",
                "enum": [
                  "claims",
                  "policies"
                ]
              },
              "carbone_template_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "source_file_name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "draft_carbone_template_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "draft_source_file_name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "print_on_initial_dec": {
                "type": "boolean"
              },
              "print_on_renewal_dec": {
                "type": "boolean"
              },
              "print_on_non_autopay": {
                "type": "boolean"
              },
              "generated_per": {
                "type": "string"
              },
              "allow_britequote_creation": {
                "type": "boolean"
              },
              "overwrite_stock": {
                "type": "boolean"
              },
              "use_dynamic_fields": {
                "type": "boolean"
              },
              "deleted": {
                "type": "boolean"
              },
              "report_id": {
                "type": "string",
                "format": "uuid"
              },
              "esign_enabled": {
                "type": "boolean"
              },
              "send_dec": {
                "type": "boolean"
              },
              "default_print_state": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "requires_user_input": {
                "type": "boolean"
              },
              "last_preview_entity_number": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          }
        },
        "required": [
          "success",
          "messages",
          "data"
        ]
      },
      "response-create_configuration_import": {
        "type": "object",
        "description": "Response Schema for /api/v2/settings/create_configuration_import",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "True if the request was handled"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "The configuration import record. Nothing has been run against it yet, so its status is null; running belongs to import_configuration.",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "The package's own id. This is what import_configuration runs against and what get_configuration_import is polled with, not a background job id."
              },
              "file_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The stored package. A package that arrived by url has one too: create_configuration_import fetches and stores it before returning. Withheld from listings."
              },
              "source": {
                "type": "string",
                "enum": [
                  "upload",
                  "link"
                ],
                "description": "How the package reached this site: upload for one sent through core.uploads uploadAttachment with type 'config_package', link for one fetched from a presigned S3 url."
              },
              "exported_from": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Site the package was exported from. Read out of the package itself, so it is null until a run has read it, and on packages predating origin tracking."
              },
              "exported_at": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "When the package was exported there, as recorded in it"
              },
              "created_by": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Contact id of whoever brought the package in; null for an API-key caller with no contact"
              },
              "date_added": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "When the row was created",
                "format": "date-time"
              },
              "date_updated": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "When the row last changed",
                "format": "date-time"
              },
              "dry_run": {
                "type": [
                  "boolean",
                  "null"
                ],
                "description": "Whether the last run only validated. Null until a run has been queued."
              },
              "status": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Null here: nothing has run against the package yet. Becomes queued, processing, complete or failed once import_configuration runs it.",
                "enum": [
                  "queued",
                  "processing",
                  "complete",
                  "failed",
                  null
                ]
              },
              "summary": {
                "type": [
                  "object",
                  "null"
                ],
                "description": "The full outcome of the last run."
              },
              "response": {
                "type": [
                  "object",
                  "null"
                ],
                "description": "The compact document the task returned."
              },
              "error_message": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Operator-facing reason the last run failed."
              },
              "background_job_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The job carrying the last run. Null when it ran inline."
              },
              "imported_at": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "When the last run was queued, narrowed to when it began once a worker takes it; on an inline run, when it settled.",
                "format": "date-time"
              }
            },
            "required": [
              "id",
              "source"
            ]
          }
        },
        "required": [
          "success",
          "messages",
          "data"
        ]
      },
      "response-create_contact": {
        "description": "Response payload for /api/v2/contacts/create_contact.",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "username": {
                "type": "string"
              },
              "ssn_group": {
                "type": "string"
              },
              "dba": {
                "type": "string"
              },
              "phones": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/phone-def"
                }
              },
              "date_business_started": {
                "type": "string",
                "format": "date"
              },
              "company_id": {
                "type": "string",
                "format": "uuid"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "addresses": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/address-def"
                }
              },
              "driver_license_date": {
                "type": "string",
                "format": "date"
              },
              "primary_phone_id": {
                "type": "string",
                "format": "uuid"
              },
              "agency_inception_date": {
                "type": "string",
                "format": "date"
              },
              "external_system_reference": {
                "type": "string"
              },
              "last_synched_date": {
                "type": "string",
                "format": "date-time"
              },
              "source_update_date": {
                "type": "string",
                "format": "date-time"
              },
              "fein_tax_id": {
                "type": "string"
              },
              "primary_email_id": {
                "type": "string",
                "format": "uuid"
              },
              "date_of_birth": {
                "type": "string",
                "pattern": "^xx-xx-[0-9]{4}$"
              },
              "purchase_date": {
                "type": "string",
                "format": "date"
              },
              "type": {
                "type": "string",
                "enum": [
                  "individual",
                  "organization"
                ]
              },
              "added_by": {
                "type": "string"
              },
              "website": {
                "type": "string"
              },
              "hicn_number": {
                "type": "string"
              },
              "date_of_death": {
                "type": "string",
                "format": "date"
              },
              "ssn": {
                "type": "string"
              },
              "drivers_license": {
                "type": "string"
              },
              "agency_termination_date": {
                "type": "string",
                "format": "date"
              },
              "emails": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/email-def"
                }
              },
              "confirmation_email": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "gender": {
                "type": "string",
                "enum": [
                  "Male",
                  "Female",
                  "Other",
                  "Undisclosed"
                ]
              },
              "license_state": {
                "type": "string",
                "pattern": "^[A-Z]{2}$"
              },
              "legal_entity_type": {
                "type": "string"
              },
              "position": {
                "type": "string"
              },
              "primary_address_id": {
                "type": "string",
                "format": "uuid"
              },
              "agency_group": {
                "$ref": "#/components/schemas/agency_group-def"
              },
              "agency": {
                "$ref": "#/components/schemas/agency-def"
              },
              "agents": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/agent-def"
                }
              },
              "agency_group_number": {
                "type": "string"
              },
              "agency_number": {
                "type": "string"
              },
              "agent_ids": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "roles": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "name"
                  ]
                }
              }
            },
            "required": [
              "id"
            ]
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-create_copilot_skill": {
        "type": "object",
        "description": "Response schema for /api/v2/copilot_skills/create_copilot_skill",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "skill": {
                "$ref": "#/components/schemas/copilot_skill-def"
              }
            },
            "required": [
              "skill"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ],
            "description": "Any messages or errors related to the request"
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-create_dispute": {
        "type": "object",
        "description": "Response Schema for /api/v2/disputes/create_dispute",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/dispute-def"
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-create_effective_date": {
        "type": "object",
        "description": "Response schema for /api/v2/lines/create_effective_date",
        "properties": {
          "data": {
            "type": "object",
            "description": "Data related to the created effective date",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "ID of the created effective date"
              },
              "description": {
                "type": "string",
                "description": "The description of the effective date"
              },
              "effective_date": {
                "type": "string",
                "format": "date",
                "description": "The effective date"
              },
              "renewal_effective_date": {
                "type": "string",
                "format": "date-time",
                "description": "Renewal effective date calculated from associated policy types"
              },
              "creation_date": {
                "type": "string",
                "format": "date-time",
                "description": "The date the effective date was created"
              },
              "change_history": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "to": {
                      "type": "string",
                      "format": "date",
                      "description": "The new effective date"
                    },
                    "changed": {
                      "type": "string",
                      "format": "date-time",
                      "description": "The timestamp when the change was made"
                    },
                    "from": {
                      "type": "string",
                      "format": "date",
                      "description": "The previous effective date"
                    }
                  },
                  "required": [
                    "to",
                    "changed",
                    "from"
                  ]
                },
                "description": "List of changes made to the effective date"
              },
              "override_lock": {
                "type": "boolean",
                "description": "Indicates if the effective date is locked"
              }
            },
            "required": [
              "id",
              "description",
              "effective_date",
              "creation_date",
              "change_history",
              "override_lock"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-create_endorsement_quote": {
        "type": "object",
        "description": "Response Schema for /api/v2/quotes/create_endorsement_quote",
        "properties": {
          "data": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/full_quote-def"
              }
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-create_exposures": {
        "description": "Response payload for /api/v2/claim_exposures/create_exposures - Returns the list of created exposures.",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "array",
            "description": "List of created exposure objects",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "ID of the created exposure"
                },
                "claim_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "coverage_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "loss_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "claimant_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "loss_type": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            }
          }
        },
        "required": [
          "success",
          "messages",
          "data"
        ]
      },
      "response-create_full_quote": {
        "type": "object",
        "description": "Response Schema for create_full_quote",
        "properties": {
          "data": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/full_quote-def"
              }
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-create_full_quote_async": {
        "type": "object",
        "description": "Response Schema for create_full_quote_async. Describes the successful (success=true) response only. Returns immediately with data.status always 'success' or 'in_progress' \u2014 never 'failure' or 'not_found'. 'success' indicates external_system_reference matched an already-completed quote and data.result carries that quote. 'in_progress' indicates either a matching async request is already running or a new async quote job was accepted, and the response carries a reference_id for polling via get_full_quote_async_status. Synchronous validation, Celery-disabled, unrecovered duplicate-reference, and enqueue failures do not conform to this schema; they are returned via the standard API error envelope and are documented there.",
        "properties": {
          "data": {
            "type": "object",
            "description": "Discriminated on 'status': 'success' carries the recovered quote envelope; 'in_progress' carries a null result.",
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "status": {
                    "const": "success"
                  },
                  "reference_id": {
                    "type": "string"
                  },
                  "result": {
                    "type": "object",
                    "description": "Recovered quote envelope. 'response' is the compact summary shape (id, policy_id, policy_number, created_date, updated_date), identical to the worker success path \u2014 the full quote's policy_status/status/state/items/sub_lines/risks and request-echo fields are intentionally omitted.",
                    "properties": {
                      "response": {
                        "type": "object",
                        "description": "Compact async-result summary (CreateFullQuoteResponseSummaryModel).",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "description": "Quote/revision id."
                          },
                          "policy_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "policy_number": {
                            "type": "string"
                          },
                          "created_date": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "ISO-8601 timezone-aware; null when unset."
                          },
                          "updated_date": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "ISO-8601 timezone-aware; null when unset."
                          }
                        },
                        "required": [
                          "id",
                          "policy_id",
                          "policy_number"
                        ]
                      },
                      "warnings": {
                        "type": "array",
                        "description": "Always empty on this path \u2014 the duplicate-recovery branch re-reads the existing quote and does not re-run validation.",
                        "items": {
                          "type": "string"
                        }
                      }
                    },
                    "required": [
                      "response",
                      "warnings"
                    ]
                  },
                  "result_available": {
                    "const": true,
                    "description": "Always true on this branch. The result is either rebuilt in-process from a freshly-read quote (duplicate recovery) or replayed from a readable stored BackgroundJob.results BLOB (idempotency dedupe hit). An unreadable stored result is deliberately NOT treated as a dedupe hit \u2014 create_full_quote_async falls through to duplicate recovery instead, so it never short-circuits to an empty payload here."
                  },
                  "policy_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Copied from result.response.policy_id \u2014 a non-null UUID on the recovered-success path."
                  },
                  "policy_url": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uri-reference",
                    "description": "Null when web.ctx.homedomain is unset."
                  }
                },
                "required": [
                  "status",
                  "reference_id",
                  "result",
                  "result_available",
                  "policy_id",
                  "policy_url"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "status": {
                    "const": "in_progress"
                  },
                  "reference_id": {
                    "type": "string"
                  },
                  "result": {
                    "type": "null"
                  },
                  "result_available": {
                    "const": true,
                    "description": "Always true here \u2014 there is no stored result to have failed to read."
                  },
                  "policy_id": {
                    "type": "null"
                  },
                  "policy_url": {
                    "type": "null"
                  }
                },
                "required": [
                  "status",
                  "reference_id",
                  "result",
                  "result_available",
                  "policy_id",
                  "policy_url"
                ]
              }
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-create_insight": {
        "type": "object",
        "description": "Response payload for /api/v2/insights/create_insight.",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Field-level validation messages"
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "insight": {
                "$ref": "#/components/schemas/insight-def"
              }
            },
            "required": [
              "insight"
            ]
          }
        },
        "required": [
          "success",
          "messages",
          "data"
        ]
      },
      "response-create_line": {
        "type": "object",
        "description": "Response Schema for /api/v2/policy_types/create_line",
        "properties": {
          "data": {
            "type": "object",
            "description": "Created line data",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "UUID of the created Line"
              },
              "name": {
                "type": "string",
                "description": "Name of the created Line"
              },
              "effective_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "UUID of the effective date (nullable)"
              },
              "location_id": {
                "type": "string",
                "format": "uuid",
                "description": "UUID of the Business Location"
              },
              "expiration_date": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date",
                "description": "Expiration date of the line (nullable)"
              },
              "line_definition_code": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Code of the associated line definition (nullable)"
              }
            },
            "required": [
              "id",
              "name",
              "effective_id",
              "expiration_date",
              "location_id",
              "line_definition_code"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "List of human-readable messages"
              },
              {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "level": {
                      "type": "string",
                      "enum": [
                        "info",
                        "warning",
                        "error"
                      ]
                    }
                  }
                },
                "description": "List of structured message objects"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-create_policy_type": {
        "type": "object",
        "description": "Response Schema for /api/v2/lines/create_policy_type",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "effective_date_id": {
                "type": "string",
                "format": "uuid",
                "description": "UUID of the Effective Date"
              },
              "location_id": {
                "type": "string",
                "format": "uuid",
                "description": "UUID of the Location (State)"
              },
              "line": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "UUID of the Line"
                  },
                  "name": {
                    "type": "string",
                    "description": "Name of the Line"
                  }
                }
              },
              "policy_type": {
                "type": "object",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/policy_type_def-def"
                  }
                ]
              }
            }
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-create_policy_type_item": {
        "type": "object",
        "description": "Response Schema for /api/v2/lines/create_policy_type_item",
        "properties": {
          "data": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/policy_type_item-def"
              }
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-create_policy_type_relation": {
        "type": "object",
        "description": "Response Schema for /api/v2/policy_types/create_policy_type_relation",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "policy_type_id": {
                "type": "string",
                "format": "uuid",
                "description": "The ID of the primary policy type"
              },
              "related_policy_type_name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100,
                "description": "The name of the related policy type"
              },
              "related_line_name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100,
                "description": "The name of the related line"
              },
              "relationship_type": {
                "type": "string",
                "enum": [
                  "underlying"
                ],
                "default": "underlying",
                "description": "The type of relationship"
              }
            }
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-create_quick_code_value": {
        "type": "object",
        "description": "Response payload for /api/v2/quick_code_values/create_quick_code_value.",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request was successful"
          },
          "data": {
            "type": "object",
            "description": "The created quick code value",
            "properties": {
              "quick_code": {
                "type": "string",
                "description": "The quick code identifier"
              },
              "code_value_type": {
                "type": "string",
                "description": "The unique code value identifier"
              },
              "label": {
                "type": "string",
                "description": "Display label"
              },
              "description": {
                "type": "string",
                "description": "Description"
              },
              "active": {
                "type": "boolean",
                "description": "Whether active"
              },
              "default": {
                "type": "boolean",
                "description": "Whether default"
              },
              "is_system_default": {
                "type": "boolean",
                "description": "Whether this is a system-created value (false for user-created)"
              },
              "sort_order": {
                "type": "integer",
                "description": "Sort order"
              },
              "added_by": {
                "type": "string",
                "description": "Username who created the value"
              },
              "date_added": {
                "type": "string",
                "description": "Date the value was created"
              },
              "updated_by": {
                "type": "string",
                "description": "Username who last updated the value"
              },
              "date_updated": {
                "type": "string",
                "description": "Date the value was last updated"
              }
            }
          },
          "messages": {
            "type": "object",
            "description": "Any messages or errors"
          }
        },
        "required": [
          "success"
        ]
      },
      "response-create_quick_quote_template": {
        "type": "object",
        "description": "Response schema for /api/v2/quick_quote_templates/create_quick_quote_template",
        "properties": {
          "data": {
            "type": "object",
            "description": "The created Quick Quote Template",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "Unique identifier for the Quick Quote Template"
              },
              "name": {
                "type": "string",
                "description": "The name of the Quick Quote Template"
              },
              "quote_template": {
                "type": "object",
                "description": "Quote-wide data containing coverage items",
                "properties": {
                  "items": {
                    "type": "array",
                    "description": "List of coverage items",
                    "items": {
                      "type": "object",
                      "description": "Coverage item definition"
                    }
                  }
                }
              },
              "template_risk_values": {
                "type": "array",
                "description": "List of template risk default values",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "quick_quote_template_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "risk_defaults": {
                      "type": "object"
                    },
                    "risk_type": {
                      "type": "string"
                    },
                    "version": {
                      "type": "integer"
                    }
                  }
                }
              }
            },
            "required": [
              "id",
              "name",
              "quote_template",
              "template_risk_values"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Validation errors organized by field"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-create_quote_extended": {
        "type": "object",
        "description": "Response Schema for create_quote_extended",
        "properties": {
          "data": {
            "oneOf": [
              {
                "type": "object",
                "required": [
                  "stateless_quote_id",
                  "items",
                  "total"
                ],
                "properties": {
                  "stateless_quote_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "Stateless Quote ID; null on the run_stateless='debug' path, which runs the quote but does not persist a stateless quote"
                  },
                  "properties": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "address_line1": {
                          "type": "string"
                        },
                        "address_line2": {
                          "type": "string"
                        },
                        "address_city": {
                          "type": "string"
                        },
                        "address_state": {
                          "type": "string"
                        },
                        "address_zip": {
                          "type": "string"
                        },
                        "latitude": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "longitude": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "annual_amount": {
                          "type": "number"
                        },
                        "pro_rata_amount": {
                          "type": "number"
                        },
                        "annual_fee": {
                          "type": "number"
                        },
                        "pro_rata_fee": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "address_line1",
                        "address_line2",
                        "address_city",
                        "address_state",
                        "address_zip",
                        "annual_amount",
                        "pro_rata_amount",
                        "annual_fee",
                        "pro_rata_fee"
                      ]
                    }
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "coverage",
                            "adjustment",
                            "calculation",
                            "fee",
                            "nonRate",
                            "dividend"
                          ]
                        },
                        "annual_amount": {
                          "type": "number"
                        },
                        "pro_rata_amount": {
                          "type": "number"
                        },
                        "annual_fee": {
                          "type": "number"
                        },
                        "pro_rata_fee": {
                          "type": "number"
                        },
                        "limit": {
                          "type": "number"
                        },
                        "deductible": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "name",
                        "type",
                        "annual_amount",
                        "pro_rata_amount",
                        "annual_fee",
                        "pro_rata_fee"
                      ]
                    }
                  },
                  "total": {
                    "type": "object",
                    "properties": {
                      "annual_fees": {
                        "type": "number"
                      },
                      "pro_rata_premium": {
                        "type": "number"
                      },
                      "annual_total": {
                        "type": "number"
                      },
                      "pro_rata_total": {
                        "type": "number"
                      },
                      "annual_premium": {
                        "type": "number"
                      },
                      "pro_rata_fees": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "annual_fees",
                      "pro_rata_premium",
                      "annual_total",
                      "pro_rata_total",
                      "annual_premium",
                      "pro_rata_fees"
                    ]
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "quote_number",
                  "policy_id",
                  "policy_type_id",
                  "revision_id",
                  "primary_property_id",
                  "items",
                  "total",
                  "forms",
                  "stp"
                ],
                "properties": {
                  "quote_number": {
                    "type": "string",
                    "description": "Quote Number created in BriteCore"
                  },
                  "policy_id": {
                    "type": "string",
                    "description": "Policy ID created in BriteCore",
                    "format": "uuid"
                  },
                  "policy_type_id": {
                    "type": "string",
                    "description": "Policy Type ID of the created revision",
                    "format": "uuid"
                  },
                  "revision_id": {
                    "type": "string",
                    "description": "Revision ID created in BriteCore",
                    "format": "uuid"
                  },
                  "primary_property_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Primary property ID of the created revision. Null when the revision has no primary property."
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "annual_amount": {
                          "type": "number"
                        },
                        "pro_rata_amount": {
                          "type": "number"
                        },
                        "annual_fee": {
                          "type": "number"
                        },
                        "pro_rata_fee": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "name",
                        "annual_amount",
                        "pro_rata_amount",
                        "annual_fee",
                        "pro_rata_fee"
                      ]
                    }
                  },
                  "total": {
                    "type": "object",
                    "properties": {
                      "annual_fees": {
                        "type": "number"
                      },
                      "pro_rata_premium": {
                        "type": "number"
                      },
                      "annual_total": {
                        "type": "number"
                      },
                      "pro_rata_total": {
                        "type": "number"
                      },
                      "annual_premium": {
                        "type": "number"
                      },
                      "pro_rata_fees": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "annual_fees",
                      "pro_rata_premium",
                      "annual_total",
                      "pro_rata_total",
                      "annual_premium",
                      "pro_rata_fees"
                    ]
                  },
                  "forms": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "edition_number": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "form_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "edition_number",
                        "description",
                        "form_code"
                      ]
                    }
                  },
                  "stp": {
                    "type": "object",
                    "properties": {
                      "ran": {
                        "type": "boolean"
                      },
                      "success": {
                        "type": "boolean"
                      },
                      "details": {
                        "type": [
                          "array",
                          "null"
                        ],
                        "items": {}
                      }
                    },
                    "required": [
                      "ran",
                      "success",
                      "details"
                    ]
                  }
                }
              }
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Any messages or errors related to the request"
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-create_rating_table_definition": {
        "title": "CreateRatingTableDefinitionResponse",
        "type": "object",
        "description": "Response payload for a successfully created rating table definition from /api/v2/lines/create_rating_table_definition",
        "properties": {
          "messages": {
            "$ref": "#/components/schemas/messages-def"
          },
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "The unique identifier for the rating table definition."
              },
              "name": {
                "type": "string",
                "description": "Name of the rating table definition."
              },
              "location_id": {
                "type": "string",
                "format": "uuid",
                "description": "The ID of the location (state) for this rating table definition."
              },
              "type": {
                "type": "string",
                "description": "The type of the rating table definition.",
                "enum": [
                  "grid_points",
                  "prefill_vehicle"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "location_id",
              "type"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Whether the rating table definition creation was successful"
          }
        },
        "required": [
          "data",
          "messages",
          "success"
        ]
      },
      "response-create_renewal_quote": {
        "type": "object",
        "description": "Response Schema for /api/v2/quotes/create_renewal_quote",
        "properties": {
          "data": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/full_quote-def"
              }
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-create_rule": {
        "type": "object",
        "description": "Response payload for /api/v2/rules/create_rule. Returns the full created rule with all fields, triggers, effects, and conflicting_rules.",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "Rule UUID"
              },
              "reference_id": {
                "type": "string",
                "format": "uuid",
                "description": "Reference UUID"
              },
              "policy_type_id": {
                "type": "string",
                "format": "uuid",
                "description": "Policy type UUID"
              },
              "name": {
                "type": "string",
                "description": "Rule name"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Rule description"
              },
              "category": {
                "type": "string",
                "description": "Rule category (policy, property, vehicle, etc.)"
              },
              "module": {
                "type": "string",
                "description": "Module the rule applies to"
              },
              "severity": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Severity level for STP rules"
              },
              "waiver_behavior": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Waiver behavior for STP rules"
              },
              "waiver_terms": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Number of terms for waiver"
              },
              "enabled_for_renewal": {
                "type": "boolean",
                "description": "Whether rule runs on renewals"
              },
              "enabled_for_endorsement": {
                "type": "boolean",
                "description": "Whether rule runs on endorsements"
              },
              "enabled_for_new_business": {
                "type": "boolean",
                "description": "Whether rule runs on new business"
              },
              "sort_order": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Rule sort order"
              },
              "valid_from_date": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date",
                "description": "Start date for rule validity"
              },
              "valid_to_date": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date",
                "description": "End date for rule validity"
              },
              "properties_affected": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Which properties are affected"
              },
              "exception_type": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Exception type (include/exclude)"
              },
              "exception_agencies": {
                "type": [
                  "array",
                  "null"
                ],
                "items": {
                  "type": "string"
                },
                "description": "List of agency exceptions"
              },
              "event": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Event type for events module rules"
              },
              "deleted": {
                "type": "boolean",
                "description": "Soft delete flag"
              },
              "triggers": {
                "type": "array",
                "description": "Array of rule triggers",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "policy_type_item_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "trigger_type": {
                      "type": "string"
                    },
                    "label_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "value": {
                      "type": [
                        "array",
                        "null"
                      ],
                      "items": {
                        "type": "string"
                      }
                    },
                    "sort_order": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    }
                  }
                }
              },
              "effects": {
                "type": "array",
                "description": "Array of rule effects",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "target_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "action": {
                      "type": "string"
                    },
                    "label_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "value": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "mandatory": {
                      "type": "boolean"
                    },
                    "hard_reverse": {
                      "type": "boolean"
                    },
                    "hide_category": {
                      "type": "boolean"
                    },
                    "popup_message": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "sort_order": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    }
                  }
                }
              },
              "conflicting_rules": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Names of any rules that may conflict with this rule"
              }
            }
          }
        }
      },
      "response-create_sub_line": {
        "type": "object",
        "description": "Response Schema for /api/v2/lines/create_sub_line",
        "properties": {
          "data": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/sub_line_def-def"
              }
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-create_subjectivity": {
        "type": "object",
        "description": "Response schema for /api/v2/subjectivities/create_subjectivity",
        "properties": {
          "data": {
            "type": "object",
            "description": "Data related to the created subjectivity",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "ID of the created subjectivity definition"
              },
              "revision_id": {
                "type": "string",
                "format": "uuid",
                "description": "ID of the revision"
              },
              "subjectivity_definition_id": {
                "type": "string",
                "format": "uuid",
                "description": "ID of the subjectivity definition"
              },
              "status": {
                "type": "string",
                "enum": [
                  "Satisfied",
                  "Not Satisfied",
                  "Waived",
                  "Expired",
                  "Canceled"
                ],
                "description": "Status of the subjectivity"
              },
              "due_date": {
                "type": "string",
                "format": "date-time",
                "description": "Due date for this subjectivity to be met before"
              },
              "assignee": {
                "type": "string",
                "format": "uuid",
                "description": "ID of the assignee"
              },
              "created_by": {
                "type": "string",
                "format": "uuid",
                "description": "ID of the user who created this subjectivity"
              },
              "date_created": {
                "type": "string",
                "format": "date-time",
                "description": "Date and time when this subjectivity was created"
              },
              "updated_by": {
                "type": "string",
                "format": "uuid",
                "description": "ID of the user who last updated this subjectivity"
              },
              "date_updated": {
                "type": "string",
                "format": "date-time",
                "description": "Date and time when this subjectivity was last updated"
              },
              "description": {
                "type": "string",
                "description": "Description of the subjectivity"
              },
              "statement": {
                "type": "string",
                "description": "Statement for the subjectivity. Copied from the subjectivity definition if not provided."
              }
            },
            "required": [
              "id",
              "revision_id",
              "subjectivity_definition_id",
              "status",
              "due_date",
              "assignee",
              "created_by",
              "date_created",
              "date_updated",
              "updated_by",
              "description",
              "statement"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-create_subjectivity_definition": {
        "type": "object",
        "description": "Response schema for /api/v2/subjectivities/create_subjectivity_definition",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Subjectivity definition ID"
                },
                "name": {
                  "type": "string",
                  "description": "Name of the subjectivity definition"
                },
                "description": {
                  "type": "string",
                  "description": "Description of the subjectivity definition"
                },
                "policy_type_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "ID of the associated policy type"
                },
                "mandatory": {
                  "type": "boolean",
                  "description": "true for mandatory and false for non-mandatory"
                },
                "active": {
                  "type": "boolean",
                  "description": "true for active and false for inactive"
                },
                "due_within_days": {
                  "type": "integer",
                  "description": "Days the subjectivity is due within"
                },
                "due_date_type": {
                  "type": "string",
                  "enum": [
                    "Pre Bind",
                    "Post Bind",
                    "Post Issue"
                  ],
                  "description": "Type of due date (e.g., 'Post Bind' or 'Post Issue')"
                },
                "created_by": {
                  "type": "string",
                  "format": "uuid",
                  "description": "User ID of the creator"
                },
                "date_created": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Date and time the subjectivity definition was created"
                },
                "updated_by": {
                  "type": "string",
                  "format": "uuid",
                  "description": "User ID of the last user to update the subjectivity definition"
                },
                "date_updated": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Date and time the subjectivity definition was last updated"
                },
                "statement": {
                  "type": "string",
                  "description": "Statement for the subjectivity definition"
                }
              },
              "required": [
                "id",
                "name",
                "description",
                "policy_type_id",
                "mandatory",
                "active",
                "due_date_type",
                "created_by",
                "date_created",
                "updated_by",
                "date_updated",
                "statement"
              ]
            }
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-create_system_tags": {
        "type": "object",
        "description": "Response Schema for /api/v2/settings/create_system_tags",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "Name of the System Tag"
                },
                "required": {
                  "type": "boolean",
                  "default": false,
                  "description": "Whether the System Tag is required"
                },
                "show_on_declaration": {
                  "type": "boolean",
                  "default": false,
                  "description": "Whether the System Tag is shown on the Declaration"
                },
                "tag_type": {
                  "type": "string",
                  "enum": [
                    "VENDOR",
                    "REPORT",
                    "INTERNAL",
                    "CUSTOM"
                  ],
                  "default": "CUSTOM"
                },
                "tag_for": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "LINE",
                      "POLICY_TYPE",
                      "POLICY_TYPE_ITEM",
                      "SUB_LINE",
                      "CATEGORY",
                      "QUESTION",
                      "QUESTION_OPTION",
                      "CLAIM",
                      "CONTACT",
                      "POLICY"
                    ]
                  }
                },
                "style": {
                  "type": "string",
                  "enum": [
                    "TEXT",
                    "CHECKBOX",
                    "SELECT"
                  ],
                  "default": "TEXT"
                }
              }
            }
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-create_task": {
        "description": "Response payload for /api/v2/tasks/create_task",
        "type": "object",
        "properties": {
          "messages": {
            "$ref": "#/components/schemas/messages-def"
          },
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "The id of the task"
              },
              "task_id": {
                "type": "string",
                "description": "Task identifier"
              },
              "claim": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Claim ID"
                  },
                  "claim_number": {
                    "type": "string",
                    "description": "Claim number"
                  },
                  "insureds": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "description": "Insured's contact ID"
                        },
                        "name": {
                          "type": "string",
                          "description": "Insured's name"
                        }
                      }
                    },
                    "description": "Insureds associated with the claim"
                  },
                  "date_added": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Date when the claim was added"
                  }
                }
              },
              "policy": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Policy ID"
                  },
                  "policy_number": {
                    "type": "string",
                    "description": "Policy number"
                  },
                  "effective_date": {
                    "type": "string",
                    "format": "date",
                    "description": "Policy effective date"
                  },
                  "insureds": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "description": "Insured's contact ID"
                        },
                        "name": {
                          "type": "string",
                          "description": "Insured's name"
                        }
                      }
                    },
                    "description": "Insureds associated with the latest revision"
                  }
                }
              },
              "policy_context": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "agent": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "description": "Contact ID"
                      },
                      "name": {
                        "type": "string",
                        "description": "Contact name"
                      }
                    },
                    "description": "Agent of record on the latest revision"
                  },
                  "underwriter": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "description": "Contact ID"
                      },
                      "name": {
                        "type": "string",
                        "description": "Contact name"
                      }
                    },
                    "description": "Underwriter on the latest revision"
                  },
                  "agency_group": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "description": "Contact ID"
                      },
                      "name": {
                        "type": "string",
                        "description": "Contact name"
                      }
                    },
                    "description": "Agency group the policy's agency belongs to"
                  },
                  "additional_interest_count": {
                    "type": "integer",
                    "description": "Additional interests on the latest revision"
                  },
                  "written_premium": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Written premium of the latest revision, as a decimal string"
                  }
                },
                "description": "Policy detail the task sidebar shows. Always null here: it is filled on retrieve_task alone, because each field costs a query no other caller reads. Declared so the three task responses document one shape."
              },
              "task_type": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Task type ID"
                  },
                  "name": {
                    "type": "string",
                    "description": "Task type name"
                  }
                },
                "required": [
                  "id",
                  "name"
                ]
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Task description"
              },
              "date_added": {
                "type": "string",
                "format": "date-time",
                "description": "Task created date"
              },
              "due_date": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "Task due date"
              },
              "added_by": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "ID of user who created the task"
                  },
                  "name": {
                    "type": "string",
                    "description": "Name of user who created the task"
                  }
                }
              },
              "assignee": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "ID of user assigned to the task"
                  },
                  "name": {
                    "type": "string",
                    "description": "Name of user assigned to the task"
                  }
                }
              },
              "status": {
                "type": "string",
                "enum": [
                  "Open",
                  "In Progress",
                  "Blocked",
                  "Escalated",
                  "Completed",
                  "Canceled"
                ]
              },
              "priority": {
                "type": "string",
                "enum": [
                  "Low",
                  "Medium",
                  "High"
                ]
              },
              "mandatory": {
                "type": "boolean",
                "description": "Whether the task is mandatory"
              },
              "last_updated": {
                "type": "string",
                "format": "date-time",
                "description": "Task last updated date"
              },
              "selection_strategy": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "How the assignee was chosen (e.g. manual, round_robin, stp)"
              },
              "orkes_task_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Correlation id when the task came from an Orkes workflow"
              },
              "status_substate": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Queue UI substate; not currently populated"
              },
              "tags": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Queue pill tags, e.g. BLOCKED"
              },
              "comms_count": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Linked communications count; not currently populated"
              },
              "documents_status": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Documents indicator; not currently populated"
              },
              "triggered_by_workflow_node_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Workflow node that created this task, when it came from a workflow dispatch"
              },
              "parent_task_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "Parent task, when this task was chained from another"
              },
              "workflow_chain_depth": {
                "type": "integer",
                "description": "How many tasks deep in a workflow chain this task sits; 0 when unchained"
              },
              "workflow_run_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "Workflow run that produced this task"
              },
              "outcome": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Outcome ID"
                  },
                  "outcome_key": {
                    "type": "string",
                    "description": "Stable key for the outcome"
                  },
                  "name": {
                    "type": "string",
                    "description": "Display name of the outcome"
                  }
                },
                "description": "Recorded outcome, once the task has one"
              },
              "assigned_subgroup": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Role or user group ID"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "role",
                      "user_group"
                    ],
                    "description": "Which kind of subgroup"
                  },
                  "name": {
                    "type": "string",
                    "description": "Display name"
                  }
                },
                "description": "Role or user group the task is assigned to, when not assigned to a person"
              }
            },
            "required": [
              "id",
              "task_id",
              "task_type",
              "date_added",
              "status",
              "priority",
              "mandatory",
              "last_updated"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Whether the task creation was successful"
          }
        },
        "required": [
          "data",
          "messages",
          "success"
        ]
      },
      "response-create_task_definition": {
        "description": "Response payload for /api/v2/tasks/create_task_definition",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "The id of the task definition."
              },
              "name": {
                "type": "string",
                "description": "Task Name"
              },
              "date_added": {
                "type": "string",
                "format": "date-time",
                "description": "Task definition created date"
              },
              "last_updated": {
                "type": "string",
                "format": "date-time",
                "description": "Task definition last updated date"
              },
              "added_by": {
                "type": "string",
                "format": "uuid",
                "description": "Task definition created by"
              },
              "description": {
                "type": "string",
                "description": "Task definition description"
              },
              "scope": {
                "type": "string",
                "enum": [
                  "claim",
                  "policy"
                ],
                "description": "The scope of the task definition."
              }
            },
            "required": [
              "id",
              "name",
              "date_added",
              "last_updated",
              "added_by",
              "scope"
            ]
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-create_task_definitions_assignees": {
        "description": "Response payload for /api/v2/tasks/create_task_definitions_assignees",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "task_definition_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "The ID of the task definition."
                },
                "role_ids": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "description": "List of role IDs assigned to this task definition."
                },
                "user_group_ids": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "description": "List of user group IDs assigned to this task definition."
                }
              },
              "required": [
                "task_definition_id",
                "role_ids",
                "user_group_ids"
              ]
            },
            "description": "List of task definition assignments, aggregated by task definition ID."
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-create_task_note": {
        "description": "Response payload for /api/v2/tasks/create_task_note",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "The id of the note"
              },
              "task_id": {
                "type": "string",
                "format": "uuid",
                "description": "The task the note belongs to"
              },
              "contents": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The note body"
              },
              "author": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Name recorded when the note was written, not a contact reference"
              },
              "created_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "When the note was written"
              },
              "shared_to_policy": {
                "type": "boolean",
                "description": "True when the note was promoted to the task's policy at write time, so it also appears on that policy's Notes tab"
              }
            },
            "required": [
              "id",
              "task_id",
              "contents",
              "author",
              "created_at",
              "shared_to_policy"
            ]
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-create_template_risk_default_value": {
        "type": "object",
        "description": "Response schema for /api/v2/quick_quote_templates/create_template_risk_default_value",
        "properties": {
          "data": {
            "type": "object",
            "description": "The created Template Risk Default Value",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "Unique identifier for the Template Risk Default Value"
              },
              "quick_quote_template_id": {
                "type": "string",
                "format": "uuid",
                "description": "The ID of the Quick Quote Template this risk value belongs to"
              },
              "risk_defaults": {
                "type": "object",
                "description": "The risk data structure",
                "additionalProperties": true
              },
              "risk_type": {
                "type": "string",
                "enum": [
                  "Property",
                  "Vehicle",
                  "Driver",
                  "Watercraft"
                ],
                "description": "The type of risk"
              },
              "version": {
                "type": "integer",
                "description": "Version number for the risk default value"
              }
            },
            "required": [
              "id",
              "quick_quote_template_id",
              "risk_defaults",
              "risk_type",
              "version"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Validation errors organized by field"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-create_watercraft": {
        "type": "object",
        "description": "Response Schema for /api/v2/watercrafts/create_watercraft",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/watercraft-def"
          },
          "failed_rules": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Any business rules that failed during creation"
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Any warnings generated during creation"
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "failed_rules",
          "warnings",
          "success",
          "messages"
        ]
      },
      "response-decline_pending_payment": {
        "description": "Response schema for /api/v2/payments/decline_pending_payment",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Indicates whether the payment decline was successful."
          },
          "messages": {
            "type": "object",
            "description": "Error messages if the operation failed."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-delete_additional_interest": {
        "description": "Response payload for /api/v2/additional_interests/delete_additional_interest.",
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Success or error messages"
          },
          "data": {
            "type": "object",
            "description": "Empty object on successful deletion"
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-delete_adjuster_license": {
        "description": "Response payload for /api/v2/contacts/delete_adjuster_license.",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request was successful"
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Any messages or errors related to the request"
          },
          "data": {
            "type": "object",
            "properties": {
              "license_id": {
                "type": "string",
                "description": "UUID of the deleted license"
              }
            }
          }
        }
      },
      "response-delete_brand": {
        "description": "Response payload for /api/v2/brands/delete_brand",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "success"
        ]
      },
      "response-delete_calculated_field": {
        "description": "Response payload for /api/v2/document_templates/delete_calculated_field",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object"
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "deleted": {
                "type": "boolean"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              }
            },
            "required": [
              "deleted",
              "id"
            ]
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-delete_config": {
        "type": "object",
        "description": "Response for /api/v2/convenience_fees/delete_config. Echoes the scope that was cleared.",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Field-keyed error messages"
              }
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Whether the operation was successful"
          },
          "data": {
            "type": "object",
            "properties": {
              "location_id": {
                "type": "string",
                "format": "uuid",
                "description": "Echo of the scope cleared."
              }
            },
            "required": [
              "location_id"
            ]
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-delete_copilot_skill": {
        "type": "object",
        "description": "Response schema for /api/v2/copilot_skills/delete_copilot_skill",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "deleted": {
                "type": "boolean",
                "description": "Always true on success"
              }
            },
            "required": [
              "deleted"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ],
            "description": "Any messages or errors related to the request"
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-delete_dispute": {
        "type": "object",
        "description": "Response Schema for /api/v2/disputes/delete_dispute. Soft-deletes the dispute, its settlements, and its claim_dates rows; the response carries no payload data.",
        "properties": {
          "data": {
            "type": "null",
            "description": "Always null on success"
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "success",
          "messages"
        ]
      },
      "response-delete_full_quote": {
        "type": "object",
        "description": "Response Schema for delete_full_quote",
        "properties": {
          "data": {
            "type": "object",
            "description": "Empty object"
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-delete_html_template": {
        "type": "object",
        "description": "Response schema for /api/v2/deliverables/delete_html_template",
        "properties": {
          "data": {
            "type": "object",
            "description": "Empty object"
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-delete_quick_code_value": {
        "type": "object",
        "description": "Response payload for /api/v2/quick_code_values/delete_quick_code_value.",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the deletion was successful"
          },
          "data": {
            "type": "object",
            "description": "Response data",
            "properties": {
              "success": {
                "type": "boolean",
                "description": "Whether the deletion was successful"
              },
              "message": {
                "type": "string",
                "description": "Success or error message"
              }
            }
          },
          "messages": {
            "type": "object",
            "description": "Any messages or errors"
          }
        },
        "required": [
          "success"
        ]
      },
      "response-delete_quick_quote_template": {
        "type": "object",
        "description": "Response schema for /api/v2/quick_quote_templates/delete_quick_quote_template",
        "properties": {
          "data": {
            "type": "object",
            "description": "Success message for template deletion",
            "properties": {
              "message": {
                "type": "string",
                "description": "Confirmation message"
              }
            },
            "required": [
              "message"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "string",
                    "description": "Base error message"
                  }
                },
                "additionalProperties": {
                  "type": "string"
                },
                "description": "Any error messages related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-delete_rule": {
        "type": "object",
        "description": "Response payload for /api/v2/rules/delete_rule",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the API call succeeded"
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Error messages if success is false"
          },
          "data": {
            "type": "object",
            "properties": {
              "success": {
                "type": "boolean",
                "description": "Whether the rule was successfully deleted"
              }
            }
          }
        }
      },
      "response-delete_sub_line": {
        "description": "Response payload for /api/v2/lines/delete_sub_line",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ]
          },
          "data": {
            "oneOf": [
              {
                "type": "object",
                "description": "Success payload",
                "properties": {
                  "deleted_items": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "Number of child line items deleted alongside the subline"
                  },
                  "affected_policies": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Policy numbers of active policies that referenced the subline at delete time"
                  }
                },
                "required": [
                  "deleted_items",
                  "affected_policies"
                ]
              },
              {
                "type": "array",
                "maxItems": 0,
                "items": {},
                "description": "Empty list returned by standard_error on validation/lookup failures"
              }
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-delete_subjectivity": {
        "type": "object",
        "description": "Response schema for /api/v2/subjectivities/delete_subjectivity",
        "properties": {
          "data": {
            "type": "array",
            "description": "Empty array returned when the request is successful.",
            "items": {}
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-delete_task_definition": {
        "description": "Response payload for /api/v2/tasks/delete_task_definition",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "success": {
                "type": "boolean",
                "description": "Whether the deletion was successful"
              },
              "message": {
                "type": "string",
                "description": "Success or error message"
              }
            },
            "required": [
              "success",
              "message"
            ]
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-delete_template_risk_default_value": {
        "type": "object",
        "description": "Response schema for /api/v2/quick_quote_templates/delete_template_risk_default_value",
        "properties": {
          "data": {
            "type": "object",
            "description": "Success message for risk default value deletion",
            "properties": {
              "message": {
                "type": "string",
                "description": "Confirmation message"
              }
            },
            "required": [
              "message"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "string",
                    "description": "Base error message"
                  }
                },
                "additionalProperties": {
                  "type": "string"
                },
                "description": "Any error messages related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-delete_watercraft": {
        "type": "object",
        "description": "Response Schema for /api/v2/watercrafts/delete_watercraft",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "success": {
                "type": "boolean",
                "description": "Indicates if the deletion was successful"
              }
            },
            "required": [
              "success"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-disbursement_funding_archive_account": {
        "description": "Response schema for /api/v2/disbursement_funding/archive_account. Archives an orphaned anchor. An unknown id is not an error: success is true and data is an empty array (the standard envelope's no-result payload, not a JSON null).",
        "type": "object",
        "properties": {
          "data": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/disbursement_funding_account-def"
              },
              {
                "type": "array",
                "maxItems": 0,
                "items": {},
                "description": "Always empty. The standard envelope renders an absent result as an empty data list; the items schema is vacuous because no element can be present."
              }
            ],
            "description": "The archived anchor, or an empty array when the id is unknown."
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ],
            "description": "Any messages or errors related to the request"
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-disbursement_funding_check_source_balance": {
        "description": "Response schema for /api/v2/disbursement_funding/check_source_balance. The funding source's ADVISORY available balance. The vendor marks this figure non-authoritative, so it is an indication rather than a guarantee: a real shortfall surfaces as a rejected top-up, not here. SUCCESS-SCOPED: this models the success envelope only. A rejected request -- an unknown or archived funding_source_id, or one from another integration instance -- comes back as the platform's standard failure envelope (success false, data an empty array, messages carrying the reason), which this schema deliberately does not model.",
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "available": {
                "type": [
                  "number",
                  "string",
                  "null"
                ],
                "description": "Dollars available on the source, or NULL when the peek was UNAVAILABLE (vendor unreachable, or the integration is not connected). Null is NOT zero and must not render the same way -- showing $0.00 for an unreachable vendor tells an operator their funding source is empty when it may be full. Render null as 'Unavailable'. When present it is a JSON number: the service dumps a Decimal and simplejson renders it natively."
              }
            },
            "required": [
              "available"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful. True even when available is null -- an unavailable peek is a normal outcome for an advisory read, not a failed request."
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ],
            "description": "Any messages or errors related to the request"
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-disbursement_funding_describe_connection": {
        "description": "Response schema for /api/v2/disbursement_funding/describe_connection. The console's entry read: whether funding is configured on this site, under which integration instance, and what this caller is permitted to do. A caller with no session (a trusted bin/ driver rather than a browser) gets both capability flags as false rather than a guess.",
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "connected": {
                "type": "boolean",
                "description": "True when exactly one active funding integration instance is configured."
              },
              "integration_instance_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "The resolved instance id; null unless connected."
              },
              "instance_count": {
                "type": "integer",
                "minimum": 0,
                "description": "Active funding integration instances found."
              },
              "can_configure": {
                "type": "boolean",
                "description": "True when this caller holds britecore/payments/funding/configuration at 'rw' -- the account and funding-source configuration writes. ADVISORY: it exists so the screen can disable an action it knows will be refused and say why, instead of letting the operator click it and read an error. Nothing is trusted to it; every write is gated independently at the gateway."
              },
              "can_move_money": {
                "type": "boolean",
                "description": "True when this caller holds britecore/payments/funding/topUp at 'rw'. Deliberately separate from can_configure: holding configuration rights must not imply moving money. ADVISORY, exactly as can_configure -- top_up re-checks the same path in the service, so forging this flag gains nothing."
              }
            },
            "required": [
              "connected",
              "integration_instance_id",
              "instance_count",
              "can_configure",
              "can_move_money"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ],
            "description": "Any messages or errors related to the request"
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-disbursement_funding_get_financial_account_balance": {
        "description": "Response schema for /api/v2/disbursement_funding/get_financial_account_balance. The financial account's LIVE balance, read from the vendor and stored nowhere -- this is what Refresh re-reads. Money is in dollars: the integration point speaks integer cents and the service re-denominates at that boundary.",
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "available": {
                "type": [
                  "number",
                  "string"
                ],
                "description": "Dollars available to spend now. Emitted as a JSON NUMBER: the schema dumps a Decimal and simplejson renders it natively (and parses it back to Decimal). The string form is accepted for clients that stringify money."
              },
              "incoming": {
                "type": [
                  "number",
                  "string"
                ],
                "description": "Dollars pulled in but not yet settled. Two known MVP limits, both deliberate (BC-23640): the computed figure does not follow pagination (one call, limit 100) and does not count the payments-balance payout rail. Treat it as indicative, not exact. Emitted as a JSON NUMBER: the schema dumps a Decimal and simplejson renders it natively (and parses it back to Decimal). The string form is accepted for clients that stringify money."
              },
              "outbound_pending": {
                "type": [
                  "number",
                  "string"
                ],
                "description": "Dollars committed to payments that have not yet left the account. Emitted as a JSON NUMBER: the schema dumps a Decimal and simplejson renders it natively (and parses it back to Decimal). The string form is accepted for clients that stringify money."
              }
            },
            "required": [
              "available",
              "incoming",
              "outbound_pending"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ],
            "description": "Any messages or errors related to the request"
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-disbursement_funding_link_funding_source": {
        "description": "Response schema for /api/v2/disbursement_funding/link_funding_source. First-time link of a live vendor source into BriteCore's waterfall; the upsert also revives a previously archived row. Leaves a frozen audit note.",
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/disbursement_funding_source-def"
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ],
            "description": "Any messages or errors related to the request"
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-disbursement_funding_list_financial_account_transactions": {
        "description": "Response schema for /api/v2/disbursement_funding/list_financial_account_transactions. One page of the financial account's LIVE vendor ledger, money re-denominated from integer cents to dollars at the service boundary. A row carries credit, debit, trailing_balance, description and, when the integration system supplies it, posted_at -- there is still no entry id, type or status in the integration contract, so a column needing one cannot be rendered from this feed.",
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "transactions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "credit": {
                      "type": [
                        "number",
                        "string"
                      ],
                      "description": "Dollars into the account on this entry. Money in. Emitted as a JSON NUMBER: the schema dumps a Decimal and simplejson renders it natively (and parses it back to Decimal). The string form is accepted for clients that stringify money."
                    },
                    "debit": {
                      "type": [
                        "number",
                        "string"
                      ],
                      "description": "Dollars out of the account on this entry. Money out. Emitted as a JSON NUMBER: the schema dumps a Decimal and simplejson renders it natively (and parses it back to Decimal). The string form is accepted for clients that stringify money."
                    },
                    "trailing_balance": {
                      "type": [
                        "number",
                        "string"
                      ],
                      "description": "The account's dollar balance after this entry. Emitted as a JSON NUMBER: the schema dumps a Decimal and simplejson renders it natively (and parses it back to Decimal). The string form is accepted for clients that stringify money."
                    },
                    "description": {
                      "type": "string",
                      "description": "The vendor's description of the entry. The only human-readable label available -- there is no type or status field."
                    },
                    "posted_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the entry posted, as the vendor stamps it (ISO-8601), passed through verbatim. Absent or null until the integration system supplies it (the service passes the vendor arm through, so an integration system that omits the field yields no key rather than an explicit null) -- the field is optional on the integration contract so BriteCore could accept it before every integration system emits it. BriteCore never derives it."
                    }
                  }
                },
                "description": "The page's ledger entries, in the vendor's order."
              },
              "next_pagination_cursor": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Pass back as 'cursor' to fetch the next page. Absent or null means this is the last page, which is how the caller decides whether to offer Load more."
              }
            },
            "required": [
              "transactions"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ],
            "description": "Any messages or errors related to the request"
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-disbursement_funding_list_funding_requests": {
        "description": "Response schema for /api/v2/disbursement_funding/list_funding_requests. One page of the financial account's money-IN log, NEWEST FIRST -- the reverse of every other funding read, because an audit trail is read newest-first while the money paths need the original pool / waterfall order.",
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "items": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/disbursement_funding_request-def"
                },
                "description": "The page's log rows, newest first."
              },
              "has_more": {
                "type": "boolean",
                "description": "Whether a further page exists. Derived by reading one row past the page rather than by a COUNT over an append-only table that only grows."
              }
            },
            "required": [
              "items",
              "has_more"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ],
            "description": "Any messages or errors related to the request"
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-disbursement_funding_list_funding_sources": {
        "description": "Response schema for /api/v2/disbursement_funding/list_funding_sources. The live vendor source set left-joined with BriteCore's stored waterfall state, in the engine's waterfall order (priority, then dateAdded, then id -- so a tie comes back the way the auto top-up reads it, and the first row is the default source) with never-linked sources last. source_id and priority are null for a source BriteCore has never stored: that is the link_funding_source case, while a stored row re-positions through set_source_priority.",
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "vendor_reference_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 255,
                      "description": "The vendor's funding-source handle."
                    },
                    "vendor_display": {
                      "type": "string",
                      "description": "Vendor-provided label, e.g. institution and last four, or a payments-balance label."
                    },
                    "vendor_status": {
                      "type": "string",
                      "description": "Vendor-provided status string."
                    },
                    "source_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid",
                      "description": "BriteCore row id; null when the source has never been linked."
                    },
                    "priority": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 1,
                      "description": "Waterfall position; null when the source has never been linked."
                    }
                  },
                  "required": [
                    "vendor_reference_id",
                    "vendor_display",
                    "vendor_status",
                    "source_id",
                    "priority"
                  ]
                }
              }
            },
            "required": [
              "items"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ],
            "description": "Any messages or errors related to the request"
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-disbursement_funding_manage_account": {
        "description": "Response schema for /api/v2/disbursement_funding/manage_account. Onboards a discoverable vendor account as a BriteCore anchor and returns it. The insert is idempotent, so re-onboarding the same handle yields the existing anchor rather than a duplicate.",
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/disbursement_funding_account-def"
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ],
            "description": "Any messages or errors related to the request"
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-disbursement_funding_reconcile_view": {
        "description": "Response schema for /api/v2/disbursement_funding/reconcile_view. Diffs the live vendor account set against BriteCore's stored anchors and persists nothing. There is deliberately no drifted state: the vendor owns all account state, so a stored anchor either still exists at the vendor (matched) or does not (orphaned).",
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "matched": {
                "type": "array",
                "description": "Present in both the live vendor set and BriteCore's anchors: the healthy case.",
                "items": {
                  "type": "object",
                  "properties": {
                    "vendor_reference_id": {
                      "type": "string",
                      "description": "The handle both sides share."
                    },
                    "stored": {
                      "$ref": "#/components/schemas/disbursement_funding_account-def"
                    },
                    "vendor": {
                      "$ref": "#/components/schemas/disbursement_funding_vendor_account-def"
                    }
                  },
                  "required": [
                    "vendor_reference_id",
                    "stored",
                    "vendor"
                  ]
                }
              },
              "discoverable": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/disbursement_funding_vendor_account-def"
                },
                "description": "At the vendor but not stored: onboard with manage_account."
              },
              "orphaned": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/disbursement_funding_account-def"
                },
                "description": "Stored but no longer returned by the vendor: clear with archive_account."
              }
            },
            "required": [
              "matched",
              "discoverable",
              "orphaned"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ],
            "description": "Any messages or errors related to the request"
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-disbursement_funding_request_source_entry": {
        "description": "Response schema for /api/v2/disbursement_funding/request_source_entry. Mints a vendor source-entry session and returns the embed payload verbatim. The payload is vendor-shaped and modeled nowhere in BriteCore, so its keys are deliberately unconstrained; mounting it is BC-23257.",
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "additionalProperties": true,
            "description": "Vendor-shaped embed payload, rendered verbatim."
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ],
            "description": "Any messages or errors related to the request"
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-disbursement_funding_set_source_priority": {
        "description": "Response schema for /api/v2/disbursement_funding/set_source_priority. Re-positions an already-linked source and leaves a frozen audit note. An unknown id is not an error: success is true and data is an empty array (the standard envelope's no-result payload, not a JSON null). Use link_funding_source for a source BriteCore has never stored.",
        "type": "object",
        "properties": {
          "data": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/disbursement_funding_source-def"
              },
              {
                "type": "array",
                "maxItems": 0,
                "items": {},
                "description": "Always empty. The standard envelope renders an absent result as an empty data list; the items schema is vacuous because no element can be present."
              }
            ],
            "description": "The updated row, or an empty array when the id is unknown."
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ],
            "description": "Any messages or errors related to the request"
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-disbursement_funding_top_up": {
        "description": "Response schema for /api/v2/disbursement_funding/top_up. The persisted money-IN log row recording the pull and its outcome. IMPORTANT: success true means the request was PROCESSED AND RECORDED, not that money arrived -- read data.outcome for that. A 'transport_failed' outcome comes back with success true and means the outcome is UNKNOWN and money may have moved.",
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/disbursement_funding_request-def"
          },
          "success": {
            "type": "boolean",
            "description": "Whether the request was processed and recorded. Not a statement about whether money arrived."
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ],
            "description": "Any messages or errors related to the request. Two refusals arrive here rather than as an outcome, because no pull was attempted: a request_id already in flight, and an unavailable funding lock (fail-closed, no money moved). A message reporting that a pull was attempted but its audit row did not persist means MONEY MAY HAVE MOVED and must be reconciled against the live feed, never retried blindly."
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-disbursements_admin_terminate": {
        "description": "Response schema for /api/v2/disbursements/admin_terminate",
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/disbursement_attempt-def"
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ],
            "description": "Any messages or errors related to the request"
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-disbursements_aggregates": {
        "description": "Response schema for /api/v2/disbursements/aggregates",
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "by_state": {
                "type": "object",
                "properties": {
                  "pending": {
                    "type": "object",
                    "properties": {
                      "count": {
                        "type": "integer"
                      },
                      "amount": {
                        "type": [
                          "number",
                          "string"
                        ]
                      }
                    },
                    "required": [
                      "count",
                      "amount"
                    ]
                  },
                  "in_transit": {
                    "type": "object",
                    "properties": {
                      "count": {
                        "type": "integer"
                      },
                      "amount": {
                        "type": [
                          "number",
                          "string"
                        ]
                      }
                    },
                    "required": [
                      "count",
                      "amount"
                    ]
                  },
                  "settled": {
                    "type": "object",
                    "properties": {
                      "count": {
                        "type": "integer"
                      },
                      "amount": {
                        "type": [
                          "number",
                          "string"
                        ]
                      }
                    },
                    "required": [
                      "count",
                      "amount"
                    ]
                  },
                  "failed": {
                    "type": "object",
                    "properties": {
                      "count": {
                        "type": "integer"
                      },
                      "amount": {
                        "type": [
                          "number",
                          "string"
                        ]
                      }
                    },
                    "required": [
                      "count",
                      "amount"
                    ]
                  }
                }
              }
            },
            "required": [
              "by_state"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ],
            "description": "Any messages or errors related to the request"
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-disbursements_cancel": {
        "description": "Response schema for /api/v2/disbursements/cancel",
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/disbursement_attempt-def"
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ],
            "description": "Any messages or errors related to the request"
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-disbursements_check_vendor": {
        "description": "Response schema for /api/v2/disbursements/check_vendor",
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/disbursement_attempt-def"
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ],
            "description": "Any messages or errors related to the request"
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-disbursements_get_detail": {
        "description": "Response schema for /api/v2/disbursements/get_detail",
        "type": "object",
        "properties": {
          "data": {
            "description": "Full attempt (with folded `enrichment`) when the row exists. Absent row -> the standard-response envelope emits an empty array (`[]`) for `data`; `null` is also tolerated.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/disbursement_attempt-def"
              },
              {
                "type": "null"
              },
              {
                "type": "array",
                "items": {},
                "maxItems": 0
              }
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ],
            "description": "Any messages or errors related to the request"
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-disbursements_issue": {
        "description": "Response schema for /api/v2/disbursements/issue",
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "description": "Per-item outcome of an issue/retry.",
                  "properties": {
                    "disbursement_attempt": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/disbursement_attempt-def"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "success": {
                      "type": "boolean"
                    },
                    "outcome": {
                      "type": "string"
                    },
                    "error": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "retry_after_seconds": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "outcome"
                  ]
                }
              }
            },
            "required": [
              "items"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ],
            "description": "Any messages or errors related to the request"
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-disbursements_list_disbursements": {
        "description": "Response schema for /api/v2/disbursements/list_disbursements",
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "items": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/disbursement_attempt-def"
                }
              },
              "page": {
                "type": "integer"
              },
              "page_size": {
                "type": "integer"
              },
              "total": {
                "type": "integer"
              }
            },
            "required": [
              "items",
              "page",
              "page_size",
              "total"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ],
            "description": "Any messages or errors related to the request"
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-disbursements_needs_attention": {
        "description": "Response schema for /api/v2/disbursements/needs_attention",
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "items": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/disbursement_attempt-def"
                }
              },
              "page": {
                "type": "integer"
              },
              "page_size": {
                "type": "integer"
              },
              "total": {
                "type": "integer"
              },
              "count": {
                "type": "integer"
              },
              "amount_sum": {
                "type": [
                  "number",
                  "string"
                ]
              }
            },
            "required": [
              "items",
              "page",
              "page_size",
              "total",
              "count",
              "amount_sum"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ],
            "description": "Any messages or errors related to the request"
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-disbursements_obligation_history": {
        "description": "Response schema for /api/v2/disbursements/obligation_history",
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "items": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/disbursement_attempt-def"
                }
              }
            },
            "required": [
              "items"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ],
            "description": "Any messages or errors related to the request"
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-disbursements_record_manual": {
        "description": "Response schema for /api/v2/disbursements/record_manual",
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/disbursement_attempt-def"
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ],
            "description": "Any messages or errors related to the request"
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-disbursements_source_enrichment": {
        "description": "Response schema for /api/v2/disbursements/source_enrichment",
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "description": "SPARSE map of disbursement_attempt_id -> enrichment. Keyed only by ids that resolve to an existing attempt: a well-formed id with no row (deleted / stale) is OMITTED, not an error and not an empty-value key. A present key is a found attempt (value is always a full enrichment object); an absent key is an unknown/stale id.",
            "additionalProperties": {
              "type": "object",
              "description": "Per-attempt source enrichment.",
              "properties": {
                "payee_name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "obligation_has_live_successor": {
                  "type": "boolean"
                },
                "source": {
                  "type": "object",
                  "description": "Commission source block for Commission Payment obligations; {} for RP/Claim."
                }
              }
            }
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ],
            "description": "Any messages or errors related to the request"
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-disbursements_unissued_obligations": {
        "description": "Response schema for /api/v2/disbursements/unissued_obligations (BC-24980). Rows are obligations with NO disbursement_attempts row; the whole page carries one funding-gate verdict, and every row's unissued_state follows it (awaiting_funds iff funding_gate.blocked).",
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "items": {
                "type": "array",
                "description": "One page of un-issued obligations, newest first (date_added desc).",
                "items": {
                  "type": "object",
                  "properties": {
                    "transaction_type": {
                      "type": "string",
                      "enum": [
                        "Commission Payment"
                      ],
                      "description": "Obligation type. Commission Payment only in this build."
                    },
                    "transaction_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "The obligation id (commission_payments.id). The key issue / obligation_history / record_manual take as transaction_id."
                    },
                    "payee_contact_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid",
                      "description": "Payee contact (commission_payments.payeeId)."
                    },
                    "payee_name": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Payee contact name (folded in; there is no attempt id for source_enrichment to key on)."
                    },
                    "payment_method_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid",
                      "description": "Saved ACH payment method the export would dispatch with. Never null for a claimable row (a null method is not ACH-eligible), typed nullable for forward compatibility."
                    },
                    "amount": {
                      "type": "string",
                      "description": "Obligation amount (commission pay_amount, USD, 2 decimal places)."
                    },
                    "transaction_date": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Commission transaction date (ISO datetime); its year-month is the commission month."
                    },
                    "date_added": {
                      "type": "string",
                      "description": "When the obligation was created (ISO datetime)."
                    },
                    "unissued_state": {
                      "type": "string",
                      "enum": [
                        "ready_to_send",
                        "awaiting_funds"
                      ],
                      "description": "Why the obligation has no attempt. ready_to_send: nothing stands in the way, the next commission export claims it. awaiting_funds: the funding gate would refuse the selection right now (funding_gate.blocked) -- the remedy is a top-up. A state, not display copy."
                    }
                  },
                  "required": [
                    "transaction_type",
                    "transaction_id",
                    "amount",
                    "date_added",
                    "unissued_state"
                  ]
                }
              },
              "page": {
                "type": "integer"
              },
              "page_size": {
                "type": "integer"
              },
              "total": {
                "type": "integer",
                "description": "Total un-issued obligations across all pages (the whole claimable selection)."
              },
              "funding_gate": {
                "type": "object",
                "description": "The whole-selection funding-gate verdict -- the SAME rule the commission export applies up front, all-or-nothing over the full claimable selection, so the page and the export agree.",
                "properties": {
                  "applied": {
                    "type": "boolean",
                    "description": "True when a live pool balance was read and compared. False when the gate FAILED OPEN (funding not configured, or the balance read failed -- the vendor rail is the authoritative NSF backstop) or when there was nothing to gate; nothing is blocked in that case."
                  },
                  "available": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Funding pool available balance (USD, 2 decimal places) when applied; null otherwise."
                  },
                  "obligation_total": {
                    "type": "string",
                    "description": "SUM of the claimable selection's amounts (USD, 2 decimal places) -- what the export would need to cover."
                  },
                  "blocked": {
                    "type": "boolean",
                    "description": "applied AND available < obligation_total. When true every row is awaiting_funds; when false every row is ready_to_send."
                  }
                },
                "required": [
                  "applied",
                  "available",
                  "obligation_total",
                  "blocked"
                ]
              }
            },
            "required": [
              "items",
              "page",
              "page_size",
              "total",
              "funding_gate"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ],
            "description": "Any messages or errors related to the request"
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-documents_templates": {
        "description": "Response payload for POST /api/v2/agents/documents_templates",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "data": {
            "type": "object",
            "properties": {
              "response": {
                "type": "string",
                "description": "Agent response text"
              },
              "session_id": {
                "type": "string",
                "format": "uuid",
                "description": "Session ID for conversation continuity"
              },
              "generated_files": {
                "type": "array",
                "description": "List of files generated by the agent",
                "items": {
                  "type": "string",
                  "description": "Filename (e.g., document_template.docx)"
                }
              },
              "metadata": {
                "type": "object",
                "description": "Agent execution metadata",
                "properties": {
                  "agent": {
                    "type": "object",
                    "description": "Agent identification",
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "Agent identifier"
                      },
                      "display_name": {
                        "type": "string",
                        "description": "Agent display name"
                      }
                    }
                  },
                  "usage": {
                    "type": "object",
                    "description": "LLM usage statistics",
                    "properties": {
                      "prompt_tokens": {
                        "type": "integer",
                        "description": "Tokens in the prompt"
                      },
                      "completion_tokens": {
                        "type": "integer",
                        "description": "Tokens in the completion"
                      },
                      "total_tokens": {
                        "type": "integer",
                        "description": "Total tokens used"
                      },
                      "model_name": {
                        "type": "string",
                        "description": "LLM model used"
                      }
                    }
                  },
                  "tools_used": {
                    "type": "array",
                    "description": "List of tools invoked during execution",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "Tool name"
                        },
                        "execution_time_ms": {
                          "type": "integer",
                          "description": "Tool execution time in milliseconds"
                        }
                      }
                    }
                  },
                  "execution_time_ms": {
                    "type": "integer",
                    "description": "Total request execution time in milliseconds"
                  }
                }
              }
            }
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Error message if request failed"
          }
        },
        "required": [
          "success"
        ]
      },
      "response-documents_templates_carbone_context": {
        "type": "object",
        "description": "Response payload for POST /api/v2/agents/documents_templates_carbone_context. Returns the Carbone context (live or example) with calculated fields applied, a `_schema` map describing fields whose meaning isn't obvious from their key name, and - in example mode with a resolved policy type - `_allowed_item_names` and `_resolved_policy_types`.",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "data": {
            "type": "object",
            "description": "The Carbone context (live or example). Includes a `_schema` map describing fields whose meaning is not obvious from the key name, and, when a policy type resolved in example mode, the two grounding sidecars below. All three are underscore-prefixed so the MCP's field-summary builder skips them as mappable paths.",
            "additionalProperties": true,
            "properties": {
              "_schema": {
                "type": "object",
                "description": "Path-to-description map. Keys use Carbone placeholder syntax: `[i]` for arrays, dot-walk for objects. Calc fields appear under `<path>.calculated.<field_name>`.",
                "additionalProperties": {
                  "type": "string"
                }
              },
              "_allowed_item_names": {
                "type": "object",
                "description": "The configured item-name catalog for the resolved policy type(s), keyed by the Carbone container the name belongs in ('policy', 'Property', 'Vehicle', 'Watercraft'), each a list of {name, type}. These are the only values a [name='...'] key filter can match; a name copied from a form's printed label renders an empty cell and reports no error. Uncapped, unlike the generated items. Omitted when no policy type resolved."
              },
              "_resolved_policy_types": {
                "type": "array",
                "items": {
                  "type": "object"
                },
                "description": "{id, name, location_id, type, line} per policy type the request resolved - the handle for fetching richer per-policy-type detail. More than one entry only for an All-Locations selection. Omitted when nothing resolved."
              }
            }
          }
        },
        "required": [
          "success"
        ]
      },
      "response-download_import_schema": {
        "type": "object",
        "description": "Response schema for /api/v2/imports/download_import_schema",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "type": "array",
            "description": "Array of informational or error messages",
            "items": {
              "type": "string"
            }
          },
          "data": {
            "type": "object",
            "description": "Response data containing schema download information",
            "properties": {
              "schemas": {
                "type": "array",
                "description": "List of schema files with download URLs",
                "items": {
                  "type": "object",
                  "properties": {
                    "schema_type": {
                      "type": "string",
                      "description": "Schema identifier"
                    },
                    "schema_name": {
                      "type": "string",
                      "description": "Human-readable schema name"
                    },
                    "download_url": {
                      "type": "string",
                      "format": "uri",
                      "description": "Pre-signed S3 URL for downloading the CSV template (valid for 1 hour)"
                    },
                    "file_name": {
                      "type": "string",
                      "description": "Name of the CSV file"
                    }
                  },
                  "required": [
                    "schema_type",
                    "schema_name",
                    "download_url",
                    "file_name"
                  ]
                }
              },
              "errors": {
                "type": [
                  "array",
                  "null"
                ],
                "description": "List of errors encountered during schema generation",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": [
              "schemas"
            ]
          }
        },
        "required": [
          "success",
          "messages",
          "data"
        ]
      },
      "response-download_report_file": {
        "type": "object",
        "description": "Response for /api/v2/reports/download_report_file with as_url. Without as_url the endpoint answers 303 See Other with a Location header pointing at the presigned url, and web.py writes the status line as the body, so S3 serves the file and the web worker never buffers it. An unknown file_id returns the standard_error envelope; a report the caller cannot read returns {permissionDenied: true, success: false, permissionDeniedMessage, messages}.",
        "properties": {
          "success": {
            "type": "boolean",
            "title": "success",
            "description": "True when the url was issued"
          },
          "messages": {
            "type": "array",
            "title": "messages",
            "description": "Error messages; empty on success",
            "items": {
              "type": "string"
            }
          },
          "data": {
            "type": "object",
            "title": "data",
            "description": "The url a browser navigates to, and the name to save it as",
            "properties": {
              "download_url": {
                "type": "string",
                "title": "download_url",
                "description": "Presigned S3 url, valid one hour, carrying the filename and content type. When no presign can be built (S3 backup off, object not uploaded, id is a folder) this is a same-origin /gateway getAttachmentFromS3 url with force_attachment=1, which re-checks the per-report ACL and serves the bytes."
              },
              "filename": {
                "type": "string",
                "title": "filename",
                "description": "Report file name, extension included"
              },
              "presigned": {
                "type": "boolean",
                "title": "presigned",
                "description": "True when download_url is a presigned S3 url. False when it is the same-origin gateway fallback, which means the object could not be presigned and may not be readable, so a caller that wants to warn before navigating can tell the two apart."
              }
            },
            "required": [
              "download_url",
              "filename",
              "presigned"
            ]
          }
        },
        "required": [
          "success",
          "messages",
          "data"
        ]
      },
      "response-edit_attachment": {
        "type": "object",
        "description": "Response Schema for /api/v2/attachments/edit_attachment",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/file-def"
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "$ref": "#/components/schemas/messages-def"
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-enable_business_location_with_all_counties": {
        "description": "Response payload for /api/v2/business_locations/enable_business_location_with_all_counties",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Business location with all counties enabled",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "The unique identifier of the business location"
              },
              "abbreviation": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Business location abbreviation"
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Business location name"
              },
              "counties": {
                "type": "array",
                "description": "List of all counties for the state",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "County name"
                    },
                    "fips": {
                      "type": "string",
                      "description": "FIPS code for the county"
                    }
                  }
                }
              },
              "life_cycle_parameters": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Life cycle parameters for the location"
              },
              "checked": {
                "type": "boolean",
                "description": "Whether the location is enabled/checked"
              }
            },
            "required": [
              "id",
              "checked"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Whether the operation was successful"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-enable_disable_contact": {
        "description": "Response payload for /api/v2/contacts/enable_or_disable_contact",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "active": {
                "type": "boolean"
              }
            }
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-ensure_receipt": {
        "type": "object",
        "description": "Response schema for /api/v2/payments/ensure_receipt",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Validation or error messages"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Receipt data when success is true",
            "properties": {
              "file_id": {
                "type": "string",
                "format": "uuid",
                "description": "UUID of the receipt file"
              },
              "policy_number": {
                "type": "string",
                "description": "Policy number the receipt is for"
              },
              "generated": {
                "type": "boolean",
                "description": "True if the receipt was generated for this request; false if an existing receipt was returned"
              },
              "policy_index": {
                "type": "integer",
                "description": "Index of the policy in the payment's policy list"
              },
              "attachment_filename": {
                "type": "string",
                "description": "Suggested filename for the receipt PDF (e.g. for download or email attachment)"
              }
            },
            "required": [
              "file_id",
              "policy_number",
              "generated",
              "policy_index",
              "attachment_filename"
            ]
          }
        },
        "required": [
          "success",
          "messages",
          "data"
        ]
      },
      "response-evaluate_contact_screening": {
        "description": "Response payload for /api/v2/quotes/evaluate_contact_screening",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "screening_contacts": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "individual",
                        "organization"
                      ]
                    },
                    "dob": {
                      "type": "string",
                      "pattern": "^xx-xx-[0-9]{4}$"
                    },
                    "ssn": {
                      "type": "string",
                      "pattern": "xxx-xx-[0-9]{4}$"
                    },
                    "addresses": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "address_line1": {
                            "type": "string"
                          },
                          "address_line2": {
                            "type": "string"
                          },
                          "address_city": {
                            "type": "string"
                          },
                          "address_state": {
                            "type": "string"
                          },
                          "address_zip": {
                            "type": "string"
                          },
                          "address_country": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "address_line1",
                          "address_city",
                          "address_state",
                          "address_zip"
                        ]
                      }
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "type",
                    "addresses"
                  ]
                }
              },
              "all_results": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "contact_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "integration_instance_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "screening_result": {
                      "type": "string",
                      "enum": [
                        "pass",
                        "review_required"
                      ]
                    },
                    "screening_message": {
                      "type": "string"
                    },
                    "override_date_time": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "override_reason": {
                      "type": "string"
                    },
                    "overridden_by_contact_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "date_added": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "contact_id",
                    "integration_instance_id",
                    "screening_result",
                    "date_added"
                  ]
                }
              },
              "review_required_results": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "contact_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "integration_instance_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "screening_result": {
                      "type": "string",
                      "enum": [
                        "pass",
                        "review_required"
                      ]
                    },
                    "screening_message": {
                      "type": "string"
                    },
                    "override_date_time": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "override_reason": {
                      "type": "string"
                    },
                    "overridden_by_contact_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "date_added": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "contact_id",
                    "integration_instance_id",
                    "screening_result",
                    "date_added"
                  ]
                }
              }
            },
            "required": [
              "screening_contacts",
              "all_results",
              "review_required_results"
            ]
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-evaluate_convenience_fee_formula": {
        "type": "object",
        "description": "Response payload for /api/v2/payments/evaluate_convenience_fee_formula. Standard envelope: `data.results` is the per-method evaluation dict (each method maps to exactly one of `fee`, `error`, or `inherited`), and `data.messages` are the customer-facing preview lines for the requested disclosure_style.",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Field-keyed error messages"
              }
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Whether the operation was successful"
          },
          "data": {
            "type": "object",
            "properties": {
              "results": {
                "type": "object",
                "description": "Per-method evaluation results. Keys match the request `formulas` dict; missing methods that weren't supplied get the inheritance marker so the admin UI always has all three. Each method maps to exactly one of `fee`, `error`, or `inherited`. The shape is inlined per method (not factored into a shared local definition) so it bundles cleanly into the combined OpenAPI document, where a document-local pointer would resolve against the document root and break validation.",
                "properties": {
                  "cc": {
                    "type": "object",
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "fee": {
                            "type": "string",
                            "description": "Resolved fee as a string-encoded Decimal (matches the production controller's output)."
                          }
                        },
                        "required": [
                          "fee"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "error": {
                            "type": "string",
                            "description": "Human-readable evaluation error (e.g. \"name 'amout' is not defined\", \"Fee formula resulted in a negative amount: -0.50\"). Frontend renders this inline next to the formula field so admins see exactly what's broken."
                          }
                        },
                        "required": [
                          "error"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "inherited": {
                            "type": "boolean",
                            "const": true,
                            "description": "Marker: the formula was empty / omitted. The endpoint is scope-agnostic; the frontend renders a blank formula as $0.00 at every scope -- a state-scope no-fee override, or the Global static $0 default (Global has no parent to inherit from)."
                          }
                        },
                        "required": [
                          "inherited"
                        ]
                      }
                    ]
                  },
                  "ach": {
                    "type": "object",
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "fee": {
                            "type": "string",
                            "description": "Resolved fee as a string-encoded Decimal (matches the production controller's output)."
                          }
                        },
                        "required": [
                          "fee"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "error": {
                            "type": "string",
                            "description": "Human-readable evaluation error (e.g. \"name 'amout' is not defined\", \"Fee formula resulted in a negative amount: -0.50\"). Frontend renders this inline next to the formula field so admins see exactly what's broken."
                          }
                        },
                        "required": [
                          "error"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "inherited": {
                            "type": "boolean",
                            "const": true,
                            "description": "Marker: the formula was empty / omitted. The endpoint is scope-agnostic; the frontend renders a blank formula as $0.00 at every scope -- a state-scope no-fee override, or the Global static $0 default (Global has no parent to inherit from)."
                          }
                        },
                        "required": [
                          "inherited"
                        ]
                      }
                    ]
                  },
                  "debit": {
                    "type": "object",
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "fee": {
                            "type": "string",
                            "description": "Resolved fee as a string-encoded Decimal (matches the production controller's output)."
                          }
                        },
                        "required": [
                          "fee"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "error": {
                            "type": "string",
                            "description": "Human-readable evaluation error (e.g. \"name 'amout' is not defined\", \"Fee formula resulted in a negative amount: -0.50\"). Frontend renders this inline next to the formula field so admins see exactly what's broken."
                          }
                        },
                        "required": [
                          "error"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "inherited": {
                            "type": "boolean",
                            "const": true,
                            "description": "Marker: the formula was empty / omitted. The endpoint is scope-agnostic; the frontend renders a blank formula as $0.00 at every scope -- a state-scope no-fee override, or the Global static $0 default (Global has no parent to inherit from)."
                          }
                        },
                        "required": [
                          "inherited"
                        ]
                      }
                    ]
                  }
                }
              },
              "messages": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Customer-facing preview lines for the requested `disclosure_style`, formatted by PaymentService.format_preview_messages (the single source of truth shared with the saved-config preview). Errored / inherited formulas contribute a $0 fee to these messages."
              }
            },
            "required": [
              "results",
              "messages"
            ]
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-execute_dummy_task": {
        "description": "Response payload for /api/v2/background_jobs/execute_dummy_task",
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Any messages or errors related to the request"
          },
          "data": {
            "type": "object",
            "properties": {
              "task_id": {
                "type": "string",
                "format": "uuid",
                "description": "The ID of the queued celery task"
              },
              "message": {
                "type": "string",
                "description": "The message passed to the task"
              },
              "fail_task": {
                "type": "boolean",
                "description": "Whether the task was configured to fail"
              },
              "hold_transaction_seconds": {
                "type": "integer",
                "description": "How long the transaction was held open"
              },
              "mode": {
                "type": "string",
                "enum": [
                  "normal",
                  "race_condition"
                ],
                "description": "The execution mode used"
              }
            },
            "required": [
              "task_id",
              "message",
              "fail_task",
              "hold_transaction_seconds",
              "mode"
            ]
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-export_configuration": {
        "type": "object",
        "description": "Response Schema for /api/v2/settings/export_configuration. Always the configuration export record, whether the work was queued or happened in the request; poll /api/v2/settings/get_configuration_export with the same id for a queued one.",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "The configuration export. Queued, it comes back at status queued with the background_job_id to poll; run in the request, it is already complete and names the package it produced. The package itself is never in the response: read it from the file the record names, through files/generate_download_url.",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "The record's own id. This is what get_configuration_export is polled with, not the background job id."
              },
              "policy_type_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "The policy type that was exported"
              },
              "skip_forms": {
                "type": "boolean",
                "description": "Whether form files were skipped"
              },
              "status": {
                "type": "string",
                "enum": [
                  "queued",
                  "processing",
                  "complete",
                  "failed"
                ],
                "description": "queued and processing are still moving; complete and failed are terminal. A poller stops on the latter two."
              },
              "file_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The stored package, for files/generate_download_url. Populated once status is complete. Withheld from listings."
              },
              "filename": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Name of the package file"
              },
              "byte_size": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Size of the package in bytes"
              },
              "package_version": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Configuration package format version"
              },
              "error_message": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Populated only when status is failed. Operator-facing text, never raw exception output: an unrecognised failure is reduced to a pointer at the background job record. Capped at 500 characters."
              },
              "background_job_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The run that produced this record. Nullable and ON DELETE SET NULL: jobs are housekeeping and get cleared, and losing the run must not take the record with it."
              },
              "created_by": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Contact id of whoever queued it; null for an API-key caller with no contact"
              },
              "date_added": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "date_updated": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              }
            },
            "required": []
          },
          "success": {
            "type": "boolean",
            "description": "Whether the request was successful"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-export_tasks": {
        "type": "object",
        "description": "Response for /api/v2/tasks/export_tasks. api_request wraps every result in the standard success/messages/data envelope, so the export plan and file live under `data`.",
        "required": [
          "success",
          "data",
          "messages"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ],
            "description": "Any messages or errors related to the request"
          },
          "data": {
            "type": "object",
            "description": "Response for /api/v2/tasks/export_tasks. The export plan is present on every response, whether or not a file was requested, so a client part-way through a multi-file export can compare total_count against the plan it started from and detect the filtered set changing underneath it. content/filename/file_index/row_count are present only when file_index was supplied.",
            "required": [
              "total_count",
              "rows_per_file",
              "total_files",
              "files",
              "columns",
              "filename_timestamp"
            ],
            "properties": {
              "total_count": {
                "type": "integer",
                "description": "Tasks matching the request across the entire filtered set, not the current page. Recomputed on every call, so it is also how a caller detects drift mid-export."
              },
              "rows_per_file": {
                "type": "integer",
                "description": "Maximum data rows per file (TASK_EXPORT_ROWS_PER_FILE), excluding the header row."
              },
              "total_files": {
                "type": "integer",
                "minimum": 1,
                "description": "ceil(total_count / rows_per_file), and always at least 1: an empty result still exports one header-only file, because a download that produces no file is indistinguishable from one that failed."
              },
              "files": {
                "type": "array",
                "description": "Every file the export will produce, in order. Returned whole and up front so the client can show the user exactly what a download is about to produce before it starts.",
                "items": {
                  "type": "object",
                  "required": [
                    "index",
                    "filename",
                    "first_row",
                    "last_row",
                    "row_count"
                  ],
                  "properties": {
                    "index": {
                      "type": "integer",
                      "minimum": 0,
                      "description": "0-based; pass back as file_index to build this file."
                    },
                    "filename": {
                      "type": "string",
                      "description": "Suggested download name, e.g. task-queue-export-20260817-100458-2-of-3.csv."
                    },
                    "first_row": {
                      "type": "integer",
                      "description": "1-based inclusive first row of the filtered set covered by this file, in its current sort order. 0 for the header-only file of an empty export."
                    },
                    "last_row": {
                      "type": "integer",
                      "description": "1-based inclusive last row covered by this file. 0 for the header-only file of an empty export."
                    },
                    "row_count": {
                      "type": "integer",
                      "description": "Data rows in this file, excluding the header."
                    }
                  }
                }
              },
              "columns": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "CSV column headers in order (TASK_EXPORT_COLUMNS). These are the queue's own displayed columns, except that the table's composite leading 'Task' cell is unpacked into Policy / Claim, Task Type, Task Number and Tags, since three stacked values in one CSV cell are unusable in a spreadsheet."
              },
              "filename_timestamp": {
                "type": "string",
                "pattern": "^\\d{8}-\\d{6}$",
                "description": "Site-local timestamp (YYYYMMDD-HHMMSS) baked into every filename in `files`. Send it back as the request's filename_timestamp on each file request so one export's filenames stay consistent with each other and with this plan."
              },
              "file_index": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Echo of the requested file_index. Null on a plan-only response."
              },
              "filename": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Suggested download name for the built file. Null on a plan-only response."
              },
              "content": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The file's CSV text, header row first. Cells whose value would otherwise be evaluated by a spreadsheet as a formula are prefixed with a single quote so they open as text. Null on a plan-only response. NO UTF-8 BOM: the queue prepends one client-side when it writes the file to disk, because that is what makes Excel read the download as UTF-8, and a BOM inside a JSON string field would just be a stray character every programmatic consumer had to strip. A direct API consumer writing this to a file for Excel should prepend \\ufeff itself."
              },
              "row_count": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Data rows actually written to this file. Null on a plan-only response."
              }
            }
          }
        }
      },
      "response-exposure_remap_preview": {
        "type": "object",
        "description": "Response payload for /api/v2/exposure_remap/preview - per-exposure classification plus the coverages available on the target revision.",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "The remap preview",
            "properties": {
              "items": {
                "type": "array",
                "description": "One entry per non-deleted exposure on the claim",
                "items": {
                  "type": "object",
                  "properties": {
                    "exposure_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "coverage_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "sub_line": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "current_coverage_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "RevisionItem or PropertyItem the exposure currently points to"
                    },
                    "suggested_coverage_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Auto-matched item on the target revision (subLine+name, same lineage property for property exposures), if any"
                    },
                    "has_payments": {
                      "type": "boolean"
                    },
                    "has_reserves": {
                      "type": "boolean"
                    },
                    "bucket": {
                      "type": "string",
                      "enum": [
                        "current",
                        "suggested",
                        "unmatched",
                        "payment_blocked"
                      ],
                      "description": "current = already on target revision; suggested = auto-match; unmatched = pick/discard; payment_blocked = void payments first"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "policy",
                        "property"
                      ],
                      "description": "Whether the exposure's coverage is a policy-level (revision_item) or property-level (property_item) coverage"
                    },
                    "property_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid",
                      "description": "Source property of a property-item exposure"
                    },
                    "property_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "discard_suggested": {
                      "type": "boolean",
                      "description": "Property exposure with no equivalent property on the target revision: the dialog pre-selects Discard (cross-property Assign remains available)"
                    }
                  }
                }
              },
              "candidates": {
                "type": "array",
                "description": "Coverages on the target revision that an exposure can be remapped/assigned to",
                "items": {
                  "type": "object",
                  "properties": {
                    "coverage_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "sub_line": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "policy",
                        "property"
                      ]
                    },
                    "property_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "property_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              },
              "payment_blocked": {
                "type": "array",
                "description": "Exposure ids that have payments/recoveries and must be voided before remap",
                "items": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          }
        }
      },
      "response-files_generate_upload_url_for_tmp_file": {
        "description": "Response payload for /api/v2/files/generate_upload_url_for_tmp_file.",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Any messages or errors related to the request"
          },
          "data": {
            "type": "object",
            "properties": {
              "file_id": {
                "type": "string",
                "format": "uuid",
                "description": "The File.id backing the upload, usable directly with generate_download_url once the caller has uploaded."
              },
              "upload_url": {
                "type": "string",
                "format": "uri",
                "description": "Presigned S3 POST URL to upload the file bytes to."
              },
              "upload_fields": {
                "type": "object",
                "description": "Form fields that must accompany the presigned S3 POST, as returned by S3."
              },
              "bucket": {
                "type": "string",
                "description": "S3 bucket the upload lands in."
              },
              "expires_at": {
                "type": "string",
                "format": "date-time",
                "description": "ISO-8601 UTC timestamp when the presigned POST expires."
              }
            },
            "required": [
              "file_id",
              "upload_url",
              "upload_fields",
              "bucket",
              "expires_at"
            ]
          }
        },
        "required": [
          "success",
          "messages",
          "data"
        ]
      },
      "response-filter_subjectivities": {
        "type": "object",
        "description": "Response schema for /api/v2/subjectivities/filter_subjectivities",
        "properties": {
          "data": {
            "type": "array",
            "description": "Array of existing subjectivities that match the filter criteria",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "ID of the subjectivity"
                },
                "revision_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "ID of the revision"
                },
                "subjectivity_definition_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "ID of the subjectivity definition"
                },
                "subjectivity_definition": {
                  "type": "object",
                  "description": "The subjectivity definition associated with this subjectivity",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "ID of the subjectivity definition"
                    },
                    "name": {
                      "type": "string",
                      "description": "Name of the subjectivity definition"
                    },
                    "description": {
                      "type": "string",
                      "description": "Description of the subjectivity definition"
                    },
                    "policy_type_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid",
                      "description": "ID of the policy type"
                    },
                    "policy_type_name": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Name of the policy type"
                    },
                    "mandatory": {
                      "type": "boolean",
                      "description": "Whether the subjectivity is mandatory"
                    },
                    "active": {
                      "type": "boolean",
                      "description": "Whether the subjectivity definition is active"
                    },
                    "due_within_days": {
                      "type": "integer",
                      "description": "Number of days within which the subjectivity is due"
                    },
                    "due_date_type": {
                      "type": "string",
                      "description": "Type of due date calculation"
                    },
                    "statement": {
                      "type": "string",
                      "description": "Statement for the subjectivity definition"
                    },
                    "expiration_action": {
                      "type": "string",
                      "description": "Action to take when the subjectivity expires"
                    },
                    "created_by": {
                      "type": "string",
                      "format": "uuid",
                      "description": "ID of the user who created this definition"
                    },
                    "updated_by": {
                      "type": "string",
                      "format": "uuid",
                      "description": "ID of the user who last updated this definition"
                    },
                    "date_created": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Date and time when this definition was created"
                    },
                    "date_updated": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Date and time when this definition was last updated"
                    }
                  }
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "Satisfied",
                    "Not Satisfied",
                    "Waived",
                    "Expired",
                    "Canceled"
                  ],
                  "description": "Status of the subjectivity"
                },
                "due_date": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Due date for this subjectivity to be met before"
                },
                "assignee": {
                  "type": "string",
                  "format": "uuid",
                  "description": "ID of the assignee"
                },
                "created_by": {
                  "type": "string",
                  "format": "uuid",
                  "description": "ID of the user who created this subjectivity"
                },
                "updated_by": {
                  "type": "string",
                  "format": "uuid",
                  "description": "ID of the user who last updated this subjectivity"
                },
                "date_created": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Date and time when this subjectivity was created"
                },
                "date_updated": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Date and time when this subjectivity was last updated"
                },
                "statement": {
                  "type": "string",
                  "description": "Statement for the subjectivity"
                },
                "description": {
                  "type": "string",
                  "description": "Description of the subjectivity"
                }
              },
              "required": [
                "id",
                "revision_id",
                "subjectivity_definition_id",
                "status",
                "due_date",
                "assignee",
                "created_by",
                "date_created",
                "updated_by",
                "date_updated"
              ]
            }
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-finalize_recovery_candidate": {
        "type": "object",
        "description": "Response schema for /api/v2/deliverables/finalize_recovery_candidate",
        "properties": {
          "data": {
            "type": "object",
            "description": "Result of the finalization step.",
            "properties": {
              "candidate_id": {
                "type": "string",
                "description": "Identifier of the candidate that was finalized."
              },
              "status": {
                "type": "string",
                "enum": [
                  "finalized",
                  "cleaned_up",
                  "skipped"
                ],
                "description": "Outcome: 'finalized' means the replacement file passed S3 verification and the original was deactivated; 'cleaned_up' means the replacement was deleted due to failure or empty S3 content; 'skipped' means the recovery job was not found."
              },
              "replacement_file_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "ID of the verified replacement File, present only when status is 'finalized'."
              },
              "attachment_url": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Gateway URL to download the replacement file via getAttachment, present only when status is 'finalized'."
              },
              "message": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Human-readable outcome message."
              }
            },
            "required": [
              "candidate_id",
              "status"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful."
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request."
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Base error message(s)."
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-finalize_sync": {
        "type": "object",
        "description": "Response Schema for /api/v2/medical_codes/finalize_sync",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "deactivated": {
                "type": "integer",
                "description": "Number of rows deactivated (active flipped to 0) because they were not at the given source_version"
              }
            },
            "required": [
              "deactivated"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-find_contact_by_params": {
        "type": "object",
        "title": "Find Contact By Params Response",
        "description": "Response schema for /api/v2/contacts/find_contact_by_params",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "data": {
            "type": "array",
            "description": "Array of contact objects matching the search criteria",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Unique identifier of the contact",
                  "format": "uuid"
                },
                "name": {
                  "type": "string",
                  "description": "Full name of the contact"
                },
                "ssn_exist": {
                  "type": "boolean",
                  "description": "Indicates whether the contact has an SSN on record"
                },
                "roles": {
                  "type": "array",
                  "description": "Array of role names assigned to the contact",
                  "items": {
                    "type": "string"
                  }
                },
                "emails": {
                  "type": "array",
                  "description": "Array of email addresses associated with the contact",
                  "items": {
                    "type": "object",
                    "properties": {
                      "email": {
                        "type": "string",
                        "format": "email",
                        "description": "Email address"
                      },
                      "type": {
                        "type": "string",
                        "enum": [
                          "Personal",
                          "Work",
                          "Notifications",
                          "Other"
                        ],
                        "description": "Type of email address"
                      },
                      "is_preferred": {
                        "type": "boolean",
                        "description": "Whether this is the preferred email"
                      },
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "description": "Unique identifier of the email record"
                      },
                      "contact_id": {
                        "type": "string",
                        "format": "uuid",
                        "description": "Contact ID this email belongs to"
                      },
                      "date_updated": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When this email was last updated"
                      }
                    },
                    "required": [
                      "email",
                      "type",
                      "is_preferred",
                      "id",
                      "contact_id"
                    ]
                  }
                },
                "phones": {
                  "type": "array",
                  "description": "Array of phone numbers associated with the contact",
                  "items": {
                    "type": "object",
                    "properties": {
                      "phone": {
                        "type": "string",
                        "description": "Phone number"
                      },
                      "type": {
                        "type": "string",
                        "enum": [
                          "Home",
                          "Work",
                          "Cell",
                          "Fax",
                          "Other"
                        ],
                        "description": "Type of phone number"
                      },
                      "is_preferred": {
                        "type": "boolean",
                        "description": "Whether this is the preferred phone"
                      },
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "description": "Unique identifier of the phone record"
                      },
                      "contact_id": {
                        "type": "string",
                        "format": "uuid",
                        "description": "Contact ID this phone belongs to"
                      },
                      "date_updated": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When this phone was last updated"
                      }
                    },
                    "required": [
                      "phone",
                      "type",
                      "is_preferred",
                      "id",
                      "contact_id"
                    ]
                  }
                }
              },
              "required": [
                "id",
                "name",
                "ssn_exist",
                "roles",
                "emails",
                "phones"
              ]
            }
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "success",
          "data",
          "messages"
        ]
      },
      "response-fnol": {
        "description": "Response payload for POST /api/v2/agents/fnol",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "data": {
            "type": "object",
            "properties": {
              "response": {
                "type": "string",
                "description": "Agent response text"
              },
              "session_id": {
                "type": "string",
                "format": "uuid",
                "description": "Session ID for conversation continuity"
              },
              "metadata": {
                "type": "object",
                "description": "Agent execution metadata",
                "properties": {
                  "agent": {
                    "type": "object",
                    "description": "Agent identification",
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "Agent identifier"
                      },
                      "display_name": {
                        "type": "string",
                        "description": "Agent display name"
                      }
                    }
                  },
                  "usage": {
                    "type": "object",
                    "description": "LLM usage statistics",
                    "properties": {
                      "prompt_tokens": {
                        "type": "integer",
                        "description": "Tokens in the prompt"
                      },
                      "completion_tokens": {
                        "type": "integer",
                        "description": "Tokens in the completion"
                      },
                      "total_tokens": {
                        "type": "integer",
                        "description": "Total tokens used"
                      },
                      "model_name": {
                        "type": "string",
                        "description": "LLM model used"
                      }
                    }
                  },
                  "files_analyzed": {
                    "type": "array",
                    "description": "List of files analyzed",
                    "items": {
                      "type": "object",
                      "properties": {
                        "filename": {
                          "type": "string",
                          "description": "Name of the uploaded file"
                        },
                        "media_type": {
                          "type": "string",
                          "description": "File media type"
                        },
                        "file_size": {
                          "type": "integer",
                          "description": "File size in bytes"
                        }
                      }
                    }
                  },
                  "tools_used": {
                    "type": "array",
                    "description": "List of tools invoked during execution",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "Tool name"
                        },
                        "execution_time_ms": {
                          "type": "integer",
                          "description": "Tool execution time in milliseconds"
                        }
                      }
                    }
                  },
                  "execution_time_ms": {
                    "type": "integer",
                    "description": "Total request execution time in milliseconds"
                  }
                }
              }
            }
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Error message if request failed"
          }
        },
        "required": [
          "success"
        ]
      },
      "response-get_accounting_loss_details": {
        "description": "Response payload for /api/v2/claim_exposures/get_accounting_loss_details.",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "exposure_loss_details": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Exposure/claim item UUID"
                    },
                    "claimant_name": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Name of the claimant"
                    },
                    "coverage_name": {
                      "type": "string",
                      "description": "Insurance coverage name"
                    },
                    "loss_name": {
                      "type": "string",
                      "description": "Description of the loss/damage"
                    },
                    "loss_details": {
                      "type": "object",
                      "properties": {
                        "loss_reserve": {
                          "type": "number",
                          "description": "Current loss reserve amount"
                        },
                        "loss_paid": {
                          "type": "number",
                          "description": "Total loss payments made"
                        },
                        "legal_reserve": {
                          "type": "number",
                          "description": "Current legal reserve amount"
                        },
                        "legal_paid": {
                          "type": "number",
                          "description": "Total legal payments made"
                        },
                        "adjusting_reserve": {
                          "type": "number",
                          "description": "Current adjusting reserve amount"
                        },
                        "adjusting_paid": {
                          "type": "number",
                          "description": "Total adjusting payments made"
                        }
                      },
                      "required": [
                        "loss_reserve",
                        "loss_paid",
                        "legal_reserve",
                        "legal_paid",
                        "adjusting_reserve",
                        "adjusting_paid"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "claimant_name",
                    "coverage_name",
                    "loss_name",
                    "loss_details"
                  ]
                },
                "description": "List of exposures with their detailed loss information for the current page"
              },
              "total_loss_details": {
                "type": "object",
                "properties": {
                  "loss_reserve": {
                    "type": "number",
                    "description": "Sum of all exposure loss reserves"
                  },
                  "loss_paid": {
                    "type": "number",
                    "description": "Sum of all exposure loss payments"
                  },
                  "legal_reserve": {
                    "type": "number",
                    "description": "Sum of all exposure legal reserves"
                  },
                  "legal_paid": {
                    "type": "number",
                    "description": "Sum of all exposure legal payments"
                  },
                  "adjusting_reserve": {
                    "type": "number",
                    "description": "Sum of all exposure adjusting reserves"
                  },
                  "adjusting_paid": {
                    "type": "number",
                    "description": "Sum of all exposure adjusting payments"
                  }
                },
                "required": [
                  "loss_reserve",
                  "loss_paid",
                  "legal_reserve",
                  "legal_paid",
                  "adjusting_reserve",
                  "adjusting_paid"
                ]
              },
              "total_records": {
                "type": "integer",
                "description": "Total number of exposures for pagination"
              }
            },
            "required": [
              "exposure_loss_details",
              "total_loss_details",
              "total_records"
            ]
          }
        },
        "required": [
          "success",
          "messages",
          "data"
        ]
      },
      "response-get_accounting_overview": {
        "description": "Response payload for /api/v2/claim_exposures/get_accounting_overview.",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "claim_level_overview": {
                "type": "object",
                "properties": {
                  "total_reserve": {
                    "type": "number",
                    "description": "Always 0.0 at claim level"
                  },
                  "total_payment": {
                    "type": "number",
                    "description": "Always 0.0 at claim level"
                  },
                  "total_incurred": {
                    "type": "number",
                    "description": "Always 0.0 at claim level"
                  },
                  "total_recovery": {
                    "type": "number",
                    "description": "Sum of all recovery reserves + recovered amounts"
                  },
                  "net_incurred": {
                    "type": "number",
                    "description": "total_incurred - total_recovery (always negative)"
                  }
                },
                "required": [
                  "total_reserve",
                  "total_payment",
                  "total_incurred",
                  "total_recovery",
                  "net_incurred"
                ]
              },
              "exposure_level_overview": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Exposure/claim item UUID"
                    },
                    "claimant_name": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Name of the claimant"
                    },
                    "coverage_name": {
                      "type": "string",
                      "description": "Insurance coverage name"
                    },
                    "loss_name": {
                      "type": "string",
                      "description": "Description of the loss/damage"
                    },
                    "overview": {
                      "type": "object",
                      "properties": {
                        "total_reserve": {
                          "type": "number",
                          "description": "Sum of loss, legal, and adjusting reserves"
                        },
                        "total_payment": {
                          "type": "number",
                          "description": "Sum of all payments made"
                        },
                        "total_incurred": {
                          "type": "number",
                          "description": "total_reserve + total_payment"
                        },
                        "total_recovery": {
                          "type": "number",
                          "description": "Sum of recovery reserves + recovered amounts"
                        },
                        "net_incurred": {
                          "type": "number",
                          "description": "total_incurred - total_recovery"
                        }
                      },
                      "required": [
                        "total_reserve",
                        "total_payment",
                        "total_incurred",
                        "total_recovery",
                        "net_incurred"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "claimant_name",
                    "coverage_name",
                    "loss_name",
                    "overview"
                  ]
                },
                "description": "List of exposures with their overview data for the current page"
              },
              "total_overview": {
                "type": "object",
                "properties": {
                  "total_reserve": {
                    "type": "number",
                    "description": "Sum of all exposure reserves"
                  },
                  "total_payment": {
                    "type": "number",
                    "description": "Sum of all exposure payments"
                  },
                  "total_incurred": {
                    "type": "number",
                    "description": "total_reserve + total_payment"
                  },
                  "total_recovery": {
                    "type": "number",
                    "description": "Sum of all recovery data (claim + exposure level)"
                  },
                  "net_incurred": {
                    "type": "number",
                    "description": "total_incurred - total_recovery"
                  }
                },
                "required": [
                  "total_reserve",
                  "total_payment",
                  "total_incurred",
                  "total_recovery",
                  "net_incurred"
                ]
              },
              "total_records": {
                "type": "integer",
                "description": "Total number of exposures for pagination"
              }
            },
            "required": [
              "claim_level_overview",
              "exposure_level_overview",
              "total_overview",
              "total_records"
            ]
          }
        },
        "required": [
          "success",
          "messages",
          "data"
        ]
      },
      "response-get_accounting_recoveries_data": {
        "description": "Response payload for /api/v2/claim_exposures/get_accounting_recoveries_data.",
        "type": "object",
        "properties": {
          "claim_level_recoveries": {
            "type": "object",
            "properties": {
              "reinsurance_summary": {
                "type": "object",
                "properties": {
                  "total_recovery_reserve": {
                    "type": "number"
                  },
                  "total_recovered": {
                    "type": "number"
                  }
                },
                "required": [
                  "total_recovery_reserve",
                  "total_recovered"
                ]
              },
              "reinsurancelae_summary": {
                "type": "object",
                "properties": {
                  "total_recovery_reserve": {
                    "type": "number"
                  },
                  "total_recovered": {
                    "type": "number"
                  }
                },
                "required": [
                  "total_recovery_reserve",
                  "total_recovered"
                ]
              },
              "salvage_summary": {
                "type": "object",
                "properties": {
                  "total_recovery_reserve": {
                    "type": "number"
                  },
                  "total_recovered": {
                    "type": "number"
                  }
                },
                "required": [
                  "total_recovery_reserve",
                  "total_recovered"
                ]
              },
              "subrogation_summary": {
                "type": "object",
                "properties": {
                  "total_recovery_reserve": {
                    "type": "number"
                  },
                  "total_recovered": {
                    "type": "number"
                  }
                },
                "required": [
                  "total_recovery_reserve",
                  "total_recovered"
                ]
              }
            },
            "required": [
              "reinsurance_summary",
              "reinsurancelae_summary",
              "salvage_summary",
              "subrogation_summary"
            ]
          },
          "exposure_level_recoveries": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "claimant_name": {
                  "type": "string"
                },
                "coverage_name": {
                  "type": "string"
                },
                "loss_name": {
                  "type": "string"
                },
                "recoveries": {
                  "type": "object",
                  "properties": {
                    "reinsurance_summary": {
                      "type": "object",
                      "properties": {
                        "total_recovery_reserve": {
                          "type": "number"
                        },
                        "total_recovered": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "total_recovery_reserve",
                        "total_recovered"
                      ]
                    },
                    "reinsurancelae_summary": {
                      "type": "object",
                      "properties": {
                        "total_recovery_reserve": {
                          "type": "number"
                        },
                        "total_recovered": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "total_recovery_reserve",
                        "total_recovered"
                      ]
                    },
                    "salvage_summary": {
                      "type": "object",
                      "properties": {
                        "total_recovery_reserve": {
                          "type": "number"
                        },
                        "total_recovered": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "total_recovery_reserve",
                        "total_recovered"
                      ]
                    },
                    "subrogation_summary": {
                      "type": "object",
                      "properties": {
                        "total_recovery_reserve": {
                          "type": "number"
                        },
                        "total_recovered": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "total_recovery_reserve",
                        "total_recovered"
                      ]
                    }
                  },
                  "required": [
                    "reinsurance_summary",
                    "reinsurancelae_summary",
                    "salvage_summary",
                    "subrogation_summary"
                  ]
                }
              },
              "required": [
                "id",
                "claimant_name",
                "coverage_name",
                "loss_name",
                "recoveries"
              ]
            }
          },
          "total_recoveries": {
            "type": "object",
            "properties": {
              "reinsurance_summary": {
                "type": "object",
                "properties": {
                  "total_recovery_reserve": {
                    "type": "number"
                  },
                  "total_recovered": {
                    "type": "number"
                  }
                },
                "required": [
                  "total_recovery_reserve",
                  "total_recovered"
                ]
              },
              "reinsurancelae_summary": {
                "type": "object",
                "properties": {
                  "total_recovery_reserve": {
                    "type": "number"
                  },
                  "total_recovered": {
                    "type": "number"
                  }
                },
                "required": [
                  "total_recovery_reserve",
                  "total_recovered"
                ]
              },
              "salvage_summary": {
                "type": "object",
                "properties": {
                  "total_recovery_reserve": {
                    "type": "number"
                  },
                  "total_recovered": {
                    "type": "number"
                  }
                },
                "required": [
                  "total_recovery_reserve",
                  "total_recovered"
                ]
              },
              "subrogation_summary": {
                "type": "object",
                "properties": {
                  "total_recovery_reserve": {
                    "type": "number"
                  },
                  "total_recovered": {
                    "type": "number"
                  }
                },
                "required": [
                  "total_recovery_reserve",
                  "total_recovered"
                ]
              }
            },
            "required": [
              "reinsurance_summary",
              "reinsurancelae_summary",
              "salvage_summary",
              "subrogation_summary"
            ]
          },
          "total_records": {
            "type": "integer",
            "description": "Total number of exposures for pagination."
          }
        },
        "required": [
          "claim_level_recoveries",
          "exposure_level_recoveries",
          "total_recoveries",
          "total_records"
        ]
      },
      "response-get_additional_interest": {
        "description": "Response payload for /api/v2/additional_interests/get_additional_interest.",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ]
          },
          "data": {
            "$ref": "#/components/schemas/additional_interest-def"
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-get_adjuster_assignment_config": {
        "description": "Response payload for /api/v2/claim_adjuster_assignment_configs/get_adjuster_assignment_config",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "$ref": "#/components/schemas/adjuster_assignment-def"
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-get_all_associated_claims_parties": {
        "title": "GetAllAssociatedClaimsPartiesResponse",
        "type": "object",
        "description": "Response schema for POST /api/v2/claims/get_all_associated_claims_parties",
        "properties": {
          "data": {
            "type": "array",
            "description": "Claim parties. Current-only mortgagees may appear as virtual rows with a null id when claims.pull-current-mortgagees is enabled.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid",
                  "description": "Claim-contact association id; null for virtual current mortgagees"
                },
                "claim_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "contact_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "contact": {
                  "type": "object",
                  "description": "Nested contact record"
                },
                "roles": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "party_type": {
                  "type": "string",
                  "enum": [
                    "first_party",
                    "third_party"
                  ]
                },
                "mortgagee_status": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "no_change",
                    "removed",
                    "current",
                    null
                  ],
                  "description": "Mortgagee drift tag when claims.pull-current-mortgagees is enabled"
                }
              },
              "required": [
                "contact_id",
                "roles"
              ]
            }
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-get_all_claim_transactions": {
        "type": "object",
        "description": "Response Schema for /api/v2/claims/get_all_claim_transactions",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "transactions": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/claim_transaction-def"
                },
                "description": "List of accounting transactions for the claim"
              },
              "total_records": {
                "type": "integer",
                "description": "Total number of transactions available (before pagination)"
              }
            },
            "required": [
              "transactions",
              "total_records"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-get_all_html_templates": {
        "type": "object",
        "description": "Response payload for /api/v2/deliverables/get_all_html_templates",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "ID of the template"
                },
                "name": {
                  "type": "string",
                  "description": "The name of the template"
                },
                "html": {
                  "type": "string",
                  "description": "The HTML string (Jinja template)"
                },
                "use_new_html_render": {
                  "type": "boolean",
                  "description": "Whether or not to use the new render.py to render the Jinja template."
                },
                "use_new_pdf_render": {
                  "type": "boolean",
                  "description": "Whether or not to use the new render.py to render the PDF deliverable."
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Whether the template is enabled or not."
                },
                "date_created": {
                  "type": "string",
                  "format": "date-time",
                  "description": "The date and time when the template was created"
                },
                "date_updated": {
                  "type": "string",
                  "format": "date-time",
                  "description": "The date and time when the template was last updated"
                }
              }
            },
            "required": [
              "id",
              "name",
              "html",
              "use_new_html_render",
              "use_new_pdf_render",
              "enabled",
              "date_created",
              "date_updated"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-get_applicable_forms": {
        "type": "object",
        "description": "Response payload for /api/v2/quotes/get_applicable_forms",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "forms": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/applicable_form-def"
                },
                "description": "Forms applicable to the quote"
              },
              "revision_updated_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "Staleness signal: ISO timestamp of the revision at the time the list was generated. The frontend captures this and compares against the next rate response to detect staleness."
              }
            },
            "required": [
              "forms",
              "revision_updated_at"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-get_available_functions": {
        "description": "Response payload for /api/v2/document_templates/get_available_functions",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object"
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "functions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "Function name"
                    },
                    "signature": {
                      "type": "string",
                      "description": "Function signature with parameters"
                    },
                    "description": {
                      "type": "string",
                      "description": "What the function does"
                    },
                    "example": {
                      "type": "string",
                      "description": "Usage example"
                    }
                  },
                  "required": [
                    "name",
                    "signature",
                    "description",
                    "example"
                  ]
                }
              }
            },
            "required": [
              "functions"
            ]
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-get_billing_contact_emails": {
        "type": "object",
        "description": "Response schema for /api/v2/payments/get_billing_contact_emails",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Validation or error messages"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Email and email options when success is true",
            "properties": {
              "email": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Primary (first) email when at least one contact has an email; null otherwise"
              },
              "email_options": {
                "type": "array",
                "description": "Deduplicated list of email options from billing-related contacts",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "Contact or display name"
                    },
                    "email": {
                      "type": "string",
                      "format": "email",
                      "description": "Email address"
                    },
                    "contact_type": {
                      "type": "string",
                      "description": "Role(s), e.g. Named Insured, Bill To, Agent"
                    },
                    "label": {
                      "type": "string",
                      "description": "Display label for the option"
                    }
                  },
                  "required": [
                    "name",
                    "email",
                    "contact_type",
                    "label"
                  ]
                }
              }
            },
            "required": [
              "email",
              "email_options"
            ]
          }
        },
        "required": [
          "success",
          "messages",
          "data"
        ]
      },
      "response-get_brand": {
        "description": "Response payload for /api/v2/brands/get_brand",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "$ref": "#/components/schemas/brand-def"
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-get_claim_estimation": {
        "type": "object",
        "description": "Response Schema for /api/v2/claim_estimations/get_claim_estimation",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/claim_estimation-def"
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-get_claims_tabs_visibility": {
        "title": "GetClaimsTabsVisibilityResponse",
        "type": "object",
        "description": "Response schema for /api/v2/claims/get_claims_tabs_visibility",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code_value_type": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "flagged": {
                  "type": "boolean"
                }
              },
              "required": [
                "section",
                "read",
                "write"
              ]
            }
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-get_configuration_export": {
        "type": "object",
        "description": "Response Schema for /api/v2/settings/get_configuration_export",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "True if the request was handled"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "The configuration export record.",
            "properties": {
              "found": {
                "type": "boolean",
                "description": "False when no such record exists. Reported rather than raised: a poller has to tell 'this will never exist' from 'the request failed', and an error response looks the same as a network blip. When false, no other key is present."
              },
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "The record's own id. This is what get_configuration_export is polled with, not the background job id."
              },
              "policy_type_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "The policy type that was exported"
              },
              "skip_forms": {
                "type": "boolean",
                "description": "Whether form files were skipped"
              },
              "status": {
                "type": "string",
                "enum": [
                  "queued",
                  "processing",
                  "complete",
                  "failed"
                ],
                "description": "queued and processing are still moving; complete and failed are terminal. A poller stops on the latter two."
              },
              "file_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The stored package, for files/generate_download_url. Populated once status is complete. Withheld from listings."
              },
              "filename": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Name of the package file"
              },
              "byte_size": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Size of the package in bytes"
              },
              "package_version": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Configuration package format version"
              },
              "error_message": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Populated only when status is failed. Operator-facing text, never raw exception output: an unrecognised failure is reduced to a pointer at the background job record. Capped at 500 characters."
              },
              "background_job_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The run that produced this record. Nullable and ON DELETE SET NULL: jobs are housekeeping and get cleared, and losing the run must not take the record with it."
              },
              "created_by": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Contact id of whoever queued it; null for an API-key caller with no contact"
              },
              "date_added": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "date_updated": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              }
            },
            "required": [
              "found"
            ]
          }
        },
        "required": [
          "success",
          "messages",
          "data"
        ]
      },
      "response-get_configuration_import": {
        "type": "object",
        "description": "Response Schema for /api/v2/settings/get_configuration_import. Poll this with the import id while a run is in flight.",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "True if the request was handled"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "The package, and the outcome of the last run against it. Re-running replaces that outcome, so this is current state rather than a history.",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "The package's own id. This is what import_configuration runs against and what get_configuration_import is polled with, not a background job id."
              },
              "file_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The stored package. A package that arrived by url has one too: create_configuration_import fetches and stores it before returning. Withheld from listings."
              },
              "source": {
                "type": "string",
                "enum": [
                  "upload",
                  "link"
                ],
                "description": "How the package reached this site: upload for one sent through core.uploads uploadAttachment with type 'config_package', link for one fetched from a presigned S3 url."
              },
              "exported_from": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Site the package was exported from. Read out of the package itself, so it is null until a run has read it, and on packages predating origin tracking."
              },
              "exported_at": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "When the package was exported there, as recorded in it"
              },
              "dry_run": {
                "type": [
                  "boolean",
                  "null"
                ],
                "description": "Whether the last run only validated."
              },
              "status": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "queued, processing, complete or failed. Null until something has been run.",
                "enum": [
                  "queued",
                  "processing",
                  "complete",
                  "failed",
                  null
                ]
              },
              "summary": {
                "type": [
                  "object",
                  "null"
                ],
                "description": "The full outcome of the last run."
              },
              "response": {
                "type": [
                  "object",
                  "null"
                ],
                "description": "The compact document the task returned."
              },
              "error_message": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Operator-facing reason the last run failed."
              },
              "background_job_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The job carrying the last run. Null when it ran inline."
              },
              "imported_at": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "When the last run was queued, narrowed to when it began once a worker takes it; on an inline run, when it settled.",
                "format": "date-time"
              },
              "created_by": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Contact id of whoever brought the package in; null for an API-key caller with no contact"
              },
              "date_added": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "When the row was created",
                "format": "date-time"
              },
              "date_updated": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "When the row last changed",
                "format": "date-time"
              },
              "found": {
                "type": "boolean",
                "description": "False when no package has that id. Every other field is absent when this is false."
              }
            },
            "required": [
              "found"
            ]
          }
        },
        "required": [
          "success",
          "messages",
          "data"
        ]
      },
      "response-get_contact_by_agency": {
        "description": "Request payload for /api/v2/contacts/get_contact_by_agency.",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "username": {
                "type": "string"
              },
              "producer_number": {
                "type": "string"
              },
              "agents": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/agent-def"
                }
              },
              "agencies": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/agency-def"
                }
              },
              "agency_group_number": {
                "type": "string"
              },
              "agency_number": {
                "type": "string"
              },
              "commission_structure": {
                "type": "string"
              },
              "ssn_group": {
                "type": "string"
              },
              "dba": {
                "type": "string"
              },
              "phones": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/phone-def"
                }
              },
              "date_business_started": {
                "type": "string",
                "format": "date"
              },
              "company_id": {
                "type": "string",
                "format": "uuid"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "addresses": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/address-def"
                }
              },
              "driver_license_date": {
                "type": "string",
                "format": "date"
              },
              "primary_phone_id": {
                "type": "string",
                "format": "uuid"
              },
              "agency_inception_date": {
                "type": "string",
                "format": "date"
              },
              "external_system_reference": {
                "type": "string"
              },
              "last_synched_date": {
                "type": "string",
                "format": "date-time"
              },
              "source_update_date": {
                "type": "string",
                "format": "date-time"
              },
              "fein_tax_id": {
                "type": "string"
              },
              "primary_email_id": {
                "type": "string",
                "format": "uuid"
              },
              "date_of_birth": {
                "type": "string",
                "pattern": "^xx-xx-[0-9]{4}$"
              },
              "purchase_date": {
                "type": "string",
                "format": "date"
              },
              "type": {
                "type": "string",
                "enum": [
                  "individual",
                  "organization"
                ]
              },
              "added_by": {
                "type": "string"
              },
              "website": {
                "type": "string"
              },
              "hicn_number": {
                "type": "string"
              },
              "date_of_death": {
                "type": "string",
                "format": "date"
              },
              "ssn": {
                "type": "string"
              },
              "drivers_license": {
                "type": "string"
              },
              "agency_termination_date": {
                "type": "string",
                "format": "date"
              },
              "emails": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/email-def"
                }
              },
              "confirmation_email": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "gender": {
                "type": "string",
                "enum": [
                  "Male",
                  "Female",
                  "Other",
                  "Undisclosed"
                ]
              },
              "license_state": {
                "type": "string",
                "pattern": "^[A-Z]{2}$"
              },
              "legal_entity_type": {
                "type": "string"
              },
              "position": {
                "type": "string"
              },
              "primary_address_id": {
                "type": "string",
                "format": "uuid"
              }
            },
            "required": [
              "id"
            ]
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-get_contact_by_agency_group": {
        "description": "Request payload for /api/v2/contacts/get_contact_by_agency_group.",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "username": {
                "type": "string"
              },
              "producer_number": {
                "type": "string"
              },
              "agents": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/agent-def"
                }
              },
              "agencies": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/agency-def"
                }
              },
              "agency_group_number": {
                "type": "string"
              },
              "agency_number": {
                "type": "string"
              },
              "commission_structure": {
                "type": "string"
              },
              "ssn_group": {
                "type": "string"
              },
              "dba": {
                "type": "string"
              },
              "phones": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/phone-def"
                }
              },
              "date_business_started": {
                "type": "string",
                "format": "date"
              },
              "company_id": {
                "type": "string",
                "format": "uuid"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "addresses": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/address-def"
                }
              },
              "driver_license_date": {
                "type": "string",
                "format": "date"
              },
              "primary_phone_id": {
                "type": "string",
                "format": "uuid"
              },
              "agency_inception_date": {
                "type": "string",
                "format": "date"
              },
              "external_system_reference": {
                "type": "string"
              },
              "last_synched_date": {
                "type": "string",
                "format": "date-time"
              },
              "source_update_date": {
                "type": "string",
                "format": "date-time"
              },
              "fein_tax_id": {
                "type": "string"
              },
              "primary_email_id": {
                "type": "string",
                "format": "uuid"
              },
              "date_of_birth": {
                "type": "string",
                "pattern": "^xx-xx-[0-9]{4}$"
              },
              "purchase_date": {
                "type": "string",
                "format": "date"
              },
              "type": {
                "type": "string",
                "enum": [
                  "individual",
                  "organization"
                ]
              },
              "added_by": {
                "type": "string"
              },
              "website": {
                "type": "string"
              },
              "hicn_number": {
                "type": "string"
              },
              "date_of_death": {
                "type": "string",
                "format": "date"
              },
              "ssn": {
                "type": "string"
              },
              "drivers_license": {
                "type": "string"
              },
              "agency_termination_date": {
                "type": "string",
                "format": "date"
              },
              "emails": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/email-def"
                }
              },
              "confirmation_email": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "gender": {
                "type": "string",
                "enum": [
                  "Male",
                  "Female",
                  "Other",
                  "Undisclosed"
                ]
              },
              "license_state": {
                "type": "string",
                "pattern": "^[A-Z]{2}$"
              },
              "legal_entity_type": {
                "type": "string"
              },
              "position": {
                "type": "string"
              },
              "primary_address_id": {
                "type": "string",
                "format": "uuid"
              }
            },
            "required": [
              "id"
            ]
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-get_contact_by_agent": {
        "description": "Request payload for /api/v2/contacts/get_contact_by_agent.",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "username": {
                "type": "string"
              },
              "producer_number": {
                "type": "string"
              },
              "agents": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/agent-def"
                }
              },
              "agencies": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/agency-def"
                }
              },
              "agency_group_number": {
                "type": "string"
              },
              "agency_number": {
                "type": "string"
              },
              "commission_structure": {
                "type": "string"
              },
              "ssn_group": {
                "type": "string"
              },
              "dba": {
                "type": "string"
              },
              "phones": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/phone-def"
                }
              },
              "date_business_started": {
                "type": "string",
                "format": "date"
              },
              "company_id": {
                "type": "string",
                "format": "uuid"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "addresses": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/address-def"
                }
              },
              "driver_license_date": {
                "type": "string",
                "format": "date"
              },
              "primary_phone_id": {
                "type": "string",
                "format": "uuid"
              },
              "agency_inception_date": {
                "type": "string",
                "format": "date"
              },
              "external_system_reference": {
                "type": "string"
              },
              "last_synched_date": {
                "type": "string",
                "format": "date-time"
              },
              "source_update_date": {
                "type": "string",
                "format": "date-time"
              },
              "fein_tax_id": {
                "type": "string"
              },
              "primary_email_id": {
                "type": "string",
                "format": "uuid"
              },
              "date_of_birth": {
                "type": "string",
                "pattern": "^xx-xx-[0-9]{4}$"
              },
              "purchase_date": {
                "type": "string",
                "format": "date"
              },
              "type": {
                "type": "string",
                "enum": [
                  "individual",
                  "organization"
                ]
              },
              "added_by": {
                "type": "string"
              },
              "website": {
                "type": "string"
              },
              "hicn_number": {
                "type": "string"
              },
              "date_of_death": {
                "type": "string",
                "format": "date"
              },
              "ssn": {
                "type": "string"
              },
              "drivers_license": {
                "type": "string"
              },
              "agency_termination_date": {
                "type": "string",
                "format": "date"
              },
              "emails": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/email-def"
                }
              },
              "confirmation_email": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "gender": {
                "type": "string",
                "enum": [
                  "Male",
                  "Female",
                  "Other",
                  "Undisclosed"
                ]
              },
              "license_state": {
                "type": "string",
                "pattern": "^[A-Z]{2}$"
              },
              "legal_entity_type": {
                "type": "string"
              },
              "position": {
                "type": "string"
              },
              "primary_address_id": {
                "type": "string",
                "format": "uuid"
              }
            },
            "required": [
              "id"
            ]
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-get_contact_screening_status": {
        "description": "Response payload for /api/v2/quotes/get_contact_screening_status",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "revision_id": {
                "type": "string",
                "format": "uuid"
              },
              "all_complete": {
                "type": "boolean",
                "description": "True only when screening_enabled, integration_configured, and every contact is in a complete status (complete_pass or complete_overridden)."
              },
              "screening_enabled": {
                "type": "boolean",
                "description": "Whether the per-transaction-type kill switch is on. When false, all_complete is forced false regardless of contact-level state."
              },
              "integration_configured": {
                "type": "boolean",
                "description": "Whether a CONTACT_SCREENING integration is connected for this policy type. When false, all_complete is forced false."
              },
              "tenant_reason": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Human-readable explanation when screening_enabled or integration_configured is false."
              },
              "contacts": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "contact_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "contact_name": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "complete_pass",
                        "complete_overridden",
                        "flagged",
                        "expired",
                        "data_mismatch",
                        "never_screened"
                      ]
                    },
                    "is_complete": {
                      "type": "boolean"
                    },
                    "reason": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "vendor_message": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Verbatim screening_message from the vendor (when one exists). On flagged rows this is what distinguishes a confirmed sanctions hit from an ambiguous/insufficient-data response."
                    },
                    "screened_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "screening_check_result_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid",
                      "description": "When present, the override flow can be invoked against this id to clear a flagged status."
                    },
                    "has_valid_override": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "contact_id",
                    "contact_name",
                    "status",
                    "is_complete",
                    "has_valid_override"
                  ]
                }
              }
            },
            "required": [
              "revision_id",
              "all_complete",
              "screening_enabled",
              "integration_configured",
              "contacts"
            ]
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-get_copilot_skill": {
        "type": "object",
        "description": "Response schema for /api/v2/copilot_skills/get_copilot_skill",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "skill": {
                "$ref": "#/components/schemas/copilot_skill-def"
              }
            },
            "required": [
              "skill"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ],
            "description": "Any messages or errors related to the request"
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-get_delayed_commission_accounting_entries": {
        "type": "object",
        "description": "Response payload for /api/v2/commissions/get_delayed_commission_accounting_entries. Returns detailed delayed commission accounting entries (entries with commission_payment_id=NULL).",
        "properties": {
          "entries": {
            "type": "array",
            "description": "List of delayed commission accounting entries",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Commission accounting entry ID"
                },
                "agent_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Agent contact ID"
                },
                "agency_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Agency contact ID"
                },
                "agency_name": {
                  "type": "string",
                  "description": "Agency name"
                },
                "policy_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Policy ID"
                },
                "policy_number": {
                  "type": "string",
                  "description": "Policy number"
                },
                "item_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid",
                  "description": "Policy item ID"
                },
                "item_name": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Policy item name"
                },
                "commission_rate": {
                  "type": "string",
                  "description": "Commission rate as decimal string"
                },
                "commissionable_amount": {
                  "type": "string",
                  "description": "Commissionable amount as decimal string"
                },
                "amount_to_be_paid": {
                  "type": "string",
                  "description": "Amount to be paid as decimal string"
                },
                "transaction_date_time": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Transaction date and time"
                },
                "delayed": {
                  "type": "string",
                  "enum": [
                    "neg_amt",
                    "missing_method",
                    "not_delayed",
                    "not_effective",
                    "missing_payee"
                  ],
                  "description": "Delayed status"
                },
                "manual_entry": {
                  "type": "boolean",
                  "description": "Whether this is a manual entry"
                },
                "date_added": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time",
                  "description": "Date entry was added"
                },
                "why": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Reason/description for the entry"
                },
                "export_date": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time",
                  "description": "Date entry was exported"
                },
                "inserted_by": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Contact ID of user who inserted the entry"
                },
                "date_updated": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time",
                  "description": "Date entry was last updated"
                },
                "commission_month": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Commission month in YYYY-MM format"
                }
              },
              "required": [
                "id",
                "agent_id",
                "agency_id",
                "agency_name",
                "policy_id",
                "policy_number",
                "commission_rate",
                "commissionable_amount",
                "amount_to_be_paid",
                "transaction_date_time",
                "delayed",
                "manual_entry"
              ]
            }
          },
          "total_entries": {
            "type": "integer",
            "description": "Total count of delayed entries"
          },
          "total_commissionable_amount": {
            "type": "string",
            "description": "Sum of all commissionable amounts as decimal string"
          },
          "total_amount_to_be_paid": {
            "type": "string",
            "description": "Sum of all amounts to be paid as decimal string"
          },
          "inserted_by_contacts": {
            "type": "array",
            "description": "Contact identifiers for inserted_by fields",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Contact ID"
                },
                "name": {
                  "type": "string",
                  "description": "Contact name"
                },
                "username": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Contact username"
                }
              },
              "required": [
                "id",
                "name"
              ]
            }
          }
        },
        "required": [
          "entries",
          "total_entries",
          "total_commissionable_amount",
          "total_amount_to_be_paid",
          "inserted_by_contacts"
        ]
      },
      "response-get_deliverable_preview_json": {
        "description": "Response payload for /api/v2/settings/get_deliverable_preview_json. Unlike most v2 endpoints this is not wrapped in {success, messages, data} - the response body is either the Carbone context object (live or example), or a {warning} object when a SUPPLIED entity/location/policy-type combination couldn't be resolved. Omitting the entity parameters is not such a case: it selects example mode and returns a context.",
        "oneOf": [
          {
            "type": "object",
            "description": "The Carbone context, with calculated fields and dynamic-field values already applied (see CarboneDeliverableTemplateService.get_deliverable_context and build_example_context). Shape varies by entity type (policy/revision vs claim); the `dynamic` and `calculated` namespaces are always present when the deliverable has any configured fields of that kind. In example mode the context additionally carries `_example_meta`.",
            "additionalProperties": true,
            "properties": {
              "dynamic": {
                "type": "object",
                "description": "Resolved dynamic-field values, keyed by field_key. A dynamic dropdown's value is the FULL matched object from its source_key array, not just the raw submitted value."
              },
              "calculated": {
                "type": "object",
                "description": "Resolved calculated-field values, keyed by field_name."
              },
              "_example_meta": {
                "type": "object",
                "description": "EXAMPLE MODE ONLY, and absent on the live path. Says what the context in the same payload actually is, so the panel can tell the author whether they are looking at this site's configuration or BriteCore's shipped sample. Underscore-prefixed so it is skipped as a mappable Carbone path.",
                "properties": {
                  "source": {
                    "type": "string",
                    "enum": [
                      "fixture",
                      "generated"
                    ],
                    "description": "'generated' when the resolved policy type's own configured items replaced the fixture's; 'fixture' when the shipped example is what is on screen (no policy type selected, a claim template, or a policy type that configures no named items)."
                  },
                  "entity_type": {
                    "type": "string",
                    "enum": [
                      "policy",
                      "claim"
                    ],
                    "description": "Which fixture was loaded. Resolved from the deliverable's module when there is one, not from the request."
                  },
                  "policy_type_name": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The policy type the items were generated from, or null."
                  },
                  "resolved_policy_types": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    },
                    "description": "{id, name, location_id, type, line} per resolved policy type. More than one entry only for an All-Locations selection."
                  },
                  "item_counts": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "integer"
                    },
                    "description": "Generated item count per Carbone container (items, properties, vehicles, watercrafts). Containers the policy type configures nothing for are absent."
                  },
                  "item_names": {
                    "type": "object",
                    "description": "The configured item-name catalog, keyed by scope ('policy', 'Property', 'Vehicle', 'Watercraft'), each a list of {name, type}. Uncapped, unlike the generated items: it is what a [name='...'] filter can legally match."
                  }
                }
              }
            }
          },
          {
            "type": "object",
            "description": "Returned when a SUPPLIED entity_id/entity_number does not resolve, or the resolved entity does not match the supplied location_id/policy_type_name. Not returned merely because the entity parameters are absent - that is example mode, which returns a context.",
            "properties": {
              "warning": {
                "type": "string"
              }
            },
            "required": [
              "warning"
            ]
          }
        ]
      },
      "response-get_dynamic_fields": {
        "description": "Response schema for /api/v2/deliverables/get_dynamic_fields",
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "description": "array of dynamic fields objects.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "template_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "field_type": {
                  "type": "string",
                  "description": "Type of the field (e.g., text, html, etc.)"
                },
                "field_key": {
                  "type": "string",
                  "description": "Key for the field"
                },
                "default_value": {
                  "type": "string",
                  "description": "Default value for the field"
                },
                "option_source": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "For field_type 'dropdown': 'static' (options list) or 'dynamic' (source_key/display_field against the live context)"
                },
                "options": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "items": {
                    "type": "string"
                  },
                  "description": "For a static dropdown: the configured list of option strings"
                },
                "source_key": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "For a dynamic dropdown: the context array key to resolve options from (e.g. 'vehicles', 'parties')"
                },
                "display_field": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "For a dynamic dropdown: the field on each resolved item to use as the option label (default 'name')"
                },
                "resolved_options": {
                  "type": "array",
                  "description": "Present only when reference_id was supplied and the field is a dropdown: resolved {value, label} pairs for rendering a picker",
                  "items": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "The option string (static) or matched item's id (dynamic)"
                      },
                      "label": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    }
                  }
                }
              },
              "required": [
                "id",
                "template_id",
                "field_type",
                "field_key"
              ]
            }
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-get_effective_date": {
        "type": "object",
        "description": "Response schema for /api/v2/lines/get_effective_date",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "ID of the Effective Date"
              },
              "effective_date": {
                "type": "string",
                "format": "date",
                "description": "Effective date"
              },
              "renewal_effective_date": {
                "type": "string",
                "format": "date-time",
                "description": "Renewal effective date calculated from associated policy types"
              },
              "description": {
                "type": "string",
                "description": "Description of the effective date"
              },
              "creation_date": {
                "type": "string",
                "format": "date-time",
                "description": "Date and time when this effective date was created"
              },
              "change_history": {
                "type": [
                  "array",
                  "null"
                ],
                "description": "Change history of the effective date",
                "items": {
                  "type": "object",
                  "properties": {
                    "to": {
                      "type": "string",
                      "format": "date",
                      "description": "To date"
                    },
                    "changed": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Date and time when the change occurred"
                    },
                    "from": {
                      "type": "string",
                      "format": "date",
                      "description": "From date"
                    }
                  },
                  "required": [
                    "to",
                    "changed",
                    "from"
                  ]
                }
              },
              "override_lock": {
                "type": "boolean",
                "description": "Indicates if the override lock is enabled"
              }
            },
            "required": [
              "id",
              "effective_date",
              "description",
              "creation_date",
              "override_lock",
              "renewal_effective_date"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-get_erp_items": {
        "type": "object",
        "description": "Response for the get_erp_items API endpoint",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "policy_id": {
                "type": "string",
                "format": "uuid",
                "description": "The policy ID the ERP items belong to"
              },
              "items": {
                "type": "array",
                "description": "List of ERP items for the policy",
                "items": {
                  "$ref": "#/components/schemas/erp_item-def"
                }
              }
            },
            "required": [
              "policy_id",
              "items"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-get_estimated_quote": {
        "title": "Get Estimated Quote Response",
        "type": "object",
        "description": "Response schema for the get_estimated_quote API endpoint.",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful."
          },
          "data": {
            "type": [
              "object",
              "null"
            ],
            "description": "Contains the estimated quote details on success, otherwise null.",
            "properties": {
              "estimated_policy_type": {
                "type": "string",
                "description": "The name of the policy type for the estimated quote."
              },
              "estimated_premium": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "The calculated premium for the estimated quote. May be null if the quote was not rated."
              },
              "estimated_policy_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "The UUID of the new estimated quote. May be null if the request was 'stateless' or unsuccessful."
              },
              "estimated_policy_number": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The human-readable number of the new estimated quote. May be null if 'estimated_policy_id' is null."
              },
              "last_visited_url": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uri-reference",
                "description": "The last visited URL for the estimated quote, used for direct navigation in the agent portal. May be null."
              },
              "disabled": {
                "type": "boolean",
                "description": "Indicates if the estimated quote feature is disabled via advanced settings. When true, the feature is disabled.",
                "default": false
              }
            },
            "required": [
              "estimated_policy_type"
            ]
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request."
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s).",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "A dictionary of error messages."
              }
            ]
          }
        },
        "required": [
          "success",
          "data",
          "messages"
        ]
      },
      "response-get_event_types": {
        "type": "object",
        "description": "Response payload for /api/v2/rules/get_event_types. Returns available event types for rules.",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the API call succeeded"
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Error messages if success is false"
          },
          "data": {
            "type": "array",
            "description": "List of available event types",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Event type identifier constant",
                  "enum": [
                    "BritecoreApplicationSubmitted",
                    "PolicyIssued",
                    "PolicyActive"
                  ]
                },
                "name": {
                  "type": "string",
                  "description": "Human-readable event type name",
                  "enum": [
                    "Quote Submitted",
                    "Policy Issued",
                    "Policy Active"
                  ]
                }
              },
              "required": [
                "id",
                "name"
              ]
            }
          }
        }
      },
      "response-get_exposure_edit_status": {
        "description": "Response payload for /api/v2/claim_exposures/get_exposure_edit_status",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "editable": {
                "type": "boolean",
                "description": "False when the exposure has payments (editing is blocked)"
              }
            },
            "required": [
              "editable"
            ]
          }
        },
        "required": [
          "success",
          "messages",
          "data"
        ]
      },
      "response-get_exposure_transactions": {
        "type": "object",
        "description": "Response Schema for /api/v2/claim_exposures/get_exposure_transactions - Returns a list of accounting transactions for a specific exposure",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/claim_transaction-def"
            },
            "description": "List of accounting transactions for the exposure"
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-get_full_quote_async_status": {
        "type": "object",
        "description": "Response Schema for get_full_quote_async_status.",
        "properties": {
          "data": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/full_quote_async_status-def"
              }
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-get_html_template": {
        "type": "object",
        "description": "Response payload for /api/v2/deliverables/get_html_template",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "ID of the template"
              },
              "name": {
                "type": "string",
                "description": "The name of the template"
              },
              "html": {
                "type": "string",
                "description": "The HTML string (Jinja template)"
              },
              "use_new_html_render": {
                "type": "boolean",
                "description": "Whether or not to use the new render.py to render the Jinja template."
              },
              "use_new_pdf_render": {
                "type": "boolean",
                "description": "Whether or not to use the new render.py to render the PDF deliverable."
              },
              "enabled": {
                "type": "boolean",
                "description": "Whether the template is enabled or not."
              },
              "date_created": {
                "type": "string",
                "format": "date-time",
                "description": "The date and time when the template was created"
              },
              "date_updated": {
                "type": "string",
                "format": "date-time",
                "description": "The date and time when the template was last updated"
              }
            },
            "required": [
              "id",
              "name",
              "html",
              "use_new_html_render",
              "use_new_pdf_render",
              "enabled",
              "date_created",
              "date_updated"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-get_installed_integrations": {
        "type": "object",
        "description": "Response Schema for /api/v2/integrations/get_installed_integrations",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "integrations": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The ID of the integration instance"
                    },
                    "name": {
                      "type": "string",
                      "description": "The name of the integration instance"
                    }
                  },
                  "required": [
                    "id",
                    "name"
                  ]
                },
                "description": "List of installed integration instances"
              }
            },
            "required": [
              "integrations"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-get_invoices": {
        "title": "Get Invoices Response",
        "description": "Response schema for the api/v2/accounting/get_invoices API.",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Indicates if the API call was successful."
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A list of messages, usually empty on success or containing errors on failure."
          },
          "data": {
            "type": "object",
            "properties": {
              "policy_id": {
                "type": "string",
                "format": "uuid",
                "description": "The policy ID for which invoices were retrieved."
              },
              "bill_from_date": {
                "type": "string",
                "description": "The start date for the bill date filter used, in MM/DD/YYYY format.",
                "example": "01/01/2025"
              },
              "bill_to_date": {
                "type": "string",
                "description": "The end date for the bill date filter used, in MM/DD/YYYY format.",
                "example": "01/01/2026"
              },
              "due_from_date": {
                "type": "string",
                "description": "The start date for the due date filter used, in MM/DD/YYYY format.",
                "example": "01/01/2025"
              },
              "due_to_date": {
                "type": "string",
                "description": "The end date for the due date filter used, in MM/DD/YYYY format.",
                "example": "01/01/2026"
              },
              "sorting_order": {
                "type": "string",
                "enum": [
                  "asc",
                  "desc"
                ],
                "description": "The sorting order used for the results."
              },
              "page_number": {
                "type": "integer",
                "description": "The current page number."
              },
              "page_size": {
                "type": "integer",
                "description": "The number of items per page."
              },
              "total_pages": {
                "type": "integer",
                "description": "The total number of pages available."
              },
              "invoices": {
                "type": "array",
                "description": "A list of invoice records.",
                "items": {
                  "type": "object",
                  "description": "Represents a single invoice record.",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "date": {
                      "type": "string",
                      "description": "The invoice date in MM/DD/YYYY format.",
                      "example": "08/29/2025"
                    },
                    "type": {
                      "type": "string",
                      "description": "The type of the transaction, e.g., 'Invoice'."
                    },
                    "fileKey": {
                      "type": "string",
                      "format": "uuid",
                      "description": "A key for retrieving the invoice document."
                    },
                    "amount": {
                      "type": "number",
                      "description": "The total amount of the invoice."
                    },
                    "balance": {
                      "type": "string",
                      "pattern": "^-?\\d+\\.\\d{2}$",
                      "description": "The outstanding balance of the invoice, as a string."
                    },
                    "summary": {
                      "type": "string",
                      "description": "A brief summary or description of the invoice."
                    },
                    "icon": {
                      "type": "string",
                      "description": "An identifier for a UI icon."
                    },
                    "credit": {
                      "type": [
                        "string",
                        "number"
                      ],
                      "description": "The credit amount, if any."
                    },
                    "debit": {
                      "type": "number",
                      "description": "The debit amount."
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "details": {
                          "type": "object",
                          "description": "Detailed information about an invoice.",
                          "properties": {
                            "description": {
                              "type": "string"
                            },
                            "policyStatus": {
                              "type": "string"
                            },
                            "billDate": {
                              "type": "string",
                              "description": "The bill date in MM/DD/YYYY format."
                            },
                            "dueDate": {
                              "type": "string",
                              "description": "The due date in MM/DD/YYYY format."
                            },
                            "paidInFull": {
                              "type": "boolean"
                            },
                            "invoicePaymentsIds": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "format": "uuid"
                              }
                            },
                            "generatedBy": {
                              "type": "string"
                            },
                            "dateReceived": {
                              "type": "string",
                              "description": "The received date in MM/DD/YYYY format."
                            },
                            "dirty": {
                              "type": "boolean"
                            },
                            "showWaive": {
                              "type": "boolean"
                            },
                            "showDelete": {
                              "type": "boolean"
                            },
                            "showEditAndReprint": {
                              "type": "boolean"
                            },
                            "cancelDate": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "The cancellation date in MM/DD/YYYY format, if applicable."
                            }
                          }
                        },
                        "amount": {
                          "type": "number",
                          "description": "The total amount of the invoice (repeated for convenience)."
                        },
                        "schedule": {
                          "type": "object",
                          "description": "A breakdown of the invoice amount by type.",
                          "properties": {
                            "Premium": {
                              "type": "number"
                            },
                            "Custom Fees": {
                              "type": "number"
                            },
                            "Installment Fee": {
                              "type": "number"
                            }
                          },
                          "additionalProperties": {
                            "type": "number"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "required": [
          "success",
          "messages",
          "data"
        ]
      },
      "response-get_last_prefill_quote_execution_date": {
        "type": "object",
        "description": "Response Schema for /api/v2/quotes/get_last_prefill_quote_execution_date",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "last_execution_date": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "ISO date-time string of the most recent ADP execution, or null if no executions found"
              }
            },
            "required": [
              "last_execution_date"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-get_migration_job_status": {
        "type": "object",
        "description": "Response schema for /api/v2/imports/get_migration_job_status",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "type": "array",
            "description": "Array of informational or error messages",
            "items": {
              "type": "string"
            }
          },
          "data": {
            "oneOf": [
              {
                "type": "object",
                "description": "Single job status (when job_id is provided)",
                "properties": {
                  "job_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Job identifier"
                  },
                  "job_status": {
                    "type": "string",
                    "description": "Current job status",
                    "enum": [
                      "RUNNING",
                      "SUCCEEDED",
                      "FAILED",
                      "TIMED_OUT",
                      "ABORTED"
                    ]
                  },
                  "started_at": {
                    "type": "string",
                    "format": "date-time",
                    "description": "When the job started (ISO 8601 format)"
                  },
                  "completed_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "description": "When the job completed (ISO 8601 format, null if still running)"
                  },
                  "logs": {
                    "type": "array",
                    "description": "ERROR level log entries (only present when include_logs=true and logs exist)",
                    "items": {
                      "type": "object",
                      "properties": {
                        "timestamp": {
                          "type": "string",
                          "format": "date-time",
                          "description": "When the log entry was created (ISO 8601 format)"
                        },
                        "module": {
                          "type": "string",
                          "description": "The module name that generated the log entry"
                        },
                        "function": {
                          "type": "string",
                          "description": "The function name where the log was generated"
                        },
                        "message": {
                          "type": "string",
                          "description": "The actual error message"
                        }
                      },
                      "required": [
                        "timestamp",
                        "module",
                        "function",
                        "message"
                      ]
                    }
                  },
                  "log_message": {
                    "type": "string",
                    "description": "Summary message about log retrieval status (only present when include_logs=true)"
                  }
                },
                "required": [
                  "job_id",
                  "job_status",
                  "started_at",
                  "completed_at"
                ]
              },
              {
                "type": "array",
                "description": "List of recent jobs (when job_id is not provided)",
                "items": {
                  "type": "object",
                  "properties": {
                    "job_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Job identifier"
                    },
                    "job_status": {
                      "type": "string",
                      "description": "Current job status",
                      "enum": [
                        "RUNNING",
                        "SUCCEEDED",
                        "FAILED",
                        "TIMED_OUT",
                        "ABORTED"
                      ]
                    },
                    "started_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the job started (ISO 8601 format)"
                    }
                  },
                  "required": [
                    "job_id",
                    "job_status",
                    "started_at"
                  ]
                }
              }
            ]
          }
        },
        "required": [
          "success",
          "messages",
          "data"
        ]
      },
      "response-get_options": {
        "type": "object",
        "title": "Get Credit Score Options Response",
        "description": "Response containing available credit score options for a revision",
        "properties": {
          "revision_id": {
            "type": "string",
            "description": "The ID of the revision"
          },
          "policy_id": {
            "type": "string",
            "description": "The ID of the policy"
          },
          "current_term": {
            "type": "object",
            "description": "Summary of the current policy term",
            "properties": {
              "id": {
                "type": "string",
                "description": "The ID of the policy term"
              },
              "sequential_number": {
                "type": "integer",
                "description": "The sequential number of the term"
              },
              "effective_date": {
                "type": "string",
                "format": "date",
                "description": "The effective date of the term"
              },
              "expiration_date": {
                "type": "string",
                "format": "date",
                "description": "The expiration date of the term"
              },
              "term_credit_score": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The current credit score for the term, if any"
              },
              "term_credit_score_manually_updated": {
                "type": "boolean",
                "description": "Whether the term credit score was manually updated"
              },
              "term_type": {
                "type": "string",
                "description": "The type of the term"
              },
              "term_length": {
                "type": "integer",
                "description": "The length of the term in months"
              },
              "is_renewal": {
                "type": "boolean",
                "description": "Whether this term is a renewal"
              }
            }
          },
          "historical_terms": {
            "type": "array",
            "description": "List of historical policy terms",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The ID of the policy term"
                },
                "sequential_number": {
                  "type": "integer",
                  "description": "The sequential number of the term"
                },
                "effective_date": {
                  "type": "string",
                  "format": "date",
                  "description": "The effective date of the term"
                },
                "expiration_date": {
                  "type": "string",
                  "format": "date",
                  "description": "The expiration date of the term"
                },
                "term_credit_score": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The credit score for the term, if any"
                },
                "term_credit_score_manually_updated": {
                  "type": "boolean",
                  "description": "Whether the term credit score was manually updated"
                },
                "term_type": {
                  "type": "string",
                  "description": "The type of the term"
                },
                "term_length": {
                  "type": "integer",
                  "description": "The length of the term in months"
                },
                "is_renewal": {
                  "type": "boolean",
                  "description": "Whether this term is a renewal"
                }
              }
            }
          },
          "policy_type_settings": {
            "type": "object",
            "description": "Policy type settings related to credit scores",
            "properties": {
              "term_credit_score_combination_strategy": {
                "type": "string",
                "description": "Strategy used to combine multiple credit scores"
              },
              "term_credit_score_fallback": {
                "type": "integer",
                "description": "Fallback credit score value when no score is available"
              },
              "terms_credit_score_valid": {
                "type": "integer",
                "description": "Number of policy terms the rated credit score stays locked (0 = always rate on the most recent score)"
              },
              "terms_credit_score_pull_interval": {
                "type": "integer",
                "description": "Number of policy terms that must elapse before ordering a new credit report on the renewal schedule (0 = no scheduled ordering; the global contacts/auto-fetch-credit-score setting can still order a report when an insured is edited)"
              }
            }
          },
          "named_insured_reports": {
            "type": "array",
            "description": "Credit reports for named insureds",
            "items": {
              "type": "object",
              "properties": {
                "contact": {
                  "type": "object",
                  "description": "Contact information from ContactModel",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "The UUID of the contact"
                    },
                    "name": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The name of the contact"
                    },
                    "type": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The type of contact (individual/organization)"
                    },
                    "emails": {
                      "type": "array",
                      "description": "Contact email addresses",
                      "items": {
                        "type": "object"
                      }
                    },
                    "phones": {
                      "type": "array",
                      "description": "Contact phone numbers",
                      "items": {
                        "type": "object"
                      }
                    },
                    "addresses": {
                      "type": "array",
                      "description": "Contact addresses",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                },
                "reports": {
                  "type": "array",
                  "description": "List of credit reports for this contact",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "uuid",
                        "description": "Unique identifier for the credit report"
                      },
                      "contact_id": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "uuid",
                        "description": "UUID of the contact this report belongs to"
                      },
                      "report_number": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "The report number from the credit bureau"
                      },
                      "score": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "The credit score value"
                      },
                      "vendor_id": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "uuid",
                        "description": "UUID of the vendor that provided this report"
                      },
                      "report_date": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date",
                        "description": "Date when the credit report was generated"
                      },
                      "revision_ids": {
                        "type": [
                          "array",
                          "null"
                        ],
                        "description": "List of revision UUIDs associated with this report",
                        "items": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "policy_ids": {
                        "type": [
                          "array",
                          "null"
                        ],
                        "description": "List of policy UUIDs associated with this report",
                        "items": {
                          "type": "string",
                          "format": "uuid"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "options": {
            "type": "array",
            "description": "Available credit score options",
            "items": {
              "type": "object",
              "properties": {
                "option_type": {
                  "type": "string",
                  "enum": [
                    "historical",
                    "calculated"
                  ],
                  "description": "Type of credit score option"
                },
                "score": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "The credit score value, if available"
                },
                "tier": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The credit tier corresponding to the score"
                },
                "available": {
                  "type": "boolean",
                  "description": "Whether this option is available for selection"
                },
                "unavailability_reason": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Reason why the option is unavailable, if applicable"
                },
                "source_term_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "ID of the source term for historical options"
                }
              }
            }
          },
          "validation_status": {
            "type": "object",
            "description": "Validation status for the revision",
            "properties": {
              "revision_open": {
                "type": "boolean",
                "description": "Whether the revision is open"
              },
              "on_effective_date": {
                "type": "boolean",
                "description": "Whether the revision is on the effective date"
              },
              "has_permissions": {
                "type": "boolean",
                "description": "Whether the user has sufficient permissions"
              }
            }
          }
        },
        "required": [
          "revision_id",
          "policy_id",
          "current_term",
          "historical_terms",
          "policy_type_settings",
          "named_insured_reports",
          "options",
          "validation_status"
        ]
      },
      "response-get_payment": {
        "description": "Response payload for /api/v2/claim_exposures/get_payment.",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "$ref": "#/components/schemas/claim_exposure_payment-def",
            "description": "The payment object ClaimExposurePaymentModel"
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-get_policies_with_sub_line": {
        "description": "Response payload for /api/v2/lines/get_policies_with_sub_line",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "count": {
                "type": "integer",
                "minimum": 0,
                "description": "Total number of active policies referencing the subline"
              },
              "policies": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Policy numbers, clamped to limit when limit > 0"
              },
              "rule_count": {
                "type": "integer",
                "minimum": 0,
                "description": "Count of distinct active underwriting rules whose effects target the subline's child items"
              },
              "form_count": {
                "type": "integer",
                "minimum": 0,
                "description": "Count of active form (File) rows attached to the subline's child items"
              }
            },
            "required": [
              "count",
              "policies",
              "rule_count",
              "form_count"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-get_policy_applicable_suspensions": {
        "title": "Get Policy Applicable Suspensions Response",
        "description": "Array of applicable suspensions for the given policy and suspension actions",
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "description": "Unique identifier for the suspension"
            },
            "action": {
              "type": "string",
              "enum": [
                "Suspend Binding Authority",
                "Suspend Application Submission",
                "Suspend Quoting",
                "Suspend Straight Through Processing",
                "Suspend Endorsement",
                "Suspend Cancellation"
              ],
              "description": "The suspension action type"
            },
            "contact": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Contact unique identifier"
                },
                "name": {
                  "type": "string",
                  "description": "Contact name"
                }
              },
              "required": [
                "id",
                "name"
              ]
            },
            "start_date": {
              "type": "string",
              "format": "date",
              "description": "Suspension start date"
            },
            "end_date": {
              "type": "string",
              "format": "date",
              "description": "Suspension end date"
            },
            "description": {
              "type": "string",
              "description": "Suspension description"
            },
            "rules": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Rule unique identifier"
                  },
                  "suspension_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Associated suspension identifier"
                  },
                  "rule_type": {
                    "type": "string",
                    "enum": [
                      "ZIP_CODE",
                      "COUNTY",
                      "STATE",
                      "LINE",
                      "POLICY_TYPE",
                      "POLICY_TYPE_ITEM",
                      "SUBLINE",
                      "LOCATION"
                    ],
                    "description": "Type of suspension rule"
                  },
                  "policy_type_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Policy type identifier if rule applies to specific policy type"
                  },
                  "location_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Location identifier if rule applies to specific location"
                  },
                  "line_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Line identifier if rule applies to specific line"
                  },
                  "policy_type_item_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Policy type item identifier if rule applies to specific policy type item"
                  },
                  "subline_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Subline identifier if rule applies to specific subline"
                  },
                  "zipcode": {
                    "type": "string",
                    "description": "ZIP code if rule applies to specific ZIP code"
                  },
                  "county": {
                    "type": "string",
                    "description": "County name if rule applies to specific county"
                  }
                },
                "required": [
                  "rule_type"
                ]
              },
              "description": "Array of rules that define when this suspension applies"
            }
          },
          "required": [
            "action"
          ]
        }
      },
      "response-get_policy_number_history": {
        "type": "object",
        "description": "Response schema for /api/v2/policies/get_policy_number_history",
        "properties": {
          "data": {
            "type": "array",
            "description": "Every policy holding the requested number, current holder included. Empty when nothing matches. Order is stable but carries no preference: the caller chooses, using `is_current`.",
            "items": {
              "type": "object",
              "description": "One policy number history entry",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "The Policy Number History ID"
                },
                "policy_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "The Policy ID"
                },
                "policy_number": {
                  "type": "string",
                  "description": "The added policy number"
                },
                "history_number_origin": {
                  "type": "string",
                  "description": "The policy number history origin"
                },
                "is_current": {
                  "type": "boolean",
                  "description": "True when this is the owning policy's current number, false when the policy holds it as a previous number"
                },
                "date_added": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Date policy number history added"
                },
                "date_modified": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time",
                  "description": "Date policy number history modified. Null for a row whose nullable dateModified was never set"
                }
              },
              "required": [
                "policy_id",
                "policy_number",
                "is_current"
              ]
            }
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-get_policy_type": {
        "type": "object",
        "description": "Response Schema for /api/v2/lines/get_policy_type",
        "properties": {
          "data": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/policy_type_def-def"
              }
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-get_policy_type_item": {
        "type": "object",
        "description": "Response Schema for /api/v2/lines/get_policy_type_item",
        "properties": {
          "data": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/policy_type_item-def"
              }
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-get_policy_type_minimal": {
        "type": "object",
        "description": "Response Schema for /api/v2/lines/get_policy_type_minimal. Same as get_policy_type but items have rate_chain as empty arrays.",
        "properties": {
          "data": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/policy_type_def-def"
              }
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-get_quick_quote_template": {
        "type": "object",
        "description": "Response schema for /api/v2/quick_quote_templates/get_quick_quote_template",
        "properties": {
          "data": {
            "type": "object",
            "description": "The requested Quick Quote Template",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "Unique identifier for the Quick Quote Template"
              },
              "name": {
                "type": "string",
                "description": "The name of the Quick Quote Template"
              },
              "quote_template": {
                "type": "object",
                "description": "Quote-wide data containing coverage items",
                "properties": {
                  "items": {
                    "type": "array",
                    "description": "List of coverage items",
                    "items": {
                      "type": "object",
                      "description": "Coverage item definition"
                    }
                  }
                }
              },
              "template_risk_values": {
                "type": "array",
                "description": "List of template risk default values",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "quick_quote_template_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "risk_defaults": {
                      "type": "object"
                    },
                    "risk_type": {
                      "type": "string"
                    },
                    "version": {
                      "type": "integer"
                    }
                  }
                }
              }
            },
            "required": [
              "id",
              "name",
              "quote_template",
              "template_risk_values"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "string",
                    "description": "Base error message"
                  }
                },
                "additionalProperties": {
                  "type": "string"
                },
                "description": "Any error messages related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-get_quote_wizard_plugin": {
        "type": "object",
        "description": "Response payload for /api/v2/quotes/get_quote_wizard_plugin",
        "properties": {
          "data": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/quote_wizard_plugin-def"
              }
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ],
        "components": {
          "schemas": {
            "quote_wizard_plugin-def": {
              "type": "object",
              "properties": {
                "embed_url": {
                  "type": "string",
                  "description": "URL to embed in an iframe to display the quote wizard plugin"
                }
              },
              "required": [
                "embed_url"
              ]
            }
          }
        }
      },
      "response-get_rate_chains": {
        "type": "object",
        "description": "Response Schema for /api/v2/lines/get_rate_chains",
        "properties": {
          "data": {
            "type": "array",
            "description": "One entry per line item (top-level and subline items) for the policy types in scope",
            "items": {
              "type": "object",
              "properties": {
                "policy_type_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "UUID of the policy type the item belongs to"
                },
                "policy_type_name": {
                  "type": "string",
                  "description": "Name of the policy type"
                },
                "item_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "UUID of the line item"
                },
                "item_name": {
                  "type": "string",
                  "description": "Name of the line item"
                },
                "rate_chain": {
                  "type": "array",
                  "description": "The item's rate chain steps (filtered to step_types when provided)",
                  "items": {
                    "$ref": "#/components/schemas/rate_chain-def"
                  }
                }
              },
              "required": [
                "policy_type_id",
                "policy_type_name",
                "item_id",
                "item_name",
                "rate_chain"
              ]
            }
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-get_regenerate_statements_status": {
        "description": "Response payload for /api/v2/commissions/get_regenerate_statements_status.",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "The current state of the async job.",
            "properties": {
              "success": {
                "type": "boolean",
                "description": "True for in_progress, success, and not_found. False only when the job reached a terminal failure state."
              },
              "async_status": {
                "type": "string",
                "enum": [
                  "in_progress",
                  "success",
                  "failure",
                  "not_found"
                ],
                "description": "Current state of the background job. 'not_found' is non-terminal from the UI's perspective; callers typically poll again after a grace window because the BackgroundJob row can take a beat to appear after apply_async. 'success' and 'failure' are terminal."
              },
              "async_result": {
                "description": "Terminal result payload. Shape depends on async_status: null while 'in_progress' or 'not_found'; an HTML-formatted error string derived from the worker exception on 'failure'; a summary object on 'success' carrying both the generated commission_report file descriptors and the list of agencies the worker intentionally skipped (e.g. due to unresolvable revisions), so the UI can distinguish a fully complete run from a partial one.",
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "type": "string",
                    "description": "Terminal failure: HTML-formatted extracted exception message."
                  },
                  {
                    "type": "object",
                    "description": "Terminal success: summary of the regeneration run.",
                    "properties": {
                      "generated_count": {
                        "type": "integer",
                        "minimum": 0,
                        "description": "Number of commission_report PDFs generated. See the matching field in regenerate_statements for why the count is returned instead of the full per-PDF descriptors."
                      },
                      "skipped_agencies": {
                        "type": "array",
                        "description": "Agencies skipped due to data issues (unresolvable revisions). Populated when the worker refused to render a partial statement; the agency remains on 'Report Pending' until ops fixes the underlying data.",
                        "items": {
                          "type": "object",
                          "properties": {
                            "agency_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "agency_name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "unresolvable_term_ids": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "format": "uuid"
                              }
                            }
                          },
                          "required": [
                            "agency_id",
                            "agency_name",
                            "unresolvable_term_ids"
                          ]
                        }
                      }
                    },
                    "required": [
                      "generated_count",
                      "skipped_agencies"
                    ]
                  }
                ]
              },
              "reference_id": {
                "type": "string",
                "format": "uuid",
                "description": "Deterministic UUID derived from the report month. Informational; callers poll by year + month rather than by reference_id."
              },
              "year": {
                "type": "integer",
                "minimum": 1900,
                "maximum": 9999,
                "description": "Four-digit calendar year of the report month the server resolved the request to. Callers should re-send this on subsequent polls to preserve the resolved month across midnight rollover boundaries."
              },
              "month": {
                "type": "integer",
                "minimum": 1,
                "maximum": 12,
                "description": "Calendar month the server resolved the request to, 1-12."
              }
            },
            "required": [
              "success",
              "async_status",
              "async_result",
              "reference_id",
              "year",
              "month"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Whether the poll request itself was accepted (the job's own status is in data.async_status / data.success)."
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-get_revision_history": {
        "type": "object",
        "description": "Response schema for /api/v2/revision_history/get_revision_history",
        "properties": {
          "data": {
            "type": "object",
            "description": "Revision history for the requested policy",
            "properties": {
              "revisions": {
                "type": "array",
                "description": "List of revisions ordered chronologically",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Revision ID"
                    },
                    "effective_date": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date",
                      "description": "Effective date for the revision when available"
                    },
                    "revision_date": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date",
                      "description": "Revision date"
                    },
                    "commit_date": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date",
                      "description": "Commit date for the revision"
                    },
                    "current_premium": {
                      "type": "string",
                      "description": "Premium for the current revision"
                    },
                    "previous_premium": {
                      "type": "string",
                      "description": "Premium for the previous revision (or 0 for first revision)"
                    },
                    "premium_diff": {
                      "type": "string",
                      "description": "Difference between current and previous premiums"
                    },
                    "coverages": {
                      "type": "array",
                      "description": "Coverage-level premium details for this revision",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "Coverage name"
                          },
                          "property_name": {
                            "type": "string",
                            "description": "Name of the property when coverage is property-level"
                          },
                          "current_premium": {
                            "type": "string",
                            "description": "Coverage premium for this revision"
                          },
                          "previous_premium": {
                            "type": "string",
                            "description": "Coverage premium on the previous revision (or 0 if new)"
                          },
                          "premium_diff": {
                            "type": "string",
                            "description": "Difference between current and previous coverage premiums"
                          }
                        },
                        "required": [
                          "name",
                          "current_premium",
                          "previous_premium",
                          "premium_diff"
                        ]
                      }
                    }
                  },
                  "required": [
                    "id",
                    "current_premium",
                    "previous_premium",
                    "premium_diff",
                    "coverages"
                  ]
                }
              }
            },
            "required": [
              "revisions"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-get_risks": {
        "type": "object",
        "description": "Response Schema for get_risks endpoint",
        "properties": {
          "data": {
            "type": "array",
            "description": "Array of risk summaries for the quote",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Unique identifier for the risk"
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "Property",
                    "Vehicle",
                    "Watercraft"
                  ],
                  "description": "Type of risk (Property, Vehicle, or Watercraft)"
                },
                "name": {
                  "type": "string",
                  "description": "Display name for the risk"
                },
                "property": {
                  "type": "object",
                  "description": "Property-specific data (only present for Property type risks)",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "Property name"
                    },
                    "address_line1": {
                      "type": "string",
                      "description": "Primary address line"
                    },
                    "address_line2": {
                      "type": "string",
                      "description": "Secondary address line"
                    },
                    "address_city": {
                      "type": "string",
                      "description": "City"
                    },
                    "address_state": {
                      "type": "string",
                      "description": "State"
                    },
                    "address_zip": {
                      "type": "string",
                      "description": "ZIP code"
                    },
                    "address_country": {
                      "type": "string",
                      "description": "Country"
                    },
                    "added_from_template": {
                      "type": "boolean",
                      "description": "Indicates if the property was added from a template"
                    }
                  }
                },
                "vehicle": {
                  "type": "object",
                  "description": "Vehicle-specific data (only present for Vehicle type risks)",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "Vehicle name"
                    },
                    "primary_driver_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "ID of the primary driver"
                    },
                    "secondary_driver_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "ID of the secondary driver"
                    },
                    "registered_state": {
                      "type": "string",
                      "description": "State where vehicle is registered"
                    },
                    "vehicle_make": {
                      "type": "string",
                      "description": "Vehicle make"
                    },
                    "vehicle_model": {
                      "type": "string",
                      "description": "Vehicle model"
                    },
                    "vehicle_type_label": {
                      "type": "string",
                      "description": "Human-readable vehicle type"
                    },
                    "vehicle_type": {
                      "type": "string",
                      "description": "Vehicle type"
                    },
                    "vehicle_vin": {
                      "type": "string",
                      "description": "Vehicle identification number"
                    },
                    "vehicle_year": {
                      "type": "integer",
                      "description": "Vehicle year"
                    }
                  }
                },
                "watercraft": {
                  "type": "object",
                  "description": "Watercraft-specific data (only present for Watercraft type risks)",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Unique identifier for the watercraft"
                    },
                    "name": {
                      "type": "string",
                      "description": "Watercraft name"
                    },
                    "watercraft_type": {
                      "type": "string",
                      "description": "Type of watercraft"
                    },
                    "watercraft_make": {
                      "type": "string",
                      "description": "Make of the watercraft"
                    },
                    "watercraft_horsepower": {
                      "type": "string",
                      "description": "Engine horsepower"
                    }
                  }
                }
              },
              "required": [
                "id",
                "type",
                "name"
              ]
            }
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-get_rule": {
        "type": "object",
        "description": "Response payload for /api/v2/rules/get_rule",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "Rule UUID"
              },
              "reference_id": {
                "type": "string",
                "format": "uuid",
                "description": "Reference UUID"
              },
              "policy_type_id": {
                "type": "string",
                "format": "uuid",
                "description": "Policy type UUID"
              },
              "name": {
                "type": "string",
                "description": "Rule name"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Rule description"
              },
              "category": {
                "type": "string",
                "description": "Rule category (policy, property, vehicle, etc.)"
              },
              "module": {
                "type": "string",
                "description": "Module the rule applies to"
              },
              "severity": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Severity level for STP rules"
              },
              "waiver_behavior": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Waiver behavior for STP rules"
              },
              "waiver_terms": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Number of terms for waiver"
              },
              "enabled_for_renewal": {
                "type": "boolean",
                "description": "Whether rule runs on renewals"
              },
              "enabled_for_endorsement": {
                "type": "boolean",
                "description": "Whether rule runs on endorsements"
              },
              "enabled_for_new_business": {
                "type": "boolean",
                "description": "Whether rule runs on new business"
              },
              "sort_order": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Rule sort order"
              },
              "valid_from_date": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date",
                "description": "Start date for rule validity"
              },
              "valid_to_date": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date",
                "description": "End date for rule validity"
              },
              "properties_affected": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Which properties are affected"
              },
              "exception_type": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Exception type (include/exclude)"
              },
              "exception_agencies": {
                "type": [
                  "array",
                  "null"
                ],
                "items": {
                  "type": "string"
                },
                "description": "List of agency exceptions"
              },
              "event": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Event type for events module rules"
              },
              "deleted": {
                "type": "boolean",
                "description": "Soft delete flag"
              },
              "triggers": {
                "type": "array",
                "description": "Array of rule triggers",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "policy_type_item_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "trigger_type": {
                      "type": "string"
                    },
                    "label_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "value": {
                      "type": [
                        "array",
                        "null"
                      ],
                      "items": {
                        "type": "string"
                      }
                    },
                    "sort_order": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    }
                  }
                }
              },
              "effects": {
                "type": "array",
                "description": "Array of rule effects",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "target_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "action": {
                      "type": "string"
                    },
                    "label_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "value": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "mandatory": {
                      "type": "boolean"
                    },
                    "hard_reverse": {
                      "type": "boolean"
                    },
                    "hide_category": {
                      "type": "boolean"
                    },
                    "popup_message": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "sort_order": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      },
      "response-get_rules_config": {
        "type": "object",
        "description": "Response payload for /api/v2/rules/get_rules_config",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the API call succeeded"
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Error messages if success is false"
          },
          "data": {
            "type": "object",
            "description": "Rules configuration data",
            "properties": {
              "policy_type_configs": {
                "type": "object",
                "description": "Policy type configurations mapping policy type ID to its enabled categories",
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "enabled_categories": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "List of enabled rule categories for this policy type"
                    }
                  }
                }
              },
              "schema_fields": {
                "type": "object",
                "description": "UI schema fields for Hide/Show Field effects, keyed by category",
                "additionalProperties": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "severity_levels": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Available severity levels for STP rules (e.g., 'critical', 'high', 'medium', 'low')"
              },
              "modules": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Available rule modules"
              },
              "waiver_behaviors": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Available waiver behaviors for STP rules"
              },
              "triggers_by_category": {
                "type": "object",
                "description": "Available trigger types per category",
                "additionalProperties": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "triggers_spec": {
                "type": "object",
                "description": "Trigger type UI metadata including labels and field requirements",
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "label": {
                      "type": "string"
                    },
                    "fields": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          },
                          "required": {
                            "type": "boolean"
                          }
                        }
                      }
                    }
                  }
                }
              },
              "trigger_restrictions": {
                "type": "object",
                "description": "Restrictions per trigger type (module/policy type/category restrictions)",
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "modules": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "categories": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              },
              "default_trigger_restriction": {
                "type": "object",
                "description": "Default restriction for triggers not in trigger_restrictions"
              },
              "effects_by_category": {
                "type": "object",
                "description": "Available effect actions per category",
                "additionalProperties": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "effects_spec": {
                "type": "object",
                "description": "Effect action UI metadata including labels, field requirements, and value types. Keyed by effect action name.",
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "label": {
                      "type": "string",
                      "description": "Display label for the effect action"
                    },
                    "requires_policy_type_item": {
                      "type": "boolean",
                      "description": "Whether the effect requires a target_id (policy type item)"
                    },
                    "requires_label_name": {
                      "type": "boolean",
                      "description": "Whether the effect requires a label_name"
                    },
                    "requires_value": {
                      "type": "boolean",
                      "description": "Whether the effect requires a value"
                    },
                    "requires_popup_message": {
                      "type": "boolean",
                      "description": "Whether the effect requires a popup_message"
                    },
                    "requires_subjectivity_definition": {
                      "type": "boolean",
                      "description": "Whether the effect requires a subjectivity definition in target_id"
                    },
                    "requires_custom_error_code_id": {
                      "type": "boolean",
                      "description": "Whether the effect requires a custom_error_code_id"
                    },
                    "value_type": {
                      "description": "Type of value the effect expects. Determines the UI component: 'standard' = select/input, 'code_editor' = Python code editor, others = specialized selects. null = no value stored in the value column.",
                      "oneOf": [
                        {
                          "type": "null"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "standard",
                            "code_editor",
                            "exposure_reserve",
                            "deliverable",
                            "property_valuation",
                            "validation_message"
                          ]
                        }
                      ]
                    },
                    "optional_fields": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "List of optional boolean fields for this effect (e.g., 'hard_reverse', 'hide_category')"
                    }
                  }
                }
              },
              "effect_restrictions": {
                "type": "object",
                "description": "Restrictions per effect action"
              },
              "default_effect_restriction": {
                "type": "object",
                "description": "Default restriction for effects not in effect_restrictions"
              }
            }
          }
        }
      },
      "response-get_rules_documentation": {
        "type": "object",
        "description": "Response payload for /api/v2/rules/get_rules_documentation",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the API call succeeded"
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Error messages if success is false"
          },
          "data": {
            "type": "object",
            "description": "Advanced Triggers documentation content",
            "properties": {
              "content": {
                "type": "string",
                "description": "All documentation markdown files concatenated with --- separators and ## File: <path> headers"
              },
              "files_count": {
                "type": "integer",
                "description": "Number of documentation files included"
              },
              "total_chars": {
                "type": "integer",
                "description": "Total character count of the content field"
              },
              "files": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "List of relative file paths included, in the order they appear in content"
              }
            },
            "required": [
              "content",
              "files_count",
              "total_chars",
              "files"
            ]
          }
        }
      },
      "response-get_screening_history": {
        "description": "Response payload for /api/v2/contacts/get_screening_history",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "contact_screening_check_results": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "contact_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "integration_instance_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "screening_result": {
                      "type": "string",
                      "enum": [
                        "pass",
                        "review_required"
                      ]
                    },
                    "screening_message": {
                      "type": "string"
                    },
                    "override_date_time": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "override_reason": {
                      "type": "string"
                    },
                    "overridden_by_contact_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "date_added": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "contact_id",
                    "integration_instance_id",
                    "screening_result",
                    "date_added"
                  ]
                }
              },
              "override_contacts": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string"
                    },
                    "username": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "username"
                  ]
                }
              }
            },
            "required": [
              "contact_screening_check_results",
              "override_contacts"
            ]
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-get_status": {
        "description": "Response payload for /api/v2/background_jobs/get_status",
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Any messages or errors related to the request"
          },
          "data": {
            "type": "object",
            "properties": {
              "task_id": {
                "type": "string",
                "format": "uuid",
                "description": "The ID of the background job"
              },
              "found": {
                "type": "boolean",
                "description": "Whether the background job was found"
              },
              "data": {
                "type": "object",
                "description": "Background job details (only present if found is true)",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "The background job ID"
                  },
                  "task": {
                    "type": "string",
                    "description": "The name of the celery task"
                  },
                  "complete": {
                    "type": "boolean",
                    "description": "Whether the task has completed"
                  },
                  "failed": {
                    "type": "boolean",
                    "description": "Whether the task failed"
                  },
                  "queue_time": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "description": "When the task was queued"
                  },
                  "start_time": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "description": "When the task started executing"
                  },
                  "end_time": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "description": "When the task finished executing"
                  },
                  "retries": {
                    "type": "integer",
                    "description": "Number of retry attempts"
                  },
                  "acknowledged": {
                    "type": "boolean",
                    "description": "Whether the task has been acknowledged"
                  }
                }
              }
            },
            "required": [
              "task_id",
              "found"
            ]
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-get_summary": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "data": {
            "type": "object",
            "properties": {
              "reference_type": {
                "type": "string",
                "enum": [
                  "CLAIM",
                  "POLICY"
                ]
              },
              "reference_id": {
                "type": "string"
              },
              "variant": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "narrative": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "data_completeness_warning": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "generated_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "state": {
                "type": "string",
                "enum": [
                  "never_generated",
                  "generated"
                ]
              },
              "generation_status": {
                "type": "object",
                "description": "Latest summary generation job status for this reference. Omitted when no local agent_jobs row exists.",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "RUNNING",
                      "SUCCEEDED",
                      "FAILED"
                    ],
                    "description": "Mapped generation progress for the UI. Non-terminal agent statuses (pending, running, paused) map to RUNNING."
                  },
                  "job_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Remote AIAgents job identifier mirrored in agent_jobs."
                  },
                  "updated_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "ISO-8601 timestamp of the local agent_jobs.dateUpdated value."
                  }
                },
                "required": [
                  "status",
                  "job_id"
                ]
              },
              "last_changed_at": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Newest curated claim/policy source timestamp used for freshness. Null when no content anchor exists (never generated) or no source timestamps exist."
              },
              "is_stale": {
                "type": "boolean",
                "description": "True when last_changed_at is strictly after the summary content anchor (successful GENERATE_* job dateAdded, else generated_at). False when no content anchor exists."
              }
            },
            "required": [
              "reference_type",
              "reference_id",
              "state",
              "is_stale"
            ]
          }
        },
        "required": [
          "success",
          "messages",
          "data"
        ]
      },
      "response-get_underlying_policy_changes": {
        "type": "object",
        "description": "Response payload for /api/v2/policies/get_underlying_policy_changes",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "data": {
            "type": "object",
            "properties": {
              "changes_detected": {
                "type": "boolean"
              },
              "previous_underlying_revision_id": {
                "type": "string",
                "format": "uuid"
              },
              "new_underlying_revision_id": {
                "type": "string",
                "format": "uuid"
              },
              "contact_changes": {
                "type": "array",
                "items": {
                  "type": "object"
                }
              },
              "property_changes": {
                "type": "array",
                "items": {
                  "type": "object"
                }
              }
            }
          }
        },
        "required": [
          "success"
        ]
      },
      "response-get_underwriting_question_autofill_answers": {
        "type": "object",
        "description": "Response Schema for get_underwriting_question_autofill_answers",
        "properties": {
          "data": {
            "type": "array",
            "description": "Array of auto-fill answers for underwriting questions",
            "items": {
              "type": "object",
              "properties": {
                "question_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Unique identifier for the underwriting question"
                },
                "question_text": {
                  "type": "string",
                  "description": "The text of the underwriting question"
                },
                "suggested_answer": {
                  "type": "string",
                  "enum": [
                    "yes",
                    "no"
                  ],
                  "description": "Suggested answer to avoid blocking continuation or requiring explanations"
                },
                "prevent_continue_on": {
                  "type": "string",
                  "enum": [
                    "yes",
                    "no",
                    "none"
                  ],
                  "description": "Which answer prevents continuation (if any)"
                },
                "explain_if": {
                  "type": "string",
                  "enum": [
                    "yes",
                    "no",
                    "none"
                  ],
                  "description": "Which answer requires explanation (if any)"
                },
                "order": {
                  "type": "integer",
                  "description": "Display order of the question"
                }
              },
              "required": [
                "question_id",
                "question_text",
                "suggested_answer",
                "prevent_continue_on",
                "explain_if",
                "order"
              ]
            }
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-get_upload_url": {
        "type": "object",
        "description": "Response schema for /api/v2/imports/get_upload_url",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "type": "array",
            "description": "Array of informational or error messages",
            "items": {
              "type": "string"
            }
          },
          "data": {
            "type": "object",
            "description": "Pre-signed S3 POST URL and fields for file upload",
            "properties": {
              "schema_type": {
                "type": "string",
                "description": "Schema identifier"
              },
              "policy_type_id": {
                "type": "string",
                "format": "uuid",
                "description": "Policy type UUID (only present for dynamic schemas like 'policy_transactions')"
              },
              "upload_url": {
                "type": "string",
                "format": "uri",
                "description": "S3 bucket URL for POST upload"
              },
              "upload_fields": {
                "type": "object",
                "description": "Required fields for S3 POST request",
                "properties": {
                  "key": {
                    "type": "string",
                    "description": "S3 object key (file path)"
                  },
                  "Content-Type": {
                    "type": "string",
                    "description": "Content type (text/csv)",
                    "const": "text/csv"
                  },
                  "x-amz-server-side-encryption": {
                    "type": "string",
                    "description": "Server-side encryption method",
                    "const": "AES256"
                  },
                  "policy": {
                    "type": "string",
                    "description": "Base64-encoded upload policy"
                  },
                  "x-amz-algorithm": {
                    "type": "string",
                    "description": "AWS signing algorithm"
                  },
                  "x-amz-credential": {
                    "type": "string",
                    "description": "AWS credentials for signing"
                  },
                  "x-amz-date": {
                    "type": "string",
                    "description": "Upload timestamp"
                  },
                  "x-amz-signature": {
                    "type": "string",
                    "description": "Request signature"
                  }
                },
                "required": [
                  "key",
                  "Content-Type",
                  "x-amz-server-side-encryption",
                  "policy",
                  "x-amz-algorithm",
                  "x-amz-credential",
                  "x-amz-date",
                  "x-amz-signature"
                ]
              },
              "expires_in": {
                "type": "integer",
                "description": "Seconds until the upload URL expires",
                "const": 600
              }
            },
            "required": [
              "schema_type",
              "upload_url",
              "upload_fields",
              "expires_in"
            ]
          }
        },
        "required": [
          "success",
          "messages",
          "data"
        ]
      },
      "response-get_user_suspensions_with_geometries": {
        "type": "object",
        "description": "Response schema for /api/v2/suspensions/get_user_suspensions_with_geometries",
        "properties": {
          "data": {
            "type": "array",
            "description": "Array of suspension objects with geometry data",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Unique identifier for the suspension"
                },
                "action": {
                  "type": "string",
                  "enum": [
                    "Suspend Quoting",
                    "Suspend Binding",
                    "Suspend New Business",
                    "Suspend Renewals"
                  ],
                  "description": "The suspension action type"
                },
                "contact": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Contact ID"
                        },
                        "name": {
                          "type": "string",
                          "description": "Contact name"
                        }
                      }
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Contact associated with the suspension, null for global suspensions"
                },
                "start_date": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date",
                      "description": "Start date of the suspension"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "end_date": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date",
                      "description": "End date of the suspension"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "description": {
                  "type": "string",
                  "description": "Description of the suspension"
                },
                "geometry": {
                  "type": "null",
                  "description": "Top-level geometry is null; geometry is now attached to individual rules"
                },
                "rules": {
                  "type": "array",
                  "description": "Array of suspension rules with their geometry data",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique identifier for the rule"
                      },
                      "suspension_id": {
                        "type": "string",
                        "description": "ID of the parent suspension"
                      },
                      "rule_type": {
                        "type": "string",
                        "enum": [
                          "ZIP_CODE",
                          "COUNTY",
                          "STATE",
                          "LINE",
                          "POLICY_TYPE",
                          "POLICY_TYPE_ITEM",
                          "SUBLINE",
                          "GLOBAL"
                        ],
                        "description": "Type of suspension rule"
                      },
                      "zipcode": {
                        "oneOf": [
                          {
                            "type": "string",
                            "pattern": "^\\d{5}$",
                            "description": "5-digit zip code (for ZIP_CODE rule type)"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "county": {
                        "oneOf": [
                          {
                            "type": "string",
                            "description": "County name (for COUNTY rule type)"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "policy_type_id": {
                        "oneOf": [
                          {
                            "type": "string",
                            "description": "Policy type ID (for POLICY_TYPE rule type)"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "location_id": {
                        "oneOf": [
                          {
                            "type": "string",
                            "description": "Location ID (for STATE rule type)"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "line_id": {
                        "oneOf": [
                          {
                            "type": "string",
                            "description": "Line ID (for LINE rule type)"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "policy_type_item_id": {
                        "oneOf": [
                          {
                            "type": "string",
                            "description": "Policy type item ID (for POLICY_TYPE_ITEM rule type)"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "subline_id": {
                        "oneOf": [
                          {
                            "type": "string",
                            "description": "Subline ID (for SUBLINE rule type)"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "geometry": {
                        "oneOf": [
                          {
                            "type": "object",
                            "description": "GeoJSON geometry object for geographic rules (ZIP_CODE, COUNTY)",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "Polygon",
                                  "MultiPolygon"
                                ],
                                "description": "The type of geometry"
                              },
                              "coordinates": {
                                "type": "array",
                                "description": "Coordinates array for the geometry",
                                "items": {
                                  "type": "array",
                                  "items": {
                                    "oneOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "number"
                                        },
                                        "minItems": 2,
                                        "maxItems": 2,
                                        "description": "[longitude, latitude] coordinate pair"
                                      },
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "array",
                                          "items": {
                                            "type": "number"
                                          },
                                          "minItems": 2,
                                          "maxItems": 2
                                        },
                                        "description": "Array of coordinate pairs for MultiPolygon"
                                      }
                                    ]
                                  }
                                }
                              }
                            },
                            "required": [
                              "type",
                              "coordinates"
                            ]
                          },
                          {
                            "type": "null",
                            "description": "Null when rule has no geometry data or rule type doesn't support geography"
                          }
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "suspension_id",
                      "rule_type",
                      "geometry"
                    ]
                  }
                }
              },
              "required": [
                "id",
                "action",
                "description",
                "geometry",
                "rules"
              ]
            }
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-get_watercraft": {
        "type": "object",
        "description": "Response Schema for /api/v2/watercrafts/get_watercraft",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/watercraft-def"
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-get_zip_geometry": {
        "type": "object",
        "description": "Response schema for /api/v2/geometry/get_zip_geometry",
        "properties": {
          "data": {
            "oneOf": [
              {
                "type": "object",
                "description": "GeoJSON geometry object for the zip code",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "Polygon",
                      "MultiPolygon"
                    ],
                    "description": "The type of geometry"
                  },
                  "coordinates": {
                    "type": "array",
                    "description": "Coordinates array for the geometry",
                    "items": {
                      "type": "array",
                      "items": {
                        "oneOf": [
                          {
                            "type": "array",
                            "items": {
                              "type": "number"
                            },
                            "minItems": 2,
                            "maxItems": 2,
                            "description": "[longitude, latitude] coordinate pair"
                          },
                          {
                            "type": "array",
                            "items": {
                              "type": "array",
                              "items": {
                                "type": "number"
                              },
                              "minItems": 2,
                              "maxItems": 2
                            },
                            "description": "Array of coordinate pairs for MultiPolygon"
                          }
                        ]
                      }
                    }
                  }
                },
                "required": [
                  "type",
                  "coordinates"
                ]
              },
              {
                "type": "null",
                "description": "Null when zip code geometry is not found"
              }
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-grant_report_permission": {
        "title": "GrantReportPermissionResponse",
        "type": "object",
        "description": "Response schema for POST /api/v2/reports/grant_report_permission",
        "properties": {
          "data": {
            "type": "object",
            "description": "Payload when success is true.",
            "properties": {
              "permission": {
                "type": "object",
                "description": "Saved ACL row after upsert.",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "report_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "grantee_type": {
                    "type": "string",
                    "enum": [
                      "contact",
                      "user_group",
                      "role",
                      "permission_level"
                    ]
                  },
                  "grantee_id": {
                    "type": "string"
                  },
                  "grantee_name": {
                    "type": "string"
                  },
                  "access": {
                    "type": "string",
                    "enum": [
                      "none",
                      "read",
                      "write"
                    ]
                  },
                  "added_by": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "added_by_name": {
                    "type": "string"
                  },
                  "date_added": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "date_updated": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  }
                },
                "required": [
                  "id",
                  "report_id",
                  "grantee_type",
                  "grantee_id",
                  "grantee_name",
                  "access",
                  "added_by",
                  "added_by_name",
                  "date_added",
                  "date_updated"
                ]
              }
            },
            "required": [
              "permission"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-import_configuration": {
        "type": "object",
        "description": "Response Schema for /api/v2/settings/import_configuration. Always the configuration import record, whether the run was queued or happened in the request; poll /api/v2/settings/get_configuration_import with the same id for a queued one. The per-section outcome is in data.summary.",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "The configuration import the run was made against. Queued, it comes back at status queued; poll get_configuration_import with its id. Run in the request, it is already complete. Either way the outcome is in summary, and a later run replaces it.",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "The package's own id. This is what import_configuration runs against and what get_configuration_import is polled with, not a background job id."
              },
              "file_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The stored package. A package that arrived by url has one too: create_configuration_import fetches and stores it before returning. Withheld from listings."
              },
              "source": {
                "type": "string",
                "enum": [
                  "upload",
                  "link"
                ],
                "description": "How the package reached this site: upload for one sent through core.uploads uploadAttachment with type 'config_package', link for one fetched from a presigned S3 url."
              },
              "exported_from": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Site the package was exported from. Read out of the package itself, so it is null until a run has read it, and on packages predating origin tracking."
              },
              "exported_at": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "When the package was exported there, as recorded in it"
              },
              "dry_run": {
                "type": [
                  "boolean",
                  "null"
                ],
                "description": "Whether the last run only validated."
              },
              "status": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "queued, processing, complete or failed. Null until something has been run.",
                "enum": [
                  "queued",
                  "processing",
                  "complete",
                  "failed",
                  null
                ]
              },
              "summary": {
                "type": [
                  "object",
                  "null"
                ],
                "description": "The full outcome of the last run."
              },
              "response": {
                "type": [
                  "object",
                  "null"
                ],
                "description": "The compact document the task returned."
              },
              "error_message": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Operator-facing reason the last run failed."
              },
              "background_job_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The job carrying the last run. Null when it ran inline."
              },
              "imported_at": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "When the last run was queued, narrowed to when it began once a worker takes it; on an inline run, when it settled.",
                "format": "date-time"
              },
              "created_by": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Contact id of whoever brought the package in; null for an API-key caller with no contact"
              },
              "date_added": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "When the row was created",
                "format": "date-time"
              },
              "date_updated": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "When the row last changed",
                "format": "date-time"
              }
            },
            "required": []
          },
          "success": {
            "type": "boolean",
            "description": "Whether the request was successful"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-import_disclosures": {
        "type": "object",
        "description": "Response schema for /api/v2/imports/import_disclosures",
        "properties": {
          "data": {
            "type": "array",
            "description": "List of imported disclosure records",
            "items": {
              "type": "object",
              "properties": {
                "property_id": {
                  "type": "string",
                  "format": "uuid",
                  "title": "property_id",
                  "description": "The property ID"
                },
                "loss_date": {
                  "type": "string",
                  "format": "date",
                  "title": "loss_date",
                  "description": "Date of the loss"
                },
                "description": {
                  "type": "string",
                  "title": "description",
                  "description": "Description of the loss"
                },
                "loss_amount": {
                  "type": "number",
                  "title": "loss_amount",
                  "description": "Amount of the loss"
                },
                "loss_cause": {
                  "type": "string",
                  "title": "loss_cause",
                  "description": "Cause of the loss"
                }
              },
              "required": [
                "property_id"
              ]
            }
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-import_loss_report": {
        "type": "object",
        "description": "Response schema for /api/v2/imports/import_loss_report",
        "properties": {
          "data": {
            "type": "boolean",
            "description": "Indicates if the loss report was successfully imported"
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-import_payment_method": {
        "description": "Response schema for /api/v2/payments/import_payment_method",
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "Payment Method ID."
              },
              "contact_id": {
                "type": "string",
                "format": "uuid",
                "description": "Contact ID to which the payment method should be associated with."
              },
              "contact_external_system_reference": {
                "type": "string",
                "description": "External System Reference of the Contact to which the payment method should be associated with."
              },
              "vendor_customer_id": {
                "type": "string",
                "description": "Vendor Customer ID. This is the ID of the customer in the vendor system."
              },
              "vendor_payment_method_id": {
                "type": "string",
                "description": "Vendor Payment Method ID. This is the ID of the payment method in the vendor system."
              },
              "payment_method_type": {
                "type": "string",
                "enum": [
                  "CC",
                  "ACH"
                ]
              },
              "policy_term_id": {
                "type": "string",
                "format": "uuid",
                "description": "Policy Term ID to which the payment method should be associated with."
              },
              "policy_term_external_system_reference": {
                "type": "string",
                "description": "External System Reference of the Policy Term to which the payment method should be associated with."
              }
            },
            "required": [
              "id",
              "contact_id",
              "contact_external_system_reference",
              "vendor_customer_id",
              "vendor_payment_method_id",
              "payment_method_type",
              "policy_term_id",
              "policy_term_external_system_reference"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-import_policy_number": {
        "type": "object",
        "description": "Response schema for /api/v2/imports/import_policy_number",
        "properties": {
          "data": {
            "type": "object",
            "description": "Data related to the imported policy number",
            "properties": {
              "policy_id": {
                "type": "string",
                "format": "uuid",
                "description": "The Policy ID"
              },
              "policy_number": {
                "type": "string",
                "description": "The added policy number"
              }
            },
            "required": [
              "policy_id",
              "policy_number"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-io_mapping_add_memory_decision": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/add_memory_decision",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Body: ``{mappingId, topic, decision, rationale?}``."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_add_memory_followup": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/add_memory_followup",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Body: ``{mappingId, topic, status}``."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_add_memory_ruled_out": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/add_memory_ruled_out",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Body: ``{mappingId, approach, reason}``."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_add_note": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/add_note",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Anchor a note to a place in the mapping. To ASK somebody, prefer"
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_ask_insurance_expert": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/ask_insurance_expert",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Ask a product lead or underwriter a question about how the CARRIER'S PRODUCT"
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_ask_technical_expert": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/ask_technical_expert",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Ask an engineer a question about the SYSTEM -- the endpoint, the schema, the"
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_assess_variant_fit": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/assess_variant_fit",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Should this policy type be a variant of this mapping, or its own mapping?"
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_call_wrapped_api": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/call_wrapped_api",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Render this mapping's request and CALL the endpoint it wraps, for real."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_capture_reconcile_snapshot": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/capture_reconcile_snapshot",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Pin the live definition's domains onto the spec as the authoring snapshot"
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_clear_agent_memory": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/clear_agent_memory",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Wipe the agent_memory column."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_compile_analytics_preview": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/compile_analytics_preview",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Compile a WORKING spec's ANALYTICS section for live preview."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_compile_resolver_preview": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/compile_resolver_preview",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Compile a WORKING (unsaved) spec to its Jinja template for live preview \u2014"
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_compile_response_preview": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/compile_response_preview",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Compile a WORKING spec's RESPONSE section (``spec['response']``) for live preview."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_copilot": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/copilot",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "SSE streaming endpoint (mirrors ``reports.py:send_prompt``)."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_create_fixture": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/create_fixture",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "IO mapping endpoint create_fixture."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_create_mapping": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/create_mapping",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "IO mapping endpoint create_mapping."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_delete_fixture": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/delete_fixture",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "IO mapping endpoint delete_fixture."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_delete_mapping": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/delete_mapping",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "IO mapping endpoint delete_mapping."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_delete_schema": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/delete_schema",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Delete a BYOS schema library row."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_discard_draft_note": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/discard_draft_note",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Drop one unsent note."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_dismiss_memory_decision": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/dismiss_memory_decision",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Body: ``{mappingId, topic}``."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_dismiss_memory_ruled_out": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/dismiss_memory_ruled_out",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Body: ``{mappingId, approach}``."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_export_mapping": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/export_mapping",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Return the portable JSON blob for ``slug`` at the given version."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_find_live_copilot_job": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/find_live_copilot_job",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "The job already working on this mapping, if there is one."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_find_policy_type": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/find_policy_type",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "As-of resolve ``(name, state, effectiveDate[, lineName])`` to a minimal PT summary."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_generate_sample": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/generate_sample",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Generate a valid, complete sample instance from a schema."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_get_analytics_slots": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/get_analytics_slots",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "The slot grid for the ANALYTICS direction: the mapping's analytics schema"
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_get_copilot_job": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/get_copilot_job",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "A running job's status, next to what the review still owes."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_get_endpoint_slots": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/get_endpoint_slots",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "The endpoint's own schema flattened into the slot grid: one section per top-level"
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_get_mapping": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/get_mapping",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "IO mapping endpoint get_mapping."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_get_policy_type_definition": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/get_policy_type_definition",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Walkable PT definition (mapping scope: sub_lines + items + item_questions +"
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_get_policy_type_schema": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/get_policy_type_schema",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Synthesize the extended JSON Schema (the RH mapping target) for a resolved policy"
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_get_resolver_constructs": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/get_resolver_constructs",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Everything a mapping DECLARES for its slots to share \u2014 each of it a cell: derived"
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_get_resolver_paths": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/get_resolver_paths",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "The mapping's named path aliases ({name: absolute-path}) \u2014 the path analogue of"
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_get_resolver_spec": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/get_resolver_spec",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "The mapping's full resolver spec \u2014 the seed for the client's working copy."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_get_review": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/get_review",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "The mapping stated in the carrier's language -- one row per slot."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_get_schema": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/get_schema",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "One schema library row WITH content."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_get_schema_index": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/get_schema_index",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Parsed ACORD schema index (codes, code lists, elements, aggregates) for ``schema_id``."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_get_slotfill_context": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/get_slotfill_context",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Data for the schema-bound slotFill table editor: source.codes \u2014 the LEFT key"
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_get_source_paths": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/get_source_paths",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Flatten the inbound document to candidate SOURCE paths + sample values in one"
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_get_spec_overview": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/get_spec_overview",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Top-level snapshot of one spec."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_get_variant_slots": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/get_variant_slots",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "The Resolver Stack FORM contract for one (policyType, state) variant: the"
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_import_mapping": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/import_mapping",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Create a new mapping from an export blob."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_infer_schema_from_workbook": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/infer_schema_from_workbook",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Propose a JSON Schema from an uploaded workbook. Writes nothing -- confirm by"
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_introspect_fixture": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/introspect_fixture",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Tag tree for ``document.<...>`` autocomplete."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_list_bruno_examples": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/list_bruno_examples",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Bruno-collection examples ``{name, collection, method, url, body}``, optionally"
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_list_endpoints": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/list_endpoints",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Dotted api paths the apiCall pill suggests."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_list_fixture_coordinates": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/list_fixture_coordinates",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Every fixture on the mapping, with the COORDINATE its request resolves to."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_list_fixtures": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/list_fixtures",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Return every fixture on the mapping, **with content**."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_list_mappings": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/list_mappings",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "IO mapping endpoint list_mappings."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_list_notes": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/list_notes",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Note threads on a mapping."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_list_policy_types": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/list_policy_types",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Every PolicyType row for the carrier -- used by the copilot's discovery flow"
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_list_schemas": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/list_schemas",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Schema library for the manager UI."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_list_spec_indexes": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/list_spec_indexes",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Named query targets in a spec (code lists, aggregates, enums, ...)."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_list_specs": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/list_specs",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Every spec the registry knows, sorted ``(source, spec_id)``."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_list_versions": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/list_versions",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "IO mapping endpoint list_versions."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_load_revision_quote": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/load_revision_quote",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Reconstruct an existing revision as a ``create_quote_extended`` ``quote_info``"
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_lookup_spec_enum": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/lookup_spec_enum",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Members of a named code list / enum within a spec."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_lookup_spec_path": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/lookup_spec_path",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Resolve a path within a spec (ACORD: dotted element/aggregate; JSONSchema: dotted"
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_note_follow_up": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/note_follow_up",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Record a JOB for later -- not a question, so nobody owes a reply and it does"
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_promote_slot_to_base": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/promote_slot_to_base",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Factor a slot's per-variant override UP into the shared base catalog: the overlay"
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_reconcile_mapping": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/reconcile_mapping",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Reconcile a mapping against the LIVE policy-type definition for one variant."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_rename_mapping_slug": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/rename_mapping_slug",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Rename an existing mapping's slug."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_render": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/render",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Live preview -- render an in-flight (mapping, fixture, template) triple. When a digest in the request does not match the stored copy, nothing is rendered and `data` is `{\"resend\": [...]}`, naming the override fields to send in full."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_reply_to_note": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/reply_to_note",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Answer one review note, with an outcome."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_resolve_memory_followup": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/resolve_memory_followup",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Body: ``{mappingId, topic}``."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_resolve_note": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/resolve_note",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Close a note thread, or reopen it."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_review_inbox": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/review_inbox",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Review notes still waiting on a reply."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_review_index": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/review_index",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "The mapping's products and what each still owes -- the review's front door, for"
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_save_draft_note": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/save_draft_note",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Store a reviewer's unsent answer so a reload does not discard it. Invisible to"
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_save_resolver_spec": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/save_resolver_spec",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Persist the client's working resolver spec \u2014 Save Mapping."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_search_policies": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/search_policies",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Typeahead search for policies of a given policy type, to load a sample revision"
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_search_spec": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/search_spec",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Fuzzy search across a spec's named entities."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_set_active_version": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/set_active_version",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "IO mapping endpoint set_active_version."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_set_analytics_resolvers": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/set_analytics_resolvers",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "BATCH-write ANALYTICS cells -- the dimensions to derive from an inbound"
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_set_declarations": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/set_declarations",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Declare aliases, shared logic and the variant key in ONE transaction."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_set_endpoint_slot_source": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/set_endpoint_slot_source",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Write (or clear, with ``cell=None``) a ROOT resolver cell, addressed by its"
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_set_item_repeat": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/set_item_repeat",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Make an item emit ONE INSTANCE PER SOURCE ELEMENT, or stop it doing so."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_set_lookup_table": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/set_lookup_table",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Create or replace a shared lookup table's ``map`` (code\u2192value) and/or ``default``"
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_set_resolver_construct": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/set_resolver_construct",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Replace one construct section (``derived``/``channels``/``variantKey``) and"
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_set_resolver_path": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/set_resolver_path",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Create / rename / update named path aliases, ONE OR MANY."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_set_resolver_table": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/set_resolver_table",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Create / replace / delete one entry in the reference-table library"
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_set_resolvers": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/set_resolvers",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "BATCH-write resolver cells -- the copilot's core authoring primitive (the shift"
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_set_response_resolvers": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/set_response_resolvers",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "BATCH-write RESPONSE cells -- the FIELDS dialect, for a response the mapping"
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_set_response_rewrite": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/set_response_rewrite",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Write the RESPONSE REWRITE list -- the dialect for a response that ECHOES the"
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_set_slot_source": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/set_slot_source",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Write (or clear) a resolver cell for one slot of a LAYERED mapping -- the"
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_stamp_version": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/stamp_version",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "IO mapping endpoint stamp_version."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_start_copilot_job": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/start_copilot_job",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Hand a submitted review to the copilot as a background job."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_stop_copilot_job": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/stop_copilot_job",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Stop a running copilot job."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_submit_review": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/submit_review",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Send this reviewer's drafts as a batch the copilot is expected to answer."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_update_fixture": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/update_fixture",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "IO mapping endpoint update_fixture."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_update_mapping_metadata": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/update_mapping_metadata",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "IO mapping endpoint update_mapping_metadata."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_update_memory_summary": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/update_memory_summary",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Body: ``{mappingId, summary}``."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-io_mapping_upload_schema": {
        "type": "object",
        "description": "Response schema for POST /api/v2/io_mapping/upload_schema",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Create or replace a BYOS schema library row after validating content."
          }
        },
        "required": [
          "success"
        ]
      },
      "response-is_stp_enabled": {
        "type": "object",
        "description": "Response payload for /api/v2/policies/is_stp_enabled",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": [
                      "string",
                      "array"
                    ],
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "is_stp_enabled": {
                "type": "boolean",
                "description": "Whether STP is enabled for the provided revision"
              }
            },
            "required": [
              "is_stp_enabled"
            ]
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "data",
          "messages"
        ]
      },
      "response-issue_full_quote": {
        "type": "object",
        "description": "Response payload for /api/v2/quotes/issue_full_quote",
        "properties": {
          "data": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/full_quote-def"
              }
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-ivans_dbcs_abandon_build": {
        "description": "Response schema for /api/v2/ivans_dbcs/abandon_build.",
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "abandoned": {
                "type": "boolean"
              },
              "reference_id": {
                "type": "string",
                "format": "uuid"
              },
              "year": {
                "type": "integer"
              },
              "month": {
                "type": "integer"
              }
            },
            "required": [
              "abandoned",
              "reference_id",
              "year",
              "month"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Whether the request itself succeeded. False with messages.refusal_code on an admission refusal."
          },
          "messages": {
            "description": "Empty on success. On a refusal: an object with refusal_code plus one sentence under the field the refusal is about.",
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "properties": {
                  "refusal_code": {
                    "type": "string",
                    "enum": [
                      "VENDOR_DISABLED",
                      "EMPTY_SELECTION",
                      "MONTH_NOT_COMPLETE",
                      "CHECKPOINT_UNFINISHED",
                      "CHECKPOINT_UNREADABLE",
                      "NO_COMMISSION_PAYMENTS",
                      "ACKNOWLEDGEMENT_REQUIRED",
                      "SUPERSEDED_FILE_NOT_FOUND",
                      "SUPERSEDED_FILE_WRONG_TYPE",
                      "SUPERSEDED_FILE_WRONG_MONTH",
                      "NO_BUILD_IN_FLIGHT"
                    ],
                    "description": "Which gate refused the request. One code per gate, so a UI never parses the sentence."
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-ivans_dbcs_get_build_status": {
        "description": "Response schema for /api/v2/ivans_dbcs/get_build_status.",
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "success": {
                "type": "boolean",
                "description": "False only when build_status is failed -- including a build that failed its stability check, which Celery records as a success."
              },
              "async_status": {
                "type": "string",
                "enum": [
                  "in_progress",
                  "success",
                  "failure",
                  "not_found"
                ],
                "description": "Raw job state. Render build_status instead."
              },
              "async_result": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "type": "string",
                    "description": "HTML-escaped error from a job that raised."
                  },
                  {
                    "type": "object",
                    "description": "The worker's result envelope. The worker returns this normally for every domain_status, including failed.",
                    "properties": {
                      "domain_status": {
                        "type": "string",
                        "enum": [
                          "complete",
                          "no_data",
                          "failed"
                        ]
                      },
                      "reason": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "enum": [
                          null,
                          "UNSTABLE_PAYMENT_COUNT",
                          "SNAPSHOT_UNREADABLE",
                          "GENERATION_ERROR",
                          "ALL_AGENCIES_FAILED",
                          "SOME_AGENCIES_FAILED"
                        ]
                      },
                      "detail": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "build_token": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "file_id": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "The XML File. Null for no_data and failed."
                      },
                      "outcome_file_id": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "The per-agency outcome roster File."
                      },
                      "snapshot_file_id": {
                        "type": "string"
                      },
                      "report_month": {
                        "type": "string",
                        "description": "YYYY-MM"
                      },
                      "submitted_at": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date-time"
                      },
                      "counts": {
                        "type": [
                          "object",
                          "null"
                        ],
                        "properties": {
                          "selected": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "included": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "no_data": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "failed": {
                            "type": "integer",
                            "minimum": 0
                          }
                        }
                      },
                      "build_seconds": {
                        "type": "number"
                      },
                      "supersedes_file_id": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    }
                  }
                ]
              },
              "build_status": {
                "type": "string",
                "enum": [
                  "in_progress",
                  "not_found",
                  "complete",
                  "no_data",
                  "failed"
                ],
                "description": "What a UI should render: the envelope's domain_status once the job is terminal."
              },
              "stalled_since": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "Advisory. Set when an in-progress build started (or, if it never started, was queued) at least 6 hours ago. Nothing acts on it; Abandon is the operator's call."
              },
              "reference_id": {
                "type": "string",
                "format": "uuid"
              },
              "year": {
                "type": "integer"
              },
              "month": {
                "type": "integer"
              }
            },
            "required": [
              "success",
              "async_status",
              "async_result",
              "build_status",
              "stalled_since",
              "reference_id",
              "year",
              "month"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Whether the request itself succeeded. False with messages.refusal_code on an admission refusal."
          },
          "messages": {
            "description": "Empty on success. On a refusal: an object with refusal_code plus one sentence under the field the refusal is about.",
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "properties": {
                  "refusal_code": {
                    "type": "string",
                    "enum": [
                      "VENDOR_DISABLED",
                      "EMPTY_SELECTION",
                      "MONTH_NOT_COMPLETE",
                      "CHECKPOINT_UNFINISHED",
                      "CHECKPOINT_UNREADABLE",
                      "NO_COMMISSION_PAYMENTS",
                      "ACKNOWLEDGEMENT_REQUIRED",
                      "SUPERSEDED_FILE_NOT_FOUND",
                      "SUPERSEDED_FILE_WRONG_TYPE",
                      "SUPERSEDED_FILE_WRONG_MONTH",
                      "NO_BUILD_IN_FLIGHT"
                    ],
                    "description": "Which gate refused the request. One code per gate, so a UI never parses the sentence."
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-ivans_dbcs_get_configuration": {
        "description": "Response schema for /api/v2/ivans_dbcs/get_configuration. Built from named fields only, so no transport or connection detail from the vendor row's custom data can reach the wire through it -- the SFTP username, password, pem key, address and port are all absent by construction rather than by redaction.",
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "checked": {
                "type": "boolean",
                "description": "The vendors.checked column: whether DBCS is switched on for this tenant."
              },
              "upload_enabled": {
                "type": "boolean",
                "description": "Whether generated DBCS files are uploaded to the configured transport."
              },
              "upload_method": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Transport name only (for example 'sftp'), never its settings. Null when unset."
              },
              "selected_agency_count": {
                "type": "integer",
                "minimum": 0,
                "description": "How many agency ids the stored selection holds. A count, not the roster: the ids themselves come from get_selected_agencies."
              }
            },
            "required": [
              "checked",
              "upload_enabled",
              "upload_method",
              "selected_agency_count"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful."
          },
          "messages": {
            "description": "Any messages or errors related to the request.",
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-ivans_dbcs_get_existing_artifacts": {
        "description": "Response schema for /api/v2/ivans_dbcs/get_existing_artifacts. DBCS XML on file for the month, newest first.",
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "year": {
                "type": "integer"
              },
              "month": {
                "type": "integer"
              },
              "artifacts": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "file_id": {
                      "type": "string"
                    },
                    "title": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "date_added": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "match_source": {
                      "type": "string",
                      "enum": [
                        "metadata",
                        "filename"
                      ],
                      "description": "metadata: the file's envelope names this month. filename: no envelope; the title matches a legacy shape."
                    },
                    "verified": {
                      "type": "boolean",
                      "description": "False for a filename match -- a title is not proof of what the file covers."
                    },
                    "origin": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "support_tools for builds from this API; null for cron."
                    },
                    "build_token": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "supersedes_file_id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "build_contract": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Null means unknown (the file predates the envelope), never clean."
                    },
                    "successful_upload": {
                      "type": "boolean",
                      "description": "Queued on the integration path; not proof of delivery."
                    }
                  },
                  "required": [
                    "file_id",
                    "match_source",
                    "verified"
                  ]
                }
              }
            },
            "required": [
              "year",
              "month",
              "artifacts"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Whether the request itself succeeded. False with messages.refusal_code on an admission refusal."
          },
          "messages": {
            "description": "Empty on success. On a refusal: an object with refusal_code plus one sentence under the field the refusal is about.",
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "properties": {
                  "refusal_code": {
                    "type": "string",
                    "enum": [
                      "VENDOR_DISABLED",
                      "EMPTY_SELECTION",
                      "MONTH_NOT_COMPLETE",
                      "CHECKPOINT_UNFINISHED",
                      "CHECKPOINT_UNREADABLE",
                      "NO_COMMISSION_PAYMENTS",
                      "ACKNOWLEDGEMENT_REQUIRED",
                      "SUPERSEDED_FILE_NOT_FOUND",
                      "SUPERSEDED_FILE_WRONG_TYPE",
                      "SUPERSEDED_FILE_WRONG_MONTH",
                      "NO_BUILD_IN_FLIGHT"
                    ],
                    "description": "Which gate refused the request. One code per gate, so a UI never parses the sentence."
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-ivans_dbcs_get_selected_agencies": {
        "description": "Response schema for /api/v2/ivans_dbcs/get_selected_agencies. The whole stored selection resolved, INCLUDING ids that are no longer eligible: the save replaces the entire set, so an operator blocked by a stored id that has since gone inactive or terminated needs a way to see it, and no search page will ever show it.\n\nDeliberately NOT paginated and NOT capped. Nothing bounds the stored selection -- the legacy CLI selection tool writes it with no cap of its own, and MAX_SELECTION_IDS bounds only what a request may submit. A client must be prepared for a list longer than it could have submitted itself.",
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "agencies": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ivans_dbcs_resolved_agency-def"
                }
              },
              "unknown_contact_ids": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Submitted ids with no contacts row at all, sorted so the same request twice produces the same payload. These are not agencies that failed eligibility -- those appear in agencies with eligible false."
              }
            },
            "required": [
              "agencies",
              "unknown_contact_ids"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful."
          },
          "messages": {
            "description": "Any messages or errors related to the request.",
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-ivans_dbcs_rebuild": {
        "description": "Response schema for /api/v2/ivans_dbcs/rebuild. Same shape as submit_build.",
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "success": {
                "type": "boolean"
              },
              "accepted": {
                "type": "boolean",
                "description": "True when this request queued a new build. False when a build for the month was already in flight (or another submit held the enqueue lock): nothing new was queued, and the existing build keeps the reference_id."
              },
              "async_status": {
                "type": "string",
                "enum": [
                  "in_progress"
                ],
                "description": "Always in_progress: the build waits a 5-minute stability countdown before it starts."
              },
              "async_result": {
                "type": "null"
              },
              "reference_id": {
                "type": "string",
                "format": "uuid",
                "description": "Deterministic per report month. Every submit, poll and Abandon for the month lands on the same job row."
              },
              "build_token": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "Full uuid4 identifying this build's artifacts (snapshot, outcome and XML titles all carry it). Null when accepted is false."
              },
              "snapshot_file_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "The frozen agency selection this build uses. Null when accepted is false."
              },
              "submitted_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "supersedes_file_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "year": {
                "type": "integer"
              },
              "month": {
                "type": "integer"
              }
            },
            "required": [
              "success",
              "accepted",
              "async_status",
              "reference_id",
              "build_token",
              "year",
              "month"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Whether the request itself succeeded. False with messages.refusal_code on an admission refusal."
          },
          "messages": {
            "description": "Empty on success. On a refusal: an object with refusal_code plus one sentence under the field the refusal is about.",
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "properties": {
                  "refusal_code": {
                    "type": "string",
                    "enum": [
                      "VENDOR_DISABLED",
                      "EMPTY_SELECTION",
                      "MONTH_NOT_COMPLETE",
                      "CHECKPOINT_UNFINISHED",
                      "CHECKPOINT_UNREADABLE",
                      "NO_COMMISSION_PAYMENTS",
                      "ACKNOWLEDGEMENT_REQUIRED",
                      "SUPERSEDED_FILE_NOT_FOUND",
                      "SUPERSEDED_FILE_WRONG_TYPE",
                      "SUPERSEDED_FILE_WRONG_MONTH",
                      "NO_BUILD_IN_FLIGHT"
                    ],
                    "description": "Which gate refused the request. One code per gate, so a UI never parses the sentence."
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-ivans_dbcs_resolve_agencies": {
        "description": "Response schema for /api/v2/ivans_dbcs/resolve_agencies. The same shape get_selected_agencies answers with, because both endpoints answer the same two questions: which of these ids are agencies and what is wrong with each one, and which are not contacts at all.",
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "agencies": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ivans_dbcs_resolved_agency-def"
                }
              },
              "unknown_contact_ids": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Submitted ids with no contacts row at all, sorted so the same request twice produces the same payload. These are not agencies that failed eligibility -- those appear in agencies with eligible false."
              }
            },
            "required": [
              "agencies",
              "unknown_contact_ids"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful."
          },
          "messages": {
            "description": "Any messages or errors related to the request.",
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-ivans_dbcs_save_selected_agencies": {
        "description": "Response schema for /api/v2/ivans_dbcs/save_selected_agencies. Two counts, deliberately not the refreshed configuration object, so the caller can confirm the replace took effect without this endpoint becoming a second read model that has to be kept in step with get_configuration.\n\nA successful save also writes exactly one settings note recording the before and after counts. The note carries counts only -- it is an audit trail, not a copy of the roster.",
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "selected_agency_count": {
                "type": "integer",
                "minimum": 0,
                "description": "Agencies stored after the replace. Equals the number of DISTINCT ids submitted, which is lower than the submitted length when the payload repeated an id."
              },
              "previous_agency_count": {
                "type": "integer",
                "minimum": 0,
                "description": "Agencies stored before the replace."
              }
            },
            "required": [
              "selected_agency_count",
              "previous_agency_count"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful."
          },
          "messages": {
            "description": "Empty on success. On a refusal this is an object keyed by field, and it always carries contact_ids with one human-readable sentence naming every offending id. It additionally carries exactly one of the structured keys below, which a UI can act on without parsing that sentence. Validation is all-or-nothing and runs before the write, so a refused request stores nothing.",
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "properties": {
                  "contact_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "One sentence naming every offending id."
                  },
                  "rejected_agencies": {
                    "type": "array",
                    "description": "Present when one or more submitted ids are not eligible. An id already sitting in the stored selection gets no exemption: accepting it would store a roster DBCS generation cannot honour.",
                    "items": {
                      "type": "object",
                      "properties": {
                        "contact_id": {
                          "type": "string",
                          "format": "uuid",
                          "description": "contacts.id of the agency."
                        },
                        "name": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "contacts.name. Null when the column is null."
                        },
                        "reasons": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "NOT_AN_AGENCY",
                              "NO_AGENCY_NUMBER",
                              "INACTIVE",
                              "TERMINATED",
                              "AGENCY_INACTIVE"
                            ]
                          },
                          "description": "The eligibility axes this id fails. Empty when the id has no contacts row at all."
                        }
                      },
                      "required": [
                        "contact_id",
                        "name",
                        "reasons"
                      ]
                    }
                  },
                  "duplicate_agency_numbers": {
                    "type": "array",
                    "description": "Present when two or more SUBMITTED agencies carry the same agency number, compared case-insensitively. Scoped to the submission on purpose: selecting exactly one of a conflicting pair is allowed, so testing against the roster-wide conflict set would refuse a caller who did the right thing with no way to proceed.",
                    "items": {
                      "type": "object",
                      "properties": {
                        "agency_number": {
                          "type": "string",
                          "description": "The colliding number, upper-cased as the comparison key."
                        },
                        "agencies": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "contact_id": {
                                "type": "string",
                                "format": "uuid",
                                "description": "contacts.id of the agency."
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "contacts.name. Null when the column is null."
                              }
                            },
                            "required": [
                              "contact_id",
                              "name"
                            ]
                          }
                        }
                      },
                      "required": [
                        "agency_number",
                        "agencies"
                      ]
                    }
                  },
                  "confirmation_text": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Present when contact_ids is empty and confirmation_text was not the required string. The message names the string to type."
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-ivans_dbcs_search_agencies": {
        "description": "Response schema for /api/v2/ivans_dbcs/search_agencies. One page of the ELIGIBLE agency roster only -- an ineligible contact never appears here, whatever the search term. Use resolve_agencies to ask about an arbitrary contact.",
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "page": {
                "type": "integer",
                "minimum": 1,
                "description": "The page that was served, echoed from the request."
              },
              "page_size": {
                "type": "integer",
                "minimum": 1,
                "maximum": 25,
                "description": "The page size that was applied, echoed from the request."
              },
              "total_count": {
                "type": "integer",
                "minimum": 0,
                "description": "Eligible agencies matching the search across every page, not the length of this page. Reported even when this page is empty."
              },
              "total_pages": {
                "type": "integer",
                "minimum": 0,
                "description": "Pages needed to cover total_count; 0 when there are no matches."
              },
              "agencies": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ivans_dbcs_agency-def"
                },
                "description": "This page's rows, ordered by agency number with the contact id as a tiebreaker so offset paging stays stable across requests."
              }
            },
            "required": [
              "page",
              "page_size",
              "total_count",
              "total_pages",
              "agencies"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful."
          },
          "messages": {
            "description": "Any messages or errors related to the request.",
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-ivans_dbcs_submit_build": {
        "description": "Response schema for /api/v2/ivans_dbcs/submit_build.",
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "success": {
                "type": "boolean"
              },
              "accepted": {
                "type": "boolean",
                "description": "True when this request queued a new build. False when a build for the month was already in flight (or another submit held the enqueue lock): nothing new was queued, and the existing build keeps the reference_id."
              },
              "async_status": {
                "type": "string",
                "enum": [
                  "in_progress"
                ],
                "description": "Always in_progress: the build waits a 5-minute stability countdown before it starts."
              },
              "async_result": {
                "type": "null"
              },
              "reference_id": {
                "type": "string",
                "format": "uuid",
                "description": "Deterministic per report month. Every submit, poll and Abandon for the month lands on the same job row."
              },
              "build_token": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "Full uuid4 identifying this build's artifacts (snapshot, outcome and XML titles all carry it). Null when accepted is false."
              },
              "snapshot_file_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "The frozen agency selection this build uses. Null when accepted is false."
              },
              "submitted_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "supersedes_file_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "year": {
                "type": "integer"
              },
              "month": {
                "type": "integer"
              }
            },
            "required": [
              "success",
              "accepted",
              "async_status",
              "reference_id",
              "build_token",
              "year",
              "month"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Whether the request itself succeeded. False with messages.refusal_code on an admission refusal."
          },
          "messages": {
            "description": "Empty on success. On a refusal: an object with refusal_code plus one sentence under the field the refusal is about.",
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "properties": {
                  "refusal_code": {
                    "type": "string",
                    "enum": [
                      "VENDOR_DISABLED",
                      "EMPTY_SELECTION",
                      "MONTH_NOT_COMPLETE",
                      "CHECKPOINT_UNFINISHED",
                      "CHECKPOINT_UNREADABLE",
                      "NO_COMMISSION_PAYMENTS",
                      "ACKNOWLEDGEMENT_REQUIRED",
                      "SUPERSEDED_FILE_NOT_FOUND",
                      "SUPERSEDED_FILE_WRONG_TYPE",
                      "SUPERSEDED_FILE_WRONG_MONTH",
                      "NO_BUILD_IN_FLIGHT"
                    ],
                    "description": "Which gate refused the request. One code per gate, so a UI never parses the sentence."
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-ivr_policy_lookup": {
        "type": "object",
        "description": "Response Schema for /api/v2/policies/ivr_lookup",
        "properties": {
          "policies": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "policyNumber": {
                  "type": "string",
                  "description": "Full formatted policy number"
                },
                "policyId": {
                  "type": "string",
                  "format": "uuid",
                  "description": "UUID of the policy"
                },
                "activeRevisionPolicyStatus": {
                  "type": "string",
                  "enum": [
                    "Active",
                    "Binder Active",
                    "Submitted",
                    "Unsubmitted",
                    "Canceled",
                    "Canceled, Non-Payment of Premium",
                    "Cancellation Pending, Non-Payment of Premium",
                    "Expired",
                    "Rejected",
                    "Pending E-Signature",
                    "Cancellation Pending"
                  ],
                  "description": "Status of the active revision"
                }
              },
              "required": [
                "policyNumber",
                "policyId",
                "activeRevisionPolicyStatus"
              ]
            }
          },
          "totalFound": {
            "type": "integer",
            "description": "Total number of policies found",
            "minimum": 0
          }
        },
        "required": [
          "policies",
          "totalFound"
        ]
      },
      "response-link_underlying_policy": {
        "type": "object",
        "description": "Response payload for /api/v2/policies/link_underlying_policy",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "True if the operation was successful, false otherwise"
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "List of human-readable messages (errors or informational)"
          },
          "data": {
            "type": "object",
            "properties": {
              "message": {
                "type": "string",
                "description": "Success confirmation message"
              }
            },
            "description": "Response data containing confirmation of successful operation"
          }
        },
        "required": [
          "success",
          "messages"
        ]
      },
      "response-list_additional_interests": {
        "description": "Response payload for /api/v2/additional_interests/list_additional_interests (revision and risk scopes).",
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Success or informational messages"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/additional_interest-def"
            },
            "description": "Array of additional interests for the quote"
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-list_available_schemas": {
        "type": "object",
        "description": "Response schema for /api/v2/imports/list_available_schemas",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "type": "array",
            "description": "Array of informational or error messages",
            "items": {
              "type": "string"
            }
          },
          "data": {
            "type": "object",
            "description": "Response data containing available schemas",
            "properties": {
              "schemas": {
                "type": "array",
                "description": "List of available import schemas",
                "items": {
                  "type": "object",
                  "properties": {
                    "schema_type": {
                      "type": "string",
                      "description": "Unique identifier for the schema type",
                      "examples": [
                        "insureds",
                        "agencies",
                        "policy_transactions"
                      ]
                    },
                    "name": {
                      "type": "string",
                      "description": "Human-readable schema name"
                    },
                    "description": {
                      "type": "string",
                      "description": "Detailed description of the schema purpose"
                    },
                    "field_count": {
                      "type": "integer",
                      "description": "Number of fields in the schema",
                      "minimum": 0
                    },
                    "required_parameters": {
                      "type": "array",
                      "description": "List of required parameters to generate this schema",
                      "items": {
                        "type": "string"
                      }
                    },
                    "query_type": {
                      "type": "string",
                      "description": "Query type for dynamic schemas",
                      "examples": [
                        "policy_type_items"
                      ]
                    }
                  },
                  "required": [
                    "schema_type",
                    "name",
                    "description"
                  ]
                }
              }
            },
            "required": [
              "schemas"
            ]
          }
        },
        "required": [
          "success",
          "messages",
          "data"
        ]
      },
      "response-list_brand_associations": {
        "type": "object",
        "description": "Response Schema for /api/v2/brands/list_brand_associations",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/brand_association-def"
            }
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-list_brands": {
        "type": "object",
        "description": "Response Schema for /api/v2/brands/list_brands",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/brand-def"
            }
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-list_calculated_fields": {
        "description": "Response payload for /api/v2/document_templates/list_calculated_fields",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object"
              }
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/calculated_field-def"
            },
            "description": "Flat list of calculated fields. Use field_type to distinguish global vs template."
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-list_claim_changes": {
        "type": "object",
        "description": "Response Schema for /api/v2/claim_changes/list_claim_changes",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "claim_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "UUID of the Claim"
                },
                "claim_number": {
                  "type": "string",
                  "description": "Claim number"
                },
                "date_stamp": {
                  "type": "string",
                  "format": "date",
                  "description": "Claim change date"
                },
                "transaction": {
                  "type": "string",
                  "description": "Claim change transaction type"
                },
                "changed_from": {
                  "type": "string",
                  "description": "Claim change from"
                },
                "changed_to": {
                  "type": "string",
                  "description": "Claim change to"
                },
                "item_name": {
                  "type": "string",
                  "description": "Item name"
                }
              }
            }
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-list_claim_estimations": {
        "type": "object",
        "description": "Response Schema for /api/v2/claim_estimations/list_claim_estimations",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/claim_estimation-def"
            }
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-list_configuration_exports": {
        "type": "object",
        "description": "Response Schema for /api/v2/settings/list_configuration_exports",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "True if the request was handled"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "A page of configuration exports.",
            "properties": {
              "results": {
                "type": "array",
                "description": "The records, newest first. file_id is withheld here: core.uploads.getAttachment is gateway exposed with no permissions of its own, so handing out every package's id in one response is surface a history view does not need. Fetch the record itself to get it.",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "The record's own id. This is what get_configuration_export is polled with, not the background job id."
                    },
                    "policy_type_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid",
                      "description": "The policy type that was exported"
                    },
                    "skip_forms": {
                      "type": "boolean",
                      "description": "Whether form files were skipped"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "queued",
                        "processing",
                        "complete",
                        "failed"
                      ],
                      "description": "queued and processing are still moving; complete and failed are terminal. A poller stops on the latter two."
                    },
                    "filename": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Name of the package file"
                    },
                    "byte_size": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Size of the package in bytes"
                    },
                    "package_version": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Configuration package format version"
                    },
                    "error_message": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Populated only when status is failed. Operator-facing text, never raw exception output: an unrecognised failure is reduced to a pointer at the background job record. Capped at 500 characters."
                    },
                    "background_job_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The run that produced this record. Nullable and ON DELETE SET NULL: jobs are housekeeping and get cleared, and losing the run must not take the record with it."
                    },
                    "created_by": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Contact id of whoever queued it; null for an API-key caller with no contact"
                    },
                    "date_added": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "date_updated": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "status"
                  ]
                }
              },
              "total": {
                "type": "integer",
                "description": "Total matching records, for paging. Advisory when status is set: a record whose job was lost is settled only when a page reads it, so it can still be counted under its old status."
              },
              "offset": {
                "type": "integer",
                "description": "The offset this page starts at"
              }
            },
            "required": [
              "results",
              "total",
              "offset"
            ]
          }
        },
        "required": [
          "success",
          "messages",
          "data"
        ]
      },
      "response-list_configuration_imports": {
        "type": "object",
        "description": "Response Schema for /api/v2/settings/list_configuration_imports",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "True if the request was handled"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "A page of configuration packages, newest first",
            "properties": {
              "results": {
                "type": "array",
                "items": {
                  "type": "object",
                  "description": "A package with the outcome of its last run. summary and response are withheld here, as file_id is: fetch the package itself for those.",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "The package's own id. This is what import_configuration runs against and what get_configuration_import is polled with, not a background job id."
                    },
                    "source": {
                      "type": "string",
                      "enum": [
                        "upload",
                        "link"
                      ],
                      "description": "How the package reached this site: upload for one sent through core.uploads uploadAttachment with type 'config_package', link for one fetched from a presigned S3 url."
                    },
                    "exported_from": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Site the package was exported from. Read out of the package itself, so it is null until a run has read it, and on packages predating origin tracking."
                    },
                    "exported_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "When the package was exported there, as recorded in it"
                    },
                    "dry_run": {
                      "type": [
                        "boolean",
                        "null"
                      ],
                      "description": "Whether the last run only validated."
                    },
                    "status": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "queued, processing, complete or failed. Null until something has been run.",
                      "enum": [
                        "queued",
                        "processing",
                        "complete",
                        "failed",
                        null
                      ]
                    },
                    "error_message": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Operator-facing reason the last run failed."
                    },
                    "background_job_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The job carrying the last run. Null when it ran inline."
                    },
                    "imported_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "When the last run was queued, narrowed to when it began once a worker takes it; on an inline run, when it settled.",
                      "format": "date-time"
                    },
                    "created_by": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Contact id of whoever brought the package in; null for an API-key caller with no contact"
                    },
                    "date_added": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "When the row was created",
                      "format": "date-time"
                    },
                    "date_updated": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "When the row last changed",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "source"
                  ]
                },
                "description": "The packages on this page"
              },
              "total": {
                "type": "integer",
                "description": "How many packages match the filter in total, to page against. Advisory when status is set: a record whose job was lost is settled only when a page reads it, so it can still be counted under its old status."
              },
              "offset": {
                "type": "integer",
                "description": "The offset this page was read at"
              }
            },
            "required": [
              "results",
              "total",
              "offset"
            ]
          }
        },
        "required": [
          "success",
          "messages",
          "data"
        ]
      },
      "response-list_contacts_by_role_code": {
        "description": "Response payload for /api/v2/contacts/list_contacts_by_role_code.",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "array",
            "description": "List of matching contacts",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "agency_number": {
                  "type": "string"
                },
                "agency_group_number": {
                  "type": "string"
                },
                "producer_number": {
                  "type": "string"
                }
              },
              "required": [
                "id"
              ]
            }
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-list_container_coverages_summary": {
        "type": "object",
        "description": "Response schema for POST /api/v2/coverages/list_container_coverages_summary",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source (e.g. _base_, _service_)"
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "container_id": {
                "type": "string",
                "description": "ID of the container (quote_id or property_id)"
              },
              "coverages": {
                "type": "array",
                "description": "List of coverage summaries for the container",
                "items": {
                  "type": "object",
                  "description": "Coverage summary (subset of full coverage fields)",
                  "properties": {
                    "id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "limit1": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "limit1_type": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "limit2": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "limit2_type": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "limit3": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "limit3_type": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "deductible": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "coverage_type_id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "written_premium": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "custom_fields": {
                      "type": [
                        "array",
                        "null"
                      ],
                      "items": {
                        "type": "object"
                      }
                    },
                    "rating_fields": {
                      "type": [
                        "array",
                        "null"
                      ],
                      "items": {
                        "type": "object"
                      }
                    },
                    "questions": {
                      "type": [
                        "array",
                        "null"
                      ],
                      "items": {
                        "type": "object"
                      }
                    },
                    "user_inputs": {
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    "sort_order": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "policy_type_id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "scheduled_items": {
                      "type": [
                        "array",
                        "null"
                      ],
                      "items": {
                        "type": "object"
                      }
                    },
                    "label_hint": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "sub_line": {
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  }
                }
              },
              "pagination": {
                "type": [
                  "object",
                  "null"
                ],
                "description": "Pagination metadata when pagination was requested",
                "properties": {
                  "page": {
                    "type": "integer"
                  },
                  "page_size": {
                    "type": "integer"
                  },
                  "total_count": {
                    "type": "integer"
                  },
                  "total_pages": {
                    "type": "integer"
                  }
                }
              }
            },
            "required": [
              "container_id",
              "coverages",
              "pagination"
            ]
          }
        },
        "required": [
          "success",
          "messages",
          "data"
        ]
      },
      "response-list_containers": {
        "type": "object",
        "description": "Response schema for POST /api/v2/coverages/list_containers",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Messages or errors related to the request"
              },
              {
                "type": "object",
                "description": "Structured messages keyed by source (e.g. _base_, _service_)"
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "containers": {
                "type": "array",
                "description": "List of containers (Policy Wide and/or Properties) with coverage counts",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "policy_wide",
                        "property"
                      ],
                      "description": "Container type"
                    },
                    "id": {
                      "type": "string",
                      "description": "Container ID (quote_id for policy_wide, property_id for property)"
                    },
                    "name": {
                      "type": "string",
                      "description": "Display name (e.g. Policy Wide, or property/location name)"
                    },
                    "address": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "description": "Address for property containers; null for policy_wide",
                      "properties": {
                        "address_line1": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "address_line2": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "address_city": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "address_state": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "address_zip": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    "coverage_count": {
                      "type": "integer",
                      "description": "Number of coverages in this container"
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "name",
                    "coverage_count"
                  ]
                }
              }
            },
            "required": [
              "containers"
            ]
          }
        },
        "required": [
          "success",
          "messages",
          "data"
        ]
      },
      "response-list_copilot_skills": {
        "type": "object",
        "description": "Response schema for /api/v2/copilot_skills/list_copilot_skills",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "skills": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/copilot_skill-def"
                }
              },
              "counts": {
                "type": "object",
                "properties": {
                  "total": {
                    "type": "integer",
                    "description": "Total number of skills for this carrier"
                  },
                  "by_status": {
                    "type": "object",
                    "properties": {
                      "DRAFT": {
                        "type": "integer"
                      },
                      "ACTIVE": {
                        "type": "integer"
                      },
                      "ARCHIVED": {
                        "type": "integer"
                      }
                    },
                    "description": "Skill counts grouped by status"
                  }
                },
                "required": [
                  "total",
                  "by_status"
                ]
              }
            },
            "required": [
              "skills",
              "counts"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ],
            "description": "Any messages or errors related to the request"
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-list_custom_fields_types": {
        "type": "object",
        "description": "Response Schema for /api/v2/watercrafts/list_custom_fields_types",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Unique identifier for the custom field type"
                },
                "name": {
                  "type": "string",
                  "description": "Name of the custom field type"
                },
                "field_type": {
                  "type": "string",
                  "description": "Type of the custom field (text, number, date, etc.)"
                },
                "is_required": {
                  "type": "boolean",
                  "description": "Whether the custom field is required"
                },
                "default_value": {
                  "type": [
                    "string",
                    "number",
                    "boolean",
                    "null"
                  ],
                  "description": "Default value for the custom field"
                },
                "options": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "items": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": "string",
                        "description": "Option value"
                      },
                      "label": {
                        "type": "string",
                        "description": "Option display label"
                      }
                    }
                  },
                  "description": "Available options for select-type fields"
                },
                "validation_rules": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "description": "Validation rules for the custom field"
                }
              }
            }
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-list_definition_overrides": {
        "type": "object",
        "description": "Response payload for /api/v2/quick_code_values/list_definition_overrides.",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request was successful"
          },
          "data": {
            "type": "object",
            "description": "Endpoint payload wrapped by the api_request response envelope",
            "properties": {
              "overridden_definition_codes": {
                "type": "array",
                "description": "Policy type definition codes holding at least one override row for the quick code",
                "items": {
                  "type": "string"
                }
              },
              "definitions_for_value": {
                "type": "array",
                "description": "Policy type definition codes holding an override row for code_value_type; empty when code_value_type is not supplied",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "messages": {
            "type": [
              "array",
              "object"
            ],
            "description": "Human messages on success (array) or errors (object)",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "success"
        ]
      },
      "response-list_disputes": {
        "type": "object",
        "description": "Response Schema for /api/v2/disputes/list_disputes",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/dispute-def"
            }
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-list_effective_dates": {
        "type": "object",
        "description": "Response schema for /api/v2/lines/list_effective_dates",
        "properties": {
          "data": {
            "type": "array",
            "description": "Array of existing effective dates",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "ID of the Effective Date"
                },
                "effective_date": {
                  "type": "string",
                  "format": "date",
                  "description": "Effective date"
                },
                "renewal_effective_date": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Renewal effective date calculated from associated policy types"
                },
                "description": {
                  "type": "string",
                  "description": "Description of the effective date"
                },
                "creation_date": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Date and time when this effective date was created"
                },
                "change_history": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "description": "Change history of the effective date",
                  "items": {
                    "type": "object",
                    "properties": {
                      "to": {
                        "type": "string",
                        "format": "date",
                        "description": "To date"
                      },
                      "changed": {
                        "type": "string",
                        "format": "date-time",
                        "description": "Date and time when the change occurred"
                      },
                      "from": {
                        "type": "string",
                        "format": "date",
                        "description": "From date"
                      }
                    },
                    "required": [
                      "to",
                      "changed",
                      "from"
                    ]
                  }
                },
                "override_lock": {
                  "type": "boolean",
                  "description": "Indicates if the override lock is enabled"
                }
              },
              "required": [
                "id",
                "effective_date",
                "description",
                "creation_date",
                "override_lock",
                "renewal_effective_date"
              ]
            }
          }
        },
        "success": {
          "type": "boolean",
          "description": "Indicates if the request was successful"
        },
        "messages": {
          "oneOf": [
            {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Any messages or errors related to the request"
            },
            {
              "type": "object",
              "properties": {
                "_base_": {
                  "type": "array",
                  "description": "Base error message(s)",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "additionalProperties": {
                "oneOf": [
                  {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  {
                    "type": "string"
                  }
                ]
              },
              "description": "Any messages or errors related to the request"
            }
          ]
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-list_forms_for_policy_type": {
        "description": "Response payload for /api/v2/lines/list_forms_for_policy_type.",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "array",
            "description": "One entry per active form attached to the Policy Type. Mirrors legacy retrieveDocuments (lib/lines/views.py:1930), which surfaces both the doc row's own id (form_id here) and the File's id (file_id).",
            "items": {
              "type": "object",
              "properties": {
                "form_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "The x_policy_types_docs row's own id - pass this as form_id to update_form_on_policy_type/remove_form_from_policy_type."
                },
                "file_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "The File row's id."
                },
                "title": {
                  "type": "string",
                  "description": "The File's title (file name)."
                },
                "mime_type": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The File's MIME type."
                },
                "size": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "description": "The File's size in bytes."
                },
                "label": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The File's label."
                },
                "date_added": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time",
                  "description": "When the File was added."
                },
                "form_code": {
                  "type": "string"
                },
                "edition_number": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "suppress_printing": {
                  "type": "boolean"
                },
                "always_print_on_renewal": {
                  "type": "boolean"
                },
                "always_print_on_endorsement": {
                  "type": "boolean"
                },
                "mortgagee_types": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "required": [
                "form_id",
                "file_id",
                "title"
              ]
            }
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-list_forms_for_policy_type_item": {
        "description": "Response payload for /api/v2/lines/list_forms_for_policy_type_item.",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "array",
            "description": "One entry per active form attached to the Policy Type Item. Mirrors legacy retrieveDocuments (lib/lines/views.py:1930), which surfaces both the doc row's own id (form_id here) and the File's id (file_id).",
            "items": {
              "type": "object",
              "properties": {
                "form_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "The x_policy_type_items_docs row's own id - pass this as form_id to update_form_on_policy_type_item/remove_form_from_policy_type_item."
                },
                "file_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "The File row's id."
                },
                "title": {
                  "type": "string",
                  "description": "The File's title (file name)."
                },
                "mime_type": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The File's MIME type."
                },
                "size": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "description": "The File's size in bytes."
                },
                "label": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The File's label."
                },
                "date_added": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time",
                  "description": "When the File was added."
                },
                "form_code": {
                  "type": "string"
                },
                "edition_number": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "suppress_printing": {
                  "type": "boolean"
                },
                "always_print_on_renewal": {
                  "type": "boolean"
                },
                "always_print_on_endorsement": {
                  "type": "boolean"
                },
                "mortgagee_types": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "conditional_print": {
                  "type": "boolean"
                },
                "conditional_values": {
                  "type": "object"
                },
                "notice_to_policy_holder": {
                  "type": "boolean"
                },
                "ntp_start_date": {
                  "type": "string",
                  "format": "date"
                },
                "ntp_end_date": {
                  "type": "string",
                  "format": "date"
                },
                "conditional_premium_print": {
                  "type": "boolean"
                },
                "conditional_premium_select": {
                  "type": "string",
                  "enum": [
                    "gt",
                    "gte",
                    "eq",
                    "neq",
                    "lte",
                    "lt"
                  ]
                }
              },
              "required": [
                "form_id",
                "file_id",
                "title"
              ]
            }
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-list_grantee_options": {
        "title": "ListGranteeOptionsResponse",
        "type": "object",
        "description": "Response schema for POST /api/v2/reports/list_grantee_options. On success, data is a bare array (not an object wrapper).",
        "properties": {
          "data": {
            "type": "array",
            "description": "List of {id, name} options for the picker when success is true.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Grantee id suitable for grant_report_permission."
                },
                "name": {
                  "type": "string",
                  "description": "Display name (falls back to id when name is empty)."
                }
              },
              "required": [
                "id",
                "name"
              ]
            }
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-list_insights": {
        "type": "object",
        "description": "Response payload for /api/v2/insights/list_insights. By default, dismissed insights and insights still inside an active snooze window are omitted from both insights and counts unless the request sets include_hidden to true.",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "additionalProperties": true
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "insights": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/insight-def"
                }
              },
              "counts": {
                "type": "object",
                "properties": {
                  "total": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "Total insights visible to the caller for this claim or policy after applying the include_hidden filter."
                  },
                  "by_type": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "description": "Counts keyed by insight_type for permitted types"
                  }
                },
                "required": [
                  "total",
                  "by_type"
                ]
              },
              "evaluation_status": {
                "type": "object",
                "description": "Latest insights evaluation job status for this reference. Omitted when no local agent_jobs row exists.",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "RUNNING",
                      "SUCCEEDED",
                      "FAILED"
                    ],
                    "description": "Mapped evaluation progress for the UI. Non-terminal agent statuses (pending, running, paused) map to RUNNING."
                  },
                  "job_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Remote AIAgents job identifier mirrored in agent_jobs."
                  },
                  "updated_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "ISO-8601 timestamp of the local agent_jobs.dateUpdated value."
                  }
                },
                "required": [
                  "status",
                  "job_id"
                ]
              },
              "last_changed_at": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Newest curated claim/policy source timestamp used for freshness. Null when no content anchor exists (never evaluated) or no source timestamps exist."
              },
              "is_stale": {
                "type": "boolean",
                "description": "True when last_changed_at is strictly after the insights content anchor (successful RECONCILE_* job dateAdded, else MAX(lastEvaluatedAt)). False when no content anchor exists."
              }
            },
            "required": [
              "insights",
              "counts",
              "is_stale"
            ]
          }
        },
        "required": [
          "success",
          "messages",
          "data"
        ]
      },
      "response-list_interest_type_labels_by_code": {
        "description": "Response payload for /api/v2/additional_interests/list_interest_type_labels_by_code. `data` is a code -> label object for the ADDITIONAL_INTEREST_TYPES QuickCode. Includes inactive rows so a historical AI whose type has been deactivated still resolves back to its label. This is a display-only map: the picker keeps using list_interest_type_options for the active/scoped selectable set.",
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Success or informational messages"
          },
          "data": {
            "type": "object",
            "description": "code -> label map for ADDITIONAL_INTEREST_TYPES (active + inactive)",
            "additionalProperties": {
              "type": "string",
              "description": "Display label for the code key"
            }
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-list_interest_type_options": {
        "description": "Response payload for /api/v2/additional_interests/list_interest_type_options. Returns the effective Additional Interest type QuickCode values for the resolved revision - the same set create/update validation accepts. Only active values are returned, ordered by sort_order then code_value_type.",
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Success or informational messages"
          },
          "data": {
            "type": "array",
            "description": "Selectable interest type QuickCode values for the resolved revision",
            "items": {
              "type": "object",
              "properties": {
                "code_value_type": {
                  "type": "string",
                  "description": "The unique code value identifier"
                },
                "quick_code": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The quick code identifier (always AdditionalInterestTypes for this endpoint)"
                },
                "label": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Display label - the value stored on the additional interest and the one create validation compares against"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Description"
                },
                "active": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "description": "Whether the value is active"
                },
                "default": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "description": "Whether the value is preselected by default"
                },
                "is_system_default": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "description": "Whether this is a system-created value (false for user-created)"
                },
                "sort_order": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "description": "Sort order"
                },
                "added_by": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Username who created the value"
                },
                "date_added": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Date the value was created"
                },
                "updated_by": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Username who last updated the value"
                },
                "date_updated": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Date the value was last updated"
                }
              },
              "required": [
                "code_value_type",
                "label"
              ]
            }
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-list_policy_parties": {
        "type": "object",
        "description": "Response Schema for /api/v2/policies/list_policy_parties",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "parties": {
                "type": "array",
                "description": "One row per contact currently a party on the requested policies (anchored on each policy's latest committed revision), sorted by name then primary email.",
                "items": {
                  "type": "object",
                  "properties": {
                    "contact_id": {
                      "type": "string",
                      "description": "Contact id -- the stable identity a payment method is saved against"
                    },
                    "name": {
                      "type": "string",
                      "description": "Contact name"
                    },
                    "type": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Contact type: individual or organization"
                    },
                    "roles": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "named_insured",
                          "addtl_interest",
                          "mortgagee",
                          "agent",
                          "finance_company"
                        ]
                      },
                      "description": "Every role the contact holds on the requested policies, in canonical order. Multi-role contacts keep all roles (no first-match collapse). Intersected with the request's roles filter when one was sent."
                    },
                    "policy_ids": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Which of the requested policies this contact is a party on"
                    },
                    "emails": {
                      "type": "array",
                      "description": "The contact's emails, primary first",
                      "items": {
                        "type": "object",
                        "properties": {
                          "email": {
                            "type": "string"
                          },
                          "type": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Email type label, e.g. Work or Home"
                          }
                        }
                      }
                    }
                  }
                }
              },
              "can_update_contact_email": {
                "type": "boolean",
                "description": "Whether the calling user may write an email onto a contact -- the same permission rule contacts.views newContactEmail / storeContactEmail enforce. Advisory only: it exists so a picker can hide an add-email control it already knows will be refused; the contact endpoints keep their own gates. A fact about the caller, so it is response-level rather than per party."
              }
            }
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Any messages or errors related to the request"
          }
        }
      },
      "response-list_policy_type_definitions": {
        "type": "object",
        "description": "Response payload for /api/v2/policy_types/list_policy_type_definitions.",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request was successful"
          },
          "data": {
            "type": "array",
            "description": "All policy type definitions, ordered by name",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string",
                  "description": "The policy type definition code"
                },
                "name": {
                  "type": "string",
                  "description": "The policy type definition display name"
                },
                "line_definition_code": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The line definition code this policy type definition belongs to; null for a definition not attached to a line"
                }
              },
              "required": [
                "code",
                "name"
              ]
            }
          },
          "messages": {
            "type": [
              "array",
              "object"
            ],
            "description": "Human messages on success (array) or errors (object)",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "success"
        ]
      },
      "response-list_policy_types": {
        "type": "object",
        "description": "Response Schema for /api/v2/lines/list_policy_types",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "The ID of the policy type"
                },
                "name": {
                  "type": "string",
                  "description": "The name of the policy type"
                },
                "effective_date_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Effective Date ID"
                },
                "effective_date": {
                  "type": "string",
                  "format": "date",
                  "description": "Effective Date"
                },
                "renewal_effective_date": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Renewal effective date for this policy type"
                },
                "line_name": {
                  "type": "string",
                  "description": "Line Name"
                },
                "line_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Line ID"
                },
                "business_location_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Location ID"
                },
                "business_location_name": {
                  "type": "string",
                  "description": "Location Name"
                },
                "business_location_abbreviation": {
                  "type": "string",
                  "description": "Business Location Abbreviation"
                },
                "business_location_country_name": {
                  "type": "string",
                  "description": "Business Location Country Name"
                },
                "maximum_risk_count": {
                  "type": "integer",
                  "description": "Maximum Risk Count",
                  "default": 500
                },
                "external_system_reference": {
                  "type": "string",
                  "description": "External System Reference of the policy type"
                }
              }
            }
          }
        },
        "success": {
          "type": "boolean",
          "description": "Indicates if the request was successful"
        },
        "messages": {
          "oneOf": [
            {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Any messages or errors related to the request"
            },
            {
              "type": "object",
              "properties": {
                "_base_": {
                  "type": "array",
                  "description": "Base error message(s)",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "additionalProperties": {
                "oneOf": [
                  {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  {
                    "type": "string"
                  }
                ]
              },
              "description": "Any messages or errors related to the request"
            }
          ]
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-list_quick_code_values": {
        "type": "object",
        "description": "Response payload for /api/v2/quick_code_values/list_quick_code_values.",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request was successful"
          },
          "data": {
            "type": "array",
            "description": "The quick code values. In definition scope, only the values enabled for the definition are returned.",
            "items": {
              "type": "object",
              "properties": {
                "quick_code": {
                  "type": "string",
                  "description": "The quick code identifier"
                },
                "code_value_type": {
                  "type": "string",
                  "description": "The unique code value identifier"
                },
                "label": {
                  "type": "string",
                  "description": "Display label"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Description; null when the value carries none"
                },
                "active": {
                  "type": "boolean",
                  "description": "Whether active"
                },
                "default": {
                  "type": "boolean",
                  "description": "Whether default"
                },
                "is_system_default": {
                  "type": "boolean",
                  "description": "Whether this is a system-created value"
                },
                "sort_order": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "description": "Sort order; null when the value has never been ordered"
                },
                "added_by": {
                  "type": "string",
                  "description": "Username who created the value"
                },
                "date_added": {
                  "type": "string",
                  "description": "Date the value was created"
                },
                "updated_by": {
                  "type": "string",
                  "description": "Username who last updated the value"
                },
                "date_updated": {
                  "type": "string",
                  "description": "Date the value was last updated"
                }
              }
            }
          },
          "messages": {
            "type": [
              "array",
              "object"
            ],
            "description": "Human messages on success (array) or errors (object)",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "success"
        ]
      },
      "response-list_quick_quote_templates": {
        "type": "object",
        "description": "Response schema for /api/v2/quick_quote_templates/list_quick_quote_templates",
        "properties": {
          "data": {
            "type": "array",
            "description": "List of all Quick Quote Templates",
            "items": {
              "type": "object",
              "description": "Quick Quote Template",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Unique identifier for the Quick Quote Template"
                },
                "name": {
                  "type": "string",
                  "description": "The name of the Quick Quote Template"
                },
                "quote_template": {
                  "type": "object",
                  "description": "Quote-wide data containing coverage items",
                  "properties": {
                    "items": {
                      "type": "array",
                      "description": "List of coverage items",
                      "items": {
                        "type": "object",
                        "description": "Coverage item definition"
                      }
                    }
                  }
                },
                "template_risk_values": {
                  "type": "array",
                  "description": "List of template risk default values",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "quick_quote_template_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "risk_defaults": {
                        "type": "object"
                      },
                      "risk_type": {
                        "type": "string"
                      },
                      "version": {
                        "type": "integer"
                      }
                    }
                  }
                },
                "policy_types": {
                  "type": "array",
                  "description": "List of policy types associated with this template (extended information)",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "description": "Policy type ID"
                      },
                      "name": {
                        "type": "string",
                        "description": "Policy type name"
                      },
                      "effective_date": {
                        "type": "string",
                        "format": "date",
                        "description": "Effective date of the policy type"
                      },
                      "effective_date_id": {
                        "type": "string",
                        "format": "uuid",
                        "description": "Effective date ID"
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "effective_date",
                      "effective_date_id"
                    ]
                  }
                }
              },
              "required": [
                "id",
                "name",
                "quote_template",
                "template_risk_values",
                "policy_types"
              ]
            }
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "string",
                    "description": "Base error message"
                  }
                },
                "additionalProperties": {
                  "type": "string"
                },
                "description": "Any error messages related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-list_rating_tables": {
        "title": "ListRatingTableResponse",
        "type": "object",
        "description": "Response schema for /api/v2/lines/list_rating_tables",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "rating_tables": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Rating Table ID"
                    },
                    "date_added": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Date and time the rating table was created"
                    },
                    "added_by": {
                      "type": "string",
                      "format": "uuid",
                      "description": "User ID"
                    },
                    "added_by_contact": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "description": "User ID"
                        },
                        "name": {
                          "type": "string",
                          "description": "User name"
                        }
                      }
                    },
                    "effective_date": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Date the rating table becomes effective"
                    },
                    "expiration_date": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Date the rating table expires"
                    },
                    "file": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "description": "File ID"
                        },
                        "title": {
                          "type": "string",
                          "description": "File title"
                        }
                      }
                    },
                    "ingestion_job": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "description": "Ingestion Job ID"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "uploaded",
                            "pending",
                            "processing",
                            "success",
                            "warning",
                            "error"
                          ],
                          "description": "Status of the ingestion job"
                        }
                      }
                    },
                    "state": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "description": "State ID"
                        },
                        "name": {
                          "type": "string",
                          "description": "State name"
                        }
                      }
                    }
                  },
                  "required": [
                    "id",
                    "date_added",
                    "added_by",
                    "effective_date",
                    "expiration_date",
                    "file",
                    "ingestion_job",
                    "state"
                  ]
                }
              },
              "page": {
                "type": "integer",
                "description": "Current page number"
              },
              "page_size": {
                "type": "integer",
                "description": "Number of items per page"
              },
              "count_rows": {
                "type": "integer",
                "description": "Number of rows in the rating table table"
              }
            }
          }
        },
        "success": {
          "type": "boolean",
          "description": "Indicates if the request was successful"
        },
        "messages": {
          "oneOf": [
            {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Any messages or errors related to the request"
            },
            {
              "type": "object",
              "properties": {
                "_base_": {
                  "type": "array",
                  "description": "Base error message(s)",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "additionalProperties": {
                "oneOf": [
                  {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  {
                    "type": "string"
                  }
                ]
              },
              "description": "Any messages or errors related to the request"
            }
          ]
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-list_report_permissions": {
        "title": "ListReportPermissionsResponse",
        "type": "object",
        "description": "Response schema for POST /api/v2/reports/list_report_permissions",
        "properties": {
          "data": {
            "type": "object",
            "description": "Payload when success is true.",
            "properties": {
              "permissions": {
                "type": "array",
                "description": "All ACL rows for the report, with resolved display names.",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Row id."
                    },
                    "report_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "grantee_type": {
                      "type": "string",
                      "enum": [
                        "contact",
                        "user_group",
                        "role",
                        "permission_level"
                      ]
                    },
                    "grantee_id": {
                      "type": "string"
                    },
                    "grantee_name": {
                      "type": "string",
                      "description": "Resolved name or fallback to grantee_id."
                    },
                    "access": {
                      "type": "string",
                      "enum": [
                        "none",
                        "read",
                        "write"
                      ]
                    },
                    "added_by": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Contact id who last created/updated the row."
                    },
                    "added_by_name": {
                      "type": "string",
                      "description": "Display label for added_by."
                    },
                    "date_added": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "date_updated": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "report_id",
                    "grantee_type",
                    "grantee_id",
                    "grantee_name",
                    "access",
                    "added_by",
                    "added_by_name",
                    "date_added",
                    "date_updated"
                  ]
                }
              },
              "can_write": {
                "type": "boolean",
                "description": "True when the caller may manage ACL for this report (module rw + report write)."
              }
            },
            "required": [
              "permissions",
              "can_write"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-list_rules": {
        "type": "object",
        "description": "Response payload for /api/v2/rules/list_rules",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the API call succeeded"
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Error messages if success is false"
          },
          "data": {
            "type": "object",
            "description": "Response containing the list of rules",
            "properties": {
              "rules": {
                "type": "array",
                "description": "Array of underwriting rule objects sorted by sort_order",
                "items": {
                  "$ref": "#/components/schemas/underwriting_rule-def"
                }
              }
            },
            "required": [
              "rules"
            ]
          }
        },
        "required": [
          "success",
          "messages",
          "data"
        ]
      },
      "response-list_rules_stp_results": {
        "type": "object",
        "description": "Response payload for /api/v2/rules/list_rules_stp_results",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the API call succeeded"
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Error messages if success is false"
          },
          "data": {
            "type": "object",
            "description": "STP execution results with pagination",
            "properties": {
              "results": {
                "type": "array",
                "description": "Array of STP execution objects",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "UUID of the STP execution"
                    },
                    "revision_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "UUID of the associated revision"
                    },
                    "execution_start_time": {
                      "type": "string",
                      "format": "date-time",
                      "description": "ISO datetime when execution started"
                    },
                    "execution_end_time": {
                      "type": "string",
                      "format": "date-time",
                      "description": "ISO datetime when execution ended"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "success",
                        "error"
                      ],
                      "description": "Overall execution status"
                    },
                    "total_rules_executed": {
                      "type": "integer",
                      "description": "Total number of rules executed"
                    },
                    "total_rules_succeeded": {
                      "type": "integer",
                      "description": "Number of rules that succeeded"
                    },
                    "total_rules_failed": {
                      "type": "integer",
                      "description": "Number of rules that failed"
                    },
                    "results": {
                      "type": "array",
                      "description": "Array of individual rule execution results",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "description": "UUID of the rule result"
                          },
                          "rule_name": {
                            "type": "string",
                            "description": "Name of the executed rule"
                          },
                          "rule_severity": {
                            "description": "Severity level of the rule",
                            "oneOf": [
                              {
                                "type": "null"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "critical",
                                  "high",
                                  "medium",
                                  "low"
                                ]
                              }
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "success",
                              "error"
                            ],
                            "description": "Rule execution status"
                          },
                          "error_description": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Error details if rule failed"
                          },
                          "custom_error_code_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid",
                            "description": "Associated custom error code ID"
                          },
                          "custom_error_code": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "description": "Custom error code details if available",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "module": {
                                "type": "string"
                              },
                              "code": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              }
                            }
                          },
                          "property_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid",
                            "description": "Property ID if rule is property-specific"
                          },
                          "driver_contact_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid",
                            "description": "Driver contact ID if rule is driver-specific"
                          }
                        }
                      }
                    }
                  }
                }
              },
              "pagination": {
                "type": "object",
                "description": "Pagination metadata",
                "properties": {
                  "page": {
                    "type": "integer",
                    "description": "Current page number"
                  },
                  "page_size": {
                    "type": "integer",
                    "description": "Number of items per page"
                  },
                  "total_count": {
                    "type": "integer",
                    "description": "Total number of executions"
                  },
                  "total_pages": {
                    "type": "integer",
                    "description": "Total number of pages"
                  }
                }
              }
            }
          }
        }
      },
      "response-list_scopes": {
        "type": "object",
        "description": "Response for /api/v2/convenience_fees/list_scopes. The configurable scopes (Global is implicit; this lists the per-state business locations) with a has_custom flag, plus the payment-processor integration status and the caller's admin flag. The scopes list is redacted (empty) for non-admin callers.",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Field-keyed error messages"
              }
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Whether the operation was successful"
          },
          "data": {
            "type": "object",
            "properties": {
              "scopes": {
                "type": "array",
                "description": "Per-state business locations available to scope convenience fees. Empty for non-admin callers.",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Business-location UUID (the per-state scope key)."
                    },
                    "abbreviation": {
                      "type": "string",
                      "description": "Two-letter state abbreviation."
                    },
                    "name": {
                      "type": "string",
                      "description": "State name."
                    },
                    "has_custom": {
                      "type": "boolean",
                      "description": "Whether this state has its own convenience-fee override (a live row in either table)."
                    }
                  },
                  "required": [
                    "id",
                    "abbreviation",
                    "name",
                    "has_custom"
                  ]
                }
              },
              "is_payment_processor_integration_enabled": {
                "type": "boolean",
                "description": "Whether a payment processor integration is currently connected. Drives the disabled-state explainer in the UI."
              },
              "is_admin": {
                "type": "boolean",
                "description": "Whether the requesting user may view/edit convenience-fee settings."
              },
              "is_editable": {
                "type": "boolean",
                "description": "Whether this caller may edit the fee and disclosure configuration. Caller-relative, not tenant state: a BriteCore employee editing a locked configuration gets true. False disables every input and the action bar. OMITTED for non-admin callers, who have no editable page and must not learn the tenant's lock state. Consumers must default a missing value to true -- both a non-admin response and an older backend omit the key, and treating that as not-editable would lock a carrier out of settings it is entitled to change."
              },
              "edit_notice": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "What to tell this caller about editing the configuration, or null when there is nothing to say. Not derived from is_editable -- the two vary independently: a caller who may not edit is told why, and a caller who may edit anyway is warned that changes must follow the customer's contract. OMITTED for non-admin callers: the notice names the contract arrangement behind the lock. Copy is server-owned so wording changes need no frontend release."
              }
            },
            "required": [
              "scopes",
              "is_payment_processor_integration_enabled",
              "is_admin"
            ]
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-list_stp_results": {
        "type": "object",
        "description": "Response payload for /api/v2/rules/list_rules_stp_results",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ],
            "description": "Any messages or errors related to the request"
          },
          "data": {
            "type": "object",
            "properties": {
              "results": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "STP execution unique identifier"
                    },
                    "revision_id": {
                      "type": "string",
                      "description": "Revision ID this execution belongs to"
                    },
                    "execution_start_time": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the STP execution started"
                    },
                    "execution_end_time": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the STP execution ended"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "success",
                        "error"
                      ],
                      "description": "Overall status of the execution"
                    },
                    "total_rules_executed": {
                      "type": "integer",
                      "description": "Total number of rules executed"
                    },
                    "total_rules_succeeded": {
                      "type": "integer",
                      "description": "Number of rules that succeeded"
                    },
                    "total_rules_failed": {
                      "type": "integer",
                      "description": "Number of rules that failed"
                    },
                    "date_added": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the execution record was created"
                    },
                    "date_updated": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the execution record was last updated"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "STP result unique identifier"
                          },
                          "stp_execution_id": {
                            "type": "string",
                            "description": "ID of the STP execution this result belongs to"
                          },
                          "rule_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Rule ID that was executed"
                          },
                          "rule_name": {
                            "type": "string",
                            "description": "Name of the rule that was executed"
                          },
                          "rule_severity": {
                            "description": "Severity level of the rule ('critical', 'high', 'medium', 'low') or null if not set",
                            "oneOf": [
                              {
                                "type": "null"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "critical",
                                  "high",
                                  "medium",
                                  "low"
                                ]
                              }
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "success",
                              "error"
                            ],
                            "description": "Status of this individual rule execution"
                          },
                          "error_description": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Error description if rule execution failed"
                          },
                          "custom_error_code_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Custom error code ID if applicable"
                          },
                          "custom_error_code": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "description": "Custom error code details if available",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "UUID of the custom error code"
                              },
                              "module": {
                                "type": "string",
                                "description": "Error code module (e.g., 'stp')"
                              },
                              "code": {
                                "type": "string",
                                "description": "Error code string"
                              },
                              "description": {
                                "type": "string",
                                "description": "Error description"
                              }
                            }
                          },
                          "property_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Property ID if rule is property-specific"
                          },
                          "driver_contact_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Driver contact ID if rule is driver-specific"
                          },
                          "date_added": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the result record was created"
                          },
                          "date_updated": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the result record was last updated"
                          }
                        },
                        "required": [
                          "stp_execution_id",
                          "rule_name",
                          "status"
                        ]
                      },
                      "description": "List of individual STP rule execution results"
                    }
                  },
                  "required": [
                    "revision_id",
                    "execution_start_time",
                    "execution_end_time",
                    "status",
                    "total_rules_executed",
                    "total_rules_succeeded",
                    "total_rules_failed",
                    "results"
                  ]
                },
                "description": "List of STP executions with their results"
              },
              "pagination": {
                "type": "object",
                "properties": {
                  "page": {
                    "type": "integer",
                    "description": "Current page number"
                  },
                  "page_size": {
                    "type": "integer",
                    "description": "Number of items per page"
                  },
                  "total_pages": {
                    "type": "integer",
                    "description": "Total number of pages"
                  },
                  "total_count": {
                    "type": "integer",
                    "description": "Total number of STP executions matching the filters"
                  }
                },
                "required": [
                  "page",
                  "page_size",
                  "total_pages",
                  "total_count"
                ]
              }
            },
            "required": [
              "results",
              "pagination"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Whether the request was successful"
          }
        },
        "required": [
          "success",
          "data",
          "messages"
        ]
      },
      "response-list_subjectivities": {
        "type": "object",
        "description": "Response schema for /api/v2/subjectivities/list_subjectivities",
        "properties": {
          "data": {
            "type": "array",
            "description": "Array of existing subjectivities",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "ID of the subjectivity"
                },
                "revision_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "ID of the revision"
                },
                "subjectivity_definition_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "ID of the subjectivity definition"
                },
                "subjectivity_definition": {
                  "type": "object",
                  "description": "The subjectivity definition associated with this subjectivity",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "ID of the subjectivity definition"
                    },
                    "name": {
                      "type": "string",
                      "description": "Name of the subjectivity definition"
                    },
                    "description": {
                      "type": "string",
                      "description": "Description of the subjectivity definition"
                    },
                    "policy_type_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid",
                      "description": "ID of the policy type"
                    },
                    "policy_type_name": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Name of the policy type"
                    },
                    "mandatory": {
                      "type": "boolean",
                      "description": "Whether the subjectivity is mandatory"
                    },
                    "active": {
                      "type": "boolean",
                      "description": "Whether the subjectivity definition is active"
                    },
                    "due_within_days": {
                      "type": "integer",
                      "description": "Number of days within which the subjectivity is due"
                    },
                    "due_date_type": {
                      "type": "string",
                      "description": "Type of due date calculation"
                    },
                    "statement": {
                      "type": "string",
                      "description": "Statement for the subjectivity definition"
                    },
                    "expiration_action": {
                      "type": "string",
                      "description": "Action to take when the subjectivity expires"
                    },
                    "created_by": {
                      "type": "string",
                      "format": "uuid",
                      "description": "ID of the user who created this definition"
                    },
                    "updated_by": {
                      "type": "string",
                      "format": "uuid",
                      "description": "ID of the user who last updated this definition"
                    },
                    "date_created": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Date and time when this definition was created"
                    },
                    "date_updated": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Date and time when this definition was last updated"
                    }
                  }
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "Satisfied",
                    "Not Satisfied",
                    "Waived",
                    "Expired",
                    "Canceled"
                  ],
                  "description": "Status of the subjectivity"
                },
                "due_date": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Due date for this subjectivity to be met before"
                },
                "assignee": {
                  "type": "string",
                  "format": "uuid",
                  "description": "ID of the assignee"
                },
                "created_by": {
                  "type": "string",
                  "format": "uuid",
                  "description": "ID of the user who created this subjectivity"
                },
                "updated_by": {
                  "type": "string",
                  "format": "uuid",
                  "description": "ID of the user who last updated this subjectivity"
                },
                "date_created": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Date and time when this subjectivity was created"
                },
                "date_updated": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Date and time when this subjectivity was last updated"
                },
                "statement": {
                  "type": "string",
                  "description": "Statement for the subjectivity"
                },
                "description": {
                  "type": "string",
                  "description": "Description of the subjectivity"
                }
              },
              "required": [
                "id",
                "revision_id",
                "subjectivity_definition_id",
                "status",
                "due_date",
                "assignee",
                "created_by",
                "date_created"
              ]
            }
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-list_subjectivity_definitions": {
        "type": "object",
        "description": "Response schema for /api/v2/subjectivities/list_subjectivity_definitions",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Subjectivity definition ID"
                },
                "name": {
                  "type": "string",
                  "description": "Name of the subjectivity definition"
                },
                "description": {
                  "type": "string",
                  "description": "Description of the subjectivity definition"
                },
                "policy_type_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "ID of the associated policy type"
                },
                "mandatory": {
                  "type": "boolean",
                  "description": "true for mandatory and false for non-mandatory"
                },
                "active": {
                  "type": "boolean",
                  "description": "true for active and false for inactive"
                },
                "due_within_days": {
                  "type": "integer",
                  "description": "Days the subjectivity definition is due within"
                },
                "due_date_type": {
                  "type": "string",
                  "enum": [
                    "Pre Bind",
                    "Post Bind",
                    "Post Issue"
                  ],
                  "description": "Type of due date (e.g., 'Post Bind' or 'Post Issue')"
                },
                "created_by": {
                  "type": "string",
                  "format": "uuid",
                  "description": "ID of the user who created the subjectivity definition"
                },
                "updated_by": {
                  "type": "string",
                  "format": "uuid",
                  "description": "ID of the user who last updated the subjectivity definition"
                },
                "date_created": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Date and time when the subjectivity definition was created"
                },
                "date_updated": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Date and time when the subjectivity definition was last updated"
                }
              },
              "required": [
                "id",
                "name",
                "description",
                "policy_type_id",
                "mandatory",
                "active",
                "due_within_days",
                "due_date_type",
                "created_by",
                "dateCreated"
              ]
            }
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-list_system_tags": {
        "type": "object",
        "description": "Response Schema for /api/v2/settings/list_system_tags",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "Name of the System Tag"
                },
                "required": {
                  "type": "boolean",
                  "default": false,
                  "description": "Whether the System Tag is required"
                },
                "show_on_declaration": {
                  "type": "boolean",
                  "default": false,
                  "description": "Whether the System Tag is shown on the Declaration"
                },
                "tag_type": {
                  "type": "string",
                  "enum": [
                    "VENDOR",
                    "REPORT",
                    "INTERNAL",
                    "CUSTOM"
                  ],
                  "default": "CUSTOM"
                },
                "tag_for": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "LINE",
                      "POLICY_TYPE",
                      "POLICY_TYPE_ITEM",
                      "SUB_LINE",
                      "CATEGORY",
                      "QUESTION",
                      "QUESTION_OPTION",
                      "CLAIM",
                      "CONTACT",
                      "POLICY"
                    ]
                  }
                },
                "style": {
                  "type": "string",
                  "enum": [
                    "TEXT",
                    "CHECKBOX",
                    "SELECT"
                  ],
                  "default": "TEXT"
                }
              }
            }
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-list_watercrafts_for_quote": {
        "type": "object",
        "description": "Response Schema for /api/v2/watercrafts/list_watercrafts_for_quote",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/watercraft-def"
            }
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-make_multi_exposure_payment": {
        "type": "object",
        "description": "Response Schema for /api/v2/claim_exposures/make_multi_exposures_payment",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/claim_multi_exposure_payment-def"
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-make_note": {
        "description": "Response schema for /api/v2/integrations/make_note",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Indicates whether the note creation was successful."
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "success",
          "messages"
        ]
      },
      "response-make_payment_by_contact_and_payment_method": {
        "description": "Response schema for /api/v2/payments/make_payment_by_contact_and_payment_method",
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "success": {
                "type": "boolean"
              },
              "attachmentId": {
                "type": "string",
                "format": "uuid"
              },
              "policyId": {
                "type": "string",
                "format": "uuid"
              },
              "paymentId": {
                "type": "string",
                "format": "uuid"
              },
              "message": {
                "type": "string"
              },
              "paymentMethod": {
                "type": "object",
                "properties": {
                  "vendorId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "accountDescription": {
                    "type": "string"
                  },
                  "accountHash": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "companyOnAccount": {
                    "type": "string"
                  },
                  "contactId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "addressLine2": {
                    "type": "string"
                  },
                  "primaryAccount": {
                    "type": "boolean"
                  },
                  "addressLine1": {
                    "type": "string"
                  },
                  "customerProfileId": {
                    "type": "string"
                  },
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "addressCountry": {
                    "type": "string"
                  },
                  "maskedRouting": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "updatedOn": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "accountName": {
                    "type": "string"
                  },
                  "maskedNumber": {
                    "type": "string"
                  },
                  "nameOnAccount": {
                    "type": "string"
                  },
                  "dateUpdated": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "method": {
                    "type": "string"
                  },
                  "vendor": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "sameAddress": {
                    "type": "boolean"
                  },
                  "accountType": {
                    "type": "string"
                  },
                  "active": {
                    "type": "boolean"
                  },
                  "addressCity": {
                    "type": "string"
                  },
                  "expireDate": {
                    "type": "string",
                    "format": "date"
                  },
                  "addressState": {
                    "type": "string"
                  },
                  "vendorLog": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "vendorPaymentMethodId": {
                    "type": "string"
                  },
                  "addressZip": {
                    "type": "string"
                  }
                },
                "required": [
                  "vendorId",
                  "accountDescription",
                  "companyOnAccount",
                  "contactId",
                  "addressLine2",
                  "primaryAccount",
                  "addressLine1",
                  "customerProfileId",
                  "id",
                  "addressCountry",
                  "accountName",
                  "maskedNumber",
                  "nameOnAccount",
                  "dateUpdated",
                  "method",
                  "sameAddress",
                  "accountType",
                  "active",
                  "addressCity",
                  "expireDate",
                  "addressState",
                  "vendorPaymentMethodId",
                  "addressZip"
                ]
              },
              "confirmationNumber": {
                "type": "string"
              }
            },
            "required": [
              "success",
              "attachmentId",
              "policyId",
              "paymentId",
              "message",
              "paymentMethod",
              "confirmationNumber"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "error_code": {
            "type": "string",
            "description": "Stable, machine-readable reason the request failed. Present only on failure, and only for failures that have one. 'payments_not_allowed' means the policy's status or its policy type's life cycle forbids an electronic payment (BC-24420) -- a refusal by configuration, not an outage, so retrying will not help. 'invalid_parameter' means a parameter was sent with the wrong type -- notably bypass_cannotpay_guard, which must be a real boolean and is rejected rather than coerced, so a stringy \"false\" cannot be read as an enabled bypass."
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-mark_failed": {
        "description": "Response schema for /api/v2/disbursements/mark_failed. Always HTTP 200; data is the serialized LifecycleTransitionResult.",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "False for a forbidden/malformed request; true when BC processed the call."
          },
          "messages": {
            "description": "Error/warning messages when success is false.",
            "type": [
              "array",
              "object"
            ],
            "items": {
              "type": "string"
            }
          },
          "data": {
            "description": "The serialized LifecycleTransitionResult object when success is true; an empty array (standard_response default) when success is false.",
            "oneOf": [
              {
                "type": "object",
                "description": "The lifecycle transition outcome (success is true).",
                "properties": {
                  "accepted": {
                    "type": "boolean",
                    "description": "True iff BC applied the transition (current != previous)."
                  },
                  "rejection_reason": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Structured reason when accepted is false (e.g. unknown_attempt, instance_mismatch, incompatible_current_state, already_at_target_state, attempt_currently_leased, invalid_field_value)."
                  },
                  "error": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Optional human-readable rejection detail."
                  },
                  "current_disbursement_state": {
                    "type": "string",
                    "enum": [
                      "pending",
                      "in_transit",
                      "settled",
                      "failed"
                    ],
                    "description": "disbursementState after the call."
                  },
                  "previous_disbursement_state": {
                    "type": "string",
                    "enum": [
                      "pending",
                      "in_transit",
                      "settled",
                      "failed"
                    ],
                    "description": "disbursementState before the call (equals current when accepted is false)."
                  }
                }
              },
              {
                "type": "array",
                "description": "Empty array returned on a forbidden/malformed request (success is false).",
                "items": {},
                "maxItems": 0
              }
            ]
          }
        },
        "required": [
          "success"
        ]
      },
      "response-mark_in_transit": {
        "description": "Response schema for /api/v2/disbursements/mark_in_transit. Always HTTP 200; data is the serialized LifecycleTransitionResult.",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "False for a forbidden/malformed request; true when BC processed the call."
          },
          "messages": {
            "description": "Error/warning messages when success is false.",
            "type": [
              "array",
              "object"
            ],
            "items": {
              "type": "string"
            }
          },
          "data": {
            "description": "The serialized LifecycleTransitionResult object when success is true; an empty array (standard_response default) when success is false.",
            "oneOf": [
              {
                "type": "object",
                "description": "The lifecycle transition outcome (success is true).",
                "properties": {
                  "accepted": {
                    "type": "boolean",
                    "description": "True iff BC applied the transition (current != previous)."
                  },
                  "rejection_reason": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Structured reason when accepted is false (e.g. unknown_attempt, instance_mismatch, incompatible_current_state, already_at_target_state, missing_vendor_reference, attempt_currently_leased, invalid_field_value)."
                  },
                  "error": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Optional human-readable rejection detail."
                  },
                  "current_disbursement_state": {
                    "type": "string",
                    "enum": [
                      "pending",
                      "in_transit",
                      "settled",
                      "failed"
                    ],
                    "description": "disbursementState after the call."
                  },
                  "previous_disbursement_state": {
                    "type": "string",
                    "enum": [
                      "pending",
                      "in_transit",
                      "settled",
                      "failed"
                    ],
                    "description": "disbursementState before the call (equals current when accepted is false)."
                  }
                }
              },
              {
                "type": "array",
                "description": "Empty array returned on a forbidden/malformed request (success is false).",
                "items": {},
                "maxItems": 0
              }
            ]
          }
        },
        "required": [
          "success"
        ]
      },
      "response-mark_settled": {
        "description": "Response schema for /api/v2/disbursements/mark_settled. Always HTTP 200; data is the serialized LifecycleTransitionResult.",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "False for a forbidden/malformed request; true when BC processed the call."
          },
          "messages": {
            "description": "Error/warning messages when success is false.",
            "type": [
              "array",
              "object"
            ],
            "items": {
              "type": "string"
            }
          },
          "data": {
            "description": "The serialized LifecycleTransitionResult object when success is true; an empty array (standard_response default) when success is false.",
            "oneOf": [
              {
                "type": "object",
                "description": "The lifecycle transition outcome (success is true).",
                "properties": {
                  "accepted": {
                    "type": "boolean",
                    "description": "True iff BC applied the transition (current != previous)."
                  },
                  "rejection_reason": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Structured reason when accepted is false (e.g. unknown_attempt, instance_mismatch, incompatible_current_state, already_at_target_state, attempt_currently_leased, invalid_field_value)."
                  },
                  "error": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Optional human-readable rejection detail."
                  },
                  "current_disbursement_state": {
                    "type": "string",
                    "enum": [
                      "pending",
                      "in_transit",
                      "settled",
                      "failed"
                    ],
                    "description": "disbursementState after the call."
                  },
                  "previous_disbursement_state": {
                    "type": "string",
                    "enum": [
                      "pending",
                      "in_transit",
                      "settled",
                      "failed"
                    ],
                    "description": "disbursementState before the call (equals current when accepted is false)."
                  }
                }
              },
              {
                "type": "array",
                "description": "Empty array returned on a forbidden/malformed request (success is false).",
                "items": {},
                "maxItems": 0
              }
            ]
          }
        },
        "required": [
          "success"
        ]
      },
      "response-medical_codes_search": {
        "type": "object",
        "description": "Response Schema for /api/v2/medical_codes/search",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "results": {
                "type": "array",
                "description": "Matching active codes, code-prefix matches first, capped at count",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "description": "The diagnosis code (e.g. 'S52.501')"
                    },
                    "description": {
                      "type": "string",
                      "description": "Human-readable description of the code"
                    },
                    "code_system": {
                      "type": "string",
                      "description": "Code system the row belongs to (e.g. 'ICD10')"
                    },
                    "source_version": {
                      "type": "string",
                      "description": "Release version stamped on the row"
                    }
                  },
                  "required": [
                    "code",
                    "description",
                    "code_system",
                    "source_version"
                  ]
                }
              }
            },
            "required": [
              "results"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-modify_contact": {
        "description": "Request payload for /api/v2/contacts/modify_contact.",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "username": {
                "type": "string"
              },
              "ssn_group": {
                "type": "string"
              },
              "dba": {
                "type": "string"
              },
              "phones": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/phone-def"
                }
              },
              "date_business_started": {
                "type": "string",
                "format": "date"
              },
              "company_id": {
                "type": "string",
                "format": "uuid"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "addresses": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/address-def"
                }
              },
              "driver_license_date": {
                "type": "string",
                "format": "date"
              },
              "primary_phone_id": {
                "type": "string",
                "format": "uuid"
              },
              "agency_inception_date": {
                "type": "string",
                "format": "date"
              },
              "fein_tax_id": {
                "type": "string"
              },
              "primary_email_id": {
                "type": "string",
                "format": "uuid"
              },
              "date_of_birth": {
                "type": "string",
                "pattern": "^xx-xx-[0-9]{4}$"
              },
              "purchase_date": {
                "type": "string",
                "format": "date"
              },
              "type": {
                "type": "string",
                "enum": [
                  "individual",
                  "organization"
                ]
              },
              "added_by": {
                "type": "string"
              },
              "website": {
                "type": "string"
              },
              "hicn_number": {
                "type": "string"
              },
              "date_of_death": {
                "type": "string",
                "format": "date"
              },
              "ssn": {
                "type": "string"
              },
              "drivers_license": {
                "type": "string"
              },
              "agency_termination_date": {
                "type": "string",
                "format": "date"
              },
              "external_system_reference": {
                "type": "string"
              },
              "last_synched_date": {
                "type": "string",
                "format": "date-time"
              },
              "source_update_date": {
                "type": "string",
                "format": "date-time"
              },
              "emails": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/email-def"
                }
              },
              "confirmation_email": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "gender": {
                "type": "string",
                "enum": [
                  "Male",
                  "Female",
                  "Other",
                  "Undisclosed"
                ]
              },
              "license_state": {
                "type": "string",
                "pattern": "^[A-Z]{2}$"
              },
              "legal_entity_type": {
                "type": "string"
              },
              "position": {
                "type": "string"
              },
              "primary_address_id": {
                "type": "string",
                "format": "uuid"
              },
              "agency_group_number": {
                "type": "string"
              },
              "agency_number": {
                "type": "string"
              },
              "agents": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/agent-def"
                }
              },
              "agencies": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/agency-def"
                }
              },
              "roles": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "name"
                  ]
                }
              }
            },
            "required": [
              "id"
            ]
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-modify_effective_date": {
        "type": "object",
        "description": "Response schema for /api/v2/lines/modify_effective_date",
        "properties": {
          "data": {
            "type": "object",
            "description": "Data related to the created effective date",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "ID of the created effective date"
              },
              "description": {
                "type": "string",
                "description": "The description of the effective date"
              },
              "effective_date": {
                "type": "string",
                "format": "date",
                "description": "The effective date"
              },
              "renewal_effective_date": {
                "type": "string",
                "format": "date-time",
                "description": "Renewal effective date calculated from associated policy types"
              },
              "creation_date": {
                "type": "string",
                "format": "date-time",
                "description": "The date the effective date was created"
              },
              "change_history": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "to": {
                      "type": "string",
                      "format": "date",
                      "description": "The new effective date"
                    },
                    "changed": {
                      "type": "string",
                      "format": "date-time",
                      "description": "The timestamp when the change was made"
                    },
                    "from": {
                      "type": "string",
                      "format": "date",
                      "description": "The previous effective date"
                    }
                  },
                  "required": [
                    "to",
                    "changed",
                    "from"
                  ]
                },
                "description": "List of changes made to the effective date"
              },
              "override_lock": {
                "type": "boolean",
                "description": "Indicates if the effective date is locked"
              }
            },
            "required": [
              "id",
              "description",
              "effective_date",
              "creation_date",
              "change_history",
              "override_lock",
              "renewal_effective_date"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-modify_full_quote": {
        "type": "object",
        "description": "Response Schema for modify_full_quote",
        "properties": {
          "data": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/full_quote-def"
              }
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-modify_policy_type": {
        "type": "object",
        "description": "Response Schema for /api/v2/lines/modify_policy_type",
        "properties": {
          "data": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/policy_type_def-def"
              }
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-modify_policy_type_item": {
        "type": "object",
        "description": "Response Schema for /api/v2/lines/modify_policy_type_item",
        "properties": {
          "data": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/policy_type_item-def"
              }
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-modify_sub_line": {
        "type": "object",
        "description": "Response Schema for /api/v2/lines/modify_sub_line",
        "properties": {
          "data": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/sub_line_def-def"
              }
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-modify_subjectivity": {
        "type": "object",
        "description": "Response schema for /api/v2/subjectivities/modify_subjectivity",
        "properties": {
          "data": {
            "type": "object",
            "description": "Data related to the updated subjectivity",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "ID of the updated subjectivity"
              },
              "revision_id": {
                "type": "string",
                "format": "uuid",
                "description": "ID of the revision the subjectivity is associated with"
              },
              "subjectivity_definition_id": {
                "type": "string",
                "format": "uuid",
                "description": "ID of the subjectivity definition"
              },
              "status": {
                "type": "string",
                "enum": [
                  "Satisfied",
                  "Not Satisfied",
                  "Waived",
                  "Expired",
                  "Canceled"
                ],
                "description": "Status of the subjectivity"
              },
              "due_date": {
                "type": "string",
                "format": "date-time",
                "description": "Due date for the subjectivity"
              },
              "assignee": {
                "type": "string",
                "format": "uuid",
                "description": "ID of the user assigned to the subjectivity"
              },
              "created_by": {
                "type": "string",
                "format": "uuid",
                "description": "ID of the user who created the subjectivity"
              },
              "updated_by": {
                "type": "string",
                "format": "uuid",
                "description": "ID of the user who updated the subjectivity"
              },
              "date_created": {
                "type": "string",
                "format": "date-time",
                "description": "Date and time the subjectivity was created"
              },
              "date_updated": {
                "type": "string",
                "format": "date-time",
                "description": "Date and time the subjectivity was updated"
              },
              "description": {
                "type": "string",
                "description": "Description of the subjectivity"
              },
              "statement": {
                "type": "string",
                "description": "Statement for the subjectivity."
              }
            },
            "required": [
              "id",
              "revision_id",
              "subjectivity_definition_id",
              "status",
              "due_date",
              "assignee",
              "created_by",
              "updated_by",
              "date_created",
              "date_updated",
              "description",
              "statement"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-modify_subjectivity_definition": {
        "type": "object",
        "description": "Response schema for /api/v2/subjectivities/modify_subjectivity_definition",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "Modified Subjectivity definition ID"
              },
              "name": {
                "type": "string",
                "description": "Modified Subjectivity definition Name"
              },
              "description": {
                "type": "string",
                "description": "Modified Subjectivity definition Description"
              },
              "policy_type_id": {
                "type": "string",
                "format": "uuid",
                "description": "Modified Policy Type ID"
              },
              "mandatory": {
                "type": "boolean",
                "description": "Indicates if the subjectivity definition is mandatory"
              },
              "active": {
                "type": "boolean",
                "description": "Indicates if the subjectivity definition is active"
              },
              "due_within_days": {
                "type": "integer",
                "description": "Modified Due Within Days"
              },
              "due_date_type": {
                "type": "string",
                "enum": [
                  "Pre Bind",
                  "Post Bind",
                  "Post Issue"
                ],
                "description": "Type of due date (e.g., Post Bind, Post Issue)"
              },
              "created_by": {
                "type": "string",
                "format": "uuid",
                "description": "User ID of the user who created the subjectivity definition"
              },
              "updated_by": {
                "type": "string",
                "format": "uuid",
                "description": "User ID of the user who Modified the subjectivity definition"
              },
              "date_created": {
                "type": "string",
                "format": "date-time",
                "description": "Date and time the subjectivity definition was created"
              },
              "date_updated": {
                "type": "string",
                "format": "date-time",
                "description": "Date and time the subjectivity definition was Modified"
              },
              "success": {
                "type": "boolean",
                "description": "Indicates if the update was successful"
              },
              "statement": {
                "type": "string",
                "description": "Statement for the subjectivity definition"
              }
            },
            "required": [
              "id",
              "name",
              "description",
              "policy_type_id",
              "mandatory",
              "active",
              "due_within_days",
              "due_date_type",
              "created_by",
              "updated_by",
              "date_created",
              "date_updated",
              "statement"
            ]
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "messages"
        ]
      },
      "response-modify_task": {
        "description": "Response payload for /api/v2/tasks/modify_task",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "The id of the task"
              },
              "task_id": {
                "type": "string",
                "description": "Task identifier"
              },
              "claim": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Claim ID"
                  },
                  "claim_number": {
                    "type": "string",
                    "description": "Claim number"
                  },
                  "insureds": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "description": "Insured's contact ID"
                        },
                        "name": {
                          "type": "string",
                          "description": "Insured's name"
                        }
                      }
                    },
                    "description": "Insureds associated with the claim"
                  },
                  "date_added": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Date when the claim was added"
                  }
                }
              },
              "policy": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Policy ID"
                  },
                  "policy_number": {
                    "type": "string",
                    "description": "Policy number"
                  },
                  "effective_date": {
                    "type": "string",
                    "format": "date",
                    "description": "Policy effective date"
                  },
                  "insureds": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "description": "Insured's contact ID"
                        },
                        "name": {
                          "type": "string",
                          "description": "Insured's name"
                        }
                      }
                    },
                    "description": "Insureds associated with the latest revision"
                  }
                }
              },
              "policy_context": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "agent": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "description": "Contact ID"
                      },
                      "name": {
                        "type": "string",
                        "description": "Contact name"
                      }
                    },
                    "description": "Agent of record on the latest revision"
                  },
                  "underwriter": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "description": "Contact ID"
                      },
                      "name": {
                        "type": "string",
                        "description": "Contact name"
                      }
                    },
                    "description": "Underwriter on the latest revision"
                  },
                  "agency_group": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "description": "Contact ID"
                      },
                      "name": {
                        "type": "string",
                        "description": "Contact name"
                      }
                    },
                    "description": "Agency group the policy's agency belongs to"
                  },
                  "additional_interest_count": {
                    "type": "integer",
                    "description": "Additional interests on the latest revision"
                  },
                  "written_premium": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Written premium of the latest revision, as a decimal string"
                  }
                },
                "description": "Policy detail the task sidebar shows. Always null here: it is filled on retrieve_task alone, because each field costs a query no other caller reads. Declared so the three task responses document one shape."
              },
              "task_type": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Task type ID"
                  },
                  "name": {
                    "type": "string",
                    "description": "Task type name"
                  }
                },
                "required": [
                  "id",
                  "name"
                ]
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Task description"
              },
              "date_added": {
                "type": "string",
                "format": "date-time",
                "description": "Task created date"
              },
              "due_date": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "Task due date"
              },
              "added_by": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "ID of user who created the task"
                  },
                  "name": {
                    "type": "string",
                    "description": "Name of user who created the task"
                  }
                }
              },
              "assignee": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "ID of user assigned to the task"
                  },
                  "name": {
                    "type": "string",
                    "description": "Name of user assigned to the task"
                  }
                }
              },
              "status": {
                "type": "string",
                "enum": [
                  "Open",
                  "In Progress",
                  "Blocked",
                  "Escalated",
                  "Completed",
                  "Canceled"
                ]
              },
              "priority": {
                "type": "string",
                "enum": [
                  "Low",
                  "Medium",
                  "High"
                ]
              },
              "mandatory": {
                "type": "boolean",
                "description": "Whether the task is mandatory"
              },
              "last_updated": {
                "type": "string",
                "format": "date-time",
                "description": "Task last updated date"
              },
              "selection_strategy": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "How the assignee was chosen (e.g. manual, round_robin, stp)"
              },
              "orkes_task_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Correlation id when the task came from an Orkes workflow"
              },
              "status_substate": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Queue UI substate; not currently populated"
              },
              "tags": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Queue pill tags, e.g. BLOCKED"
              },
              "comms_count": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Linked communications count; not currently populated"
              },
              "documents_status": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Documents indicator; not currently populated"
              },
              "triggered_by_workflow_node_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Workflow node that created this task, when it came from a workflow dispatch"
              },
              "parent_task_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "Parent task, when this task was chained from another"
              },
              "workflow_chain_depth": {
                "type": "integer",
                "description": "How many tasks deep in a workflow chain this task sits; 0 when unchained"
              },
              "workflow_run_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "Workflow run that produced this task"
              },
              "outcome": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Outcome ID"
                  },
                  "outcome_key": {
                    "type": "string",
                    "description": "Stable key for the outcome"
                  },
                  "name": {
                    "type": "string",
                    "description": "Display name of the outcome"
                  }
                },
                "description": "Recorded outcome, once the task has one"
              },
              "assigned_subgroup": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Role or user group ID"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "role",
                      "user_group"
                    ],
                    "description": "Which kind of subgroup"
                  },
                  "name": {
                    "type": "string",
                    "description": "Display name"
                  }
                },
                "description": "Role or user group the task is assigned to, when not assigned to a person"
              }
            },
            "required": [
              "id",
              "task_id",
              "task_type",
              "date_added",
              "status",
              "priority",
              "mandatory",
              "last_updated"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Whether the task modification was successful"
          }
        },
        "required": [
          "data",
          "messages",
          "success"
        ]
      },
      "response-modify_task_definition": {
        "description": "Response payload for /api/v2/tasks/modify_task_definition",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "The id of the task definition."
              },
              "name": {
                "type": "string",
                "description": "Task Name"
              },
              "date_added": {
                "type": "string",
                "format": "date-time",
                "description": "Task definition created date"
              },
              "last_updated": {
                "type": "string",
                "format": "date-time",
                "description": "Task definition last updated date"
              },
              "added_by": {
                "type": "string",
                "format": "uuid",
                "description": "Task definition created by"
              },
              "description": {
                "type": "string",
                "description": "Task definition description"
              },
              "scope": {
                "type": "string",
                "enum": [
                  "claim",
                  "policy"
                ],
                "description": "The scope of the task definition."
              },
              "deleted": {
                "type": "boolean",
                "description": "Whether the task definition is deleted",
                "default": false
              }
            },
            "required": [
              "id",
              "name",
              "date_added",
              "last_updated",
              "added_by",
              "scope",
              "deleted"
            ]
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-modify_task_definitions_assignees": {
        "description": "Response payload for /api/v2/tasks/modify_task_definitions_assignees",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "task_definition_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "The ID of the task definition."
                },
                "role_ids": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "description": "List of role IDs assigned to this task definition after modification."
                },
                "user_group_ids": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "description": "List of user group IDs assigned to this task definition after modification."
                }
              },
              "required": [
                "task_definition_id",
                "role_ids",
                "user_group_ids"
              ]
            },
            "description": "List of task definition assignments after modification, aggregated by task definition ID."
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-override_screening_check_result": {
        "description": "Response payload for /api/v2/contacts/override_screening_check_result",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "success": {
                "type": "boolean",
                "enum": [
                  true
                ]
              }
            },
            "required": [
              "success"
            ]
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-prefill_property_loss_history": {
        "description": "Response payload for /api/v2/quotes/prefill_property_loss_history",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "vendor": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "iso_loss",
                      "clue_property"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Which configured loss-history vendor was used. Null when no supported vendor is configured for this site, or when the configured vendor is unsupported by this endpoint."
              },
              "properties": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "property_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "loss_history": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Vendor-shaped list of past loss records. Shape follows the configured vendor; fields are documented in the vendor adapter."
                    },
                    "loss_history_date_pulled": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Date the most recent successful pull was made (vendor format, typically MM/DD/YYYY)."
                    },
                    "loss_history_report_number": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Vendor's report number for the most recent successful pull."
                    },
                    "pull_performed": {
                      "type": "boolean",
                      "description": "True when this call actually invoked the vendor. False when the response came from the cache (CLUE 30-day window) or read-only fallback."
                    },
                    "mandatories_succeeded": {
                      "type": [
                        "boolean",
                        "null"
                      ],
                      "description": "Whether the loss-free mandatory item refresh (driven by the post-pull claim count) succeeded. True when the refresh ran and succeeded; false when it ran or was attempted but did not succeed (including a post-pull refresh/audit failure after loss history was already persisted -- see messages). Null when no pull was performed, or when a pull occurred but the mandatory refresh was skipped because the revision is not editable or is not the first revision of the term (e.g. renewals); see messages for the explanation."
                    },
                    "messages": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Per-property warnings/errors. Other properties in the same request continue independently even when one fails."
                    }
                  },
                  "required": [
                    "property_id",
                    "loss_history",
                    "pull_performed",
                    "messages"
                  ]
                }
              },
              "messages": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Tenant-level messages (e.g. no vendor configured). Per-property issues belong under each property's own messages list."
              }
            },
            "required": [
              "vendor",
              "properties",
              "messages"
            ]
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-prefill_quote": {
        "type": "object",
        "description": "Response Schema for /api/v2/quotes/prefill_quote",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "prefill_executed": {
                "type": "boolean",
                "description": "Whether the prefill was actually executed"
              },
              "new_drivers": {
                "type": "array",
                "items": {
                  "type": "object",
                  "description": "Driver object from prefill",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Driver ID"
                    },
                    "full_name": {
                      "type": "string",
                      "description": "Driver's full name"
                    },
                    "date_of_birth": {
                      "type": "string",
                      "format": "date",
                      "description": "Driver's date of birth"
                    },
                    "license_number": {
                      "type": "string",
                      "description": "Driver's license number"
                    },
                    "license_state": {
                      "type": "string",
                      "description": "State where license was issued"
                    }
                  }
                },
                "description": "List of newly created drivers from prefill"
              },
              "new_vehicles": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/vehicle_template-def"
                },
                "description": "List of newly created vehicles from prefill"
              },
              "updated_drivers": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Driver ID"
                    },
                    "full_name": {
                      "type": "string",
                      "description": "Driver's full name"
                    },
                    "date_of_birth": {
                      "type": "string",
                      "format": "date",
                      "description": "Driver's date of birth"
                    },
                    "license_number": {
                      "type": "string",
                      "description": "Driver's license number"
                    },
                    "license_state": {
                      "type": "string",
                      "description": "State where license was issued"
                    }
                  }
                },
                "description": "List of existing drivers that were updated by prefill"
              },
              "updated_vehicles": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/vehicle_template-def"
                },
                "description": "List of existing vehicles that were updated by prefill"
              },
              "message": {
                "type": "string",
                "description": "Message from the prefill integration"
              },
              "deleted_default_risks_counts": {
                "type": "object",
                "properties": {
                  "properties": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "Number of default properties deleted"
                  },
                  "drivers": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "Number of default drivers deleted"
                  },
                  "vehicles": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "Number of default vehicles deleted"
                  },
                  "watercrafts": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "Number of default watercrafts deleted"
                  }
                },
                "required": [
                  "properties",
                  "drivers",
                  "vehicles",
                  "watercrafts"
                ],
                "description": "Counts of deleted default risks by type"
              }
            },
            "required": [
              "prefill_executed",
              "new_drivers",
              "new_vehicles",
              "updated_drivers",
              "updated_vehicles",
              "deleted_default_risks_counts"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-purge_migration_data": {
        "type": "object",
        "description": "Response schema for /api/v2/imports/purge_migration_data",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "type": "array",
            "description": "Array of informational or error messages",
            "items": {
              "type": "string"
            }
          },
          "data": {
            "type": "object",
            "description": "Purge job launch information",
            "properties": {
              "status": {
                "type": "string",
                "description": "Job launch status",
                "enum": [
                  "launched",
                  "blocked"
                ]
              },
              "job_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "Tracked purge job identifier (present when status is 'launched')"
              },
              "message": {
                "type": "string",
                "description": "Status message"
              }
            },
            "required": [
              "status",
              "message"
            ]
          }
        },
        "required": [
          "success",
          "messages"
        ]
      },
      "response-queue_recovery_candidate": {
        "type": "object",
        "description": "Response schema for /api/v2/deliverables/queue_recovery_candidate",
        "properties": {
          "data": {
            "type": "object",
            "description": "Result of queuing the recovery task.",
            "properties": {
              "candidate_id": {
                "type": "string",
                "description": "Identifier of the candidate that was processed."
              },
              "job_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "ID of the created BackgroundJob, or null if the candidate was skipped."
              },
              "status": {
                "type": "string",
                "enum": [
                  "queued",
                  "failed",
                  "skipped"
                ],
                "description": "Outcome of the queue request."
              },
              "message": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Human-readable explanation, especially when skipped."
              }
            },
            "required": [
              "candidate_id",
              "status"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful."
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request."
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Base error message(s)."
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-rate": {
        "title": "Rate Quote Response",
        "type": "object",
        "description": "Response payload for /api/v2/quotes/rate. On success, data is the retrieve_revision_details payload of the freshly rated revision plus the delta_summary, uwr_outcome and risk_rates siblings. The endpoint rates through the unified engine only: it requires the britequote/toggle-feature-enable-rate-revision-unified-engine advanced setting to be on and a rating-v2 Property new-business/renewal revision (the same rate_capability the revision-details payload carries, on which the Quote Wizard branches before calling). Otherwise the call is refused with success false and a flat messages list, and the caller is expected to rate through the legacy Rate action instead; there is no in-process fallback.",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful."
          },
          "data": {
            "type": [
              "object",
              "array",
              "null"
            ],
            "description": "The retrieve_revision_details payload of the rated revision (read back after the rate delta committed), extended with the delta_summary, uwr_outcome and risk_rates siblings. Only the stable rating-contract fields are typed here; the rest of the revision-details fields ride along unchanged. On errors data is an empty list (the standard_error envelope).",
            "items": {
              "description": "The standard_error envelope serializes data as an empty list, so this never holds items."
            },
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "The rated revision's UUID (the quote_id that was sent)."
              },
              "policy_id": {
                "type": "string",
                "format": "uuid",
                "description": "UUID of the policy the rated revision belongs to."
              },
              "policy_term_id": {
                "type": "string",
                "format": "uuid",
                "description": "UUID of the policy term the rated revision belongs to."
              },
              "policy_term_start": {
                "type": "string",
                "format": "date",
                "description": "Effective date of the revision's policy term."
              },
              "policy_term_end": {
                "type": "string",
                "format": "date",
                "description": "Expiration date of the revision's policy term."
              },
              "revision_state": {
                "type": "string",
                "description": "The revision's lifecycle state (for example 'open')."
              },
              "builder_pending": {
                "type": "boolean",
                "description": "False after a successful rate: the rate delta already stamped the revision as no longer pending in the builder."
              },
              "builder_ready_to_rate": {
                "type": "boolean",
                "description": "True after a successful rate."
              },
              "rate_capability": {
                "type": "boolean",
                "description": "Whether this revision is rated through the unified engine (the advanced setting is on AND the revision is a rating-v2 Property new-business/renewal). Always true in this response -- the unified branch ran -- and mirrored from retrieve_revision_details, where the wizard reads it to choose the unified path or the legacy cascade before its first Rate call."
              },
              "annual_premium": {
                "type": "number",
                "description": "The rated annual premium of the revision."
              },
              "annual_fee": {
                "type": "number",
                "description": "The rated annual fee of the revision."
              },
              "written_premium": {
                "type": "number",
                "description": "The rated written premium of the revision."
              },
              "written_fee": {
                "type": "number",
                "description": "The rated written fee of the revision."
              },
              "written_premium_delta": {
                "type": "number",
                "description": "The written premium change against the in-force term."
              },
              "items": {
                "type": "array",
                "items": {
                  "type": "object"
                },
                "description": "The revision's line items with their rated premiums, in the retrieve_revision_details item shape."
              },
              "sub_lines": {
                "type": "array",
                "items": {
                  "type": "object"
                },
                "description": "The revision's sub-lines with their rated premiums, in the retrieve_revision_details sub-line shape."
              },
              "named_insureds": {
                "type": "array",
                "items": {
                  "type": "object"
                },
                "description": "The revision's named insureds. SSNs are masked when the britequote/mask-ssn-on-edit-contact advanced setting is on."
              },
              "underwriting_questions": {
                "type": "array",
                "items": {
                  "type": "object"
                },
                "description": "The revision's underwriting questions and answers."
              },
              "delta_summary": {
                "type": "object",
                "description": "Per-table row counts of the persisted rate delta.",
                "properties": {
                  "revision_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "UUID of the revision the delta was stamped onto."
                  },
                  "updated": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "integer"
                    },
                    "description": "Rows updated per table (revision_items, property_items, revision_sub_lines, property_sub_lines, properties, revisions)."
                  },
                  "inserted": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "integer"
                    },
                    "description": "Rows inserted per table."
                  },
                  "removed": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "integer"
                    },
                    "description": "Rows removed per table."
                  },
                  "notes": {
                    "type": "object",
                    "properties": {
                      "inserted": {
                        "type": "integer",
                        "description": "Underwriting notes inserted by this rate."
                      },
                      "deduplicated": {
                        "type": "integer",
                        "description": "Underwriting notes skipped because an identical note already existed."
                      }
                    },
                    "description": "Underwriting note counts of the server-side UWR run."
                  },
                  "premium_changed": {
                    "type": "boolean",
                    "description": "True when the rate changed any premium against the previously persisted figures."
                  }
                }
              },
              "uwr_outcome": {
                "type": "object",
                "description": "Outcome of the server-side underwriting rules run that rode the rate.",
                "properties": {
                  "blocked": {
                    "type": "boolean",
                    "description": "True when an underwriting rule blocked the quote."
                  },
                  "review_workflow_state": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The review workflow state the UWR run left the quote in. May be null when no review workflow applies."
                  },
                  "validation_errors": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Validation errors raised by the UWR run."
                  },
                  "rule_passes": {
                    "type": "integer",
                    "description": "Number of underwriting rule evaluation passes."
                  },
                  "notes_inserted": {
                    "type": "integer",
                    "description": "Underwriting notes inserted by the run."
                  },
                  "notes_deduplicated": {
                    "type": "integer",
                    "description": "Underwriting notes deduplicated by the run."
                  },
                  "items_added": {
                    "type": "integer",
                    "description": "Items the rate delta inserted, summed across tables."
                  },
                  "items_removed": {
                    "type": "integer",
                    "description": "Items the rate delta removed, summed across tables."
                  }
                }
              },
              "risk_rates": {
                "type": "object",
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "The property's rated line items, as get_rating_information formats them."
                    },
                    "sub_lines": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "The property's rated sub-line instances with their member items."
                    },
                    "annual_fee": {
                      "type": "number",
                      "description": "The property's rated annual fee."
                    },
                    "annual_premium": {
                      "type": "number",
                      "description": "The property's rated annual premium."
                    },
                    "written_fee": {
                      "type": "number",
                      "description": "The property's rated written fee."
                    },
                    "written_premium": {
                      "type": "number",
                      "description": "The property's rated written premium."
                    }
                  },
                  "description": "One property's rated figures, in the same shape the legacy /api/v2/policies/rate_risk answered with, read back after the rate delta committed."
                },
                "description": "The rated figures for EVERY property of the revision, keyed by property UUID. Not a subset: the engine rates the properties as a set (they can reference each other through rate chains and computed categories), so all of their premiums move together. Deliberately NOT the retrieve_risk_details payload -- that one is the property screen's full hydration (photos, claims, loss history, vendor hazard data) and is still fetched separately on navigation."
              }
            }
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Any messages or errors related to the request. ALWAYS the flat legacy list shape (for example 'No Revision found for id: X', 'Rating Error: ...', 'The quote could not be rated. Try again, and contact support if it keeps failing.') -- never the '_base_' dict shape: every exception this endpoint does not translate is caught, logged, and re-raised as a sanitized flat message."
          },
          "error_code": {
            "type": "string",
            "enum": [
              "rate_saved_response_unavailable"
            ],
            "description": "Present only when the rate delta committed but the response over it could not be built ('rate_saved_response_unavailable'): the rate is saved, reloading the quote shows the current premiums. Absent from every other response, success or failure -- callers that need a machine-readable reason branch on this instead of parsing 'messages'."
          }
        },
        "required": [
          "success",
          "data",
          "messages"
        ]
      },
      "response-rate_full_quote": {
        "type": "object",
        "description": "Response payload for /api/v2/quotes/rate_full_quote",
        "properties": {
          "data": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/full_quote-def"
              }
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-reconcile_insights": {
        "type": "object",
        "description": "Response payload for /api/v2/insights/reconcile_insights.",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "applied": {
                "type": "object",
                "properties": {
                  "kept": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "updated": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "removed": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "created": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "kept",
                  "updated",
                  "removed",
                  "created"
                ]
              },
              "created_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "description": "Server-assigned IDs for create entries, in submission order"
              }
            },
            "required": [
              "applied",
              "created_ids"
            ]
          }
        },
        "required": [
          "success",
          "messages",
          "data"
        ]
      },
      "response-record_saved_method_authorization": {
        "type": "object",
        "description": "Response payload for /api/v2/payments/record_saved_method_authorization. The endpoint answers with one of three envelopes: success, a standard error, or a permission refusal - modelled separately so a validator does not reject a normal failure.",
        "oneOf": [
          {
            "title": "Success",
            "type": "object",
            "required": [
              "data",
              "success",
              "messages"
            ],
            "properties": {
              "success": {
                "const": true
              },
              "messages": {
                "oneOf": [
                  {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "_base_": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    },
                    "additionalProperties": {
                      "oneOf": [
                        {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        {
                          "type": "string"
                        }
                      ]
                    }
                  }
                ],
                "description": "Any messages related to the request."
              },
              "data": {
                "type": "object",
                "required": [
                  "recorded"
                ],
                "properties": {
                  "recorded": {
                    "type": "boolean",
                    "description": "True when a proof-of-authorization row was written; false when saved-method authorization capture is disabled for the carrier and nothing was recorded. Note the gateway fails the call instead when the caller DID attest and nothing was recorded."
                  }
                }
              }
            }
          },
          {
            "title": "Standard error",
            "description": "Validation or unexpected failure: @api_request maps BCValidationError through standard_error, which returns data as an empty list.",
            "type": "object",
            "required": [
              "success",
              "messages"
            ],
            "properties": {
              "success": {
                "const": false
              },
              "data": {
                "type": "array",
                "items": {},
                "maxItems": 0,
                "description": "Always an empty list on the error envelope (standard_error)."
              },
              "messages": {
                "oneOf": [
                  {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "_base_": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    },
                    "additionalProperties": {
                      "oneOf": [
                        {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        {
                          "type": "string"
                        }
                      ]
                    }
                  }
                ],
                "description": "Human-readable messages or per-field errors."
              }
            }
          },
          {
            "title": "Permission denied",
            "description": "Refused before the endpoint body ran - by the permission gate, or by @protect_contact_records on a protected contact. Carries neither data nor messages.",
            "type": "object",
            "required": [
              "success",
              "permissionDenied"
            ],
            "properties": {
              "success": {
                "const": false
              },
              "permissionDenied": {
                "const": true
              }
            }
          }
        ]
      },
      "response-regenerate_statements": {
        "description": "Response payload for /api/v2/commissions/regenerate_statements.",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "The async job handle. The caller polls get_regenerate_statements_status with reference_id until async_status reaches a terminal state.",
            "properties": {
              "success": {
                "type": "boolean",
                "description": "True while the job is in flight or successfully started. Terminal failures flip this to false on the poll endpoint, not here."
              },
              "async_status": {
                "type": "string",
                "enum": [
                  "in_progress",
                  "success",
                  "failure",
                  "not_found"
                ],
                "description": "The state of the background job. Immediately after starting, this is 'in_progress'. If a deterministic in-flight job already exists for this report month, this is still 'in_progress' and the existing job's reference_id is returned rather than queueing a duplicate."
              },
              "async_result": {
                "description": "Terminal result payload. Shape depends on async_status: null while 'in_progress' or 'not_found'; an HTML-formatted error string derived from the worker exception on 'failure'; a summary object on 'success' carrying both the generated commission_report file descriptors and the list of agencies the worker intentionally skipped (e.g. due to unresolvable revisions), so the UI can distinguish a fully complete run from a partial one.",
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "type": "string",
                    "description": "Terminal failure: HTML-formatted extracted exception message."
                  },
                  {
                    "type": "object",
                    "description": "Terminal success: summary of the regeneration run.",
                    "properties": {
                      "generated_count": {
                        "type": "integer",
                        "minimum": 0,
                        "description": "Number of commission_report PDFs the worker generated. The full per-PDF file descriptors are intentionally not returned -- they pickle past the 64 KiB BLOB cap on background_jobs.results for large runs and the UI re-fetches the file list via lastMonthsCommissionReports after success anyway."
                      },
                      "skipped_agencies": {
                        "type": "array",
                        "description": "Agencies the worker intentionally skipped because at least one of their policy terms could not be resolved to a committed/pending revision. The worker refuses to render a partial statement whose total would not match the dollars actually paid, so these agencies remain on 'Report Pending' until the underlying data is corrected and statements are regenerated.",
                        "items": {
                          "type": "object",
                          "properties": {
                            "agency_id": {
                              "type": "string",
                              "format": "uuid",
                              "description": "The id of the contact representing the agency."
                            },
                            "agency_name": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Human-readable agency name. Null only when the contact lookup fails -- shouldn't happen in practice."
                            },
                            "unresolvable_term_ids": {
                              "type": "array",
                              "description": "policy_term ids whose revision couldn't be resolved -- ops should investigate these to fix the underlying data.",
                              "items": {
                                "type": "string",
                                "format": "uuid"
                              }
                            }
                          },
                          "required": [
                            "agency_id",
                            "agency_name",
                            "unresolvable_term_ids"
                          ]
                        }
                      }
                    },
                    "required": [
                      "generated_count",
                      "skipped_agencies"
                    ]
                  }
                ]
              },
              "reference_id": {
                "type": "string",
                "format": "uuid",
                "description": "Deterministic UUID derived from the report month. Stable across retries and page reloads so concurrent clicks coordinate on a single BackgroundJob row rather than spawning duplicates. Informational: surfaces in logs / Datadog / the BackgroundJob row for support investigations but is not required by the poll endpoint, which identifies the job by `year` + `month`."
              },
              "year": {
                "type": "integer",
                "minimum": 1900,
                "maximum": 9999,
                "description": "Four-digit calendar year of the report month the server resolved the request to. Callers should echo this back on subsequent polls to preserve the resolved month across the start-then-poll handoff even around month-rollover boundaries."
              },
              "month": {
                "type": "integer",
                "minimum": 1,
                "maximum": 12,
                "description": "Calendar month the server resolved the request to, 1-12."
              }
            },
            "required": [
              "success",
              "async_status",
              "async_result",
              "reference_id",
              "year",
              "month"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Whether the request to start the job was accepted."
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-regenerate_summary": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "data": {
            "type": "object",
            "description": "Async queue result for summary regeneration.",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "QUEUED",
                  "SKIPPED"
                ],
                "description": "QUEUED when a GENERATE_*_SUMMARY job was created or deduped; SKIPPED when the feature flag is off."
              },
              "generation_status": {
                "type": "object",
                "description": "Present when status is QUEUED. Poll get_summary until SUCCEEDED or FAILED.",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "RUNNING",
                      "SUCCEEDED",
                      "FAILED"
                    ]
                  },
                  "job_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "updated_at": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "status",
                  "job_id"
                ]
              }
            },
            "required": [
              "status"
            ]
          }
        },
        "required": [
          "success",
          "messages",
          "data"
        ]
      },
      "response-reinstate_policy": {
        "description": "Response schema for /api/v2/policies/reinstate_policy",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the operation was successful"
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Any messages or errors related to the request"
          },
          "data": {
            "type": "object",
            "properties": {
              "policy_id": {
                "type": "string",
                "format": "uuid",
                "description": "The reinstated policy"
              },
              "revision_id": {
                "type": "string",
                "format": "uuid",
                "description": "The revision the reinstatement applied to. Both paths populate it: the Cancellation Pending path writes no NEW revision and returns the existing revision's id."
              },
              "policy_term_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "The term the reinstatement applied to"
              },
              "reinstatement_date": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date",
                "description": "Effective date of the reinstatement"
              },
              "previous_status": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Policy status immediately before the reinstatement"
              },
              "policy_status": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Policy status after the reinstatement"
              }
            },
            "required": [
              "policy_id",
              "revision_id",
              "policy_term_id",
              "previous_status",
              "policy_status"
            ]
          }
        },
        "required": [
          "success",
          "data"
        ]
      },
      "response-remove_contact_from_role": {
        "description": "Response payload for /api/v2/contacts/remove_contact_from_role.",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-remove_form_from_policy_type": {
        "description": "Response payload for /api/v2/lines/remove_form_from_policy_type.",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "file": {
                "type": "object",
                "description": "The File record, now marked inactive (File.active = false)."
              }
            },
            "required": [
              "file"
            ]
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-remove_form_from_policy_type_item": {
        "description": "Response payload for /api/v2/lines/remove_form_from_policy_type_item.",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "file": {
                "type": "object",
                "description": "The File record, now marked inactive (File.active = false)."
              }
            },
            "required": [
              "file"
            ]
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-remove_policy_contact": {
        "type": "object",
        "description": "Response payload for /api/v2/contacts/remove_policy_contact",
        "properties": {
          "data": {
            "type": "object",
            "description": "The data object is empty for this endpoint"
          },
          "success": {
            "type": "boolean"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-remove_policy_type_relations": {
        "type": "object",
        "description": "Response Schema for /api/v2/policy_types/remove_policy_type_relations",
        "properties": {
          "data": {
            "type": "object",
            "properties": {}
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-remove_quote_contact": {
        "type": "object",
        "description": "Response payload for /api/v2/contacts/remove_quote_contact",
        "properties": {
          "data": {
            "type": "object",
            "description": "The data object is empty for this endpoint"
          },
          "success": {
            "type": "boolean"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-remove_risk_contact": {
        "type": "object",
        "description": "Response payload for /api/v2/contacts/remove_risk_contact",
        "properties": {
          "data": {
            "type": "object",
            "description": "The data object is empty for this endpoint"
          },
          "success": {
            "type": "boolean"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-reports_export_report": {
        "type": "object",
        "description": "Response for /api/v2/reports/export_report. On success the body is a downloadable JSON file (Content-Type: application/json, Content-Disposition: attachment; filename=\"<report name>.json\") whose content is the report definition documented below, suitable for /api/v2/reports/import_report. On error the standard_error envelope ({success:false, messages, data}) is returned instead.",
        "properties": {
          "name": {
            "type": "string",
            "title": "name",
            "description": "The report name"
          },
          "description": {
            "type": "string",
            "title": "description",
            "description": "The report description"
          },
          "report_runner": {
            "type": "string",
            "title": "report_runner",
            "description": "The report runner (e.g. sql_runner)"
          },
          "custom": {
            "type": "boolean",
            "title": "custom",
            "description": "Whether the report is a user-created (custom) report"
          },
          "draft": {
            "type": "boolean",
            "title": "draft",
            "description": "Whether the report is a draft"
          },
          "date_type": {
            "type": "string",
            "title": "date_type",
            "description": "The report date type (single or range)"
          },
          "hidden": {
            "type": "boolean",
            "title": "hidden",
            "description": "Whether the report is soft-deleted"
          },
          "output_format": {
            "type": "string",
            "title": "output_format",
            "description": "The output format (e.g. excel, text)"
          },
          "output_file_delimiter": {
            "type": "string",
            "title": "output_file_delimiter",
            "description": "The delimiter used for delimited output"
          },
          "category_name": {
            "type": "string",
            "title": "category_name",
            "description": "The report category name, or null when uncategorized"
          },
          "report_parameters": {
            "type": "array",
            "title": "report_parameters",
            "description": "Parameter definitions for the report",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "Parameter name"
                },
                "type": {
                  "type": "string",
                  "description": "Parameter type (String, Number, Date, DateTime, UUID, Enum)"
                },
                "label": {
                  "type": "string",
                  "description": "Display label"
                },
                "extra_info": {
                  "type": "object",
                  "description": "Parameter metadata (default_value, default_value_type, enumOptions, hidden, ...)"
                }
              }
            }
          },
          "export_options": {
            "type": "object",
            "title": "export_options",
            "description": "Delivery/output options (e.g. filename); a password is redacted"
          },
          "additional_report_settings": {
            "type": "object",
            "title": "additional_report_settings",
            "description": "Additional report settings"
          },
          "report_sheets": {
            "type": "array",
            "title": "report_sheets",
            "description": "The report sheets (SQL tabs)",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "Sheet name"
                },
                "order": {
                  "type": "integer",
                  "description": "Sheet order"
                },
                "sql_query": {
                  "type": "string",
                  "description": "The sheet's SQL query"
                },
                "include_totals_row": {
                  "type": "boolean",
                  "description": "Whether to append a totals row"
                },
                "formatting": {
                  "type": "object",
                  "description": "Per-column formatting metadata"
                }
              }
            }
          }
        }
      },
      "response-reports_import_report": {
        "type": "object",
        "description": "Response schema for /api/v2/reports/import_report",
        "properties": {
          "data": {
            "type": "object",
            "description": "The created report (same shape as /api/v2/reports/retrieve_report)",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "The id of the newly created report"
              },
              "name": {
                "type": "string",
                "description": "The report name"
              },
              "report_sheets": {
                "type": "array",
                "description": "The persisted report sheets",
                "items": {
                  "type": "object"
                }
              }
            }
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "description": "Empty list on success; on error a standard_error envelope keyed by field, or '_base_' for non-field errors (e.g. name collision, invalid SQL)",
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "object"
                    }
                  ]
                }
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-request_claim_estimation": {
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "readOnly": true
          },
          "claim_id": {
            "type": "string",
            "format": "uuid"
          },
          "xact_assignment_id": {
            "type": "string",
            "readOnly": true
          },
          "assignment_type": {
            "type": "string",
            "enum": [
              "initial",
              "supplemental"
            ]
          },
          "xact_analysis_status": {
            "type": "string"
          },
          "sent_date": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "sent_by": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "assignment_date": {
            "type": "string",
            "format": "date-time"
          },
          "inspection_date": {
            "type": "string",
            "format": "date-time"
          },
          "contact_date": {
            "type": "string",
            "format": "date-time"
          },
          "estimate_date": {
            "type": "string",
            "format": "date-time"
          },
          "appointment_date": {
            "type": "string",
            "format": "date-time"
          },
          "estimate_approval_date": {
            "type": "string",
            "format": "date-time"
          },
          "building_estimate_amount": {
            "type": "number"
          },
          "contents_estimate_amount": {
            "type": "number"
          },
          "icc_estimate_amount": {
            "type": "number"
          },
          "status": {
            "type": "string",
            "enum": [
              "requested",
              "canceled",
              "completed"
            ]
          },
          "canceled_by": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "canceled_date": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "is_canceled": {
            "type": "boolean",
            "readOnly": true
          }
        },
        "required": [
          "claim_id"
        ]
      },
      "response-request_claims_search": {
        "type": "object",
        "description": "Response Schema for /api/v2/claims/request_claims_search",
        "properties": {
          "request_id": {
            "type": "string",
            "format": "uuid",
            "description": "Correlation ID for tracking the request",
            "readOnly": true
          },
          "status": {
            "type": "string",
            "enum": [
              "Scheduled",
              "Failed"
            ],
            "description": "Status of the request submission"
          },
          "message": {
            "type": "string",
            "description": "Human-readable status message"
          },
          "error_code": {
            "type": "string",
            "description": "Error code if status is Failed"
          },
          "error_message": {
            "type": "string",
            "description": "Detailed error message if status is Failed"
          }
        },
        "required": [
          "request_id",
          "status",
          "message"
        ]
      },
      "response-resolve_property_geolocation": {
        "description": "Response payload for /api/v2/policies/resolve_property_geolocation. Success and failure are modelled as separate envelopes because they do not share a shape: @api_request renders a refusal through standard_error, whose data is an empty LIST, while a success carries the serialized property as an object.",
        "oneOf": [
          {
            "title": "Success",
            "type": "object",
            "properties": {
              "success": {
                "const": true
              },
              "messages": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "data": {
                "type": "object",
                "description": "The property's own serialization (Property.to_dict(), which is SNAKE_CASE) plus the keys below. Additional properties are permitted deliberately: the body carries every column and grows with the model.",
                "properties": {
                  "resolution_committed": {
                    "const": true,
                    "description": "Present and true whenever data is present. The point, accuracy and ranked counties are persisted."
                  },
                  "derived_complete": {
                    "type": "boolean",
                    "description": "False when the resolution landed but the derived payload - flood zone, census block group, waterway, MunichRe eligibility, AIR - could not be computed. Not a failed write: the resolution itself is not in doubt."
                  },
                  "primaryProperty": {
                    "type": "boolean",
                    "description": "camelCase, unlike its neighbours. Set by the endpoint rather than coming from the serialization, matching update_property_location."
                  },
                  "revision_workflow_state": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The underwriting workflow state after the edit advanced it."
                  },
                  "address_accuracy": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "poor",
                      "fair",
                      "great",
                      null
                    ],
                    "description": "Written server-side from the provider's required accuracy on every path, never defaulted."
                  },
                  "ranked_counties": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "maxItems": 5,
                    "description": "The provider's county candidates, most probable first. Raw vendor names with confidence rounded to 4 decimal places. Null when the geocoder resolved the point, or when an address change invalidated a previous ranking.",
                    "items": {
                      "type": "object",
                      "properties": {
                        "county": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 100
                        },
                        "confidence": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1
                        }
                      },
                      "required": [
                        "county",
                        "confidence"
                      ]
                    }
                  },
                  "ranked_county_options": {
                    "type": "array",
                    "description": "The ranking above resolved into OFFERABLE options: provider names matched to BriteCore county ids, configured overrides prepended, suppressed counties removed. Computed, not a column. ABSENT -- not empty -- when the enrichment failed after the address was already committed; `[]` is the authoritative 'resolved, and nothing it named is offerable here' and the client clears the dropdown on it, so it must never be used to mean 'unknown'. Read `ranked_county_options_complete` to tell those apart. Was emitted undeclared before BC-23925 folded this in; the object permits additional properties, so it did not fail its contract, it simply did not state it.",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "confidence": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "is_override": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "ranked_county_options_complete": {
                    "type": "boolean",
                    "description": "False when the county enrichment failed AFTER the address was committed and the provider was paid -- the resolution itself is not in doubt, and `ranked_county_options` is then absent. Named and shaped to match `derived_complete` above: same envelope, same phase-4 degrade, same polarity. It exists because absence alone cannot carry this: the legacy save endpoint never sends the options key either, and the client cannot distinguish the two cases by comparing its own model (the ranking is a mapped observable list, so a serialization of it is `[{}]`). The client skips reconciling the dropdown when this is false, leaving what the agent has on screen alone.",
                    "default": true
                  },
                  "latitude": {
                    "type": [
                      "string",
                      "number",
                      "null"
                    ]
                  },
                  "longitude": {
                    "type": [
                      "string",
                      "number",
                      "null"
                    ]
                  }
                },
                "required": [
                  "resolution_committed",
                  "derived_complete",
                  "ranked_county_options_complete",
                  "primaryProperty",
                  "revision_workflow_state"
                ]
              }
            },
            "required": [
              "success",
              "data"
            ]
          },
          {
            "title": "Failure",
            "type": "object",
            "description": "A pre-commit refusal: no such property, a non-editable revision, more than one connected provider connection record, a snapshot that moved under the lock, or a fingerprint mismatch. Nothing is written.",
            "properties": {
              "success": {
                "const": false
              },
              "messages": {
                "oneOf": [
                  {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  {
                    "type": "object",
                    "additionalProperties": {
                      "oneOf": [
                        {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        {
                          "type": "string"
                        }
                      ]
                    }
                  }
                ]
              },
              "data": {
                "type": "array",
                "maxItems": 0,
                "items": {},
                "description": "Always the empty list. standard_error's default, not an oversight. `items` is present because every other array in api_specs has one (1558 of 1559) and OpenAPI tooling requires it even when maxItems is 0."
              }
            },
            "required": [
              "success",
              "messages",
              "data"
            ]
          }
        ]
      },
      "response-retrieve_adjuster_licenses": {
        "description": "Response payload for /api/v2/contacts/retrieve_adjuster_licenses.",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request was successful"
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Any messages or errors related to the request"
          },
          "data": {
            "type": "array",
            "description": "List of adjuster license records",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "UUID of the license"
                },
                "contact_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "UUID of the contact"
                },
                "business_location_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "UUID of the business location"
                },
                "business_location_name": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Name of the business location (state)"
                },
                "business_location_abbreviation": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Abbreviation of the business location (state)"
                },
                "license_number": {
                  "type": "string",
                  "description": "License number"
                },
                "effective_date": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Effective date in YYYY-MM-DD format"
                },
                "expiration_date": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Expiration date in YYYY-MM-DD format"
                },
                "date_added": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Date added in YYYY-MM-DD HH:MM:SS format"
                }
              }
            }
          }
        }
      },
      "response-retrieve_claim_payments": {
        "type": "object",
        "description": "Response payload for /api/v2/claims/retrieve_claim_payments",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "True if the function executed successfully, false if there was an error."
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "List of human-readable error messages. If the function executed successfully, this list will be empty."
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ],
            "description": "List of human-readable error messages. If the function executed successfully, this list will be empty."
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Unique identifier for the claim transaction"
                },
                "address_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid",
                  "description": "Address ID associated with the payment"
                },
                "amount": {
                  "type": "number",
                  "description": "Payment amount"
                },
                "check_display": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Check display information"
                },
                "check_number": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "description": "Check number"
                },
                "claim_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "ID of the associated claim"
                },
                "claim_item_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid",
                  "description": "ID of the associated claim item"
                },
                "cleared_date": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time",
                  "description": "Date when the payment was cleared"
                },
                "contact_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid",
                  "description": "ID of the contact associated with the payment"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Description of the payment"
                },
                "deductible": {
                  "type": "number",
                  "description": "Deductible amount"
                },
                "exported": {
                  "type": "boolean",
                  "description": "Whether the payment has been exported"
                },
                "date_exported": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time",
                  "description": "Date when the payment was exported"
                },
                "item_amounts": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "description": "JSON object containing item-specific amounts"
                },
                "memo": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Memo associated with the payment"
                },
                "payment_method_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid",
                  "description": "ID of the payment method used"
                },
                "recovery_category": {
                  "description": "Category of recovery if applicable",
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "type": "string",
                      "enum": [
                        "reinsuranceReceived",
                        "reinsurancelaeReceived",
                        "subrogationReceived",
                        "salvageReceived"
                      ]
                    }
                  ]
                },
                "reinsurance_contract_contact_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid",
                  "description": "ID of the reinsurance contract contact"
                },
                "selected_payees": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "items": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Contact ID of the selected payee"
                  },
                  "description": "List of selected payee contact IDs for the payment"
                },
                "transaction_date": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time",
                  "description": "Date of the transaction"
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "payment",
                    "recovery"
                  ],
                  "description": "Type of transaction"
                },
                "voided": {
                  "type": "boolean",
                  "description": "Whether the payment has been voided"
                },
                "voided_date": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time",
                  "description": "Date when the payment was voided"
                },
                "historical": {
                  "type": "boolean",
                  "description": "Whether this is a historical payment"
                },
                "check_date": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date",
                  "description": "Date on the check"
                },
                "date_updated": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Date when the payment was last updated"
                },
                "system_tags": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "System tag ID"
                      },
                      "name": {
                        "type": "string",
                        "description": "System tag name"
                      },
                      "value": {
                        "type": "string",
                        "description": "System tag value"
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "value"
                    ]
                  },
                  "description": "List of formatted system tag objects with 'id', 'name', and 'value' keys"
                }
              },
              "required": [
                "id",
                "claim_id",
                "amount",
                "deductible",
                "exported",
                "type",
                "voided",
                "historical",
                "date_updated"
              ]
            },
            "description": "List of claim payment dictionaries, each containing all ClaimTransaction fields including system_tags"
          }
        },
        "required": [
          "success",
          "messages",
          "data"
        ]
      },
      "response-retrieve_common_allowed_assignees": {
        "description": "Response payload for /api/v2/tasks/retrieve_common_allowed_assignees",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "array",
            "description": "List of contacts allowed to be assigned to tasks of every given task definition",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "The unique identifier of the contact"
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The name of the contact. Null or empty for a contact with no name on record; such contacts sort last and the UI falls back to the id."
                }
              },
              "required": [
                "id",
                "name"
              ]
            }
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-retrieve_config": {
        "type": "object",
        "description": "Response for /api/v2/convenience_fees/retrieve_config. convenience_fees holds the raw values stored at the requested scope. For the legacy fee text columns (formula_*, description_*, disclosure_surcharge, disclosure_authorization) NULL is a BLANK OVERRIDE at this scope ($0 fee / blank copy), NOT 'inherit' -- re-inheriting is via delete_config (Remove state override). The INHERIT-ON-NULL fields (BC-16104) -- disclosure_style, capture_authorization, disclosure_first_party, disclosure_third_party -- fall through to the broader tier when NULL. inherited_convenience_fees holds what the resolver falls through to when the scope has no override row (what Remove state override would revert to), used as form placeholders. Both share the same nine logical keys.",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Field-keyed error messages"
              }
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Whether the operation was successful"
          },
          "data": {
            "type": "object",
            "properties": {
              "convenience_fees": {
                "type": "object",
                "description": "Raw values stored at this scope. For the text columns, NULL means a blank override at this scope ($0 fee / blank copy), NOT 'inherit' -- re-inheriting requires removing the scope via delete_config. disclosure_style is the exception: NULL falls through to the broader tier.",
                "properties": {
                  "disclosure_style": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Disclosure style for fee messaging shown to policyholders: 'standard', 'new_york', or null when no override is configured."
                  },
                  "formula_cc": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Convenience-fee formula for credit-card payments."
                  },
                  "formula_ach": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Convenience-fee formula for ACH payments."
                  },
                  "formula_debit": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Convenience-fee formula for debit-card payments."
                  },
                  "description_cc": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Description shown for credit-card fees."
                  },
                  "description_ach": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Description shown for ACH fees."
                  },
                  "description_debit": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Description shown for debit-card fees."
                  },
                  "disclosure_surcharge": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "HTML surcharge disclosure."
                  },
                  "disclosure_authorization": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "HTML authorization disclosure."
                  },
                  "capture_authorization": {
                    "type": [
                      "boolean",
                      "null"
                    ],
                    "description": "raw capture flag at this scope. INHERIT-ON-NULL -- null falls through to the broader tier (not a blank override)."
                  },
                  "disclosure_first_party": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "first-party disclosure copy at this scope. INHERIT-ON-NULL -- null falls through."
                  },
                  "disclosure_third_party": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "third-party disclosure copy at this scope (may contain {{agent_name}}). INHERIT-ON-NULL -- null falls through."
                  }
                },
                "required": [
                  "disclosure_style",
                  "formula_cc",
                  "formula_ach",
                  "formula_debit",
                  "description_cc",
                  "description_ach",
                  "description_debit",
                  "disclosure_surcharge",
                  "disclosure_authorization",
                  "capture_authorization",
                  "disclosure_first_party",
                  "disclosure_third_party"
                ]
              },
              "inherited_convenience_fees": {
                "type": "object",
                "description": "Resolved placeholder values from the next-broader tier (static default). Mirrors convenience_fees 1:1; used as el-input placeholders when the field is blank.",
                "properties": {
                  "disclosure_style": {
                    "type": "string",
                    "description": "Resolved disclosure style at the next-broader scope."
                  },
                  "formula_cc": {
                    "type": "string",
                    "description": "Resolved CC formula at the next-broader scope."
                  },
                  "formula_ach": {
                    "type": "string",
                    "description": "Resolved ACH formula at the next-broader scope."
                  },
                  "formula_debit": {
                    "type": "string",
                    "description": "Resolved debit formula at the next-broader scope."
                  },
                  "description_cc": {
                    "type": "string",
                    "description": "Resolved CC description at the next-broader scope."
                  },
                  "description_ach": {
                    "type": "string",
                    "description": "Resolved ACH description at the next-broader scope."
                  },
                  "description_debit": {
                    "type": "string",
                    "description": "Resolved debit description at the next-broader scope."
                  },
                  "disclosure_surcharge": {
                    "type": "string",
                    "description": "Resolved surcharge disclosure at the next-broader scope."
                  },
                  "disclosure_authorization": {
                    "type": "string",
                    "description": "Resolved authorization disclosure at the next-broader scope."
                  },
                  "capture_authorization": {
                    "type": "boolean",
                    "description": "Resolved capture flag at the next-broader scope."
                  },
                  "disclosure_first_party": {
                    "type": "string",
                    "description": "Resolved first-party disclosure at the next-broader scope."
                  },
                  "disclosure_third_party": {
                    "type": "string",
                    "description": "Resolved third-party disclosure at the next-broader scope."
                  }
                },
                "required": [
                  "disclosure_style",
                  "formula_cc",
                  "formula_ach",
                  "formula_debit",
                  "description_cc",
                  "description_ach",
                  "description_debit",
                  "disclosure_surcharge",
                  "disclosure_authorization",
                  "capture_authorization",
                  "disclosure_first_party",
                  "disclosure_third_party"
                ]
              }
            },
            "required": [
              "convenience_fees",
              "inherited_convenience_fees"
            ]
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-retrieve_contact": {
        "description": "Request payload for /api/v2/contacts/retrieve_contact.",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "username": {
                "type": "string"
              },
              "ssn_group": {
                "type": "string"
              },
              "dba": {
                "type": "string"
              },
              "phones": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/phone-def"
                }
              },
              "date_business_started": {
                "type": "string",
                "format": "date"
              },
              "company_id": {
                "type": "string",
                "format": "uuid"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "addresses": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/address-def"
                }
              },
              "driver_license_date": {
                "type": "string",
                "format": "date"
              },
              "primary_phone_id": {
                "type": "string",
                "format": "uuid"
              },
              "agency_inception_date": {
                "type": "string",
                "format": "date"
              },
              "external_system_reference": {
                "type": "string"
              },
              "last_synched_date": {
                "type": "string",
                "format": "date-time"
              },
              "source_update_date": {
                "type": "string",
                "format": "date-time"
              },
              "fein_tax_id": {
                "type": "string"
              },
              "primary_email_id": {
                "type": "string",
                "format": "uuid"
              },
              "date_of_birth": {
                "type": "string",
                "pattern": "^xx-xx-[0-9]{4}$"
              },
              "purchase_date": {
                "type": "string",
                "format": "date"
              },
              "type": {
                "type": "string",
                "enum": [
                  "individual",
                  "organization"
                ]
              },
              "added_by": {
                "type": "string"
              },
              "website": {
                "type": "string"
              },
              "hicn_number": {
                "type": "string"
              },
              "date_of_death": {
                "type": "string",
                "format": "date"
              },
              "ssn": {
                "type": "string"
              },
              "drivers_license": {
                "type": "string"
              },
              "agency_termination_date": {
                "type": "string",
                "format": "date"
              },
              "emails": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/email-def"
                }
              },
              "confirmation_email": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "gender": {
                "type": "string",
                "enum": [
                  "Male",
                  "Female",
                  "Other",
                  "Undisclosed"
                ]
              },
              "license_state": {
                "type": "string",
                "pattern": "^[A-Z]{2}$"
              },
              "legal_entity_type": {
                "type": "string"
              },
              "position": {
                "type": "string"
              },
              "primary_address_id": {
                "type": "string",
                "format": "uuid"
              },
              "roles": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    }
                  }
                }
              },
              "system_tags": {
                "type": "array",
                "description": "List of system tags associated with the contact.",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string"
                    },
                    "value": {
                      "type": "string"
                    },
                    "display_on_contact": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "value",
                    "display_on_contact"
                  ]
                }
              },
              "agency_group": {
                "type": "object",
                "items": {
                  "$ref": "#/components/schemas/agency_group-def"
                }
              },
              "agencies": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/agency-def"
                }
              },
              "agency_number": {
                "type": "string"
              },
              "agency_group_number": {
                "type": "string"
              },
              "commission_structure": {
                "type": "string"
              },
              "dot_number": {
                "type": "string"
              },
              "follow_agency_quoting_restriction": {
                "type": "boolean"
              },
              "motor_carrier_number": {
                "type": "string"
              },
              "pay_commission_to": {
                "type": "string"
              },
              "producer_number": {
                "type": "string"
              },
              "state_motor_carrier_number": {
                "type": "string"
              },
              "use_agency_group_commission_structure": {
                "type": "boolean"
              }
            },
            "required": [
              "id"
            ]
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-retrieve_convenience_fee": {
        "description": "Response schema for /api/v2/payments/retrieve_convenience_fee",
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "fee_amount": {
                "type": [
                  "number",
                  "null"
                ],
                "format": "decimal",
                "description": "The calculated fee amount or null if no fee applies"
              },
              "fee_message": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Fee description message resolved for the request's scope (the per-method description for the given account type). Null when none applies."
              },
              "disclosure": {
                "type": "string",
                "description": "Disclosure message combining authorization and surcharge messages based on fee amount"
              },
              "capture_authorization": {
                "type": "boolean",
                "description": "BC-16104: whether affirmative, provable authorization must be captured before storing this payment method for future use, resolved for the request's scope."
              },
              "disclosure_first_party": {
                "type": "string",
                "description": "BC-16104: first-party (policyholder self-service) authorization disclosure copy resolved for the request's scope. Empty string when none applies."
              },
              "disclosure_third_party": {
                "type": "string",
                "description": "third-party (agent attestation) authorization disclosure copy resolved for the request's scope, server-rendered. The {{agent_name}} merge tag is already substituted with the acting agent's raw display name -- plain text or stripped to empty when there is no agent context, so consumers must not perform a client-side merge. Empty string when none applies."
              }
            },
            "required": [
              "fee_amount",
              "fee_message",
              "disclosure",
              "capture_authorization",
              "disclosure_first_party",
              "disclosure_third_party"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-retrieve_convenience_fee_preview": {
        "description": "Response schema for /api/v2/payments/retrieve_convenience_fee_preview",
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "messages": {
                "type": "array",
                "items": {
                  "type": "string",
                  "description": "User-friendly message describing the price for grouped payment methods"
                },
                "description": "List of messages grouping payment methods by their total amounts"
              },
              "fees": {
                "type": "object",
                "description": "Dictionary mapping payment method codes to their fee amounts",
                "additionalProperties": {
                  "type": "string",
                  "pattern": "^\\d+(\\.\\d{1,2})?$",
                  "description": "Fee amount as a string for precision (e.g., '0.00', '3.00')"
                },
                "properties": {
                  "ach": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$",
                    "description": "Fee amount for ACH payment method"
                  },
                  "cc": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$",
                    "description": "Fee amount for credit card payment method"
                  },
                  "debit": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$",
                    "description": "Fee amount for debit card payment method"
                  }
                }
              }
            },
            "required": [
              "messages",
              "fees"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-retrieve_filter_options": {
        "description": "Response payload for /api/v2/tasks/retrieve_filter_options",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "statuses": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "Open",
                    "Completed"
                  ]
                },
                "description": "List of available task statuses"
              },
              "priorities": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "Low",
                    "Medium",
                    "High"
                  ]
                },
                "description": "List of available task priorities"
              },
              "task_types": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Task type ID"
                    },
                    "name": {
                      "type": "string",
                      "description": "Task type name"
                    }
                  },
                  "required": [
                    "id",
                    "name"
                  ]
                },
                "description": "List of available task types"
              },
              "assignees": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Contact ID of the assignee"
                    },
                    "name": {
                      "type": "string",
                      "description": "Name of the assignee"
                    }
                  },
                  "required": [
                    "id",
                    "name"
                  ]
                },
                "description": "List of available assignees from recent tasks"
              }
            },
            "required": [
              "statuses",
              "priorities",
              "task_types",
              "assignees"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Whether the request was successful"
          }
        },
        "required": [
          "data",
          "messages",
          "success"
        ]
      },
      "response-retrieve_full_quote": {
        "type": "object",
        "description": "Response Schema for retrieve_full_quote",
        "properties": {
          "data": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/full_quote-def"
              }
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-retrieve_my_permissions": {
        "description": "Response payload for /api/v2/auth/retrieve_my_permissions.",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ]
          },
          "data": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "permissions": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "engine_version": {
                    "type": "string"
                  },
                  "default_allow": {
                    "type": "boolean"
                  },
                  "role_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "role": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "role_selection_required": {
                    "type": "boolean"
                  },
                  "as_of": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "permissions",
                  "engine_version",
                  "default_allow",
                  "role_id",
                  "role",
                  "role_selection_required",
                  "as_of"
                ]
              },
              {
                "type": "array",
                "maxItems": 0,
                "items": {}
              }
            ]
          }
        },
        "required": [
          "success",
          "messages",
          "data"
        ]
      },
      "response-retrieve_my_roles": {
        "description": "Response payload for /api/v2/auth/retrieve_my_roles.",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ]
          },
          "data": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "roles": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "name"
                      ]
                    }
                  },
                  "selected_role": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "selection_required": {
                    "type": "boolean"
                  },
                  "selection_status": {
                    "type": "string",
                    "enum": [
                      "selected",
                      "selection_required",
                      "no_eligible_role"
                    ]
                  }
                },
                "required": [
                  "roles",
                  "selected_role",
                  "selection_required",
                  "selection_status"
                ]
              },
              {
                "type": "array",
                "maxItems": 0,
                "items": {}
              }
            ]
          }
        },
        "required": [
          "success",
          "messages",
          "data"
        ]
      },
      "response-retrieve_payment": {
        "type": "object",
        "description": "Response payload for /api/v2/payments/retrieve_payment",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "account_name": {
                "type": "string"
              },
              "authorization_state": {
                "type": "string"
              },
              "check_number": {
                "type": "integer"
              },
              "comm_pay_id": {
                "type": "string",
                "format": "uuid"
              },
              "commission_payment": {
                "type": "boolean"
              },
              "committer": {
                "type": "string"
              },
              "complete": {
                "type": "boolean"
              },
              "confirmation_number": {
                "type": "string"
              },
              "date_updated": {
                "type": "string",
                "format": "date-time"
              },
              "deleted": {
                "type": "boolean"
              },
              "distribution": {
                "type": "object",
                "description": "a JSON-encoded dict of how payment was applied to policies",
                "properties": {
                  "New_Business": {
                    "type": "object",
                    "properties": {
                      "applied": {
                        "type": "number"
                      },
                      "billDueYear": {
                        "type": "string"
                      },
                      "due": {
                        "type": "integer"
                      },
                      "termOptions": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "text": {
                              "type": "string"
                            },
                            "termId": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "text",
                            "termId"
                          ]
                        }
                      },
                      "reason": {
                        "type": "string"
                      },
                      "billDueMonth": {
                        "type": "string"
                      },
                      "action": {
                        "type": "string"
                      },
                      "billDueDay": {
                        "type": "string"
                      },
                      "termId": {
                        "type": "string"
                      }
                    },
                    "required": []
                  }
                },
                "required": [
                  "New_Business"
                ]
              },
              "entry_date_time": {
                "type": "string",
                "format": "date-time"
              },
              "file_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "invoice_number": {
                "type": "string"
              },
              "is_auto_payment": {
                "type": "boolean"
              },
              "masked_number": {
                "type": "string"
              },
              "nsf": {
                "type": "boolean"
              },
              "payment_instrument": {
                "type": "string"
              },
              "payment_interface": {
                "type": "string"
              },
              "payment_method_id": {
                "type": "string",
                "format": "uuid"
              },
              "payor_id": {
                "type": "string",
                "format": "uuid"
              },
              "printed_to_deposit": {
                "type": "boolean"
              },
              "remote_ip": {
                "type": "string"
              },
              "selected_on_deposit": {
                "type": "boolean"
              },
              "sweep": {
                "type": "boolean"
              },
              "sweep_check_number": {
                "type": "string"
              },
              "transaction_amount": {
                "type": "number"
              },
              "transaction_date_time": {
                "type": "string",
                "format": "date-time"
              },
              "transaction_type": {
                "type": "string"
              },
              "vendor_message": {
                "type": "string"
              },
              "vendor_stage": {
                "type": "string"
              },
              "vendor_stage_success": {
                "type": "boolean"
              },
              "voided": {
                "type": "boolean"
              },
              "invoices_paid": {
                "type": "array",
                "description": "List of invoices paid by this payment with detailed information",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Invoice ID"
                    },
                    "description": {
                      "type": "string",
                      "description": "Invoice type description (e.g., 'Initial Invoice', 'Installment Invoice')"
                    },
                    "invoice_amount": {
                      "type": "number",
                      "description": "Total invoice amount"
                    },
                    "amount_paid": {
                      "type": "number",
                      "description": "Amount paid on this invoice"
                    },
                    "amount_due": {
                      "type": "number",
                      "description": "Remaining amount due on this invoice"
                    },
                    "paid_in_full": {
                      "type": "boolean",
                      "description": "Whether the invoice is fully paid"
                    },
                    "revision_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Associated revision ID"
                    },
                    "revision_external_system_reference": {
                      "type": "string",
                      "description": "External system reference for the revision"
                    },
                    "due_date": {
                      "type": "string",
                      "format": "date",
                      "description": "Invoice due date"
                    }
                  },
                  "required": [
                    "id",
                    "description",
                    "invoice_amount",
                    "amount_paid",
                    "amount_due",
                    "paid_in_full",
                    "revision_id"
                  ]
                }
              }
            },
            "required": []
          },
          "success": {
            "type": "boolean"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-retrieve_payment_method_creation_details": {
        "description": "Response schema for /api/v2/payments/retrieve_payment_method_creation_details",
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "creation_type": {
                "type": "string",
                "enum": [
                  "BriteCore",
                  "Stripe",
                  "PaymentProcessorIntegrationPoint"
                ],
                "description": "The type of payment method creation flow to use."
              },
              "authentication_key": {
                "type": "string",
                "description": "Authentication key used for client-side payment integrations (e.g., Stripe public key)."
              },
              "client_secret": {
                "type": "string",
                "description": "Client secret used for client-side payment integrations (e.g., Stripe session client secret)."
              },
              "request_payment_method_entry_response": {
                "type": "object",
                "description": "Response from the payment processor integration point, if creation_type is 'PaymentProcessorIntegrationPoint'.",
                "properties": {
                  "redirect": {
                    "type": "object",
                    "properties": {
                      "url": {
                        "type": "string",
                        "format": "uri",
                        "description": "URL to redirect the user to for payment method creation."
                      }
                    }
                  }
                }
              },
              "server_timestamp": {
                "type": "string",
                "description": "Server timestamp in ISO 8601 format."
              }
            },
            "required": [
              "creation_type"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-retrieve_payment_methods": {
        "description": "Response schema for /api/v2/payments/retrieve_payment_methods",
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Payment method ID."
                },
                "account_description": {
                  "type": "string",
                  "description": "Description of the payment account."
                },
                "account_name": {
                  "type": "string",
                  "description": "Name of the payment account (e.g., bank name or card type)."
                },
                "account_type": {
                  "type": "string",
                  "description": "Type of account (e.g., checking, savings, credit card)."
                },
                "active": {
                  "type": "boolean",
                  "description": "Whether the payment method is active."
                },
                "address_city": {
                  "type": "string",
                  "description": "City for the billing address."
                },
                "address_line1": {
                  "type": "string",
                  "description": "First line of the billing address."
                },
                "address_line2": {
                  "type": "string",
                  "description": "Second line of the billing address."
                },
                "address_state": {
                  "type": "string",
                  "description": "State for the billing address."
                },
                "address_zip": {
                  "type": "string",
                  "description": "ZIP code for the billing address."
                },
                "address_country": {
                  "type": "string",
                  "description": "Country for the billing address."
                },
                "company_on_account": {
                  "type": "string",
                  "description": "Company name on the payment method account."
                },
                "contact_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "ID of the contact associated with this payment method."
                },
                "customer_profile_id": {
                  "type": "string",
                  "description": "Customer profile ID in the payment processor system."
                },
                "date_updated": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Date and time when the payment method was last updated."
                },
                "expire_date": {
                  "type": "string",
                  "format": "date",
                  "description": "Expiration date for the payment method (for credit cards)."
                },
                "masked_number": {
                  "type": "string",
                  "description": "Masked account number (e.g., last four digits of a credit card)."
                },
                "masked_routing": {
                  "type": "string",
                  "description": "Masked routing number (for ACH payments)."
                },
                "method": {
                  "type": "string",
                  "enum": [
                    "NoAuth",
                    "CC",
                    "ACH"
                  ],
                  "description": "Payment method type."
                },
                "name_on_account": {
                  "type": "string",
                  "description": "Name of the account holder."
                },
                "primary_account": {
                  "type": "boolean",
                  "description": "Whether this is the primary payment method for the contact."
                },
                "same_address": {
                  "type": "boolean",
                  "description": "Whether the payment method address is the same as the contact address."
                },
                "updated_on": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Date and time when the payment method was updated."
                },
                "vendor": {
                  "type": "string",
                  "description": "Payment vendor name."
                },
                "vendor_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "ID of the payment vendor."
                },
                "integration_instance_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "ID of the integration instance used for this payment method."
                },
                "vendor_payment_method_id": {
                  "type": "string",
                  "description": "Payment method ID in the vendor's system."
                }
              }
            }
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-retrieve_pending_payments_for_settlement": {
        "description": "Response schema for /api/v2/payments/retrieve_pending_payments_for_settlement",
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "format": "uuid",
              "description": "Unique identifier for the pending payment."
            },
            "reference_id": {
              "type": [
                "string",
                "null"
              ],
              "description": "External reference identifier for the payment."
            }
          },
          "required": [
            "id"
          ]
        }
      },
      "response-retrieve_permissions": {
        "title": "RetrievePermissionsResponse",
        "type": "object",
        "description": "Response schema for /api/v2/settings/retrieve_permissions",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "permissions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "section": {
                      "type": "string"
                    },
                    "read": {
                      "type": "boolean"
                    },
                    "write": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "section",
                    "read",
                    "write"
                  ]
                }
              }
            },
            "required": [
              "permissions"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-retrieve_policy_billing_information": {
        "type": "object",
        "description": "Response schema for api/v2/payments/retrieve_policy_billing_information, when billing only flag is False",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "permissions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "section": {
                      "type": "string"
                    },
                    "read": {
                      "type": "boolean"
                    },
                    "write": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "section",
                    "read",
                    "write"
                  ]
                }
              },
              "showUnbilledAmounts": {
                "type": "boolean"
              },
              "previousDue": {
                "type": "string",
                "description": "The previous due amount",
                "format": "#.00"
              },
              "currentDue": {
                "type": "string",
                "description": "The current due amount",
                "format": "#.00"
              },
              "cancelDate": {
                "type": "string",
                "format": "%m/%d/%Y"
              },
              "dueDate": {
                "type": "string",
                "format": "%m/%d/%Y"
              },
              "cancelDelayDate": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "%m/%d/%Y"
              },
              "canceledOnDate": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "%m/%d/%Y"
              },
              "paymentToken": {
                "type": "string",
                "description": "sha256 hashed policy/group number, salted by the policy/group's uuid"
              },
              "policyDetails": {
                "type": "object",
                "properties": {
                  "claims": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "claimId": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "claimNumber": {
                          "type": "string"
                        },
                        "policyNumber": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string"
                        },
                        "lossDate": {
                          "type": "string",
                          "format": "%m/%d/%Y"
                        },
                        "lossesPaid": {
                          "type": "string",
                          "format": "#.00"
                        },
                        "insuredClaimant": {
                          "type": "string",
                          "description": "The name of the first insured claimant"
                        }
                      }
                    }
                  },
                  "mortgagees": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "id": {
                          "type": "string"
                        },
                        "number": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "policyStatus": {
                    "type": "string",
                    "enum": [
                      "Active",
                      "Submitted",
                      "Unsubmitted",
                      "Canceled",
                      "Canceled, Non-Payment of Premium",
                      "Cancellation Pending, Non-Payment of Premium",
                      "Expired",
                      "Rejected",
                      "Pending E-Signature"
                    ]
                  },
                  "insureds": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "insured": {
                          "type": "string",
                          "description": "The name of the insured"
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "insured",
                        "id"
                      ]
                    }
                  },
                  "nonPays": {
                    "type": "integer",
                    "description": "The number of non-pays transactions"
                  },
                  "totalNonPays": {
                    "type": "integer",
                    "description": "The number of non-pays transactions, including legacy transactions"
                  },
                  "agent": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "id": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "name",
                      "id"
                    ]
                  },
                  "agency": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "id": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "name",
                      "id"
                    ]
                  },
                  "policyNumber": {
                    "type": "string"
                  }
                },
                "required": [
                  "claims",
                  "mortgagees",
                  "policyStatus",
                  "insureds",
                  "nonPays",
                  "totalNonPays",
                  "agent",
                  "agency",
                  "policyNumber"
                ]
              },
              "premiumOverview": {
                "type": "object",
                "properties": {
                  "dateRange": {
                    "type": "string"
                  },
                  "revisionWrittenPremium": {
                    "type": "string"
                  },
                  "premiumBilled": {
                    "type": "string"
                  },
                  "customFeesBilled": {
                    "type": "string"
                  },
                  "debitSystemFee": {
                    "type": "string"
                  },
                  "paymentAmount": {
                    "type": "string"
                  },
                  "commission": {
                    "type": "string"
                  },
                  "payoffAmount": {
                    "type": "string"
                  },
                  "actualAmount": {
                    "type": "number"
                  },
                  "showCommission": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "dateRange",
                  "revisionWrittenPremium",
                  "premiumBilled",
                  "customFeesBilled",
                  "debitSystemFee",
                  "paymentAmount",
                  "commission",
                  "payoffAmount",
                  "actualAmount",
                  "showCommission"
                ]
              },
              "billingSetup": {
                "type": "object",
                "properties": {
                  "sendInitialInvoice": {
                    "type": "boolean"
                  },
                  "billWhoms": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "billWhom": {
                          "type": "string"
                        },
                        "id": {
                          "type": "string"
                        },
                        "hideSweep": {
                          "type": "boolean"
                        },
                        "billingSchedules": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "billingSchedule": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "automaticPaymentReminder": {
                                "type": "boolean"
                              },
                              "showInPublicGateway": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "billingSchedule",
                              "id",
                              "automaticPaymentReminder",
                              "showInPublicGateway"
                            ]
                          }
                        },
                        "billHows": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "billHow": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "billHow",
                              "id"
                            ]
                          }
                        },
                        "paymentMethods": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "paymentMethod": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "paymentMethod",
                              "id"
                            ]
                          }
                        }
                      },
                      "required": [
                        "billWhom",
                        "id",
                        "hideSweep",
                        "billingSchedules",
                        "billHows",
                        "paymentMethods"
                      ]
                    }
                  },
                  "billingSchedule": {
                    "type": "string"
                  },
                  "whenWithdraw": {
                    "type": "integer"
                  },
                  "initialSelectedValues": {
                    "type": "object",
                    "properties": {
                      "billingSchedules": {
                        "type": "string"
                      },
                      "billWhoms": {
                        "type": "string"
                      },
                      "billHows": {
                        "type": "string"
                      },
                      "paymentMethods": {
                        "type": "string"
                      },
                      "whenWithdraw": {
                        "type": "integer"
                      },
                      "manualReason": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "billingSchedules",
                      "billWhoms",
                      "billHows",
                      "paymentMethods",
                      "whenWithdraw",
                      "manualReason"
                    ]
                  },
                  "recurringSelectedValues": {
                    "type": "object",
                    "properties": {
                      "billingSchedules": {
                        "type": "string"
                      },
                      "billWhoms": {
                        "type": "string"
                      },
                      "billHows": {
                        "type": "string"
                      },
                      "paymentMethods": {
                        "type": "string"
                      },
                      "whenWithdraw": {
                        "type": "integer"
                      }
                    },
                    "required": [
                      "billingSchedules",
                      "billWhoms",
                      "billHows",
                      "paymentMethods",
                      "whenWithdraw"
                    ]
                  },
                  "scheduleUsedInRating": {
                    "type": "boolean"
                  },
                  "withdrawWhenConfig": {
                    "type": "object",
                    "properties": {
                      "options": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "label": {
                              "type": "string"
                            },
                            "value": {
                              "type": "integer"
                            }
                          },
                          "required": [
                            "label",
                            "value"
                          ]
                        }
                      },
                      "default": {
                        "type": "integer"
                      }
                    },
                    "required": [
                      "options",
                      "default"
                    ]
                  }
                },
                "required": [
                  "sendInitialInvoice",
                  "billWhoms",
                  "billingSchedule",
                  "whenWithdraw",
                  "initialSelectedValues",
                  "recurringSelectedValues",
                  "scheduleUsedInRating"
                ]
              },
              "poorPaymentHistory": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Value of the tag 'Poor Payment History' from the policy"
              },
              "accountHistory": {
                "type": "object",
                "properties": {
                  "activePage": {
                    "type": "integer"
                  },
                  "maxPages": {
                    "type": "integer"
                  },
                  "records": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "date": {
                          "type": "string",
                          "format": "%m/%d/%Y"
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "enum": [
                            "Revision",
                            "Invoice",
                            "Payment",
                            "Non Pay",
                            "Reinstatement",
                            "Adjustment",
                            "Return Premium",
                            "NSF",
                            "Waive",
                            "Return Premium Transfer",
                            "Credit Transfer",
                            "Debit Transfer",
                            "Exported Return Premium",
                            "Fee"
                          ]
                        },
                        "fileKey": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "amount": {
                          "type": "number"
                        },
                        "balance": {
                          "type": "string",
                          "format": "#.00"
                        },
                        "summary": {
                          "type": "string"
                        },
                        "icon": {
                          "type": "string"
                        },
                        "credit": {
                          "type": [
                            "string",
                            "number"
                          ]
                        },
                        "debit": {
                          "type": [
                            "string",
                            "number"
                          ]
                        },
                        "data": {
                          "type": "object",
                          "properties": {
                            "details": {
                              "type": "object",
                              "properties": {
                                "description": {
                                  "type": "string"
                                },
                                "policyStatus": {
                                  "type": "string"
                                },
                                "billDate": {
                                  "type": "string",
                                  "description": "Just included when Invoice"
                                },
                                "dueDate": {
                                  "type": "string",
                                  "description": "Just included when Invoice"
                                },
                                "paidInFull": {
                                  "type": "boolean",
                                  "description": "Just included when Invoice"
                                },
                                "generatedBy": {
                                  "type": "string"
                                },
                                "dirty": {
                                  "type": "boolean"
                                },
                                "showWaive": {
                                  "type": "boolean"
                                },
                                "showDelete": {
                                  "type": "boolean"
                                },
                                "showEditAndReprint": {
                                  "type": "boolean"
                                },
                                "cancelDate": {
                                  "type": "string",
                                  "description": "Just included when Invoice"
                                },
                                "paymentAmount": {
                                  "type": "string",
                                  "description": "Just included when is a Payment"
                                },
                                "payor": {
                                  "type": "string",
                                  "description": "Just included when is a Payment"
                                },
                                "paymentMethod": {
                                  "type": "string",
                                  "description": "Just included when is a Payment",
                                  "example": "MasterCard ...2222"
                                },
                                "paymentStatus": {
                                  "type": "string",
                                  "description": "Just included when is a Payment"
                                },
                                "nsf": {
                                  "type": "boolean",
                                  "description": "Just included when is a Payment"
                                },
                                "nsfFee": {
                                  "type": "string",
                                  "description": "Just included when is a Payment"
                                },
                                "paymentId": {
                                  "type": "string",
                                  "description": "Just included when is a Payment"
                                },
                                "confirmationNumber": {
                                  "type": "string",
                                  "description": "Just included when is a Payment"
                                },
                                "sweepCheckNumber": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "Just included when is a Payment"
                                },
                                "showVoid": {
                                  "type": "boolean",
                                  "description": "Just included when is a Payment"
                                },
                                "paymentInterface": {
                                  "type": "string",
                                  "description": "Just included when is a Payment",
                                  "example": "Credit Card"
                                }
                              },
                              "required": [
                                "description",
                                "generatedBy",
                                "dirty",
                                "showWaive",
                                "showDelete",
                                "showEditAndReprint"
                              ]
                            },
                            "amount": {
                              "type": "number"
                            },
                            "schedule": {
                              "type": "object",
                              "properties": {
                                "Premium": {
                                  "type": "number"
                                },
                                "Custom Fees": {
                                  "type": "number"
                                },
                                "Installment Fee": {
                                  "type": "number"
                                }
                              },
                              "required": [
                                "Premium",
                                "Custom Fees",
                                "Installment Fee"
                              ]
                            }
                          },
                          "required": [
                            "details",
                            "amount"
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "date",
                        "type",
                        "fileKey",
                        "amount",
                        "balance",
                        "summary",
                        "icon",
                        "credit",
                        "debit",
                        "data"
                      ]
                    }
                  }
                },
                "required": [
                  "activePage",
                  "maxPages",
                  "records"
                ]
              },
              "policyTerms": {
                "type": "object",
                "properties": {
                  "current": {
                    "type": "object",
                    "properties": {
                      "effectiveDate": {
                        "type": "string",
                        "format": "%m/%d/%Y"
                      },
                      "id": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "required": [
                      "effectiveDate",
                      "id"
                    ]
                  },
                  "previous": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "effectiveDate": {
                        "type": "string",
                        "format": "%m/%d/%Y"
                      },
                      "id": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "required": [
                      "effectiveDate",
                      "id"
                    ]
                  },
                  "next": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "effectiveDate": {
                        "type": "string",
                        "format": "%m/%d/%Y"
                      },
                      "id": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "required": [
                      "effectiveDate",
                      "id"
                    ]
                  }
                }
              },
              "preferredDayOfMonthDue": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "restrictBillingSetup": {
                "type": "boolean"
              }
            },
            "required": [
              "permissions",
              "showUnbilledAmounts",
              "previousDue",
              "currentDue",
              "cancelDate",
              "dueDate",
              "paymentToken"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-retrieve_policy_change_logs": {
        "type": "object",
        "description": "Response schema for /api/v2/policies/retrieve_policy_change_logs",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "data": {
            "type": "object",
            "description": "Contains policy change log info as well as revision timestamps",
            "properties": {
              "policy_change_logs": {
                "type": "array",
                "description": "List of policy change log entries",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Policy change log entry ID"
                    },
                    "date_stamp": {
                      "type": "string",
                      "description": "The date the change was made (in CST timezone)"
                    },
                    "date_cursor": {
                      "type": "string",
                      "format": "date",
                      "description": "The calculated date in effect upon revision commit"
                    },
                    "policy_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Policy ID"
                    },
                    "property_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid",
                      "description": "Property ID, if applicable"
                    },
                    "revision_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Revision ID"
                    },
                    "policy_term_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Policy term ID"
                    },
                    "contact_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid",
                      "description": "Contact ID, if applicable"
                    },
                    "transaction": {
                      "type": "string",
                      "description": "Transaction type"
                    },
                    "revision_create_date": {
                      "type": "string",
                      "description": "Revision creation date and time"
                    },
                    "revision_revision_date": {
                      "type": "string",
                      "format": "date",
                      "description": "Revision date"
                    },
                    "revision_commit_date_time": {
                      "type": "string",
                      "description": "Date and time when the revision was committed"
                    }
                  },
                  "required": [
                    "id",
                    "date_stamp",
                    "date_cursor",
                    "policy_id",
                    "revision_id",
                    "policy_term_id",
                    "transaction",
                    "revision_create_date",
                    "revision_revision_date",
                    "revision_commit_date_time"
                  ]
                }
              }
            },
            "required": [
              "policy_change_logs"
            ]
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "success",
          "data",
          "messages"
        ]
      },
      "response-retrieve_policy_snapshot": {
        "type": "object",
        "description": "Response for the retrieve_policy_snapshot API endpoint",
        "properties": {
          "data": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/full_quote-def"
              }
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-retrieve_policy_type_claims_tabs_visibility": {
        "title": "RetrievePolicyTypeClaimsTabsVisibilityResponse",
        "type": "object",
        "description": "Response schema for /api/v2/lines/retrieve_policy_type_claims_tabs_visibility",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code_value_type": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "flagged": {
                  "type": "boolean"
                }
              },
              "required": [
                "section",
                "read",
                "write"
              ]
            }
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-retrieve_policy_types": {
        "type": "object",
        "description": "Response Schema for /api/v2/policy_types/retrieve_policy_types",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "The ID of the policy type"
                },
                "name": {
                  "type": "string",
                  "description": "The name of the policy type"
                },
                "effective_date_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Effective Date ID. When date_cursor is used, this may be an earlier effective date if the policy type was not redefined at a later one (gaps, BC-14373)"
                },
                "effective_date": {
                  "type": "string",
                  "format": "date",
                  "description": "Effective Date"
                },
                "renewal_effective_date": {
                  "type": "string",
                  "format": "date",
                  "description": "Renewal effective date for this policy type"
                },
                "expiration_date": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Expiration date for this policy type"
                },
                "line_name": {
                  "type": "string",
                  "description": "Line Name"
                },
                "line_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Line ID"
                },
                "business_location_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Location ID"
                },
                "business_location_name": {
                  "type": "string",
                  "description": "Location Name"
                },
                "business_location_abbreviation": {
                  "type": "string",
                  "description": "Business Location Abbreviation"
                },
                "business_location_country_name": {
                  "type": "string",
                  "description": "Business Location Country Name"
                },
                "allow_multiple_risks": {
                  "type": "boolean",
                  "description": "Whether this policy type allows multiple risks"
                },
                "maximum_risk_count": {
                  "type": "integer",
                  "description": "Maximum Risk Count"
                },
                "external_system_reference": {
                  "type": "string",
                  "description": "External System Reference of the policy type"
                },
                "open_to_quoting": {
                  "type": "boolean",
                  "description": "Whether this policy type is open to quoting"
                },
                "type": {
                  "type": "string",
                  "description": "The policy type's type"
                }
              }
            }
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-retrieve_queue_capabilities": {
        "description": "Response payload for /api/v2/tasks/retrieve_queue_capabilities",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "capabilities": {
                "type": "object",
                "description": "Every known affordance is always present, so a missing key signals a bug rather than a denial. Each is resolved from a permission path evaluated by the standard engine, so sites control them in Settings > System Wide Permissions and per-contact permission overrides are honoured.",
                "properties": {
                  "select_lifecycle_bucket": {
                    "type": "boolean",
                    "description": "May use the Active / On Hold / Archived lifecycle bucket selector. Granted by read access to britecore/underwriting/admin."
                  },
                  "view_team_workload": {
                    "type": "boolean",
                    "description": "May use the Team Workload view (retrieve_team_workload). Granted by read access to britecore/underwriting/admin. Unlike the others this is enforced server-side as access control, because the response exposes other users' workload."
                  },
                  "view_triage": {
                    "type": "boolean",
                    "description": "May use the Triage view. Mirrors read access to britecore/permissiveTasksAccess, which retrieve_tasks enforces for that view."
                  },
                  "edit_tasks": {
                    "type": "boolean",
                    "description": "May create and modify tasks. Mirrors write access to britecore/underwriting."
                  }
                },
                "required": [
                  "select_lifecycle_bucket",
                  "view_team_workload",
                  "view_triage",
                  "edit_tasks"
                ]
              },
              "buckets": {
                "type": "array",
                "description": "The lifecycle buckets in display order, each with the task statuses it contains. Shipped here so clients hold no copy of the status-to-bucket mapping: a status added to a bucket, or a new bucket, needs no frontend change. The buckets partition the statuses.",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Bucket id, as passed to filters.bucket on retrieve_tasks and keyed in bucket_counts."
                    },
                    "label": {
                      "type": "string",
                      "description": "Display label for the bucket tab."
                    },
                    "statuses": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Task statuses this bucket contains."
                    }
                  },
                  "required": [
                    "id",
                    "label",
                    "statuses"
                  ]
                }
              }
            },
            "required": [
              "capabilities",
              "buckets"
            ]
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-retrieve_rating_table": {
        "title": "RetrieveRatingTableResponse",
        "type": "object",
        "description": "Response schema for /api/v2/lines/retrieve_rating_table",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "Rating Table ID"
              },
              "date_added": {
                "type": "string",
                "format": "date-time",
                "description": "Date and time the rating table was created"
              },
              "added_by": {
                "type": "string",
                "format": "uuid",
                "description": "User ID"
              },
              "added_by_contact": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "User ID"
                  },
                  "name": {
                    "type": "string",
                    "description": "User name"
                  }
                }
              },
              "effective_date": {
                "type": "string",
                "format": "date-time",
                "description": "Date the rating table becomes effective"
              },
              "expiration_date": {
                "type": "string",
                "format": "date-time",
                "description": "Date the rating table expires"
              },
              "file": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "File ID"
                  },
                  "title": {
                    "type": "string",
                    "description": "File title"
                  }
                }
              },
              "ingestion_job": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Ingestion Job ID"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "uploaded",
                      "pending",
                      "processing",
                      "success",
                      "warning",
                      "error"
                    ],
                    "description": "Status of the rating table"
                  },
                  "error_message": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "description": "Error message if the ingestion job failed"
                  }
                }
              },
              "state": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "State ID"
                  },
                  "name": {
                    "type": "string",
                    "description": "State name"
                  }
                }
              },
              "rating_grid_factors": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Rating Factor ID"
                    },
                    "latitude": {
                      "type": "string",
                      "format": "number",
                      "description": "Rating Factor Point latitude"
                    },
                    "longitude": {
                      "type": "string",
                      "format": "number",
                      "description": "Rating Factor Point longitude"
                    },
                    "point_group": {
                      "type": "string",
                      "description": "Rating Factor Point Group"
                    },
                    "rating_factors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "Rating Factor name"
                          },
                          "value": {
                            "type": "string",
                            "description": "Rating Factor value"
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "required": [
              "id",
              "date_added",
              "added_by",
              "effective_date",
              "expiration_date",
              "file",
              "ingestion_job",
              "state",
              "rating_grid_factors"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-retrieve_recovery_statuses": {
        "type": "object",
        "description": "Response schema for /api/v2/deliverables/retrieve_recovery_statuses",
        "properties": {
          "data": {
            "type": "array",
            "description": "Status of each requested recovery job.",
            "items": {
              "type": "object",
              "properties": {
                "job_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "BackgroundJob ID."
                },
                "candidate_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Candidate identifier associated with the job."
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "detected",
                    "original_job_found",
                    "queued",
                    "running",
                    "succeeded",
                    "failed",
                    "skipped"
                  ],
                  "description": "Current status of the recovery job."
                },
                "replacement_file_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid",
                  "description": "ID of the newly generated replacement File, if available."
                },
                "message": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Human-readable status message."
                }
              },
              "required": [
                "job_id",
                "status"
              ]
            }
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful."
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request."
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Base error message(s)."
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-retrieve_revision_billing_schedule_context": {
        "type": "object",
        "description": "Response payload for POST /api/v2/policies/retrieve_revision_billing_schedule_context. data carries the Builder's Change Billing Schedule dialog gating signals for the policy's current term (BC-22886). On a missing policy_id, success is false and messages carries the detail.",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Any messages or errors related to the request."
          },
          "data": {
            "type": "object",
            "description": "Gating signals for the policy's current term. Defaults (false / empty) when the policy has no current term (new business).",
            "properties": {
              "hasPriorCommittedRevision": {
                "type": "boolean",
                "description": "True when the current term has a committed revision (an endorsement), so the preserve/regenerate dialog should open (FR-016). False for new business / a manual renewal term with no committed revision, where the dialog is suppressed."
              },
              "inForceBillingScheduleId": {
                "type": "string",
                "description": "ID of the schedule currently in force on the term (PolicyTerm.bill_sched_id), or '' if unset. Used to disable Regenerate when the new selection equals the in-force schedule (FR-008)."
              }
            },
            "required": [
              "hasPriorCommittedRevision",
              "inForceBillingScheduleId"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "True when the signals were computed successfully."
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-retrieve_risk_details": {
        "description": "Response payload for /api/v2/policies/retrieve_risk_details.",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "address_accuracy": {
                "type": "string",
                "enum": [
                  "poor",
                  "fair",
                  "great"
                ]
              },
              "address_city": {
                "type": "string"
              },
              "address_line1": {
                "type": "string"
              },
              "address_line2": {
                "type": "string"
              },
              "address_state": {
                "type": "string"
              },
              "address_zip": {
                "type": "string"
              },
              "county": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "code": {
                    "type": "string"
                  },
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              },
              "county_specification": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "code": {
                    "type": "string"
                  },
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              },
              "copy_address": {
                "type": "boolean"
              },
              "date_added": {
                "type": "string",
                "format": "date-time"
              },
              "fire_district": {
                "type": "string"
              },
              "fire_district_distance": {
                "type": "number"
              },
              "flag": {
                "type": "string",
                "enum": [
                  "white",
                  "orange"
                ]
              },
              "gross_area": {
                "type": "string"
              },
              "hydrant_distance": {
                "type": "integer"
              },
              "inspection_requested_date": {
                "type": "string",
                "format": "date"
              },
              "latitude": {
                "type": "number"
              },
              "longitude": {
                "type": "number"
              },
              "loss_history_report_content": {
                "type": "string"
              },
              "loss_history_report_number": {
                "type": "string"
              },
              "loss_history": {
                "type": "array",
                "items": {
                  "type": "object"
                },
                "description": "Processed loss history claims array"
              },
              "loss_history_date": {
                "type": "string",
                "description": "Date loss history was last retrieved (legacy attribute name, same as loss_history_date_pulled)"
              },
              "loss_history_date_pulled": {
                "type": "string",
                "description": "Date loss history was last retrieved"
              },
              "loss_history_report_num": {
                "type": "string",
                "description": "Vendor report number"
              },
              "loss_disputes": {
                "type": "array",
                "items": {
                  "type": "object"
                },
                "description": "List of loss dispute objects"
              },
              "name": {
                "type": "string"
              },
              "next_inspection_date": {
                "type": "string",
                "format": "date"
              },
              "property_val": {
                "type": "string"
              },
              "iso_pc_data": {
                "type": "object"
              },
              "verisk_passport_data": {
                "type": "object"
              },
              "replace_contents": {
                "type": "string"
              },
              "replace_loss": {
                "type": "string"
              },
              "replace_other": {
                "type": "string"
              },
              "approved_limits": {
                "type": "object"
              },
              "revision_id": {
                "type": "string",
                "format": "uuid"
              },
              "stories": {
                "type": "string"
              },
              "type": {
                "type": "string"
              },
              "year_built": {
                "type": "string"
              },
              "items": {
                "type": "array",
                "items": {
                  "type": "object"
                }
              },
              "sub_lines": {
                "type": "array",
                "items": {
                  "type": "object"
                }
              },
              "question_groups": {
                "type": "object"
              },
              "mortgagees": {
                "type": "array",
                "items": {
                  "type": "object"
                }
              },
              "tenants": {
                "type": "array",
                "items": {
                  "type": "object"
                }
              },
              "inspectors": {
                "type": "array",
                "items": {
                  "type": "object"
                }
              },
              "photos": {
                "type": "array",
                "items": {
                  "type": "object"
                }
              },
              "disclosures": {
                "type": "array",
                "items": {
                  "type": "object"
                }
              },
              "britecore_claims": {
                "type": "array",
                "items": {
                  "type": "object"
                }
              },
              "flood_zone_code": {
                "type": "string"
              },
              "distance_to_coast": {
                "type": "string"
              },
              "census_block_group": {
                "type": "string"
              },
              "is_waterway": {
                "type": "boolean"
              },
              "munich_re_inland_flood": {
                "type": "object"
              },
              "commercial_munich_re_inland_flood": {
                "type": "object"
              },
              "e2value_xml": {
                "type": "string"
              },
              "iso_prefill_data": {
                "type": "object"
              },
              "wind_speed": {
                "type": "string"
              },
              "wind_borne_debris": {
                "type": "string"
              },
              "wind_terrain": {
                "type": "string"
              },
              "high_velocity_zone": {
                "type": "string"
              },
              "distance_to_actual_coast": {
                "type": "string"
              },
              "protection_rating": {
                "type": "string"
              },
              "ranked_counties": {
                "type": [
                  "array",
                  "null"
                ],
                "description": "Raw provider output as stored on the property: county NAMES and confidences in the provider's own rank order, NOT offerable as-is. `null` means no provider has ever resolved this address; `[]` means one ran and named nothing. The client needs that distinction -- an empty `ranked_county_options` cannot express it, since the options are computed FROM this value and are empty in both cases. Emitted by `to_dict()` since BC-23924 added the column; declared here because this object is `additionalProperties: false`, so an undeclared key makes a successful response fail its own contract.",
                "items": {
                  "type": "object",
                  "properties": {
                    "county": {
                      "type": "string"
                    },
                    "confidence": {
                      "type": [
                        "number",
                        "null"
                      ]
                    }
                  }
                }
              },
              "ranked_county_options": {
                "type": "array",
                "description": "Provider-ranked county candidates resolved for the dropdown: matched to BriteCore county ids, with the zip's geography overrides prepended and its suppressed counties removed. Empty when the property has never been resolved through a geolocation provider.",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string"
                    },
                    "confidence": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "minimum": 0,
                      "maximum": 1,
                      "description": "The provider's confidence, 0-1. Null when the provider gave none, and always null for an override it did not rank."
                    },
                    "is_override": {
                      "type": "boolean",
                      "description": "True when the zip's override configuration supplied this county and the provider did not rank it. Mutually exclusive with a non-null confidence."
                    }
                  }
                }
              }
            },
            "required": [
              "id"
            ]
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-retrieve_saved_method_authorization": {
        "type": "object",
        "description": "Response payload for /api/v2/payments/retrieve_saved_method_authorization. The endpoint answers with one of three envelopes: success, a standard error, or a permission refusal - modelled separately so a validator does not reject a normal failure.",
        "oneOf": [
          {
            "title": "Success",
            "type": "object",
            "required": [
              "data",
              "success",
              "messages"
            ],
            "properties": {
              "success": {
                "const": true
              },
              "messages": {
                "oneOf": [
                  {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "_base_": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    },
                    "additionalProperties": {
                      "oneOf": [
                        {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        {
                          "type": "string"
                        }
                      ]
                    }
                  }
                ],
                "description": "Any messages related to the request."
              },
              "data": {
                "type": "object",
                "required": [
                  "capture_authorization",
                  "disclosure_first_party",
                  "disclosure_third_party"
                ],
                "properties": {
                  "capture_authorization": {
                    "type": "boolean",
                    "description": "True when provable consent must be captured before a saved payment method is stored. Resolved carrier-wide (Global scope). False when no payment processor is connected."
                  },
                  "disclosure_first_party": {
                    "type": "string",
                    "description": "Copy shown to the policyholder authorizing their own saved method. Empty when nothing is configured, or when no payment processor is connected."
                  },
                  "disclosure_third_party": {
                    "type": "string",
                    "description": "Copy an agent attests to on the policyholder's behalf. The {{agent_name}} merge tag is rendered server-side from the authenticated caller, so no consumer ever receives the literal tag."
                  }
                }
              }
            }
          },
          {
            "title": "Standard error",
            "description": "Validation or unexpected failure: @api_request maps BCValidationError through standard_error, which returns data as an empty list.",
            "type": "object",
            "required": [
              "success",
              "messages"
            ],
            "properties": {
              "success": {
                "const": false
              },
              "data": {
                "type": "array",
                "items": {},
                "maxItems": 0,
                "description": "Always an empty list on the error envelope (standard_error)."
              },
              "messages": {
                "oneOf": [
                  {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "_base_": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    },
                    "additionalProperties": {
                      "oneOf": [
                        {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        {
                          "type": "string"
                        }
                      ]
                    }
                  }
                ],
                "description": "Human-readable messages or per-field errors."
              }
            }
          },
          {
            "title": "Permission denied",
            "description": "Refused before the endpoint body ran - by the permission gate, or by @protect_contact_records on a protected contact. Carries neither data nor messages.",
            "type": "object",
            "required": [
              "success",
              "permissionDenied"
            ],
            "properties": {
              "success": {
                "const": false
              },
              "permissionDenied": {
                "const": true
              }
            }
          }
        ]
      },
      "response-retrieve_settings": {
        "description": "Response Schema for /api/v2/settings/retrieve_settings",
        "oneOf": [
          {
            "type": "object",
            "description": "Standard success/failure envelope.",
            "properties": {
              "messages": {
                "oneOf": [
                  {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Any messages or errors related to the request"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "_base_": {
                        "type": "array",
                        "description": "Base error message(s)",
                        "items": {
                          "type": "string"
                        }
                      }
                    },
                    "additionalProperties": {
                      "oneOf": [
                        {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "description": "Any messages or errors related to the request"
                  }
                ]
              },
              "data": {
                "type": "array",
                "description": "Advanced Settings grouped by section.",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "Section name."
                    },
                    "settings": {
                      "type": "array",
                      "description": "The settings that belong to this section.",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "description": "Setting row id (UUID)."
                          },
                          "section": {
                            "type": "string",
                            "description": "Section the setting belongs to."
                          },
                          "option": {
                            "type": "string",
                            "description": "Setting key within the section."
                          },
                          "value": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Stored value (always serialized as a string; null when the column is NULL)."
                          },
                          "value_type": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Advisory value type used for UI rendering/validation (e.g. bool, int, json, options)."
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Human-readable description of the setting."
                          },
                          "options": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Allowed choices, parsed from the stored CSV; empty unless value_type is 'options'."
                          }
                        }
                      }
                    }
                  }
                }
              },
              "success": {
                "type": "boolean"
              }
            },
            "required": [
              "messages",
              "data",
              "success"
            ]
          },
          {
            "type": "object",
            "description": "Permission-denied envelope, returned by @api_request's BCApiRequestPermissionDeniedError handler when the caller lacks britecore/settings/advancedSettings 'r'. Distinct from the standard envelope -- it has neither messages nor data.",
            "properties": {
              "permissionDenied": {
                "type": "boolean",
                "const": true
              },
              "success": {
                "type": "boolean",
                "const": false
              }
            },
            "required": [
              "permissionDenied",
              "success"
            ]
          }
        ]
      },
      "response-retrieve_subjectivity": {
        "type": "object",
        "description": "Response schema for /api/v2/subjectivities/retrieve_subjectivity",
        "properties": {
          "data": {
            "type": "object",
            "description": "Details of the retrieved subjectivity",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "ID of the subjectivity"
              },
              "revision_id": {
                "type": "string",
                "format": "uuid",
                "description": "ID of the revision"
              },
              "subjectivity_definition_id": {
                "type": "string",
                "format": "uuid",
                "description": "ID of the subjectivity definition"
              },
              "status": {
                "type": "string",
                "enum": [
                  "Satisfied",
                  "Not Satisfied",
                  "Waived",
                  "Expired",
                  "Canceled"
                ],
                "description": "Status of the subjectivity"
              },
              "due_date": {
                "type": "string",
                "format": "date-time",
                "description": "Due date for this subjectivity to be met before"
              },
              "assignee": {
                "type": "string",
                "format": "uuid",
                "description": "ID of the assignee"
              },
              "created_by": {
                "type": "string",
                "format": "uuid",
                "description": "ID of the user who created this subjectivity"
              },
              "updated_by": {
                "type": "string",
                "format": "uuid",
                "description": "ID of the user who last updated this subjectivity"
              },
              "date_created": {
                "type": "string",
                "format": "date-time",
                "description": "Date and time when this subjectivity was created"
              },
              "date_updated": {
                "type": "string",
                "format": "date-time",
                "description": "Date and time when this subjectivity was last updated"
              },
              "statement": {
                "type": "string",
                "description": "Statement for the subjectivity"
              },
              "description": {
                "type": "string",
                "description": "Description of the subjectivity"
              }
            },
            "required": [
              "id",
              "revision_id",
              "subjectivity_definition_id",
              "status",
              "due_date",
              "assignee",
              "created_by",
              "date_created"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-retrieve_subjectivity_definition": {
        "type": "object",
        "description": "Response schema for /api/v2/subjectivities/retrieve_subjectivity_definition",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "Subjectivity definition ID"
              },
              "name": {
                "type": "string",
                "description": "Name of the subjectivity definition"
              },
              "description": {
                "type": "string",
                "description": "Description of the subjectivity definition"
              },
              "policy_type_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "ID of the associated policy type"
              },
              "policy_type_name": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Name of the associated policy type"
              },
              "mandatory": {
                "type": "boolean",
                "description": "true for mandatory and false for non-mandatory"
              },
              "active": {
                "type": "boolean",
                "description": "true for active and false for inactive"
              },
              "due_within_days": {
                "type": "integer",
                "description": "Days the subjectivity definition is due within"
              },
              "due_date_type": {
                "type": "string",
                "enum": [
                  "Pre Bind",
                  "Post Bind",
                  "Post Issue"
                ],
                "description": "Type of due date (e.g., 'Post Bind' or 'Post Issue')"
              },
              "created_by": {
                "type": "string",
                "format": "uuid",
                "description": "ID of the user who created the subjectivity definition"
              },
              "updated_by": {
                "type": "string",
                "format": "uuid",
                "description": "ID of the user who last updated the subjectivity definition"
              },
              "date_created": {
                "type": "string",
                "format": "date-time",
                "description": "Date and time when the subjectivity definition was created"
              },
              "date_updated": {
                "type": "string",
                "format": "date-time",
                "description": "Date and time when the subjectivity definition was last updated"
              }
            },
            "required": [
              "id",
              "name",
              "description",
              "mandatory",
              "active",
              "due_within_days",
              "due_date_type",
              "created_by",
              "updated_by",
              "date_created",
              "date_updated"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-retrieve_subjectivity_provenance": {
        "description": "Response payload for /api/v2/subjectivities/retrieve_subjectivity_provenance. Returns null when the subjectivity was not created by a rule effect.",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ]
          },
          "success": {
            "type": "boolean"
          },
          "data": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "object",
                "description": "Rule-execution lineage for the revision subjectivity.",
                "properties": {
                  "run_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "module": {
                    "type": "string",
                    "enum": [
                      "events",
                      "stp"
                    ],
                    "description": "Which rules-engine module produced this run."
                  },
                  "trigger_source": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "run_status": {
                    "type": "string",
                    "enum": [
                      "running",
                      "success",
                      "error"
                    ]
                  },
                  "run_started_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "run_completed_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "underwriting_rule_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "rule_name": {
                    "type": "string"
                  },
                  "matched": {
                    "type": "boolean"
                  },
                  "skipped_reason": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "rule_error_details": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "scope": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "scope_ref_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "underwriting_rule_effect_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "effect_action": {
                    "type": "string"
                  },
                  "effect_applied": {
                    "type": "boolean"
                  },
                  "effect_error_details": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "payload_snapshot": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "description": "Snapshot of the rule effect configuration at the time of execution."
                  },
                  "artifact_type": {
                    "type": "string",
                    "enum": [
                      "task",
                      "revision_subjectivity"
                    ]
                  },
                  "artifact_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "artifact_operation": {
                    "type": "string",
                    "enum": [
                      "created",
                      "updated",
                      "deleted"
                    ]
                  }
                },
                "required": [
                  "run_id",
                  "module",
                  "run_status",
                  "rule_name",
                  "matched",
                  "effect_action",
                  "effect_applied",
                  "artifact_type",
                  "artifact_id",
                  "artifact_operation"
                ]
              }
            ]
          }
        },
        "required": [
          "messages",
          "success",
          "data"
        ]
      },
      "response-retrieve_task": {
        "description": "Response payload for /api/v2/tasks/retrieve_task",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "The id of the task"
              },
              "task_id": {
                "type": "string",
                "description": "Task identifier"
              },
              "claim": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Claim ID"
                  },
                  "claim_number": {
                    "type": "string",
                    "description": "Claim number"
                  },
                  "insureds": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "description": "Insured's contact ID"
                        },
                        "name": {
                          "type": "string",
                          "description": "Insured's name"
                        }
                      }
                    },
                    "description": "Insureds associated with the claim"
                  },
                  "date_added": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Date when the claim was added"
                  }
                }
              },
              "policy": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Policy ID"
                  },
                  "policy_number": {
                    "type": "string",
                    "description": "Policy number"
                  },
                  "effective_date": {
                    "type": "string",
                    "format": "date",
                    "description": "Policy effective date"
                  },
                  "insureds": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "description": "Insured's contact ID"
                        },
                        "name": {
                          "type": "string",
                          "description": "Insured's name"
                        }
                      }
                    },
                    "description": "Insureds associated with the latest revision"
                  }
                }
              },
              "policy_context": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "agent": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "description": "Contact ID"
                      },
                      "name": {
                        "type": "string",
                        "description": "Contact name"
                      }
                    },
                    "description": "Agent of record on the latest revision"
                  },
                  "underwriter": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "description": "Contact ID"
                      },
                      "name": {
                        "type": "string",
                        "description": "Contact name"
                      }
                    },
                    "description": "Underwriter on the latest revision"
                  },
                  "agency_group": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "description": "Contact ID"
                      },
                      "name": {
                        "type": "string",
                        "description": "Contact name"
                      }
                    },
                    "description": "Agency group the policy's agency belongs to"
                  },
                  "additional_interest_count": {
                    "type": "integer",
                    "description": "Additional interests on the latest revision"
                  },
                  "written_premium": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Written premium of the latest revision, as a decimal string"
                  }
                },
                "description": "Policy detail the task sidebar shows. Filled on this endpoint only -- it is the read behind the sidebar. Null everywhere else the task shape is returned (retrieve_tasks, create_task, modify_task), because each field costs a query no other caller reads."
              },
              "task_type": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Task type ID"
                  },
                  "name": {
                    "type": "string",
                    "description": "Task type name"
                  }
                },
                "required": [
                  "id",
                  "name"
                ]
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Task description"
              },
              "date_added": {
                "type": "string",
                "format": "date-time",
                "description": "Task created date"
              },
              "due_date": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "Task due date"
              },
              "added_by": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "ID of user who created the task"
                  },
                  "name": {
                    "type": "string",
                    "description": "Name of user who created the task"
                  }
                }
              },
              "assignee": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "ID of user assigned to the task"
                  },
                  "name": {
                    "type": "string",
                    "description": "Name of user assigned to the task"
                  }
                }
              },
              "status": {
                "type": "string",
                "enum": [
                  "Open",
                  "In Progress",
                  "Blocked",
                  "Escalated",
                  "Completed",
                  "Canceled"
                ]
              },
              "priority": {
                "type": "string",
                "enum": [
                  "Low",
                  "Medium",
                  "High"
                ]
              },
              "mandatory": {
                "type": "boolean",
                "description": "Whether the task is mandatory"
              },
              "last_updated": {
                "type": "string",
                "format": "date-time",
                "description": "Task last updated date"
              },
              "selection_strategy": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "How the assignee was chosen (e.g. manual, round_robin, stp)"
              },
              "orkes_task_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Correlation id when the task came from an Orkes workflow"
              },
              "status_substate": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Queue UI substate; not currently populated"
              },
              "tags": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Queue pill tags, e.g. BLOCKED"
              },
              "comms_count": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Linked communications count; not currently populated"
              },
              "documents_status": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Documents indicator; not currently populated"
              },
              "triggered_by_workflow_node_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Workflow node that created this task, when it came from a workflow dispatch"
              },
              "parent_task_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "Parent task, when this task was chained from another"
              },
              "workflow_chain_depth": {
                "type": "integer",
                "description": "How many tasks deep in a workflow chain this task sits; 0 when unchained"
              },
              "workflow_run_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "Workflow run that produced this task"
              },
              "outcome": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Outcome ID"
                  },
                  "outcome_key": {
                    "type": "string",
                    "description": "Stable key for the outcome"
                  },
                  "name": {
                    "type": "string",
                    "description": "Display name of the outcome"
                  }
                },
                "description": "Recorded outcome, once the task has one"
              },
              "assigned_subgroup": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Role or user group ID"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "role",
                      "user_group"
                    ],
                    "description": "Which kind of subgroup"
                  },
                  "name": {
                    "type": "string",
                    "description": "Display name"
                  }
                },
                "description": "Role or user group the task is assigned to, when not assigned to a person"
              },
              "trigger": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "description": "The automation that created the task. Null when a person did, which is how a client knows not to render a trigger card at all. Single-task reads only; null on every list response.",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "workflow",
                          "stp_rule",
                          "underwriting_rule"
                        ],
                        "description": "Which engine created the task."
                      },
                      "trigger_id": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "The configured workflow or underwriting rule."
                      },
                      "trigger_name": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Its name as of the firing. A rule renamed since keeps the name it fired under."
                      },
                      "run_id": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "uuid",
                        "description": "The one firing, for tracing it in the execution log."
                      },
                      "event_name": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "The platform event that started the run, e.g. PolicyIssuedEvent. Null for the rules engine, which the rating pass invokes rather than an event."
                      },
                      "occurred_at": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date-time"
                      },
                      "rule_description": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "The workflow's or rule's own configured description. Not the task's description, which is editable."
                      },
                      "linked_item": {
                        "oneOf": [
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "description": "The record the trigger was looking at, which can be narrower than the task's own policy. Null only on a triage task, which has no parent either.",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "policy",
                                  "property",
                                  "vehicle",
                                  "watercraft",
                                  "driver"
                                ]
                              },
                              "id": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "label": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Best effort; null when the record has been deleted since the trigger fired. The type is always present."
                              },
                              "policy_id": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "uuid",
                                "description": "The policy the record is reached through. Every linked-item type is a page of a policy; the card's only renderer is policy-scoped."
                              }
                            },
                            "required": [
                              "type"
                            ]
                          }
                        ]
                      }
                    },
                    "required": [
                      "type"
                    ]
                  }
                ]
              }
            },
            "required": [
              "id",
              "task_id",
              "task_type",
              "date_added",
              "status",
              "priority",
              "mandatory",
              "last_updated"
            ]
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-retrieve_task_definition": {
        "description": "Response payload for /api/v2/tasks/retrieve_task_definition",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "The id of the task definition."
              },
              "name": {
                "type": "string",
                "description": "Task Name"
              },
              "date_added": {
                "type": "string",
                "format": "date-time",
                "description": "Task definition created date"
              },
              "added_by": {
                "type": "string",
                "format": "uuid",
                "description": "Task definition created by"
              },
              "description": {
                "type": "string",
                "description": "Task definition description"
              },
              "scope": {
                "type": "string",
                "enum": [
                  "claim",
                  "policy"
                ],
                "description": "The scope of the task definition."
              }
            },
            "required": [
              "id",
              "name",
              "date_added",
              "last_updated_date",
              "added_by",
              "description",
              "scope"
            ]
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-retrieve_task_definition_allowed_assignees": {
        "description": "Response payload for /api/v2/tasks/retrieve_task_definition_allowed_assignees",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "array",
            "description": "List of contacts that are allowed to be assigned to tasks for this task definition",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "The unique identifier of the contact"
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The name of the contact. Null or empty for a contact with no name on record; such contacts sort last and the UI falls back to the id."
                }
              },
              "required": [
                "id",
                "name"
              ]
            }
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-retrieve_task_definitions_assignees": {
        "description": "Response payload for /api/v2/tasks/retrieve_task_definitions_assignees",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "task_definition_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "The ID of the task definition."
                },
                "role_ids": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "description": "List of role IDs assigned to this task definition."
                },
                "user_group_ids": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "description": "List of user group IDs assigned to this task definition."
                }
              },
              "required": [
                "task_definition_id",
                "role_ids",
                "user_group_ids"
              ]
            },
            "description": "List of task definition assignments, aggregated by task definition ID."
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-retrieve_task_documents": {
        "description": "Response payload for /api/v2/tasks/retrieve_task_documents",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Documents on the record the task is attached to, plus whether the caller may read them at all.",
            "properties": {
              "permitted": {
                "type": "boolean",
                "description": "False when the caller lacks read on attachments for the linked record (britecore/policies/ko_attachments for a policy task, britecore/claims/ko_attachments for a claim task); documents is then empty. An empty documents list with permitted true means the record has no documents."
              },
              "truncated": {
                "type": "boolean",
                "description": "True when the linked record holds more files than domain.constants.TASK_DOCUMENT_LIST_LIMIT, so documents is the newest page of a longer list. A caller must not present len(documents) as the record's total when this is set: a full page and a record with exactly that many files are otherwise indistinguishable. False whenever permitted is false."
              },
              "documents": {
                "type": "array",
                "description": "Newest first, capped at domain.constants.TASK_DOCUMENT_LIST_LIMIT. Folders, the emailed duplicate of a printed deliverable, and private files the caller's roles may not see are excluded. Empty for a task attached to neither a policy nor a claim.",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "The file id. Also the id core.uploads.getAttachment serves the bytes for."
                    },
                    "name": {
                      "type": "string",
                      "description": "The file's display name."
                    },
                    "mime_type": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The file's stored mime type, when it has one."
                    },
                    "size": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Size in bytes. Formatting it is the caller's."
                    },
                    "uploaded_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the file was attached."
                    },
                    "uploader": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Name of the person who uploaded the file. Null on a system-attached file, and also when the uploading contact no longer resolves to a name."
                    },
                    "is_system": {
                      "type": "boolean",
                      "description": "True when the system attached the file itself -- a generated deliverable or a vendor push -- rather than a person uploading it."
                    },
                    "previewable": {
                      "type": "boolean",
                      "description": "True only for the types core.uploads.getAttachment serves with Content-Disposition inline (PDF, non-SVG image). False means a request for the file downloads it, so a caller must not offer an inline preview."
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "mime_type",
                    "size",
                    "uploaded_at",
                    "uploader",
                    "is_system",
                    "previewable"
                  ]
                }
              }
            },
            "required": [
              "permitted",
              "truncated",
              "documents"
            ]
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-retrieve_task_history": {
        "description": "Response payload for /api/v2/tasks/retrieve_task_history",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "The id of the task history."
                },
                "task_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Task Id associated to the task history"
                },
                "field_changed": {
                  "type": "string",
                  "description": "Field changed"
                },
                "old_value": {
                  "type": "string",
                  "description": "Previous value"
                },
                "new_value": {
                  "type": "string",
                  "description": "New value"
                },
                "changed_by_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Task changed by"
                },
                "changed_by": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Contact ID"
                    },
                    "name": {
                      "type": "string",
                      "description": "Contact name"
                    }
                  },
                  "description": "The actor, resolved to a name. Always present in practice -- changedById is NOT NULL behind an ON DELETE RESTRICT foreign key -- but typed nullable because the read outer-joins rather than dropping a row."
                },
                "changed_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Task changed date"
                }
              },
              "required": [
                "id",
                "task_id",
                "field_changed",
                "old_value",
                "new_value",
                "changed_by_id",
                "changed_at"
              ]
            }
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-retrieve_task_notes": {
        "description": "Response payload for /api/v2/tasks/retrieve_task_notes",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "The id of the note"
                },
                "task_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "The task the note belongs to"
                },
                "contents": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The note body"
                },
                "author": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Name recorded when the note was written, not a contact reference"
                },
                "created_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time",
                  "description": "When the note was written"
                },
                "shared_to_policy": {
                  "type": "boolean",
                  "description": "True when the note was promoted to the task's policy at write time, so it also appears on that policy's Notes tab"
                }
              },
              "required": [
                "id",
                "task_id",
                "contents",
                "author",
                "created_at",
                "shared_to_policy"
              ]
            }
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-retrieve_task_provenance": {
        "description": "Response payload for /api/v2/tasks/retrieve_task_provenance. Returns null when the task was not created by a rule effect.",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ]
          },
          "success": {
            "type": "boolean"
          },
          "data": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "object",
                "description": "Rule-execution lineage for the task.",
                "properties": {
                  "run_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "module": {
                    "type": "string",
                    "enum": [
                      "events",
                      "stp"
                    ],
                    "description": "Which rules-engine module produced this run."
                  },
                  "trigger_source": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "run_status": {
                    "type": "string",
                    "enum": [
                      "running",
                      "success",
                      "error"
                    ]
                  },
                  "run_started_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "run_completed_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "underwriting_rule_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "rule_name": {
                    "type": "string"
                  },
                  "matched": {
                    "type": "boolean"
                  },
                  "skipped_reason": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "rule_error_details": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "scope": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "scope_ref_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "underwriting_rule_effect_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "effect_action": {
                    "type": "string"
                  },
                  "effect_applied": {
                    "type": "boolean"
                  },
                  "effect_error_details": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "payload_snapshot": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "description": "Snapshot of the rule effect configuration at the time of execution."
                  },
                  "artifact_type": {
                    "type": "string",
                    "enum": [
                      "task",
                      "revision_subjectivity"
                    ]
                  },
                  "artifact_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "artifact_operation": {
                    "type": "string",
                    "enum": [
                      "created",
                      "updated",
                      "deleted"
                    ]
                  }
                },
                "required": [
                  "run_id",
                  "module",
                  "run_status",
                  "rule_name",
                  "matched",
                  "effect_action",
                  "effect_applied",
                  "artifact_type",
                  "artifact_id",
                  "artifact_operation"
                ]
              }
            ]
          }
        },
        "required": [
          "messages",
          "success",
          "data"
        ]
      },
      "response-retrieve_tasks": {
        "type": "object",
        "description": "Response payload for /api/v2/tasks/retrieve_tasks",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ],
            "description": "Any messages or errors related to the request"
          },
          "data": {
            "type": "object",
            "properties": {
              "tasks": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Task unique identifier"
                    },
                    "task_id": {
                      "type": "string",
                      "description": "Task identifier"
                    },
                    "claim": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "uuid",
                          "description": "Claim ID"
                        },
                        "number": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Claim number"
                        },
                        "insureds": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "description": "Insured's contact ID"
                              },
                              "name": {
                                "type": "string",
                                "description": "Insured's name"
                              }
                            }
                          },
                          "description": "List of insureds associated with the claim"
                        },
                        "date_added": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Date when the claim was added"
                        },
                        "loss_date": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Date of loss"
                        },
                        "status": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Claim status"
                        }
                      }
                    },
                    "policy": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "description": "Policy ID"
                        },
                        "policy_number": {
                          "type": "string",
                          "description": "Policy number"
                        },
                        "effective_date": {
                          "type": "string",
                          "format": "date",
                          "description": "Policy effective date"
                        },
                        "insureds": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "description": "Insured's contact ID"
                              },
                              "name": {
                                "type": "string",
                                "description": "Insured's name"
                              }
                            }
                          },
                          "description": "Insureds associated with the latest revision"
                        },
                        "agency_name": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Agency name (not yet populated; reserved)"
                        },
                        "lob": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Line of business (policy type name of the latest revision)"
                        },
                        "transaction_type": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "enum": [
                            "New Business",
                            "Renewal",
                            "Endorsement",
                            "Cancellation",
                            "Reinstatement"
                          ],
                          "description": "Canonical transaction type of the policy's latest revision"
                        },
                        "stage": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Policy stage derived from the latest revision's policy status"
                        }
                      }
                    },
                    "task_type": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "uuid",
                          "description": "Task type ID"
                        },
                        "name": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Task type name"
                        }
                      }
                    },
                    "date_added": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Date and time when task was created"
                    },
                    "due_date": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Date and time when task is due"
                    },
                    "added_by": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "uuid",
                          "description": "ID of user who created the task"
                        },
                        "name": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Name of user who created the task"
                        }
                      }
                    },
                    "assignee": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "uuid",
                          "description": "ID of user assigned to the task"
                        },
                        "name": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Name of user assigned to the task"
                        }
                      }
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "Open",
                        "In Progress",
                        "Blocked",
                        "Escalated",
                        "Completed",
                        "Canceled"
                      ],
                      "description": "Current status of the task"
                    },
                    "priority": {
                      "type": "string",
                      "enum": [
                        "Low",
                        "Medium",
                        "High"
                      ],
                      "description": "Priority level of the task"
                    },
                    "last_updated": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Date and time when task was last updated"
                    },
                    "status_substate": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Optional task-queue UI substate (reserved; currently null)"
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Task tag pills (e.g. BLOCKED)"
                    },
                    "comms_count": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Communications count (reserved; currently null)"
                    },
                    "documents_status": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Documents status (reserved; currently null)"
                    }
                  },
                  "required": [
                    "id",
                    "task_id",
                    "status",
                    "priority",
                    "date_added",
                    "last_updated"
                  ]
                }
              },
              "pagination": {
                "type": "object",
                "description": "Pagination metadata. Omitted in suggest mode (request suggest=true), which skips the total count.",
                "properties": {
                  "page": {
                    "type": "integer",
                    "description": "Current page number"
                  },
                  "page_size": {
                    "type": "integer",
                    "description": "Number of items per page"
                  },
                  "total_pages": {
                    "type": "integer",
                    "description": "Total number of pages"
                  },
                  "total_count": {
                    "type": "integer",
                    "description": "Total number of tasks matching the filters"
                  },
                  "total_groups": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "description": "Total number of policy groups matching the filters. Only populated for grouped pagination (request group_by=policy), where page/page_size/total_pages count groups; null for plain row pagination."
                  }
                },
                "required": [
                  "page",
                  "page_size",
                  "total_pages",
                  "total_count"
                ]
              },
              "filter_counts": {
                "type": [
                  "object",
                  "null"
                ],
                "description": "Status quick-filter bucket totals over the full filtered set (before the status-filter selection and pagination). Only populated when include_filter_counts was requested.",
                "properties": {
                  "all": {
                    "type": "integer"
                  },
                  "overdue": {
                    "type": "integer"
                  },
                  "due_today": {
                    "type": "integer"
                  },
                  "blocked": {
                    "type": "integer"
                  },
                  "unassigned": {
                    "type": "integer"
                  }
                }
              },
              "view_counts": {
                "type": [
                  "object",
                  "null"
                ],
                "description": "Per-view totals for the underwriting view tabs. Unfiltered by every queue control - no lifecycle bucket, status chip, search term or toolbar filter - because the tabs are top-level navigation and their totals must not move when a filter below them changes. Only populated when include_view_counts was requested.",
                "properties": {
                  "my_tasks": {
                    "type": "integer"
                  },
                  "all_tasks": {
                    "type": "integer"
                  },
                  "submissions": {
                    "type": "integer"
                  },
                  "triage": {
                    "type": "integer"
                  }
                }
              },
              "bucket_counts": {
                "type": [
                  "object",
                  "null"
                ],
                "description": "Per-lifecycle-bucket totals over the filtered set, computed before filters.bucket narrows it, so every bucket tab shows its own total and the numbers do not move as the user switches tabs. They ignore filters.status_filter (the bucket tabs are the outer scope; the chips count within the selected bucket). Because the buckets partition the statuses, the three sum to the filtered total. Only populated when include_bucket_counts was requested.",
                "properties": {
                  "active": {
                    "type": "integer"
                  },
                  "on_hold": {
                    "type": "integer"
                  },
                  "archived": {
                    "type": "integer"
                  }
                }
              }
            },
            "required": [
              "tasks"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Whether the request was successful"
          }
        },
        "required": [
          "success",
          "data",
          "messages"
        ]
      },
      "response-retrieve_team_workload": {
        "description": "Response payload for /api/v2/tasks/retrieve_team_workload",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "underwriters": {
                "type": "array",
                "description": "One row per active contact in the caller's assignee scope - with permissiveTasksAccess that is everyone in the task workflow (holds a task, or is placed in the user-group hierarchy), otherwise the caller's own reportees. Ordered by open_count descending then name (the client scales its bars relative to the highest open_count). Contacts carrying nothing are included with zeroes. Capped at 50 rows; compare against total_underwriters.",
                "items": {
                  "type": "object",
                  "properties": {
                    "assignee_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "The underwriter's contact id."
                    },
                    "assignee_name": {
                      "type": "string",
                      "description": "The underwriter's contact name."
                    },
                    "open_count": {
                      "type": "integer",
                      "description": "Tasks assigned to them that are not in a terminal status (Completed / Canceled)."
                    },
                    "overdue_count": {
                      "type": "integer",
                      "description": "Subset of open_count that is past its due date (same rule as the Overdue chip)."
                    },
                    "blocked_count": {
                      "type": "integer",
                      "description": "Subset of open_count whose status is Blocked."
                    },
                    "is_current_user": {
                      "type": "boolean",
                      "description": "True on the calling user's own row. Resolved server-side because the page has no dependable client-side current-user id."
                    }
                  },
                  "required": [
                    "assignee_id",
                    "assignee_name",
                    "open_count",
                    "overdue_count",
                    "blocked_count",
                    "is_current_user"
                  ]
                }
              },
              "total_underwriters": {
                "type": "integer",
                "description": "Total underwriter rows before the row cap, so a capped list is never presented as the whole team."
              }
            },
            "required": [
              "underwriters",
              "total_underwriters"
            ]
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-retrieve_underwriting_calendar": {
        "description": "Response payload for /api/v2/tasks/retrieve_underwriting_calendar. Per-day counts of the caller's open tasks across one month's grid.",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ]
          },
          "success": {
            "type": "boolean"
          },
          "data": {
            "type": "object",
            "properties": {
              "month": {
                "type": "string",
                "pattern": "^[0-9]{4}-[0-9]{2}$",
                "description": "The month reported, echoed back as YYYY-MM."
              },
              "range_start": {
                "type": "string",
                "format": "date",
                "description": "First day covered. The month is padded either side so a six-week grid has its adjacent-month days without a second request."
              },
              "range_end": {
                "type": "string",
                "format": "date",
                "description": "Last day covered, padded past the month end for the same reason."
              },
              "days": {
                "type": "array",
                "description": "One entry per day that has at least one open task; days with none are absent rather than zero-filled.",
                "items": {
                  "type": "object",
                  "properties": {
                    "day": {
                      "type": "string",
                      "format": "date",
                      "description": "The due date, as YYYY-MM-DD. Matched against the client's local calendar day, so due dates are stored at noon UTC to keep the two in agreement."
                    },
                    "total_count": {
                      "type": "integer"
                    },
                    "overdue_count": {
                      "type": "integer",
                      "description": "Uses the queue's overdue rule, so the cell and the queue it drills into agree."
                    },
                    "high_priority_count": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "day",
                    "total_count",
                    "overdue_count",
                    "high_priority_count"
                  ]
                }
              }
            },
            "required": [
              "month",
              "range_start",
              "range_end",
              "days"
            ]
          }
        },
        "required": [
          "messages",
          "success",
          "data"
        ]
      },
      "response-retrieve_underwriting_dashboard": {
        "description": "Response payload for /api/v2/tasks/retrieve_underwriting_dashboard. The Underwriting Dashboard's KPI strip, Priority Work list and queue capabilities, in one round trip.",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ]
          },
          "success": {
            "type": "boolean"
          },
          "data": {
            "type": "object",
            "properties": {
              "user": {
                "type": "object",
                "description": "The calling user, for the page greeting.",
                "properties": {
                  "id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "From the contact record, falling back to the session; null when neither carries one."
                  }
                },
                "required": [
                  "id",
                  "name"
                ]
              },
              "metrics": {
                "type": "object",
                "description": "KPI counts over the caller's own tasks. Each count reuses the queue's own status predicate, so a card and the queue it drills into cannot disagree.",
                "properties": {
                  "open_count": {
                    "type": "integer"
                  },
                  "overdue_count": {
                    "type": "integer"
                  },
                  "blocked_count": {
                    "type": "integer"
                  },
                  "due_today_count": {
                    "type": "integer",
                    "description": "Due today and still open. Excludes completed and canceled work, matching the calendar cell and the Priority Work list; the drill-through passes scope=open so the queue agrees."
                  },
                  "due_today_high_priority_count": {
                    "type": "integer"
                  },
                  "premium_at_risk": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "Written premium on the policies the caller's overdue tasks are attached to, summed once per distinct policy. Counts only the latest non-deleted revision, and only the policy statuses where the premium is still at stake, so a stale overdue task on a policy cancelled last year contributes nothing. An unrated submission carries 0.00, so the figure reads low rather than high; the surface labels it an estimate. Null when the caller lacks britecore/policies/information read - distinct from 0.0, which asserts the book has no rated premium at risk."
                  }
                },
                "required": [
                  "open_count",
                  "overdue_count",
                  "blocked_count",
                  "due_today_count",
                  "due_today_high_priority_count",
                  "premium_at_risk"
                ]
              },
              "priority_work": {
                "type": "object",
                "description": "Everything overdue, then everything due within upcoming_days. Returned whole rather than paged so the panel's type chips can count and filter across the entire window; the panel shows page_size rows at a time.",
                "properties": {
                  "overdue": {
                    "type": "array",
                    "description": "Task rows in the same shape retrieve_tasks returns - see response-retrieve_tasks.json, which is the authority on the row. Sorted by due date ascending.",
                    "items": {
                      "type": "object"
                    }
                  },
                  "upcoming": {
                    "type": "array",
                    "description": "Task rows in the same shape as overdue, due between today and upcoming_days out.",
                    "items": {
                      "type": "object"
                    }
                  },
                  "page_size": {
                    "type": "integer",
                    "description": "How many rows the panel shows at once, from UW_DASHBOARD_PRIORITY_WORK_PAGE_SIZE. A fixed constant, not a function of the rows returned: on a light workload it exceeds the total, and the panel then renders a single page."
                  }
                },
                "required": [
                  "overdue",
                  "upcoming",
                  "page_size"
                ]
              },
              "upcoming_days": {
                "type": "integer",
                "description": "How far ahead the upcoming half of Priority Work looks."
              },
              "capabilities": {
                "type": "object",
                "description": "The queue capabilities, travelling with this payload so the client knows which toggles to offer. view_team_workload gates the Team Performance view.",
                "additionalProperties": {
                  "type": "boolean"
                },
                "properties": {
                  "edit_tasks": {
                    "type": "boolean"
                  },
                  "select_lifecycle_bucket": {
                    "type": "boolean"
                  },
                  "view_team_workload": {
                    "type": "boolean"
                  },
                  "view_triage": {
                    "type": "boolean"
                  }
                }
              }
            },
            "required": [
              "user",
              "metrics",
              "priority_work",
              "upcoming_days",
              "capabilities"
            ]
          }
        },
        "required": [
          "messages",
          "success",
          "data"
        ]
      },
      "response-retrieve_underwriting_dashboard_panels": {
        "description": "Response payload for /api/v2/tasks/retrieve_underwriting_dashboard_panels. The Dashboard's three secondary panels: Recent Activity, Upcoming Renewals and Pipeline. Renewals and Pipeline report policy numbers and premium across the whole book, so they are gated on britecore/policies/information read on top of the britecore/tasks read the endpoint carries, and arrive null without it.",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ]
          },
          "success": {
            "type": "boolean"
          },
          "data": {
            "type": "object",
            "properties": {
              "activity": {
                "type": "object",
                "description": "Recent changes to the caller's own tasks. Not their reportees': this endpoint carries only task read, and a roster-wide feed would describe other people's work under a weaker capability than Team Performance requires for the same roster.",
                "properties": {
                  "window_days": {
                    "type": "integer"
                  },
                  "changes": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "actor_name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "verb": {
                          "type": "string",
                          "description": "The change as a verb - created, completed, moved, reassigned, made, or updated as a backstop for a field with no mapping."
                        },
                        "suffix": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The tail of the sentence, where the new value carries meaning. Rendered around the task: '<actor> <verb> <task> <suffix>'."
                        },
                        "task_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "task_number": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "task_type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "policy_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "uuid"
                        },
                        "changed_at": {
                          "type": "string",
                          "pattern": "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])[ T]([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d",
                          "description": "Space-separated rather than RFC 3339 'T': the v2 encoder renders datetimes as 'YYYY-MM-DD HH:MM:SS'."
                        }
                      },
                      "required": [
                        "id",
                        "actor_name",
                        "verb",
                        "suffix",
                        "task_id",
                        "task_number",
                        "task_type",
                        "policy_id",
                        "changed_at"
                      ]
                    }
                  }
                },
                "required": [
                  "window_days",
                  "changes"
                ]
              },
              "renewals": {
                "oneOf": [
                  {
                    "type": "null",
                    "description": "The caller lacks britecore/policies/information read. Null rather than an empty result, because an empty result is a claim about the book that this caller should not be told."
                  },
                  {
                    "type": "object",
                    "description": "In-force policies expiring inside the window. Book-wide: a policy term is not assigned to anyone, so there is nothing to scope it by.",
                    "properties": {
                      "window_days": {
                        "type": "integer"
                      },
                      "policies": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "policy_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "policy_term_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "policy_number": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "policy_status": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "lob": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "expiration_date": {
                              "type": "string",
                              "format": "date"
                            },
                            "premium": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "policy_id",
                            "policy_term_id",
                            "policy_number",
                            "policy_status",
                            "lob",
                            "expiration_date",
                            "premium"
                          ]
                        }
                      }
                    },
                    "required": [
                      "window_days",
                      "policies"
                    ]
                  }
                ]
              },
              "pipeline": {
                "oneOf": [
                  {
                    "type": "null",
                    "description": "The caller lacks britecore/policies/information read."
                  },
                  {
                    "type": "object",
                    "description": "Pre-issue revisions by funnel stage. Book-wide for the same reason as renewals: a pre-issue revision is not assigned to anyone.",
                    "properties": {
                      "by_stage": {
                        "type": "array",
                        "description": "Stages in funnel order, each named through the same mapping the queue's stage filter uses so the two cannot label a status differently. Stages with no policies are omitted.",
                        "items": {
                          "type": "object",
                          "properties": {
                            "stage": {
                              "type": "string"
                            },
                            "count": {
                              "type": "integer"
                            }
                          },
                          "required": [
                            "stage",
                            "count"
                          ]
                        }
                      },
                      "open_count": {
                        "type": "integer",
                        "description": "Total across the stages. A policy has exactly one latest revision, so the stages partition the set and never double-count."
                      },
                      "stale_count": {
                        "type": "integer",
                        "description": "Of the open ones, how many have sat untouched for stale_days. Never greater than open_count."
                      },
                      "stale_days": {
                        "type": "integer"
                      },
                      "conversion_rate": {
                        "type": [
                          "number",
                          "null"
                        ],
                        "description": "Share of submissions in the window that reached issue, as a percentage between 0 and 100 rounded to one decimal. Reuses the submission anchor behind Quoting Performance rather than deriving a second one. Null, not 0, when nothing was submitted in the window: no applications is not a nil conversion rate."
                      },
                      "window_days": {
                        "type": "integer"
                      },
                      "recent": {
                        "type": "array",
                        "description": "The most recently created pre-issue revisions.",
                        "items": {
                          "type": "object",
                          "properties": {
                            "policy_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "policy_number": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "stage": {
                              "type": "string"
                            },
                            "lob": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "premium": {
                              "type": "number"
                            },
                            "created_at": {
                              "type": "string",
                              "pattern": "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])[ T]([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d",
                              "description": "Space-separated rather than RFC 3339 'T': the v2 encoder renders datetimes as 'YYYY-MM-DD HH:MM:SS'."
                            }
                          },
                          "required": [
                            "policy_id",
                            "policy_number",
                            "stage",
                            "lob",
                            "premium",
                            "created_at"
                          ]
                        }
                      }
                    },
                    "required": [
                      "by_stage",
                      "open_count",
                      "stale_count",
                      "stale_days",
                      "conversion_rate",
                      "window_days",
                      "recent"
                    ]
                  }
                ]
              }
            },
            "required": [
              "activity",
              "renewals",
              "pipeline"
            ]
          }
        },
        "required": [
          "messages",
          "success",
          "data"
        ]
      },
      "response-retrieve_underwriting_team_performance": {
        "description": "Response payload for /api/v2/tasks/retrieve_underwriting_team_performance. The Dashboard's Team Performance view: per-underwriter workload, On Hold, cycle time and quoting. Requires the view_team_workload capability; quoting additionally requires britecore/policies/information read and arrives null without it.",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ]
          },
          "success": {
            "type": "boolean"
          },
          "data": {
            "type": "object",
            "properties": {
              "underwriters": {
                "type": "array",
                "description": "Workload rows, busiest first, capped at a row limit. Same rows retrieve_team_workload returns, with the per-type breakdown a row shows when expanded.",
                "items": {
                  "type": "object",
                  "properties": {
                    "assignee_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "assignee_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "open_count": {
                      "type": "integer"
                    },
                    "overdue_count": {
                      "type": "integer"
                    },
                    "blocked_count": {
                      "type": "integer"
                    },
                    "due_today_count": {
                      "type": "integer"
                    },
                    "is_current_user": {
                      "type": "boolean",
                      "description": "Stamped server-side: the page has no dependable client-side identity, and the session user is known only here."
                    },
                    "task_types": {
                      "type": "array",
                      "description": "This assignee's open tasks by type, for the expanded row. Scoped to the rows on the page.",
                      "items": {
                        "type": "object",
                        "properties": {
                          "task_definition_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "task_type": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "count": {
                            "type": "integer"
                          },
                          "overdue_count": {
                            "type": "integer"
                          }
                        },
                        "required": [
                          "task_definition_id",
                          "task_type",
                          "count",
                          "overdue_count"
                        ]
                      }
                    }
                  },
                  "required": [
                    "assignee_id",
                    "assignee_name",
                    "open_count",
                    "overdue_count",
                    "blocked_count",
                    "due_today_count",
                    "is_current_user",
                    "task_types"
                  ]
                }
              },
              "total_underwriters": {
                "type": "integer",
                "description": "The roster size before the row cap, so the panel can say how many it is not showing."
              },
              "on_hold": {
                "type": "object",
                "description": "Blocked work across the roster, broken down by task type.",
                "properties": {
                  "total": {
                    "type": "integer"
                  },
                  "by_type": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "task_definition_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "uuid"
                        },
                        "task_type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "count": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "task_definition_id",
                        "task_type",
                        "count"
                      ]
                    }
                  }
                },
                "required": [
                  "total",
                  "by_type"
                ]
              },
              "completion": {
                "type": "object",
                "description": "Throughput across the roster over the window, computed from task history.",
                "properties": {
                  "window_days": {
                    "type": "integer"
                  },
                  "created_count": {
                    "type": "integer"
                  },
                  "completed_count": {
                    "type": "integer"
                  },
                  "completion_rate": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "Of the tasks created inside the window, the share since completed, as a percentage between 0 and 100 rounded to one decimal. A cohort measure rather than completed over created, so it cannot exceed 100, and it reads low while the newest cohort is still in flight. Null when nothing was created in the window."
                  },
                  "avg_completion_days": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "Mean days from creation to completion, rounded to one decimal. Null when nothing completed in the window: no completions means the cycle time is unknown, where 0 would read as instant."
                  }
                },
                "required": [
                  "window_days",
                  "created_count",
                  "completed_count",
                  "completion_rate",
                  "avg_completion_days"
                ]
              },
              "quoting": {
                "oneOf": [
                  {
                    "type": "null",
                    "description": "The caller lacks britecore/policies/information read. Null rather than an empty rollup, so the panel reports itself unavailable rather than reporting a team that quoted nothing."
                  },
                  {
                    "type": "object",
                    "description": "Policy-funnel performance per underwriter - premium and conversion off revisions, not off tasks. Attributed by the underwriter recorded on the revision, so task assignment does not affect it; a site that records none reports no rows.",
                    "properties": {
                      "window_days": {
                        "type": "integer"
                      },
                      "unattributed_count": {
                        "type": [
                          "integer",
                          "null"
                        ],
                        "description": "Submissions in the window with no underwriter recorded, and so in none of the rows below. Without it the rates here would silently describe only the attributed slice and read as site-wide. Null when the roster is scoped to an empty set of contacts, where a site-wide count would not belong to the rows shown."
                      },
                      "underwriters": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "contact_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "contact_name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "submission_count": {
                              "type": "integer"
                            },
                            "issued_count": {
                              "type": "integer"
                            },
                            "issued_rate": {
                              "type": [
                                "number",
                                "null"
                              ],
                              "description": "Issued over submitted, as a percentage between 0 and 100 rounded to one decimal. Null when this underwriter has no submissions in the window."
                            },
                            "avg_days_to_issue": {
                              "type": [
                                "number",
                                "null"
                              ],
                              "description": "Mean days from submission to commit, over issued submissions only, rounded to one decimal. Still-open submissions contribute nothing rather than an open-ended age. Null when nothing issued in the window, where 0 would read as instant."
                            },
                            "premium": {
                              "type": "number"
                            },
                            "is_current_user": {
                              "type": "boolean",
                              "description": "Stamped here rather than matched against the workload rows on the client: that roster is capped, so a caller outside it has no row there to match and would never see their own line highlighted in a panel that does list them."
                            }
                          },
                          "required": [
                            "contact_id",
                            "contact_name",
                            "submission_count",
                            "issued_count",
                            "issued_rate",
                            "avg_days_to_issue",
                            "premium",
                            "is_current_user"
                          ]
                        }
                      }
                    },
                    "required": [
                      "window_days",
                      "unattributed_count",
                      "underwriters"
                    ]
                  }
                ]
              }
            },
            "required": [
              "underwriters",
              "total_underwriters",
              "on_hold",
              "completion",
              "quoting"
            ]
          }
        },
        "required": [
          "messages",
          "success",
          "data"
        ]
      },
      "response-review_revision": {
        "type": "object",
        "description": "Response payload for /api/v2/policies/review_revision",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "review_workflow_state": {
                "type": "string",
                "description": "Current review workflow state after running STP"
              },
              "stp": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "approved",
                      "requires_review",
                      "failed"
                    ],
                    "description": "STP execution outcome"
                  },
                  "stp_details": {
                    "type": "array",
                    "description": "List of STP rules that were triggered",
                    "items": {
                      "type": "object",
                      "properties": {
                        "rule_name": {
                          "type": "string"
                        },
                        "success": {
                          "type": "boolean"
                        },
                        "details": {
                          "type": "string"
                        },
                        "action": {
                          "type": "string"
                        },
                        "rule_level": {
                          "type": "string"
                        },
                        "risk_name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "sub_line_instance_name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "rule_name",
                        "success",
                        "details",
                        "action",
                        "rule_level"
                      ]
                    }
                  },
                  "stp_errors": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "List of errors encountered during STP execution"
                  }
                },
                "required": [
                  "status",
                  "stp_details",
                  "stp_errors"
                ]
              }
            },
            "required": [
              "review_workflow_state",
              "stp"
            ]
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "data",
          "messages"
        ]
      },
      "response-revoke_report_permission": {
        "title": "RevokeReportPermissionResponse",
        "type": "object",
        "description": "Response schema for POST /api/v2/reports/revoke_report_permission",
        "properties": {
          "data": {
            "type": "object",
            "description": "Empty object on success (no row payload returned)."
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-revoke_screening_override": {
        "description": "Response payload for /api/v2/contacts/revoke_screening_override",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "success": {
                "type": "boolean",
                "enum": [
                  true
                ]
              }
            },
            "required": [
              "success"
            ]
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-rewrite_policy": {
        "type": "object",
        "description": "Response schema for /api/v2/policies/rewrite_policy",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "revision_id": {
                "type": "string",
                "format": "uuid",
                "description": "The revision ID of the rewritten policy"
              },
              "revision_external_system_reference": {
                "type": "string",
                "description": "The external system reference of the revision of the rewritten policy"
              },
              "policy_id": {
                "type": "string",
                "format": "uuid",
                "description": "The ID of the rewritten policy"
              }
            },
            "required": [
              "revision_id",
              "policy_id",
              "revision_external_system_reference"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-run_migration": {
        "type": "object",
        "description": "Response schema for /api/v2/imports/run_migration",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "type": "array",
            "description": "Array of informational or error messages",
            "items": {
              "type": "string"
            }
          },
          "data": {
            "type": "object",
            "description": "Migration job launch information",
            "properties": {
              "status": {
                "type": "string",
                "description": "Job launch status",
                "enum": [
                  "dry_run",
                  "launched",
                  "blocked"
                ]
              },
              "job_id": {
                "type": "string",
                "format": "uuid",
                "description": "Unique job identifier (present when status is 'launched')"
              },
              "message": {
                "type": "string",
                "description": "Status message"
              },
              "output": {
                "type": "string",
                "description": "Dry run configuration output (present when dry_run=true)"
              }
            },
            "required": [
              "status",
              "message"
            ],
            "allOf": [
              {},
              {}
            ]
          }
        },
        "required": [
          "success",
          "messages",
          "data"
        ]
      },
      "response-run_pre_rate_integrations": {
        "title": "Run Pre-Rate Integrations Response",
        "type": "object",
        "description": "Response payload for /api/v2/quotes/run_pre_rate_integrations. A vendor integration failure answers the standard_error envelope with the integration's message in the flat messages list (the same contract the legacy rate_risk had for integration errors), and the caller must NOT proceed to rate.",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful."
          },
          "data": {
            "type": [
              "object",
              "array",
              "null"
            ],
            "description": "The integrations outcome. On errors data is an empty list (the standard_error envelope).",
            "items": {
              "description": "The standard_error envelope serializes data as an empty list, so this never holds items."
            },
            "properties": {
              "ran": {
                "type": "boolean",
                "description": "True when the integrations ran for the revision's risks; false when nothing ran -- see reason."
              },
              "alert_messages": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Alert messages from the property lookup integrations plus selection-conflict messages, in the same order the legacy rate_risk collected them. Empty when nothing ran or nothing alerted."
              },
              "reason": {
                "type": "string",
                "description": "Why nothing ran, or '' when it did. 'unsupported': the revision is not rated through the unified engine (setting off, or a rating-v1 / Auto / Umbrella / endorsement revision), so the caller (the Quote Wizard) takes the legacy Rate action for it, which runs its own integrations -- running them here too would double the side effects. quotes/rate refuses an unsupported revision and does not reroute it in-process. 'nothing-configured': no HazardHub triggerOnRateAndSave and no property lookup with runWhenQWUserClicksCalculateRate on this site."
              }
            }
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Any messages or errors related to the request. Integration failures keep the legacy flat list shape (rate_risk's standard_error(str(e)) contract)."
          }
        },
        "required": [
          "success",
          "data",
          "messages"
        ]
      },
      "response-run_property_lookup": {
        "type": "object",
        "description": "Response payload for POST /api/v2/policies/run_property_lookup. On success, data is one lookup result (integration_instance_id path) or a list of results (headless). On failure, success is false, messages carries the reason, and data is []. property_information_updates only includes keys the writer actually changed: seed-only skips a live replacement_cost_value / property_val, so an unchanged stored valuation is absent from the payload (BC-24446).",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "True when the lookup ran. False when validation failed, the revision is not open, the vendor errored, or the property address is incomplete."
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Empty on success. On failure: missing mandatories, unknown ids, closed revision, missing address fields, or the vendor error string."
          },
          "data": {
            "description": "One lookup result when a single integration_instance_id was run. A list of lookup results when headless. An empty array on failure (and also on a successful headless run with no matching instances).",
            "oneOf": [
              {
                "$ref": "#/components/schemas/response-run_property_lookup-defs-lookupResult"
              },
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/response-run_property_lookup-defs-lookupResult"
                }
              }
            ]
          }
        },
        "required": [
          "success",
          "messages",
          "data"
        ],
        "$defs": {
          "lookupResult": {
            "type": "object",
            "description": "Updates applied for one PROPERTY_LOOKUP integration instance.",
            "properties": {
              "rating_information_updates": {
                "type": "array",
                "description": "Category and user-input fields whose stored value changed.",
                "items": {
                  "type": "object",
                  "properties": {
                    "visible_on_admin_builder": {
                      "type": "boolean"
                    },
                    "visible_on_agent_builder": {
                      "type": "boolean"
                    },
                    "property_item_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "policy_type_item_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "policy_type_item_name": {
                      "type": "string"
                    },
                    "policy_type_item_sort_order": {
                      "type": "integer"
                    },
                    "field_name": {
                      "type": "string"
                    },
                    "field_sort_order": {
                      "type": "integer"
                    },
                    "old_value": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "new_value": {
                      "type": "string"
                    },
                    "old_value_display": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "new_value_display": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "category",
                        "userInput"
                      ]
                    }
                  },
                  "required": [
                    "visible_on_admin_builder",
                    "visible_on_agent_builder",
                    "property_item_id",
                    "policy_type_item_id",
                    "policy_type_item_name",
                    "policy_type_item_sort_order",
                    "field_name",
                    "field_sort_order",
                    "old_value",
                    "new_value",
                    "old_value_display",
                    "new_value_display",
                    "type"
                  ]
                }
              },
              "property_information_updates": {
                "type": "object",
                "description": "Property valuation fields that were written. Absent keys were not changed. replacement_cost_value is quantized to DECIMAL(64,2) and serializes as a JSON number (BC-23939).",
                "properties": {
                  "property_value": {
                    "type": "number",
                    "description": "New ACV / propertyVal, present only when the stored value was unset. A JSON number: the vendor response is deserialized with fields.Float (integration_points/property_lookup.py) and the writer echoes that value back unchanged, even though propertyVal is stored in a VARCHAR."
                  },
                  "replacement_cost_value": {
                    "type": "number",
                    "description": "New RCV quantized to two decimal places. Omitted when seed-only skipped a live stored value, when the incoming value equaled the stored value, or when the vendor omitted RCV."
                  }
                }
              },
              "alert_message": {
                "type": "string",
                "description": "Vendor alert text. Empty string when none."
              },
              "selection_conflicts": {
                "type": "array",
                "description": "Rating fields whose vendor value is not in selection_options. Headless stops further instances when this is non-empty.",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "value": {
                      "type": "string"
                    },
                    "selection_options": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "selection_options_display_suffixes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "name",
                    "selection_options"
                  ]
                }
              },
              "integration_state_updates": {
                "type": "object",
                "description": "Hold and vendor-proposal state after this run, keyed by property item id then field name. Reported because two outcomes produce no rating_information_updates entry and so reach the client by no other route: a converging vendor value releases the hold without writing a value, and a value refused by a live hold records a fresh proposal while leaving the stored value alone. Absent on the early skip path, where no integration ran.",
                "additionalProperties": {
                  "type": "object",
                  "description": "Fields for one property item.",
                  "additionalProperties": {
                    "type": "object",
                    "properties": {
                      "recordedValue": {
                        "description": "The vendor's last recorded proposal for this field. ABSENT when no proposal has been recorded; a JSON null is a genuine recorded null, not \"no record\". The two must stay distinct: the client shows the Revert link only when a recorded value exists, and the server declines a release that has nothing to restore."
                      },
                      "userValueHasPrecedence": {
                        "type": "boolean",
                        "description": "True while a human edit is protected from vendor writes."
                      }
                    },
                    "required": [
                      "userValueHasPrecedence"
                    ]
                  }
                }
              }
            },
            "required": [
              "rating_information_updates",
              "property_information_updates"
            ]
          }
        }
      },
      "response-run_rules": {
        "type": "object",
        "description": "Response payload for /api/v2/rules/run",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the API call succeeded"
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Error messages if success is false"
          },
          "data": {
            "type": "object",
            "description": "Rules execution result data",
            "properties": {
              "coverages": {
                "type": "array",
                "description": "List of coverages after rules execution, with override_mandatory flag set where applicable",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string"
                    },
                    "override_mandatory": {
                      "type": "boolean"
                    }
                  }
                }
              },
              "ui": {
                "type": "object",
                "description": "UI context with applied rule changes (only present when ui_context was provided)"
              },
              "coverages_removed_deductible_options": {
                "type": "object",
                "description": "Deductible options removed by rules, keyed by coverage ID"
              },
              "coverages_removed_categories_options": {
                "type": "object",
                "description": "Category options removed by rules, keyed by coverage ID"
              },
              "coverages_hidden_questions": {
                "type": "object",
                "description": "Questions hidden by rules, keyed by coverage ID"
              },
              "coverages_hidden_categories": {
                "type": "object",
                "description": "Categories hidden by rules, keyed by coverage ID"
              },
              "failed_rules": {
                "type": "array",
                "description": "List of validation errors from failed rules",
                "items": {
                  "type": "object"
                }
              }
            }
          }
        }
      },
      "response-save_definition_quick_code_value_toggle": {
        "type": "object",
        "description": "Response payload for /api/v2/quick_code_values/save_definition_quick_code_value_toggle.",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the toggle was saved successfully"
          },
          "data": {
            "type": "object",
            "description": "Endpoint payload wrapped by the api_request response envelope",
            "properties": {
              "success": {
                "type": "boolean",
                "description": "Whether the toggle was saved successfully"
              },
              "message": {
                "type": "string",
                "description": "Human-readable summary of the toggle result"
              }
            }
          },
          "messages": {
            "type": [
              "array",
              "object"
            ],
            "description": "Human messages on success (array) or errors (object)",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "success"
        ]
      },
      "response-save_html_template": {
        "type": "object",
        "description": "Response payload for /api/v2/deliverables/save_html_template",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "ID of the template"
              },
              "name": {
                "type": "string",
                "description": "The name of the template"
              },
              "html": {
                "type": "string",
                "description": "The HTML string (Jinja template)"
              },
              "description": {
                "type": "string",
                "description": "The description of the template"
              },
              "preview_object": {
                "type": "string",
                "description": "The preview object for the template"
              },
              "use_new_html_render": {
                "type": "boolean",
                "description": "Whether or not to use the new render.py to render the Jinja template."
              },
              "use_new_pdf_render": {
                "type": "boolean",
                "description": "Whether or not to use the new render.py to render the PDF deliverable."
              },
              "show_as_custom_deliverable": {
                "type": "boolean",
                "description": "Whether the template should be shown as a custom deliverable in the UI."
              },
              "enabled": {
                "type": "boolean",
                "description": "Whether the template is enabled or not."
              },
              "x_report_location_id": {
                "type": "string",
                "description": "The ID of the report location to use for the template"
              },
              "date_created": {
                "type": "string",
                "format": "date-time",
                "description": "The date and time when the template was created"
              },
              "date_updated": {
                "type": "string",
                "format": "date-time",
                "description": "The date and time when the template was last updated"
              }
            },
            "required": [
              "id",
              "name",
              "html",
              "use_new_html_render",
              "use_new_pdf_render",
              "enabled",
              "date_created",
              "date_updated"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-save_remove_value_from_definitions_and_deactivate": {
        "type": "object",
        "description": "Response payload for /api/v2/quick_code_values/save_remove_value_from_definitions_and_deactivate.",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the bulk removal and deactivation succeeded"
          },
          "data": {
            "type": "object",
            "description": "Endpoint payload wrapped by the api_request response envelope",
            "properties": {
              "success": {
                "type": "boolean",
                "description": "Whether the bulk removal and deactivation succeeded"
              },
              "removed_from": {
                "type": "array",
                "description": "Policy type definition codes the value was removed from; empty when none overrode it",
                "items": {
                  "type": "string"
                }
              },
              "message": {
                "type": "string",
                "description": "Human-readable summary of the result"
              }
            }
          },
          "messages": {
            "type": [
              "array",
              "object"
            ],
            "description": "Human messages on success (array) or errors (object)",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "success"
        ]
      },
      "response-save_reset_definition_quick_code_values": {
        "type": "object",
        "description": "Response payload for /api/v2/quick_code_values/save_reset_definition_quick_code_values.",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the reset succeeded"
          },
          "data": {
            "type": "object",
            "description": "Endpoint payload wrapped by the api_request response envelope",
            "properties": {
              "success": {
                "type": "boolean",
                "description": "Whether the reset succeeded"
              },
              "cleared_count": {
                "type": "integer",
                "description": "Override rows removed; zero when the definition already inherited the global values",
                "minimum": 0
              },
              "message": {
                "type": "string",
                "description": "Human-readable summary of the result"
              }
            }
          },
          "messages": {
            "type": [
              "array",
              "object"
            ],
            "description": "Human messages on success (array) or errors (object)",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "success"
        ]
      },
      "response-search_names_emails": {
        "type": "object",
        "title": "Search Names Emails Response",
        "description": "Response schema for /api/v2/contacts/search_names_emails",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "data": {
            "type": "array",
            "description": "Array of search results containing contact information",
            "items": {
              "type": "object",
              "properties": {
                "email": {
                  "type": "string",
                  "description": "Email address of the contact",
                  "format": "email"
                },
                "name": {
                  "type": "string",
                  "description": "Full name of the contact"
                },
                "contact_id": {
                  "type": "string",
                  "description": "Unique identifier of the contact"
                }
              },
              "required": [
                "email",
                "name",
                "contact_id"
              ]
            }
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "success",
          "data",
          "messages"
        ]
      },
      "response-search_recovery_candidates": {
        "type": "object",
        "description": "Response schema for /api/v2/deliverables/search_recovery_candidates",
        "properties": {
          "data": {
            "type": "array",
            "description": "List of broken deliverable candidates matching the search filters.",
            "items": {
              "type": "object",
              "properties": {
                "candidate_id": {
                  "type": "string",
                  "description": "Stable identifier for the candidate, e.g. 'file:uuid' or 'folder:uuid'."
                },
                "candidate_type": {
                  "type": "string",
                  "enum": [
                    "file",
                    "folder"
                  ],
                  "description": "Whether the broken record is a file or an empty folder."
                },
                "original_file_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid",
                  "description": "ID of the broken File record, if applicable."
                },
                "original_folder_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid",
                  "description": "ID of the parent deliverable folder."
                },
                "reference_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid",
                  "description": "ID of the associated policy or claim."
                },
                "reference_type": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Type of the reference object, e.g. 'policies' or 'claims'."
                },
                "revision_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "display_reference": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Human-readable reference number (e.g. policy number)."
                },
                "label": {
                  "type": "string",
                  "description": "Report type label, e.g. 'Declaration'."
                },
                "title": {
                  "type": "string",
                  "description": "File or folder title."
                },
                "print_date": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date"
                },
                "actual_print_date": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date"
                },
                "sub_type": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Deliverable sub-type, e.g. 'New Policy', 'Renewal', 'Endorsement'."
                },
                "failure_reasons": {
                  "type": "array",
                  "description": "One or more failure reasons detected for this candidate.",
                  "items": {
                    "type": "string",
                    "enum": [
                      "empty_s3_file_content",
                      "zero_sized_file_record",
                      "mismatched_size_record",
                      "empty_folder"
                    ]
                  }
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "detected",
                    "original_job_found",
                    "queued",
                    "running",
                    "succeeded",
                    "failed",
                    "skipped"
                  ],
                  "description": "Current status of the candidate."
                },
                "message": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "background_job_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid",
                  "description": "ID of the original create_deliverable BackgroundJob if found."
                },
                "db_size": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "description": "File size as stored in the DB."
                },
                "s3_content_length": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "description": "File size as returned by S3 head-object."
                }
              },
              "required": [
                "candidate_id",
                "candidate_type",
                "label",
                "title",
                "failure_reasons",
                "status"
              ]
            }
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful."
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request."
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Base error message(s)."
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-select_my_role": {
        "description": "Response payload for /api/v2/auth/select_my_role.",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "code": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "OAUTH_GRANT_REQUIRED",
                        "ROLE_NOT_ASSIGNED",
                        "ROLE_ALREADY_SELECTED"
                      ]
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ]
          },
          "data": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "selected_role": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "name"
                    ]
                  },
                  "selection_status": {
                    "type": "string",
                    "enum": [
                      "created",
                      "matched"
                    ]
                  }
                },
                "required": [
                  "selected_role",
                  "selection_status"
                ]
              },
              {
                "type": "array",
                "maxItems": 0,
                "items": {}
              }
            ]
          }
        },
        "required": [
          "success",
          "messages",
          "data"
        ]
      },
      "response-send_payment_receipt_email": {
        "type": "object",
        "description": "Response schema for /api/v2/payments/send_payment_receipt_email",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request succeeded"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Validation or error messages"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Result when success is true",
            "properties": {
              "recipient_email": {
                "type": "string",
                "format": "email",
                "description": "Email address the receipt was sent to"
              },
              "file_id": {
                "type": "string",
                "format": "uuid",
                "description": "UUID of the document actually attached: the stored per-policy receipt for a single-policy payment, or the group confirmation built for this send when the payment covers several policies"
              },
              "policy_number": {
                "type": "string",
                "description": "Policy number from the request; validated to belong to the payment, does not select the attached document"
              },
              "attachment_filename": {
                "type": "string",
                "description": "Filename of the attached confirmation document"
              }
            },
            "required": [
              "recipient_email",
              "file_id",
              "policy_number",
              "attachment_filename"
            ]
          }
        },
        "required": [
          "success",
          "messages",
          "data"
        ]
      },
      "response-send_scheduled_alerts": {
        "type": "object",
        "description": "Response Schema for /api/v2/alerts/send_scheduled_alerts",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "sent_count": {
                "type": "integer",
                "description": "Number of alerts successfully sent"
              },
              "skipped_count": {
                "type": "integer",
                "description": "Number of alerts skipped (missing note, invalid email, etc.)"
              },
              "error_count": {
                "type": "integer",
                "description": "Number of alerts that failed to send"
              }
            },
            "required": [
              "sent_count",
              "skipped_count",
              "error_count"
            ]
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-set_binder_to_active": {
        "type": "object",
        "description": "Response payload for /api/v2/policies/set_binder_to_active",
        "properties": {
          "data": {
            "type": "array",
            "description": "Data related to the request",
            "items": {
              "type": "object"
            }
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-set_html_templates_locations": {
        "type": "object",
        "description": "Response schema for /api/v2/deliverables/set_html_templates_locations",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "templates": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string"
                    },
                    "location_ids": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid"
                      }
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "location_ids"
                  ]
                }
              }
            },
            "required": []
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-simulate_rule": {
        "type": "object",
        "description": "Response payload for /api/v2/rules/simulate_rule.",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the API call succeeded"
          },
          "messages": {
            "description": "API messages or validation errors",
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "additionalProperties": true
              }
            ]
          },
          "data": {
            "description": "Simulation result data, or an empty array when request validation fails",
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "success": {
                    "type": "boolean",
                    "description": "Whether the simulation completed without errors"
                  },
                  "would_fire": {
                    "type": "boolean",
                    "description": "Whether the rule's triggers would fire for the given revision"
                  },
                  "trigger_results": {
                    "type": "array",
                    "description": "Per-trigger evaluation results",
                    "items": {
                      "type": "object",
                      "properties": {
                        "trigger_id": {
                          "type": "string",
                          "format": "uuid",
                          "description": "UUID of the trigger"
                        },
                        "trigger_type": {
                          "type": "string",
                          "description": "Type of trigger"
                        },
                        "label_name": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Label name of the trigger"
                        },
                        "value": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Serialized trigger value"
                        },
                        "fired": {
                          "type": "boolean",
                          "description": "Whether this trigger evaluated to true"
                        },
                        "risk_names": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Names of the risks where this trigger fired"
                        }
                      },
                      "required": [
                        "trigger_id",
                        "trigger_type",
                        "fired",
                        "risk_names"
                      ]
                    }
                  },
                  "effects_preview": {
                    "type": "array",
                    "description": "Per-risk grouped effect previews",
                    "items": {
                      "type": "object",
                      "properties": {
                        "risk_name": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Risk name for this effect group, or null for revision-level effects"
                        },
                        "effects": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "effect_id": {
                                "type": "string",
                                "format": "uuid",
                                "description": "UUID of the effect"
                              },
                              "action": {
                                "type": "string",
                                "description": "Effect action type"
                              },
                              "label_name": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Label name of the effect"
                              },
                              "target_id": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "uuid",
                                "description": "Target policy type item ID, if applicable"
                              },
                              "value": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Effect value"
                              },
                              "changes_made": {
                                "type": "boolean",
                                "description": "Whether the effect would make changes during simulation"
                              },
                              "description": {
                                "type": "string",
                                "description": "Human-readable description of what the effect would do"
                              },
                              "risk_name": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Risk name for this individual effect preview"
                              }
                            },
                            "required": [
                              "effect_id",
                              "action",
                              "changes_made",
                              "description"
                            ]
                          }
                        }
                      },
                      "required": [
                        "risk_name",
                        "effects"
                      ]
                    }
                  },
                  "execution_time_ms": {
                    "type": "integer",
                    "description": "Simulation duration in milliseconds"
                  },
                  "error": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "description": "Error details if simulation failed, null otherwise",
                    "properties": {
                      "message": {
                        "type": "string",
                        "description": "Human-readable error message"
                      },
                      "type": {
                        "type": "string",
                        "description": "Exception type name"
                      },
                      "traceback": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Filtered stack trace or null"
                      }
                    },
                    "required": [
                      "message",
                      "type"
                    ]
                  }
                },
                "required": [
                  "success",
                  "would_fire",
                  "trigger_results",
                  "effects_preview",
                  "execution_time_ms",
                  "error"
                ]
              },
              {
                "type": "array",
                "items": {},
                "maxItems": 0
              }
            ]
          }
        },
        "required": [
          "success",
          "messages",
          "data"
        ]
      },
      "response-sort_calculated_field": {
        "description": "Response payload for /api/v2/document_templates/sort_calculated_field",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object"
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "success": {
                "type": "boolean"
              }
            },
            "required": [
              "success"
            ]
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-store_claims_search": {
        "type": "object",
        "description": "Response Schema for /api/v2/claims/store_claims_search",
        "properties": {
          "request_id": {
            "type": "string",
            "description": "Unique identifier for the original request"
          },
          "status": {
            "type": "string",
            "enum": [
              "Success",
              "Failed",
              "Timeout"
            ],
            "description": "Processed status of the callback"
          },
          "match_count": {
            "type": "integer",
            "description": "Number of matches found",
            "minimum": 0
          }
        },
        "required": [
          "request_id",
          "status",
          "match_count"
        ]
      },
      "response-store_config": {
        "type": "object",
        "description": "Response for /api/v2/convenience_fees/store_config. Echoes the scope that was written.",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Field-keyed error messages"
              }
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Whether the operation was successful. False when the caller lacks admin permission or disclosure_style is outside the allowed enum."
          },
          "data": {
            "type": "object",
            "properties": {
              "location_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "Echo of the scope written (null = Global)."
              }
            },
            "required": [
              "location_id"
            ]
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-store_contact_legal_entity_type": {
        "description": "Response payload for /api/v2/contacts/store_contact_legal_entity_type.",
        "oneOf": [
          {
            "description": "Standard success/error envelope from @api_request (standard_response / standard_error).",
            "type": "object",
            "properties": {
              "messages": {
                "oneOf": [
                  {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Any messages or errors related to the request"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "_base_": {
                        "type": "array",
                        "description": "Base error message(s)",
                        "items": {
                          "type": "string"
                        }
                      }
                    },
                    "additionalProperties": {
                      "oneOf": [
                        {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "description": "Any messages or errors related to the request"
                  }
                ]
              },
              "data": {
                "description": "Empty object on success (the value is persisted server-side); an empty array on error responses, per the standard_error envelope.",
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {}
                  },
                  {
                    "type": "array",
                    "maxItems": 0,
                    "items": {}
                  }
                ]
              },
              "success": {
                "type": "boolean"
              }
            },
            "required": [
              "messages",
              "data",
              "success"
            ]
          },
          {
            "description": "Permission-denied envelope returned by @protect_contact_records (permissions_denied), which sits outside @api_request and carries no messages/data.",
            "type": "object",
            "properties": {
              "permissionDenied": {
                "const": true
              },
              "success": {
                "const": false
              }
            },
            "required": [
              "permissionDenied",
              "success"
            ]
          }
        ]
      },
      "response-store_payment": {
        "description": "Response schema for /api/v2/payments/store_payment",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier for the payment."
          },
          "confirmation_number": {
            "type": "string",
            "description": "Confirmation number for the payment transaction."
          },
          "receipt_file_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "List of file IDs for payment receipts."
          },
          "policy_numbers": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "List of policy numbers associated with the payment."
          },
          "vendor_message": {
            "type": "string",
            "description": "Message from the payment vendor about the transaction status."
          }
        },
        "required": [
          "id",
          "confirmation_number",
          "receipt_file_ids",
          "policy_numbers",
          "vendor_message"
        ]
      },
      "response-store_payment_nsf": {
        "description": "Response schema for /api/v2/payments/store_payment_nsf",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the operation was successful."
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "List of messages from the operation."
          },
          "data": {
            "$ref": "#/components/schemas/payment-def",
            "description": "Payment data returned from the operation."
          }
        },
        "required": [
          "success",
          "messages",
          "data"
        ]
      },
      "response-sync_underlying_policy_changes": {
        "type": "object",
        "description": "Response payload for /api/v2/policies/sync_underlying_policy_changes",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "data": {
            "type": "object",
            "properties": {
              "message": {
                "type": "string"
              }
            }
          }
        },
        "required": [
          "success"
        ]
      },
      "response-terms_accept": {
        "type": "object",
        "description": "Response payload for /api/v2/terms/accept - confirmation of the recorded acceptance. Idempotent per (contact, document, version): a retried acceptance returns the row already on file rather than failing, and writes no second audit note. Validation failures are returned in this same envelope with success:false at HTTP 200, not as a non-2xx status.",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "description": "On failure. A `version` key means the submitted version is no longer current: the page is stale and should be reloaded rather than re-submitted. `_base_` carries general failures (impersonating, no access to the feature, unknown key). `_service_` carries a sanitized persistence failure.",
                "properties": {
                  "version": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "The notice changed since the page was loaded"
                  },
                  "_base_": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "_service_": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "The recorded acceptance. On a site where reports.enable-sql-editor-terms is off the notice is not in force: no acceptance row and no audit note are written, and this reports the registered version rather than the submitted one, so an already-open dialog can close instead of erroring.",
            "properties": {
              "accepted": {
                "type": "boolean",
                "description": "Always true on success. True also means \"nothing to accept\" on a site with the notice switched off, where no acceptance was recorded."
              },
              "terms_key": {
                "type": "string",
                "description": "Identifier of the accepted terms document"
              },
              "version": {
                "type": "string",
                "description": "Content hash of the registered notice. While the notice is in force this is the version just stored, which always equals the submitted one because a mismatch is rejected. On a site with reports.enable-sql-editor-terms off nothing is stored, and this reports the registered version rather than the submitted one -- so it is the registered version in both cases, never an echo of unvalidated input."
              }
            },
            "required": [
              "accepted",
              "terms_key",
              "version"
            ]
          }
        },
        "required": [
          "success"
        ]
      },
      "response-terms_status": {
        "type": "object",
        "description": "Response payload for /api/v2/terms/status - the acceptance state of a terms document for the current user, plus the notice text to display.",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Acceptance state for the requested terms document",
            "properties": {
              "accepted": {
                "type": "boolean",
                "description": "True when the caller should not be prompted. Normally that means an acceptance exists for current_version -- not \"the most recent acceptance matches\": if a notice edit is reverted, the current hash is one the user already accepted while their latest row is the intervening revision, and they must not be re-gated. It is also true, with no acceptance row, when the notice does not apply: the site has reports.enable-sql-editor-terms off, or the caller cannot reach the SQL Editor."
              },
              "current_version": {
                "type": "string",
                "description": "Content hash of the notice text. Editing the notice changes this value, which re-prompts users automatically; there is no version number to maintain."
              },
              "text": {
                "type": "string",
                "description": "The notice itself, as Markdown"
              },
              "effective_date": {
                "type": "string",
                "description": "Human-facing effective date (YYYY-MM-DD). Displayed only; not used for gating."
              },
              "previously_accepted_older_version": {
                "type": "boolean",
                "description": "True when the user has a prior acceptance whose hash differs from current_version, i.e. the notice changed since they last agreed. Lets the client say 'we've updated our terms' rather than presenting it as a first-time notice."
              }
            },
            "required": [
              "accepted",
              "current_version",
              "text",
              "effective_date",
              "previously_accepted_older_version"
            ]
          }
        },
        "required": [
          "success"
        ]
      },
      "response-test_expression": {
        "description": "Response payload for /api/v2/document_templates/test_expression",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object"
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "success": {
                "type": "boolean",
                "description": "Whether the expression evaluated successfully"
              },
              "results": {
                "type": [
                  "array",
                  "null"
                ],
                "items": {},
                "description": "Evaluation results (one per path item, or single for root)"
              },
              "errors": {
                "type": [
                  "array",
                  "null"
                ],
                "items": {
                  "type": "string"
                },
                "description": "Error messages if evaluation failed"
              }
            },
            "required": [
              "success"
            ]
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-trigger_scheduled_claims_research": {
        "type": "object",
        "description": "Response Schema for /api/v2/claims/trigger_scheduled_claims_research",
        "properties": {
          "triggered": {
            "type": "integer",
            "description": "Number of celery tasks dispatched",
            "minimum": 0
          },
          "claims": {
            "type": "array",
            "description": "Eligible claims for which celery tasks were dispatched",
            "items": {
              "type": "object",
              "properties": {
                "claim_id": {
                  "type": "string",
                  "description": "UUID of the claim"
                },
                "claim_number": {
                  "type": "string",
                  "description": "Human-readable claim number"
                }
              },
              "required": [
                "claim_id",
                "claim_number"
              ]
            }
          }
        },
        "required": [
          "triggered",
          "claims"
        ]
      },
      "response-unassign_business_location": {
        "description": "Response payload for /api/v2/brands/unassign_business_location",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "success"
        ]
      },
      "response-unassign_policy_type_definition": {
        "description": "Response payload for /api/v2/brands/unassign_policy_type_definition",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "success"
        ]
      },
      "response-update_additional_interest": {
        "description": "Response payload for /api/v2/additional_interests/update_additional_interest.",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ]
          },
          "data": {
            "$ref": "#/components/schemas/additional_interest-def"
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-update_additional_interest_associations": {
        "description": "Response payload for /api/v2/additional_interests/update_additional_interest_associations. Returns the updated additional interest with its current associations list.",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ]
          },
          "data": {
            "$ref": "#/components/schemas/additional_interest-def"
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-update_adjuster_assignment_config": {
        "description": "Response payload for /api/v2/claim_adjuster_assignment_configs/update_adjuster_assignment_config",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "$ref": "#/components/schemas/adjuster_assignment-def"
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-update_adjuster_license": {
        "description": "Response payload for /api/v2/contacts/update_adjuster_license.",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request was successful"
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Any messages or errors related to the request"
          },
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "UUID of the license"
              },
              "contact_id": {
                "type": "string",
                "format": "uuid",
                "description": "UUID of the contact"
              },
              "business_location_id": {
                "type": "string",
                "format": "uuid",
                "description": "UUID of the business location"
              },
              "business_location_name": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Name of the business location (state)"
              },
              "business_location_abbreviation": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Abbreviation of the business location (state)"
              },
              "license_number": {
                "type": "string",
                "description": "License number"
              },
              "effective_date": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Effective date in YYYY-MM-DD format"
              },
              "expiration_date": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Expiration date in YYYY-MM-DD format"
              },
              "date_added": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Date added in YYYY-MM-DD HH:MM:SS format"
              }
            }
          }
        }
      },
      "response-update_billing_schedule": {
        "type": "object",
        "description": "Response schema for api/v2/policies/update_billing_schedule",
        "properties": {
          "data": {
            "type": "object",
            "description": "Empty object when successful"
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-update_brand": {
        "description": "Response payload for /api/v2/brands/update_brand",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "$ref": "#/components/schemas/brand-def"
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-update_calculated_field": {
        "description": "Response payload for /api/v2/document_templates/update_calculated_field",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object"
              }
            ]
          },
          "data": {
            "$ref": "#/components/schemas/calculated_field-def"
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-update_carbone_custom_deliverable": {
        "type": "object",
        "description": "Response payload for /api/v2/settings/update_carbone_custom_deliverable.",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "The updated Carbone deliverable template (CarboneDeliverableModel).",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "location_id": {
                "type": "string",
                "format": "uuid"
              },
              "policy_type_name": {
                "type": "string"
              },
              "custom_name": {
                "type": "string"
              },
              "module": {
                "type": "string",
                "enum": [
                  "claims",
                  "policies"
                ]
              },
              "carbone_template_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "source_file_name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "draft_carbone_template_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "draft_source_file_name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "print_on_initial_dec": {
                "type": "boolean"
              },
              "print_on_renewal_dec": {
                "type": "boolean"
              },
              "print_on_non_autopay": {
                "type": "boolean"
              },
              "generated_per": {
                "type": "string"
              },
              "allow_britequote_creation": {
                "type": "boolean"
              },
              "overwrite_stock": {
                "type": "boolean"
              },
              "use_dynamic_fields": {
                "type": "boolean"
              },
              "deleted": {
                "type": "boolean"
              },
              "report_id": {
                "type": "string",
                "format": "uuid"
              },
              "esign_enabled": {
                "type": "boolean"
              },
              "send_dec": {
                "type": "boolean"
              },
              "default_print_state": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "requires_user_input": {
                "type": "boolean"
              },
              "last_preview_entity_number": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          }
        },
        "required": [
          "success",
          "messages",
          "data"
        ]
      },
      "response-update_claim_estimation": {
        "type": "object",
        "description": "Response Schema for /api/v2/claim_estimations/update_claim_estimation",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/claim_estimation-def"
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-update_copilot_skill": {
        "type": "object",
        "description": "Response schema for /api/v2/copilot_skills/update_copilot_skill",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "skill": {
                "$ref": "#/components/schemas/copilot_skill-def"
              }
            },
            "required": [
              "skill"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ],
            "description": "Any messages or errors related to the request"
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-update_dispute": {
        "type": "object",
        "description": "Response Schema for /api/v2/disputes/update_dispute",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/dispute-def"
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-update_exported_check_details": {
        "description": "Response schema for /api/v2/disbursements/update_exported_check_details",
        "type": "object",
        "properties": {
          "data": {
            "description": "On success, the updated/failed payload. Request-level errors use the standard v2 envelope with an empty array.",
            "oneOf": [
              {
                "type": "array",
                "maxItems": 0,
                "items": {}
              },
              {
                "type": "object",
                "properties": {
                  "updated": {
                    "type": "array",
                    "description": "Rows that were written.",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "payment_type": {
                          "enum": [
                            "return_premium",
                            "claim_payment",
                            "commission_payment"
                          ]
                        },
                        "check_number": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "check_date": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "YYYY-MM-DD, or YYYY-MM-DD HH:MM:SS when a time was stored."
                        },
                        "cleared_date": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "YYYY-MM-DD, or YYYY-MM-DD HH:MM:SS when a time was stored."
                        }
                      },
                      "required": [
                        "id",
                        "payment_type",
                        "check_number",
                        "check_date",
                        "cleared_date"
                      ]
                    }
                  },
                  "failed": {
                    "type": "array",
                    "description": "Per-row errors. One bad row does not roll back the rest of the batch.",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "error": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "error"
                      ]
                    }
                  }
                },
                "required": [
                  "updated",
                  "failed"
                ]
              }
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ],
            "description": "Any messages or errors related to the request"
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-update_exposure": {
        "description": "Response payload for /api/v2/claim_exposures/update_exposure - Returns the updated exposure",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "Updated exposure object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "claim_id": {
                "type": "string",
                "format": "uuid"
              },
              "coverage_id": {
                "type": "string",
                "format": "uuid"
              },
              "loss_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "claimant_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "loss_type": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          }
        },
        "required": [
          "success",
          "messages",
          "data"
        ]
      },
      "response-update_form_on_policy_type": {
        "description": "Response payload for /api/v2/lines/update_form_on_policy_type.",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "file": {
                "type": "object",
                "description": "The updated File record."
              },
              "metadata": {
                "type": [
                  "object",
                  "null"
                ],
                "description": "The created/updated x_policy_types_docs record, or null if no metadata was supplied."
              }
            },
            "required": [
              "file",
              "metadata"
            ]
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-update_form_on_policy_type_item": {
        "description": "Response payload for /api/v2/lines/update_form_on_policy_type_item.",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "file": {
                "type": "object",
                "description": "The updated File record."
              },
              "metadata": {
                "type": [
                  "object",
                  "null"
                ],
                "description": "The created/updated x_policy_type_items_docs record, or null if no metadata was supplied."
              }
            },
            "required": [
              "file",
              "metadata"
            ]
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-update_insight": {
        "type": "object",
        "description": "Response payload for /api/v2/insights/update_insight.",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "additionalProperties": true
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "insight": {
                "$ref": "#/components/schemas/insight-def"
              }
            },
            "required": [
              "insight"
            ]
          }
        },
        "required": [
          "success",
          "messages",
          "data"
        ]
      },
      "response-update_payment": {
        "description": "Response payload for /api/v2/claim_exposures/update_payment.",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/claim_exposure_payment-def"
              },
              {
                "type": "null"
              }
            ],
            "description": "The payment object ClaimExposurePaymentModel or null if authority limits broken"
          },
          "success": {
            "type": "boolean"
          },
          "brokenLimits": {
            "type": [
              "array",
              "null"
            ],
            "description": "List of broken authority limits if any",
            "items": {
              "type": "object"
            }
          },
          "adminData": {
            "type": [
              "object",
              "null"
            ],
            "description": "Admin data for authority limit override if any"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-update_policy_type_claims_tab_visibility": {
        "title": "UpdatePolicyTypeClaimsTabVisibilityResponse",
        "type": "object",
        "description": "Response schema for /api/v2/lines/update_policy_type_claims_tab_visibility",
        "properties": {
          "data": {
            "type": "array",
            "description": "Empty array",
            "items": {
              "type": "object"
            }
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-update_quick_quote_template": {
        "type": "object",
        "description": "Response schema for /api/v2/quick_quote_templates/update_quick_quote_template",
        "properties": {
          "data": {
            "type": "object",
            "description": "The updated Quick Quote Template",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "Unique identifier for the Quick Quote Template"
              },
              "name": {
                "type": "string",
                "description": "The name of the Quick Quote Template"
              },
              "quote_template": {
                "type": "object",
                "description": "Quote-wide data containing coverage items",
                "properties": {
                  "items": {
                    "type": "array",
                    "description": "List of coverage items",
                    "items": {
                      "type": "object",
                      "description": "Coverage item definition"
                    }
                  }
                }
              },
              "template_risk_values": {
                "type": "array",
                "description": "List of template risk default values",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "quick_quote_template_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "risk_defaults": {
                      "type": "object"
                    },
                    "risk_type": {
                      "type": "string"
                    },
                    "version": {
                      "type": "integer"
                    }
                  }
                }
              },
              "policy_type_ids": {
                "type": "array",
                "description": "List of policy type IDs associated with this template",
                "items": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            },
            "required": [
              "id",
              "name",
              "quote_template",
              "template_risk_values",
              "policy_type_ids"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Validation errors organized by field"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-update_quote_details": {
        "description": "Response payload for /api/v2/policies/update_quote_details. The data envelope matches CreateFullQuoteResponseModel (the same shape returned by create_full_quote, modify_full_quote, and bind_full_quote) so callers can chain off it without re-fetching. Per-update warnings appear under messages._warning_.",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Top-level error messages (revision not found, validation failures, etc.)"
                  },
                  "_warning_": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Per-update warnings. Two categories: (a) resolution failures (name didn't match, ambiguous fragment, ambiguous allow-multiple instance, invalid category value, unsupported question input_type), and (b) values that were applied but carry an underwriting block (Disallow answers on List questions, yes_no_prevent_continue answers on revision-level UW questions). The category (b) values are STORED (matching UI behavior); the bind block itself is enforced at bind time by the 'policies'/'enforce-business-rules-at-bind' tenant advanced setting (default off)."
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ]
          },
          "data": {
            "description": "Current full-quote state after the PATCH was applied. Shape matches CreateFullQuoteResponseModel (the same shape returned by create_full_quote, modify_full_quote, and bind_full_quote).",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/full_quote-def"
              }
            ]
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-update_rating_table": {
        "title": "UpdateRatingTableResponse",
        "type": "object",
        "description": "Response schema for /api/v2/lines/update_rating_table",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "Rating Table ID"
              },
              "date_added": {
                "type": "string",
                "format": "date-time",
                "description": "Date and time the rating table was updated"
              },
              "added_by": {
                "type": "string",
                "format": "uuid",
                "description": "User ID who performed the update"
              },
              "added_by_contact": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "User ID"
                  },
                  "name": {
                    "type": "string",
                    "description": "User name"
                  }
                }
              },
              "effective_date": {
                "type": "string",
                "format": "date",
                "description": "Effective date of the rating table (preserved from original)"
              },
              "expiration_date": {
                "type": "string",
                "format": "date",
                "description": "Expiration date of the rating table (preserved from original)"
              },
              "renewal_effective_date": {
                "type": "string",
                "format": "date",
                "description": "Renewal effective date of the rating table (preserved from original)"
              },
              "renewal_expiration_date": {
                "type": "string",
                "format": "date",
                "description": "Renewal expiration date of the rating table (preserved from original)"
              },
              "file_id": {
                "type": "string",
                "format": "uuid",
                "description": "ID of the new file"
              },
              "ingestion_job_id": {
                "type": "string",
                "format": "uuid",
                "description": "ID of the new ingestion job"
              },
              "ingestion_job": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Ingestion job ID"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "pending",
                      "processing",
                      "success",
                      "error"
                    ],
                    "description": "Status of the ingestion job"
                  },
                  "errors": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "List of errors if any occurred during processing"
                  }
                }
              },
              "state": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "State/location ID"
                  },
                  "name": {
                    "type": "string",
                    "description": "State/location name"
                  }
                }
              }
            },
            "required": [
              "id",
              "date_added",
              "added_by",
              "effective_date",
              "file_id",
              "ingestion_job_id"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Whether the operation was successful"
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "List of informational messages"
          }
        },
        "required": [
          "data",
          "success"
        ]
      },
      "response-update_revision_billing_schedule": {
        "type": "object",
        "description": "Response payload for POST /api/v2/coverages/update_revision_billing_schedule. The endpoint only stages the change on the revision; no body data is returned. On a validation error (invalid policy/billing_schedule/revision id, or no policy term) success is false and messages carries the detail.",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Structured messages keyed by source (e.g. _base_)"
              }
            ]
          },
          "data": {
            "type": "null",
            "description": "No data is returned; the schedule change (and any preserve/regenerate choice) is staged on the revision and applied at commit."
          },
          "success": {
            "type": "boolean",
            "description": "True when the change was staged successfully."
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-update_rule": {
        "type": "object",
        "description": "Response payload for /api/v2/rules/update_rule. Returns the full updated rule with all fields, triggers, effects, and conflicting_rules.",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "Rule UUID"
              },
              "reference_id": {
                "type": "string",
                "format": "uuid",
                "description": "Reference UUID"
              },
              "policy_type_id": {
                "type": "string",
                "format": "uuid",
                "description": "Policy type UUID"
              },
              "name": {
                "type": "string",
                "description": "Rule name"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Rule description"
              },
              "category": {
                "type": "string",
                "description": "Rule category (policy, property, vehicle, etc.)"
              },
              "module": {
                "type": "string",
                "description": "Module the rule applies to"
              },
              "severity": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Severity level for STP rules"
              },
              "waiver_behavior": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Waiver behavior for STP rules"
              },
              "waiver_terms": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Number of terms for waiver"
              },
              "enabled_for_renewal": {
                "type": "boolean",
                "description": "Whether rule runs on renewals"
              },
              "enabled_for_endorsement": {
                "type": "boolean",
                "description": "Whether rule runs on endorsements"
              },
              "enabled_for_new_business": {
                "type": "boolean",
                "description": "Whether rule runs on new business"
              },
              "sort_order": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Rule sort order"
              },
              "valid_from_date": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date",
                "description": "Start date for rule validity"
              },
              "valid_to_date": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date",
                "description": "End date for rule validity"
              },
              "properties_affected": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Which properties are affected"
              },
              "exception_type": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Exception type (include/exclude)"
              },
              "exception_agencies": {
                "type": [
                  "array",
                  "null"
                ],
                "items": {
                  "type": "string"
                },
                "description": "List of agency exceptions"
              },
              "event": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Event type for events module rules"
              },
              "deleted": {
                "type": "boolean",
                "description": "Soft delete flag"
              },
              "triggers": {
                "type": "array",
                "description": "Array of rule triggers",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "policy_type_item_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "trigger_type": {
                      "type": "string"
                    },
                    "label_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "value": {
                      "type": [
                        "array",
                        "null"
                      ],
                      "items": {
                        "type": "string"
                      }
                    },
                    "sort_order": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    }
                  }
                }
              },
              "effects": {
                "type": "array",
                "description": "Array of rule effects",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "target_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "action": {
                      "type": "string"
                    },
                    "label_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "value": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "mandatory": {
                      "type": "boolean"
                    },
                    "hard_reverse": {
                      "type": "boolean"
                    },
                    "hide_category": {
                      "type": "boolean"
                    },
                    "popup_message": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "sort_order": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    }
                  }
                }
              },
              "conflicting_rules": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Names of any rules that may conflict with this rule"
              }
            }
          }
        }
      },
      "response-update_selection": {
        "type": "object",
        "title": "Update Credit Score Selection Response",
        "description": "Response containing the results of updating a credit score selection",
        "properties": {
          "policy_term_id": {
            "type": "string",
            "description": "The ID of the policy term that was updated"
          },
          "revision_id": {
            "type": "string",
            "description": "The ID of the revision"
          },
          "selected_option": {
            "type": "string",
            "enum": [
              "historical",
              "calculated"
            ],
            "description": "The selected credit score option type"
          },
          "applied_score": {
            "type": "string",
            "description": "The credit score that was applied to the term"
          },
          "applied_tier": {
            "type": "string",
            "description": "The credit tier corresponding to the applied score"
          },
          "previous_score": {
            "type": [
              "string",
              "null"
            ],
            "description": "The previous credit score value, if any"
          },
          "note_id": {
            "type": "string",
            "description": "The ID of the note created for this change"
          }
        },
        "required": [
          "policy_term_id",
          "revision_id",
          "selected_option",
          "applied_score",
          "applied_tier",
          "previous_score",
          "note_id"
        ]
      },
      "response-update_task_definition": {
        "description": "Response payload for /api/v2/tasks/update_task_definition",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "The id of the task definition."
              },
              "name": {
                "type": "string",
                "description": "Task Name"
              },
              "created_date": {
                "type": "string",
                "format": "date-time",
                "description": "Task definition created date"
              },
              "created_by_id": {
                "type": "string",
                "format": "uuid",
                "description": "Task definition created by"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Task definition description"
              },
              "scope": {
                "type": "string",
                "enum": [
                  "claim",
                  "policy"
                ],
                "description": "The scope of the task definition."
              },
              "last_updated": {
                "type": "string",
                "format": "date-time",
                "description": "Task definition last updated date"
              }
            },
            "required": [
              "id",
              "name",
              "created_date",
              "created_by_id",
              "scope"
            ]
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-update_watercraft": {
        "type": "object",
        "description": "Response Schema for /api/v2/watercrafts/update_watercraft",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/watercraft-def"
          },
          "failed_rules": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Any business rules that failed during update"
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Any warnings generated during update"
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "failed_rules",
          "warnings",
          "success",
          "messages"
        ]
      },
      "response-user_has_permission": {
        "title": "UserHasPermissionResponse",
        "description": "Response schema for /api/v2/permissions/user_has_permission API endpoint",
        "properties": {
          "data": {
            "type": "boolean",
            "description": "Indicates if the user has the specified permission"
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        }
      },
      "response-validate_rule": {
        "type": "object",
        "description": "Response payload for /api/v2/rules/validate_rule",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the API call succeeded"
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Error messages if success is false"
          },
          "data": {
            "type": "object",
            "description": "Validation result",
            "properties": {
              "valid": {
                "type": "boolean",
                "description": "Whether the rule passed validation"
              },
              "errors": {
                "type": "object",
                "description": "Validation errors by field, empty object if valid",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "required": [
              "valid",
              "errors"
            ]
          }
        }
      },
      "response-validate_uploaded_files": {
        "type": "object",
        "description": "Response schema for /api/v2/imports/validate_uploaded_files",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Indicates if the API executed successfully (not validation status)"
          },
          "messages": {
            "type": "array",
            "description": "Summary messages about validation results",
            "items": {
              "type": "string"
            }
          },
          "data": {
            "type": "object",
            "description": "Validation results for all uploaded files",
            "properties": {
              "status": {
                "type": "string",
                "description": "Overall validation status",
                "enum": [
                  "all_passed",
                  "partial",
                  "all_failed"
                ]
              },
              "files": {
                "type": "array",
                "description": "List of validated files with results",
                "items": {
                  "type": "object",
                  "properties": {
                    "schema_type": {
                      "type": "string",
                      "description": "Schema identifier"
                    },
                    "filename": {
                      "type": "string",
                      "description": "Name of the uploaded CSV file"
                    },
                    "policy_type_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Policy type UUID (only present for dynamic schemas like 'policy_transactions')"
                    },
                    "row_count": {
                      "type": "integer",
                      "description": "Number of data rows (only present for validated files)",
                      "minimum": 1
                    },
                    "validation_errors": {
                      "type": "array",
                      "description": "List of validation errors (only present for failed files)",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "schema_type",
                    "filename"
                  ]
                }
              },
              "summary": {
                "type": "object",
                "description": "Validation summary statistics",
                "properties": {
                  "total_files": {
                    "type": "integer",
                    "description": "Total number of files processed",
                    "minimum": 0
                  },
                  "validated": {
                    "type": "integer",
                    "description": "Number of files that passed validation",
                    "minimum": 0
                  },
                  "failed": {
                    "type": "integer",
                    "description": "Number of files that failed validation",
                    "minimum": 0
                  }
                },
                "required": [
                  "total_files",
                  "validated",
                  "failed"
                ]
              }
            },
            "required": [
              "status",
              "files",
              "summary"
            ]
          }
        },
        "required": [
          "success",
          "messages",
          "data"
        ]
      },
      "response-vehicle_in_force_status": {
        "description": "Response payload for /api/v2/policies/vehicle_in_force_status",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "matches": {
                "type": "array",
                "description": "One entry per policy the vehicle is on as of as_of_date; empty when the VIN is not on any in-scope policy on that date",
                "items": {
                  "type": "object",
                  "properties": {
                    "policy_number": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Policy number of the matched policy"
                    },
                    "policy_type_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Policy type of the matched policy's revision; used by callers that filter client-side"
                    },
                    "in_force": {
                      "type": "boolean",
                      "description": "Whether the matched policy's coverage is active on as_of_date (lapse-aware: false for committed cancellations and dates inside a cancel/reinstate gap)"
                    }
                  },
                  "required": [
                    "policy_number",
                    "policy_type_id",
                    "in_force"
                  ]
                }
              }
            },
            "required": [
              "matches"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "response-vehicle_prefill_fallback": {
        "type": "object",
        "description": "Response Schema for /api/v2/vehicles/vehicle_prefill_fallback",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "symbol_comprehensive": {
                "type": "integer",
                "description": "The comprehensive symbol value"
              },
              "symbol_collision": {
                "type": "integer",
                "description": "The collision symbol value"
              },
              "symbol_liability": {
                "type": "string",
                "description": "The liability symbol value"
              },
              "symbol_medical_payments": {
                "type": "string",
                "description": "The medical payments symbol value"
              }
            },
            "required": [
              "symbol_comprehensive",
              "symbol_collision"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request was successful"
          },
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "properties": {
                  "_base_": {
                    "type": "array",
                    "description": "Base error message(s)",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          }
        },
        "required": [
          "data",
          "success",
          "messages"
        ]
      },
      "response-workflows_list_workflows": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "data": {
            "type": "object",
            "properties": {
              "workflows": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/workflow-def"
                }
              }
            },
            "required": [
              "workflows"
            ]
          }
        },
        "required": [
          "success",
          "messages",
          "data"
        ]
      },
      "response-workflows_publish_workflow": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "data": {
            "$ref": "#/components/schemas/workflow-def"
          }
        },
        "required": [
          "success",
          "messages",
          "data"
        ]
      },
      "response-write_off_agency_commissions": {
        "description": "Response payload for /api/v2/commissions/write_off_agency_commissions.",
        "type": "object",
        "properties": {
          "messages": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Any messages or errors related to the request"
              },
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Any messages or errors related to the request"
              }
            ]
          },
          "data": {
            "type": "object",
            "description": "The result of the agency write-off operation",
            "properties": {
              "agency_id": {
                "type": "string",
                "format": "uuid",
                "description": "The ID of the agency that was written off"
              },
              "agency_name": {
                "type": "string",
                "description": "The name of the agency"
              },
              "commission_payment_id": {
                "type": "string",
                "format": "uuid",
                "description": "The ID of the $0 commission payment created for this write-off"
              },
              "total_amount_written_off": {
                "type": "string",
                "pattern": "^-?[0-9]+(\\.[0-9]+)?$",
                "description": "The total amount written off across all entries (as a decimal string)"
              },
              "total_entries_processed": {
                "type": "integer",
                "minimum": 0,
                "description": "The total number of commission accounting entries processed"
              },
              "policy_results": {
                "type": "array",
                "description": "Per-policy breakdown of the write-off results",
                "items": {
                  "type": "object",
                  "properties": {
                    "policy_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "The ID of the policy"
                    },
                    "policy_number": {
                      "type": "string",
                      "description": "The policy number"
                    },
                    "original_entry_ids": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "description": "The IDs of the original delayed entries that were written off"
                    },
                    "offsetting_entry_ids": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "description": "The IDs of the offsetting entries created for this policy"
                    },
                    "amount_written_off": {
                      "type": "string",
                      "pattern": "^-?[0-9]+(\\.[0-9]+)?$",
                      "description": "The amount written off for this policy (as a decimal string)"
                    },
                    "entry_count": {
                      "type": "integer",
                      "minimum": 1,
                      "description": "The number of entries processed for this policy"
                    }
                  },
                  "required": [
                    "policy_id",
                    "policy_number",
                    "original_entry_ids",
                    "offsetting_entry_ids",
                    "amount_written_off",
                    "entry_count"
                  ]
                }
              }
            },
            "required": [
              "agency_id",
              "agency_name",
              "commission_payment_id",
              "total_amount_written_off",
              "total_entries_processed",
              "policy_results"
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Whether the operation was successful"
          }
        },
        "required": [
          "messages",
          "data",
          "success"
        ]
      },
      "revision_summary-def": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Revision ID"
          },
          "policy_id": {
            "type": "string",
            "format": "uuid",
            "description": "Policy ID"
          },
          "external_system_reference": {
            "type": "string",
            "description": "Revision External System Reference"
          },
          "policy_term_id": {
            "type": "string",
            "format": "uuid",
            "description": "Policy Term ID"
          },
          "policy_type_id": {
            "type": "string",
            "format": "uuid",
            "description": "Policy Type ID"
          },
          "revision_date": {
            "type": "string",
            "format": "date",
            "description": "Revision Date"
          },
          "revision_state": {
            "type": "string",
            "description": "Revision State"
          },
          "description": {
            "type": "string",
            "description": "Revision Description"
          }
        },
        "required": [
          "id",
          "policy_id",
          "external_system_reference",
          "policy_term_id",
          "policy_type_id",
          "revision_date",
          "revision_state",
          "description"
        ]
      },
      "risk-def": {
        "type": "object",
        "properties": {
          "external_system_reference": {
            "type": "string",
            "description": "External ID of the Risk"
          },
          "name": {
            "type": "string",
            "description": "Risk Name"
          },
          "address_city": {
            "type": "string",
            "description": "Risk Address City, required if require_risk_address line configuration is true"
          },
          "address_county": {
            "type": "string",
            "description": "Risk Address County"
          },
          "address_line1": {
            "type": "string",
            "description": "Risk Address Line 1, required if require_risk_address line configuration is true"
          },
          "address_line2": {
            "type": "string",
            "description": "Risk Address Line 2"
          },
          "address_state": {
            "type": "string",
            "description": "Risk Address State, required if require_risk_address line configuration is true"
          },
          "address_country": {
            "type": "string",
            "description": "Risk Address Country",
            "default": "USA"
          },
          "address_zip": {
            "type": "string",
            "description": "Risk Address Zip, required if require_risk_address line configuration is true"
          },
          "latitude": {
            "type": "number",
            "description": "Risk Latitude"
          },
          "longitude": {
            "type": "number",
            "description": "Risk Longitude"
          },
          "replacement_cost_value": {
            "type": "number",
            "description": "Risk Replacement Cost Value"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/item-def"
            }
          },
          "sub_lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/subline-def"
            }
          },
          "mortgagees": {
            "type": "array",
            "description": "List of mortgagees associated with this risk",
            "items": {
              "$ref": "#/components/schemas/mortgagee-def"
            }
          },
          "type": {
            "type": "string",
            "description": "Risk Type. Can be Vehicle or Property. Default is Property",
            "default": "Property",
            "enum": [
              "Vehicle",
              "Property",
              "Watercraft"
            ]
          }
        },
        "required": [
          "name"
        ]
      },
      "sub_line_def-def": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier for the Subline"
          },
          "policy_type_id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the parent policy type this subline belongs to"
          },
          "external_system_reference": {
            "type": "string",
            "description": "External System Reference for the Line Item"
          },
          "name": {
            "type": "string",
            "description": "Name of the Subline"
          },
          "category": {
            "type": "string",
            "enum": [
              "POLICY",
              "RISK"
            ],
            "description": "Category of the Subline (Policy or Risk)"
          },
          "requirement_type": {
            "type": "string",
            "enum": [
              "MANDATORY",
              "DEFAULT",
              "OPTIONAL"
            ],
            "description": "Requirement type of the Subline"
          },
          "allow_multiples": {
            "type": "boolean",
            "default": false,
            "description": "Indicates if multiple instances of this Subline are allowed"
          },
          "name_edit_allowed": {
            "type": "boolean",
            "default": false,
            "description": "Indicates if editing the name of the Subline is allowed"
          },
          "sort_order": {
            "type": "integer",
            "description": "Sort order for the Subline"
          },
          "description": {
            "type": "string",
            "description": "Description of the Subline"
          },
          "type": {
            "type": "string",
            "enum": [
              "LIABILITY",
              "RISK",
              "DRIVER",
              "INLAND_MARINE"
            ],
            "description": "Type of the Subline"
          },
          "system_tags": {
            "type": "object",
            "description": "System tags associated with the Subline"
          },
          "hide_from": {
            "type": "string",
            "enum": [
              "NONE",
              "BRITECORE_AND_BRITEQUOTE",
              "BRITECORE",
              "BRITEQUOTE"
            ],
            "default": "NONE",
            "description": "Specifies where the Subline should be hidden from"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/policy_type_item-def"
            },
            "description": "List of line items associated with this Subline"
          }
        },
        "required": [
          "name",
          "category",
          "requirement_type",
          "type"
        ]
      },
      "subline-def": {
        "type": "object",
        "properties": {
          "sub_line_id": {
            "type": "string",
            "format": "uuid",
            "description": "Sub Line ID"
          },
          "sub_line_external_system_reference": {
            "type": "string",
            "description": "External ID of the Sub Line"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/item-def"
            }
          }
        }
      },
      "subline_update-def": {
        "type": "object",
        "properties": {
          "sub_line_id": {
            "type": "string",
            "format": "uuid",
            "description": "Sub Line ID"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/item_update-def"
            }
          }
        }
      },
      "summary-def": {
        "type": "object",
        "description": "A persisted AI summary (Co-Pilot) for a claim or policy: one generation pass producing per-role variants, each with a narrative and an optional data-completeness warning. Flags are not part of a summary; they are insights.",
        "$defs": {
          "summary_variant": {
            "type": "object",
            "description": "The role-tailored slice of a summary. Strict client contract: the server is more lenient -- it treats data_completeness_warning as optional (null when absent) and tolerates unknown extra keys.",
            "properties": {
              "narrative": {
                "type": "string",
                "minLength": 1,
                "maxLength": 2000,
                "description": "2-4 sentence narrative for this role"
              },
              "data_completeness_warning": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 1000,
                "description": "Warning about missing or incomplete source data, or null"
              }
            },
            "required": [
              "narrative"
            ]
          }
        },
        "properties": {
          "variants": {
            "type": "object",
            "minProperties": 1,
            "additionalProperties": {
              "$ref": "#/components/schemas/summary-def-defs-summary_variant"
            },
            "description": "Role variants keyed by role token. POLICY: agent, underwriter, adjuster. CLAIM: adjuster, siu. The required key set depends on reference_type and is validated server-side."
          }
        },
        "required": [
          "variants"
        ]
      },
      "underwriting_question-def": {
        "title": "UnderwritingQuestion",
        "description": "Schema definition for an underwriting question",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier for the question"
          },
          "reference_id": {
            "type": "string",
            "format": "uuid",
            "description": "Reference identifier for versioning"
          },
          "effective_id": {
            "type": "string",
            "format": "uuid",
            "description": "Reference to the effective date"
          },
          "policy_type_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Reference to policy type. Null for global questions that apply to all policy types. Optional when nested inside a policy type - will be inherited from parent."
          },
          "inheritance_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Inheritance identifier for question hierarchy"
          },
          "yes_no_question": {
            "type": "string",
            "description": "The question text"
          },
          "yes_no_explain": {
            "description": "Whether explanation is required",
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "string",
                "enum": [
                  "yes",
                  "no",
                  "none"
                ]
              }
            ]
          },
          "yes_no_prevent_continue": {
            "description": "Whether a 'yes' answer prevents continuing",
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "string",
                "enum": [
                  "yes",
                  "no",
                  "none"
                ]
              }
            ]
          },
          "order": {
            "type": "integer",
            "description": "Display order of the question"
          },
          "expiration_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Expiration date for the question"
          }
        },
        "required": [
          "id",
          "effective_id",
          "yes_no_question"
        ]
      },
      "underwriting_rule-def": {
        "type": "object",
        "description": "An underwriting rule with its triggers and effects",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the rule"
          },
          "reference_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Reference UUID for rule versioning (if applicable)"
          },
          "policy_type_id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the policy type this rule belongs to"
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable name of the rule"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Detailed description of what the rule does"
          },
          "category": {
            "description": "Rule category that determines scope and available triggers/effects",
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "string",
                "enum": [
                  "policy",
                  "driver",
                  "property",
                  "property-policy",
                  "vehicle",
                  "vehicle-policy",
                  "vehicle-ui",
                  "watercraft",
                  "watercraft-policy",
                  "watercraft-ui",
                  "driver-ui",
                  "claim"
                ]
              }
            ]
          },
          "module": {
            "description": "Module that determines when the rule is executed. 'all' = BriteCore and BriteQuote, 'bc' = BriteCore only, 'bq' = BriteQuote only, 'events' = Event-triggered rules, 'stp' = Straight-Through Processing rules, 'quote-submit-new-business' = Agent new business quote submission",
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "string",
                "enum": [
                  "all",
                  "bc",
                  "bq",
                  "events",
                  "stp",
                  "quote-submit-new-business"
                ]
              }
            ]
          },
          "severity": {
            "description": "Severity level for STP rules. Required when module is 'stp'",
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "string",
                "enum": [
                  "critical",
                  "high",
                  "medium",
                  "low"
                ]
              }
            ]
          },
          "event": {
            "description": "Event type for event-triggered rules. Required when module is 'events'",
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "string",
                "enum": [
                  "BritecoreApplicationSubmitted",
                  "BritecorePolicyIssued",
                  "BritecorePolicyActive"
                ]
              }
            ]
          },
          "waiver_behavior": {
            "description": "Behavior when the rule has been waived. 'run_always' = Always run the rule, 'waived_for_x_terms' = Skip for specified number of terms, 'skip_after_waived' = Skip permanently after waiver",
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "string",
                "enum": [
                  "run_always",
                  "waived_for_x_terms",
                  "skip_after_waived"
                ]
              }
            ]
          },
          "waiver_terms": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "maximum": 99,
            "description": "Number of terms to skip when waiver_behavior is 'waived_for_x_terms'"
          },
          "properties_affected": {
            "type": [
              "string",
              "null"
            ],
            "description": "Comma-separated list of property IDs affected by this rule"
          },
          "exception_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "Type of exception for agency-specific rule exceptions"
          },
          "exception_agencies": {
            "description": "List of agency IDs or agency configuration for rule exceptions",
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ]
          },
          "enabled_for_renewal": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the rule applies to policy renewals"
          },
          "enabled_for_endorsement": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the rule applies to policy endorsements"
          },
          "enabled_for_new_business": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the rule applies to new business policies"
          },
          "sort_order": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Order in which the rule is evaluated relative to other rules"
          },
          "valid_from_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "Start date when the rule becomes effective (YYYY-MM-DD)"
          },
          "valid_to_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "End date when the rule stops being effective (YYYY-MM-DD)"
          },
          "deleted": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the rule has been soft-deleted"
          },
          "triggers": {
            "type": "array",
            "description": "List of conditions that must be met for the rule to fire",
            "items": {
              "$ref": "#/components/schemas/underwriting_rules_trigger-def"
            }
          },
          "effects": {
            "type": "array",
            "description": "List of actions taken when all triggers are satisfied",
            "items": {
              "$ref": "#/components/schemas/underwriting_rules_effect-def"
            }
          }
        }
      },
      "underwriting_rules_effect-def": {
        "type": "object",
        "description": "An effect action for an underwriting rule",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "UUID of the effect"
          },
          "reference_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Reference UUID for effect versioning"
          },
          "underwriting_rule_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "UUID of the parent rule"
          },
          "target_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "UUID of the target policy type item, sub line, subjectivity definition, or task definition. For 'Add Subjectivity' effects, this is the subjectivity definition ID. For 'Create Task', this is the task definition ID."
          },
          "sort_order": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Order of this effect within the rule"
          },
          "action": {
            "description": "The action to perform when the rule fires",
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "string",
                "enum": [
                  "Set Category Option",
                  "Remove Category Option",
                  "Set Limit",
                  "Add Line Item",
                  "Add Sub Line",
                  "Add Subjectivity",
                  "Add Popup Message",
                  "Remove Line Item",
                  "Remove Sub Line",
                  "Block Quote",
                  "Set Deductible Option",
                  "Remove Deductible Option",
                  "Remove Optional Line Item",
                  "Add Optional Line Item",
                  "Remove Optional Sub Line",
                  "Set Field Value",
                  "Validation Error",
                  "Request Property Inspection",
                  "Hide Supplemental Question",
                  "Set Exposure Reserve",
                  "Generate Deliverable",
                  "Set STP Error",
                  "Attach Property Valuation",
                  "Create Task",
                  "Hide Field",
                  "Show Field",
                  "Hide Category",
                  "Show Category"
                ]
              }
            ]
          },
          "label_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Label or category/field name for the effect. Required for category, deductible, and field-related effects."
          },
          "value": {
            "type": [
              "string",
              "null"
            ],
            "description": "Effect value. Usage varies by action: category option name for Set/Remove Category Option, code string for Set Field Value, error message for Validation Error, deliverable ID for Generate Deliverable, integration instance ID for Attach Property Valuation, JSON task configuration for Create Task."
          },
          "deleted": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the effect has been soft-deleted"
          },
          "mandatory": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the effect creates a mandatory coverage"
          },
          "hard_reverse": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether to hard reverse the effect when conditions are no longer met"
          },
          "hide_category": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether to hide the category in the UI (optional for Set Category Option)"
          },
          "popup_message": {
            "type": [
              "string",
              "null"
            ],
            "description": "Message text for 'Add Popup Message' or 'Block Quote' effects"
          },
          "custom_error_code_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "UUID of the custom error code. Required for 'Set STP Error' effects."
          }
        }
      },
      "underwriting_rules_trigger-def": {
        "type": "object",
        "description": "A trigger condition for an underwriting rule",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "UUID of the trigger"
          },
          "reference_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Reference UUID for trigger versioning"
          },
          "underwriting_rule_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "UUID of the parent rule"
          },
          "policy_type_item_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "UUID of the policy type item this trigger evaluates"
          },
          "sort_order": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Order of this trigger within the rule"
          },
          "label_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Label or field name for the trigger condition"
          },
          "value": {
            "description": "Value(s) to compare against. Can be string, number, boolean, array, or object depending on trigger_type",
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "array",
                "items": {}
              },
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ]
          },
          "trigger_type": {
            "description": "Type of trigger condition",
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "string",
                "enum": [
                  "category",
                  "question",
                  "limit",
                  "limit2",
                  "limit3",
                  "exists",
                  "eval",
                  "advanced",
                  "loss-cause",
                  "geography",
                  "catastrophe"
                ]
              }
            ]
          },
          "deleted": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the trigger has been soft-deleted"
          }
        }
      },
      "vehicle-def": {
        "type": "object",
        "description": "Vehicle definition for create_full_quote and response schemas",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "quote_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "vehicle_year": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1900
          },
          "vehicle_make": {
            "type": [
              "string",
              "null"
            ]
          },
          "vehicle_model": {
            "type": [
              "string",
              "null"
            ]
          },
          "vehicle_vin": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 17
          },
          "vehicle_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "vehicle_body_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "vehicle_number": {
            "type": [
              "integer",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "address_city": {
            "type": [
              "string",
              "null"
            ]
          },
          "address_county": {
            "type": [
              "string",
              "null"
            ]
          },
          "address_line1": {
            "type": [
              "string",
              "null"
            ]
          },
          "address_line2": {
            "type": [
              "string",
              "null"
            ]
          },
          "address_state": {
            "type": [
              "string",
              "null"
            ]
          },
          "address_zip": {
            "type": [
              "string",
              "null"
            ]
          },
          "symbol_age_group": {
            "type": [
              "string",
              "null"
            ]
          },
          "symbol_collision": {
            "type": [
              "string",
              "null"
            ]
          },
          "symbol_comprehensive": {
            "type": [
              "string",
              "null"
            ]
          },
          "symbol_liability": {
            "type": [
              "string",
              "null"
            ]
          },
          "symbol_medical_payments": {
            "type": [
              "string",
              "null"
            ]
          },
          "territory": {
            "type": [
              "string",
              "null"
            ]
          },
          "vehicle_class": {
            "type": [
              "string",
              "null"
            ]
          },
          "registered_state": {
            "type": [
              "string",
              "null"
            ]
          },
          "horse_power": {
            "type": [
              "string",
              "null"
            ]
          },
          "garage_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "stated_amount": {
            "type": [
              "number",
              "null"
            ]
          },
          "vehicle_valuation": {
            "type": [
              "number",
              "null"
            ]
          },
          "cost_new_vehicle": {
            "type": [
              "number",
              "null"
            ]
          },
          "replacement_cost_value": {
            "type": [
              "number",
              "null"
            ]
          },
          "annual_mileage": {
            "type": [
              "number",
              "null"
            ]
          },
          "odometer_reading": {
            "type": [
              "number",
              "null"
            ]
          },
          "miles_to_work": {
            "type": [
              "number",
              "null"
            ]
          },
          "per_week_days_driven": {
            "type": [
              "integer",
              "null"
            ]
          },
          "per_month_weeks_driven": {
            "type": [
              "number",
              "null"
            ]
          },
          "performance": {
            "type": [
              "string",
              "null"
            ]
          },
          "owned_or_leased": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "string",
                "enum": [
                  "Owned",
                  "Leased"
                ]
              }
            ]
          },
          "date_vehicle_leased": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "date_vehicle_purchased": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "purchased_new": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "purchase_price": {
            "type": [
              "number",
              "null"
            ]
          },
          "new_vehicle": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "usage": {
            "type": [
              "string",
              "null"
            ]
          },
          "car_pool": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "multi_car": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "seat_belts": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "seat_belt_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "air_bags": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "air_bag_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "passive_restraint": {
            "type": [
              "string",
              "null"
            ]
          },
          "anti_lock_brakes": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "anti_theft_device": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "anti_theft_device_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "anti_theft_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "daytime_running_lights": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "gross_vehicle_weight": {
            "type": [
              "string",
              "null"
            ]
          },
          "plate_number": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 9
          },
          "used_for_ride_share": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "customized_equipment": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "customization_description": {
            "type": [
              "string",
              "null"
            ]
          },
          "audio_equipment_cost_new": {
            "type": [
              "number",
              "null"
            ]
          },
          "primary_driver_index": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Index into drivers[] array to assign as primary driver (input only). Referenced driver must be included_in_policy."
          },
          "primary_driver_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "secondary_driver_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "included_in_policy": {
            "type": [
              "boolean",
              "null"
            ],
            "default": true
          },
          "deleted": {
            "type": [
              "boolean",
              "null"
            ]
          }
        },
        "additionalProperties": true
      },
      "vehicle_template-def": {
        "type": "object",
        "description": "Schema for vehicle data in Quick Quote Templates using simplified field names",
        "properties": {
          "address_city": {
            "type": [
              "string",
              "null"
            ],
            "description": "Vehicle garaging city"
          },
          "address_county": {
            "type": [
              "string",
              "null"
            ],
            "description": "Vehicle garaging county"
          },
          "address_line1": {
            "type": [
              "string",
              "null"
            ],
            "description": "Vehicle garaging address line 1"
          },
          "address_line2": {
            "type": [
              "string",
              "null"
            ],
            "description": "Vehicle garaging address line 2"
          },
          "address_state": {
            "type": [
              "string",
              "null"
            ],
            "description": "Vehicle garaging state"
          },
          "address_zip": {
            "type": [
              "string",
              "null"
            ],
            "description": "Vehicle garaging ZIP code"
          },
          "year": {
            "type": [
              "integer",
              "string",
              "null"
            ],
            "minimum": 1900,
            "description": "Vehicle model year (simplified field name)"
          },
          "make": {
            "type": [
              "string",
              "null"
            ],
            "description": "Vehicle make (simplified field name)"
          },
          "model": {
            "type": [
              "string",
              "null"
            ],
            "description": "Vehicle model (simplified field name)"
          },
          "vin": {
            "type": [
              "string",
              "null"
            ],
            "description": "Vehicle identification number (simplified field name)"
          },
          "vehicle_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "Vehicle type code from quick_code_values AUTO_VEHICLE_TYPES"
          },
          "vehicle_body_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "Vehicle body type code from quick_code_values BODY_TYPE_OPTIONS"
          },
          "cost_new_vehicle": {
            "type": [
              "number",
              "null"
            ],
            "description": "Cost of new vehicle"
          },
          "annual_mileage": {
            "type": [
              "number",
              "null"
            ],
            "description": "Annual mileage"
          },
          "included_in_policy": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether vehicle is included in policy",
            "default": true
          }
        }
      },
      "watercraft-def": {
        "type": "object",
        "description": "Watercraft definition schema",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier for the watercraft"
          },
          "address_city": {
            "type": "string",
            "description": "City where the watercraft is located"
          },
          "address_county": {
            "type": "string",
            "description": "County where the watercraft is located"
          },
          "address_line1": {
            "type": "string",
            "description": "Primary address line"
          },
          "address_line2": {
            "type": "string",
            "description": "Secondary address line"
          },
          "address_state": {
            "type": "string",
            "description": "State where the watercraft is located"
          },
          "address_zip": {
            "type": "string",
            "description": "ZIP code where the watercraft is located"
          },
          "watercraft_hull_id": {
            "type": "string",
            "description": "Hull identification number"
          },
          "watercraft_type": {
            "type": "string",
            "description": "Type of watercraft (validated against WATERCRAFT_VEHICLE_TYPES quick codes)"
          },
          "watercraft_type_label": {
            "type": "string",
            "description": "Human-readable label for watercraft type"
          },
          "watercraft_year": {
            "type": "integer",
            "minimum": 1900,
            "maximum": 2099,
            "description": "Year the watercraft was manufactured"
          },
          "watercraft_make": {
            "type": "string",
            "description": "Manufacturer of the watercraft"
          },
          "watercraft_model": {
            "type": "string",
            "description": "Model of the watercraft"
          },
          "watercraft_length": {
            "type": "number",
            "minimum": 0,
            "description": "Length of the watercraft"
          },
          "watercraft_horsepower": {
            "type": "string",
            "description": "Horsepower of the watercraft engine"
          },
          "watercraft_number": {
            "type": "integer",
            "description": "Registration number of the watercraft"
          },
          "quote_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the associated quote"
          },
          "primary_operator_id": {
            "type": "string",
            "description": "ID of the primary operator"
          },
          "secondary_operator_id": {
            "type": "string",
            "description": "ID of the secondary operator"
          },
          "custom_fields": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Custom fields for the watercraft"
          },
          "deleted": {
            "type": "boolean",
            "default": false,
            "description": "Whether the watercraft is deleted"
          },
          "included_in_policy": {
            "type": "boolean",
            "default": true,
            "description": "Whether the watercraft is included in the policy"
          },
          "previous_id": {
            "type": "string",
            "description": "Previous ID if this is an updated watercraft"
          },
          "added_from_template": {
            "type": "boolean",
            "description": "Indicates if the watercraft was added from a template"
          }
        }
      },
      "watercraft_template-def": {
        "type": "object",
        "description": "Schema for watercraft data in Quick Quote Templates using simplified field names",
        "properties": {
          "address_city": {
            "type": [
              "string",
              "null"
            ],
            "description": "Watercraft storage city"
          },
          "address_county": {
            "type": [
              "string",
              "null"
            ],
            "description": "Watercraft storage county"
          },
          "address_line1": {
            "type": [
              "string",
              "null"
            ],
            "description": "Watercraft storage address line 1"
          },
          "address_line2": {
            "type": [
              "string",
              "null"
            ],
            "description": "Watercraft storage address line 2"
          },
          "address_state": {
            "type": [
              "string",
              "null"
            ],
            "description": "Watercraft storage state"
          },
          "address_zip": {
            "type": [
              "string",
              "null"
            ],
            "description": "Watercraft storage ZIP code"
          },
          "year": {
            "type": [
              "integer",
              "string",
              "null"
            ],
            "minimum": 1900,
            "maximum": 2099,
            "description": "Watercraft model year (simplified field name)"
          },
          "make": {
            "type": [
              "string",
              "null"
            ],
            "description": "Watercraft make (simplified field name)"
          },
          "model": {
            "type": [
              "string",
              "null"
            ],
            "description": "Watercraft model (simplified field name)"
          },
          "hull_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Hull identification number (simplified field name)"
          },
          "watercraft_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "Watercraft type code from quick_code_values WATERCRAFT_VEHICLE_TYPES"
          },
          "watercraft_length": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "description": "Watercraft length in feet"
          },
          "watercraft_horsepower": {
            "type": [
              "string",
              "null"
            ],
            "description": "Watercraft horsepower"
          },
          "watercraft_number": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Watercraft sequence number"
          },
          "included_in_policy": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether watercraft is included in policy",
            "default": true
          }
        }
      },
      "workflow-def": {
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string",
            "maxLength": 200
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "scope": {
            "type": "string",
            "enum": [
              "Policy",
              "Claims",
              "Billing"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "draft"
            ]
          },
          "role": {
            "type": "string",
            "enum": [
              "draft",
              "live"
            ]
          },
          "source_workflow_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "live_ref_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "current_version_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "live_status": {
            "type": [
              "string",
              "null"
            ]
          },
          "live_version_number": {
            "type": [
              "integer",
              "null"
            ]
          },
          "has_unpublished_changes": {
            "type": "boolean"
          },
          "policy_type_version_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "nodes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "type": {
                  "type": "string"
                },
                "position_x": {
                  "type": "integer"
                },
                "position_y": {
                  "type": "integer"
                },
                "note": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "config": {
                  "type": "object"
                }
              },
              "required": [
                "type"
              ]
            }
          },
          "edges": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "from_node_id": {
                  "type": "string"
                },
                "to_node_id": {
                  "type": "string"
                },
                "edge_type": {
                  "type": "string",
                  "enum": [
                    "execution",
                    "value"
                  ]
                },
                "label": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "from_node_id",
                "to_node_id"
              ]
            }
          },
          "last_fired_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "firings_30d": {
            "type": "integer"
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "required": [
          "name",
          "scope",
          "nodes",
          "edges"
        ]
      },
      "workflow_run-def": {
        "type": "object",
        "properties": {
          "run_id": {
            "type": "string"
          },
          "run_number": {
            "type": [
              "integer",
              "null"
            ]
          },
          "workflow_id": {
            "type": "string"
          },
          "workflow_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "workflow_version_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "workflow_version_number": {
            "type": [
              "integer",
              "null"
            ]
          },
          "event_class_name": {
            "type": "string"
          },
          "event_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "event_payload_snapshot": {
            "type": [
              "object",
              "null"
            ]
          },
          "entity_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "entity_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "entity_label": {
            "type": [
              "string",
              "null"
            ]
          },
          "triggering_user_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "running",
              "succeeded",
              "partially_succeeded",
              "failed",
              "paused",
              "aborted"
            ]
          },
          "started_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "completed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "last_error_message": {
            "type": [
              "string",
              "null"
            ]
          },
          "parent_run_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "parent_run_number": {
            "type": [
              "integer",
              "null"
            ]
          },
          "retry_of_node_id": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "run_id",
          "workflow_id",
          "event_class_name",
          "status"
        ]
      },
      "rate_chain-def-defs-BaseCategory": {
        "type": "object",
        "required": [
          "options",
          "disallow_options",
          "category_name",
          "type"
        ],
        "properties": {
          "options": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "An array of category options"
          },
          "disallow_options": {
            "type": "array",
            "items": {
              "type": "boolean"
            },
            "description": "An array of booleans indicating whether or not each option is disallowed"
          },
          "category_name": {
            "type": "string",
            "description": "The name of the category"
          },
          "type": {
            "type": "string",
            "enum": [
              "STANDARD",
              "MAPPED",
              "REFERENCED_CATEGORY",
              "AGE",
              "ZIP_CODE",
              "LIMIT_OF_SELECTED_LINE_ITEM",
              "LOCATION_CODE",
              "CREDIT_TIER",
              "DEDUCTIBLE",
              "YEARS_SINCE_LAST_CLAIM_MADE",
              "NUMBER_OF_CLAIMS",
              "PROTECTION_CLASS",
              "BCEGS_CODE",
              "DISTANCE_TO_COAST",
              "NUMBER_INPUT"
            ]
          },
          "print_on_declaration": {
            "type": "boolean",
            "description": "Whether or not to print the category on the declaration",
            "default": true
          },
          "print_order_in_dec": {
            "type": "string",
            "description": "The order in which to print the category on the declaration",
            "default": ""
          },
          "enabled_in_britequote": {
            "type": "boolean",
            "description": "Whether the category is enabled/disabled in BriteQuote.",
            "default": true
          },
          "visible_in_britequote": {
            "type": "boolean",
            "description": "Whether the category is shown in BriteQuote.",
            "default": true
          },
          "sync_across_line_items": {
            "type": "boolean",
            "description": "Whether the category value is synced with other categories across line items. Other categories should also have the same name and this value set to `true` to sync.",
            "default": true
          },
          "sync_always": {
            "type": "boolean",
            "description": "Whether the category values are synced every time a change is made to the category or only once.",
            "default": false
          },
          "require_explicit_selection_in_wizard": {
            "type": "boolean",
            "description": "Whether the category requires an explicit selection in the wizard.",
            "default": false
          },
          "renew_with_default": {
            "type": "boolean",
            "description": "Renew with the Default Category if no Category selection was previously made.",
            "default": false
          },
          "is_required": {
            "type": "boolean",
            "description": "Whether the category is required.",
            "default": false
          },
          "show_message_popup_in_builder": {
            "type": "boolean",
            "description": "Whether to show a message popup in the builder.",
            "default": false
          },
          "message_popup_text": {
            "type": "string",
            "description": "The text to show in the message popup.",
            "default": ""
          },
          "selected_by_lookup": {
            "type": "boolean",
            "description": "Whether the category is selected by a lookup table.",
            "default": false
          },
          "lookup_table": {
            "type": "object",
            "description": "The lookup table to use for selecting the category.",
            "properties": {
              "label": {
                "type": "string",
                "description": "The name of the lookup table."
              },
              "values": {
                "type": "array",
                "items": {
                  "type": "string",
                  "description": "A list of strings that represent the values in the lookup table."
                }
              },
              "category_options": {
                "type": "array",
                "items": {
                  "type": "string",
                  "description": "A list of strings that represent the category options. Corresponds to the `options` field in the category object."
                }
              }
            },
            "required": [
              "label",
              "values",
              "category_options"
            ]
          },
          "preservation_uuids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUIDs of the `options` for Credit Tier, Location Code, Zip Code. These ids correspond to the options using the same index in the `options` list."
          },
          "default_option": {
            "type": "string",
            "description": "The default option for the category."
          },
          "line_item_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the referenced category's line item."
          }
        }
      },
      "rate_chain-def-defs-Category": {
        "type": "object",
        "oneOf": [
          {
            "properties": {
              "type": {
                "const": "STANDARD"
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-BaseCategory"
          },
          {
            "properties": {
              "type": {
                "const": "MAPPED"
              },
              "categories": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "A list of category names that this category uses to map its options."
              },
              "mapping": {
                "type": "object",
                "description": "Object that represents the mapping of the options of the categories in `categories`.",
                "$ref": "#/components/schemas/rate_chain-def-defs-MappedCategoryMapping"
              }
            },
            "required": [
              "categories",
              "mapping"
            ],
            "$ref": "#/components/schemas/rate_chain-def-defs-BaseCategory"
          },
          {
            "properties": {
              "type": {
                "const": "REFERENCED_CATEGORY"
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-BaseCategory"
          },
          {
            "properties": {
              "type": {
                "const": "AGE"
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-BaseCategory"
          },
          {
            "properties": {
              "type": {
                "const": "ZIP_CODE"
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-BaseCategory"
          },
          {
            "properties": {
              "type": {
                "const": "LIMIT_OF_SELECTED_LINE_ITEM"
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-BaseCategory"
          },
          {
            "properties": {
              "type": {
                "const": "LOCATION_CODE"
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-BaseCategory"
          },
          {
            "properties": {
              "type": {
                "const": "CREDIT_TIER"
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-BaseCategory"
          },
          {
            "properties": {
              "type": {
                "const": "DEDUCTIBLE"
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-BaseCategory"
          },
          {
            "properties": {
              "type": {
                "const": "YEARS_SINCE_LAST_CLAIM_MADE"
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-BaseCategory"
          },
          {
            "properties": {
              "type": {
                "const": "NUMBER_OF_CLAIMS"
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-BaseCategory"
          },
          {
            "properties": {
              "type": {
                "const": "PROTECTION_CLASS"
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-BaseCategory"
          },
          {
            "properties": {
              "type": {
                "const": "BCEGS_CODE"
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-BaseCategory"
          },
          {
            "properties": {
              "type": {
                "const": "DISTANCE_TO_COAST"
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-BaseCategory"
          },
          {
            "properties": {
              "type": {
                "const": "NUMBER_INPUT"
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-BaseCategory"
          }
        ]
      },
      "rate_chain-def-defs-MappedCategoryMapping": {
        "type": "object",
        "required": [
          "map_from",
          "map_to"
        ],
        "properties": {
          "map_from": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A list of options to map from."
          },
          "map_to": {
            "type": "string",
            "description": "An option to map to."
          }
        }
      },
      "rate_chain-def-defs-FlatRate": {
        "type": "object",
        "properties": {
          "categories": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A list of category names that this flat rate object uses."
          },
          "rates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/rate_chain-def-defs-MappedCategoryMapping"
            },
            "description": "A list that represents the rates for the categories in `categories`."
          }
        },
        "required": [
          "categories",
          "rates"
        ]
      },
      "rate_chain-def-defs-BaseFactorTable": {
        "type": "object",
        "required": [
          "factor_table_type",
          "applies_to",
          "between_intervals",
          "round_to",
          "round_method",
          "rates",
          "categories",
          "tiers"
        ],
        "properties": {
          "factor_table_type": {
            "type": "string",
            "enum": [
              "REMAINING_LIMIT",
              "SELECTED_LIMITS",
              "USER_INPUT",
              "SELECTED_PREMIUMS",
              "EXCLUDED_PREMIUMS",
              "PREVIOUS_PREMIUM",
              "PREVIOUS_NON_ZERO_PREMIUM",
              "CATEGORIES_ONLY",
              "CREDIT_SCORE",
              "SELF_LIMIT"
            ]
          },
          "applies_to": {
            "type": "string",
            "enum": [
              "AGGREGATE_PREMIUM",
              "PREVIOUS_PREMIUM"
            ],
            "description": "Rate applies to."
          },
          "between_intervals": {
            "type": "string",
            "enum": [
              "INTERPOLATE",
              "USE_LOWER_LIMIT",
              "USE_UPPER_LIMIT"
            ],
            "description": "How to the interval between the rates."
          },
          "round_to": {
            "type": "string",
            "enum": [
              "1.000000",
              "1.00000",
              "1.0000",
              "1.000",
              "1.00",
              "1.0",
              "1"
            ],
            "description": "The round to value for the rates."
          },
          "round_method": {
            "type": "string",
            "enum": [
              "ROUND_HALF_UP",
              "ROUND_CEILING",
              "ROUND_FLOOR"
            ],
            "description": "The round method for the rates."
          },
          "rates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/rate_chain-def-defs-MappedCategoryMapping"
            }
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A list of category names that this factor table uses."
          },
          "tiers": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A list of tiers."
          },
          "referenced_items": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A list of referenced line items."
          }
        }
      },
      "rate_chain-def-defs-FactorTable": {
        "type": "object",
        "oneOf": [
          {
            "properties": {
              "factor_table_type": {
                "const": "REMAINING_LIMIT"
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-BaseFactorTable"
          },
          {
            "properties": {
              "factor_table_type": {
                "const": "SELECTED_LIMITS"
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-BaseFactorTable"
          },
          {
            "properties": {
              "factor_table_type": {
                "const": "USER_INPUT"
              },
              "label": {
                "type": "string",
                "description": "The label for the user input."
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-BaseFactorTable",
            "required": [
              "label"
            ]
          },
          {
            "properties": {
              "factor_table_type": {
                "const": "SELECTED_PREMIUMS"
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-BaseFactorTable"
          },
          {
            "properties": {
              "factor_table_type": {
                "const": "EXCLUDED_PREMIUMS"
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-BaseFactorTable"
          },
          {
            "properties": {
              "factor_table_type": {
                "const": "PREVIOUS_PREMIUM"
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-BaseFactorTable"
          },
          {
            "properties": {
              "factor_table_type": {
                "const": "PREVIOUS_NON_ZERO_PREMIUM"
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-BaseFactorTable"
          },
          {
            "properties": {
              "factor_table_type": {
                "const": "CATEGORIES_ONLY"
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-BaseFactorTable"
          },
          {
            "properties": {
              "factor_table_type": {
                "const": "CREDIT_SCORE"
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-BaseFactorTable"
          }
        ]
      },
      "rate_chain-def-defs-BaseRateTable": {
        "type": "object",
        "required": [
          "rate_table_type",
          "between_intervals",
          "round_to",
          "round_method",
          "rates",
          "categories",
          "tiers"
        ],
        "properties": {
          "rate_table_type": {
            "type": "string",
            "enum": [
              "REMAINING_LIMIT",
              "SELECTED_LIMITS",
              "USER_INPUT",
              "SELECTED_PREMIUMS",
              "EXCLUDED_PREMIUMS",
              "PREVIOUS_PREMIUM",
              "PREVIOUS_NON_ZERO_PREMIUM",
              "CREDIT_SCORE"
            ]
          },
          "between_intervals": {
            "type": "string",
            "enum": [
              "INTERPOLATE",
              "USE_LOWER_LIMIT",
              "USE_UPPER_LIMIT"
            ],
            "description": "How to the interval between the rates."
          },
          "round_to": {
            "type": "string",
            "enum": [
              "1.000000",
              "1.00000",
              "1.0000",
              "1.000",
              "1.00",
              "1.0",
              "1"
            ],
            "description": "The round to value for the rates."
          },
          "round_method": {
            "type": "string",
            "enum": [
              "ROUND_HALF_UP",
              "ROUND_CEILING",
              "ROUND_FLOOR"
            ],
            "description": "The round method for the rates."
          },
          "rates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/rate_chain-def-defs-MappedCategoryMapping"
            }
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A list of category names that this rate table uses."
          },
          "tiers": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A list of tiers."
          },
          "referenced_items": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A list of referenced line items."
          }
        }
      },
      "rate_chain-def-defs-RateTable": {
        "type": "object",
        "oneOf": [
          {
            "properties": {
              "rate_table_type": {
                "const": "REMAINING_LIMIT"
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-BaseRateTable"
          },
          {
            "properties": {
              "rate_table_type": {
                "const": "SELECTED_LIMITS"
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-BaseRateTable"
          },
          {
            "properties": {
              "rate_table_type": {
                "const": "USER_INPUT"
              },
              "label": {
                "type": "string",
                "description": "The label for the user input."
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-BaseRateTable",
            "required": [
              "label"
            ]
          },
          {
            "properties": {
              "rate_table_type": {
                "const": "SELECTED_PREMIUMS"
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-BaseRateTable"
          },
          {
            "properties": {
              "rate_table_type": {
                "const": "EXCLUDED_PREMIUMS"
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-BaseRateTable"
          },
          {
            "properties": {
              "rate_table_type": {
                "const": "PREVIOUS_PREMIUM"
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-BaseRateTable"
          },
          {
            "properties": {
              "rate_table_type": {
                "const": "PREVIOUS_NON_ZERO_PREMIUM"
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-BaseRateTable"
          },
          {
            "properties": {
              "rate_table_type": {
                "const": "CREDIT_SCORE"
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-BaseRateTable"
          }
        ]
      },
      "rate_chain-def-defs-BasePremiumBasis": {
        "type": "object",
        "required": [
          "premium_basis_type",
          "round_to",
          "round_method",
          "rates",
          "categories",
          "tiers"
        ],
        "properties": {
          "premium_basis_type": {
            "type": "string",
            "enum": [
              "PREVIOUS_PREMIUM",
              "PREVIOUS_NON_ZERO_PREMIUM",
              "AGGREGATE_PREMIUM"
            ]
          },
          "round_to": {
            "type": "string",
            "enum": [
              "1.000000",
              "1.00000",
              "1.0000",
              "1.000",
              "1.00",
              "1.0",
              "1"
            ],
            "description": "The round to value for the rates."
          },
          "round_method": {
            "type": "string",
            "enum": [
              "ROUND_HALF_UP",
              "ROUND_CEILING",
              "ROUND_FLOOR"
            ],
            "description": "The round method for the rates."
          },
          "rates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/rate_chain-def-defs-MappedCategoryMapping"
            }
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A list of category names that this table uses."
          },
          "tiers": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A list of tiers."
          }
        }
      },
      "rate_chain-def-defs-PremiumBasis": {
        "type": "object",
        "oneOf": [
          {
            "properties": {
              "premium_basis_type": {
                "const": "PREVIOUS_PREMIUM"
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-BasePremiumBasis"
          },
          {
            "properties": {
              "premium_basis_type": {
                "const": "PREVIOUS_NON_ZERO_PREMIUM"
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-BasePremiumBasis"
          },
          {
            "properties": {
              "premium_basis_type": {
                "const": "AGGREGATE_PREMIUM"
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-BasePremiumBasis"
          }
        ]
      },
      "rate_chain-def-defs-BaseDeductible": {
        "type": "object",
        "required": [
          "deductible_type",
          "deductibles"
        ],
        "properties": {
          "deductible_type": {
            "type": "string",
            "enum": [
              "INDEPENDENT",
              "GROUP",
              "EVALUATION"
            ]
          },
          "deductibles": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "amount",
                "modification",
                "unit"
              ],
              "properties": {
                "amount": {
                  "type": "string",
                  "description": "The amount of the deductible."
                },
                "modification": {
                  "type": "string",
                  "description": "The modification of the deductible."
                },
                "unit": {
                  "type": "string",
                  "enum": [
                    "DOLLAR",
                    "FACTOR"
                  ],
                  "description": "The unit of the deductible."
                },
                "default": {
                  "type": "boolean",
                  "description": "The default deductible.",
                  "default": false
                }
              }
            }
          }
        }
      },
      "rate_chain-def-defs-Deductible": {
        "type": "object",
        "oneOf": [
          {
            "properties": {
              "deductible_type": {
                "const": "INDEPENDENT"
              },
              "round_to": {
                "type": "string",
                "enum": [
                  "1.000000",
                  "1.00000",
                  "1.0000",
                  "1.000",
                  "1.00",
                  "1.0",
                  "1"
                ],
                "description": "The round to value for the deductible."
              },
              "round_method": {
                "type": "string",
                "enum": [
                  "ROUND_HALF_UP",
                  "ROUND_CEILING",
                  "ROUND_FLOOR"
                ],
                "description": "The round method for the deductible."
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-BaseDeductible",
            "required": [
              "round_to",
              "round_method"
            ]
          },
          {
            "properties": {
              "deductible_type": {
                "const": "GROUP"
              },
              "deductible_group_id": {
                "type": "string",
                "format": "uuid",
                "description": "The ID of the deductible group."
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-BaseDeductible",
            "required": [
              "deductible_group_id"
            ]
          },
          {
            "properties": {
              "deductible_type": {
                "const": "EVALUATION"
              },
              "eval_code": {
                "type": "string",
                "description": "The evaluation code for the deductible."
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-BaseDeductible",
            "required": [
              "eval_code"
            ]
          }
        ]
      },
      "rate_chain-def-defs-MinimumPremium": {
        "type": "object",
        "required": [
          "minimum_premium_type",
          "categories",
          "rates"
        ],
        "properties": {
          "minimum_premium_type": {
            "type": "string",
            "enum": [
              "AGGREGATE_PREMIUM",
              "EXCLUDED_PREMIUMS",
              "SELECTED_PREMIUMS"
            ]
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A list of category names that this minimum premium object uses."
          },
          "rates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/rate_chain-def-defs-MappedCategoryMapping"
            },
            "description": "A list of objects that represents the rates for the categories in `categories`."
          },
          "referenced_items": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A list of referenced policy type items."
          }
        }
      },
      "rate_chain-def-defs-MaximumPremium": {
        "type": "object",
        "required": [
          "maximum_premium_type",
          "categories",
          "rates"
        ],
        "properties": {
          "maximum_premium_type": {
            "type": "string",
            "enum": [
              "AGGREGATE_PREMIUM",
              "EXCLUDED_PREMIUMS",
              "SELECTED_LIMITS"
            ]
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A list of category names that this maximum premium object uses."
          },
          "rates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/rate_chain-def-defs-MappedCategoryMapping"
            },
            "description": "A list of objects that represents the rates for the categories in `categories`."
          },
          "referenced_items": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A list of referenced policy type items."
          }
        }
      },
      "rate_chain-def-defs-Evaluation": {
        "type": "object",
        "properties": {
          "eval_code": {
            "type": "string",
            "description": "Python code for the evaluation."
          },
          "assignment": {
            "type": "string",
            "enum": [
              "NEW_VARIABLE",
              "PREMIUM"
            ]
          },
          "final": {
            "type": "boolean",
            "description": "Whether this is the final premium."
          },
          "new_var_name": {
            "type": "string",
            "description": "The new variable name for the evaluation result."
          }
        },
        "required": [
          "eval_code",
          "assignment",
          "final"
        ]
      },
      "rate_chain-def-defs-BaseLimit": {
        "type": "object",
        "required": [
          "limit_type",
          "unit",
          "round",
          "source"
        ],
        "properties": {
          "limit_type": {
            "type": "string",
            "enum": [
              "USER_ENTERED",
              "USER_CHOSEN",
              "SYSTEM_AUTOMATIC",
              "SPLIT_USER_ENTERED",
              "SPLIT_USER_CHOSEN",
              "SPLIT_SYSTEM_AUTOMATIC"
            ]
          },
          "unit": {
            "type": "string",
            "description": "The unit of the limit."
          },
          "round": {
            "type": "string",
            "enum": [
              "1.000000",
              "1.00000",
              "1.0000",
              "1.000",
              "1.00",
              "1.0",
              "1"
            ],
            "description": "The round to value for the limit."
          },
          "set_limit_to_min": {
            "type": "boolean",
            "description": "Whether to set the limit to the minimum automatically.",
            "default": false
          }
        }
      },
      "rate_chain-def-defs-LimitNested": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "NONE",
              "FIXED",
              "FACTOR",
              "EVALUATION"
            ]
          },
          "amount": {
            "type": "string",
            "description": "The amount of the limit."
          },
          "min_limit_line_item_ref_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "A list of entered min limit line item reference ids."
          },
          "max_limit_line_item_ref_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "A list of entered max limit line item reference ids."
          },
          "shared_limits": {
            "type": "boolean",
            "description": "Whether the limits are shared."
          },
          "eval_code": {
            "type": "string",
            "description": "Python code for the evaluation."
          },
          "name": {
            "type": "string",
            "description": "The name of the user chosen limit."
          },
          "limits": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "The name of the user chosen limit."
                },
                "limits": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "A list user chosen of limits."
                }
              }
            },
            "description": "A list of user chosen limits."
          },
          "default_limit_row": {
            "type": "string",
            "description": "The default limit row for chosen limits."
          }
        },
        "required": [
          "type",
          "amount"
        ]
      },
      "rate_chain-def-defs-Limit": {
        "type": "object",
        "oneOf": [
          {
            "properties": {
              "limit_type": {
                "const": "USER_ENTERED"
              },
              "source": {
                "type": "object",
                "properties": {
                  "minimum": {
                    "type": "object",
                    "$ref": "#/components/schemas/rate_chain-def-defs-LimitNested"
                  },
                  "maximum": {
                    "type": "object",
                    "$ref": "#/components/schemas/rate_chain-def-defs-LimitNested"
                  }
                },
                "required": [
                  "minimum",
                  "maximum"
                ]
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-BaseLimit",
            "required": [
              "source"
            ]
          },
          {
            "properties": {
              "limit_type": {
                "const": "USER_CHOSEN"
              },
              "source": {
                "type": "object",
                "$ref": "#/components/schemas/rate_chain-def-defs-LimitNested"
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-BaseLimit",
            "required": [
              "source"
            ]
          },
          {
            "properties": {
              "limit_type": {
                "const": "SYSTEM_AUTOMATIC"
              },
              "source": {
                "type": "object",
                "$ref": "#/components/schemas/rate_chain-def-defs-LimitNested"
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-BaseLimit",
            "required": [
              "source"
            ]
          }
        ]
      },
      "rate_chain-def-defs-BaseRatePer": {
        "type": "object",
        "properties": {
          "rate_per_type": {
            "type": "string",
            "enum": [
              "REMAINING_LIMIT",
              "SELECTED_LIMITS",
              "SELECTED_PREMIUMS",
              "EXCLUDED_PREMIUMS",
              "PREVIOUS_PREMIUM",
              "PREVIOUS_NON_ZERO_PREMIUM",
              "AGGREGATE_PREMIUM",
              "USER_INPUT",
              "SELF_LIMIT"
            ]
          },
          "round_to": {
            "type": "string",
            "enum": [
              "1.000000",
              "1.00000",
              "1.0000",
              "1.000",
              "1.00",
              "1.0",
              "1"
            ],
            "description": "The round to value for the rates."
          },
          "round_method": {
            "type": "string",
            "enum": [
              "ROUND_HALF_UP",
              "ROUND_CEILING",
              "ROUND_FLOOR"
            ],
            "description": "The round method for the rates."
          },
          "rates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/rate_chain-def-defs-MappedCategoryMapping"
            }
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A list of category names that this rate per object uses."
          },
          "same_for_all": {
            "type": "boolean",
            "description": "Whether the rate per is the same for all.",
            "default": false
          },
          "referenced_items": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A list of referenced policy type items."
          }
        }
      },
      "rate_chain-def-defs-RatePer": {
        "type": "object",
        "oneOf": [
          {
            "properties": {
              "type": {
                "const": "REMAINING_LIMIT"
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-BaseRatePer"
          },
          {
            "properties": {
              "type": {
                "const": "SELECTED_LIMITS"
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-BaseRatePer"
          },
          {
            "properties": {
              "type": {
                "const": "SELECTED_PREMIUMS"
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-BaseRatePer"
          },
          {
            "properties": {
              "type": {
                "const": "EXCLUDED_PREMIUMS"
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-BaseRatePer"
          },
          {
            "properties": {
              "type": {
                "const": "PREVIOUS_PREMIUM"
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-BaseRatePer"
          },
          {
            "properties": {
              "type": {
                "const": "PREVIOUS_NON_ZERO_PREMIUM"
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-BaseRatePer"
          },
          {
            "properties": {
              "type": {
                "const": "AGGREGATE_PREMIUM"
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-BaseRatePer"
          },
          {
            "properties": {
              "type": {
                "const": "SELF_LIMIT"
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-BaseRatePer"
          },
          {
            "properties": {
              "type": {
                "const": "USER_INPUT"
              },
              "label": {
                "type": "string",
                "description": "The label for the user input."
              },
              "default_value": {
                "type": "string",
                "description": "The default value for the user input.",
                "default": ""
              },
              "validation": {
                "type": "string",
                "enum": [
                  "NONE",
                  "DATE",
                  "PERCENTAGE",
                  "NON_NEGATIVE_INTEGER",
                  "POSITIVE_INTEGER",
                  "NON_POSITIVE_INTEGER",
                  "NEGATIVE_INTEGER",
                  "DECIMAL_NUMBER",
                  "INTEGER"
                ],
                "default": "NONE"
              },
              "date_prior_than_effective_date": {
                "type": "boolean",
                "description": "Whether the date prior than the effective date is required.",
                "default": false
              },
              "date_greater_than_effective_date": {
                "type": "boolean",
                "description": "Whether the date greater than the effective date is required.",
                "default": false
              },
              "date_is_required": {
                "type": "boolean",
                "description": "Whether the date is required.",
                "default": false
              },
              "decimal_precision": {
                "type": "string",
                "description": "The decimal precision for the user input.",
                "default": "1"
              }
            },
            "$ref": "#/components/schemas/rate_chain-def-defs-BaseRatePer"
          }
        ]
      },
      "response-run_property_lookup-defs-lookupResult": {
        "type": "object",
        "description": "Updates applied for one PROPERTY_LOOKUP integration instance.",
        "properties": {
          "rating_information_updates": {
            "type": "array",
            "description": "Category and user-input fields whose stored value changed.",
            "items": {
              "type": "object",
              "properties": {
                "visible_on_admin_builder": {
                  "type": "boolean"
                },
                "visible_on_agent_builder": {
                  "type": "boolean"
                },
                "property_item_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "policy_type_item_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "policy_type_item_name": {
                  "type": "string"
                },
                "policy_type_item_sort_order": {
                  "type": "integer"
                },
                "field_name": {
                  "type": "string"
                },
                "field_sort_order": {
                  "type": "integer"
                },
                "old_value": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "new_value": {
                  "type": "string"
                },
                "old_value_display": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "new_value_display": {
                  "type": "string"
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "category",
                    "userInput"
                  ]
                }
              },
              "required": [
                "visible_on_admin_builder",
                "visible_on_agent_builder",
                "property_item_id",
                "policy_type_item_id",
                "policy_type_item_name",
                "policy_type_item_sort_order",
                "field_name",
                "field_sort_order",
                "old_value",
                "new_value",
                "old_value_display",
                "new_value_display",
                "type"
              ]
            }
          },
          "property_information_updates": {
            "type": "object",
            "description": "Property valuation fields that were written. Absent keys were not changed. replacement_cost_value is quantized to DECIMAL(64,2) and serializes as a JSON number (BC-23939).",
            "properties": {
              "property_value": {
                "type": "number",
                "description": "New ACV / propertyVal, present only when the stored value was unset. A JSON number: the vendor response is deserialized with fields.Float (integration_points/property_lookup.py) and the writer echoes that value back unchanged, even though propertyVal is stored in a VARCHAR."
              },
              "replacement_cost_value": {
                "type": "number",
                "description": "New RCV quantized to two decimal places. Omitted when seed-only skipped a live stored value, when the incoming value equaled the stored value, or when the vendor omitted RCV."
              }
            }
          },
          "alert_message": {
            "type": "string",
            "description": "Vendor alert text. Empty string when none."
          },
          "selection_conflicts": {
            "type": "array",
            "description": "Rating fields whose vendor value is not in selection_options. Headless stops further instances when this is non-empty.",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "value": {
                  "type": "string"
                },
                "selection_options": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "selection_options_display_suffixes": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "required": [
                "name",
                "selection_options"
              ]
            }
          },
          "integration_state_updates": {
            "type": "object",
            "description": "Hold and vendor-proposal state after this run, keyed by property item id then field name. Reported because two outcomes produce no rating_information_updates entry and so reach the client by no other route: a converging vendor value releases the hold without writing a value, and a value refused by a live hold records a fresh proposal while leaving the stored value alone. Absent on the early skip path, where no integration ran.",
            "additionalProperties": {
              "type": "object",
              "description": "Fields for one property item.",
              "additionalProperties": {
                "type": "object",
                "properties": {
                  "recordedValue": {
                    "description": "The vendor's last recorded proposal for this field. ABSENT when no proposal has been recorded; a JSON null is a genuine recorded null, not \"no record\". The two must stay distinct: the client shows the Revert link only when a recorded value exists, and the server declines a release that has nothing to restore."
                  },
                  "userValueHasPrecedence": {
                    "type": "boolean",
                    "description": "True while a human edit is protected from vendor writes."
                  }
                },
                "required": [
                  "userValueHasPrecedence"
                ]
              }
            }
          }
        },
        "required": [
          "rating_information_updates",
          "property_information_updates"
        ]
      },
      "summary-def-defs-summary_variant": {
        "type": "object",
        "description": "The role-tailored slice of a summary. Strict client contract: the server is more lenient -- it treats data_completeness_warning as optional (null when absent) and tolerates unknown extra keys.",
        "properties": {
          "narrative": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000,
            "description": "2-4 sentence narrative for this role"
          },
          "data_completeness_warning": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 1000,
            "description": "Warning about missing or incomplete source data, or null"
          }
        },
        "required": [
          "narrative"
        ]
      }
    }
  }
}
