Delivery¶
Endpoints of the Delivery section of the iikoCloud API documentation.
Deliveries: Create and update¶
Create and update deliveries API.
iiko.deliveries.add_items()
async
¶
add_items(
*,
order_id: str,
organization_id: str,
items: Sequence[OrderItem | Mapping[str, Any]],
combos: Sequence[Combo | Mapping[str, Any]]
| None = None,
timeout: float | None = None,
) -> CorrelationIdResponse
Add order items.
POST /api/1/deliveries/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 |
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.deliveries.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/deliveries/add_payments
Allowed from version 8.4.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.deliveries.cancel()
async
¶
cancel(
*,
organization_id: str,
order_id: str,
moved_order_id: str | None = None,
cancel_cause_id: str | None = None,
cancel_comment: str | None = None,
removal_type_id: str | None = None,
removal_comment: str | None = None,
user_id_for_writeoff: str | None = None,
timeout: float | None = None,
) -> CorrelationIdResponse
Cancel delivery order.
POST /api/1/deliveries/cancel
Allowed from version 7.5.4.
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 |
moved_order_id
|
str | None
|
Fill this field with id of the new order if current order has been moved to the new RMS/terminal group. |
None
|
cancel_cause_id
|
str | None
|
Cancel order dictionary item id. Allowed from version |
None
|
cancel_comment
|
str | None
|
Comment to the delivery cancellation. Allowed from version |
None
|
removal_type_id
|
str | None
|
Removal type (for delete printed order items). Allowed from version |
None
|
removal_comment
|
str | None
|
Comment to the charge-off. Allowed from version |
None
|
user_id_for_writeoff
|
str | None
|
User for writeoff (for delete printed order items). Allowed from version |
None
|
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
Returns:
| Type | Description |
|---|---|
CorrelationIdResponse
|
The |
iiko.deliveries.cancel_confirmation()
async
¶
cancel_confirmation(
*,
organization_id: str,
order_id: str,
timeout: float | None = None,
) -> CorrelationIdResponse
Cancel delivery confirmation.
POST /api/1/deliveries/cancel_confirmation
Allowed from version 7.6.1.
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 |
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
Returns:
| Type | Description |
|---|---|
CorrelationIdResponse
|
The |
iiko.deliveries.change_comment()
async
¶
change_comment(
*,
organization_id: str,
order_id: str,
comment: str,
timeout: float | None = None,
) -> CorrelationIdResponse
Change delivery comment.
POST /api/1/deliveries/change_comment
Allowed from version 7.6.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. |
required |
order_id
|
str
|
Order ID. |
required |
comment
|
str
|
New delivery comment. |
required |
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
Returns:
| Type | Description |
|---|---|
CorrelationIdResponse
|
The |
iiko.deliveries.change_complete_before()
async
¶
change_complete_before(
*,
organization_id: str,
order_id: str,
new_complete_before: datetime | str,
timeout: float | None = None,
) -> CorrelationIdResponse
Change time when client wants the order to be delivered.
POST /api/1/deliveries/change_complete_before
Allowed from version 7.5.4.
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 |
new_complete_before
|
datetime | str
|
New time when client wants the order to be delivered (Local for delivery terminal). |
required |
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
Returns:
| Type | Description |
|---|---|
CorrelationIdResponse
|
The |
iiko.deliveries.change_delivery_point()
async
¶
change_delivery_point(
*,
organization_id: str,
order_id: str,
new_delivery_point: DeliveryPoint | Mapping[str, Any],
timeout: float | None = None,
) -> CorrelationIdResponse
Change order's delivery point information.
POST /api/1/deliveries/change_delivery_point
Allowed from version 7.5.4.
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 |
new_delivery_point
|
DeliveryPoint | Mapping[str, Any]
|
New address of delivery. |
required |
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
Returns:
| Type | Description |
|---|---|
CorrelationIdResponse
|
The |
iiko.deliveries.change_driver_info()
async
¶
change_driver_info(
*,
organization_id: str,
order_id: str,
driver_id: str | None = None,
estimated_time: datetime | str | None = None,
timeout: float | None = None,
) -> CorrelationIdResponse
Change driver info.
POST /api/1/deliveries/change_driver_info
Allowed from version 8.6.6.
Restriction group: Order driver: 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 |
driver_id
|
str | None
|
Driver ID. Can be obtained by |
None
|
estimated_time
|
datetime | str | None
|
Delivery estimated time. |
None
|
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
Returns:
| Type | Description |
|---|---|
CorrelationIdResponse
|
The |
iiko.deliveries.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 delivery external data.
POST /api/1/deliveries/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.deliveries.change_operator()
async
¶
change_operator(
*,
organization_id: str,
order_id: str,
operator_id: str,
timeout: float | None = None,
) -> CorrelationIdResponse
Assign/change the order operator.
POST /api/1/deliveries/change_operator
Allowed from version 7.6.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 |
operator_id
|
str
|
Operator to assign the order to. |
required |
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
Returns:
| Type | Description |
|---|---|
CorrelationIdResponse
|
The |
iiko.deliveries.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 order's payments.
POST /api/1/deliveries/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.6.3.
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 |
|---|---|---|---|
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.deliveries.change_service_type()
async
¶
change_service_type(
*,
body: ChangeServiceTypeRequest | Mapping[str, Any],
timeout: float | None = None,
) -> CorrelationIdResponse
Change order's delivery type.
POST /api/1/deliveries/change_service_type
Allowed from version 7.5.4.
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 |
|---|---|---|---|
body
|
ChangeServiceTypeRequest | Mapping[str, Any]
|
Request body. |
required |
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
Returns:
| Type | Description |
|---|---|
CorrelationIdResponse
|
The |
iiko.deliveries.close()
async
¶
close(
*,
organization_id: str,
order_id: str,
delivery_date: datetime | str | None = None,
timeout: float | None = None,
) -> CorrelationIdResponse
Close order.
POST /api/1/deliveries/close
Before version 8.0.6 it's possible to close deliveries with DeliveryByClient
orderServiceType only, starting from version 8.0.6 it's also possible to close
DeliveryByCourier deiveries in the DeliveryStatus OnWay or Delivered .
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 |
delivery_date
|
datetime | str | None
|
Actual delivery time. If empty local iikoFront time will used. Allowed from version |
None
|
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
Returns:
| Type | Description |
|---|---|
CorrelationIdResponse
|
The |
iiko.deliveries.confirm()
async
¶
confirm(
*,
organization_id: str,
order_id: str,
timeout: float | None = None,
) -> CorrelationIdResponse
Confirm delivery.
POST /api/1/deliveries/confirm
Allowed from version 7.6.1.
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 |
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
Returns:
| Type | Description |
|---|---|
CorrelationIdResponse
|
The |
iiko.deliveries.create()
async
¶
create(
*,
organization_id: str,
order: DeliveryOrder | Mapping[str, Any],
terminal_group_id: str | None = None,
create_order_settings: CreateOrderSettings
| Mapping[str, Any]
| None = None,
timeout: float | None = None,
) -> OrderResponse
Create delivery.
POST /api/1/deliveries/create
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 of the new order. Can be obtained by |
required |
order
|
DeliveryOrder | Mapping[str, Any]
|
Order. |
required |
terminal_group_id
|
str | None
|
Front group ID the order must be sent to. Can be obtained by |
None
|
create_order_settings
|
CreateOrderSettings | Mapping[str, Any] | None
|
Order creation parameters. |
None
|
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
Returns:
| Type | Description |
|---|---|
OrderResponse
|
The |
iiko.deliveries.print_delivery_bill()
async
¶
print_delivery_bill(
*,
organization_id: str,
order_id: str,
timeout: float | None = None,
) -> CorrelationIdResponse
Print delivery bill.
POST /api/1/deliveries/print_delivery_bill
Allowed from version 7.6.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. |
required |
order_id
|
str
|
Order ID. |
required |
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
Returns:
| Type | Description |
|---|---|
CorrelationIdResponse
|
The |
iiko.deliveries.update_order_courier()
async
¶
update_order_courier(
*,
organization_id: str,
order_id: str,
employee_id: str,
timeout: float | None = None,
) -> CorrelationIdResponse
Update order courier.
POST /api/1/deliveries/update_order_courier
Allowed from version 7.1.5.
Restriction group: Order driver: changing.
Warning
iikoCloud marks this endpoint as deprecated.
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 |
employee_id
|
str
|
Courier ID. Can be obtained by |
required |
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
Returns:
| Type | Description |
|---|---|
CorrelationIdResponse
|
The |
iiko.deliveries.update_order_delivery_status()
async
¶
update_order_delivery_status(
*,
organization_id: str,
order_id: str,
delivery_status: DeliveryStatusForUpdate,
delivery_date: datetime | str | None = None,
timeout: float | None = None,
) -> CorrelationIdResponse
Update delivery status.
POST /api/1/deliveries/update_order_delivery_status
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 |
delivery_status
|
DeliveryStatusForUpdate
|
Delivery status. Can be only switched between these three statuses. |
required |
delivery_date
|
datetime | str | None
|
The date and time when the order was received by the guest (Local for delivery terminal). |
None
|
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
Returns:
| Type | Description |
|---|---|
CorrelationIdResponse
|
The |
iiko.deliveries.update_order_payments()
async
¶
update_order_payments(
*,
organization_id: str,
order_id: str,
payment_items: Sequence[
OrderPaymentItem | Mapping[str, Any]
]
| None = None,
timeout: float | None = None,
) -> CorrelationIdResponse
Update order payment details.
POST /api/1/deliveries/update_order_payments
Deprecated, use api/1/deliveries/change_payments method instead.
Restriction group: Deprecated.
Warning
iikoCloud marks this endpoint as deprecated.
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 |
payment_items
|
Sequence[OrderPaymentItem | Mapping[str, Any]] | None
|
Payment details. |
None
|
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
Returns:
| Type | Description |
|---|---|
CorrelationIdResponse
|
The |
iiko.deliveries.update_order_problem()
async
¶
update_order_problem(
*,
organization_id: str,
order_id: str,
has_problem: bool,
problem: str | None = None,
timeout: float | None = None,
) -> CorrelationIdResponse
Update order problem.
POST /api/1/deliveries/update_order_problem
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 |
has_problem
|
bool
|
Problem flag. |
required |
problem
|
str | None
|
Problem text. |
None
|
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
Returns:
| Type | Description |
|---|---|
CorrelationIdResponse
|
The |
iiko.deliveries.update_tracking_link()
async
¶
update_tracking_link(
*,
organization_id: str,
order_id: str,
tracking_link: str | None = None,
timeout: float | None = None,
) -> None
Update tracking link of an order.
POST /api/1/deliveries/update_tracking_link
Restriction group: Order driver: changing.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
organization_id
|
str
|
OrganizationId. |
required |
order_id
|
str
|
Delivery order id. |
required |
tracking_link
|
str | None
|
Tracking link of a delivery order. |
None
|
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
iiko.order.print_bill()
async
¶
print_bill(
*,
organization_id: str,
order_id: str,
timeout: float | None = None,
) -> CorrelationIdResponse
Print bill.
POST /api/1/order/print_bill
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. |
required |
order_id
|
str
|
Order ID. |
required |
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
Returns:
| Type | Description |
|---|---|
CorrelationIdResponse
|
The |
Deliveries: Retrieve¶
Get deliveries API.
iiko.deliveries.by_delivery_date_and_phone()
async
¶
by_delivery_date_and_phone(
*,
organization_ids: Sequence[str],
phone: str | None = None,
delivery_date_from: datetime | str | None = None,
delivery_date_to: datetime | str | None = None,
start_revision: int | None = None,
source_keys: Sequence[str] | None = None,
rows_count: int | None = None,
timeout: float | None = None,
) -> OrdersWithRevisionResponse
Retrieve list of orders by telephone number, dates and revision.
POST /api/1/deliveries/by_delivery_date_and_phone
Restriction group: Orders: receiving.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
organization_ids
|
Sequence[str]
|
Organization ID for which an order search will be performed. Can be obtained by |
required |
phone
|
str | None
|
Delivery order phone number. |
None
|
delivery_date_from
|
datetime | str | None
|
Order delivery date (Local for delivery terminal). Lower limit. The guaranteed order availability period is the last 7 days. To access earlier orders, use the |
None
|
delivery_date_to
|
datetime | str | None
|
Order delivery date (Local for delivery terminal). Upper limit. |
None
|
start_revision
|
int | None
|
Revision start number beginning from which (but not including) new/edited orders will be returned. |
None
|
source_keys
|
Sequence[str] | None
|
Source keys. |
None
|
rows_count
|
int | None
|
Maximum number of items returned. If null, all items will be returned. |
None
|
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
Returns:
| Type | Description |
|---|---|
OrdersWithRevisionResponse
|
The |
iiko.deliveries.by_delivery_date_and_source_key_and_filter()
async
¶
by_delivery_date_and_source_key_and_filter(
*,
organization_ids: Sequence[str],
terminal_group_ids: Sequence[str] | None = None,
delivery_date_from: datetime | str | None = None,
delivery_date_to: datetime | str | None = None,
statuses: Sequence[DeliveryStatus] | None = None,
has_problem: bool | None = None,
order_service_type: DeliveryServiceType | None = None,
search_text: str | None = None,
time_to_cooking_error_timeout: int | None = None,
cooking_timeout: int | None = None,
sort_property: OrderSortProperty | None = None,
sort_direction: SortDirection | None = None,
rows_count: int | None = None,
source_keys: Sequence[str] | None = None,
order_ids: Sequence[str] | None = None,
pos_order_ids: Sequence[str] | None = None,
timeout: float | None = None,
) -> OrdersWithRevisionResponse
Search orders by search text and additional filters (date, problem, statuses and other).
POST /api/1/deliveries/by_delivery_date_and_source_key_and_filter
Restriction group: Orders: receiving.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
organization_ids
|
Sequence[str]
|
Organization ID for which an order search will be performed. Can be obtained by |
required |
terminal_group_ids
|
Sequence[str] | None
|
List of terminal groups IDs. |
None
|
delivery_date_from
|
datetime | str | None
|
Order delivery date (Local for delivery terminal). Lower limit. The guaranteed order availability period is the last 7 days. To access earlier orders, use the |
None
|
delivery_date_to
|
datetime | str | None
|
Order delivery date (Local for delivery terminal). Upper limit. |
None
|
statuses
|
Sequence[DeliveryStatus] | None
|
Allowed order statuses. |
None
|
has_problem
|
bool | None
|
If true, delivery has a problem. Conditions under which the order has a problem: * order.problem.hasProblem is true; * order status is Unconfirmed and CookingStartTime before now; * order status is ReadyForCooking and (CookingStartTime + timeToCookingErrorTimeout) before now; * order status is CookingCompleted or Waiting and (CookingStartTime + cookingTimeout) before now. |
None
|
order_service_type
|
DeliveryServiceType | None
|
Order service type. |
None
|
search_text
|
str | None
|
Value for search. Used for prefix search. |
None
|
time_to_cooking_error_timeout
|
int | None
|
Error timeout for status time to cooking, in seconds. |
None
|
cooking_timeout
|
int | None
|
Expected cooking time, in seconds. |
None
|
sort_property
|
OrderSortProperty | None
|
Sorting property. |
None
|
sort_direction
|
SortDirection | None
|
Sorting direction. |
None
|
rows_count
|
int | None
|
Maximum number of items returned. |
None
|
source_keys
|
Sequence[str] | None
|
Source keys. |
None
|
order_ids
|
Sequence[str] | None
|
Order IDs. Must be null if "posOrderIds" is not null. |
None
|
pos_order_ids
|
Sequence[str] | None
|
POS order IDs. Must be null if "orderIds" is not null. |
None
|
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
Returns:
| Type | Description |
|---|---|
OrdersWithRevisionResponse
|
The |
iiko.deliveries.by_delivery_date_and_status()
async
¶
by_delivery_date_and_status(
*,
organization_ids: Sequence[str],
delivery_date_from: datetime | str,
delivery_date_to: datetime | str | None = None,
statuses: Sequence[DeliveryStatus] | None = None,
source_keys: Sequence[str] | None = None,
courier_ids: Sequence[str] | None = None,
timeout: float | None = None,
) -> OrdersWithRevisionResponse
Retrieve list of orders by statuses and dates.
POST /api/1/deliveries/by_delivery_date_and_status
Restriction group: Orders: receiving.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
organization_ids
|
Sequence[str]
|
Organization ID for which an order search will be performed. Can be obtained by |
required |
delivery_date_from
|
datetime | str
|
Order delivery date (Local for delivery terminal). Lower limit. The guaranteed order availability period is the last 7 days. To access earlier orders, use the |
required |
delivery_date_to
|
datetime | str | None
|
Order delivery date (Local for delivery terminal). Upper limit. |
None
|
statuses
|
Sequence[DeliveryStatus] | None
|
Allowed order statuses. |
None
|
source_keys
|
Sequence[str] | None
|
Source keys. |
None
|
courier_ids
|
Sequence[str] | None
|
List of driver IDs. |
None
|
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
Returns:
| Type | Description |
|---|---|
OrdersWithRevisionResponse
|
The |
iiko.deliveries.by_id()
async
¶
by_id(
*,
organization_id: str,
order_ids: Sequence[str] | None = None,
source_keys: Sequence[str] | None = None,
pos_order_ids: Sequence[str] | None = None,
return_external_data_keys: Sequence[str] | None = None,
return_locked_by_user: bool | None = None,
timeout: float | None = None,
) -> OrdersResponse
Retrieve orders by IDs.
POST /api/1/deliveries/by_id
Restriction group: Orders: receiving.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
organization_id
|
str
|
Organization ID for which an order search will be performed. Can be obtained by |
required |
order_ids
|
Sequence[str] | None
|
IDs of orders information on which is required. Required if "posOrderIds" is null. Must be null if "posOrderIds" is not null. Maximum allowed "orderIds" to request - |
None
|
source_keys
|
Sequence[str] | None
|
Source keys. |
None
|
pos_order_ids
|
Sequence[str] | None
|
POS order IDs information on which is required. Required if "orderIds" is null. Must be null if "orderIds" is not null. Maximum allowed "posOrderIds" to request - |
None
|
return_external_data_keys
|
Sequence[str] | None
|
Keys for retrun external data information. |
None
|
return_locked_by_user
|
bool | None
|
Whether to check and return LockedByUser property (see FullOrderUpdateRequest.EmployeeId). |
None
|
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
Returns:
| Type | Description |
|---|---|
OrdersResponse
|
The |
iiko.deliveries.by_revision()
async
¶
by_revision(
*,
start_revision: int,
organization_ids: Sequence[str],
source_keys: Sequence[str] | None = None,
timeout: float | None = None,
) -> OrdersWithRevisionResponse
Retrieve list of orders changed from the time revision was passed.
POST /api/1/deliveries/by_revision
Restriction group: Orders: receiving by revision.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start_revision
|
int
|
Revision start number beginning from which (but not including) new/edited orders will be returned. Maximum revision offset to request - |
required |
organization_ids
|
Sequence[str]
|
Organization ID for which an order search will be performed. Can be obtained by |
required |
source_keys
|
Sequence[str] | None
|
Source keys. |
None
|
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
Returns:
| Type | Description |
|---|---|
OrdersWithRevisionResponse
|
The |
iiko.deliveries.history.by_delivery_date_and_phone()
async
¶
by_delivery_date_and_phone(
*,
phone: str,
organization_ids: Sequence[str],
rows_count: int,
delivery_date_from: datetime | str | None = None,
delivery_date_to: datetime | str | None = None,
start_revision: int | None = None,
source_keys: Sequence[str] | None = None,
timeout: float | None = None,
) -> OrdersWithRevisionResponse
Retrieve list of history orders by telephone number, dates and revision.
POST /api/1/deliveries/history/by_delivery_date_and_phone
Restriction group: Orders: receiving.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
phone
|
str
|
Delivery order phone number. |
required |
organization_ids
|
Sequence[str]
|
Organization ID for which an order search will be performed. Can be obtained by |
required |
rows_count
|
int
|
Maximum number of items returned. Maximum numbers of items to request - |
required |
delivery_date_from
|
datetime | str | None
|
Order delivery date (Local for delivery terminal). Lower limit. Order details are stored for 90 days. |
None
|
delivery_date_to
|
datetime | str | None
|
Order delivery date (Local for delivery terminal). Upper limit. Order details are stored for 90 days. |
None
|
start_revision
|
int | None
|
Revision start number beginning from which (but not including) orders will be returned. Maximum revision offset to request - |
None
|
source_keys
|
Sequence[str] | None
|
Source keys. |
None
|
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
Returns:
| Type | Description |
|---|---|
OrdersWithRevisionResponse
|
The |
Addresses¶
Regions/cities/streets API.
iiko.cities()
async
¶
cities(
*,
organization_ids: Sequence[str],
include_deleted: bool | None = None,
timeout: float | None = None,
) -> CitiesResponse
Cities.
POST /api/1/cities
Restriction group: Data: geo.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
organization_ids
|
Sequence[str]
|
IDs of organizations that require data return. Can be obtained by |
required |
include_deleted
|
bool | None
|
Include deleted cities in response. |
None
|
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
Returns:
| Type | Description |
|---|---|
CitiesResponse
|
The |
iiko.regions()
async
¶
regions(
*,
organization_ids: Sequence[str],
timeout: float | None = None,
) -> RegionsResponse
Regions.
POST /api/1/regions
Restriction group: Data: geo.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
organization_ids
|
Sequence[str]
|
IDs of organizations that require data return. Can be obtained by |
required |
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
Returns:
| Type | Description |
|---|---|
RegionsResponse
|
The |
iiko.streets.by_city()
async
¶
by_city(
*,
organization_id: str,
city_id: str,
include_deleted: bool | None = None,
timeout: float | None = None,
) -> StreetsResponse
Streets by city.
POST /api/1/streets/by_city
Restriction group: Data: geo.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
organization_id
|
str
|
Organization ID details of which have to be returned. Can be obtained by |
required |
city_id
|
str
|
City ID. |
required |
include_deleted
|
bool | None
|
Include deleted streets in response. |
None
|
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
Returns:
| Type | Description |
|---|---|
StreetsResponse
|
The |
iiko.streets.by_id()
async
¶
by_id(
*,
organization_id: str,
ids: Sequence[str] | None = None,
classifier_ids: Sequence[str] | None = None,
timeout: float | None = None,
) -> StreetsByIdResponse
Streets by id or by classifierId.
POST /api/1/streets/by_id
Restriction group: Data: geo.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
organization_id
|
str
|
Organization Id. |
required |
ids
|
Sequence[str] | None
|
Street Ids. |
None
|
classifier_ids
|
Sequence[str] | None
|
Street classifierIds. |
None
|
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
Returns:
| Type | Description |
|---|---|
StreetsByIdResponse
|
The |
Delivery restrictions¶
Delivery restrictions API.
iiko.delivery_restrictions()
async
¶
__call__(
*,
organization_ids: Sequence[str],
timeout: float | None = None,
) -> GetDeliveryRestrictionsResponse
Retrieve list of delivery restrictions.
POST /api/1/delivery_restrictions
Allowed from version 6.4.16.
Restriction group: Data: dictionaries.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
organization_ids
|
Sequence[str]
|
Organizations IDs which delivery restrictions have to be returned. Can be obtained by |
required |
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
Returns:
| Type | Description |
|---|---|
GetDeliveryRestrictionsResponse
|
The |
iiko.delivery_restrictions.allowed()
async
¶
allowed(
*,
is_courier_delivery: bool,
organization_id: str | None = None,
organization_ids: Sequence[str] | None = None,
delivery_address: RestrictionsAddress
| Mapping[str, Any]
| None = None,
order_location: OrderLocation
| Mapping[str, Any]
| None = None,
order_items: Sequence[
RestrictionsOrderItem | Mapping[str, Any]
]
| None = None,
delivery_date: datetime | str | None = None,
delivery_sum: Decimal | float | None = None,
discount_sum: Decimal | float | None = None,
timeout: float | None = None,
) -> GetAllowedRestrictionsResponse
Get suitable terminal groups for delivery restrictions.
POST /api/1/delivery_restrictions/allowed
Allowed from version 6.4.16.
Restriction group: Orders: preparing.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
is_courier_delivery
|
bool
|
Type of delivery service. |
required |
organization_id
|
str | None
|
Deprecated. Organization ID. Deprecated, use "organizationIds". |
None
|
organization_ids
|
Sequence[str] | None
|
Organization IDs. Can be obtained by |
None
|
delivery_address
|
RestrictionsAddress | Mapping[str, Any] | None
|
Delivery address. |
None
|
order_location
|
OrderLocation | Mapping[str, Any] | None
|
Order location. |
None
|
order_items
|
Sequence[RestrictionsOrderItem | Mapping[str, Any]] | None
|
Order list. |
None
|
delivery_date
|
datetime | str | None
|
Delivery date (Local for delivery terminal). |
None
|
delivery_sum
|
Decimal | float | None
|
Sum. |
None
|
discount_sum
|
Decimal | float | None
|
Discounts sum. |
None
|
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
Returns:
| Type | Description |
|---|---|
GetAllowedRestrictionsResponse
|
The |
Marketing sources¶
Marketing sources API.
iiko.marketing_sources()
async
¶
marketing_sources(
*,
organization_ids: Sequence[str],
timeout: float | None = None,
) -> MarketingSourcesResponse
Marketing sources.
POST /api/1/marketing_sources
Allowed from version 7.2.5.
Restriction group: Data: dictionaries.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
organization_ids
|
Sequence[str]
|
Organizations IDs which marketing sources have to be returned. Can be obtained by |
required |
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
Returns:
| Type | Description |
|---|---|
MarketingSourcesResponse
|
The |
Drafts¶
Drafts API.
iiko.deliveries.drafts.by_filter()
async
¶
by_filter(
*,
organization_ids: Sequence[str],
date_from: datetime | str | None = None,
date_to: datetime | str | None = None,
phone: str | None = None,
limit: int | None = None,
offset: int | None = None,
source_keys: Sequence[str] | None = None,
terminal_group_ids: Sequence[str] | None = None,
search_text: str | None = None,
sort_property: OrderDraftSortProperty | None = None,
sort_direction: SortDirection | None = None,
operator_ids: Sequence[str] | None = None,
order_type_ids: Sequence[str] | None = None,
timeout: float | None = None,
) -> FilterDraftsResponse
Retrieve order drafts list by parameters.
POST /api/1/deliveries/drafts/by_filter
Restriction group: Drafts: receiving.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
organization_ids
|
Sequence[str]
|
Organization ID for which the order drafts search will be performed. Can be obtained by |
required |
date_from
|
datetime | str | None
|
Draft creation time (UTC). Lower limit. |
None
|
date_to
|
datetime | str | None
|
Draft creation time (UTC). Upper limit. |
None
|
phone
|
str | None
|
Phone number. |
None
|
limit
|
int | None
|
Desirable size of result set (50 by default). |
None
|
offset
|
int | None
|
Offset from the beginning of full result set for paging. |
None
|
source_keys
|
Sequence[str] | None
|
Delivery sources (DeliveryClub, PH and etc.) |
None
|
terminal_group_ids
|
Sequence[str] | None
|
List of terminal groups IDs. |
None
|
search_text
|
str | None
|
Value for search. Used for prefix search. |
None
|
sort_property
|
OrderDraftSortProperty | None
|
Sorting property. |
None
|
sort_direction
|
SortDirection | None
|
Sorting direction. |
None
|
operator_ids
|
Sequence[str] | None
|
List of drafts operator IDs. |
None
|
order_type_ids
|
Sequence[str] | None
|
List of drafts order type IDs. |
None
|
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
Returns:
| Type | Description |
|---|---|
FilterDraftsResponse
|
The |
iiko.deliveries.drafts.by_id()
async
¶
by_id(
*,
organization_id: str,
order_id: str,
timeout: float | None = None,
) -> GetDraftResponse
Retrieve order draft by ID.
POST /api/1/deliveries/drafts/by_id
Restriction group: Drafts: receiving.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
organization_id
|
str
|
Organization ID for which the order search will be performed. Can be obtained by |
required |
order_id
|
str
|
Order ID. |
required |
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
Returns:
| Type | Description |
|---|---|
GetDraftResponse
|
The |
iiko.deliveries.drafts.commit()
async
¶
commit(
*,
organization_id: str,
order_id: str,
terminal_group_id: str | None = None,
create_order_settings: CreateOrderSettings
| Mapping[str, Any]
| None = None,
timeout: float | None = None,
) -> OrderResponse
Admit order draft changes and send them to Front.
POST /api/1/deliveries/drafts/commit
Restriction group: Drafts: changing.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
organization_id
|
str
|
Organization ID of the new order. Can be obtained by |
required |
order_id
|
str
|
ID of the order. |
required |
terminal_group_id
|
str | None
|
Front group ID the order must be sent to. Can be obtained by |
None
|
create_order_settings
|
CreateOrderSettings | Mapping[str, Any] | None
|
Order creation parameters. |
None
|
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
Returns:
| Type | Description |
|---|---|
OrderResponse
|
The |
iiko.deliveries.drafts.create()
async
¶
create(
*,
organization_id: str,
order: DeliveryOrderDraft | Mapping[str, Any],
terminal_group_id: str | None = None,
timeout: float | None = None,
) -> CreateOrSaveDraftResponse
Create delivery order draft.
POST /api/1/deliveries/drafts/create
Restriction group: Drafts: creating.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
organization_id
|
str
|
Organization ID of the new order. Can be obtained by |
required |
order
|
DeliveryOrderDraft | Mapping[str, Any]
|
Order item. |
required |
terminal_group_id
|
str | None
|
Front group ID the order must be sent to. Can be obtained by |
None
|
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
Returns:
| Type | Description |
|---|---|
CreateOrSaveDraftResponse
|
The |
iiko.deliveries.drafts.delete()
async
¶
delete(
*,
organization_id: str,
order_id: str,
timeout: float | None = None,
) -> CorrelationIdResponse
Delete order draft.
POST /api/1/deliveries/drafts/delete
Restriction group: Drafts: changing.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
organization_id
|
str
|
Organization ID. Can be obtained by |
required |
order_id
|
str
|
ID of the order. |
required |
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
Returns:
| Type | Description |
|---|---|
CorrelationIdResponse
|
The |
iiko.deliveries.drafts.lock()
async
¶
lock(
*,
organization_id: str,
order_id: str,
employee_id: str,
timeout: float | None = None,
) -> CorrelationIdResponse
Lock order draft.
POST /api/1/deliveries/drafts/lock
Restriction group: Drafts: changing.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
organization_id
|
str
|
Organization ID. Can be obtained by |
required |
order_id
|
str
|
ID of the order. |
required |
employee_id
|
str
|
ID of the employee. |
required |
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
Returns:
| Type | Description |
|---|---|
CorrelationIdResponse
|
The |
iiko.deliveries.drafts.save()
async
¶
save(
*,
employee_id: str,
organization_id: str,
order: DeliveryOrderDraft | Mapping[str, Any],
terminal_group_id: str | None = None,
timeout: float | None = None,
) -> CreateOrSaveDraftResponse
Update existing delivery order draft.
POST /api/1/deliveries/drafts/save
Restriction group: Drafts: creating.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
employee_id
|
str
|
ID of the employee who wants to update order draft. |
required |
organization_id
|
str
|
Organization ID of the new order. Can be obtained by |
required |
order
|
DeliveryOrderDraft | Mapping[str, Any]
|
Order item. |
required |
terminal_group_id
|
str | None
|
Front group ID the order must be sent to. Can be obtained by |
None
|
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
Returns:
| Type | Description |
|---|---|
CreateOrSaveDraftResponse
|
The |
iiko.deliveries.drafts.unlock()
async
¶
unlock(
*,
organization_id: str,
order_id: str,
employee_id: str,
timeout: float | None = None,
) -> CorrelationIdResponse
Unlock order draft.
POST /api/1/deliveries/drafts/unlock
Restriction group: Drafts: changing.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
organization_id
|
str
|
Organization ID. Can be obtained by |
required |
order_id
|
str
|
ID of the order. |
required |
employee_id
|
str
|
ID of the employee. |
required |
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
Returns:
| Type | Description |
|---|---|
CorrelationIdResponse
|
The |