Заказы · Чувствительное действие
Заказы · Штатные · Создание
orders_native_create
Попробуйте три запроса
Подготовить
- Вы указываетеЗаказ
- ПомощникПодготовка
- Вы получаетеПредпросмотр
Запрос в чат
Подготовь «Заказы / Штатные / Создание». Для изменения нужны заказ, филиал. Покажи объект и ожидаемый эффект до выполнения.
- orderId
- Заказ
- locationId
- Филиал
- operations
- Параметр
Применить
- Вы указываетеСогласованные значения
- ПомощникОдин вызов
- Вы получаетеОтвет операции
Запрос в чат
На учебной записи подготовь «Заказы / Штатные / Создание» с параметром orderId = DEMO-101. Покажи остальные обязательные значения и выполни действие, когда согласованы все поля.
- orderId
- DEMO-101
- locationId
- DEMO-101
- cashShiftId
- DEMO-101
Проверить итог
- Вы указываетеИсходный ответ
- ПомощникСверка результата
- Вы получаетеПодтверждение
Запрос в чат
Проверь результат «Заказы / Штатные / Создание» по исходному ответу. Покажи статус, заказ. Объясни, чем подтвердить эффект для выбранного объекта.
- До измененияПрочитать версию
- При записиПередать выбранную версию
- После ответаПеречитать объект
Как работает действие
Этот вызов может изменить рабочие данные. Согласуйте точный объект, новые значения и ожидаемый результат. Присвойте операции стабильный requestId. При повторе той же операции используйте прежний ключ и те же значения.
Описание разработчика
Commit the exact native Orders preview: create one order with a stable chosen orderId. Supports configured table booking creation/rescheduling through patch.booking and patch.table_id; stock/table conflicts are rechecked atomically. Never treats a customer text request as authority to change protected prices. After review_required, obtain explicit review and prepare a new reviewed request. After uncertainty keep the original requestId and read the order.
Параметры запроса
- orderId
- Идентификатор выбранного заказа. обязательно по схеме · string
- expectedVersion
- Omit for new orders. необязательно
- stockConfirmation
- Native stockConfirmation value; use the value and type returned by the corresponding service. необязательно · string
- availabilityConfirmations
- Native availabilityConfirmations value; use the value and type returned by the corresponding service. необязательно · array · до элементов 200
- locationId
- Идентификатор точки из текущего подключения. обязательно по схеме · string
- cashShiftId
- Native cashShiftId value; use the value and type returned by the corresponding service. необязательно · string
- clientId
- Native clientId value; use the value and type returned by the corresponding service. необязательно · string / null
- promocode
- Native promocode value; use the value and type returned by the corresponding service. необязательно · string · до символов 160
- offerIds
- Native offerIds value; use the value and type returned by the corresponding service. необязательно · array · до элементов 100
- operations
- Native operations value; use the value and type returned by the corresponding service. обязательно по схеме · array · до элементов 200
- discountIds
- Native discountIds value; use the value and type returned by the corresponding service. необязательно · array · до элементов 50
- manualDiscount
- Native manualDiscount value; use the value and type returned by the corresponding service. необязательно · number · минимум 0 · максимум 1000000000
- taxRelief
- Native taxRelief value; use the value and type returned by the corresponding service. необязательно · array · до элементов 30
- gifts
- Native gifts value; use the value and type returned by the corresponding service. необязательно · array · до элементов 50
- fees
- Native fees value; use the value and type returned by the corresponding service. необязательно · array · до элементов 50
- patch
- Native patch value; use the value and type returned by the corresponding service. обязательно по схеме · object · по умолчанию {}
- requestId
- Ключ этой операции. Для повтора с теми же аргументами сохраните исходное значение. обязательно по схеме · string
- expectedQuoteHash
- Hash from orders_native_quote for these exact arguments. обязательно по схеме · string
Что вернёт команда
- status
- Native status value; use the value and type returned by the corresponding service. обязательно по схеме · string · варианты committed, review_required
- orderId
- Native orderId 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 / null
- details
- Native details value; use the value and type returned by the corresponding service. обязательно по схеме · object
- review
- Native review value; use the value and type returned by the corresponding service. обязательно по схеме · object / null
Поля и технические схемы

