MCP Control
Бронирование · Чтение

CRM · Проживание · Предварительный расчёт

crm_stay_quote
Часы и календарь у стойки записи

Попробуйте три запроса

Получить данные
  1. Вы указываетеЛид
  2. ПомощникЧтение
  3. Вы получаетеПоля ответа
Запрос в чат
Для задачи «CRM / Проживание / Предварительный расчёт» выполни чтение по выбранной записи (лид). Выведи кратко: companyId, результат.
Что искать в ответе
companyId
Поле ответа
result
Результат
Задать параметры
  1. Вы указываетеЛид
  2. ПомощникСверка выбора
  3. Вы получаетеТочный объект
Запрос в чат
Покажи, как получить «CRM / Проживание / Предварительный расчёт» на учебном примере с leadId = DEMO-101. Объясни, какие ещё данные нужны и как будет выглядеть ответ.
Фрагмент учебных параметров
leadId
DEMO-101
pipelineId
DEMO-101
stageId
DEMO-101
Разобрать ответ
  1. Вы указываетеПолученный ответ
  2. ПомощникРазбор значений
  3. Вы получаетеКраткое пояснение
Запрос в чат
На основании уже полученного ответа «CRM / Проживание / Предварительный расчёт» объясни companyId, результат. Отметь отсутствующие значения.
Поля для проверки
companyId
Поле ответа
result
Результат
Как работает действие

Это чтение. Выберите запись или задайте фильтры в доступной компании.

Описание разработчика

Calculate the complete current CRM stay proposal with native Booking nightly rates, selected extras/modifiers, promotions and taxes. Validates guest first/last names, exact local/UTC dates, company, establishment and whole-period availability. No order or hold. agreementMatches=false requires agreement and proposal amendment before confirmation.

