Skip to content

Webhooks models

Models of webhook settings and webhook events.

Generated by python -m codegen from the iikoCloud OpenAPI specification. Do not edit by hand.

WebhookEvent module-attribute

WebhookEvent = Annotated[
    Annotated[
        DeliveryOrderUpdateEvent, Tag("DeliveryOrderUpdate")
    ]
    | Annotated[
        DeliveryOrderErrorEvent, Tag("DeliveryOrderError")
    ]
    | Annotated[ReserveUpdateEvent, Tag("ReserveUpdate")]
    | Annotated[ReserveErrorEvent, Tag("ReserveError")]
    | Annotated[
        TableOrderUpdateEvent, Tag("TableOrderUpdate")
    ]
    | Annotated[
        TableOrderErrorEvent, Tag("TableOrderError")
    ]
    | Annotated[StopListUpdateEvent, Tag("StopListUpdate")]
    | Annotated[PersonalShiftEvent, Tag("PersonalShift")]
    | Annotated[UnknownWebhookEvent, Tag(UNKNOWN)],
    discriminator(
        "eventType",
        "event_type",
        (
            "DeliveryOrderUpdate",
            "DeliveryOrderError",
            "ReserveUpdate",
            "ReserveError",
            "TableOrderUpdate",
            "TableOrderError",
            "StopListUpdate",
            "PersonalShift",
        ),
    ),
]

Any webhook event sent by iikoCloud.

One of DeliveryOrderUpdateEvent, DeliveryOrderErrorEvent, ReserveUpdateEvent, ReserveErrorEvent, TableOrderUpdateEvent, TableOrderErrorEvent, StopListUpdateEvent, PersonalShiftEvent, selected by event_type. Values unknown to this library are parsed as UnknownWebhookEvent.

DeliveryOrderErrorEvent

Bases: IikoModel

WebHook notification about delivery order saving error.

correlation_id class-attribute instance-attribute

correlation_id: str | None = None

Operation ID.

event_info class-attribute instance-attribute

event_info: OrderInfo | None = None

Event details.

event_time class-attribute instance-attribute

event_time: IikoDateTime | None = None

Event date and time (UTC).

event_type class-attribute instance-attribute

event_type: Literal['DeliveryOrderError'] | None = None

Event type.

organization_id class-attribute instance-attribute

organization_id: str | None = None

Organization ID.

Can be obtained by /api/1/organizations operation.

DeliveryOrderUpdateEvent

Bases: IikoModel

WebHook notification about delivery order update.

correlation_id class-attribute instance-attribute

correlation_id: str | None = None

Operation ID.

event_info class-attribute instance-attribute

event_info: OrderInfo | None = None

Event details.

event_time class-attribute instance-attribute

event_time: IikoDateTime | None = None

Event date and time (UTC).

event_type class-attribute instance-attribute

event_type: Literal['DeliveryOrderUpdate'] | None = None

Event type.

organization_id class-attribute instance-attribute

organization_id: str | None = None

Organization ID.

Can be obtained by /api/1/organizations operation.

DeliveryOrderWebHooksFilter

Bases: IikoModel

Filter for delivery orders.

errors class-attribute instance-attribute

errors: bool | None = None

Flag for errors.

item_statuses class-attribute instance-attribute

item_statuses: list[OrderItemStatus] | None = None

Statuses of order items, when changing which need to send a notification.

order_statuses class-attribute instance-attribute

order_statuses: list[DeliveryStatus] | None = None

Statuses of orders, when changing which need to send a notification.

returned_external_data_keys class-attribute instance-attribute

returned_external_data_keys: list[str] | None = None

Order external data keys to return in a notification.

GetWebHookSettingsRequest

Bases: IikoModel

Request to get webhooks settings for specified organization.

organization_id instance-attribute

organization_id: str

Organization UOC Id.

Can be obtained by /api/1/organizations operation.

GetWebHookSettingsResponse

Bases: IikoModel

Response to get webhooks settings for specified organization.

api_login_name class-attribute instance-attribute

api_login_name: str | None = None

Api login name.

