{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "FetchUpdateRequest",
  "type": "object",
  "description": "Version v1 - Fetch Update API Request",
  "additionalProperties": true,
  "api_path": "v1/area/fetch_update",
  "properties": {
    "device_id": {
      "type": "string",
      "description": "device_id."
    },
    "user_id": {
      "type": "string",
      "description": "user_id."
    },
    "current_location": {
      "$ref": "/resources/schema/adm/v1/LatLon.json",
      "description": "User/vehicle's current location."
    },
    "profile_locations": {
      "type": "array",
      "items": {
        "$ref": "/resources/schema/adm/v1/ProfileLocation.json"
      },
      "minItems": 0,
      "description": "List of profile locations can be used for home area prediction.</br></br>'profile locations' are the locations persistent on the client and need to be passed to cloud whenever it exists.</br></br>E.g. home address, work address\""
    },
    "area_type": {
      "$ref": "/resources/schema/adm/v1/AreaType.json",
      "description": "Supported values:</br></br>1.HOME_AREA</br>2.DESTINATION_AREA"
    },
    "current_area_geometry": {
      "$ref": "/resources/schema/adm/v1/AreaGeometry.json",
      "description": "Current area geometry if exists."
    },
    "layers": {
      "type": "array",
      "items": {
        "$ref": "/resources/schema/adm/v1/Layer.json"
      },
      "minItems": 1,
      "description": "Layers info for the area type (base version, current version, data model version)."
    },
    "constraint": {
      "$ref": "/resources/schema/adm/v1/Constraint.json",
      "description": "Constraint for \"home area creation\". For refresh use case, constraint is not applicable."
    },
    "overwrite": {
      "type": "boolean",
      "default": false,
      "description": "true - predict home area only with location & profile_locations. </br>false - predict home area using location, profile_locations and user profile data. "
    }
  },
  "required": [
    "device_id",
    "current_location",
    "area_type",
    "layers"
  ]
}