ozon-seller
A library that implements a client for Ozon Seller API.
Features
- common features:
- use dataclasses for all the request and responses
- support for automatic JSON serialization and parsing for all the request and responses, respectively
- implement iterators for the endpoints with pagination
- powerful error handling — for each error is available:
- HTTP status
- Ozon Seller API error code and message
- implemented endpoints:
- Uploading and updating products:
- Upload and update product images:
- endpoint:
POST /v1/product/pictures/import - module: ozon_seller.product_pictures_import
- endpoint:
- Get a description of the product characteristics:
- endpoint:
POST /v4/product/info/attributes - module: ozon_seller.product_info_attributes
- endpoint:
- Get product description:
- endpoint:
POST /v1/product/info/description - module: ozon_seller.product_description
- endpoint:
- Upload and update product images:
- Prices and Stocks:
- Update the quantity of products in stock:
- endpoint:
POST /v2/products/stocks - modules:
- endpoint:
- Information about product quantity:
- endpoint:
POST /v4/product/info/stocks - module: ozon_seller.stocks
- endpoint:
- Update prices:
- endpoint:
POST /v1/product/import/prices - module: ozon_seller.product_import_prices
- endpoint:
- Update the quantity of products in stock:
- Promotions:
- Available promotions:
- endpoint:
GET /v1/actions - module: ozon_seller.actions
- endpoint:
- Products that can participate in a promotion:
- endpoint:
POST /v1/actions/candidates - module: ozon_seller.actions_candidates
- endpoint:
- Products in a promotion:
- endpoint:
POST /v1/actions/products - module: ozon_seller.actions_products
- endpoint:
- Available promotions:
- FBS and rFBS orders processing:
- Shipments list (version 3):
- endpoint:
POST /v3/posting/fbs/list - module: ozon_seller.posting_fbs_list
- endpoint:
- Get shipment details by identifier (version 3):
- endpoint:
POST /v3/posting/fbs/get - module: ozon_seller.posting_fbs_get
- endpoint:
- List of manufacturing countries:
- endpoint:
POST /v2/posting/fbs/product/country/list - module: ozon_seller.posting_fbs_product_country_list
- endpoint:
- Set the manufacturing country:
- endpoint:
POST /v2/posting/fbs/product/country/set - module: ozon_seller.posting_fbs_product_country_set
- endpoint:
- Print the labeling:
- endpoint:
POST /v2/posting/fbs/package-label - module: ozon_seller.posting_fbs_package_label
- endpoint:
- Shipments list (version 3):
- FBO:
- Shipments list:
- endpoint:
POST /v2/posting/fbo/list - module: ozon_seller.posting_fbo_list
- endpoint:
- Shipments list:
- FBS delivery:
- Create an acceptance and transfer certificate and a waybill:
- endpoint:
POST /v2/posting/fbs/act/create - module: ozon_seller.posting_fbs_act_create
- endpoint:
- List of shipments in the certificate:
- endpoint:
POST /v2/posting/fbs/act/get-postings - module: ozon_seller.fbs_act_get_postings
- endpoint:
- Barcode for product shipment:
- endpoint:
POST /v2/posting/fbs/act/get-barcode - module: ozon_seller.posting_fbs_act_get_barcode
- endpoint:
- Status of acceptance and transfer certificate and waybill:
- endpoint:
POST /v2/posting/fbs/act/check-status - module: ozon_seller.posting_fbs_act_check_status
- endpoint:
- Create an acceptance and transfer certificate and a waybill:
- Chats with customers:
- Send message:
- endpoint:
POST /v1/chat/send/message - module: ozon_seller.chat_send_message
- endpoint:
- Create a new chat:
- endpoint:
POST /v1/chat/start - module: ozon_seller.chat_start
- endpoint:
- Send message:
- outdated endpoints:
- ???:
- endpoint:
POST /v2/product/info - module: ozon_seller.product_info
- endpoint:
- ???:
- endpoint:
POST /v2/returns/company/fbo - module: ozon_seller.returns_fbo
- endpoint:
- ???:
- endpoint:
POST /v2/returns/company/fbs - module: ozon_seller.returns_fbs
- endpoint:
- ???:
- endpoint:
POST /v3/posting/fbs/ship - module: ozon_seller.posting_fbs_ship_gtd
- endpoint:
- ???:
- Uploading and updating products:
Installation
From PyPI
Install the library from PyPI:
$ python3 -m pip install ozon-seller
From source
Clone this repository:
$ git clone https://github.com/irenicaa/ozon-seller
$ cd ozon-seller
Then install the library:
$ make install
Examples
Information about product quantity:
import sys
import os
import os.path
import logging
# requires: python3 -m pip install "python-dotenv >= 0.7.1, < 1.0.0"
import dotenv
from ozon_seller.common import credentials, http_error
from ozon_seller import stocks
def _run_request(credentials: credentials.Credentials, logger: logging.Logger) -> None:
data = stocks.PaginatedProductFilter(
filter=stocks.ProductFilter(
visibility="VISIBLE",
),
cursor="",
limit=1000,
)
logger.info("request payload: %s", data.to_json())
for item in stocks.get_product_info_stocks_iterative(credentials, data):
logger.info("stock item: %r", item)
if __name__ == "__main__":
logging.basicConfig(format="%(asctime)s [%(levelname)s] %(message)s", level=logging.INFO)
dotenv.load_dotenv()
logger = logging.getLogger(__name__)
try:
request_credentials = credentials.Credentials(
os.getenv("OZON_CLIENT_ID", ""),
os.getenv("OZON_API_KEY", ""),
)
_run_request(request_credentials, logger)
except http_error.HTTPError as error:
logger.error("HTTP error occurred: status = %d; message = %r", error.status, error.message)
logger.error("HTTP error occurred: response data = %r", error.response_data)
License
The MIT License (MIT)
Copyright © 2025 irenica
Metadata
Release files for ozon-seller 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ozon_seller-1.0.0.tar.gz | 44.9 kB | Without provenance | Details for ozon_seller-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ozon_seller-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for ozon_seller-1.0.0-py3-none-any.whl |
Total release size: 105.7 kB
Release files / ozon_seller-1.0.0.tar.gz
| Download URL | ozon_seller-1.0.0.tar.gz |
|---|---|
| Size | 44.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ccbba4cab3956ab5ebf667236e31558b4f3a61ac28b31a21b313edd0c37e746b
|
|
BLAKE2b-256 checksum How to use checksums |
44da6e9cf887abea291ae835aba6a46e48f53f4ce203dec5b34a58bf35606aaa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Release files / ozon_seller-1.0.0-py3-none-any.whl
| Download URL | ozon_seller-1.0.0-py3-none-any.whl |
|---|---|
| Size | 60.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d4bd5bbac904c61a8f177951e6c300cf9135831ea32ae0e36e005c729da2b1c2
|
|
BLAKE2b-256 checksum How to use checksums |
024b1a29e594fd1c06f4ff7ad10d597179407a97c67d6b778a479389d768f3d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Security for ozon-seller 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.