Integrify is a library that simplifies API integrations. This library is designed for Clopos integration.
Project description
Integrify Clopos
[!Caution] Integrify is unofficial library, even though it is based on official documentation.
Integrify is a library that simplifies API integrations. This library is designed for Clopos integration.
Documentation: https://integrify.mmzeynalli.dev/integrations/clopos/about/
Source code: https://github.com/Integrify-SDK/integrify-clopos-python
Official Documentation (v1.0.1)
Main functionalities
- Library supports both sync and async requests.
- All of the function and classes has been documented.
- As all of the functions/variables/classes has been typed, type-hinting is active
- The flow of the requests has been explained in the documentation.
Installing
pip install integrify-clopos
Usage
To use these requests you need to set these environmental variables:
| Variable Name | Purpose | Header equivalent | Default Value |
|---|---|---|---|
CLOPOS_CLIENT_ID |
Client ID given by Clopos (used only for auth) | - |
- |
CLOPOS_CLIENT_SECRET |
Client Secret given by Clopos (used only for auth) | - |
- |
CLOPOS_BRAND |
Brand that you want to request | x-brand |
- |
CLOPOS_VENUE_ID |
Venue/Branch id that you want to request | x-venue |
- |
Note that, these values MIGHT be unset. In this case, you should send it in header of each request. Let's say you want to request menu categories of two venues separately:
# CLOPOS_CLIENT_ID, CLOPOS_CLIENT_SECRET and CLOPOS_BRAND have been set as env variables
from integrify.clopos.client import CloposClient
venue1_id=1
venue2_id=2
token1 = CloposClient.auth(venue_id=venue1_id).body.token
categories1 = CloposClient.get_categories(headers={'x-token': token1, 'x-venue': venue1_id}).body.data
token2 = CloposClient.auth(venue_id=venue2_id).body.token
categories2 = CloposClient.get_categories(headers={'x-token': token1, 'x-venue': venue2_id}).body.data
If you want to fetch categories from different brand, just manually add x-brand to the header.
For auth, instead of headers, you will just send these as params.
# No env was set
from integrify.clopos.client import CloposClient
client_id='eNUKI04aYJRU6TBhh5bwUrvmEORgQoxM'
client_secret='dqYkWUpDjzvKOgbP3ar8tSNKJbwMyYe1V5R7DHClfSNYkap5C5XxRA6PmzoPv1I2'
brand='openapitest'
venue_id='1'
token = CloposClient.auth(client_id=client_id, client_secret=client_secret, brand=brand, venue_id=venue_id).body.token
List of requests
| Request function | Purpose | Clopos API |
|---|---|---|
auth |
Authenticate, get token | /open-api/auth |
get_venues |
Get list of venues/branches | /open-api/venues |
get_users |
Get list of users | /open-api/users |
get_user_by_id |
Get user by id | /open-api/users/{id} |
get_customers |
Get list of customers | /open-api/customers |
get_customer_by_id |
Get customer by id | /open-api/customers/{id} |
get_customer_groups |
Get list of customer groups | /open-api/customer-group |
get_categories |
Get list of menu categories | /open-api/categories |
get_category_by_id |
Get menu category by id | /open-api/categories/{id} |
get_stations |
Get list of stations | /open-api/stations |
get_station_by_id |
Get station by id | /open-api/stations/{id} |
get_products |
Get list of products | /open-api/products |
get_product_by_id |
Get product by id | /open-api/products/{id} |
get_sale_types |
Get list of sale types | /open-api/sale-types |
get_payment_methods |
Get list of payment methods | /open-api/payment-methods |
get_orders |
Get list of orders | /open-api/orders |
get_order_by_id |
Get order by id | /open-api/orders/{id} |
create_order |
Create new order | /open-api/orders |
get_receipts |
Get list of receipts | /open-api/receipts |
get_receipt_by_id |
Get receipt by id | /open-api/receipts/{id} |
create_receipt |
Create a new receipt | /open-api/receipts |
delete_receipt |
Delete a receipt | /open-api/receipts/{id} |
Note that, each request should have parameter headers={'x-token': token}. For example:
# CLOPOS_CLIENT_ID, CLOPOS_CLIENT_SECRET, CLOPOS_BRAND and CLOPOS_VENUE_ID have been set as env variables
from integrify.clopos.client import CloposClient
token = CloposClient.auth().body.token
user = CloposClient.get_user_by_id(id=1, headers={'x-token': token}).body.data
[!Caution] Integrify is unofficial library, even though it is based on official documentation.
Other supported integrations
| Servis | Əsas sorğular | Bütün sorğular | Dokumentləşdirilmə | Real mühitdə test | Əsas developer |
|---|---|---|---|---|---|
| EPoint | ✅ | Tam | ✅ | Miradil Zeynallı | |
| KapitalBank | ✅ | ✅ | Tam | ✅ | Zaman Kazımov |
| LSIM | ✅ | ✅ | Tam | ✅ | Miradil Zeynallı |
| Posta Guvercini | ✅ | ✅ | Tam | ✅ | Zaman Kazımov |
| Azericard | ✅ | Tam | Miradil Zeynallı | ||
| Clopos | ✅ | ✅ | Full | Miradil Zeynallı | |
| Payriff | Vahid Həsənzadə |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file integrify_clopos-0.0.1.tar.gz.
File metadata
- Download URL: integrify_clopos-0.0.1.tar.gz
- Upload date:
- Size: 37.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
884088b9af5ece750650c181fab039935da9ef4183f6eca1567ab2769fd936f9
|
|
| MD5 |
929d1da955518220a4a9ee6126b18e38
|
|
| BLAKE2b-256 |
fa9102e49f71995c16f6242f111c742cd29209b567437d100ba2f1710cd91cab
|
Provenance
The following attestation bundles were made for integrify_clopos-0.0.1.tar.gz:
Publisher:
publish.yml on Integrify-SDK/integrify-clopos-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
integrify_clopos-0.0.1.tar.gz -
Subject digest:
884088b9af5ece750650c181fab039935da9ef4183f6eca1567ab2769fd936f9 - Sigstore transparency entry: 737956396
- Sigstore integration time:
-
Permalink:
Integrify-SDK/integrify-clopos-python@c1f70b259d12612f7ae4b427426f52e8887db23b -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/Integrify-SDK
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c1f70b259d12612f7ae4b427426f52e8887db23b -
Trigger Event:
release
-
Statement type:
File details
Details for the file integrify_clopos-0.0.1-py3-none-any.whl.
File metadata
- Download URL: integrify_clopos-0.0.1-py3-none-any.whl
- Upload date:
- Size: 47.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
28be9ecb90c3518725307d3480977d0e8ef4a87b23413666398cdebf97b4917b
|
|
| MD5 |
bf2e6e756a72bcded93afe9da7e8aa21
|
|
| BLAKE2b-256 |
d6a26960eda69c521e5fc5345b12ccc0ba53f579e00ba82ff7f5de5202a10c9f
|
Provenance
The following attestation bundles were made for integrify_clopos-0.0.1-py3-none-any.whl:
Publisher:
publish.yml on Integrify-SDK/integrify-clopos-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
integrify_clopos-0.0.1-py3-none-any.whl -
Subject digest:
28be9ecb90c3518725307d3480977d0e8ef4a87b23413666398cdebf97b4917b - Sigstore transparency entry: 737956398
- Sigstore integration time:
-
Permalink:
Integrify-SDK/integrify-clopos-python@c1f70b259d12612f7ae4b427426f52e8887db23b -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/Integrify-SDK
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c1f70b259d12612f7ae4b427426f52e8887db23b -
Trigger Event:
release
-
Statement type: