Contra - A professional network for the jobs and skills of the futurePython API Sync Engine Built a Python-based API integration and product synchronization engine th...
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started
Python API Sync Engine Built a Python-based API integration and product synchronization engine that connects a supplier API with a store API and automatically detects and applies product changes.
The system validates incoming product data, matches products by SKU, detects new, updated and discontinued products, generates synchronization actions, executes API requests, handles partial failures and records synchronization activity through logs.
What it does
Detects new products
Detects price and stock changes
Detects discontinued products
Creates new products through the destination API
Updates existing products
Marks discontinued products as out of stock
Continues processing when an individual action fails
Records synchronization results in logs
Architecture
Supplier API ↓ API Client ↓ Product Validation ↓ Change Detection ↓ Action Generation ↓ Action Execution ↓ Store API ↓ Logs
Example
ABC123 Price: 20.00 → 25.50 Stock: 3 → 10
→ UPDATE_PRODUCT
XYZ456
Not present in store
→ CREATE_PRODUCT
OLD789
Not present in supplier
→ MARK_OUT_OF_STOCK
Error handling
Each synchronization action is processed independently.
A controlled API failure was introduced during testing to verify that one failed operation would not stop the remaining synchronization actions.
Result:
CREATE_PRODUCT XYZ456 → OK UPDATE_PRODUCT ABC123 → OK MARK_OUT_OF_STOCK OLD789 → ERROR
Successful: 2 Failed: 1
Technologies
Python FastAPI HTTPX Pydantic
This project was built as an independent technical project to demonstrate API integration, data synchronization, automation, validation and error handling.
Post image
Back to feed
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started