Расписание · Изменение
Расписание · Цены · Изменение
schedule_prices_patch
Попробуйте три запроса
Подготовить
- Вы указываетеРасписание
- ПомощникПодготовка
- Вы получаетеПредпросмотр
Запрос в чат
Подготовь «Расписание / Цены / Изменение». Для изменения нужны расписание, updates. Покажи объект и ожидаемый эффект до выполнения.
- scheduleId
- Расписание
- updates
- Параметр
- appends
- Параметр
Применить
- Вы указываетеСогласованные значения
- ПомощникОдин вызов
- Вы получаетеОтвет операции
Запрос в чат
На учебной записи подготовь «Расписание / Цены / Изменение» с параметром scheduleId = DEMO-101. Покажи остальные обязательные значения и выполни действие, когда согласованы все поля.
- scheduleId
- DEMO-101
Проверить итог
- Вы указываетеИсходный ответ
- ПомощникСверка результата
- Вы получаетеПодтверждение
Запрос в чат
Проверь результат «Расписание / Цены / Изменение» по исходному ответу. Покажи расписание, версия записи. Объясни, чем подтвердить эффект для выбранного объекта.
- До измененияПрочитать версию
- При записиПередать выбранную версию
- После ответаПеречитать объект
Как работает действие
Этот вызов может изменить рабочие данные. Согласуйте точный объект, новые значения и ожидаемый результат. Присвойте операции стабильный requestId. При повторе той же операции используйте прежний ключ и те же значения. Прочитайте актуальную версию записи перед подготовкой запроса.
Описание разработчика
Atomically update selected Schedule price indexes or append intervals without replacing or truncating the other prices. Use schedule_prices_list to obtain indexes and expectedRevision. At most 20 changes per call; an exact requestId retry returns the original result. This does not create a booking or charge a guest.
Параметры запроса
- scheduleId
- Exact native Schedule document ID from schedules_search. обязательно по схеме · string · до символов 128
- expectedRevision
- Версия, прочитанная перед изменением. обязательно по схеме · string
- updates
- Change selected existing entries by their stable indexes at expectedRevision. обязательно по схеме · array · по умолчанию [] · до элементов 20
- appends
- Add new native intervals after the existing list; no existing entry is removed. обязательно по схеме · array · по умолчанию [] · до элементов 20
- requestId
- Ключ этой операции. Для повтора с теми же аргументами сохраните исходное значение. обязательно по схеме · string · до символов 128
Что вернёт команда
- scheduleId
- Native Schedule ID that was changed. обязательно по схеме · string · до символов 128
- revision
- Committed Schedule revision. Use it for the next price page or patch. обязательно по схеме · string
- priceCount
- Total native price entries after this patch. обязательно по схеме · integer · минимум 0 · максимум 9007199254740991
- updatedIndices
- Existing indexes changed in place. обязательно по схеме · array
- appendedIndices
- New indexes appended after all prior entries. обязательно по схеме · array
Поля и технические схемы

Вход · JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"scheduleId": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[A-Za-z0-9_~:@+.-]+$",
"description": "Exact native Schedule document ID from schedules_search."
},
"expectedRevision": {
"type": "string",
"pattern": "^\\d{1,12}:\\d{1,9}$",
"description": "Exact revision returned by schedule_prices_list; protects every untouched price."
},
"updates": {
"default": [],
"description": "Change selected existing entries by their stable indexes at expectedRevision.",
"maxItems": 20,
"type": "array",
"items": {
"type": "object",
"properties": {
"index": {
"type": "integer",
"minimum": 0,
"maximum": 100000,
"description": "Exact zero-based index returned by schedule_prices_list at expectedRevision."
},
"values": {
"type": "object",
"properties": {
"price": {
"description": "Replacement native numeric price; omission preserves the current price.",
"type": "number",
"minimum": 0
},
"start": {
"description": "Replacement interval start with timezone; omission preserves the current start.",
"type": "string",
"format": "date-time",
"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])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"finish": {
"description": "Replacement interval finish with timezone; omission preserves the current finish.",
"type": "string",
"format": "date-time",
"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])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"comment": {
"description": "Replacement native comment; omission preserves it.",
"type": "string",
"maxLength": 12000
},
"source": {
"description": "Replacement native source; omission preserves it.",
"type": "string",
"maxLength": 2000
}
},
"additionalProperties": false,
"description": "Only fields supplied for this one price entry change."
}
},
"required": [
"index",
"values"
],
"additionalProperties": false
}
},
"appends": {
"default": [],
"description": "Add new native intervals after the existing list; no existing entry is removed.",
"maxItems": 20,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"description": "Optional native Price ID; leave absent when the schedule does not use one.",
"type": "string",
"maxLength": 2000
},
"price": {
"type": "number",
"minimum": 0,
"description": "Native numeric price for this new interval."
},
"start": {
"type": "string",
"format": "date-time",
"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])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
"description": "New interval start with timezone."
},
"finish": {
"type": "string",
"format": "date-time",
"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])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
"description": "New interval finish with timezone."
},
"comment": {
"description": "Optional native comment.",
"type": "string",
"maxLength": 12000
},
"source": {
"description": "Optional native source.",
"type": "string",
"maxLength": 2000
}
},
"required": [
"price",
"start",
"finish"
],
"additionalProperties": false
}
},
"requestId": {
"type": "string",
"minLength": 8,
"maxLength": 128,
"pattern": "^[A-Za-z0-9_-]+$",
"description": "Stable ID for this exact patch. Reuse it after an uncertain response."
}
},
"required": [
"scheduleId",
"expectedRevision",
"updates",
"appends",
"requestId"
],
"additionalProperties": false
}Выход · JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"scheduleId": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[A-Za-z0-9_~:@+.-]+$",
"description": "Native Schedule ID that was changed."
},
"revision": {
"type": "string",
"pattern": "^\\d{1,12}:\\d{1,9}$",
"description": "Committed Schedule revision. Use it for the next price page or patch."
},
"priceCount": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991,
"description": "Total native price entries after this patch."
},
"updatedIndices": {
"type": "array",
"items": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"description": "Existing indexes changed in place."
},
"appendedIndices": {
"type": "array",
"items": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"description": "New indexes appended after all prior entries."
}
},
"required": [
"scheduleId",
"revision",
"priceCount",
"updatedIndices",
"appendedIndices"
],
"additionalProperties": false
}