Заказы · Чтение
Текущие · Заказы · Поиск · Номера
active_orders_find_number
Попробуйте три запроса
Получить данные
- Вы указываетеФилиал
- ПомощникЧтение
- Вы получаетеПоля ответа
Запрос в чат
Для задачи «Текущие / Заказы / Поиск / Номера» выполни чтение по выбранной записи (филиал). Выведи кратко: number, статус.
- number
- Поле ответа
- status
- Статус
- reference
- Поле ответа
Задать параметры
- Вы указываетеФилиал
- ПомощникСверка выбора
- Вы получаетеТочный объект
Запрос в чат
Покажи, как получить «Текущие / Заказы / Поиск / Номера» на учебном примере с locationId = DEMO-101. Объясни, какие ещё данные нужны и как будет выглядеть ответ.
- locationId
- DEMO-101
- limit
- 3
Разобрать ответ
- Вы указываетеПолученный ответ
- ПомощникРазбор значений
- Вы получаетеКраткое пояснение
Запрос в чат
На основании уже полученного ответа «Текущие / Заказы / Поиск / Номера» объясни number, статус. Отметь отсутствующие значения.
- number
- Поле ответа
- status
- Статус
- reference
- Поле ответа
Как работает действие
Это чтение. Выберите запись или задайте фильтры в доступной компании.
Описание разработчика
Find a known numeric native order.Number with database equality and database-enforced current location filtering. Use this for requests such as order 1832 instead of a substring scan. One query reads at most limit+1 matches; no collection scan, per-order fetch, quote, mutation, or fallback is performed. Duplicate numbers across authorized locations remain ambiguous, including matches hidden by the response limit. Missing indexes or provider failures return UNAVAILABLE.
Параметры запроса
- number
- Exact stored numeric order.Number, such as 1832. This is a display number, not an order document ID; text and substring matching are not performed. обязательно по схеме · integer · минимум 0 · максимум 9007199254740991
- locationId
- Идентификатор точки из текущего подключения. необязательно · string · до символов 128
- limit
- Максимальное число элементов на этой странице. обязательно по схеме · integer · по умолчанию 5 · минимум 1 · максимум 10
Что вернёт команда
- number
- Exact native numeric order number searched. обязательно по схеме · integer · минимум 0 · максимум 9007199254740991
- status
- Uniqueness applies only to the currently authorized queried locations. Any second match, including lookahead beyond the limit, makes the result ambiguous. обязательно по схеме · string · варианты not_found, unique, ambiguous
- reference
- Selected canonical workspace-bound reference only when exactly one authorized match exists; otherwise null. обязательно по схеме · object / null
- items
- Записи, которые вернул этот запрос. обязательно по схеме · array · до элементов 10
- hasMore
- Есть ли ещё одна страница результата. обязательно по схеме · boolean
Поля и технические схемы

Вход · JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"number": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991,
"description": "Exact stored numeric order.Number, such as 1832. This is a display number, not an order document ID; text and substring matching are not performed."
},
"locationId": {
"description": "Optional exact authorized establishment ID. Required for location-limited connections with more than 30 allowed locations; never expands current access.",
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[A-Za-z0-9_~:@+.-]+$"
},
"limit": {
"default": 5,
"description": "Maximum compact matching orders to return, from 1 to 10. One additional matching document is read to detect truncation and ambiguity.",
"type": "integer",
"minimum": 1,
"maximum": 10
}
},
"required": [
"number",
"limit"
],
"additionalProperties": false
}Выход · JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"number": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991,
"description": "Exact native numeric order number searched."
},
"status": {
"type": "string",
"enum": [
"not_found",
"unique",
"ambiguous"
],
"description": "Uniqueness applies only to the currently authorized queried locations. Any second match, including lookahead beyond the limit, makes the result ambiguous."
},
"reference": {
"anyOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "active_order",
"description": "Resource kind for a current native Firestore order."
},
"companyId": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[A-Za-z0-9_~:@+.-]+$",
"description": "Workspace identity taken only from current verified context; preserve it when using this reference later."
},
"id": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[A-Za-z0-9_~:@+.-]+$",
"description": "Canonical native order document ID, never the display number."
}
},
"required": [
"kind",
"companyId",
"id"
],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "Selected canonical workspace-bound reference only when exactly one authorized match exists; otherwise null."
},
"items": {
"maxItems": 10,
"type": "array",
"items": {
"type": "object",
"properties": {
"orderId": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[A-Za-z0-9_~:@+.-]+$",
"description": "Canonical native order document ID; obtain current details with active_orders_get."
},
"number": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991,
"description": "Exact stored numeric display number matched by this query."
},
"locationId": {
"description": "Stored establishment ID, or null for an unassigned order visible only with all-location access.",
"type": [
"string",
"null"
]
},
"type": {
"type": "string",
"description": "Exact stored native order Type, without interpreting its lifecycle."
},
"createdAt": {
"anyOf": [
{
"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))$"
},
{
"type": "null"
}
],
"description": "Stored DateCreate as UTC, or null if absent or not an unambiguous absolute timestamp."
},
"canceled": {
"type": "boolean",
"description": "Whether the stored canceled field is explicitly true. Canceled orders remain discoverable."
}
},
"required": [
"orderId",
"number",
"locationId",
"type",
"createdAt",
"canceled"
],
"additionalProperties": false,
"description": "Projected native order identity and display fields."
},
"description": "Matching projected summaries in stable document-ID order. Monetary values, line items, payments and provider payloads are neither fetched nor returned."
},
"hasMore": {
"type": "boolean",
"description": "True when the lookahead proves more matches than the returned limit. Narrow by location or select an explicit canonical ID; never infer uniqueness from truncated results."
}
},
"required": [
"number",
"status",
"reference",
"items",
"hasMore"
],
"additionalProperties": false
}