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
module-attribute
¶
CloposRequest = CloposClientClass(sync=True)
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()
CloposClientClass(name='Clopos', base_url=BASE_URL, default_handler=None, sync=True, dry=False)
              Bases: APIClient
Base class for CloposClient
auth(client_id=UNSET, client_secret=UNSET, brand=UNSET, venue_id=UNSET)
Function for authentication
Endpoint: POST /open-api/auth
Example:
from integrify.clopos import CloposClient
CloposClient.auth(
    client_id='eNUKI04aYJRU6TBhh5bwUrvmEORgQoxM',
    client_secret='dqYkWUpDjzvKOgbP3ar8tSNKJbwMyYe1V5R7DHClfSNYkap5C5XxRA6PmzoPv1I2',
    brand='openapitest',
    venue_id='1'
)
# Or if you have set the environment variables
CloposClient.auth(headers={'x-token': 'token'})
Response format: AuthResponse
This request returns you a token for subsequent API calls which is valid for one hour.
| PARAMETER | DESCRIPTION | 
|---|---|
| client_id | Client ID provided by Clopos. Can be set in environment variable  
TYPE:
 | 
| client_secret | Client secret provided by Clopos. Can be set in environment variable  
TYPE:
 | 
| brand | Brand you want to authenticate. Can be set in environment variable  
TYPE:
 | 
| venue_id | Venue ID you want to authenticate. Can be set in environment variable  
TYPE:
 | 
get_venues(page=UNSET, limit=UNSET, *, headers=UNSET)
Function for getting list of venues
Endpoint: GET /open-api/venues
Example:
from integrify.clopos import CloposClient
CloposClient.get_venues(headers={'x-brand': 'openapitest', 'x-venue': '1', 'x-token': 'token'})
# Or if you have set the environment variables
CloposClient.get_venues(headers={'x-token': 'token'})
Response format: ObjectListResponse[Venue]
| PARAMETER | DESCRIPTION | 
|---|---|
| page | Page number for pagination (starts at 1) 
TYPE:
 | 
| limit | Maximum number of objects to return (1-100) 
TYPE:
 | 
| headers | Headers for request 
TYPE:
 | 
```
get_users(page=UNSET, limit=UNSET, *, headers=UNSET)
Function for getting list of users
Endpoint: GET /open-api/users
Example:
from integrify.clopos import CloposClient
CloposClient.get_users(headers={'x-brand': 'openapitest', 'x-venue': '1', 'x-token': 'token'})
# Or if you have set the environment variables
CloposClient.get_users(headers={'x-token': 'token'})
Response format: ObjectListResponse[User]
| PARAMETER | DESCRIPTION | 
|---|---|
| page | Page number for pagination (starts at 1) 
TYPE:
 | 
| limit | Maximum number of objects to return (1-100) 
TYPE:
 | 
| headers | Headers for request 
TYPE:
 | 
```
get_user_by_id(id, *, headers=UNSET)
Function for getting user by id
Endpoint: GET /open-api/users/{id}
Example:
from integrify.clopos import CloposClient
CloposClient.get_user_by_id(1, headers={'x-brand': 'openapitest', 'x-venue': '1', 'x-token': 'token'})
# Or if you have set the environment variables
CloposClient.get_user_by_id(id=1, headers={'x-token': 'token'})
Response format: ObjectResponse[User]
| PARAMETER | DESCRIPTION | 
|---|---|
| id | User ID 
TYPE:
 | 
| headers | Headers for request 
TYPE:
 | 
