Orders¶
Endpoints of the Orders section of the iikoCloud API documentation.
Orders¶
Orders API.
iiko.order.add_customer()
async
¶
add_customer(
*,
organization_id: str,
order_id: str,
customer: TableOrderCustomer | Mapping[str, Any],
timeout: float | None = None,
) -> CorrelationIdResponse
Add customer to order.
POST /api/1/order/add_customer
Allowed from version 7.7.1.
Restriction group: Orders: changing.
Note
This method is a command: it only starts the operation. Pass the response to
IikoCloud.wait() to wait for the result.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
organization_id
|
str
|
Organization ID. Can be obtained by |
required |
order_id
|
str
|
Order ID. |
required |
customer
|
TableOrderCustomer | Mapping[str, Any]
|
Guest info. |
required |
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
Returns:
| Type | Description |
|---|---|
CorrelationIdResponse
|
The |
iiko.order.add_items()
async
¶
add_items(
*,
order_id: str,
organization_id: str,
items: Sequence[OrderItem | Mapping[str, Any]],
add_order_items_settings: AddTableOrderItemsSettings
| Mapping[str, Any]
| None = None,
combos: Sequence[Combo | Mapping[str, Any]]
| None = None,
timeout: float | None = None,
) -> CorrelationIdResponse
Add order items.
POST /api/1/order/add_items
Allowed from version 7.4.6.
Restriction group: Orders: changing.
Note
This method is a command: it only starts the operation. Pass the response to
IikoCloud.wait() to wait for the result.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
order_id
|
str
|
Order ID. |
required |
organization_id
|
str
|
Organization ID. Can be obtained by |
required |
items
|
Sequence[OrderItem | Mapping[str, Any]]
|
Order items (may include ProductOrderItem or CompoundOrderItem). |
required |
add_order_items_settings
|
AddTableOrderItemsSettings | Mapping[str, Any] | None
|
Add order items parameters. |
None
|
combos
|
Sequence[Combo | Mapping[str, Any]] | None
|
Combos. Allowed from version |
None
|
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
Returns:
| Type | Description |
|---|---|
CorrelationIdResponse
|
The |
iiko.order.add_payments()
async
¶
add_payments(
*,
order_id: str,
organization_id: str,
payments: Sequence[Payment | Mapping[str, Any]],
tips: Sequence[TipsPayment | Mapping[str, Any]]
| None = None,
timeout: float | None = None,
) -> CorrelationIdResponse
Add order payments.
POST /api/1/order/add_payments
Allowed from version 8.2.6.
Restriction group: Order payments: changing.
Note
This method is a command: it only starts the operation. Pass the response to
IikoCloud.wait() to wait for the result.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
order_id
|
str
|
Order ID. |
required |
organization_id
|
str
|
Organization ID. Can be obtained by |
required |
payments
|
Sequence[Payment | Mapping[str, Any]]
|
Order payments. |
required |
tips
|
Sequence[TipsPayment | Mapping[str, Any]] | None
|
Order tips. |
None
|
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
Returns:
| Type | Description |
|---|---|
CorrelationIdResponse
|
The |
iiko.order.by_id()
async
¶
by_id(
*,
organization_ids: Sequence[str],
source_keys: Sequence[str] | None = None,
order_ids: Sequence[str] | None = None,
pos_order_ids: Sequence[str] | None = None,
return_external_data_keys: Sequence[str] | None = None,
timeout: float | None = None,
) -> TableOrdersResponse
Retrieve orders by IDs.
POST /api/1/order/by_id
Allowed from version 7.4.6.
Restriction group: Orders: receiving.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
organization_ids
|
Sequence[str]
|
Organization IDs. Can be obtained by |
required |
source_keys
|
Sequence[str] | None
|
Source keys. |
None
|
order_ids
|
Sequence[str] | None
|
Order IDs. Required if "posOrderIds" is null. Must be null if "posOrderIds" is not null. |
None
|
pos_order_ids
|
Sequence[str] | None
|
POS order IDs. Required if "orderIds" is null. Must be null if "orderIds" is not null. |
None
|
return_external_data_keys
|
Sequence[str] | None
|
Keys for retrun external data information. |
None
|
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
Returns:
| Type | Description |
|---|---|
TableOrdersResponse
|
The |
iiko.order.by_table()
async
¶
by_table(
*,
organization_ids: Sequence[str],
table_ids: Sequence[str],
source_keys: Sequence[str] | None = None,
statuses: Sequence[OrderStatus] | None = None,
date_from: datetime | str | None = None,
date_to: datetime | str | None = None,
timeout: float | None = None,
) -> TableOrdersResponse
Retrieve orders by tables.
POST /api/1/order/by_table
Allowed from version 7.4.6.
Restriction group: Orders: receiving.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
organization_ids
|
Sequence[str]
|
Organization ID. Can be obtained by |
required |
table_ids
|
Sequence[str]
|
Table IDs. Can be obtained by |
required |
source_keys
|
Sequence[str] | None
|
Source keys. |
None
|
statuses
|
Sequence[OrderStatus] | None
|
Order statuses. |
None
|
date_from
|
datetime | str | None
|
Order creation date (terminal time zone). Lower limit. Order details are stored for 90 days. |
None
|
date_to
|
datetime | str | None
|
Order creation date (terminal time zone). Upper limit. |
None
|
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
Returns:
| Type | Description |
|---|---|
TableOrdersResponse
|
The |
iiko.order.cancel()
async
¶
cancel(
*,
organization_id: str,
order_id: str,
removal_type_id: str | None = None,
removal_comment: str | None = None,
user_id_for_writeoff: str | None = None,
timeout: float | None = None,
) -> CorrelationIdResponse
Cancel the table order.
POST /api/1/order/cancel
Allowed from version 9.0.5.
Restriction group: Order status: changing.
Note
This method is a command: it only starts the operation. Pass the response to
IikoCloud.wait() to wait for the result.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
organization_id
|
str
|
Organization ID. Can be obtained by |
required |
order_id
|
str
|
Order ID. |
required |
removal_type_id
|
str | None
|
Removal type (used during deletion of printed order items). |
None
|
removal_comment
|
str | None
|
Comment to the charge-off. |
None
|
user_id_for_writeoff
|
str | None
|
User for writeoff (used during deletion of printed order items). |
None
|
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
Returns:
| Type | Description |
|---|---|
CorrelationIdResponse
|
The |
iiko.order.change_external_data()
async
¶
change_external_data(
*,
organization_id: str,
order_id: str,
external_data: Sequence[
ExternalData | Mapping[str, Any]
],
timeout: float | None = None,
) -> CorrelationIdResponse
Change table order external_data.
POST /api/1/order/change_external_data
Restriction group: Orders: changing.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
organization_id
|
str
|
Organization ID. |
required |
order_id
|
str
|
Order ID. |
required |
external_data
|
Sequence[ExternalData | Mapping[str, Any]]
|
External data to change. |
required |
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
Returns:
| Type | Description |
|---|---|
CorrelationIdResponse
|
The |
iiko.order.change_payments()
async
¶
change_payments(
*,
organization_id: str,
order_id: str,
payments: Sequence[Payment | Mapping[str, Any]],
tips: Sequence[TipsPayment | Mapping[str, Any]]
| None = None,
timeout: float | None = None,
) -> CorrelationIdResponse
Change table order's payments.
POST /api/1/order/change_payments
Method will fail if there are any processed payments in the order. If all payments in the order are unprocessed they will be removed and replaced with new ones.
Allowed from version 7.7.4.
Restriction group: Order payments: changing.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
organization_id
|
str
|
Organization ID. Can be obtained by |
required |
order_id
|
str
|
Order ID. |
required |
payments
|
Sequence[Payment | Mapping[str, Any]]
|
Order payments. |
required |
tips
|
Sequence[TipsPayment | Mapping[str, Any]] | None
|
Order tips. |
None
|
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
Returns:
| Type | Description |
|---|---|
CorrelationIdResponse
|
The |
iiko.order.close()
async
¶
close(
*,
organization_id: str,
order_id: str,
cheque_additional_info: ChequeAdditionalInfo
| Mapping[str, Any]
| None = None,
timeout: float | None = None,
) -> CorrelationIdResponse
Close order.
POST /api/1/order/close
Allowed from version 7.4.6.
Restriction group: Order status: changing.
Note
This method is a command: it only starts the operation. Pass the response to
IikoCloud.wait() to wait for the result.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
organization_id
|
str
|
Organization ID. Can be obtained by |
required |
order_id
|
str
|
Order ID. |
required |
cheque_additional_info
|
ChequeAdditionalInfo | Mapping[str, Any] | None
|
Cheque additional information according to russian federal law #54. |
None
|
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
Returns:
| Type | Description |
|---|---|
CorrelationIdResponse
|
The |
iiko.order.create()
async
¶
create(
*,
organization_id: str,
terminal_group_id: str,
order: TableOrder | Mapping[str, Any] | None = None,
create_order_settings: CreateTableOrderSettings
| Mapping[str, Any]
| None = None,
timeout: float | None = None,
) -> TableOrderResponse
Create order.
POST /api/1/order/create
Allowed from version 7.4.6.
Restriction group: Orders: creating.
Note
This method is a command: it only starts the operation. Pass the response to
IikoCloud.wait() to wait for the result.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
organization_id
|
str
|
Organization ID. Can be obtained by |
required |
terminal_group_id
|
str
|
Front group ID an order must be sent to. Can be obtained by |
required |
order
|
TableOrder | Mapping[str, Any] | None
|
Order. |
None
|
create_order_settings
|
CreateTableOrderSettings | Mapping[str, Any] | None
|
Order creation parameters. |
None
|
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
Returns:
| Type | Description |
|---|---|
TableOrderResponse
|
The |
iiko.order.init_by_pos_order()
async
¶
init_by_pos_order(
*,
organization_id: str,
terminal_group_id: str,
pos_order_ids: Sequence[str],
timeout: float | None = None,
) -> CorrelationIdResponse
Init orders, created on POS, by POS orders.
POST /api/1/order/init_by_posOrder
Allowed from version 7.7.1.
Restriction group: Orders: loading data.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
organization_id
|
str
|
Organization ID. Can be obtained by |
required |
terminal_group_id
|
str
|
Terminal group ID. Can be obtained by |
required |
pos_order_ids
|
Sequence[str]
|
POS order IDs. |
required |
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
Returns:
| Type | Description |
|---|---|
CorrelationIdResponse
|
The |
iiko.order.init_by_table()
async
¶
init_by_table(
*,
organization_id: str,
terminal_group_id: str,
table_ids: Sequence[str],
timeout: float | None = None,
) -> CorrelationIdResponse
Init orders, created on POS, by tables.
POST /api/1/order/init_by_table
Allowed from version 7.7.1.
Restriction group: Orders: loading data.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
organization_id
|
str
|
Organization ID. Can be obtained by |
required |
terminal_group_id
|
str
|
Terminal group ID. Can be obtained by |
required |
table_ids
|
Sequence[str]
|
Table IDs. Can be obtained by |
required |
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
Returns:
| Type | Description |
|---|---|
CorrelationIdResponse
|
The |