food402
Order food from TGO Yemek (Trendyol GO), Turkey's leading food delivery service. Use when user wants to order food delivery in Turkey, browse restaurants, search for foods, manage delivery addresses, check order history, or checkout with 3D Secure payment.
What this skill does
# Food402 - TGO Yemek Food Delivery
Order food from Trendyol GO (TGO Yemek), Turkey's leading food delivery service. This skill enables complete food ordering: browse restaurants, view menus, customize items, manage cart, and checkout with 3D Secure payment.
## Setup
### OpenClaw
Add the following to your `~/.openclaw/openclaw.json`:
```json
{
"skills": {
"entries": {
"food402": {
"enabled": true,
"env": {
"TGO_EMAIL": "[email protected]",
"TGO_PASSWORD": "your-tgo-password",
"GOOGLE_PLACES_API_KEY": "your-google-api-key"
}
}
}
}
}
```
### Claude Code / Cursor / Codex / Gemini CLI
Set environment variables in your shell profile (`~/.bashrc`, `~/.zshrc`, etc.):
```bash
export TGO_EMAIL="[email protected]"
export TGO_PASSWORD="your-tgo-password"
export GOOGLE_PLACES_API_KEY="your-google-api-key" # Optional: for Google Reviews
```
Then reload your shell or run `source ~/.zshrc` (or equivalent).
## Authentication
The skill automatically handles authentication. When making API calls:
1. Run `{baseDir}/scripts/auth.sh get-token` to get a valid JWT
2. The script caches tokens in `/tmp/food402-token` with automatic refresh (60s buffer before expiry)
3. If any API call returns 401, clear the token with `{baseDir}/scripts/auth.sh clear-token` and retry
**Manual authentication check:**
```bash
{baseDir}/scripts/auth.sh check-token
```
## Required Workflow
**IMPORTANT:** You MUST follow this order:
1. **select_address** - REQUIRED first step (sets delivery location for cart)
2. **get_restaurants** or **search_restaurants** - Browse/search restaurants
3. **get_restaurant_menu** - View a restaurant's menu
4. **get_product_details** - Check customization options (if needed)
5. **add_to_basket** - Add items to cart
6. **checkout_ready** - Verify cart is ready for payment
7. **place_order** - Complete the order with 3D Secure
If `add_to_basket` fails, try `clear_basket` first then retry.
---
## Address Management Operations
### get_addresses
Get user's saved delivery addresses. Call this first to show available addresses.
```bash
TOKEN=$({baseDir}/scripts/auth.sh get-token)
curl -s "https://api.tgoapis.com/web-user-apimemberaddress-santral/addresses" \
-H "Authorization: Bearer $TOKEN" \
-H "x-correlationid: $(uuidgen)" \
-H "pid: $(uuidgen)" \
-H "sid: $(uuidgen)" | jq
```
**Response fields:** `id`, `addressName`, `addressLine`, `neighborhoodName`, `districtName`, `cityName`, `latitude`, `longitude`
### select_address
**MUST be called before browsing restaurants or adding to basket.** Sets the shipping address for the cart.
**Parameters:**
- `addressId` (required): Address ID from get_addresses
```bash
TOKEN=$({baseDir}/scripts/auth.sh get-token)
curl -s -X POST "https://api.tgoapis.com/web-checkout-apicheckout-santral/shipping" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-H "x-correlationid: $(uuidgen)" \
-H "pid: $(uuidgen)" \
-H "sid: $(uuidgen)" \
-d '{"shippingAddressId": {addressId}, "invoiceAddressId": {addressId}}'
```
### add_address
Add a new delivery address. Use get_cities → get_districts → get_neighborhoods to find location IDs first.
**Parameters:**
- `name` (required): First name
- `surname` (required): Last name
- `phone` (required): Phone without country code (e.g., "5356437070")
- `addressName` (required): Label (e.g., "Home", "Work")
- `addressLine` (required): Street address
- `cityId` (required): From get_cities
- `districtId` (required): From get_districts
- `neighborhoodId` (required): From get_neighborhoods
- `latitude` (required): Coordinate string
- `longitude` (required): Coordinate string
- `apartmentNumber`, `floor`, `doorNumber`, `addressDescription` (optional)
- `elevatorAvailable` (optional): boolean
```bash
TOKEN=$({baseDir}/scripts/auth.sh get-token)
curl -s -X POST "https://api.tgoapis.com/web-user-apimemberaddress-santral/addresses" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-H "x-correlationid: $(uuidgen)" \
-H "pid: $(uuidgen)" \
-H "sid: $(uuidgen)" \
-d '{
"name": "{name}",
"surname": "{surname}",
"phone": "{phone}",
"addressName": "{addressName}",
"addressLine": "{addressLine}",
"cityId": {cityId},
"districtId": {districtId},
"neighborhoodId": {neighborhoodId},
"latitude": "{latitude}",
"longitude": "{longitude}",
"countryCode": "TR",
"elevatorAvailable": false
}' | jq
```
**Note:** If response is 429, OTP verification is required. Direct user to add the address at tgoyemek.com instead.
### get_cities
Get list of all cities for address selection.
```bash
TOKEN=$({baseDir}/scripts/auth.sh get-token)
curl -s "https://api.tgoapis.com/web-user-apimemberaddress-santral/cities" \
-H "Authorization: Bearer $TOKEN" \
-H "x-correlationid: $(uuidgen)" \
-H "pid: $(uuidgen)" \
-H "sid: $(uuidgen)" | jq '.cities[] | {id, name}'
```
### get_districts
Get districts for a city.
**Parameters:**
- `cityId` (required): City ID from get_cities
```bash
TOKEN=$({baseDir}/scripts/auth.sh get-token)
curl -s "https://api.tgoapis.com/web-user-apimemberaddress-santral/cities/{cityId}/districts" \
-H "Authorization: Bearer $TOKEN" \
-H "x-correlationid: $(uuidgen)" \
-H "pid: $(uuidgen)" \
-H "sid: $(uuidgen)" | jq '.districts[] | {id, name}'
```
### get_neighborhoods
Get neighborhoods for a district.
**Parameters:**
- `districtId` (required): District ID from get_districts
```bash
TOKEN=$({baseDir}/scripts/auth.sh get-token)
curl -s "https://api.tgoapis.com/web-user-apimemberaddress-santral/districts/{districtId}/neighborhoods" \
-H "Authorization: Bearer $TOKEN" \
-H "x-correlationid: $(uuidgen)" \
-H "pid: $(uuidgen)" \
-H "sid: $(uuidgen)" | jq '.neighborhoods[] | {id, name}'
```
---
## Restaurant Discovery Operations
### get_restaurants
List restaurants near the selected address. **Requires select_address first.**
**Parameters:**
- `latitude` (required): From selected address
- `longitude` (required): From selected address
- `page` (optional): Page number, default 1
- `sortBy` (optional): `RECOMMENDED` (default), `RESTAURANT_SCORE`, or `RESTAURANT_DISTANCE`
- `minBasketPrice` (optional): Pass 400 to filter min order >= 400 TL
**Sorting keywords (Turkish & English):**
- "önerilen" / "recommended" / "popüler" → `RECOMMENDED`
- "en yakın" / "closest" / "yakınımdaki" → `RESTAURANT_DISTANCE`
- "en iyi" / "best rated" / "en yüksek puanlı" → `RESTAURANT_SCORE`
- "en ucuz" / "cheapest" → Use **search_restaurants** instead (returns product prices)
```bash
TOKEN=$({baseDir}/scripts/auth.sh get-token)
curl -s "https://api.tgoapis.com/web-discovery-apidiscovery-santral/restaurants/filters?openRestaurants=true&latitude={latitude}&longitude={longitude}&pageSize=50&page={page}" \
-H "Authorization: Bearer $TOKEN" \
-H "x-correlationid: $(uuidgen)" \
-H "pid: $(uuidgen)" \
-H "sid: $(uuidgen)" | jq
```
Add `&sortType=RESTAURANT_SCORE` or `&sortType=RESTAURANT_DISTANCE` for sorting (omit for RECOMMENDED).
**Response fields:** `id`, `name`, `kitchen`, `rating`, `ratingText`, `minBasketPrice`, `averageDeliveryInterval`, `distance`, `neighborhoodName`, `isClosed`, `campaignText`
### search_restaurants
Search restaurants and products by keyword. Results include product prices (useful for "cheapest" queries).
**IMPORTANT:** Always check `isClosed` field. Never suggest closed restaurants.
**Parameters:**
- `searchQuery` (required): Search keyword (e.g., "pizza", "burger", "dürüm")
- `latitude` (required): From selected address
- `longitude` (required): From selected address
- `page` (optional): Page number, default 1
```bash
TOKEN=$({baseDir}/scripts/auth.sh get-token)
curl -s "https://api.tgoapis.com/web-restaurant-apirestaurant-santral/restaurants/in/search?searchQuery={searchQuery}&latitude={latitude}&longitude={longitude}&pageSize=50&paRelated in Sales & CRM
process-mapper
IncludedUse when a BizOps lead, COO, or process-improvement owner needs to document an end-to-end business process (procurement, employee onboarding, incident handoff, customer-onboarding, claims adjudication) in BPMN-style notation, measure cycle times by stage, surface where work spends most of its time waiting vs. being worked, and quantify the gap between processing time and total elapsed time. Pairs Lean / Six Sigma / Theory-of-Constraints canon with deterministic stdlib-only Python tools to produce a process map, a ranked bottleneck list (with severity + root-cause hypothesis), and a cycle-time analysis (P50, P90, value-add ratio, Little's-Law throughput). Distinct from sales-pipeline, system-reliability (SLO), and strategic-OKR work — this is tactical process documentation for internal operations.
payment-integration
IncludedIntegrate payments with SePay (VietQR), Polar, Stripe, Paddle (MoR subscriptions), Creem.io (licensing). Checkout, webhooks, subscriptions, QR codes, multi-provider orders.
customer-success-manager
IncludedMonitors customer health, predicts churn risk, and identifies expansion opportunities using weighted scoring models for SaaS customer success
sales-engineer
IncludedAnalyzes RFP/RFI responses for coverage gaps, builds competitive feature comparison matrices, and plans proof-of-concept (POC) engagements for pre-sales engineering. Use when responding to RFPs, bids, or proposal requests; comparing product features against competitors; planning or scoring a customer POC or sales demo; preparing a technical proposal; or performing win/loss competitor analysis. Handles tasks described as 'RFP response', 'bid response', 'proposal response', 'competitor comparison', 'feature matrix', 'POC planning', 'sales demo prep', or 'pre-sales engineering'.
customer-success-manager
IncludedMonitors customer health, predicts churn risk, and identifies expansion opportunities using weighted scoring models for SaaS customer success
sales-engineer
IncludedAnalyzes RFP/RFI responses for coverage gaps, builds competitive feature comparison matrices, and plans proof-of-concept (POC) engagements for pre-sales engineering. Use when responding to RFPs, bids, or proposal requests; comparing product features against competitors; planning or scoring a customer POC or sales demo; preparing a technical proposal; or performing win/loss competitor analysis. Handles tasks described as 'RFP response', 'bid response', 'proposal response', 'competitor comparison', 'feature matrix', 'POC planning', 'sales demo prep', or 'pre-sales engineering'.