```
get_customers(page=1, limit=20, search=UNSET, *, headers=UNSET)
Function for getting list of customers
Endpoint: GET /open-api/customers
Example:
from integrify.clopos import CloposClient
CloposClient.get_customers(headers={'x-brand': 'openapitest', 'x-venue': '1', 'x-token': 'token'})
# Or if you have set the environment variables
CloposClient.get_customers(headers={'x-token': 'token'})
Response format: ObjectListResponse[Customer]
| PARAMETER | DESCRIPTION | 
|---|---|
| page | Page number for pagination (starts at 1) 
TYPE:
 | 
| limit | Maximum number of objects to return (1-100) 
TYPE:
 | 
| search | Search customers by name or email 
TYPE:
 | 
| headers | Headers for request 
TYPE:
 | 
```
get_customer_by_id(id, *, headers=UNSET)
Function for getting customer by id
Endpoint: GET /open-api/customers/{id}
Example:
from integrify.clopos import CloposClient
CloposClient.get_customer_by_id(1, headers={'x-brand': 'openapitest', 'x-venue': '1', 'x-token': 'token'})
# Or if you have set the environment variables
CloposClient.get_customer_by_id(id=1, headers={'x-token': 'token'})
Response format: ObjectResponse[Customer]
| PARAMETER | DESCRIPTION | 
|---|---|
| id | Customer ID 
TYPE:
 | 
| headers | Headers for request 
TYPE:
 | 
```
get_customer_groups(page=UNSET, limit=UNSET, *, headers=UNSET)
Function for getting list of customer groups
Endpoint: GET /open-api/customer-groups
Example:
from integrify.clopos import CloposClient
CloposClient.get_customer_groups(headers={'x-brand': 'openapitest', 'x-venue': '1', 'x-token': 'token'})
# Or if you have set the environment variables
CloposClient.get_customer_groups(headers={'x-token': 'token'})
Response format: ObjectListResponse[Group]
| PARAMETER | DESCRIPTION | 
|---|---|
| page | Page number for pagination (starts at 1) 
TYPE:
 | 
| limit | Maximum number of objects to return (1-100) 
TYPE:
 | 
| headers | Headers for request 
TYPE:
 | 
```
get_categories(page=1, limit=50, parent_id=UNSET, type=UNSET, include_children=True, include_inactive=False, *, headers=UNSET)
Function for getting list of menu categories
Endpoint: GET /open-api/categories
Example:
from integrify.clopos import CloposClient
CloposClient.get_categories(headers={'x-brand': 'openapitest', 'x-venue': '1', 'x-token': 'token'})
# Or if you have set the environment variables
CloposClient.get_categories(headers={'x-token': 'token'})
Response format: ObjectListResponse[Category]
| PARAMETER | DESCRIPTION | 
|---|---|
| page | Page number for pagination (starts at 1) 
TYPE:
 | 
| limit | Number of categories to return (1-999) 
TYPE:
 | 
| parent_id | Filters records under a specific parent category 
TYPE:
 | 
| type | Category type; PRODUCT, INGREDIENT, ACCOUNTING 
TYPE:
 | 
| include_children | Include child categories in the response 
TYPE:
 | 
| include_inactive | Include inactive categories 
TYPE:
 | 
| headers | Headers for request 
TYPE:
 | 
```
get_category_by_id(id, *, headers=UNSET)
Function for getting menu category by id
Endpoint: GET /open-api/categories/{id}
Example:
from integrify.clopos import CloposClient
CloposClient.get_category_by_id(1, headers={'x-brand': 'openapitest', 'x-venue': '1', 'x-token': 'token'})
# Or if you have set the environment variables
CloposClient.get_category_by_id(id=1, headers={'x-token': 'token'})
Response format: ObjectResponse[Category]
| PARAMETER | DESCRIPTION | 
|---|---|
| id | Category ID 
TYPE:
 | 
| headers | Headers for request 
TYPE:
 | 
```
get_stations(page=1, limit=50, status=UNSET, can_print=UNSET, *, headers=UNSET)
Function for getting list of stations
Endpoint: GET /open-api/stations
Example:
from integrify.clopos import CloposClient
CloposClient.get_stations(headers={'x-brand': 'openapitest', 'x-venue': '1', 'x-token': 'token'})
# Or if you have set the environment variables
CloposClient.get_stations(headers={'x-token': 'token'})
Response format: ObjectListResponse[Station]
| PARAMETER | DESCRIPTION | 
|---|---|
| page | Page number for pagination (starts at 1) 
TYPE:
 | 
| limit | Maximum number of objects to return (1-200) 
TYPE:
 | 
