โ Jumbo API
๐ Comprehensive REST API and modern web dashboard for the Jumbo.com grocery platform.
Automates authentication via headless Chromium, manages your shopping basket, lists (lijstjes), order history, store receipts, and provides detailed product lookups by SKU or EAN barcode with OpenFoodFacts fallback .
โ ๐ Quick Start
docker compose up -d
Copy
โ โจ Features
โ ๐ Shopping Basket
View your current basket with full product details
Add/remove products by SKU
Update quantities
Real-time price calculations
Promo price support
โ ๐ Shopping Lists (Lijstjes)
Access all your shopping lists
View favorite lists and custom lists
See product images, prices, and details
Product count tracking
โ ๐ฆ Order Management
View online order history
Detailed order information with delivery dates
Item-level details with images and pricing
Track order status, substitutions, and unavailable items
Support for home delivery and store pickup orders
โ ๐งพ Store Receipts
View in-store and online receipt history
Detailed receipt breakdown with VAT summaries
Product matching and enrichment
Loyalty points tracking (Jumbo Extra's)
Payment method information
Store location details
โ ๐ Product Search & Lookup
Search products by SKU
Intelligent barcode lookup (EAN codes) with OpenFoodFacts fallback
EAN similarity matching algorithm - finds best product match when exact barcode not found
Searches up to 8 product candidates
Scores matches based on EAN prefix similarity (0-100)
Color-coded confidence indicators (green โฅ90%, yellow <90%)
Shows both scanned barcode and matched product EAN
If barcode not found in Jumbo, automatically queries OpenFoodFacts and searches by product name
Comprehensive product information:
Nutritional data & allergens
Multiple images (thumbnails & high-res)
Pricing with promotions
Brand, categories, descriptions
Availability & stock status
Manufacturer details & origin
Storage & preparation instructions
โ ๐ Authentication & Auto Re-login
Automated Selenium-based browser login
Cookie persistence across restarts
Auto re-authentication when sessions expire
Web-based credential management in Settings
Save credentials directly from the dashboard
Environment variable support for homelab deployments
โ ๐จ Modern Web Dashboard
Dark-themed, responsive UI
Real-time basket updates
Interactive product cards with images
Modal dialogs for detailed views
Toast notifications
Command history tracking
Comprehensive Settings page with credential management
โ โ๏ธ Product Matching Engine
Intelligent receipt product enrichment
Configurable confidence thresholds
Price, weight, and name matching
Caching for improved performance
Manual cache clearing
OpenFoodFacts integration for unknown barcodes
โ ๐ Documentation
โ Interactive API Explorer
Visit http://localhost:8000/docsโ for the full Swagger/OpenAPI documentation where you can:
Try all endpoints directly in your browser
See request/response schemas
Test authentication flows
No code required
โ Comprehensive API Reference
See API_README.mdโ for:
Complete endpoint documentation
Authentication guides
Code examples in Python, JavaScript, and cURL
Architecture overview
Troubleshooting tips
โ ๐ Authentication Setup
The API supports three methods for persistent authentication:
โ Option 1: Web Dashboard (Easiest)
Open http://localhost:8000โ
Go to Settings tab
Enter your credentials in the "Login Credentials" section
Click "Save Credentials"
Credentials are stored securely for auto re-authentication
โ Option 2: Environment Variables (Recommended for Homelab)
Set credentials via environment variables in Portainer or docker-compose:
โ Option 3: Manual Login
Login once via web dashboard:
Click "Login" button in header
Enter credentials
Credentials auto-save for future sessions
How it works:
Session cookies saved to /app/data/session-cookies.json
Credentials saved to /app/data/credentials.json (or use env vars)
Auto re-authentication triggers when cookies expire
Seamless operation without manual intervention
โ ๐ง Settings & Configuration
โ Web Dashboard Settings
Access the Settings panel to configure:
โ ๐ Login Credentials
Save/update your Jumbo.com credentials
View credential status
Remove saved credentials
โ ๐ฆ Barcode Lookup
OpenFoodFacts Fallback - automatically query OpenFoodFacts when barcode not found
EAN Similarity Matching - intelligent algorithm finds best match:
Checks up to 8 product candidates
Scores based on matching EAN prefix digits
10+ matching digits = 90 score (high confidence)
8+ matching digits = 70 score (medium confidence)
6+ matching digits = 50 score (low confidence)
Displays confidence score with color coding
Shows scanned vs matched EAN for transparency
โ ๐งพ Receipt Product Matching
Enable/disable product enrichment
Strict matching mode
Confidence threshold slider
โ ๐ฏ Matching Criteria
Price matching
Weight/volume matching
Name matching
โ ๐๏ธ Cache Management
Clear product match cache
โ ๐ Quick API Examples
โ Authentication
# Login
curl -X POST http://localhost:8000/api/login \
-H 'Content-Type: application/json' \
-d '{"username":"[email protected] ","password":"yourpassword"}'
# Check auth status
curl http://localhost:8000/api/auth/status
Copy
โ Basket Operations
# Get basket
curl http://localhost:8000/api/basket
# Add product
curl -X POST http://localhost:8000/api/basket/add \
-H 'Content-Type: application/json' \
-d '{"sku":"67649PAK","quantity":2}'
# Update quantity
curl -X PATCH http://localhost:8000/api/basket/items/{line_id} \
-H 'Content-Type: application/json' \
-d '{"quantity":5}'
# Remove product
curl -X POST http://localhost:8000/api/basket/remove \
-H 'Content-Type: application/json' \
-d '{"line_id":"abc123"}'
Copy
โ Shopping Lists
# Get all lists
curl http://localhost:8000/api/lists
# Get specific list details
curl http://localhost:8000/api/lists/{list_id}
Copy
โ Orders & Receipts
# Get orders and receipts
curl "http://localhost:8000/api/orders?limit=10&page=0"
# Get order details
curl http://localhost:8000/api/orders/{order_id}
# Get receipt details
curl http://localhost:8000/api/receipts/{transaction_id}
Copy
โ Product Search & Barcode Lookup
# Search by SKU
curl "http://localhost:8000/api/products/search?sku=67649PAK"
# Barcode lookup (with OpenFoodFacts fallback and EAN matching)
curl -X POST http://localhost:8000/api/products/barcode \
-H 'Content-Type: application/json' \
-d '{"barcode":"8718452829408"}'
# Response includes EAN matching details:
# {
# "sku": "629680PAK",
# "title": "Jumbo Cola Regular 6 x 1,5 L",
# "ean": "8718452829583",
# "scannedBarcode": "8718452829408",
# "eanMatchScore": 90,
# "verified": true,
# "matchSource": "OpenFoodFacts",
# "matchedName": "Cola"
# }
Copy
โ Settings Management
# Get all settings
curl http://localhost:8000/api/settings
# Update settings
curl -X PUT http://localhost:8000/api/settings \
-H 'Content-Type: application/json' \
-d '{"useOpenFoodFactsFallback":true,"confidenceThreshold":50}'
# Save credentials
curl -X PUT http://localhost:8000/api/settings/credentials \
-H 'Content-Type: application/json' \
-d '{"username":"[email protected] ","password":"yourpassword"}'
# Remove credentials
curl -X PUT http://localhost:8000/api/settings/credentials \
-H 'Content-Type: application/json' \
-d '{"removeCredentials":true}'
# Clear match cache
curl -X POST http://localhost:8000/api/settings/clear-cache
Copy
For more examples, see API_README.mdโ
โ ๐๏ธ Project Structure
app/
main.py # FastAPI application & REST endpoints
jumbo_client.py # Jumbo GraphQL client + Selenium auth + OpenFoodFacts
templates/
index.html # Web dashboard with settings management
static/
app.js # Frontend JavaScript
style.css # Responsive dark theme
Dockerfile
requirements.txt
data/ # Persistent data volume
session-cookies.json # Saved session cookies
credentials.json # Encrypted credentials (optional)
barcode-cache.json # Product barcode cache
settings.json # User preferences
docker-compose.yml
API_README.md # Complete API documentation
Copy
โ ๐ณ Docker Deployment
โ Using Docker Compose (Recommended)
docker-compose up -d
Copy
โ Using Docker Run
docker run -d \
--name jumbo-api \
-p 8000:8000 \
-v jumbo-data:/app/data \
-e [email protected] \
-e JUMBO_PASSWORD=yourpassword \
vghoost360/jumbo:latest
Copy
โ Pull Latest Version
docker pull vghoost360/jumbo:latest
# or specific version
docker pull vghoost360/jumbo:v2.6.0
Copy
โ Volume Mounting
The container uses a persistent volume at /app/data for:
Session cookies
Credentials (encrypted)
Product match cache
Barcode lookup cache
User settings
Important: Mount this volume to preserve authentication between container restarts.
โ ๐ ๏ธ Tech Stack
Backend: Python 3.11, FastAPI, Uvicorn
Authentication: Selenium (headless Chromium)
HTTP Client: httpx (async)
External API: OpenFoodFacts API integration
Frontend: Vanilla JavaScript, CSS Grid/Flexbox
Container: Docker (python:3.11-slim + Chromium)
โ ๐ง Configuration
โ Environment Variables
Variable Description Default JUMBO_USERNAMEYour Jumbo.com email None JUMBO_PASSWORDYour Jumbo.com password None TZTimezone Europe/Amsterdam
โ Settings API
Configure behavior via /api/settings or the web dashboard:
productMatchingEnabled - Enable/disable receipt enrichment
strictMatching - Require higher confidence for matches
confidenceThreshold - Minimum confidence percentage (0-100)
usePriceMatching - Include price in matching algorithm
useWeightMatching - Include weight in matching algorithm
useNameMatching - Include name similarity in matching
useOpenFoodFactsFallback - Query OpenFoodFacts when barcode not found
โ ๐ Health Check
curl http://localhost:8000/api/health
Copy
Response:
{
"status": "healthy",
"timestamp": "2026-02-22T17:43:00Z",
"authenticated": true
}
Copy
โ ๐ Changelog
โ v2.6.0 (2026-02-22)
New Features:
๐ OpenFoodFacts Integration - Automatic fallback when barcode not found in Jumbo
Queries OpenFoodFacts API for product name
Searches Jumbo catalog with matched name
Configurable via settings toggle
๐ฏ EAN Similarity Matching Algorithm - Intelligent product matching system
Checks up to 8 product candidates for best EAN match
Scores based on matching EAN prefix digits (0-100)
Pattern matching: 8718452829xxx = 10 matching digits = 90 score
Returns both scanned barcode and matched product EAN
Color-coded confidence indicators in UI (green/yellow/red)
Warnings for low confidence matches (<90%)
๐ Credential Management UI - Save/update credentials directly from Settings page
Visual credential status indicator
Secure credential storage
Remove credentials option
Bug Fixes:
๐ Fixed critical JavaScript syntax errors preventing button clicks
๐ง Added missing hasProduct variable definition
๐จ Fixed malformed template literals in receipt rendering
โ
Resolved 89+ linting errors
๐ Fixed SKU preservation in EAN matching results
Improvements:
๐ Enhanced settings page with credential management
๐ฏ Better barcode lookup with intelligent EAN matching
๐ Transparent confidence scoring system
๐จ Fixed Settings page CSS (input field overlap)
๐งน Code cleanup and validation
๐ Comprehensive documentation updates
โ v2.5.1
Receipt product enrichment
Order detail views
Shopping list support
Product matching engine
โ ๐ Security Notes
Credentials are stored in Docker volumes (not in image)
.dockerignore excludes personal data from builds
Session cookies managed securely
No credentials in logs or version control
Use environment variables for production deployments
OpenFoodFacts queries use anonymous API access
โ ๐ค Contributing
This project is for educational purposes. Contributions welcome!
โ ๐ License
Educational use only. Jumbo.com's and OpenFoodFacts' Terms of Service apply to API usage.
โ ๐ Troubleshooting
โ Buttons Not Working
Hard refresh browser (Ctrl+Shift+R)
Check browser console for JavaScript errors
Verify container is running: docker ps
โ Barcode Not Found
Enable "OpenFoodFacts Fallback" in Settings
Check if product exists on OpenFoodFacts.org
Try searching by product name instead
โ Authentication Issues
Use Settings page to save credentials
Check credentials are correct
Verify cookies in /app/data/session-cookies.json
Check logs: docker logs jumbo-api
โ Container Won't Start
Check port 8000 is available
Verify Docker has enough resources
Check logs for error messages
For more help, see API_README.mdโ