Skip to content

Clopos client API Reference

Note

Below shown examples are for sync requests. To use async requests, just import async client, and call same-name functions with await:

from integrify.clopos import CloposAsyncRequest

integrify.clopos.client.CloposRequest module-attribute

CloposRequest = CloposClientClass(sync=True)

integrify.clopos.client.CloposAsyncRequest module-attribute

CloposAsyncRequest = CloposClientClass(sync=False)
Note

These are already create class objects, considered for direct use. Otherwise, you should create instance at every call, such as: CloposClientClass().auth()

integrify.clopos.client.CloposClientClass

CloposClientClass(
    name='Clopos',
    base_url=BASE_URL,
    default_handler=None,
    sync=True,
    dry=False,
)

Bases: APIClient, Generic[_Mode]

Base class for CloposClient

auth

auth(
    client_id: Unset[str] = UNSET,
    client_secret: Unset[str] = UNSET,
    brand: Unset[str] = UNSET,
    integrator_id: Unset[str] = UNSET,
) -> APIResponse[AuthResponse]
auth(
    client_id: Unset[str] = UNSET,
    client_secret: Unset[str] = UNSET,
    brand: Unset[str] = UNSET,
    integrator_id: Unset[str] = UNSET,
) -> Coroutine[Any, Any, APIResponse[AuthResponse]]
auth(*args, **kwds)

get_venues

get_venues(
    page: Unset[int] = UNSET,
    limit: Unset[int] = UNSET,
    *,
    headers: Unset[dict[str, str]] = UNSET,
) -> APIResponse[ObjectListResponse[Venue]]
get_venues(
    page: Unset[int] = UNSET,
    limit: Unset[int] = UNSET,
    *,
    headers: Unset[dict[str, str]] = UNSET,
) -> Coroutine[
    Any, Any, APIResponse[ObjectListResponse[Venue]]
]
get_venues(*args, **kwds)

get_users

get_users(
    page: Unset[int] = UNSET,
    limit: Unset[int] = UNSET,
    *,
    headers: Unset[dict[str, str]] = UNSET,
) -> APIResponse[ObjectListResponse[User]]
get_users(
    page: Unset[int] = UNSET,
    limit: Unset[int] = UNSET,
    *,
    headers: Unset[dict[str, str]] = UNSET,
) -> Coroutine[
    Any, Any, APIResponse[ObjectListResponse[User]]
]
get_users(*args, **kwds)

get_user_by_id

get_user_by_id(
    id: int, *, headers: Unset[dict[str, str]] = UNSET
) -> APIResponse[ObjectResponse[User]]
get_user_by_id(
    id: int, *, headers: Unset[dict[str, str]] = UNSET
) -> Coroutine[Any, Any, APIResponse[ObjectResponse[User]]]
get_user_by_id(*args, **kwds)

get_customers

get_customers(
    page: Unset[int] = 1,
    limit: Unset[int] = 20,
    with_: Unset[list[str]] = UNSET,
    filters: Unset[list[CustomerFilter]] = UNSET,
    *,
    headers: Unset[dict[str, str]] = UNSET,
) -> APIResponse[ObjectListResponse[Customer]]
get_customers(
    page: Unset[int] = 1,
    limit: Unset[int] = 20,
    with_: Unset[list[str]] = UNSET,
    filters: Unset[list[CustomerFilter]] = UNSET,
    *,
    headers: Unset[dict[str, str]] = UNSET,
) -> Coroutine[
    Any, Any, APIResponse[ObjectListResponse[Customer]]
]
get_customers(*args, **kwds)

get_customer_by_id

get_customer_by_id(
    id: int, *, headers: Unset[dict[str, str]] = UNSET
) -> APIResponse[ObjectResponse[Customer]]
get_customer_by_id(
    id: int, *, headers: Unset[dict[str, str]] = UNSET
) -> Coroutine[
    Any, Any, APIResponse[ObjectResponse[Customer]]
]
get_customer_by_id(*args, **kwds)

get_customer_groups

get_customer_groups(
    page: Unset[int] = UNSET,
    limit: Unset[int] = UNSET,
    *,
    headers: Unset[dict[str, str]] = UNSET,
) -> APIResponse[ObjectListResponse[Group]]
get_customer_groups(
    page: Unset[int] = UNSET,
    limit: Unset[int] = UNSET,
    *,
    headers: Unset[dict[str, str]] = UNSET,
) -> Coroutine[
    Any, Any, APIResponse[ObjectListResponse[Group]]
]
get_customer_groups(*args, **kwds)

get_categories

get_categories(
    page: Unset[int] = 1,
    limit: Unset[int] = 50,
    parent_id: Unset[int] = UNSET,
    type: Unset[CategoryType] = UNSET,
    include_children: Unset[bool] = True,
    include_inactive: Unset[bool] = False,
    *,
    headers: Unset[dict[str, str]] = UNSET,
) -> APIResponse[ObjectListResponse[Category]]
get_categories(
    page: Unset[int] = 1,
    limit: Unset[int] = 50,
    parent_id: Unset[int] = UNSET,
    type: Unset[CategoryType] = UNSET,
    include_children: Unset[bool] = True,
    include_inactive: Unset[bool] = False,
    *,
    headers: Unset[dict[str, str]] = UNSET,
) -> Coroutine[
    Any, Any, APIResponse[ObjectListResponse[Category]]
]
get_categories(*args, **kwds)

