Skip to content

Custom Places Categories JSON Schema

{
  "id": "CustomPlacesCategoryImport",
  "title": "Custom Places Category Import Format",
  "type": "object",
  "properties": {
    "add_or_update": {
      "description": "An array of Categories, which should be added or updated",
      "type": "array",
      "items": {
        "type": "object",
        "description": "Custom Place Category",
        "properties": {
          "id": {
            "type": "string",
            "description": "Integrator maintained id. Used for further updates/deletes on the Categories."
          },
          "search_priority": {
            "type": "integer",
            "description": "The larger the higher rank in fulltext search. Values 1-15.",
            "minimum": 1,
            "maximum": 15
          },
          "display_name": {
            "type": "array",
            "description": "Used for displaying autocomplete call results.",
            "items": {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string"
                },
                "subtitle": {
                  "type": "string"
                },
                "lng": {
                  "type": "string",
                  "description": "BCP47 Language Tag"
                },
                "search_tokens": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "index": {
                        "type": "string",
                        "description": "Space separated tokens, used for category indexing. At least one value must be matched in order to find a result."
                      },
                      "refinement": {
                        "type": "string",
                        "description": "Space separated tokens, used for index refinement. 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"
              ]
            }
          }
        },
        "required": [
          "id",
          "display_name"
        ]
      }
    },
    "to_remove": {
      "description": "An array of Category IDs, which should be removed",
      "type": "array",
      "items": {
        "type": "string",
        "description": "Integrator maintained ID"
      }
    }
  }
}