auth_token class-attribute instance-attribute

auth_token: str | None = None

Authorization token to pass to the webhook handler.

correlation_id instance-attribute

correlation_id: str

Operation ID.

web_hooks_filter class-attribute instance-attribute

web_hooks_filter: WebHooksFilter | None = None

Webhooks filter.

web_hooks_uri class-attribute instance-attribute

web_hooks_uri: str | None = None

Webhook handler url.

PersonalShift

Bases: IikoModel

Employee personal shift info.

id instance-attribute

id: str

Employee ID.

opened instance-attribute

opened: bool

Personal shift state flag (true - shift is opened, false - shift is closed).

role_id class-attribute instance-attribute

role_id: str | None = None

Employee Role ID.

terminal_group_id instance-attribute

terminal_group_id: str

ID of the terminal group where the personal shift is opened/closed.

PersonalShiftEvent

Bases: IikoModel

WebHook notification about employee personal shift update.

correlation_id class-attribute instance-attribute

correlation_id: str | None = None

Operation ID.

event_info class-attribute instance-attribute

event_info: PersonalShift | None = None

Event details.

event_time class-attribute instance-attribute

event_time: IikoDateTime | None = None

Event date and time (UTC).

event_type class-attribute instance-attribute

event_type: Literal['PersonalShift'] | None = None

Event type.

organization_id class-attribute instance-attribute

organization_id: str | None = None

Organization ID.

Can be obtained by /api/1/organizations operation.

ReserveErrorEvent

Bases: IikoModel

WebHook notification about reserve saving error.

correlation_id class-attribute instance-attribute

correlation_id: str | None = None

Operation ID.

event_info class-attribute instance-attribute

event_info: ReserveInfo | None = None

Event details.

event_time class-attribute instance-attribute

event_time: IikoDateTime | None = None

Event date and time (UTC).

event_type class-attribute instance-attribute

event_type: Literal['ReserveError'] | None = None

Event type.

organization_id class-attribute instance-attribute

organization_id: str | None = None

Organization ID.

Can be obtained by /api/1/organizations operation.

ReserveUpdateEvent

Bases: IikoModel

WebHook notification about reserve update.

correlation_id class-attribute instance-attribute

correlation_id: str | None = None

Operation ID.

event_info class-attribute instance-attribute

event_info: ReserveInfo | None = None

Event details.

event_time class-attribute instance-attribute

event_time: IikoDateTime | None = None

Event date and time (UTC).

event_type class-attribute instance-attribute

event_type: Literal['ReserveUpdate'] | None = None

Event type.

organization_id class-attribute instance-attribute

organization_id: str | None = None

Organization ID.

Can be obtained by /api/1/organizations operation.

ReserveWebHookFilter

Bases: IikoModel

Filter for updates and errors.

errors class-attribute instance-attribute

errors: bool | None = None

Flag for errors.

updates class-attribute instance-attribute

updates: bool | None = None

Flag for updates.

StopListUpdateEvent

Bases: IikoModel

WebHook notification about stop list update.

correlation_id class-attribute instance-attribute

correlation_id: str | None = None

Operation ID.

event_info class-attribute instance-attribute

event_info: WebHookOnStopListChangeData | None = None

Event details.

event_time class-attribute instance-attribute

event_time: IikoDateTime | None = None

Event date and time (UTC).

event_type class-attribute instance-attribute

event_type: Literal['StopListUpdate'] | None = None

Event type.

organization_id class-attribute instance-attribute

organization_id: str | None = None

Organization ID.

Can be obtained by /api/1/organizations operation.

TableOrderErrorEvent

Bases: IikoModel

WebHook notification about table order saving error.

correlation_id class-attribute instance-attribute

correlation_id: str | None = None

Operation ID.

event_info class-attribute instance-attribute

event_info: TableOrderInfo | None = None

Event details.

event_time class-attribute instance-attribute

event_time: IikoDateTime | None = None

Event date and time (UTC).

event_type class-attribute instance-attribute

event_type: Literal['TableOrderError'] | None = None

Event type.

organization_id class-attribute instance-attribute