| status | Filter by station status ( 
TYPE:
 | 
| can_print | Filter stations that can redirect to a printer. 
TYPE:
 | 
| headers | Headers for request 
TYPE:
 | 
```
get_station_by_id(id, *, headers=UNSET)
Function for getting station by id
Endpoint: GET /open-api/stations/{id}
Example:
from integrify.clopos import CloposClient
CloposClient.get_station_by_id(1, headers={'x-brand': 'openapitest', 'x-venue': '1', 'x-token': 'token'})
# Or if you have set the environment variables
CloposClient.get_station_by_id(id=1, headers={'x-token': 'token'})
Response format: ObjectResponse[Station]
| PARAMETER | DESCRIPTION | 
|---|---|
| id | Station ID 
TYPE:
 | 
| headers | Headers for request 
TYPE:
 | 
```
get_products(page=1, limit=50, type=UNSET, category_id=UNSET, station_id=UNSET, tags=UNSET, giftable=UNSET, discountable=UNSET, inventory_behavior=UNSET, have_ingredients=UNSET, sold_by_portion=UNSET, has_variants=UNSET, has_modifiers=UNSET, has_barcode=UNSET, has_service_charge=UNSET, *, headers=UNSET)
Function for getting list of products
Endpoint: GET /open-api/products
Example:
from integrify.clopos import CloposClient
CloposClient.get_products(headers={'x-brand': 'openapitest', 'x-venue': '1', 'x-token': 'token'})
# Or if you have set the environment variables
CloposClient.get_products(headers={'x-token': 'token'})
Response format: ObjectListResponse[Product]
| PARAMETER | DESCRIPTION | 
|---|---|
| page | Page number for pagination (starts at 1) 
TYPE:
 | 
| limit | Maximum number of objects to return (1-100) 
TYPE:
 | 
| type | Filters by product type. Possible values: GOODS, DISH, TIMER, PREPARATION, INGREDIENT 
TYPE:
 | 
| category_id | Lists products belonging to the specified category IDs 
TYPE:
 | 
| station_id | Retrieves products assigned to the specified station IDs 
TYPE:
 | 
| tags | Filters for products with the specified tag IDs 
TYPE:
 | 
| giftable | Filters for products that are ("1") or are not giftable. Possible values: 1, 0, true, false 
TYPE:
 | 
| discountable | Filters for products that are ("1") or are not discountable. Possible values: 1, 0, true, false 
TYPE:
 | 
| inventory_behavior | Filters by inventory behavior mode (e.g., "3") 
TYPE:
 | 
| have_ingredients | Retrieves products that have a recipe/ingredients ("1"). Possible values: 1, 0, true, false 
TYPE:
 | 
| sold_by_portion | Lists products sold by portion ("1"). Possible values: 1, 0, true, false 
TYPE:
 | 
| has_variants | Lists products that have variants (modifications) ("1"). Possible values: 1, 0, true, false 
TYPE:
 | 
| has_modifiers | Retrieves products that have a modifier group (modificator_groups) ("1"). Possible values: 1, 0, true, false 
TYPE:
 | 
| has_barcode | Retrieves products that have a barcode ("1"). Possible values: 1, 0, true, false 
TYPE:
 | 
| has_service_charge | Lists products to which a service charge applies ("1"). Possible values: 1, 0, true, false 
TYPE:
 | 
| headers | Headers for request 
TYPE:
 | 
```
get_product_by_id(id, with_=UNSET, *, headers=UNSET)
Function for getting product by id
Endpoint: GET /open-api/products/{id}
Example:
from integrify.clopos import CloposClient
CloposClient.get_product_by_id(1, headers={'x-brand': 'openapitest', 'x-venue': '1', 'x-token': 'token'})
# Or if you have set the environment variables
CloposClient.get_product_by_id(id=1, headers={'x-token': 'token'})
Response format: ObjectResponse[Product]
| PARAMETER | DESCRIPTION | 
|---|---|
| id | Product ID 
TYPE:
 | 
| with_ | Related data selector. Example: taxes, unit, modifications, modificator_groups, recipe, packages, media, tags, setting. You can include multiple with parameters 
TYPE:
 | 
| headers | Headers for request 
TYPE:
 | 
```
get_sale_types(page=1, limit=20, *, headers=UNSET)
Function for getting list of sale types
Endpoint: GET /open-api/sale-types
Example:
from integrify.clopos import CloposClient
CloposClient.get_sale_types(headers={'x-brand': 'openapitest', 'x-venue': '1', 'x-token': 'token'})
# Or if you have set the environment variables
CloposClient.get_sale_types(headers={'x-token': 'token'})
Used by
Create Order: provide payload.service.sale_type_id and payload.service.venue_id Create Receipt: optionally include sale_type_id or meta.sale_type
Response format: ObjectListResponse[SaleType]
| PARAMETER | DESCRIPTION | 
|---|---|
| page | Page number for pagination (starts at 1) 
TYPE:
 | 
| limit | Maximum number of objects to return (1-100) 
TYPE:
 | 
| headers | Headers for request 
TYPE:
 | 
```
get_payment_methods(page=1, limit=20, *, headers=UNSET)
Function for getting list of payment methods
Endpoint: GET /open-api/payment-methods
Example:
from integrify.clopos import CloposClient
CloposClient.get_payment_methods(headers={'x-brand': 'openapitest', 'x-venue': '1', 'x-token': 'token'})
# Or if you have set the environment variables
CloposClient.get_payment_methods(headers={'x-token': 'token'})
Response format: ObjectListResponse[PaymentMethod]
| PARAMETER | DESCRIPTION | 
|---|---|
| page | Page number for pagination (starts at 1) 
TYPE:
 | 
| limit | Maximum number of objects to return (1-100) 
TYPE:
 | 
| headers | Headers for request 
TYPE:
 | 
```
get_orders(page=1, limit=20, status=UNSET, *, headers=UNSET)
Function for getting list of orders
Endpoint: GET /open-api/orders
Example:
from integrify.clopos import CloposClient
CloposClient.get_orders(headers={'x-brand': 'openapitest', 'x-venue': '1', 'x-token': 'token'})
# Or if you have set the environment variables
CloposClient.get_orders(headers={'x-token': 'token'})
Response format: ObjectListResponse[Order]
| PARAMETER | DESCRIPTION | 
|---|---|
| page | Page number for pagination (starts at 1) 
TYPE:
 | 
| limit | Maximum number of objects to return (1-100) 
TYPE:
 | 
| status | Filter by order status 
TYPE:
 | 
| headers | Headers for request 
TYPE:
 | 
```
get_order_by_id(id, *, headers=UNSET)
Function for getting order by id
Endpoint: GET /open-api/orders/{id}
Example:
from integrify.clopos import CloposClient
CloposClient.get_order_by_id(1, headers={'x-brand': 'openapitest', 'x-venue': '1', 'x-token': 'token'})
# Or if you have set the environment variables
CloposClient.get_order_by_id(id=1, headers={'x-token': 'token'})
Response format: ObjectResponse[Order]
| PARAMETER | DESCRIPTION | 
|---|---|
| id | Order ID 
TYPE:
 | 
| headers | Headers for request 
TYPE:
 | 
```
create_order(customer_id, payload, meta=UNSET, *, headers=UNSET)
Function for creating order
Endpoint: POST /open-api/orders
Example:
from integrify.clopos import CloposClient
data = {
        'customer_id': 1,
        'payload': {
            'service': {
                'sale_type_id': 2,
                'sale_type_name': 'Delivery',
                'venue_id': 1,
                'venue_name': 'Main',
            },
            'customer': {
                'id': 9,
                'name': 'Rahid Akhundzada',
                'customer_discount_type': 1,
                'phone': '+994705401040',
            },
            'products': [
                {
                    'product_id': 1,
                    'count': 1,
                    'product_modificators': [
                        {'modificator_id': 187, 'count': 1},
                        {'modificator_id': 201, 'count': 1},
                    ],
                    'meta': {
                        'price': 0,
                        'order_product': {
                            'product': {
                                'id': 1,
                                'name': 'Mega Dürüm Menü Alana Çiğ Köfte Dürüm',
                                'category_id': 1,
                                'station_id': 1,
                                'price': 0,
                            },
                            'count': 1,
                            'status': 'completed',
                            'product_modificators': [
                                {'modificator_id': 187, 'count': 1},
                                {'modificator_id': 201, 'count': 1},
                            ],
                            'product_hash': 'MTExODcsMTEyMDE=',
                        },
                    },
                }
            ],
        },
        'meta': {
            'comment': '',
            'discount': {'discount_type': 1, 'discount_value': 10},
            'orderTotal': '16.2000',
            'apply_service_charge': True,
            'customer_discount_type': 1,
            'service_charge_value': 0,
        },
    }
CloposClient.create_order(**data, headers={'x-brand': 'openapitest', 'x-venue': '1', 'x-token': 'token'})
# Or if you have set the environment variables
CloposClient.create_order(**data, headers={'x-token': 'token'})
Response format: ObjectResponse[Order]
Prerequisites
- The top-level customer_id must be provided.
- Service context is required in payload.service:
- sale_type_id — a valid sale type ID from List Sale Types
- sale_type_name — human-readable sale type name
- venue_id and venue_name — the venue where the order will be fulfilled
- Product and modifier identifiers must exist in the POS catalog. Include the meta.order_product data returned by catalog APIs for accurate reconciliation.
- Totals and discounts are recalculated by the platform; send the raw values shown to operators.
| PARAMETER | DESCRIPTION | 
|---|---|
| customer_id | Customer ID 
TYPE:
 | 
| payload | Order payload 
TYPE:
 | 
| meta | Meta object 
TYPE:
 | 
| headers | Headers for request 
TYPE:
 | 
```
update_order(id, status, *, headers=UNSET)
Function for updating order
Endpoint: PUT /open-api/orders/{id}
Example:
from integrify.clopos import CloposClient
from integrify.clopos.schemas.enums import OrderStatus
CloposClient.update_order(id=1, OrderStatus.IGNORE, headers={'x-brand': 'openapitest', 'x-venue': '1', 'x-token': 'token'})
# Or if you have set the environment variables
CloposClient.update_order(id=1, status=OrderStatus.IGNORE)
Response format: ObjectResponse[Order]
| PARAMETER | DESCRIPTION | 
|---|---|
| id | Order ID 
TYPE:
 | 
| status | Order status to update 
TYPE:
 | 
| headers | Headers for request 
TYPE:
 | 
```
get_receipts(page=1, limit=50, sort_by='created_at', sort_order=-1, date_from=UNSET, date_to=UNSET, *, headers=UNSET)
Function for getting list of receipts
Endpoint: GET /open-api/receipts
Example:
from integrify.clopos import CloposClient
CloposClient.get_receipts(headers={'x-brand': 'openapitest', 'x-venue': '1', 'x-token': 'token'})
# Or if you have set the environment variables
CloposClient.get_receipts(headers={'x-token': 'token'})
Response format: ObjectListResponse[Receipt]
| PARAMETER | DESCRIPTION | 
|---|---|
| page | Page number for pagination (starts at 1) 
TYPE:
 | 
| limit | Maximum number of objects to return (1-200) 
TYPE:
 | 
| sort_by | Primary sort field 
TYPE:
 | 
| sort_order | Primary sort direction (1 = ascending, -1 = descending) 
TYPE:
 | 
| date_from | Start date (inclusive) in YYYY-MM-DD format 
TYPE:
 | 
| date_to | End date (inclusive) in YYYY-MM-DD format 
TYPE:
 | 
| headers | Headers for request 
TYPE:
 | 
```
get_receipt_by_id(id, *, headers=UNSET)
Function for getting receipt by id
Endpoint: GET /open-api/receipts/{id}
Example:
from integrify.clopos import CloposClient
CloposClient.get_receipt_by_id(1, headers={'x-brand': 'openapitest', 'x-venue': '1', 'x-token': 'token'})
# Or if you have set the environment variables
CloposClient.get_receipt_by_id(id=1, headers={'x-token': 'token'})
Response format: ObjectResponse[Receipt]
| PARAMETER | DESCRIPTION | 
|---|---|
| id | Receipt ID 
TYPE:
 | 
| headers | Headers for request 
TYPE:
 | 
```
create_receipt(cid, payment_methods, user_id, by_cash=UNSET, by_card=UNSET, customer_discount_type=UNSET, discount_rate=UNSET, discount_type=UNSET, discount_value=UNSET, delivery_fee=UNSET, gift_total=UNSET, guests=UNSET, original_subtotal=UNSET, printed=UNSET, receipt_products=UNSET, remaining=UNSET, rps_discount=UNSET, sale_type_id=UNSET, service_charge=UNSET, service_charge_value=UNSET, status=UNSET, subtotal=UNSET, terminal_id=UNSET, total=UNSET, total_tax=UNSET, created_at=UNSET, closed_at=UNSET, address=UNSET, courier_id=UNSET, meta=UNSET, *, headers=UNSET, **kwargs)
Function for creating receipt
Endpoint: POST /open-api/receipts
Example:
from integrify.clopos import CloposClient
CloposClient.create_receipt(cid='uuid', payment_methods=[{'id': 1, 'name': 'cash', 'amount': 100}], user_id=1, headers={'x-brand': 'openapitest', 'x-venue': '1', 'x-token': 'token'})
# Or if you have set the environment variables
CloposClient.create_receipt(cid='uuid', payment_methods=[{'id': 1, 'name': 'cash', 'amount': 100}], user_id=1, headers={'x-token': 'token'})
Notes
- cid must be unique; if you send the same value again, you will get a 409.
- The sum of amounts in payment_methods[] should equal the total (it may differ from by_cash + by_card when you track tenders only via payment_methods).
- All time fields are strings and may represent Unix milliseconds in certain integrations.
- Creating a receipt through this endpoint stores it as a closed record and does not notify POS terminals or other systems.
- Read the Retry-Afterheader before retrying if you encounter rate limits or transient errors.
Response format: ObjectResponse[Receipt]
| PARAMETER | DESCRIPTION | 
|---|---|
| cid | Transaction UUID 
TYPE:
 | 
| payment_methods | List of payment methods 
TYPE:
 | 
| user_id | User ID 
TYPE:
 | 
| by_cash | Cash total 
TYPE:
 | 
| by_card | Card total 
TYPE:
 | 
| customer_discount_type | Customer discount type. 
TYPE:
 | 
| discount_rate | Percentage discount 
TYPE:
 | 
| discount_type | Discount type 
TYPE:
 | 
| discount_value | Amount-based discount 
TYPE:
 | 
| delivery_fee | Delivery fee 
TYPE:
 | 
| gift_total | Gift total 
TYPE:
 | 
| guests | Number of guests 
TYPE:
 | 
| original_subtotal | Original subtotal 
TYPE:
 | 
| printed | If receipt is printed 
TYPE:
 | 
| receipt_products | List of receipt products 
TYPE:
 | 
| remaining | Remaining amount 
TYPE:
 | 
| rps_discount | RPS discount 
TYPE:
 | 
| sale_type_id | Sale type ID 
TYPE:
 | 
| service_charge | Service charge 
TYPE:
 | 
| service_charge_value | Service charge value 
TYPE:
 | 
| status | Status 
TYPE:
 | 
| subtotal | Subtotal 
TYPE:
 | 
| terminal_id | Terminal ID 
TYPE:
 | 
| total | Total 
TYPE:
 | 
| total_tax | Total tax 
TYPE:
 | 
| created_at | Creation time (Unix ms) 
TYPE:
 | 
| closed_at | Closing time (Unix ms) 
TYPE:
 | 
| address | Customer address 
TYPE:
 | 
| courier_id | Courier user ID; can be any user ID 
TYPE:
 | 
| meta | Metadata 
TYPE:
 | 
| headers | Headers for request 
TYPE:
 | 
```
delete_receipt(id, *, headers=UNSET)
Function for deleting receipt
Endpoint: DELETE /open-api/receipts/{id}
Example:
from integrify.clopos import CloposClient
CloposClient.delete_receipt(1, headers={'x-brand': 'openapitest', 'x-venue': '1', 'x-token': 'token'})
# Or if you have set the environment variables
CloposClient.delete_receipt(id=1, headers={'x-token': 'token'})
Response format: BaseResponse
| PARAMETER | DESCRIPTION | 
|---|---|
| id | Receipt ID 
TYPE:
 | 
| headers | Headers for request 
TYPE:
 | 
```