Python services for convenient work with iiko Transport
Project description
pyiikocloudapi - python iikoCloud API сервис
Установка
Пользуем pip:
pip install pyiikocloudapi
###Зависимости
requests
pydantic
Как использовать
Все названия методов соответствуют названию в ссылке (смотрите документацию iiko Transport).
Пример названия метода:
- /api/1/auth/ -
access_token
- /api/1/order/create -
order_create
Если вам нужно чтобы ответ был в dict то либо
api = IikoTransport(api_login, return_dict=True)
# Либо
api.return_dict = True
Example
from pyiikocloudapi import IikoTransport
from pyiikocloudapi.models import CouriersModel
# инициализация класса
api = IikoTransport(api_login)
# получаем организации получить из можно api.organizations_ids: dict or api.organizations_ids_models: OrganizationsModel
api.organizations()
# получаю список курьеров организации
couriers: CouriersModel = api.couriers(api.organizations_ids)
Каждый метод проверяет время жизни маркера доступа, если время жизни маркера прошло то будет автоматически запрошен заново.
Время жизни маркера доступа равно ~60 минутам.
###Доп. инфа iiko Transport(iiko Cloud API) по словам разработчиков это по сути горячие хранилище без доступа к данным БД
sourceKey
это "Источник заказа" из настроек в iikoWeb
Реализованные методы iiko Transport(iiko Cloud API)
- Authorization
- Notifications
- Organizations
- Terminal groups
- Dictionaries
- Menu
- Operations
- Deliveries: Create and update
- Create delivery.
- Update order problem.
- Update delivery status.
- Update order courier.
- Add order items.
- Close order.
- Cancel delivery order.
- Change time when client wants the order to be delivered.
- Change order's delivery point information.
- Change order's delivery type.
- Change order's payments.
- Change delivery comment.
- Print delivery bill.
- Confirm delivery.
- Cancel delivery confirmation.
- Assign/change the order operator.
- WebHook notification about delivery order update. Webhook ???
- WebHook notification about delivery order saving error. Webhook ???
- Deliveries: Retrieve
- Addresses
- Delivery restrictions
- Employees
- Method of obtaining drivers' coordinates history.
- Returns list of all employees which are delivery drivers in specified restaurants.
- Returns list of all employees which are delivery drivers in specified restaurants, and checks whether each employee has passed role.
- Returns list of all active (courier session is opened) courier's locations which are delivery drivers in specified restaurant and are clocked in on specified delivery terminal.
- Returns list of all active (courier session is opened) courier's locations which are delivery drivers in specified restaurants.
- Returns employee info.
- wMarketing sources
- Drafts
- Orders
- Banquets/reserves
- Returns all organizations of current account (determined by Authorization request header) for which banquet/reserve booking are available.
- Returns all terminal groups of specified organizations, for which banquet/reserve booking are available.
- Returns all restaurant sections of specified terminal groups, for which banquet/reserve booking are available.
- Returns all banquets/reserves for passed restaurant sections.
- Create banquet/reserve.
- Retrieve banquets/reserves statuses by IDs.
- WebHook notification about reserve update. Webhook ???
- WebHook notification about reserve saving error. Webhook ???
- Discounts and promotions
- Calculate discounts and other loyalty items for an order.
- Get all organization's manual conditions.
- Get all loyalty programs for organization.
- Get information about the specified coupon.
- Get a list of coupon series in which there are not deleted and not activated coupons.
- Get list of non-activated coupons.
- Customers
- Get customer info by specified criterion.
- Create or update customer info by id or phone or card track.
- Add new customer for program.
- Add new card for customer.
- Delete existing card for customer.
- Hold customer's money in loyalty program. Payment will be process on POS during processing of an order.
- Refill customer balance.
- Withdraw customer balance.
- ....
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
File details
Details for the file pyiikocloudapi-0.0.20.tar.gz
.
File metadata
- Download URL: pyiikocloudapi-0.0.20.tar.gz
- Upload date:
- Size: 27.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57b9333faead04b976b63966f4aaa38c9f787d7c36997323363500f738c06c7d |
|
MD5 | 7d45348ea5dc3af4d4a9bda5ad1d1f85 |
|
BLAKE2b-256 | ce7c765357b47f02beb4f62521b659929e56d4c47c02f185e00cd01bfd2e57c4 |