food402Order 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.
Install via ClawdBot CLI:
clawdbot install rersozlu/food402Order 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.
Add the following to your ~/.openclaw/openclaw.json:
{
"skills": {
"entries": {
"food402": {
"enabled": true,
"env": {
"TGO_EMAIL": "your-tgo-email@example.com",
"TGO_PASSWORD": "your-tgo-password",
"GOOGLE_PLACES_API_KEY": "your-google-api-key"
}
}
}
}
}
Set environment variables in your shell profile (~/.bashrc, ~/.zshrc, etc.):
export TGO_EMAIL="your-tgo-email@example.com"
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).
The skill automatically handles authentication. When making API calls:
{baseDir}/scripts/auth.sh get-token to get a valid JWT/tmp/food402-token with automatic refresh (60s buffer before expiry){baseDir}/scripts/auth.sh clear-token and retryManual authentication check:
{baseDir}/scripts/auth.sh check-token
IMPORTANT: You MUST follow this order:
If add_to_basket fails, try clear_basket first then retry.
Get user's saved delivery addresses. Call this first to show available addresses.
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
MUST be called before browsing restaurants or adding to basket. Sets the shipping address for the cart.
Parameters:
addressId (required): Address ID from get_addressesTOKEN=$({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 a new delivery address. Use get_cities → get_districts → get_neighborhoods to find location IDs first.
Parameters:
name (required): First namesurname (required): Last namephone (required): Phone without country code (e.g., "5356437070")addressName (required): Label (e.g., "Home", "Work")addressLine (required): Street addresscityId (required): From get_citiesdistrictId (required): From get_districtsneighborhoodId (required): From get_neighborhoodslatitude (required): Coordinate stringlongitude (required): Coordinate stringapartmentNumber, floor, doorNumber, addressDescription (optional)elevatorAvailable (optional): booleanTOKEN=$({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 list of all cities for address selection.
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 for a city.
Parameters:
cityId (required): City ID from get_citiesTOKEN=$({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 for a district.
Parameters:
districtId (required): District ID from get_districtsTOKEN=$({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}'
List restaurants near the selected address. Requires select_address first.
Parameters:
latitude (required): From selected addresslongitude (required): From selected addresspage (optional): Page number, default 1sortBy (optional): RECOMMENDED (default), RESTAURANT_SCORE, or RESTAURANT_DISTANCEminBasketPrice (optional): Pass 400 to filter min order >= 400 TLSorting keywords (Turkish & English):
RECOMMENDEDRESTAURANT_DISTANCERESTAURANT_SCORETOKEN=$({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 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 addresslongitude (required): From selected addresspage (optional): Page number, default 1TOKEN=$({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&page={page}" \
-H "Authorization: Bearer $TOKEN" \
-H "x-correlationid: $(uuidgen)" \
-H "pid: $(uuidgen)" \
-H "sid: $(uuidgen)" | jq
Response includes: Restaurant info plus products[] array with id, name, description, price
Get a restaurant's full menu with categories and items.
Parameters:
restaurantId (required): Restaurant IDlatitude (required): Coordinatelongitude (required): CoordinateTOKEN=$({baseDir}/scripts/auth.sh get-token)
curl -s "https://api.tgoapis.com/web-restaurant-apirestaurant-santral/restaurants/{restaurantId}?latitude={latitude}&longitude={longitude}" \
-H "Authorization: Bearer $TOKEN" \
-H "x-correlationid: $(uuidgen)" \
-H "pid: $(uuidgen)" \
-H "sid: $(uuidgen)" | jq
Response structure:
info: Restaurant details (id, name, rating, workingHours, deliveryTime, minOrderPrice)categories[]: Menu sections with items[] (id, name, description, price, likePercentage)Get product customization options (ingredients to exclude, modifier groups for extras/sizes).
Parameters:
restaurantId (required): Restaurant IDproductId (required): Product ID from menulatitude (required): Coordinatelongitude (required): CoordinateTOKEN=$({baseDir}/scripts/auth.sh get-token)
curl -s -X POST "https://api.tgoapis.com/web-restaurant-apirestaurant-santral/restaurants/{restaurantId}/products/{productId}?latitude={latitude}&longitude={longitude}" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-H "x-correlationid: $(uuidgen)" \
-H "pid: $(uuidgen)" \
-H "sid: $(uuidgen)" \
-d '{}' | jq
Response includes components[]:
type: INGREDIENTS (items to exclude) or MODIFIER_GROUP (extras/sizes to select)modifierGroupId: Use this ID when adding modifiers to basketoptions[]: Available choices with id, name, price, isPopularisSingleChoice, minSelections, maxSelections: Selection rulesGet "goes well with" suggestions for products.
Parameters:
restaurantId (required): Restaurant IDproductIds (required): Array of product IDsTOKEN=$({baseDir}/scripts/auth.sh get-token)
curl -s -X POST "https://api.tgoapis.com/web-discovery-apidiscovery-santral/recommendation/product" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-H "x-correlationid: $(uuidgen)" \
-H "pid: $(uuidgen)" \
-H "sid: $(uuidgen)" \
-d '{
"restaurantId": "{restaurantId}",
"productIds": ["{productId1}", "{productId2}"],
"page": "PDP"
}' | jq
Add items to the shopping cart. Requires select_address first.
Parameters:
storeId (required): Restaurant ID (NUMBER)latitude (required): Coordinate (NUMBER, not string)longitude (required): Coordinate (NUMBER, not string)items[] (required): Array of items to addItem structure:
{
"productId": 12345,
"quantity": 1,
"modifierProducts": [
{
"productId": 111,
"modifierGroupId": 222,
"modifierProducts": [],
"ingredientOptions": {"excludes": [], "includes": []}
}
],
"ingredientOptions": {
"excludes": [{"id": 333}],
"includes": []
}
}
TOKEN=$({baseDir}/scripts/auth.sh get-token)
curl -s -X POST "https://api.tgoapis.com/web-checkout-apicheckout-santral/carts/items" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-H "x-correlationid: $(uuidgen)" \
-H "pid: $(uuidgen)" \
-H "sid: $(uuidgen)" \
-d '{
"storeId": {storeId},
"items": [{items}],
"latitude": {latitude},
"longitude": {longitude},
"isFlashSale": false,
"storePickup": false
}' | jq
If this fails, try clear_basket first then retry.
Get current cart contents.
TOKEN=$({baseDir}/scripts/auth.sh get-token)
curl -s "https://api.tgoapis.com/web-checkout-apicheckout-santral/carts" \
-H "Authorization: Bearer $TOKEN" \
-H "x-correlationid: $(uuidgen)" \
-H "pid: $(uuidgen)" \
-H "sid: $(uuidgen)" | jq
Response includes: storeGroups[] with store info and products, summary[], totalPrice, deliveryPrice, isEmpty
Remove an item from the cart.
Parameters:
itemId (required): Item UUID from get_basket response (the itemId field, NOT productId)TOKEN=$({baseDir}/scripts/auth.sh get-token)
curl -s -X DELETE "https://api.tgoapis.com/web-checkout-apicheckout-santral/carts/items/{itemId}" \
-H "Authorization: Bearer $TOKEN" \
-H "x-correlationid: $(uuidgen)" \
-H "pid: $(uuidgen)" \
-H "sid: $(uuidgen)" | jq
Clear the entire cart.
TOKEN=$({baseDir}/scripts/auth.sh get-token)
curl -s -X DELETE "https://api.tgoapis.com/web-checkout-apicheckout-santral/carts" \
-H "Authorization: Bearer $TOKEN" \
-H "x-correlationid: $(uuidgen)" \
-H "pid: $(uuidgen)" \
-H "sid: $(uuidgen)"
Get user's saved payment cards (masked). If no cards, user must add one at tgoyemek.com.
Uses Payment API with different headers:
TOKEN=$({baseDir}/scripts/auth.sh get-token)
curl -s "https://payment.tgoapps.com/v2/cards/" \
-H "Authorization: bearer $TOKEN" \
-H "app-name: TrendyolGo" \
-H "x-applicationid: 1" \
-H "x-channelid: 4" \
-H "x-storefrontid: 1" | jq
Response: cards[] with cardId, maskedCardNumber, bankName, cardNetwork, isDebitCard
Verify cart is ready for checkout. Call this before place_order.
TOKEN=$({baseDir}/scripts/auth.sh get-token)
curl -s "https://api.tgoapis.com/web-checkout-apicheckout-santral/carts?cartContext=payment&limitPromoMbs=false" \
-H "Authorization: Bearer $TOKEN" \
-H "x-correlationid: $(uuidgen)" \
-H "pid: $(uuidgen)" \
-H "sid: $(uuidgen)" | jq
Check response:
totalProductCount is 0, cart is emptywarnings[] for issues (e.g., below minimum order)totalPriceSet order note and service preferences. Call before place_order.
Parameters:
note (optional): Note for courier/restaurantnoServiceWare (optional): Don't include plastic/cutlery (default: false)contactlessDelivery (optional): Leave at door (default: false)dontRingBell (optional): Don't ring doorbell (default: false)TOKEN=$({baseDir}/scripts/auth.sh get-token)
curl -s -X PUT "https://api.tgoapis.com/web-checkout-apicheckout-santral/carts/customerNote" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-H "x-correlationid: $(uuidgen)" \
-H "pid: $(uuidgen)" \
-H "sid: $(uuidgen)" \
-d '{
"customerNote": "{note}",
"noServiceWare": false,
"contactlessDelivery": false,
"dontRingBell": false
}'
Place the order with 3D Secure payment. This is a 3-step process.
Parameters:
cardId (required): Card ID from get_saved_cardsStep 1: Get cart with payment context
TOKEN=$({baseDir}/scripts/auth.sh get-token)
curl -s "https://api.tgoapis.com/web-checkout-apicheckout-santral/carts?cartContext=payment&limitPromoMbs=false" \
-H "Authorization: Bearer $TOKEN" \
-H "x-correlationid: $(uuidgen)" \
-H "pid: $(uuidgen)" \
-H "sid: $(uuidgen)"
Step 2: Select payment method (Payment API)
# Get bin code from card's maskedCardNumber (first 6 digits + **)
BINCODE="${maskedCardNumber:0:6}**"
curl -s -X POST "https://payment.tgoapps.com/v3/payment/options" \
-H "Authorization: bearer $TOKEN" \
-H "Content-Type: application/json" \
-H "app-name: TrendyolGo" \
-H "x-applicationid: 1" \
-H "x-channelid: 4" \
-H "x-storefrontid: 1" \
-d '{
"paymentType": "payWithCard",
"data": {
"savedCardId": {cardId},
"binCode": "{binCode}",
"installmentId": 0,
"reward": null,
"installmentPostponingSelected": false
}
}'
Step 3: Submit payment (Payment API)
curl -s -X POST "https://payment.tgoapps.com/v2/payment/pay" \
-H "Authorization: bearer $TOKEN" \
-H "Content-Type: application/json" \
-H "app-name: TrendyolGo" \
-H "x-applicationid: 1" \
-H "x-channelid: 4" \
-H "x-storefrontid: 1" \
-d '{
"customerSelectedThreeD": false,
"paymentOptions": [{"name": "payWithCard", "cardNo": "", "customerSelectedThreeD": false}],
"callbackUrl": "https://tgoyemek.com/odeme"
}'
3D Secure handling: If response contains json.content (HTML) or redirectUrl:
{baseDir}/scripts/3dsecure.sh "$HTML_CONTENT"Get user's order history with status.
Parameters:
page (optional): Page number, default 1TOKEN=$({baseDir}/scripts/auth.sh get-token)
curl -s "https://api.tgoapis.com/web-checkout-apicheckout-santral/orders?page={page}&pageSize=50" \
-H "Authorization: Bearer $TOKEN" \
-H "x-correlationid: $(uuidgen)" \
-H "pid: $(uuidgen)" \
-H "sid: $(uuidgen)" | jq
Response: orders[] with id, orderDate, store, status, price, products[]
Get detailed information about a specific order including delivery status.
Parameters:
orderId (required): Order ID from get_ordersTOKEN=$({baseDir}/scripts/auth.sh get-token)
curl -s "https://api.tgoapis.com/web-checkout-apicheckout-santral/orders/detail?orderId={orderId}" \
-H "Authorization: Bearer $TOKEN" \
-H "x-correlationid: $(uuidgen)" \
-H "pid: $(uuidgen)" \
-H "sid: $(uuidgen)" | jq
Response includes: Order details, delivery status steps, ETA, products with prices, delivery address
Fetch Google Maps rating and reviews for a restaurant. Requires GOOGLE_PLACES_API_KEY env var.
Parameters:
restaurantId, restaurantName, neighborhoodName, tgoDistance, tgoRating, latitude, longitudeThis operation uses Google Places API to find the restaurant and compare ratings. Only use if GOOGLE_PLACES_API_KEY is configured.
| Status | Action |
|--------|--------|
| 401 Unauthorized | Token expired. Run {baseDir}/scripts/auth.sh clear-token then retry the operation. |
| 400 Bad Request | Check parameters. Parse and show the error message from response body. |
| 429 Rate Limited | OTP verification required. Direct user to complete the action at tgoyemek.com instead. |
| 5xx Server Error | TGO service temporarily unavailable. Wait a moment and retry once. |
| 3D Secure | Save HTML content, open browser with {baseDir}/scripts/3dsecure.sh, inform user to complete verification. |
Always parse error responses and present the error message clearly to the user.
isClosed before suggesting restaurants from search results.AI Usage Analysis
Analysis is being generated… refresh in a few seconds.
Access recipes, meal plans, and grocery lists from Paprika Recipe Manager. Use when user asks about recipes, meal planning, or cooking.
Search and suggest recipes by ingredients, cuisine, or dietary preferences using TheMealDB API with detailed meal info and instructions.
Order food, groceries, and book restaurants in India via Swiggy's MCP servers. Food delivery, Instamart groceries, and Dineout restaurant bookings with safety-first confirmation workflow.
Search and browse 9,000+ Gousto recipes. Get full ingredients and step-by-step cooking instructions via official API.
Manage recipes and grocery lists from your Plan2Meal React Native app. Add recipes from URLs, search, view, and manage your grocery lists.
Turn recipes into a Todoist Shopping list. Extract ingredients from recipe photos (Gemini Flash vision) or recipe web pages (search + fetch), then compare against the existing Shopping project with conservative synonym/overlap rules, skip pantry staples (salt/pepper), and sum quantities when units match. Also saves each cooked recipe into the workspace cookbook (recipes/).