get_category_by_id

get_category_by_id(
    id: int, *, headers: Unset[dict[str, str]] = UNSET
) -> APIResponse[ObjectResponse[Category]]
get_category_by_id(
    id: int, *, headers: Unset[dict[str, str]] = UNSET
) -> Coroutine[
    Any, Any, APIResponse[ObjectResponse[Category]]
]
get_category_by_id(*args, **kwds)

get_stations

get_stations(
    page: Unset[int] = 1,
    limit: Unset[int] = 50,
    status: Unset[int] = UNSET,
    can_print: Unset[bool] = UNSET,
    *,
    headers: Unset[dict[str, str]] = UNSET,
) -> APIResponse[ObjectListResponse[Station]]
get_stations(
    page: Unset[int] = 1,
    limit: Unset[int] = 50,
    status: Unset[int] = UNSET,
    can_print: Unset[bool] = UNSET,
    *,
    headers: Unset[dict[str, str]] = UNSET,
) -> Coroutine[
    Any, Any, APIResponse[ObjectListResponse[Station]]
]
get_stations(*args, **kwds)

get_station_by_id

get_station_by_id(
    id: int, *, headers: Unset[dict[str, str]] = UNSET
) -> APIResponse[ObjectResponse[Station]]
get_station_by_id(
    id: int, *, headers: Unset[dict[str, str]] = UNSET
) -> Coroutine[
    Any, Any, APIResponse[ObjectResponse[Station]]
]
get_station_by_id(*args, **kwds)

get_products

get_products(
    page: Unset[int] = 1,
    limit: Unset[int] = 50,
    selects: Unset[str | list[str]] = UNSET,
    filters: Unset[GetProducstRequestFilter] = UNSET,
    *,
    headers: Unset[dict[str, str]] = UNSET,
) -> APIResponse[ObjectListResponse[Product]]
get_products(
    page: Unset[int] = 1,
    limit: Unset[int] = 50,
    selects: Unset[str | list[str]] = UNSET,
    filters: Unset[GetProducstRequestFilter] = UNSET,
    *,
    headers: Unset[dict[str, str]] = UNSET,
) -> Coroutine[
    Any, Any, APIResponse[ObjectListResponse[Product]]
]
get_products(*args, **kwds)

get_product_by_id

get_product_by_id(
    id: int,
    with_: Unset[list[str]] = UNSET,
    *,
    headers: Unset[dict[str, str]] = UNSET,
) -> APIResponse[ObjectResponse[Product]]
get_product_by_id(
    id: int,
    with_: Unset[list[str]] = UNSET,
    *,
    headers: Unset[dict[str, str]] = UNSET,
) -> Coroutine[
    Any, Any, APIResponse[ObjectResponse[Product]]
]
get_product_by_id(*args, **kwds)

get_sale_types

get_sale_types(
    page: Unset[int] = 1,
    limit: Unset[int] = 20,
    *,
    headers: Unset[dict[str, str]] = UNSET,
) -> APIResponse[ObjectListResponse[SaleType]]
get_sale_types(
    page: Unset[int] = 1,
    limit: Unset[int] = 20,
    *,
    headers: Unset[dict[str, str]] = UNSET,
) -> Coroutine[
    Any, Any, APIResponse[ObjectListResponse[SaleType]]
]
get_sale_types(*args, **kwds)

get_payment_methods

get_payment_methods(
    page: Unset[int] = 1,
    limit: Unset[int] = 20,
    *,
    headers: Unset[dict[str, str]] = UNSET,
) -> APIResponse[ObjectListResponse[PaymentMethod]]
get_payment_methods(
    page: Unset[int] = 1,
    limit: Unset[int] = 20,
    *,
    headers: Unset[dict[str, str]] = UNSET,
) -> Coroutine[
    Any, Any, APIResponse[ObjectListResponse[PaymentMethod]]
]
get_payment_methods(*args, **kwds)

get_stop_list

get_stop_list(
    filters: Unset[list[StopListFilter]] = UNSET,
    *,
    headers: Unset[dict[str, str]] = UNSET,
) -> APIResponse[ObjectListResponse[StopList]]
get_stop_list(
    filters: Unset[list[StopListFilter]] = UNSET,
    *,
    headers: Unset[dict[str, str]] = UNSET,
) -> Coroutine[
    Any, Any, APIResponse[ObjectListResponse[StopList]]
]
get_stop_list(*args, **kwds)

get_orders

