{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/eliq/main/json-schema/eliq-homeprofile-schema.json",
  "title": "Homeprofile",
  "description": "The home profile is describing the properties of a location, such as house type, heating system and other appliances. This information is later used in Eliq analytics. \n\nThe home profile root objects properties may be different in different countries (could be parsed as a dictionary). Hence, the result shown for the locations country may not match with the example provided below.",
  "x-generated": "2026-10-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/eliq-home-profile-api-openapi.yml#/components/schemas/Homeprofile",
  "type": "object",
  "properties": {
    "properties": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/HomeProfileOption"
      }
    },
    "cooking": {
      "type": "array",
      "uniqueItems": false,
      "items": {
        "$ref": "#/$defs/HomeProfileOption"
      }
    },
    "appliances": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/HomeProfileOption"
      }
    },
    "fridges_and_freezers": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/HomeProfileOption"
      }
    },
    "extras": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/HomeProfileOption"
      }
    }
  },
  "$defs": {
    "HomeProfileOption": {
      "description": "A home profile option is the option that can be set. A home profile option may have different data types, 'single_select', 'multiple_select' or 'number'. The available properties in the object will change depending on this data type, which is described more in the model. ",
      "type": "object",
      "title": "HomeprofileOptions",
      "properties": {
        "key": {
          "type": "string",
          "minLength": 1,
          "description": "Key of home profile. A home profile option is identified by key, hence, it is the value for the key which are updated when running patch\n"
        },
        "data_type": {
          "type": "string",
          "minLength": 1,
          "enum": [
            "single_select",
            "multiple_select",
            "number"
          ],
          "description": "The data type of the home profile option. Eg. if 'single_select', there will be several different choices, where one value should be taken (eg. house type).\n"
        },
        "value": {
          "type": [
            "number",
            "string",
            "array"
          ],
          "description": "Selected value for the location. A number if data_type is ‘number’, string if ‘data_type’ is ‘single_select’ and list of strings if data_type is ‘multiple_select’. Null if no value has been set.",
          "items": {
            "type": "string"
          }
        },
        "possible_values": {
          "type": "array",
          "uniqueItems": true,
          "minItems": 1,
          "description": "Only present if data_type is 'single_select' or 'multiple_select'. The possible values contains all the possible options that can be set. ",
          "items": {
            "type": "object",
            "properties": {
              "value": {
                "type": "string",
                "minLength": 1,
                "description": "Value for the possible value. To be provided in patch"
              },
              "developer_description": {
                "type": "string",
                "description": "A string that describes this value. Not meant to be displayed to the end user."
              },
              "name": {
                "type": "string",
                "description": "DEPRECATED!",
                "deprecated": true
              },
              "type": {
                "type": "string",
                "description": "DEPRECATED!",
                "deprecated": true
              }
            },
            "required": [
              "value"
            ]
          }
        },
        "limits": {
          "type": "object",
          "description": "Only present if data_type is 'number'. The limit object contains the minimum and maximum value that can be selected, and with what step. ",
          "properties": {
            "min": {
              "type": "number",
              "description": "Minimum number. Usually 0"
            },
            "max": {
              "type": "number",
              "description": "Maximum number"
            },
            "step": {
              "type": "number",
              "description": "Minimum step. Eg. if home profile option is to select number of freezers, the user would increase/decrease the amount of freezers with 1."
            }
          }
        },
        "dependent_properties": {
          "type": "array",
          "uniqueItems": true,
          "minItems": 1,
          "description": "Only present if a dependent property has been configured. Used to indicated if an option should be shown or not given previous choices.",
          "items": {
            "type": "object",
            "properties": {
              "property": {
                "type": "string",
                "description": "The name of the dependent property."
              },
              "accepted_values": {
                "type": "array",
                "uniqueItems": true,
                "minItems": 1,
                "description": "The list of the values that are accepted for the dependent property.",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        },
        "tags": {
          "type": "array",
          "uniqueItems": true,
          "description": "An array of tags. Currently used tags are `required_for_euc_to_work` and `required_for_sh_to_work`.",
          "items": {
            "type": "string"
          }
        },
        "developer_description": {
          "type": "string",
          "description": "A string that describes this option. Not meant to be displayed to the end user."
        },
        "name": {
          "type": "string",
          "description": "DEPRECATED!",
          "deprecated": true
        },
        "is_required": {
          "type": "boolean",
          "default": false,
          "description": "DEPRECATED! Use tags instead. Whether the option is a field that is required for similar homes and breakdown.",
          "deprecated": true
        }
      },
      "required": [
        "key",
        "data_type"
      ]
    }
  }
}