Бронирование · Чувствительное действие
CRM · Проживание · Отмена
crm_stay_cancel
Попробуйте три запроса
Подготовить
- Вы указываетеЛид
- ПомощникПодготовка
- Вы получаетеПредпросмотр
Запрос в чат
Подготовь «CRM / Проживание / Отмена». Для изменения нужны лид, версия. Покажи объект и ожидаемый эффект до выполнения.
- leadId
- Лид
- version
- Версия
Применить
- Вы указываетеСогласованные значения
- ПомощникОдин вызов
- Вы получаетеОтвет операции
Запрос в чат
На учебной записи подготовь «CRM / Проживание / Отмена» с параметром leadId = DEMO-101. Покажи остальные обязательные значения и выполни действие, когда согласованы все поля.
- leadId
- DEMO-101
- version
- 4
Проверить итог
- Вы указываетеИсходный ответ
- ПомощникСверка результата
- Вы получаетеПодтверждение
Запрос в чат
Проверь результат «CRM / Проживание / Отмена» по исходному ответу. Покажи companyId, результат. Объясни, чем подтвердить эффект для выбранного объекта.
- До измененияПрочитать версию
- При записиПередать выбранную версию
- После ответаПеречитать объект
Как работает действие
Этот вызов может изменить рабочие данные. Согласуйте точный объект, новые значения и ожидаемый результат. Присвойте операции стабильный requestId. При повторе той же операции используйте прежний ключ и те же значения. Прочитайте актуальную версию записи перед подготовкой запроса.
Описание разработчика
Cancel the unpaid native stay conversion at its current order version and release calendar occupancy, preserving order history and the permanent lead receipt. Does not refund or send a guest message. Future re-entry does not recreate this canceled conversion.
Параметры запроса
- leadId
- Native leadId value; use the value and type returned by the corresponding service. обязательно по схеме · string
- version
- Native version value; use the value and type returned by the corresponding service. обязательно по схеме · integer · максимум 9007199254740991
- requestId
- Ключ этой операции. Для повтора с теми же аргументами сохраните исходное значение. обязательно по схеме · string
Что вернёт команда
- companyId
- Native companyId value; use the value and type returned by the corresponding service. обязательно по схеме · string
- result
- Native result value; use the value and type returned by the corresponding service. обязательно по схеме · object
Поля и технические схемы

