Skip to content

Custom Places Categories JSON Schema

{
  "id": "CustomPlacesCategoryImport",
  "title": "Custom Places Category Import Format",
  "type": "object",
  "properties": {
    "add_or_update": {
      "description": "Set of Categories, which should be added or updated.",
      "type": "array",
      "items": {
        "type": "object",
        "description": "Custom Place Category definition.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique, integrator maintained identifier."
          },
          "search_priority": {
            "type": "integer",
            "description": "Search Priority of the Category, relative to other categories.",
            "minimum": 1,
            "maximum": 15
          },
          "display_name": {
            "type": "array",
            "description": "A set of display names (human readable texts), in various languages, for the Place Category. Intended for user interaction.",
            "items": {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string",
                  "description": "Title of the Category."
                },
                "subtitle": {
                  "type": "string",
                  "description": "Subtitle of the Category."
                },
                "lng": {
                  "type": "string",
                  "description": "BCP47 Language Tag specifying the language of the display_name entry."
                },
                "search_tokens": {
                  "type": "array",
                  "description": "Set of search tokens for the display_name entry, in the same language specified by the 'lng' field.",
                  "items": {
                    "type": "object",
                    "properties": {
                      "index": {
                        "type": "string",
                        "description": "Space-separated search tokens, used for entry indexing."
                      },
                      "refinement": {
                        "type": "string",
                        "description": "Space-separated search refinement tokens, used for entry refinement index. Refinement alone does not suffice for result
                        to be found but acts as addition to 'index'. For example: index: \"Slovnaft\", refinement: \"bathroom\": when searching for \"Slovnaft\"
                        result is found. When searching only for \"bathroom\" result is not found. When searching for \"Slovnaft bathroom\" result is found and
                        refined (other \"Slovnaft\" matching results are discarded)."
                      }
                    },
                    "required": [
                      "index"
                    ]
                  }
                }
              },
              "required": [
                "title"
              ]
            }
          }
        },
        "dataset": {
          "type": "string",
          "description": "Unique identifier of dataset. Default dataset for older, already installed places is bf19e514-487b-43c4-b0df-9073b2397dd1."
        },
        "required": [
          "id",
          "display_name"
        ]
      }
    },
    "to_remove": {
      "description": "Set of Place Category IDs, which should be removed.",
      "type": "array",
      "items": {
        "type": "string",
        "description": "Integrator maintained ID of the Category."
      }
    }
  }
}