Ingredient Manipulation
Acquiring Tomatoes
POST /v1/tomato/acquire
import requests
API_BASE = "https://api.tomatopy.pizza/v1"
HEADERS = {
"Content-Type": "application/json",
"X-API-Key": "your-api-key",
"X-Session-ID": "your-session-id"
}
# Acquire a San Marzano tomato
response = requests.post(f"{API_BASE}/tomato/acquire", headers=HEADERS, json={
"variety": "San Marzano",
"ripeness": 0.8,
"weight": 150
})
tomato = response.json()
print(tomato["id"]) # "tom_abc123"
print(tomato["variety"]) # "San Marzano"
print(tomato["ripeness"]) # 0.8
print(tomato["weight"]) # 150
print(tomato["type"]) # "raw"Request Body
Field
Type
Required
Description
Acquiring Multiple Tomatoes
Slicing Tomatoes
POST /v1/tomato/slice
Request Body
Field
Type
Required
Description
Slicing Multiple Tomatoes Together
Squeezing Tomatoes
POST /v1/tomato/squeeze
Request Body
Field
Type
Required
Description
Error Handling
Best Practices
Endpoint Reference
Endpoint
Method
Description
Next Steps
Last updated
Was this helpful?