Вход · JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"leadId": {
"type": "string",
"pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$",
"description": "Native leadId value; use the value and type returned by the corresponding service."
},
"version": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "Native version value; use the value and type returned by the corresponding service."
},
"requestId": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{8,128}$",
"description": "Native requestId value; use the value and type returned by the corresponding service."
}
},
"required": [
"leadId",
"version",
"requestId"
],
"additionalProperties": false
}Выход · JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"companyId": {
"type": "string",
"description": "Native companyId value; use the value and type returned by the corresponding service."
},
"result": {
"type": "object",
"properties": {
"leadId": {
"$ref": "#/$defs/_mcp0"
},
"state": {
"type": "string",
"enum": [
"request",
"confirmed",
"cancelled",
"completed",
"archived_or_missing",
"unverified"
],
"description": "Native state value; use the value and type returned by the corresponding service."
},
"orderId": {
"anyOf": [
{
"type": "string",
"pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"
},
{
"type": "null"
}
],
"description": "Native orderId value; use the value and type returned by the corresponding service."
},
"calendarState": {
"type": "string",
"enum": [
"request",
"reserved",
"released",
"unknown"
],
"description": "Native calendarState value; use the value and type returned by the corresponding service."
},
"confirmed": {
"type": "boolean",
"description": "Native confirmed value; use the value and type returned by the corresponding service."
},
"reserved": {
"description": "Native reserved value; use the value and type returned by the corresponding service.",
"type": [
"boolean",
"null"
]
},
"receipt": {
"anyOf": [
{
"type": "object",
"properties": {
"leadId": {
"$ref": "#/$defs/_mcp0"
},
"orderId": {
"type": "string",
"pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$",
"description": "Native orderId value; use the value and type returned by the corresponding service."
},
"state": {
"type": "string",
"enum": [
"quoted",
"confirmed"
],
"description": "Native state value; use the value and type returned by the corresponding service."
},
"calendarState": {
"type": "string",
"enum": [
"request",
"reserved"
],
"description": "Native calendarState value; use the value and type returned by the corresponding service."
},
"confirmed": {
"type": "boolean",
"description": "Native confirmed value; use the value and type returned by the corresponding service."
},
"reserved": {
"type": "boolean",
"description": "Native reserved value; use the value and type returned by the corresponding service."
},
"quoteHash": {
"type": "string",
"pattern": "^[a-f0-9]{64}$",
"description": "Native quoteHash value; use the value and type returned by the corresponding service."
},
"sourceHash": {
"type": "string",
"pattern": "^[a-f0-9]{64}$",
"description": "Native sourceHash value; use the value and type returned by the corresponding service."
},
"agreementMatches": {
"type": "boolean",
"description": "Native agreementMatches value; use the value and type returned by the corresponding service."
},
"agreedTotal": {
"type": "number",
"minimum": 0,
"description": "Native agreedTotal value; use the value and type returned by the corresponding service."
},
"amount": {
"$ref": "#/$defs/_mcp1"
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "Native currency value; use the value and type returned by the corresponding service."
},
"tax": {
"type": "number",
"description": "Native tax value; use the value and type returned by the corresponding service."
},
"discount": {
"type": "number",
"description": "Native discount value; use the value and type returned by the corresponding service."
},
"lines": {
"maxItems": 1000,
"type": "array",
"items": {
"type": "object",
"properties": {
"productId": {
"type": "string",
"pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$",
"description": "Native productId value; use the value and type returned by the corresponding service."
},
"quantity": {
"type": "number",
"description": "Native quantity value; use the value and type returned by the corresponding service."
},
"price": {
"type": "number",
"minimum": 0,
"description": "Native price value; use the value and type returned by the corresponding service."
},
"amount": {
"$ref": "#/$defs/_mcp1"
},
"optionId": {
"anyOf": [
{
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$"
},
{
"type": "null"
}
],
"description": "Native optionId value; use the value and type returned by the corresponding service."
},
"appointment": {
"anyOf": [
{
"type": "object",
"properties": {
"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": "Native start value; use the value and type returned by the corresponding service."
},
"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": "Native finish value; use the value and type returned by the corresponding service."
},
"startDate": {
"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": "Native startDate value; use the value and type returned by the corresponding service."
},
"endDate": {
"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": "Native endDate value; use the value and type returned by the corresponding service."
},
"startTime": {
"type": "string",
"description": "Native startTime value; use the value and type returned by the corresponding service."
},
"endTime": {
"type": "string",
"description": "Native endTime value; use the value and type returned by the corresponding service."
},
"timeZone": {
"type": "string",
"description": "Native timeZone value; use the value and type returned by the corresponding service."
},
"nights": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "Native nights value; use the value and type returned by the corresponding service."
},
"nightly": {
"maxItems": 366,
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"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": "Native date value; use the value and type returned by the corresponding service."
},
"price": {
"type": "number",
"minimum": 0,
"description": "Native price value; use the value and type returned by the corresponding service."
}
},
"required": [
"date",
"price"
],
"additionalProperties": false
},
"description": "Native nightly value; use the value and type returned by the corresponding service."
}
},
"required": [
"start",
"finish",
"startDate",
"endDate",
"startTime",
"endTime",
"timeZone",
"nights",
"nightly"
],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "Native appointment value; use the value and type returned by the corresponding service."
}
},
"required": [
"productId",
"quantity",
"price",
"amount",
"optionId",
"appointment"
],
"additionalProperties": false
},
"description": "Native lines value; use the value and type returned by the corresponding service."
},
"replayed": {
"description": "Native replayed value; use the value and type returned by the corresponding service.",
"type": "boolean"
}
},
"required": [
"leadId",
"orderId",
"state",
"calendarState",
"confirmed",
"reserved",
"quoteHash",
"sourceHash",
"agreementMatches",
"agreedTotal",
"amount",
"currency",
"tax",
"discount",
"lines"
],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "Native receipt value; use the value and type returned by the corresponding service."
},
"version": {
"description": "Native version value; use the value and type returned by the corresponding service.",
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"leadId",
"state",
"orderId",
"calendarState",
"confirmed",
"reserved",
"receipt"
],
"additionalProperties": false,
"description": "Native result value; use the value and type returned by the corresponding service."
}
},
"required": [
"companyId",
"result"
],
"additionalProperties": false,
"$defs": {
"_mcp0": {
"type": "string",
"pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$",
"description": "Native leadId value; use the value and type returned by the corresponding service."
},
"_mcp1": {
"type": "number",
"minimum": 0,
"description": "Native amount value; use the value and type returned by the corresponding service."
}
}
}