Параметры запроса
leadId
Native leadId value; use the value and type returned by the corresponding service. обязательно по схеме · string
pipelineId
Native pipelineId value; use the value and type returned by the corresponding service. обязательно по схеме · string
stageId
Native stageId value; use the value and type returned by the corresponding service. обязательно по схеме · string
locationId
Идентификатор точки из текущего подключения. обязательно по схеме · 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
Поля и технические схемы
Входные поля и поля ответа crm_stay_quote
Вход · 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."
    },
    "pipelineId": {
      "type": "string",
      "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$",
      "description": "Native pipelineId value; use the value and type returned by the corresponding service."
    },
    "stageId": {
      "type": "string",
      "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$",
      "description": "Native stageId value; use the value and type returned by the corresponding service."
    },
    "locationId": {
      "type": "string",
      "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$",
      "description": "Native locationId value; use the value and type returned by the corresponding service."
    }
  },
  "required": [
    "leadId",
    "pipelineId",
    "stageId",
    "locationId"
  ],
  "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": {
      "anyOf": [
        {
          "$ref": "#/$defs/_mcp23"
        },
        {
          "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": [
                {
                  "$ref": "#/$defs/_mcp23"
                },
                {
                  "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": {
    "_mcp23": {
      "type": "object",
      "properties": {
        "leadId": {
          "$ref": "#/$defs/_mcp0"
        },
        "orderId": {
          "$ref": "#/$defs/_mcp1"
        },
        "state": {
          "$ref": "#/$defs/_mcp2"
        },
        "calendarState": {
          "$ref": "#/$defs/_mcp3"
        },
        "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": {
          "$ref": "#/$defs/_mcp4"
        },
        "sourceHash": {
          "$ref": "#/$defs/_mcp5"
        },
        "agreementMatches": {
          "type": "boolean",
          "description": "Native agreementMatches value; use the value and type returned by the corresponding service."
        },
        "agreedTotal": {
          "$ref": "#/$defs/_mcp6"
        },
        "amount": {
          "$ref": "#/$defs/_mcp7"
        },
        "currency": {
          "$ref": "#/$defs/_mcp8"
        },
        "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": {
          "$ref": "#/$defs/_mcp22"
        },
        "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
    },
    "_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": "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."
    },
    "_mcp2": {
      "type": "string",
      "enum": [
        "quoted",
        "confirmed"
      ],
      "description": "Native state value; use the value and type returned by the corresponding service."
    },
    "_mcp3": {
      "type": "string",
      "enum": [
        "request",
        "reserved"
      ],
      "description": "Native calendarState value; use the value and type returned by the corresponding service."
    },
    "_mcp4": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$",
      "description": "Native quoteHash value; use the value and type returned by the corresponding service."
    },
    "_mcp5": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$",
      "description": "Native sourceHash value; use the value and type returned by the corresponding service."
    },
    "_mcp6": {
      "type": "number",
      "minimum": 0,
      "description": "Native agreedTotal value; use the value and type returned by the corresponding service."
    },
    "_mcp7": {
      "type": "number",
      "minimum": 0,
      "description": "Native amount value; use the value and type returned by the corresponding service."
    },
    "_mcp8": {
      "type": "string",
      "pattern": "^[A-Z]{3}$",
      "description": "Native currency value; use the value and type returned by the corresponding service."
    },
    "_mcp22": {
      "maxItems": 1000,
      "type": "array",
      "items": {
        "$ref": "#/$defs/_mcp21"
      },
      "description": "Native lines value; use the value and type returned by the corresponding service."
    },
    "_mcp21": {
      "type": "object",
      "properties": {
        "productId": {
          "$ref": "#/$defs/_mcp9"
        },
        "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/_mcp7"
        },
        "optionId": {
          "$ref": "#/$defs/_mcp10"
        },
        "appointment": {
          "$ref": "#/$defs/_mcp20"
        }
      },
      "required": [
        "productId",
        "quantity",
        "price",
        "amount",
        "optionId",
        "appointment"
      ],
      "additionalProperties": false
    },
    "_mcp9": {
      "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."
    },
    "_mcp10": {
      "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."
    },
    "_mcp20": {
      "anyOf": [
        {
          "$ref": "#/$defs/_mcp19"
        },
        {
          "type": "null"
        }
      ],
      "description": "Native appointment value; use the value and type returned by the corresponding service."
    },
    "_mcp19": {
      "type": "object",
      "properties": {
        "start": {
          "$ref": "#/$defs/_mcp11"
        },
        "finish": {
          "$ref": "#/$defs/_mcp12"
        },
        "startDate": {
          "$ref": "#/$defs/_mcp13"
        },
        "endDate": {
          "$ref": "#/$defs/_mcp14"
        },
        "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": {
          "$ref": "#/$defs/_mcp15"
        },
        "nightly": {
          "$ref": "#/$defs/_mcp18"
        }
      },
      "required": [
        "start",
        "finish",
        "startDate",
        "endDate",
        "startTime",
        "endTime",
        "timeZone",
        "nights",
        "nightly"
      ],
      "additionalProperties": false
    },
    "_mcp11": {
      "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."
    },
    "_mcp12": {
      "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."
    },
    "_mcp13": {
      "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."
    },
    "_mcp14": {
      "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."
    },
    "_mcp15": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991,
      "description": "Native nights value; use the value and type returned by the corresponding service."
    },
    "_mcp18": {
      "maxItems": 366,
      "type": "array",
      "items": {
        "$ref": "#/$defs/_mcp17"
      },
      "description": "Native nightly value; use the value and type returned by the corresponding service."
    },
    "_mcp17": {
      "type": "object",
      "properties": {
        "date": {
          "$ref": "#/$defs/_mcp16"
        },
        "price": {
          "type": "number",
          "minimum": 0,
          "description": "Native price value; use the value and type returned by the corresponding service."
        }
      },
      "required": [
        "date",
        "price"
      ],
      "additionalProperties": false
    },
    "_mcp16": {
      "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."
    }
  }
}