Skip to Content

CDEK API

November 23, 2025 by
CDEK API
XXP, Mikhail Lapin


CDEK API

Not just another fancy tech buzzword.If you've ever tried integrating with an API, you know the feeling: mysterious documentation, incomplete examples, and API responses that seem to have a mind of their own.

But then CDEK enters the picture — and pleasantly surprises us. Their API is well-designed, logically structured, and thoroughly documented. Honestly, the documentation team deserves a round of applause.

To make working with the API even easier, we developed CDEK Python SDK v2.0 — a library that makes integration feel almost like (dare we say it) vibe coding. Yes, really. No tears, no headaches. Everything you need is already there.


CDEK Python SDK v2.0

A modern Python library for the CDEK API 2.0, featuring a convenient object-oriented interface. Why v2.0? Well, not everything goes exactly as planned on the first attempt. Even for us.

The SDK covers pretty much everything a developer needs:

  • Calculate shipping rates
  • Estimate delivery times
  • Access reference data (cities, pickup points, regions)
  • Create and track shipping orders
  • Generate shipping labels and barcodes in PDF format
  • Handle status updates via webhooks
  • Schedule courier pickups
  • And do all of this without unnecessary headaches

In short, it's a ready-to-use toolkit for integrating CDEK shipping services into virtually any Python framework.


Quick Start

Installation takes just one command:

pip install cdek

Here's a simple example. Just a few lines of code, and you're already calculating shipping rates:

from cdek import CdekClient from cdek.apps.tariff.requests import TariffCodeRequest client = CdekClient("TEST") request = TariffCodeRequest.init(tariff_code=136) request.set_city_codes(from_location=44, to_location=137) request.set_package_weight(weight=1_000) tariff = client.tariff.calc(request) print(f"Стоимость: {tariff.delivery_sum} {tariff.currency}") print(f"Срок: {tariff.period_min}–{tariff.period_max} дней")

Pydantic handles data validation, authentication tokens are cached automatically, and API errors are handled for you.

In other words, you can focus on building your integration instead of fighting with the API.​


Join the Testing!

We'd love to have you on board!
We especially welcome testers who have a talent for breaking things that supposedly cannot be broken.

Try the SDK, experiment with different scenarios, and let us know what works — and, more importantly, what doesn't.

Your feedback helps us make the library more reliable for everyone.​


A Special Shout-Out to Contributors

The project is completely open source, so everyone is welcome to contribute.

  • Want to improve the code? Jump in!
  • Have a great idea? Open a PR!
  • Love writing documentation? You're our hero!
  • Fixed a bug? We already love you!

    Every contribution counts, whether it's a major feature, a small improvement, or a typo fix.


Requirements

  • Python 3.10+
  • pydantic 2.6–3.0
  • requests 2.28.0+


Documentation & Downloads


What's Next? CDEK Integration for Odoo!

We're preparing to release Delivery Carrier CDEK for Odoo 16.0, a module that will:

  • Calculate shipping rates directly in Sales Orders
  • Create and cancel CDEK shipping orders
  • Support CDEK's test environment
  • Work with Odoo's standard delivery carrier functionality​

And the best part? It will be completely free and open source, available in our GitHub repository. But that's not all.

We've already developed a module that integrates the CDEK Map Widget with Odoo 16.0.This integration allows users to:
Populate partner addresses using CDEK's address database Select and store preferred CDEK pickup points (PUDO) for partners Simplify address management with CDEK's reference data

Looking further ahead, we're planning to migrate these integrations to newer Odoo versions and introduce support for CDEK PAY.

Stay tuned for updates — there's more to come!