A 12-item burger chain in Eskisehir Tepebasi kept hearing the same complaint every Friday night: smashburger was 89TL on Yemeksepeti and 75TL on the dine-in menu. Customers spotted the gap, felt cheated, left a 3-star review. The fix: a one-way sync to the marketplace API, four times daily, plus a sold-out webhook.
Why Dual-Price Is Not Optional
Yemeksepeti takes 23% commission plus VAT per delivery order. List the dine-in price and your margin evaporates. The Tepebasi answer: 85TL dine-in, 95TL delivery. Customers ordering from home pay the premium for convenience; those scanning the QR inside see the lower master price.
Single source of truth: thMenu admin keeps both price_dine_in and price_delivery as separate columns. The marketplace adapter only ever reads delivery_price and POSTs it upstream.
The POST /restaurant/{id}/products Call
Marketplace auth is OAuth 2.0 client_credentials, returning a one-hour bearer token cached in Cloudflare KV with a 55-minute TTL. The sync worker fires at 06:00, 11:30, 17:00, 22:00 local time — breakfast, lunch, dinner, late-night.
- Payload: single bulk POST with 12 products in
products[]: name, price, available, photo_url, allergens. - Idempotency: SHA-256 of the payload; identical hash skips the call (quota saved).
- Rate limit: Yemeksepeti allows 60 req/min; bulk-only keeps us well below.
Sold-Out Webhook Propagation
Smashburger runs out: KDS staff taps "sold out" → D1 sets stock_count = 0 and emits a queue event. The adapter worker catches it and PATCHes /products/{sku} { available: false }. End-to-end latency: 3-7 seconds.
When stock returns, the same path runs in reverse. Result: in Q1 2026, the Tepebasi store recorded zero refunds for "courier arrived for an out-of-stock item" — a $400/month line item gone.
FAQ
How long does Marketplace API access take? Yemeksepeti typically grants sandbox access within 5-10 business days; production requires an active restaurant contract.
Is dual pricing legal? Yes — the Turkish Competition Authority accepts marketplace commission as cost; pricing is at the restaurant's discretion. Gaps above 20% can trigger customer complaints.
Will the same pattern work for Getir or Trendyol Yemek? Yes. Maintain a per-platform SKU map and token cache; one adapter architecture feeds three marketplaces in parallel.
Found this helpful? Share it.
Related articles
The Complete Guide to Running a Multilingual Restaurant Menu
Serving international guests? Learn how to set up a menu that automatically spea…
What Is a QR Code Menu? The Complete Guide for Restaurants
A QR code menu lets customers access your full restaurant menu instantly on thei…
Understanding Your Restaurant's Data: A Practical Analytics Guide
Your menu generates data every day. Learn how to read it, act on it, and use it …