Change a plan with a list of ops (see the ops schema), applied in order, all or nothing; days are named by date (YYYY-MM-DD), set_start_date moves every day and booking, and close_day takes out a day between the first and last and moves every later day one date earlier (bookings keep their dates). base_seq is required: the seq from get_plan, so a plan changed elsewhere since you read it is refused rather than overwritten; on a conflict, read it again and redo the edit. Stop and booking ids come from get_plan. Prefer places from get_destination or get_place (meridian_url), so the map can place them; title each place by its proper name with what the traveller does there in visitNote, give every other real place its lat and lng, and every place a time, in the order of the day, so the app can draw the travel between them (a place without a time is timed after the one before it). Ask the traveller before removing anything. Needs sign-in.
View input schema
{
"type": "object",
"properties": {
"plan_id": {
"type": "string"
},
"base_seq": {
"type": "integer",
"description": "The seq from get_plan or list_my_plans. Required."
},
"ops": {
"type": "array",
"minItems": 1,
"maxItems": 100,
"items": {
"anyOf": [
{
"type": "object",
"properties": {
"op": {
"const": "set_title"
},
"title": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"required": [
"op",
"title"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"op": {
"const": "set_start_date"
},
"startDate": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
}
},
"required": [
"op",
"startDate"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"op": {
"const": "add_day"
},
"date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
}
},
"required": [
"op",
"date"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"op": {
"const": "remove_day"
},
"date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"force": {
"type": "boolean",
"description": "Required when the day holds stops or a booking starting that day: removes the day and its stops (bookings are kept). Without it such a day is refused, naming what it holds. Ask the traveller first."
}
},
"required": [
"op",
"date"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"op": {
"const": "close_day"
},
"date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"force": {
"type": "boolean",
"description": "Required when the day holds stops: they are removed (its notes move to the day before). Ask the traveller first."
}
},
"required": [
"op",
"date"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"op": {
"const": "set_day"
},
"date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"town": {
"type": [
"string",
"null"
]
},
"summary": {
"type": [
"string",
"null"
]
}
},
"required": [
"op",
"date"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"op": {
"const": "add_stop"
},
"date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"stop": {
"type": "object",
"properties": {
"title": {
"type": "string",
"maxLength": 200
},
"type": {
"type": "string",
"enum": [
"activity",
"restaurant",
"freeform"
],
"description": "freeform for a transfer or a note."
},
"time": {
"type": "string",
"pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
"description": "HH:mm, 24-hour."
},
"category": {
"type": "string",
"maxLength": 60
},
"town": {
"type": "string",
"maxLength": 100
},
"visitNote": {
"type": "string",
"maxLength": 240,
"description": "ONE sentence (the day page shows only the first) on what the traveller does here on this day (\"Camel trek out for sunset on the dunes, then back to camp for dinner\"). Shown under the stop's name. Put the doing here and keep title the place's proper name (\"Erg Chebbi\", not \"Camel trek into Erg Chebbi\")."
},
"note": {
"type": "string",
"maxLength": 2000,
"description": "A standing advisory about the place itself (closed Mondays, cash only, book weeks ahead): the app's Know before you go, replaced by the guide's own where a page exists. Not for what the traveller does there; that is visitNote."
},
"prose": {
"type": "string",
"maxLength": 2000
},
"minutes": {
"type": "integer",
"minimum": 1,
"maximum": 1440
},
"ticketsURL": {
"type": "string",
"format": "uri",
"description": "https only. The official page to book this stop: a sight's own ticket shop, or for a restaurant its reservation page (its own site, or the booking service it uses: OpenTable, Resy, SevenRooms, TheFork, Tock). Still to book's BOOK opens it; without one the row shows no BOOK. Never a reseller or a search page."
},
"booked": {
"type": "boolean",
"description": "For a restaurant, a tour or a ticketed sight: true once the traveller holds the table or ticket, false while it still needs booking (it then shows in the app's Still to book, with BOOK opening ticketsURL). Leave it out for a place that needs nothing."
},
"meridian_url": {
"type": "string",
"description": "The url of a Meridian Dispatch place (from get_place, get_destination or search_guides). Sets the title, town and location from the guide, so the stop lands on the map."
},
"lat": {
"type": "number",
"minimum": -90,
"maximum": 90,
"description": "Latitude of a real place with no meridian_url, to about 100 m: the app draws the travel line between two stops only when both have a location and a time. Give lat and lng together; they are checked against the stop's town."
},
"lng": {
"type": "number",
"minimum": -180,
"maximum": 180,
"description": "Longitude, with lat."
}
}
},
"position": {
"type": "integer",
"minimum": 0
}
},
"required": [
"op",
"date",
"stop"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"op": {
"const": "update_stop"
},
"id": {
"type": "string",
"description": "A stop or booking id from get_plan."
},
"fields": {
"type": "object",
"properties": {
"title": {
"type": "string",
"maxLength": 200
},
"type": {
"type": "string",
"enum": [
"activity",
"restaurant",
"freeform"
],
"description": "freeform for a transfer or a note."
},
"time": {
"type": "string",
"pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
"description": "HH:mm, 24-hour."
},
"category": {
"type": "string",
"maxLength": 60
},
"town": {
"type": "string",
"maxLength": 100
},
"visitNote": {
"type": "string",
"maxLength": 240,
"description": "ONE sentence (the day page shows only the first) on what the traveller does here on this day (\"Camel trek out for sunset on the dunes, then back to camp for dinner\"). Shown under the stop's name. Put the doing here and keep title the place's proper name (\"Erg Chebbi\", not \"Camel trek into Erg Chebbi\")."
},
"note": {
"type": "string",
"maxLength": 2000,
"description": "A standing advisory about the place itself (closed Mondays, cash only, book weeks ahead): the app's Know before you go, replaced by the guide's own where a page exists. Not for what the traveller does there; that is visitNote."
},
"prose": {
"type": "string",
"maxLength": 2000
},
"minutes": {
"type": "integer",
"minimum": 1,
"maximum": 1440
},
"ticketsURL": {
"type": "string",
"format": "uri",
"description": "https only. The official page to book this stop: a sight's own ticket shop, or for a restaurant its reservation page (its own site, or the booking service it uses: OpenTable, Resy, SevenRooms, TheFork, Tock). Still to book's BOOK opens it; without one the row shows no BOOK. Never a reseller or a search page."
},
"booked": {
"type": "boolean",
"description": "For a restaurant, a tour or a ticketed sight: true once the traveller holds the table or ticket, false while it still needs booking (it then shows in the app's Still to book, with BOOK opening ticketsURL). Leave it out for a place that needs nothing."
},
"meridian_url": {
"type": "string",
"description": "The url of a Meridian Dispatch place (from get_place, get_destination or search_guides). Sets the title, town and location from the guide, so the stop lands on the map."
},
"lat": {
"type": "number",
"minimum": -90,
"maximum": 90,
"description": "Latitude of a real place with no meridian_url, to about 100 m: the app draws the travel line between two stops only when both have a location and a time. Give lat and lng together; they are checked against the stop's town."
},
"lng": {
"type": "number",
"minimum": -180,
"maximum": 180,
"description": "Longitude, with lat."
}
},
"description": "null on a field clears it."
}
},
"required": [
"op",
"id",
"fields"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"op": {
"const": "move_stop"
},
"id": {
"type": "string",
"description": "A stop or booking id from get_plan."
},
"date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"position": {
"type": "integer",
"minimum": 0
}
},
"required": [
"op",
"id",
"date"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"op": {
"const": "remove_stop"
},
"id": {
"type": "string",
"description": "A stop or booking id from get_plan."
}
},
"required": [
"op",
"id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"op": {
"const": "add_booking"
},
"booking": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"hotel",
"flight",
"train",
"carRental",
"restaurant",
"activity",
"other"
]
},
"title": {
"type": "string",
"maxLength": 200
},
"subtitle": {
"type": "string",
"maxLength": 200
},
"startDate": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"endDate": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"startTime": {
"type": "string",
"pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
},
"endTime": {
"type": "string",
"pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
},
"city": {
"type": "string",
"maxLength": 100
},
"countryCode": {
"type": "string",
"pattern": "^[A-Za-z]{2}$"
},
"booked": {
"type": "boolean"
},
"details": {
"type": "object",
"description": "The booking's particulars, in these keys only (any other is dropped). Fill every one you know: the app draws the booking from them, not from the title. A flight: airline, flightNumber, originCode and destinationCode (IATA), originAirport and destinationAirport (the airports' names), originCity and destinationCity, departureTerminal, arrivalTerminal, cabin, seat; startDate/startTime is the departure and endDate/endTime the arrival, local times. Prefer one booking per leg; a round trip already held as one booking carries returnAirline, returnFlightNumber, returnOriginCode, returnDestinationCode, returnDepartureDate, returnDepartureTime, returnArrivalDate, returnArrivalTime, returnSeat, with outboundArrivalDate/Time for the first leg. A hotel: address, website, roomType, nights (check-in and check-out times go in startTime and endTime). A restaurant: address, website, partySize (its stop's ticketsURL is the reservation page). A tour or activity: company (the operator), address (the meeting point), website. A train: operator, trainNumber, carriage, seat, originStation, destinationStation, originCity, destinationCity. A car rental: company, vehicleClass, pickupLocation, dropoffLocation. Never the name on the booking.",
"properties": {
"airline": {
"type": "string"
},
"flightNumber": {
"type": "string",
"description": "e.g. OS36"
},
"originCode": {
"type": "string",
"pattern": "^[A-Z]{3}$"
},
"destinationCode": {
"type": "string",
"pattern": "^[A-Z]{3}$"
},
"originAirport": {
"type": "string"
},
"destinationAirport": {
"type": "string"
},
"originCity": {
"type": "string"
},
"destinationCity": {
"type": "string"
},
"company": {
"type": "string"
},
"address": {
"type": "string"
},
"website": {
"type": "string",
"format": "uri"
},
"roomType": {
"type": "string"
},
"nights": {
"type": "string"
},
"partySize": {
"type": "string"
},
"departureTerminal": {
"type": "string"
},
"arrivalTerminal": {
"type": "string"
},
"cabin": {
"type": "string"
},
"seat": {
"type": "string"
},
"returnSeat": {
"type": "string"
},
"carriage": {
"type": "string"
},
"outboundDepartureDate": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"outboundDepartureTime": {
"type": "string",
"pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
},
"outboundArrivalDate": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"outboundArrivalTime": {
"type": "string",
"pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
},
"returnAirline": {
"type": "string"
},
"returnFlightNumber": {
"type": "string"
},
"returnOriginCode": {
"type": "string",
"pattern": "^[A-Z]{3}$"
},
"returnDestinationCode": {
"type": "string",
"pattern": "^[A-Z]{3}$"
},
"returnDepartureDate": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"returnDepartureTime": {
"type": "string",
"pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
},
"returnArrivalDate": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"returnArrivalTime": {
"type": "string",
"pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
},
"operator": {
"type": "string"
},
"trainNumber": {
"type": "string"
},
"originStation": {
"type": "string"
},
"destinationStation": {
"type": "string"
},
"vehicleClass": {
"type": "string"
},
"pickupLocation": {
"type": "string"
},
"dropoffLocation": {
"type": "string"
}
},
"additionalProperties": {
"type": "string"
}
}
},
"required": [
"type",
"title"
]
}
},
"required": [
"op",
"booking"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"op": {
"const": "update_booking"
},
"id": {
"type": "string",
"description": "A stop or booking id from get_plan."
},
"fields": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"hotel",
"flight",
"train",
"carRental",
"restaurant",
"activity",
"other"
]
},
"title": {
"type": "string",
"maxLength": 200
},
"subtitle": {
"type": "string",
"maxLength": 200
},
"startDate": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"endDate": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"startTime": {
"type": "string",
"pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
},
"endTime": {
"type": "string",
"pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
},
"city": {
"type": "string",
"maxLength": 100
},
"countryCode": {
"type": "string",
"pattern": "^[A-Za-z]{2}$"
},
"booked": {
"type": "boolean"
},
"details": {
"type": "object",
"description": "The booking's particulars, in these keys only (any other is dropped). Fill every one you know: the app draws the booking from them, not from the title. A flight: airline, flightNumber, originCode and destinationCode (IATA), originAirport and destinationAirport (the airports' names), originCity and destinationCity, departureTerminal, arrivalTerminal, cabin, seat; startDate/startTime is the departure and endDate/endTime the arrival, local times. Prefer one booking per leg; a round trip already held as one booking carries returnAirline, returnFlightNumber, returnOriginCode, returnDestinationCode, returnDepartureDate, returnDepartureTime, returnArrivalDate, returnArrivalTime, returnSeat, with outboundArrivalDate/Time for the first leg. A hotel: address, website, roomType, nights (check-in and check-out times go in startTime and endTime). A restaurant: address, website, partySize (its stop's ticketsURL is the reservation page). A tour or activity: company (the operator), address (the meeting point), website. A train: operator, trainNumber, carriage, seat, originStation, destinationStation, originCity, destinationCity. A car rental: company, vehicleClass, pickupLocation, dropoffLocation. Never the name on the booking.",
"properties": {
"airline": {
"type": "string"
},
"flightNumber": {
"type": "string",
"description": "e.g. OS36"
},
"originCode": {
"type": "string",
"pattern": "^[A-Z]{3}$"
},
"destinationCode": {
"type": "string",
"pattern": "^[A-Z]{3}$"
},
"originAirport": {
"type": "string"
},
"destinationAirport": {
"type": "string"
},
"originCity": {
"type": "string"
},
"destinationCity": {
"type": "string"
},
"company": {
"type": "string"
},
"address": {
"type": "string"
},
"website": {
"type": "string",
"format": "uri"
},
"roomType": {
"type": "string"
},
"nights": {
"type": "string"
},
"partySize": {
"type": "string"
},
"departureTerminal": {
"type": "string"
},
"arrivalTerminal": {
"type": "string"
},
"cabin": {
"type": "string"
},
"seat": {
"type": "string"
},
"returnSeat": {
"type": "string"
},
"carriage": {
"type": "string"
},
"outboundDepartureDate": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"outboundDepartureTime": {
"type": "string",
"pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
},
"outboundArrivalDate": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"outboundArrivalTime": {
"type": "string",
"pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
},
"returnAirline": {
"type": "string"
},
"returnFlightNumber": {
"type": "string"
},
"returnOriginCode": {
"type": "string",
"pattern": "^[A-Z]{3}$"
},
"returnDestinationCode": {
"type": "string",
"pattern": "^[A-Z]{3}$"
},
"returnDepartureDate": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"returnDepartureTime": {
"type": "string",
"pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
},
"returnArrivalDate": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"returnArrivalTime": {
"type": "string",
"pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
},
"operator": {
"type": "string"
},
"trainNumber": {
"type": "string"
},
"originStation": {
"type": "string"
},
"destinationStation": {
"type": "string"
},
"vehicleClass": {
"type": "string"
},
"pickupLocation": {
"type": "string"
},
"dropoffLocation": {
"type": "string"
}
},
"additionalProperties": {
"type": "string"
}
}
}
}
},
"required": [
"op",
"id",
"fields"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"op": {
"const": "remove_booking"
},
"id": {
"type": "string",
"description": "A stop or booking id from get_plan."
}
},
"required": [
"op",
"id"
],
"additionalProperties": false
}
]
}
},
"verbose": {
"type": "boolean",
"description": "Return the whole plan. By default the reply shows only the days and bookings the edit touched."
}
},
"required": [
"plan_id",
"base_seq",
"ops"
]
}