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

CRM · Проживание · Результаты

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

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

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

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

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

Read permanent CRM stay conversion receipt and CURRENT native order/calendar state. Original receipt remains historic after cancellation or archive. reserved=null / archived_or_missing is not confirmed. No retry or new order is performed.

Параметры запроса
leadId
Native leadId value; use the value and type returned by the corresponding service. обязательно по схеме · 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_result
Вход · 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."
    }
  },
  "required": [
    "leadId"
  ],
  "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."
    }
  }
}