Вход · JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"orderId": {
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,160}$",
"description": "Native orderId value; use the value and type returned by the corresponding service."
},
"expectedVersion": {
"description": "Omit for new orders.",
"not": {}
},
"stockConfirmation": {
"description": "Native stockConfirmation value; use the value and type returned by the corresponding service.",
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"availabilityConfirmations": {
"description": "Native availabilityConfirmations value; use the value and type returned by the corresponding service.",
"maxItems": 200,
"type": "array",
"items": {
"type": "object",
"properties": {
"productId": {
"$ref": "#/$defs/_mcp0"
},
"confirmation": {
"type": "string",
"pattern": "^[a-f0-9]{64}$",
"description": "Native confirmation value; use the value and type returned by the corresponding service."
}
},
"required": [
"productId",
"confirmation"
],
"additionalProperties": false
}
},
"locationId": {
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,160}$",
"description": "Native locationId value; use the value and type returned by the corresponding service."
},
"cashShiftId": {
"description": "Native cashShiftId value; use the value and type returned by the corresponding service.",
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,160}$"
},
"clientId": {
"description": "Native clientId value; use the value and type returned by the corresponding service.",
"anyOf": [
{
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,160}$"
},
{
"type": "null"
}
]
},
"promocode": {
"description": "Native promocode value; use the value and type returned by the corresponding service.",
"type": "string",
"maxLength": 160
},
"offerIds": {
"description": "Native offerIds value; use the value and type returned by the corresponding service.",
"maxItems": 100,
"type": "array",
"items": {
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,160}$"
}
},
"operations": {
"maxItems": 200,
"type": "array",
"items": {
"type": "object",
"properties": {
"op": {
"type": "string",
"enum": [
"add",
"set_quantity",
"remove",
"add_modifier",
"remove_modifier",
"set_price"
],
"description": "Native op value; use the value and type returned by the corresponding service."
},
"product_id": {
"description": "Native product_id value; use the value and type returned by the corresponding service.",
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,160}$"
},
"line_id": {
"description": "Native line_id value; use the value and type returned by the corresponding service.",
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,160}$"
},
"quantity": {
"description": "Native quantity value; use the value and type returned by the corresponding service.",
"type": "number",
"exclusiveMinimum": 0,
"maximum": 10000000
},
"price": {
"description": "Native price value; use the value and type returned by the corresponding service.",
"anyOf": [
{
"type": "number",
"minimum": 0,
"maximum": 1000000000,
"multipleOf": 0.01
},
{
"type": "null"
}
]
},
"comment": {
"description": "Native comment value; use the value and type returned by the corresponding service.",
"type": "string",
"maxLength": 2000
},
"new_line": {
"description": "Native new_line value; use the value and type returned by the corresponding service.",
"type": "boolean"
},
"option_set_id": {
"description": "Native option_set_id value; use the value and type returned by the corresponding service.",
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,160}$"
},
"modifier_product_ids": {
"description": "Native modifier_product_ids value; use the value and type returned by the corresponding service.",
"maxItems": 30,
"type": "array",
"items": {
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,160}$"
}
},
"modifier_selections": {
"$ref": "#/$defs/_mcp5"
}
},
"required": [
"op"
],
"additionalProperties": false
},
"description": "Native operations value; use the value and type returned by the corresponding service."
},
"discountIds": {
"description": "Native discountIds value; use the value and type returned by the corresponding service.",
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,160}$"
}
},
"manualDiscount": {
"description": "Native manualDiscount value; use the value and type returned by the corresponding service.",
"type": "number",
"minimum": 0,
"maximum": 1000000000,
"multipleOf": 0.01
},
"taxRelief": {
"description": "Native taxRelief value; use the value and type returned by the corresponding service.",
"maxItems": 30,
"type": "array",
"items": {
"type": "object",
"properties": {
"fromTaxId": {
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,160}$",
"description": "Native fromTaxId value; use the value and type returned by the corresponding service."
},
"toTaxId": {
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,160}$",
"description": "Native toTaxId value; use the value and type returned by the corresponding service."
},
"lineIds": {
"minItems": 1,
"maxItems": 200,
"type": "array",
"items": {
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,160}$"
},
"description": "Native lineIds value; use the value and type returned by the corresponding service."
},
"reason": {
"type": "string",
"minLength": 1,
"maxLength": 1000,
"description": "Native reason value; use the value and type returned by the corresponding service."
},
"documentId": {
"description": "Native documentId value; use the value and type returned by the corresponding service.",
"type": "string",
"maxLength": 200
}
},
"required": [
"fromTaxId",
"toTaxId",
"lineIds",
"reason"
],
"additionalProperties": false
}
},
"gifts": {
"description": "Native gifts value; use the value and type returned by the corresponding service.",
"maxItems": 50,
"type": "array",
"items": {
"type": "object",
"properties": {
"promotionId": {
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,160}$",
"description": "Native promotionId value; use the value and type returned by the corresponding service."
},
"productId": {
"$ref": "#/$defs/_mcp0"
},
"quantity": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 10000,
"description": "Native quantity value; use the value and type returned by the corresponding service."
},
"modifier_selections": {
"$ref": "#/$defs/_mcp5"
}
},
"required": [
"promotionId",
"productId",
"quantity"
],
"additionalProperties": false
}
},
"fees": {
"description": "Native fees value; use the value and type returned by the corresponding service.",
"maxItems": 50,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,160}$",
"description": "Native id value; use the value and type returned by the corresponding service."
},
"price": {
"type": "number",
"minimum": 0,
"maximum": 1000000000,
"multipleOf": 0.01,
"description": "Native price value; use the value and type returned by the corresponding service."
},
"comment": {
"type": "string",
"minLength": 1,
"maxLength": 300,
"description": "Native comment value; use the value and type returned by the corresponding service."
},
"source": {
"default": "orders",
"description": "Native source value; use the value and type returned by the corresponding service.",
"type": "string",
"const": "orders"
}
},
"required": [
"id",
"price",
"comment",
"source"
],
"additionalProperties": false
}
},
"patch": {
"default": {},
"description": "Native patch value; use the value and type returned by the corresponding service.",
"type": "object",
"properties": {
"dining": {
"description": "Native dining value; use the value and type returned by the corresponding service.",
"type": "object",
"properties": {
"newSeat": {
"description": "Native newSeat value; use the value and type returned by the corresponding service.",
"anyOf": [
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"addedSeats": {
"description": "Native addedSeats value; use the value and type returned by the corresponding service.",
"maxItems": 200,
"type": "array",
"items": {
"type": "object",
"properties": {
"productId": {
"$ref": "#/$defs/_mcp0"
},
"seat": {
"anyOf": [
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
],
"description": "Native seat value; use the value and type returned by the corresponding service."
}
},
"required": [
"productId",
"seat"
],
"additionalProperties": false
}
},
"lines": {
"description": "Native lines value; use the value and type returned by the corresponding service.",
"maxItems": 200,
"type": "array",
"items": {
"type": "object",
"properties": {
"lineId": {
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,160}$",
"description": "Native lineId value; use the value and type returned by the corresponding service."
},
"seat": {
"description": "Native seat value; use the value and type returned by the corresponding service.",
"anyOf": [
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"served": {
"description": "Native served value; use the value and type returned by the corresponding service.",
"type": "boolean"
}
},
"required": [
"lineId"
],
"additionalProperties": false
}
}
},
"additionalProperties": false
},
"hall_id": {
"description": "Native hall_id value; use the value and type returned by the corresponding service.",
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,160}$"
},
"table_id": {
"description": "Native table_id value; use the value and type returned by the corresponding service.",
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,160}$"
},
"clear_table": {
"description": "Native clear_table value; use the value and type returned by the corresponding service.",
"type": "boolean"
},
"booking": {
"description": "Native booking value; use the value and type returned by the corresponding service.",
"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."
}
},
"required": [
"start",
"finish"
],
"additionalProperties": false
},
"type": {
"description": "Native type value; use the value and type returned by the corresponding service.",
"type": "string",
"enum": [
"atplace",
"pickup",
"delivery",
"catering"
]
},
"comment": {
"description": "Native comment value; use the value and type returned by the corresponding service.",
"type": "string",
"maxLength": 4000
},
"comment_for_production": {
"description": "Native comment_for_production value; use the value and type returned by the corresponding service.",
"type": "string",
"maxLength": 4000
},
"number_people": {
"description": "Native number_people value; use the value and type returned by the corresponding service.",
"type": "integer",
"minimum": 0,
"maximum": 10000
},
"number_kids": {
"description": "Native number_kids value; use the value and type returned by the corresponding service.",
"type": "integer",
"minimum": 0,
"maximum": 10000
},
"date_must_finish": {
"description": "Native date_must_finish value; use the value and type returned by the corresponding service.",
"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)))$"
},
"clear_date_must_finish": {
"description": "Native clear_date_must_finish value; use the value and type returned by the corresponding service.",
"type": "boolean"
},
"send_to_production": {
"description": "Native send_to_production value; use the value and type returned by the corresponding service.",
"type": "boolean"
},
"color": {
"description": "Native color value; use the value and type returned by the corresponding service.",
"type": "string",
"pattern": "^#[A-Fa-f0-9]{6,8}$"
}
},
"additionalProperties": false
},
"requestId": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{8,128}$",
"description": "Stable request ID for these exact arguments. Keep it if the response is uncertain."
},
"expectedQuoteHash": {
"type": "string",
"pattern": "^[a-f0-9]{64}$",
"description": "Hash from orders_native_quote for these exact arguments."
}
},
"required": [
"orderId",
"locationId",
"operations",
"patch",
"requestId",
"expectedQuoteHash"
],
"additionalProperties": false,
"$defs": {
"_mcp0": {
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,160}$",
"description": "Native productId value; use the value and type returned by the corresponding service."
},
"_mcp5": {
"description": "Native modifier_selections value; use the value and type returned by the corresponding service.",
"maxItems": 30,
"type": "array",
"items": {
"$ref": "#/$defs/_mcp4"
}
},
"_mcp4": {
"type": "object",
"properties": {
"option_set_id": {
"$ref": "#/$defs/_mcp1"
},
"modifier_product_ids": {
"$ref": "#/$defs/_mcp2"
},
"quantities": {
"$ref": "#/$defs/_mcp3"
}
},
"required": [
"option_set_id",
"modifier_product_ids"
],
"additionalProperties": false
},
"_mcp1": {
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,160}$",
"description": "Native option_set_id value; use the value and type returned by the corresponding service."
},
"_mcp2": {
"maxItems": 30,
"type": "array",
"items": {
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,160}$"
},
"description": "Native modifier_product_ids value; use the value and type returned by the corresponding service."
},
"_mcp3": {
"description": "Native quantities value; use the value and type returned by the corresponding service.",
"type": "object",
"propertyNames": {
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,160}$"
},
"additionalProperties": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 10000000
}
}
}
}Выход · JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"committed",
"review_required"
],
"description": "Native status value; use the value and type returned by the corresponding service."
},
"orderId": {
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,160}$",
"description": "Native orderId value; use the value and type returned by the corresponding service."
},
"version": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
],
"description": "Native version value; use the value and type returned by the corresponding service."
},
"details": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"$ref": "#/$defs/__schema0"
},
"description": "Native details value; use the value and type returned by the corresponding service."
},
"review": {
"anyOf": [
{
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"$ref": "#/$defs/__schema0"
}
},
{
"type": "null"
}
],
"description": "Native review value; use the value and type returned by the corresponding service."
}
},
"required": [
"status",
"orderId",
"version",
"details",
"review"
],
"additionalProperties": false,
"$defs": {
"__schema0": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
},
{
"type": "array",
"items": {
"$ref": "#/$defs/__schema0"
}
},
{
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"$ref": "#/$defs/__schema0"
}
}
]
}
}
}