organization_id: str | None = None

Organization ID.

Can be obtained by /api/1/organizations operation.

TableOrderUpdateEvent

Bases: IikoModel

WebHook notification about table order update.

correlation_id class-attribute instance-attribute

correlation_id: str | None = None

Operation ID.

event_info class-attribute instance-attribute

event_info: TableOrderInfo | None = None

Event details.

event_time class-attribute instance-attribute

event_time: IikoDateTime | None = None

Event date and time (UTC).

event_type class-attribute instance-attribute

event_type: Literal['TableOrderUpdate'] | None = None

Event type.

organization_id class-attribute instance-attribute

organization_id: str | None = None

Organization ID.

Can be obtained by /api/1/organizations operation.

TableOrderWebHookFilter

Bases: IikoModel

Filter for table orders.

errors class-attribute instance-attribute

errors: bool | None = None

Flag for updates.

item_statuses class-attribute instance-attribute

item_statuses: list[OrderItemStatus] | None = None

Statuses of order items, when changing which need to send a notification.

order_statuses class-attribute instance-attribute

order_statuses: list[OrderStatus] | None = None

Statuses of orders, when changing which need to send a notification.

TerminalGroupStopListUpdate

Bases: IikoModel

Out-of-stock list update for a group of front terminals.

id instance-attribute

id: str

Terminal ID.

is_full instance-attribute

is_full: bool

Whether out-of-stock list is fully updated.

UnknownWebhookEvent

Bases: IikoModel

Webhook event of a type unknown to this version of the library.

correlation_id class-attribute instance-attribute

correlation_id: str | None = None

Correlation ID.

event_info class-attribute instance-attribute

event_info: Any = None

Raw event details.

event_time class-attribute instance-attribute

event_time: IikoDateTime | None = None

Event time.

event_type instance-attribute

event_type: str

Event type.

organization_id class-attribute instance-attribute

organization_id: str | None = None

Organization ID.

UpdateWebHookSettingsRequest

Bases: IikoModel

Request to add or update webhooks settings for listed api logins of the specified organization.

auth_token class-attribute instance-attribute

auth_token: str | None = None

Authorization token to pass to the webhook handler.

organization_id instance-attribute

organization_id: str

Organization UOC Id.

Can be obtained by /api/1/organizations operation.

web_hooks_filter class-attribute instance-attribute

web_hooks_filter: WebHooksFilter | None = None

Webhooks filter.

web_hooks_uri instance-attribute

web_hooks_uri: str

Webhook handler url.

WebHookOnStopListChangeData

Bases: IikoModel

Out-of-stock list update info.

terminal_groups_stop_lists_updates instance-attribute

terminal_groups_stop_lists_updates: list[
    TerminalGroupStopListUpdate
]

Terminal groups with out-of-stock list updates.

WebHookShortFilter

Bases: IikoModel

Filter for updates.

updates class-attribute instance-attribute

updates: bool | None = None

Flag for updates.

WebHooksFilter

Bases: IikoModel

Webhooks filter.

business_hours_and_mapping_update_filter class-attribute instance-attribute

business_hours_and_mapping_update_filter: (
    WebHookShortFilter | None
) = None

Filter for business hours and mapping changes.

delivery_order_filter class-attribute instance-attribute

delivery_order_filter: (
    DeliveryOrderWebHooksFilter | None
) = None

Filter for delivery orders.

nomenclature_update_filter class-attribute instance-attribute

nomenclature_update_filter: WebHookShortFilter | None = None

Filter for nomenclature changes.

personal_shift_filter class-attribute instance-attribute

personal_shift_filter: WebHookShortFilter | None = None

Filter for personal shift.

reserve_filter class-attribute instance-attribute

reserve_filter: ReserveWebHookFilter | None = None

Filter for banquets/reserves.

stop_list_update_filter class-attribute instance-attribute

stop_list_update_filter: WebHookShortFilter | None = None

Filter for stop-lists changes.

table_order_filter class-attribute instance-attribute

table_order_filter: TableOrderWebHookFilter | None = None

Filter for table orders.