{
  "code": "PROPERTY_LOOKUP",
  "description": "Retrieve supported lookup from property information.\n\nInput to integration:\n- Rating information categories and user inputs. Available as:\n    - Field name alone (such as \"Roof Material\")\n    - Item name with field name (such as \"Rating Information - Roof Material\")\n    - Item Limit, available as item name with Limit (such as \"Coverage A - Limit\")\n    - Item Deductible, available as item name with Deductible (such as \"Coverage A - Deductible\")\n- Note: \"Age\" categories are automatically mapped to the real year value.\n\nOutput from integration:\n- Rating information items (dropdown categories and free text user inputs) by name\n    - If the field does not exist on the policy builder, the value is ignored.\n    - Otherwise, the value is updated. For categories it must be a valid option as defined by Lines.\n    - When selection_options are present, the value must be one of them. If not, the system marks a\n      conflict and requires user re-selection. The returned value is still applied.\n    - If only a value is provided (no selection_options), the system automatically creates\n      selection_options containing just that value, allowing for consistent validation behavior.\n    - Optional selection_options_display_suffixes can provide additional context (e.g., percentages,\n      ratings) that will be shown alongside each option in the user interface.",
  "error_samples": [
    {
      "error": "Subscription expired. Payment needed"
    }
  ],
  "error_schema": {
    "$ref": "#/definitions/_ERROR_SCHEMA",
    "$schema": "http://json-schema.org/draft-07/schema#",
    "definitions": {
      "_ERROR_SCHEMA": {
        "additionalProperties": false,
        "properties": {
          "error": {
            "title": "error",
            "type": "string"
          },
          "error_code": {
            "title": "error_code",
            "type": "string"
          }
        },
        "required": [
          "error"
        ],
        "type": "object"
      }
    }
  },
  "request_samples": [
    {
      "address_city": "Fakeville",
      "address_country": "USA",
      "address_line1": "123 main st",
      "address_state": "MA",
      "address_zip": "02155",
      "policy_id": "abcdef12-3456-7890-1234-567890abcdef",
      "policy_number": "123456",
      "policy_term_effective_date": "2015-01-01",
      "property_id": "d4236ff6-85ae-4676-8816-40396e7202ee",
      "revision_id": "edcff543-608c-4f8e-8984-b22af6701054"
    },
    {
      "address_city": "Fakeville",
      "address_country": "USA",
      "address_county": {
        "code": "012",
        "name": "Middlesex"
      },
      "address_line1": "123 main st",
      "address_line2": "apt 406",
      "address_state": "MA",
      "address_zip": "02155",
      "latitude": 42.403,
      "longitude": -71.123,
      "policy_id": "abcdef12-3456-7890-1234-567890abcdef",
      "policy_number": "123456",
      "policy_term_effective_date": "2015-01-01",
      "property_id": "d4236ff6-85ae-4676-8816-40396e7202ee",
      "rating_information_fields": [
        {
          "name": "Roof Material",
          "value": "Asphalt"
        },
        {
          "name": "Roof Angle",
          "value": "5"
        }
      ],
      "revision_id": "edcff543-608c-4f8e-8984-b22af6701054"
    }
  ],
  "request_schema": {
    "$ref": "#/definitions/request_schema",
    "$schema": "http://json-schema.org/draft-07/schema#",
    "definitions": {
      "AddressCounty": {
        "additionalProperties": false,
        "properties": {
          "code": {
            "title": "code",
            "type": "string"
          },
          "name": {
            "title": "name",
            "type": "string"
          }
        },
        "type": "object"
      },
      "RatingInformationField": {
        "additionalProperties": false,
        "properties": {
          "name": {
            "title": "name",
            "type": "string"
          },
          "value": {
            "title": "value",
            "type": "string"
          }
        },
        "required": [
          "name",
          "value"
        ],
        "type": "object"
      },
      "request_schema": {
        "additionalProperties": false,
        "properties": {
          "address_city": {
            "maxLength": 250,
            "title": "address_city",
            "type": "string"
          },
          "address_country": {
            "enum": [
              "USA",
              "Canada",
              "Other"
            ],
            "enumNames": [],
            "title": "address_country",
            "type": "string"
          },
          "address_county": {
            "$ref": "#/definitions/AddressCounty",
            "type": "object"
          },
          "address_line1": {
            "maxLength": 250,
            "title": "address_line1",
            "type": "string"
          },
          "address_line2": {
            "maxLength": 250,
            "title": "address_line2",
            "type": "string"
          },
          "address_state": {
            "maxLength": 250,
            "title": "address_state",
            "type": "string"
          },
          "address_zip": {
            "maxLength": 25,
            "title": "address_zip",
            "type": "string"
          },
          "latitude": {
            "format": "float",
            "title": "latitude",
            "type": "number"
          },
          "longitude": {
            "format": "float",
            "title": "longitude",
            "type": "number"
          },
          "policy_id": {
            "title": "policy_id",
            "type": "string"
          },
          "policy_number": {
            "title": "policy_number",
            "type": "string"
          },
          "policy_term_effective_date": {
            "format": "date",
            "title": "policy_term_effective_date",
            "type": "string"
          },
          "property_id": {
            "title": "property_id",
            "type": "string"
          },
          "rating_information_fields": {
            "items": {
              "$ref": "#/definitions/RatingInformationField",
              "many": true,
              "type": "object"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "revision_id": {
            "title": "revision_id",
            "type": "string"
          }
        },
        "required": [
          "address_city",
          "address_country",
          "address_line1",
          "address_state",
          "address_zip",
          "policy_id",
          "policy_number",
          "policy_term_effective_date",
          "property_id",
          "revision_id"
        ],
        "type": "object"
      }
    }
  },
  "response_samples": [
    {},
    {
      "alert_message": "This is an alert message",
      "property_value": 123.1,
      "rating_information_fields": [
        {
          "name": "Roof Life Expectancy",
          "value": "15"
        },
        {
          "name": "Roof Replacement Cost",
          "value": "12345"
        },
        {
          "name": "Fire District",
          "selection_options": [
            "LELAND RURAL FD",
            "WINNABOW FD",
            "N W FD",
            "-Not in a fire district-"
          ],
          "selection_options_display_suffixes": [
            " (27.83%)",
            " (11.13%)",
            " (5.95%)",
            " (0.96%)"
          ],
          "value": ""
        },
        {
          "name": "Distance to Nearest Hydrant",
          "selection_options": [
            "Less Than or Equal to 1,000 Feet",
            "Greater Than 1,000 Feet"
          ],
          "value": "Less Than or Equal to 1,000 Feet"
        }
      ],
      "replacement_cost_value": 123.1
    }
  ],
  "response_schema": {
    "$ref": "#/definitions/response_schema",
    "$schema": "http://json-schema.org/draft-07/schema#",
    "definitions": {
      "RatingInformationField": {
        "additionalProperties": false,
        "properties": {
          "name": {
            "title": "name",
            "type": "string"
          },
          "selection_options": {
            "items": {
              "title": "selection_options",
              "type": "string"
            },
            "title": "selection_options",
            "type": "array"
          },
          "selection_options_display_suffixes": {
            "items": {
              "title": "selection_options_display_suffixes",
              "type": "string"
            },
            "title": "selection_options_display_suffixes",
            "type": "array"
          },
          "value": {
            "title": "value",
            "type": "string"
          }
        },
        "required": [
          "name",
          "value"
        ],
        "type": "object"
      },
      "response_schema": {
        "additionalProperties": false,
        "properties": {
          "alert_message": {
            "title": "alert_message",
            "type": "string"
          },
          "property_value": {
            "format": "float",
            "title": "property_value",
            "type": "number"
          },
          "rating_information_fields": {
            "items": {
              "$ref": "#/definitions/RatingInformationField",
              "many": true,
              "type": "object"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "replacement_cost_value": {
            "format": "float",
            "title": "replacement_cost_value",
            "type": "number"
          }
        },
        "type": "object"
      }
    }
  }
}
