Add, update, move, remove (park in rejected) or restore places. Each op result has the list_id and kind of the list it used.
View input schema
{
"type": "object",
"properties": {
"map_id": {
"type": "string",
"pattern": "^[a-z0-9_-]{1,64}$"
},
"draft_handle": {
"description": "The draft_handle map_create returned; unsaved maps only.",
"type": "string"
},
"ops": {
"minItems": 1,
"maxItems": 50,
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"op": {
"type": "string",
"const": "add"
},
"op_id": {
"type": "string",
"maxLength": 64
},
"place": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"place_id": {
"type": "string"
},
"point": {
"type": "object",
"properties": {
"lat": {
"type": "number",
"minimum": -90,
"maximum": 90
},
"lng": {
"type": "number",
"minimum": -180,
"maximum": 180
}
},
"required": [
"lat",
"lng"
],
"additionalProperties": false
},
"address": {
"type": "string",
"minLength": 3,
"maxLength": 300,
"description": "Street address with house number, e.g. '233 S Wacker Dr, Chicago, IL'. Include town and state when known."
},
"geometry": {
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "LineString"
},
"coordinates": {
"minItems": 2,
"maxItems": 2000,
"type": "array",
"items": {
"type": "array",
"prefixItems": [
{
"type": "number",
"minimum": -180,
"maximum": 180
},
{
"type": "number",
"minimum": -90,
"maximum": 90
},
{
"type": "number"
}
],
"items": false,
"minItems": 2,
"maxItems": 3
}
},
"names": {
"description": "Optional: one name per line, in order; null for an unnamed line. The map labels each line.",
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"maxLength": 80
},
{
"type": "null"
}
]
}
}
},
"required": [
"type",
"coordinates"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "MultiLineString"
},
"coordinates": {
"minItems": 1,
"type": "array",
"items": {
"minItems": 2,
"maxItems": 2000,
"type": "array",
"items": {
"type": "array",
"prefixItems": [
{
"type": "number",
"minimum": -180,
"maximum": 180
},
{
"type": "number",
"minimum": -90,
"maximum": 90
},
{
"type": "number"
}
],
"items": false,
"minItems": 2,
"maxItems": 3
}
}
},
"names": {
"description": "Optional: one name per line, in order; null for an unnamed line. The map labels each line.",
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"maxLength": 80
},
{
"type": "null"
}
]
}
}
},
"required": [
"type",
"coordinates"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "Polygon"
},
"coordinates": {
"minItems": 1,
"type": "array",
"items": {
"minItems": 4,
"maxItems": 2000,
"type": "array",
"items": {
"type": "array",
"prefixItems": [
{
"type": "number",
"minimum": -180,
"maximum": 180
},
{
"type": "number",
"minimum": -90,
"maximum": 90
},
{
"type": "number"
}
],
"items": false,
"minItems": 2,
"maxItems": 3
}
}
}
},
"required": [
"type",
"coordinates"
],
"additionalProperties": false
}
],
"description": "GeoJSON [lng, lat] positions (optional altitude is discarded). Polygon rings close with the first position. At most 2000 positions total."
},
"category": {
"type": "string",
"maxLength": 100
},
"notes": {
"type": "string",
"maxLength": 2000
},
"website": {
"type": "string",
"maxLength": 300
},
"phone": {
"type": "string",
"maxLength": 40
},
"time": {
"type": "string"
},
"duration_min": {
"type": "integer",
"minimum": 0
},
"status": {
"type": "string",
"enum": [
"tentative",
"confirmed",
"visited",
"skipped"
]
},
"travel_mode_to": {
"anyOf": [
{
"type": "string",
"enum": [
"auto",
"bicycle",
"pedestrian"
]
},
{
"type": "null"
}
]
}
},
"required": [
"name"
],
"additionalProperties": false,
"anyOf": [
{
"required": [
"place_id"
]
},
{
"required": [
"point"
]
},
{
"required": [
"address"
]
},
{
"required": [
"geometry"
]
}
]
},
"to": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "object",
"properties": {
"new": {
"type": "string",
"minLength": 1,
"description": "Name of the list to create; an existing list of that kind and name is reused."
},
"kind": {
"description": "plan (default): part of the map's plan, numbered and routed in order: days, tours, houses, venues or neighborhoods to visit or compare. saved: places kept aside as options, only when the traveler asks to save, keep or collect them (favorites, maybes, ideas).",
"type": "string",
"enum": [
"plan",
"saved"
]
}
},
"required": [
"new"
],
"additionalProperties": false
}
],
"description": "Destination: an existing list's list_id or name, or {\"new\": name} to create one."
},
"index": {
"type": "integer",
"minimum": 0,
"description": "Zero-based position in a plan list; omit to append."
}
},
"required": [
"op",
"place",
"to"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"op": {
"type": "string",
"const": "update"
},
"op_id": {
"type": "string",
"maxLength": 64
},
"place": {
"type": "string",
"minLength": 1,
"description": "entry_id from map_get_state, or the place's name (a string)."
},
"set": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"point": {
"type": "object",
"properties": {
"lat": {
"type": "number",
"minimum": -90,
"maximum": 90
},
"lng": {
"type": "number",
"minimum": -180,
"maximum": 180
}
},
"required": [
"lat",
"lng"
],
"additionalProperties": false
},
"address": {
"type": "string",
"minLength": 3,
"maxLength": 300,
"description": "Street address with house number, e.g. '233 S Wacker Dr, Chicago, IL'. Include town and state when known."
},
"geometry": {
"description": "null removes the geometry.",
"anyOf": [
{
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "LineString"
},
"coordinates": {
"minItems": 2,
"maxItems": 2000,
"type": "array",
"items": {
"type": "array",
"prefixItems": [
{
"type": "number",
"minimum": -180,
"maximum": 180
},
{
"type": "number",
"minimum": -90,
"maximum": 90
},
{
"type": "number"
}
],
"items": false,
"minItems": 2,
"maxItems": 3
}
},
"names": {
"description": "Optional: one name per line, in order; null for an unnamed line. The map labels each line.",
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"maxLength": 80
},
{
"type": "null"
}
]
}
}
},
"required": [
"type",
"coordinates"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "MultiLineString"
},
"coordinates": {
"minItems": 1,
"type": "array",
"items": {
"minItems": 2,
"maxItems": 2000,
"type": "array",
"items": {
"type": "array",
"prefixItems": [
{
"type": "number",
"minimum": -180,
"maximum": 180
},
{
"type": "number",
"minimum": -90,
"maximum": 90
},
{
"type": "number"
}
],
"items": false,
"minItems": 2,
"maxItems": 3
}
}
},
"names": {
"description": "Optional: one name per line, in order; null for an unnamed line. The map labels each line.",
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"maxLength": 80
},
{
"type": "null"
}
]
}
}
},
"required": [
"type",
"coordinates"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "Polygon"
},
"coordinates": {
"minItems": 1,
"type": "array",
"items": {
"minItems": 4,
"maxItems": 2000,
"type": "array",
"items": {
"type": "array",
"prefixItems": [
{
"type": "number",
"minimum": -180,
"maximum": 180
},
{
"type": "number",
"minimum": -90,
"maximum": 90
},
{
"type": "number"
}
],
"items": false,
"minItems": 2,
"maxItems": 3
}
}
}
},
"required": [
"type",
"coordinates"
],
"additionalProperties": false
}
],
"description": "GeoJSON [lng, lat] positions (optional altitude is discarded). Polygon rings close with the first position. At most 2000 positions total."
},
{
"type": "null"
}
]
},
"notes": {
"type": "string",
"maxLength": 2000
},
"website": {
"description": "null removes the website.",
"anyOf": [
{
"type": "string",
"maxLength": 300
},
{
"type": "null"
}
]
},
"phone": {
"description": "null removes the phone.",
"anyOf": [
{
"type": "string",
"maxLength": 40
},
{
"type": "null"
}
]
},
"time": {
"type": "string"
},
"duration_min": {
"type": "integer",
"minimum": 0
},
"status": {
"type": "string",
"enum": [
"tentative",
"confirmed",
"visited",
"skipped"
]
},
"travel_mode_to": {
"anyOf": [
{
"type": "string",
"enum": [
"auto",
"bicycle",
"pedestrian"
]
},
{
"type": "null"
}
]
}
},
"additionalProperties": false,
"anyOf": [
{
"required": [
"name"
]
},
{
"required": [
"point"
]
},
{
"required": [
"address"
]
},
{
"required": [
"geometry"
]
},
{
"required": [
"notes"
]
},
{
"required": [
"website"
]
},
{
"required": [
"phone"
]
},
{
"required": [
"time"
]
},
{
"required": [
"duration_min"
]
},
{
"required": [
"status"
]
},
{
"required": [
"travel_mode_to"
]
}
]
}
},
"required": [
"op",
"place",
"set"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"op": {
"type": "string",
"const": "move"
},
"op_id": {
"type": "string",
"maxLength": 64
},
"place": {
"type": "string",
"minLength": 1,
"description": "entry_id from map_get_state, or the place's name (a string)."
},
"to": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "object",
"properties": {
"new": {
"type": "string",
"minLength": 1,
"description": "Name of the list to create; an existing list of that kind and name is reused."
},
"kind": {
"description": "plan (default): part of the map's plan, numbered and routed in order: days, tours, houses, venues or neighborhoods to visit or compare. saved: places kept aside as options, only when the traveler asks to save, keep or collect them (favorites, maybes, ideas).",
"type": "string",
"enum": [
"plan",
"saved"
]
}
},
"required": [
"new"
],
"additionalProperties": false
}
],
"description": "Destination: an existing list's list_id or name, or {\"new\": name} to create one."
},
"index": {
"type": "integer",
"minimum": 0,
"description": "Zero-based position in a plan list; omit to append."
}
},
"required": [
"op",
"place"
],
"additionalProperties": false,
"anyOf": [
{
"required": [
"to"
]
},
{
"required": [
"index"
]
}
]
},
{
"type": "object",
"properties": {
"op": {
"type": "string",
"const": "remove"
},
"op_id": {
"type": "string",
"maxLength": 64
},
"place": {
"type": "string",
"minLength": 1,
"description": "entry_id from map_get_state, or the place's name (a string)."
},
"reason": {
"type": "string"
}
},
"required": [
"op",
"place"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"op": {
"type": "string",
"const": "restore"
},
"op_id": {
"type": "string",
"maxLength": 64
},
"place": {
"type": "string",
"minLength": 1,
"description": "entry_id from map_get_state, or the place's name (a string)."
},
"to": {
"description": "An existing list. Default: the list it came from; if gone, Unscheduled.",
"type": "string",
"minLength": 1
},
"index": {
"type": "integer",
"minimum": 0,
"description": "Zero-based position in a plan list; omit to append."
}
},
"required": [
"op",
"place"
],
"additionalProperties": false
}
]
}
},
"expected_version": {
"description": "The version you planned this edit from. If someone else has since changed what it touches, nothing is applied and the result is a conflict with their changes and the current version.",
"type": "string",
"maxLength": 64
},
"conversation_id": {
"type": "string",
"maxLength": 64,
"pattern": "^(?!user$|system$)[^:\\x00-\\x1f\\x7f-\\x9f\\u2028\\u2029]*$"
}
},
"required": [
"map_id",
"ops"
],
"additionalProperties": false
}