Changes one trip: a batch of up to 200 operations, applied all or none and saved as one change in the trip’s history. Creates, updates and deletes items, interest, notes, links, research, questions and answers, reminders, documents and the trip’s details and people.
A member of the trip. Letting people in, turning them down or removing them, handing the trip over and replacing its join link are the owner’s alone. Notes, answers, interest and documents are each person’s own.
The full input schema
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"trip": {
"type": "string",
"description": "The trip id, e.g. \"trp_8Kd2…\", from list_trips."
},
"reason": {
"type": "string",
"minLength": 1,
"maxLength": 500,
"description": "Why, in a sentence the rest of the group will read."
},
"ops": {
"minItems": 1,
"maxItems": 200,
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"properties": {
"op": {
"type": "string",
"const": "create"
},
"type": {
"type": "string",
"const": "item"
},
"ref": {
"description": "A name for this new item; later operations in the same batch can use it as $name.",
"type": "string",
"pattern": "^[A-Za-z0-9_-]{1,40}$"
},
"fields": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"place",
"goal",
"choice",
"stay",
"move",
"task",
"info"
]
},
"title": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"category": {
"type": "string",
"maxLength": 40
},
"status": {
"type": "string",
"enum": [
"idea",
"planned",
"booked",
"cancelled",
"done",
"skipped",
"missed",
"dropped",
"todo",
"option",
"not_chosen"
]
},
"where": {
"type": "object",
"properties": {
"precision": {
"type": "string",
"enum": [
"spot",
"area",
"city",
"region",
"country",
"none"
]
},
"name": {
"type": "string",
"maxLength": 200
},
"address": {
"type": "string",
"maxLength": 300
},
"city": {
"description": "The city or town it's in, as people say it, never the ward or the prefecture: \"Tokyo\" for Oimachi, Shinagawa; \"Ikaho\", not Gunma; \"Seoul\", not Jung-gu. On every stay: it heads the stay's group on the map.",
"type": "string",
"minLength": 1,
"maxLength": 60
},
"lat": {
"type": "number",
"minimum": -90,
"maximum": 90
},
"lng": {
"type": "number",
"minimum": -180,
"maximum": 180
},
"radius_m": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 1000000
},
"ref": {
"type": "string",
"maxLength": 500
}
},
"required": [
"precision"
],
"additionalProperties": false
},
"from": {
"type": "object",
"properties": {
"precision": {
"type": "string",
"enum": [
"spot",
"area",
"city",
"region",
"country",
"none"
]
},
"name": {
"type": "string",
"maxLength": 200
},
"address": {
"type": "string",
"maxLength": 300
},
"city": {
"description": "The city or town it's in, as people say it, never the ward or the prefecture: \"Tokyo\" for Oimachi, Shinagawa; \"Ikaho\", not Gunma; \"Seoul\", not Jung-gu. On every stay: it heads the stay's group on the map.",
"type": "string",
"minLength": 1,
"maxLength": 60
},
"lat": {
"type": "number",
"minimum": -90,
"maximum": 90
},
"lng": {
"type": "number",
"minimum": -180,
"maximum": 180
},
"radius_m": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 1000000
},
"ref": {
"type": "string",
"maxLength": 500
}
},
"required": [
"precision"
],
"additionalProperties": false
},
"to": {
"type": "object",
"properties": {
"precision": {
"type": "string",
"enum": [
"spot",
"area",
"city",
"region",
"country",
"none"
]
},
"name": {
"type": "string",
"maxLength": 200
},
"address": {
"type": "string",
"maxLength": 300
},
"city": {
"description": "The city or town it's in, as people say it, never the ward or the prefecture: \"Tokyo\" for Oimachi, Shinagawa; \"Ikaho\", not Gunma; \"Seoul\", not Jung-gu. On every stay: it heads the stay's group on the map.",
"type": "string",
"minLength": 1,
"maxLength": 60
},
"lat": {
"type": "number",
"minimum": -90,
"maximum": 90
},
"lng": {
"type": "number",
"minimum": -180,
"maximum": 180
},
"radius_m": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 1000000
},
"ref": {
"type": "string",
"maxLength": 500
}
},
"required": [
"precision"
],
"additionalProperties": false
},
"when": {
"oneOf": [
{
"type": "object",
"properties": {
"precision": {
"type": "string",
"const": "none"
}
},
"required": [
"precision"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"precision": {
"type": "string",
"const": "days"
},
"start": {
"anyOf": [
{
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
},
{
"type": "string",
"pattern": "^day [1-9]\\d{0,2}$"
}
]
},
"end": {
"anyOf": [
{
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
},
{
"type": "string",
"pattern": "^day [1-9]\\d{0,2}$"
}
]
}
},
"required": [
"precision",
"start",
"end"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"precision": {
"type": "string",
"const": "day"
},
"day": {
"anyOf": [
{
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
},
{
"type": "string",
"pattern": "^day [1-9]\\d{0,2}$"
}
]
}
},
"required": [
"precision",
"day"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"precision": {
"type": "string",
"const": "part"
},
"day": {
"anyOf": [
{
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
},
{
"type": "string",
"pattern": "^day [1-9]\\d{0,2}$"
}
]
},
"part": {
"type": "string",
"enum": [
"morning",
"afternoon",
"evening",
"night"
]
}
},
"required": [
"precision",
"part"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"precision": {
"type": "string",
"const": "window"
},
"start": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2})?$"
},
"end": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2})?$"
},
"tz": {
"type": "string"
}
},
"required": [
"precision",
"start",
"end",
"tz"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"precision": {
"type": "string",
"const": "exact"
},
"start": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2})?$"
},
"end": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2})?$"
},
"tz": {
"type": "string"
},
"end_tz": {
"type": "string"
}
},
"required": [
"precision",
"start",
"tz"
],
"additionalProperties": false
}
]
},
"hours": {
"type": "string",
"maxLength": 300
},
"closed": {
"type": "string",
"maxLength": 100
},
"duration": {
"type": "string",
"maxLength": 40
},
"booking_needed": {
"type": "boolean"
},
"books_from": {
"anyOf": [
{
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
},
{
"type": "object",
"properties": {
"days_before": {
"type": "integer",
"minimum": 1,
"maximum": 400
}
},
"required": [
"days_before"
],
"additionalProperties": false
}
]
},
"best_time": {
"type": "string",
"maxLength": 200
},
"pros": {
"maxItems": 12,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"cons": {
"maxItems": 12,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"getting_around": {
"maxItems": 10,
"type": "array",
"items": {
"type": "object",
"properties": {
"to": {
"type": "string",
"minLength": 1,
"maxLength": 120,
"description": "Where to: \"Nagano Station (JR, Shinkansen)\", \"Haneda Airport\"."
},
"how": {
"description": "walk, bus, train, taxi, shuttle… (walk if not said)",
"type": "string",
"maxLength": 40
},
"minutes": {
"type": "integer",
"minimum": 0,
"maximum": 600
},
"note": {
"type": "string",
"maxLength": 200
}
},
"required": [
"to"
],
"additionalProperties": false
}
},
"nearby": {
"maxItems": 15,
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"what": {
"description": "food, shops, convenience store, sight…",
"type": "string",
"maxLength": 60
},
"minutes": {
"description": "Minutes' walk.",
"type": "integer",
"minimum": 0,
"maximum": 120
},
"note": {
"type": "string",
"maxLength": 200
}
},
"required": [
"name"
],
"additionalProperties": false
}
},
"amenities": {
"maxItems": 20,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 80
}
},
"good_to_know": {
"maxItems": 10,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"contact": {
"type": "object",
"properties": {
"website": {
"type": "string",
"format": "uri"
},
"phone": {
"type": "string",
"pattern": "^\\+?[\\d\\s().-]{5,30}$"
},
"email": {
"type": "string",
"format": "email",
"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
},
"social": {
"description": "Its Instagram or other pages.",
"maxItems": 5,
"type": "array",
"items": {
"type": "string",
"format": "uri"
}
}
},
"additionalProperties": false
},
"photos": {
"description": "Up to five pictures of it from the web, the best first, references only. See guide { topic: \"photos\" }.",
"maxItems": 5,
"type": "array",
"items": {
"type": "object",
"properties": {
"url": {
"type": "string",
"maxLength": 2000,
"format": "uri",
"description": "The image itself (https), a mid-size version: Wikimedia's /960px- thumbnail, say."
},
"source": {
"type": "string",
"maxLength": 2000,
"format": "uri",
"description": "The page it was found on; tapping the credit opens it."
},
"credit": {
"type": "string",
"minLength": 1,
"maxLength": 100,
"description": "Who to credit: the site's or the photographer's name (\"Wikimedia Commons\", \"Kyoto City\")."
}
},
"required": [
"url",
"source",
"credit"
],
"additionalProperties": false
}
},
"cost": {
"type": "object",
"properties": {
"amount": {
"type": "number",
"minimum": 0
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$"
},
"per": {
"type": "string",
"enum": [
"person",
"group"
]
},
"estimate": {
"type": "boolean"
},
"category": {
"type": "string",
"enum": [
"stays",
"transport",
"food",
"activities",
"other"
]
}
},
"required": [
"amount",
"currency"
],
"additionalProperties": false
},
"paid": {
"maxItems": 50,
"type": "array",
"items": {
"type": "object",
"properties": {
"by": {
"type": "string",
"minLength": 1,
"description": "The person who paid: their member id (mem_…) or person id."
},
"amount": {
"type": "number",
"exclusiveMinimum": 0
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$"
},
"method": {
"type": "string",
"minLength": 1,
"maxLength": 60,
"description": "How it was paid, in a few words: \"Mastercard 8682\", \"Cash\", \"Citi Prestige points\", \"Bank transfer\". Only a card's last 4 digits, never its whole number."
}
},
"required": [
"by",
"amount",
"currency"
],
"additionalProperties": false
}
},
"charges": {
"description": "What a card on file will be charged later, on a day: [{by, amount, currency, method, on}]. See guide { topic: \"money\" }.",
"maxItems": 50,
"type": "array",
"items": {
"type": "object",
"properties": {
"by": {
"type": "string",
"minLength": 1,
"description": "Whose card it goes on: their member id (mem_…) or person id."
},
"amount": {
"type": "number",
"exclusiveMinimum": 0
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$"
},
"method": {
"description": "Which card, in a few words: \"Mastercard 8682\". Only a card's last 4 digits, never its whole number.",
"type": "string",
"minLength": 1,
"maxLength": 60
},
"on": {
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
"description": "The day the card is charged, in the booking's own time zone."
}
},
"required": [
"by",
"amount",
"currency",
"on"
],
"additionalProperties": false
}
},
"refunds": {
"maxItems": 50,
"type": "array",
"items": {
"type": "object",
"properties": {
"to": {
"type": "string",
"minLength": 1,
"description": "The person it goes back to: their member id (mem_…) or person id."
},
"amount": {
"type": "number",
"exclusiveMinimum": 0
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$"
},
"received": {
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
}
},
"required": [
"to",
"amount",
"currency"
],
"additionalProperties": false
}
},
"origin": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "ai"
},
"by": {
"description": "Which AI; Tripmo fills it in from the connection.",
"type": "string",
"maxLength": 100
}
},
"required": [
"kind"
],
"additionalProperties": false
},
"recommended_by": {
"maxItems": 20,
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 100,
"description": "The friend's name, spelled as the trip already spells it."
},
"pad": {
"description": "The pad it came through, when it did.",
"type": "string"
},
"said": {
"description": "Their own words, never rewritten.",
"type": "string",
"minLength": 1,
"maxLength": 1000
}
},
"required": [
"name"
],
"additionalProperties": false
}
},
"booking": {
"type": "object",
"properties": {
"ref": {
"type": "string",
"maxLength": 100
},
"provider": {
"type": "string",
"maxLength": 100
},
"url": {
"type": "string",
"format": "uri"
},
"booker": {
"type": "string"
},
"booked_by": {
"type": "string"
},
"for": {
"type": "array",
"items": {
"type": "string"
}
},
"cancellation": {
"type": "object",
"properties": {
"steps": {
"maxItems": 10,
"type": "array",
"items": {
"type": "object",
"properties": {
"until": {
"anyOf": [
{
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
},
{
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2})?$"
}
]
},
"refund": {
"anyOf": [
{
"type": "string",
"const": "full"
},
{
"type": "object",
"properties": {
"percent": {
"type": "number",
"minimum": 0,
"maximum": 100
}
},
"required": [
"percent"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"amount": {
"type": "number",
"minimum": 0
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$"
}
},
"required": [
"amount",
"currency"
],
"additionalProperties": false
}
]
}
},
"required": [
"until",
"refund"
],
"additionalProperties": false
}
},
"text": {
"type": "string",
"maxLength": 1000
}
},
"required": [
"steps"
],
"additionalProperties": false
},
"cancelled_on": {
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
}
},
"additionalProperties": false
},
"parent": {
"type": "string"
},
"order": {
"type": "number"
},
"owner": {
"type": "string"
},
"due": {
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
},
"important": {
"description": "Tasks: missing it costs money or the trip (a visa, a deposit, tickets that sell out). Everyone in the trip hears when it's done, moved, reassigned or removed.",
"type": "boolean"
},
"tags": {
"maxItems": 20,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 40
}
},
"links": {
"maxItems": 20,
"type": "array",
"items": {
"type": "string",
"format": "uri"
}
},
"notes": {
"type": "string",
"maxLength": 4000
},
"data": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"required": [
"type",
"title"
],
"additionalProperties": false
}
},
"required": [
"op",
"type",
"fields"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"op": {
"type": "string",
"const": "create"
},
"type": {
"type": "string",
"const": "interest"
},
"fields": {
"type": "object",
"properties": {
"item": {
"type": "string",
"description": "The item's id, or $ref of an item created earlier in this batch."
},
"tier": {
"type": "string",
"enum": [
"no",
"maybe",
"yes"
],
"description": "\"no\" (not interested), \"maybe\" or \"yes\" (really want it)."
},
"going": {
"type": "string",
"enum": [
"yes",
"no",
"maybe"
]
}
},
"required": [
"item"
],
"additionalProperties": false
}
},
"required": [
"op",
"type",
"fields"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"op": {
"type": "string",
"const": "create"
},
"type": {
"type": "string",
"const": "link"
},
"ref": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{1,40}$"
},
"fields": {
"type": "object",
"properties": {
"url": {
"type": "string",
"format": "uri"
},
"note": {
"type": "string",
"maxLength": 1000
},
"items": {
"description": "The ids (or $refs) of the places, goals or options it's about; none leaves it in the inbox.",
"maxItems": 50,
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"url"
],
"additionalProperties": false
}
},
"required": [
"op",
"type",
"fields"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"op": {
"type": "string",
"const": "create"
},
"type": {
"type": "string",
"const": "pad"
},
"ref": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{1,40}$"
},
"fields": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"for": {
"type": "string",
"minLength": 1,
"maxLength": 100,
"description": "The friend's name."
},
"prompt": {
"description": "What we'd like tips on.",
"type": "string",
"maxLength": 500
}
},
"required": [
"name",
"for"
],
"additionalProperties": false
}
},
"required": [
"op",
"type",
"fields"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"op": {
"type": "string",
"const": "create"
},
"type": {
"type": "string",
"const": "note"
},
"ref": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{1,40}$"
},
"fields": {
"type": "object",
"properties": {
"on": {
"type": "string",
"minLength": 1,
"description": "What it's on: an item (or $ref), research (rsr_…), the trip's id, or a member id (mem_…)."
},
"text": {
"type": "string",
"minLength": 1,
"maxLength": 4000
}
},
"required": [
"on",
"text"
],
"additionalProperties": false
}
},
"required": [
"op",
"type",
"fields"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"op": {
"type": "string",
"const": "create"
},
"type": {
"type": "string",
"const": "ask"
},
"ref": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{1,40}$"
},
"fields": {
"type": "object",
"properties": {
"to": {
"anyOf": [
{
"type": "string",
"const": "everyone"
},
{
"minItems": 1,
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
}
],
"description": "\"everyone\", or the people asked: member ids (mem_…) or person ids."
},
"about": {
"description": "The item it's about, if any (an id or $ref).",
"type": "string"
},
"text": {
"type": "string",
"minLength": 1,
"maxLength": 1000
},
"options": {
"minItems": 2,
"maxItems": 10,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
}
},
"required": [
"to",
"text"
],
"additionalProperties": false
}
},
"required": [
"op",
"type",
"fields"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"op": {
"type": "string",
"const": "create"
},
"type": {
"type": "string",
"const": "answer"
},
"fields": {
"type": "object",
"properties": {
"ask": {
"type": "string",
"minLength": 1
},
"choice": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"text": {
"type": "string",
"minLength": 1,
"maxLength": 2000
}
},
"required": [
"ask"
],
"additionalProperties": false
}
},
"required": [
"op",
"type",
"fields"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"op": {
"type": "string",
"const": "create"
},
"type": {
"type": "string",
"const": "reminder"
},
"ref": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{1,40}$"
},
"fields": {
"type": "object",
"properties": {
"at": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2})?$",
"description": "Local time at the place, e.g. 2026-11-18T09:00."
},
"tz": {
"type": "string"
},
"to": {
"anyOf": [
{
"type": "string",
"const": "everyone"
},
{
"minItems": 1,
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
}
],
"description": "\"everyone\", or the people to remind: member ids (mem_…) or person ids."
},
"about": {
"description": "The item it's about, if any (an id or $ref).",
"type": "string"
},
"text": {
"type": "string",
"minLength": 1,
"maxLength": 500
}
},
"required": [
"at",
"tz",
"to",
"text"
],
"additionalProperties": false
}
},
"required": [
"op",
"type",
"fields"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"op": {
"type": "string",
"const": "create"
},
"type": {
"type": "string",
"const": "document"
},
"ref": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{1,40}$"
},
"fields": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"minLength": 1,
"maxLength": 40,
"description": "passport, visa, insurance, licence, vaccination, or another kind."
},
"title": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"status": {
"description": "Seen by the trip: \"valid\", \"applied\", \"approved\"...",
"type": "string",
"minLength": 1,
"maxLength": 60
},
"expires": {
"description": "Seen by the trip.",
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
},
"details": {
"description": "Number, issuer, reference, anything else: only its owner and those it's shared with see these.",
"type": "object",
"propertyNames": {
"type": "string",
"minLength": 1,
"maxLength": 60
},
"additionalProperties": {
"anyOf": [
{
"type": "string",
"maxLength": 500
},
{
"type": "number"
},
{
"type": "boolean"
}
]
}
},
"shared_with": {
"description": "Who else sees the details: \"everyone\" in the trip, or member ids. Nobody when left out.",
"anyOf": [
{
"type": "string",
"const": "everyone"
},
{
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
}
]
}
},
"required": [
"kind",
"title"
],
"additionalProperties": false
}
},
"required": [
"op",
"type",
"fields"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"op": {
"type": "string",
"const": "create"
},
"type": {
"type": "string",
"const": "research"
},
"ref": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{1,40}$"
},
"fields": {
"type": "object",
"properties": {
"title": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "The question: \"JR Pass vs single tickets\"."
},
"text": {
"type": "string",
"minLength": 1,
"maxLength": 4000,
"description": "The answer as short labelled bullets (\"- **Single tickets:** ¥41,000\")."
},
"sources": {
"maxItems": 20,
"type": "array",
"items": {
"type": "string",
"format": "uri"
}
},
"about": {
"description": "The ids (or $refs) of the items it's about; none for the trip in general.",
"maxItems": 50,
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"title",
"text"
],
"additionalProperties": false
}
},
"required": [
"op",
"type",
"fields"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"op": {
"type": "string",
"const": "update"
},
"id": {
"type": "string"
},
"if_version": {
"description": "Fail unless the record is still at this version.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"set": {
"description": "Fields to set. Keys are field names or dotted paths one level deep, e.g. \"when.start\".",
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"unset": {
"description": "Fields to remove, same keys as set.",
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"op",
"id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"op": {
"type": "string",
"const": "delete"
},
"id": {
"type": "string"
}
},
"required": [
"op",
"id"
],
"additionalProperties": false
}
]
}
}
},
"required": [
"trip",
"reason",
"ops"
]
}