get_orders(
    page: Unset[int] = 1,
    limit: Unset[int] = 20,
    status: Unset[OrderStatus] = UNSET,
    *,
    headers: Unset[dict[str, str]] = UNSET,
) -> APIResponse[ObjectListResponse[Order]]
get_orders(
    page: Unset[int] = 1,
    limit: Unset[int] = 20,
    status: Unset[OrderStatus] = UNSET,
    *,
    headers: Unset[dict[str, str]] = UNSET,
) -> Coroutine[
    Any, Any, APIResponse[ObjectListResponse[Order]]
]
get_orders(*args, **kwds)

get_order_by_id

get_order_by_id(
    id: int,
    with_: Unset[
        Literal[
            'receipt:id',
            'service_notification_id',
            'status',
        ]
    ] = UNSET,
    *,
    headers: Unset[dict[str, str]] = UNSET,
) -> APIResponse[ObjectResponse[Order]]
get_order_by_id(
    id: int,
    with_: Unset[
        Literal[
            'receipt:id',
            'service_notification_id',
            'status',
        ]
    ] = UNSET,
    *,
    headers: Unset[dict[str, str]] = UNSET,
) -> Coroutine[
    Any, Any, APIResponse[ObjectResponse[Order]]
]
get_order_by_id(*args, **kwds)

create_order

create_order(
    customer_id: int,
    payload: OrderPayloadIn,
    meta: Unset[dict] = UNSET,
    *,
    headers: Unset[dict[str, str]] = UNSET,
) -> APIResponse[ObjectResponse[Order]]
create_order(
    customer_id: int,
    payload: OrderPayloadIn,
    meta: Unset[dict] = UNSET,
    *,
    headers: Unset[dict[str, str]] = UNSET,
) -> Coroutine[
    Any, Any, APIResponse[ObjectResponse[Order]]
]
create_order(*args, **kwds)

update_order

update_order(
    id: int,
    status: OrderStatus,
    *,
    headers: Unset[dict[str, str]] = UNSET,
) -> APIResponse[ObjectResponse[Order]]
update_order(
    id: int,
    status: OrderStatus,
    *,
    headers: Unset[dict[str, str]] = UNSET,
) -> Coroutine[
    Any, Any, APIResponse[ObjectResponse[Order]]
]
update_order(*args, **kwds)

get_receipts

get_receipts(
    page: Unset[int] = 1,
    limit: Unset[int] = 50,
    sort_by: Unset[str] = 'created_at',
    sort_order: Unset[int] = -1,
    date_from: Unset[str | datetime] = UNSET,
    date_to: Unset[str | datetime] = UNSET,
    *,
    headers: Unset[dict[str, str]] = UNSET,
) -> APIResponse[ObjectListResponse[Receipt]]
get_receipts(
    page: Unset[int] = 1,
    limit: Unset[int] = 50,
    sort_by: Unset[str] = 'created_at',
    sort_order: Unset[int] = -1,
    date_from: Unset[str | datetime] = UNSET,
    date_to: Unset[str | datetime] = UNSET,
    *,
    headers: Unset[dict[str, str]] = UNSET,
) -> Coroutine[
    Any, Any, APIResponse[ObjectListResponse[Receipt]]
]
get_receipts(*args, **kwds)

get_receipt_by_id

get_receipt_by_id(
    id: int, *, headers: Unset[dict[str, str]] = UNSET
) -> APIResponse[ObjectResponse[Receipt]]
get_receipt_by_id(
    id: int, *, headers: Unset[dict[str, str]] = UNSET
) -> Coroutine[
    Any, Any, APIResponse[ObjectResponse[Receipt]]
]
get_receipt_by_id(*args, **kwds)

update_closed_receipt

update_closed_receipt(
    id: int,
    order_status: Unset[OrderStatus] = UNSET,
    order_number: Unset[str] = UNSET,
    fiscal_id: Unset[str] = UNSET,
    lock: Unset[bool] = UNSET,
    *,
    headers: Unset[dict[str, str]] = UNSET,
) -> APIResponse[ObjectResponse[Receipt]]
update_closed_receipt(
    id: int,
    order_status: Unset[OrderStatus] = UNSET,
    order_number: Unset[str] = UNSET,
    fiscal_id: Unset[str] = UNSET,
    lock: Unset[bool] = UNSET,
    *,
    headers: Unset[dict[str, str]] = UNSET,
) -> Coroutine[
    Any, Any, APIResponse[ObjectResponse[Receipt]]
]
update_closed_receipt(*args, **kwds)

close_receipt

close_receipt(
    id: int,
    cid: str,
    payment_methods: list[PaymentMethodIn],
    closed_at: str,
    *,
    headers: Unset[dict[str, str]] = UNSET,
) -> APIResponse[ObjectResponse[Receipt]]
close_receipt(
    id: int,
    cid: str,
    payment_methods: list[PaymentMethodIn],
    closed_at: str,
    *,
    headers: Unset[dict[str, str]] = UNSET,
) -> Coroutine[
    Any, Any, APIResponse[ObjectResponse[Receipt]]
]
close_receipt(*args, **kwds)