Case study
A delivery-services API aggregator
A single API over a dozen courier services: cost calculation, order creation and real-time tracking.
- Year
- 2024
- Client
- Logistics startup
- Role
- Senior Backend Developer
Description
The delivery aggregator unites more than ten courier services under a single REST API, hiding the differences in their formats, authentication and behavior behind a stable contract. Online stores integrate once and gain access to all carriers: calculating cost and delivery times, creating and canceling orders, printing waybills and tracking statuses in real time. I designed a failure-resilient integration architecture where each external provider is wrapped in an adapter with timeouts, retries and a circuit breaker, so that the unavailability of one service does not affect the others. Delivery statuses are collected both through provider webhooks and through periodic polling, normalized into a single model and relayed to clients. Caching tariffs in Redis and thought-out PostgreSQL indexes ensure a fast response when calculating cost even at a high request rate.
Task
Each integration with a courier service required separate development and maintenance, formats and statuses differed, and a failure of one provider brought down order placement entirely. Customers complained about slow cost calculation.
Solution
I designed a single REST API contract and an adapter layer with failure isolation via a circuit breaker, normalized delivery statuses, added tariff caching in Redis and asynchronous webhook processing in queues.
Results
Onboarding a new store dropped from two weeks to one day, cost calculation became 8 times faster thanks to the cache, the failure of an individual service stopped affecting order placement, and over 2 million orders were processed in the first year.