{"openapi":"3.1.0","info":{"title":"GreenplateAi API","version":"2.0.0","description":"GreenplateAi API v2. Public content doors are read-only and cacheable; signed-in doors take a Clerk session token and run every query under the caller’s own tenant (Postgres row-level security)."},"servers":[{"url":"https://api.greenplate.ai"}],"components":{"securitySchemes":{"clerkSession":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A Clerk session token for greenplate.ai or app.greenplate.ai."},"opsServiceToken":{"type":"http","scheme":"bearer","description":"A shared service token (GP_API_OPS_TOKEN, a Key Vault secret) held by the i2 node. Not a Clerk token; no other route accepts it."}},"schemas":{"Live":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]}},"required":["status"]},"Health":{"type":"object","properties":{"status":{"type":"string","enum":["ok","degraded"]},"service":{"type":"string","enum":["gp-api"]},"version":{"type":"string"},"surface":{"type":"string"},"db":{"type":"string","enum":["ok","unconfigured","down"]},"auth":{"type":"object","properties":{"configured":{"type":"boolean"},"keys":{"type":"integer"}},"required":["configured","keys"]},"outbound":{"type":"object","properties":{"email":{"type":"string"},"sms":{"type":"string"},"push":{"type":"string"},"analytics":{"type":"string"},"flags":{"type":"string"},"billing":{"type":"string"}},"required":["email","sms","push","analytics","flags","billing"]},"stripe":{"type":"string","enum":["configured","off"]},"schema":{"type":"object","properties":{"state":{"type":"string","enum":["ok","pending","drift","unreadable"]},"names":{"type":"array","items":{"type":"string"}}},"required":["state","names"]},"ai":{"type":"object","properties":{"state":{"type":"string","enum":["ok","off","unconfigured","no_key","ceiling_reached","key_rejected","provider_error"]},"switch":{"type":"string","enum":["on","off"]},"ceiling":{"type":"string","enum":["set","unset","reached"]},"models":{"type":"object","properties":{"chat":{"type":"boolean"},"plan":{"type":"boolean"},"insights":{"type":"boolean"}},"required":["chat","plan","insights"]},"key":{"type":"string","enum":["present","absent"]},"last":{"type":["object","null"],"properties":{"at":{"type":"string"},"outcome":{"type":"string","enum":["ok","key_rejected","provider_error"]},"status":{"type":["integer","null"]}},"required":["at","outcome","status"]}},"required":["state","switch","ceiling","models","key","last"]}},"required":["status","service","version","surface","db","auth","stripe","ai"]},"Site":{"type":"object","properties":{"site":{"$ref":"#/components/schemas/SiteMeta"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/Price"},"description":"Empty until prices are set in the Stripe console (p7). Never invented."}},"required":["site","prices"]},"SiteMeta":{"type":"object","properties":{"origin":{"type":"string","example":"https://greenplate.ai"},"name":{"type":"string"},"legalName":{"type":"string"},"tagline":{"type":"string"},"description":{"type":"string"},"logoPath":{"type":["string","null"]},"sameAs":{"type":"array","items":{"type":"string"}}},"required":["origin","name","legalName","tagline","description","logoPath","sameAs"]},"Price":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"amountMinor":{"type":["integer","null"]},"currency":{"type":"string"},"interval":{"type":"string","enum":["month","year"]},"features":{"type":"array","items":{"type":"string"}}},"required":["id","label","amountMinor","currency","interval","features"]},"Problem":{"type":"object","properties":{"type":{"type":"string","example":"https://greenplate.ai/problems/not-found"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"},"requestId":{"type":"string"},"code":{"type":"string","description":"A machine-readable reason within the status, where a client acts on it (e.g. consent_required, free_limit)"},"manageUrl":{"type":"string","format":"uri","description":"With code apple_subscription or apple_linked_elsewhere: where the person manages that subscription instead (the App Store)."}},"required":["type","title","status","requestId"]},"RecipePage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Recipe"}},"nextCursor":{"type":["string","null"],"description":"Pass as `cursor` for the next page. Null on the last page."},"total":{"type":"integer","description":"Published recipes in the whole catalogue (not this page). Always sent by this API."},"ingredientTotal":{"type":"integer","description":"Ingredients in the catalogue: the number a \"Search N ingredients\" hint may show. Always sent by this API."}},"required":["items","nextCursor"]},"Recipe":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"cuisine":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"servings":{"type":["integer","null"]},"prepTimeMinutes":{"type":["integer","null"]},"cookTimeMinutes":{"type":["integer","null"]},"totalMinutes":{"type":["integer","null"],"description":"Start to serve, in minutes: prep + cook + the waiting the method requires (chilling, marinating, rising), the shortest reading. Null when unknown (neither time, or a wait with no number). Clients show this rather than their own prep + cook sum. Always sent by this API."},"nutrition":{"$ref":"#/components/schemas/NutritionFacts"},"ingredients":{"type":"array","items":{"$ref":"#/components/schemas/RecipeIngredient"}},"steps":{"type":"array","items":{"type":"string"}},"coverImageUrl":{"type":["string","null"],"format":"uri","description":"Public R2 URL (or a signed one for private media). Never bytes. Null = honest-empty slot."},"coverConfidence":{"type":["integer","null"]},"publishedAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-09-09"},"updatedAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-09-09"}},"required":["id","slug","title","description","category","cuisine","tags","servings","prepTimeMinutes","cookTimeMinutes","nutrition","ingredients","steps","coverImageUrl","coverConfidence","publishedAt","updatedAt"]},"NutritionFacts":{"type":["object","null"],"properties":{"calories":{"type":["number","null"]},"proteinG":{"type":["number","null"]},"carbsG":{"type":["number","null"]},"fatG":{"type":["number","null"]},"fiberG":{"type":["number","null"]},"sodiumMg":{"type":["number","null"]}},"required":["calories","proteinG","carbsG","fatG","fiberG","sodiumMg"]},"RecipeIngredient":{"type":"object","properties":{"displayName":{"type":"string"},"amount":{"type":["string","null"]}},"required":["displayName","amount"]},"ArticleList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Article"}}},"required":["items"]},"Article":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"title":{"type":"string"},"metaDescription":{"type":"string"},"category":{"type":"string"},"collection":{"type":["string","null"]},"bodyText":{"type":"string"},"sections":{"type":"array","items":{"$ref":"#/components/schemas/ArticleSection"}},"faq":{"type":"array","items":{"$ref":"#/components/schemas/FaqPair"}},"heroImageUrl":{"type":["string","null"],"format":"uri","description":"Public R2 URL (or a signed one for private media). Never bytes. Null = honest-empty slot."},"publishedAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-09-09"},"updatedAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-09-09"},"relatedRecipeSlugs":{"type":"array","items":{"type":"string"}}},"required":["id","slug","title","metaDescription","category","collection","bodyText","sections","faq","heroImageUrl","publishedAt","updatedAt","relatedRecipeSlugs"]},"ArticleSection":{"type":"object","properties":{"heading":{"type":"string"},"text":{"type":"string"}},"required":["heading","text"]},"FaqPair":{"type":"object","properties":{"question":{"type":"string"},"answer":{"type":"string"}},"required":["question","answer"]},"RedirectList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Redirect"}}},"required":["items"]},"Redirect":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"status":{"anyOf":[{"type":"number","enum":[301]},{"type":"number","enum":[200]}]},"kind":{"type":"string","enum":["host","post","hub","taxonomy","legacy","recipe-fixture","unchanged","slug-change"]}},"required":["from","to","status","kind"]},"Me":{"type":"object","properties":{"userId":{"type":"string","format":"uuid"},"tenantId":{"type":"string"},"band":{"type":"string","enum":["founder","ops","agent","customer"]}},"required":["userId","tenantId","band"]},"ConsentResult":{"allOf":[{"$ref":"#/components/schemas/Me"},{"type":"object","properties":{"referral":{"type":"object","properties":{"outcome":{"type":"string","enum":["claimed","invalid","no_account","self","already_referred","too_late"],"description":"claimed; invalid (no such code); self (your own code); already_referred (an account joins with one code, once); too_late (only a new account can claim); no_account"}},"required":["outcome"],"description":"Present when the body carried a referralCode: what became of it"}}}]},"ConsentAccept":{"type":"object","properties":{"accept":{"type":"boolean","enum":[true],"description":"Always true: the person accepted the published terms and privacy notice"},"referralCode":{"type":"string","maxLength":200,"description":"Optional: the referral code (or the whole https://greenplate.ai/r/<code> link) the person signed up with. Claimed after the account is made; a code that cannot be claimed never blocks sign-up (see `referral` in the answer)."}},"required":["accept"],"additionalProperties":false},"ClientError":{"type":"object","properties":{"kind":{"type":"string","enum":["oauth_return","oauth_start","sign_in","sign_up","verify"]},"provider":{"type":["string","null"],"enum":["google","apple","email",null]},"step":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,31}$","description":"The app's step name (e.g. sso-callback)"},"clerkStatus":{"type":["string","null"],"pattern":"^[a-z][a-z0-9_]{0,31}$","description":"Clerk's status, e.g. missing_requirements"},"missingFields":{"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$"},"maxItems":10,"description":"Clerk's field names only, e.g. email_address"},"codes":{"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$"},"maxItems":10,"description":"Clerk's error codes only, e.g. captcha_invalid"},"ua":{"type":"string","pattern":"^[A-Za-z]{1,16}\\/[A-Za-z]{1,16}$","description":"Browser family / OS family, e.g. Safari/iOS","example":"Safari/iOS"},"build":{"type":"string","pattern":"^[A-Za-z0-9._-]{1,40}$","description":"The app build"}},"required":["kind","provider","step","clerkStatus","missingFields","codes","ua","build"],"additionalProperties":false},"Entitlement":{"type":"object","properties":{"tier":{"type":"string","enum":["free","paid"]},"plan":{"type":"string"},"status":{"type":"string","enum":["none","trial","active","past_due","cancelled"]},"subscriptionId":{"type":["string","null"]},"since":{"type":["string","null"],"description":"When this entitlement took effect (ISO 8601); null when there is none."},"source":{"type":"string","enum":["apple","comp"],"description":"'apple' when an App Store subscription is what grants the plan: manage it in the App Store, not the Stripe portal. 'comp' when the plan was given at no charge, with no subscription: there is nothing to manage or buy. Absent: the Stripe entitlement (or none)."},"expiresAt":{"type":"string","description":"With source 'apple': when the current App Store period (or billing grace period) ends, ISO 8601."},"renewsAt":{"type":"string","description":"Stripe: when the current period ends, ISO 8601: the trial's last day while status is 'trial', otherwise the renewal date (the end date when cancelAtPeriodEnd). Absent until known."},"cancelAtPeriodEnd":{"type":"boolean","description":"Stripe: cancelled; the plan stays until renewsAt, then ends. Present with renewsAt."}},"required":["tier","plan","status","subscriptionId","since"]},"Connections":{"type":"object","properties":{"ai":{"type":"object","properties":{"connected":{"type":"boolean","description":"True once this account has made at least one connector call from an AI client."},"client":{"type":["string","null"],"description":"Which AI client, when it could be named: Claude, ChatGPT, Gemini, or the client’s host. Null when not connected or unnamed."},"lastUsedAt":{"type":["string","null"],"description":"The newest connector call from an AI client (ISO 8601); null when not connected."}},"required":["connected","client","lastUsedAt"]}},"required":["ai"]},"Referral":{"type":"object","properties":{"code":{"type":"string","example":"k7m2q9xd"},"link":{"type":"string","format":"uri","example":"https://greenplate.ai/r/k7m2q9xd","description":"The link to share: the site’s /r/<code>"},"joined":{"type":"integer","minimum":0,"description":"How many accounts joined with this code (a count, never who)"}},"required":["code","link","joined"]},"ReferralClaim":{"type":"object","properties":{"outcome":{"type":"string","enum":["claimed"]}},"required":["outcome"]},"ReferralClaimBody":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":200,"description":"The code, or the whole referral link"}},"required":["code"],"additionalProperties":false},"BarcodeProduct":{"type":"object","properties":{"gtin":{"type":"string","pattern":"^[0-9]{14}$","description":"The GTIN-14 form (zero-padded) the product is keyed by"},"name":{"type":"string","description":"As on the label (FoodData Central description)"},"brand":{"type":["string","null"]},"serving":{"type":["object","null"],"properties":{"size":{"type":["number","null"]},"unit":{"type":["string","null"],"enum":["g","ml",null]},"text":{"type":["string","null"],"description":"The label’s household serving, e.g. \"1 cup\""}},"required":["size","unit","text"]},"nutrition":{"type":"object","properties":{"basis":{"type":"string","enum":["100g","100ml"]},"per100":{"allOf":[{"$ref":"#/components/schemas/NutritionFacts"},{"description":"Per 100 g or 100 ml (FDC Branded Foods are stated that way)"}]},"perServing":{"allOf":[{"$ref":"#/components/schemas/NutritionFacts"},{"description":"Per label serving, when its size is in the basis unit"}]}},"required":["basis","per100","perServing"]},"source":{"type":"string","enum":["usda_fdc"]},"sourceId":{"type":"string","description":"The FoodData Central fdcId"},"fetchedAt":{"type":"string","description":"When FoodData Central answered for this product"}},"required":["gtin","name","brand","serving","nutrition","source","sourceId","fetchedAt"]},"PantryList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PantryListItem"}}},"required":["items"]},"PantryListItem":{"allOf":[{"$ref":"#/components/schemas/PantryItem"},{"type":"object","properties":{"reservedFor":{"type":"array","items":{"type":"object","properties":{"mealId":{"type":"string","format":"uuid"},"date":{"type":"string"},"slot":{"type":"string","enum":["breakfast","lunch","dinner","snack"]},"recipe":{"type":"string"}},"required":["mealId","date","slot","recipe"]},"description":"The planned meals (today and the next 13 days, not yet cooked or skipped) whose recipe uses this item, soonest first; empty = free to use. Derived on every read, never stored."}},"required":["reservedFor"]}]},"PantryItem":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"quantity":{"type":["number","null"]},"unit":{"type":["string","null"]},"category":{"type":["string","null"]},"expiresOn":{"type":["string","null"],"example":"2026-10-01","description":"YYYY-MM-DD, or null"},"location":{"type":["string","null"],"enum":["fridge","freezer","cupboard",null],"description":"Where it is kept, or null when not said"},"level":{"type":["string","null"],"enum":["full","half","low",null],"description":"How much is left when it is not weighed; never set together with quantity"},"source":{"type":["string","null"],"enum":["hand","receipt","scan","grocery","cooked",null]},"updatedAt":{"type":"string"}},"required":["id","name","quantity","unit","category","expiresOn","location","level","source","updatedAt"]},"PantryAdd":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"example":"chickpeas"},"quantity":{"type":["number","null"],"minimum":0,"maximum":1000000},"unit":{"type":["string","null"],"minLength":1,"maxLength":24,"example":"can"},"category":{"type":["string","null"],"minLength":1,"maxLength":40,"example":"pantry"},"expiresOn":{"type":["string","null"],"format":"date"},"location":{"type":["string","null"],"enum":["fridge","freezer","cupboard",null]},"level":{"type":["string","null"],"enum":["full","half","low",null]},"source":{"type":["string","null"],"enum":["hand","receipt","scan","grocery","cooked",null]}},"required":["name"],"additionalProperties":false},"PantryPatch":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"example":"chickpeas"},"quantity":{"type":["number","null"],"minimum":0,"maximum":1000000},"unit":{"type":["string","null"],"minLength":1,"maxLength":24,"example":"can"},"category":{"type":["string","null"],"minLength":1,"maxLength":40,"example":"pantry"},"expiresOn":{"type":["string","null"],"format":"date"},"location":{"type":["string","null"],"enum":["fridge","freezer","cupboard",null]},"level":{"type":["string","null"],"enum":["full","half","low",null]},"source":{"type":["string","null"],"enum":["hand","receipt","scan","grocery","cooked",null]}},"additionalProperties":false},"PantryRemoved":{"type":"object","properties":{"removed":{"type":"boolean","enum":[true]}},"required":["removed"]},"Profile":{"type":"object","properties":{"goal":{"type":["string","null"],"enum":["lose","maintain","build",null]},"targets":{"type":"object","properties":{"kcal":{"type":["integer","null"],"minimum":800,"maximum":6000},"proteinG":{"type":["integer","null"],"minimum":10,"maximum":400}},"required":["kcal","proteinG"]},"allergens":{"type":"array","items":{"type":"string","enum":["peanut","tree_nut","shellfish","fish","gluten","dairy","soy","egg","sesame"]}},"diet":{"type":"string","enum":["none","vegetarian","vegan","pescatarian","halal","kosher"]},"dislikes":{"type":"array","items":{"type":"string"}},"cuisines":{"type":"array","items":{"type":"string"}},"householdSize":{"type":["integer","null"]},"weeklyBudgetUsd":{"type":["number","null"]},"heightCm":{"type":["number","null"]},"weightKg":{"type":["number","null"]},"onboardedAt":{"type":["string","null"],"description":"When first-run Goal setup was done, or null"},"updatedAt":{"type":["string","null"],"description":"null until the first save"}},"required":["goal","targets","allergens","diet","dislikes","cuisines","householdSize","weeklyBudgetUsd","heightCm","weightKg","onboardedAt","updatedAt"]},"ProfilePatch":{"type":"object","properties":{"goal":{"type":["string","null"],"enum":["lose","maintain","build",null]},"targets":{"type":"object","properties":{"kcal":{"type":["integer","null"],"minimum":800,"maximum":6000},"proteinG":{"type":["integer","null"],"minimum":10,"maximum":400}},"additionalProperties":false},"allergens":{"type":"array","items":{"type":"string","enum":["peanut","tree_nut","shellfish","fish","gluten","dairy","soy","egg","sesame"]},"maxItems":9},"diet":{"type":"string","enum":["none","vegetarian","vegan","pescatarian","halal","kosher"]},"dislikes":{"type":"array","items":{"type":"string","minLength":1,"maxLength":40},"maxItems":50},"cuisines":{"type":"array","items":{"type":"string","minLength":1,"maxLength":40},"maxItems":30},"householdSize":{"type":["integer","null"],"minimum":1,"maximum":20},"weeklyBudgetUsd":{"type":["number","null"],"minimum":0,"maximum":100000},"heightCm":{"type":["number","null"],"minimum":50,"maximum":260},"weightKg":{"type":["number","null"],"minimum":20,"maximum":400}},"additionalProperties":false},"Onboarding":{"type":"object","properties":{"heightCm":{"type":["number","null"],"minimum":50,"maximum":260},"weightKg":{"type":["number","null"],"minimum":20,"maximum":400},"goal":{"type":["string","null"],"enum":["lose","maintain","build",null]},"avoid":{"type":"array","items":{"type":"string","enum":["peanut","tree_nut","shellfish","fish","gluten","dairy","soy","egg","sesame"]},"maxItems":9,"description":"Becomes the profile’s allergens"},"targets":{"type":"object","properties":{"kcal":{"type":["integer","null"],"minimum":800,"maximum":6000},"proteinG":{"type":["integer","null"],"minimum":10,"maximum":400}},"additionalProperties":false,"description":"A target left out is set from height, weight and goal (Mifflin-St Jeor) if the profile has none; null keeps it unset"}},"additionalProperties":false},"PlannedMealList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PlannedMeal"}}},"required":["items"]},"PlannedMeal":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"date":{"type":"string"},"slot":{"type":"string","enum":["breakfast","lunch","dinner","snack"]},"recipeId":{"type":"string","format":"uuid"},"recipe":{"type":["object","null"],"properties":{"slug":{"type":"string"},"title":{"type":"string"},"coverImageUrl":{"type":["string","null"]},"minutes":{"type":["number","null"]},"kcal":{"type":["number","null"]},"proteinG":{"type":["number","null"]},"estimated":{"type":"boolean","enum":[true],"description":"Present (true) only when the recipe is one of the caller’s OWN (GET /v1/me/recipes): its slug is `mine-<recipeId>` and its kcal and proteinG are the person’s own estimate. A catalog recipe never carries it"}},"required":["slug","title","coverImageUrl","minutes","kcal","proteinG"],"description":"The catalog’s own fields (or the caller’s own recipe’s, see `estimated`); null if the recipe has since been unpublished or deleted"},"servings":{"type":"number"},"status":{"type":"string","enum":["planned","cooked","skipped"]},"eaters":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Who is eating (household member ids, GET /v1/me/household); empty on a one-person plan"},"servingsCooked":{"type":["number","null"],"description":"How many servings the cook made (PATCH servingsCooked); null until then"},"servingsEaten":{"type":"number","description":"Servings logged against this meal (food log entries with its plannedMealId); 0 when none"},"leftovers":{"type":["number","null"],"description":"The servings left in the meal’s pantry item “Leftovers: <recipe>”, the one leftovers count (0340); 0 when cooked and used up; null when not cooked"},"leftoverItemId":{"type":["string","null"],"format":"uuid","description":"That pantry item, while it exists"},"updatedAt":{"type":"string"}},"required":["id","date","slot","recipeId","recipe","servings","status","eaters","updatedAt"]},"PlanEventList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PlanEvent"}}},"required":["items"]},"PlanEvent":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"date":{"type":"string"},"time":{"type":["string","null"]},"kind":{"type":"string","enum":["prep","defrost","shop","delivery","reminder","cook","eat"]},"text":{"type":"string"},"store":{"type":["string","null"]},"mealId":{"type":["string","null"],"format":"uuid","description":"cook and eat: the planned meal they belong to (0340)"},"outcome":{"type":"string","enum":["planned","done","skipped"],"description":"planned, done or skipped. Moved = plannedDate/plannedTime set; done at another time = doneAt away from the planned time"},"plannedDate":{"type":["string","null"],"description":"The plan as first made, when the event was moved since"},"plannedTime":{"type":["string","null"]},"doneAt":{"type":["string","null"],"description":"When it really happened (done only)"},"servings":{"type":["number","null"],"description":"cook: servings made; eat: servings eaten"},"usesLeftovers":{"type":"boolean","description":"eat: from an earlier cook’s leftovers in the pantry"},"leftoversTaken":{"type":"number","description":"A done eat of leftovers: the servings it took from the meal’s leftovers (given back if it is undone or removed)"},"slot":{"type":["string","null"],"enum":["breakfast","lunch","dinner","snack",null],"description":"Which meal it was for, when said (0380)"},"leftoverItemId":{"type":["string","null"],"format":"uuid","description":"A done cook of a dish with no planned meal: the pantry item holding its leftovers, while it exists (0380)"},"used":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","format":"uuid"},"name":{"type":"string"},"quantity":{"type":["number","null"]},"level":{"type":["string","null"]},"removed":{"type":"boolean"}},"required":["itemId","name","quantity","level","removed"]},"description":"On the add of a done cook: what it took from the pantry, each item as it is left (or removed)"}},"required":["id","date","time","kind","text","store","mealId","outcome","plannedDate","plannedTime","doneAt","servings","usesLeftovers","leftoversTaken"]},"PlanEventAdd":{"type":"object","properties":{"date":{"type":"string","format":"date","example":"2026-10-08"},"time":{"type":["string","null"],"minLength":1,"maxLength":16,"example":"17:00"},"kind":{"type":"string","enum":["prep","defrost","shop","delivery","reminder","cook","eat"]},"text":{"type":"string","minLength":1,"maxLength":200},"store":{"type":["string","null"],"minLength":1,"maxLength":60},"mealId":{"type":"string","format":"uuid","description":"eat: the planned meal (required). cook: the planned meal, or leave it out for a dish in words (text) or a recipeId. Refused for the other kinds"},"servings":{"type":"number","exclusiveMinimum":0,"maximum":100},"usesLeftovers":{"type":"boolean","description":"eat only: eaten from the meal’s cooked leftovers"},"slot":{"type":"string","enum":["breakfast","lunch","dinner","snack"]},"recipeId":{"type":"string","format":"uuid","description":"cook with no mealId: a saved recipe not on the plan yet; the planned meal is made on date and slot (slot required)"},"outcome":{"type":"string","enum":["planned","done","skipped"],"description":"done: already cooked (any date, so a past day can be put in)"},"doneAt":{"type":"string","description":"When it was done, ISO 8601 with offset; default now"},"leftovers":{"type":"object","properties":{"servings":{"type":"number","exclusiveMinimum":0,"maximum":100,"description":"A dish with no planned meal: the servings left over"},"location":{"type":"string","enum":["fridge","freezer","cupboard"],"description":"Default fridge"},"useBy":{"type":"string","format":"date","example":"2026-10-08","description":"Default 3 days after date"}},"additionalProperties":false,"description":"A done cook’s leftovers in the pantry"},"used":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","format":"uuid"},"amount":{"type":"number","exclusiveMinimum":0,"maximum":1000000},"level":{"type":"string","enum":["half","low"]},"usedUp":{"type":"boolean","enum":[true]}},"required":["itemId"],"additionalProperties":false},"maxItems":40,"description":"A done cook: what it used from the pantry, each with one of amount, level (as it is now) or usedUp"}},"required":["date","kind","text"],"additionalProperties":false},"PlanEventPatch":{"type":"object","properties":{"date":{"type":"string","format":"date","example":"2026-10-08"},"time":{"type":["string","null"],"minLength":1,"maxLength":16},"text":{"type":"string","minLength":1,"maxLength":200},"store":{"type":["string","null"],"minLength":1,"maxLength":60},"outcome":{"type":"string","enum":["planned","done","skipped"]},"doneAt":{"type":"string","description":"When it really happened, ISO 8601 with offset; default now when it becomes done"},"servings":{"type":"number","exclusiveMinimum":0,"maximum":100},"usesLeftovers":{"type":"boolean"},"shiftRest":{"type":"boolean","description":"On a move: the day’s later planned events move by the same minutes"}},"additionalProperties":false},"FreePlanItemList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/FreePlanItem"}}},"required":["items"]},"FreePlanItem":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"date":{"type":"string"},"slot":{"type":"string","enum":["breakfast","lunch","dinner","snack"]},"title":{"type":"string"},"servings":{"type":"number"},"nutrition":{"type":["object","null"],"properties":{"kcal":{"type":["number","null"]},"proteinG":{"type":["number","null"]},"carbsG":{"type":["number","null"]},"fatG":{"type":["number","null"]}},"required":["kcal","proteinG","carbsG","fatG"],"description":"Per serving, as typed; null when not known. Always an estimate"},"estimated":{"type":"boolean","enum":[true]},"fromMealId":{"type":["string","null"],"format":"uuid","description":"The cooked planned meal this is the leftovers of"},"leftovers":{"type":"boolean","description":"A leftovers card (fromMealId set)"},"leftoversTaken":{"type":"number","description":"The servings this card took from that meal’s leftovers when it was planned (given back if it is removed before it is eaten)"},"status":{"type":"string","enum":["planned","eaten","skipped"]},"updatedAt":{"type":"string"}},"required":["id","date","slot","title","servings","nutrition","estimated","fromMealId","leftovers","leftoversTaken","status","updatedAt"]},"FreePlanItemAdd":{"type":"object","properties":{"date":{"type":"string","format":"date","example":"2026-10-08"},"slot":{"type":"string","enum":["breakfast","lunch","dinner","snack"]},"title":{"type":"string","minLength":1,"maxLength":120,"example":"Leftover pizza"},"servings":{"type":"number","exclusiveMinimum":0,"maximum":50},"nutrition":{"type":["object","null"],"properties":{"kcal":{"type":["number","null"],"minimum":0,"maximum":20000},"proteinG":{"type":["number","null"],"minimum":0,"maximum":5000},"carbsG":{"type":["number","null"],"minimum":0,"maximum":5000},"fatG":{"type":["number","null"],"minimum":0,"maximum":5000}},"required":["kcal","proteinG","carbsG","fatG"],"additionalProperties":false},"fromMealId":{"type":"string","format":"uuid"}},"required":["date","slot","title"],"additionalProperties":false},"FreePlanItemPatch":{"type":"object","properties":{"date":{"type":"string","format":"date","example":"2026-10-08"},"slot":{"type":"string","enum":["breakfast","lunch","dinner","snack"]},"title":{"type":"string","minLength":1,"maxLength":120},"servings":{"type":"number","exclusiveMinimum":0,"maximum":50},"nutrition":{"type":["object","null"],"properties":{"kcal":{"type":["number","null"],"minimum":0,"maximum":20000},"proteinG":{"type":["number","null"],"minimum":0,"maximum":5000},"carbsG":{"type":["number","null"],"minimum":0,"maximum":5000},"fatG":{"type":["number","null"],"minimum":0,"maximum":5000}},"required":["kcal","proteinG","carbsG","fatG"],"additionalProperties":false},"status":{"type":"string","enum":["planned","eaten","skipped"]}},"additionalProperties":false},"PlannedMealAdd":{"type":"object","properties":{"date":{"type":"string","format":"date","example":"2026-10-08"},"slot":{"type":"string","enum":["breakfast","lunch","dinner","snack"]},"recipeId":{"type":"string","format":"uuid","description":"A published catalog recipe (GET /v1/recipes) or one of the caller’s own recipes (GET /v1/me/recipes); another household’s id is refused as an unknown recipe (422)"},"servings":{"type":"number","exclusiveMinimum":0,"maximum":50},"eaters":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":5,"description":"Household plan (Pro): who is eating, by member id. Default: everyone who eats this meal with the household. Servings default to the count"}},"required":["date","slot","recipeId"],"additionalProperties":false},"PlannedMealPatch":{"type":"object","properties":{"date":{"type":"string","format":"date","example":"2026-10-08"},"slot":{"type":"string","enum":["breakfast","lunch","dinner","snack"]},"recipeId":{"type":"string","format":"uuid"},"servings":{"type":"number","exclusiveMinimum":0,"maximum":50},"status":{"type":"string","enum":["planned","cooked","skipped"]},"eaters":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":5,"description":"Household plan (Pro): who is eating, by member id. Servings follow the count unless named"},"servingsCooked":{"type":["number","null"],"exclusiveMinimum":0,"maximum":100,"description":"How many servings the cook made; marks it cooked unless a status is named; the extra servings go into the pantry as leftovers. null clears it (Undo): planned again, and its leftovers item goes"}},"additionalProperties":false},"LogDay":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/LogEntry"},"description":"Every item of the day, in order (the meals' items, flat)"},"meals":{"type":"array","items":{"$ref":"#/components/schemas/LogMeal"}},"totals":{"$ref":"#/components/schemas/Nutrition"},"targets":{"type":"object","properties":{"kcal":{"type":["number","null"]},"proteinG":{"type":["number","null"]},"carbsG":{"type":["number","null"]},"fatG":{"type":["number","null"]}},"required":["kcal","proteinG","carbsG","fatG"],"description":"kcal and protein from the profile; carbs and fat derived from them and the goal (fat 30 %, 25 % to build; carbs the rest); null when not set"}},"required":["items","meals","totals","targets"]},"LogEntry":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"date":{"type":"string"},"time":{"type":["string","null"]},"slot":{"type":"string","enum":["breakfast","lunch","dinner","snack"]},"source":{"type":"string","enum":["recipe","manual"]},"recipeId":{"type":["string","null"],"format":"uuid"},"name":{"type":"string"},"servings":{"type":"number"},"nutrition":{"$ref":"#/components/schemas/Nutrition"},"estimated":{"type":"boolean","description":"true for an entry typed by hand (\"Log food yourself\"), and for one of the caller’s own recipes logged by id"},"plannedMealId":{"type":["string","null"],"format":"uuid"},"createdAt":{"type":"string"},"portion":{"type":["string","null"],"description":"The amount as typed (\"1 Venti\"); null for a recipe or when none was given"},"nutritionBasis":{"type":"string","enum":["recipe","typed","catalog","own_recipe","reference","model","none"],"description":"recipe: a catalog recipe logged by id. typed: numbers sent with the entry (or typed for this food before). catalog / own_recipe: a recipe whose title matched the name; own_recipe is also one of the caller’s own recipes logged by id (its numbers are the person’s estimate, so `estimated` is true). reference: our USDA ingredient reference, scaled by the portion. model: the model's estimate. none: nothing could be worked out; the numbers are 0 and the app says \"No estimate\"."},"nutritionMatch":{"type":["string","null"],"description":"What the estimate was matched to: a recipe title or a reference ingredient"},"matchImageUrl":{"type":["string","null"],"description":"The matched recipe’s photo when the basis is catalog or own_recipe; never generated"},"photoUrl":{"type":["string","null"],"description":"A by-hand entry with no matched recipe photo: the photo of the closest published catalog dish to what it is, chosen when it was written or last estimated; null when none is close enough. Photo only: never the nutrition basis; never generated (bug141)"},"mealId":{"type":"string","format":"uuid","description":"The meal this item is in (bug158). A one-item meal's id is its item's id"}},"required":["id","date","time","slot","source","recipeId","name","servings","nutrition","estimated","plannedMealId","createdAt","portion","nutritionBasis","nutritionMatch","matchImageUrl","photoUrl","mealId"]},"Nutrition":{"type":"object","properties":{"kcal":{"type":"number"},"proteinG":{"type":"number"},"carbsG":{"type":"number"},"fatG":{"type":"number"}},"required":["kcal","proteinG","carbsG","fatG"],"description":"For the servings logged; a recipe’s is the catalog’s × servings, fixed at log time"},"LogMeal":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"date":{"type":"string"},"time":{"type":["string","null"]},"slot":{"type":"string","enum":["breakfast","lunch","dinner","snack"]},"name":{"type":"string","description":"Its items' names, in the order logged"},"items":{"type":"array","items":{"$ref":"#/components/schemas/LogEntry"}},"totals":{"allOf":[{"$ref":"#/components/schemas/Nutrition"},{"description":"The sum of its items"}]}},"required":["id","date","time","slot","name","items","totals"],"description":"A meal: a kind at a time on a day, made of items (foods or recipes), each changed or removed on its own (bug158)"},"Today":{"type":"object","properties":{"date":{"type":"string"},"weekStart":{"type":"string","description":"The Sunday that starts this week (weeks start on Sunday, bug101)"},"totals":{"allOf":[{"$ref":"#/components/schemas/Nutrition"},{"description":"Eaten today: the sum of today's items"}]},"targets":{"type":"object","properties":{"kcal":{"type":["number","null"]},"proteinG":{"type":["number","null"]},"carbsG":{"type":["number","null"]},"fatG":{"type":["number","null"]}},"required":["kcal","proteinG","carbsG","fatG"],"description":"As GET /v1/me/log gives them; null when not set"},"remaining":{"type":"object","properties":{"kcal":{"type":["number","null"],"description":"Target minus eaten, never below 0, rounded; null without a target"},"proteinG":{"type":["number","null"]},"kcalOver":{"type":"boolean","description":"Eaten is past the kcal target"}},"required":["kcal","proteinG","kcalOver"]},"meals":{"type":"array","items":{"$ref":"#/components/schemas/LogMeal"},"description":"Today's meals, in the day's order, each with its items"},"planned":{"type":"array","items":{"$ref":"#/components/schemas/PlannedMeal"},"description":"Today's planned meals"},"week":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"weekday":{"type":"integer","minimum":0,"maximum":6,"description":"0 = Sunday … 6 = Saturday"},"isToday":{"type":"boolean"},"isFuture":{"type":"boolean"},"entries":{"type":"integer"},"meals":{"type":"integer"},"totals":{"type":["object","null"],"properties":{"kcal":{"type":"number"},"proteinG":{"type":"number"},"carbsG":{"type":"number"},"fatG":{"type":"number"}},"required":["kcal","proteinG","carbsG","fatG"],"description":"The day's totals; null when nothing was logged that day"},"dinner":{"type":["object","null"],"properties":{"name":{"type":"string"},"recipeId":{"type":["string","null"],"format":"uuid"}},"required":["name","recipeId"],"description":"The day's last logged dinner; null when none"}},"required":["date","weekday","isToday","isFuture","entries","meals","totals","dinner"]},"description":"Sunday to Saturday of this week"}},"required":["date","weekStart","totals","targets","remaining","meals","planned","week"],"description":"The Today screen in one read: today's meals and totals against the targets, what is left, today's plan, and the week"},"Kitchen":{"type":"object","properties":{"today":{"type":"string","description":"The household's local date (YYYY-MM-DD) the answer was worked out for"},"comfort":{"type":"array","items":{"type":"object","properties":{"recipeId":{"type":"string","format":"uuid"},"title":{"type":"string"},"kind":{"type":"string","enum":["own","catalog"]},"imageUrl":{"type":["string","null"]},"imageSource":{"type":["string","null"],"enum":["recipe","ours","ingredient",null],"description":"recipe = the recipe's own photo; ours = GreenplateAi's stand-in food photo (an own recipe with none); ingredient = its main ingredient's catalog photo; null = no photo"},"label":{"type":"string","enum":["cooked","saved","to_try"],"description":"cooked = earned by cooking it; saved = filled from saved recipes; to_try = a starter (loved or rated, or from the catalog)"},"score":{"type":"number","description":"Decayed cooks (a cook 30 days ago counts half) plus the plan and save bonuses; 0 for a filled card"},"why":{"type":"string","description":"One sentence a person can read: why this item is here"}},"required":["recipeId","title","kind","imageUrl","imageSource","label","score","why"]},"maxItems":8,"description":"The comfort set: up to 8 recipes the household cooks again, best first"},"tryNext":{"type":["object","null"],"properties":{"recipeId":{"type":"string","format":"uuid"},"title":{"type":"string"},"kind":{"type":"string","enum":["own","catalog"]},"imageUrl":{"type":["string","null"]},"imageSource":{"type":["string","null"],"enum":["recipe","ours","ingredient",null],"description":"recipe = the recipe's own photo; ours = GreenplateAi's stand-in food photo (an own recipe with none); ingredient = its main ingredient's catalog photo; null = no photo"},"why":{"type":"string","description":"One sentence a person can read: why this item is here"}},"required":["recipeId","title","kind","imageUrl","imageSource","why"],"description":"One new recipe to try, or null when there is nothing to choose from"},"list":{"type":"object","properties":{"dueAgain":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"lastBought":{"type":"string"},"everyDays":{"type":"integer"},"times":{"type":"integer"},"why":{"type":"string","description":"One sentence a person can read: why this item is here"}},"required":["name","lastBought","everyDays","times","why"]},"description":"Bought at a steady gap and due again, from shopping trips; never one already on the list"}},"required":["dueAgain"]},"reminders":{"type":"object","properties":{"useSoon":{"type":"array","items":{"type":"object","properties":{"pantryId":{"type":"string","format":"uuid"},"name":{"type":"string"},"expiresOn":{"type":"string"},"daysLeft":{"type":"integer","description":"Days until the date on it; negative = past it"},"location":{"type":["string","null"],"enum":["fridge","freezer","cupboard",null]},"recipeId":{"type":["string","null"],"format":"uuid","description":"A comfort recipe that uses it, when there is one"},"why":{"type":"string","description":"One sentence a person can read: why this item is here"}},"required":["pantryId","name","expiresOn","daysLeft","location","recipeId","why"]},"description":"Pantry items whose date is within 3 days, soonest first"}},"required":["useSoon"]},"occasion":{"type":"null","description":"The occasion dish: a later slice, always null for now"}},"required":["today","comfort","tryNext","list","reminders","occasion"],"description":"The kitchen engine's answer: the comfort set, one recipe to try next, list suggestions and reminders, each with why"},"KitchenSkipped":{"type":"object","properties":{"skipped":{"type":"boolean","enum":[true]}},"required":["skipped"]},"KitchenSkip":{"type":"object","properties":{"recipeId":{"type":"string","format":"uuid"}},"required":["recipeId"],"additionalProperties":false},"Votes":{"type":"object","properties":{"votes":{"type":"array","items":{"$ref":"#/components/schemas/Vote"}}},"required":["votes"]},"Vote":{"type":"object","properties":{"kind":{"type":"string","enum":["table","dish"],"description":"table = a Vibes table (a whole meal scene); dish = one dish"},"subject":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,63}$","description":"the design id of the table or dish, e.g. \"th1\"","example":"th1"},"vote":{"type":"string","enum":["like","pass","skip"]},"updatedAt":{"type":"string","format":"date-time"}},"required":["kind","subject","vote","updatedAt"]},"VoteSet":{"type":"object","properties":{"kind":{"type":"string","enum":["table","dish"],"description":"table = a Vibes table (a whole meal scene); dish = one dish"},"subject":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,63}$","description":"the design id of the table or dish, e.g. \"th1\"","example":"th1"},"vote":{"type":"string","enum":["like","pass","skip"]}},"required":["kind","subject","vote"],"additionalProperties":false},"VoteCleared":{"type":"object","properties":{"cleared":{"type":"boolean","enum":[true]}},"required":["cleared"]},"LogSummary":{"type":"object","properties":{"days":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"entries":{"type":"integer","description":"Items logged"},"meals":{"type":"integer"},"totals":{"$ref":"#/components/schemas/Nutrition"}},"required":["date","entries","meals","totals"]}}},"required":["days"]},"LogFoods":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"portion":{"type":["string","null"]},"slot":{"type":"string","enum":["breakfast","lunch","dinner","snack"]},"nutrition":{"allOf":[{"$ref":"#/components/schemas/Nutrition"},{"description":"Per serving, from the latest entry of this food"}]},"nutritionBasis":{"type":"string","enum":["recipe","typed","catalog","own_recipe","reference","model","none"],"description":"recipe: a catalog recipe logged by id. typed: numbers sent with the entry (or typed for this food before). catalog / own_recipe: a recipe whose title matched the name; own_recipe is also one of the caller’s own recipes logged by id (its numbers are the person’s estimate, so `estimated` is true). reference: our USDA ingredient reference, scaled by the portion. model: the model's estimate. none: nothing could be worked out; the numbers are 0 and the app says \"No estimate\"."},"nutritionMatch":{"type":["string","null"]},"matchImageUrl":{"type":["string","null"],"description":"The matched recipe’s photo from the latest entry (catalog / own_recipe), as GET /v1/me/log gives it; bug137"},"photoUrl":{"type":["string","null"],"description":"The closest catalog dish’s photo from the latest entry, as GET /v1/me/log gives it; bug141"},"lastLoggedAt":{"type":"string"},"count":{"type":"integer","description":"How many times this food with this portion was logged (bug182)"}},"required":["name","portion","slot","nutrition","nutritionBasis","nutritionMatch","matchImageUrl","photoUrl","lastLoggedAt","count"]}},"meals":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Its items’ names, in order"},"slot":{"type":"string","enum":["breakfast","lunch","dinner","snack"]},"time":{"type":["string","null"]},"items":{"type":"array","items":{"$ref":"#/components/schemas/LogEntry"},"description":"The latest meal with these foods: its items, with their amounts and numbers"},"count":{"type":"integer","description":"How many meals had these foods"},"lastLoggedAt":{"type":"string"},"photoUrl":{"type":["string","null"],"description":"Our photo for its name, else for its first item naming one of our foods (bug176’s rule)"}},"required":["name","slot","time","items","count","lastLoggedAt","photoUrl"]},"description":"bug182: meals of more than one item the caller logged, one per set of foods, newest first (at most 60 meals read)"}},"required":["items","meals"]},"LogAdded":{"allOf":[{"$ref":"#/components/schemas/LogEntry"},{"type":"object","properties":{"meal":{"allOf":[{"$ref":"#/components/schemas/LogMeal"},{"description":"The meal the call logged into, with every item in it"}]},"added":{"type":"array","items":{"type":"string","format":"uuid"},"description":"The items this call added (an Undo removes exactly these); empty for a repeat within 5 s"}},"required":["meal","added"]}],"description":"The first item logged (its fields, as before), its meal and the items added"},"LogAdd":{"anyOf":[{"type":"object","properties":{"date":{"type":"string","format":"date","example":"2026-10-08"},"time":{"type":["string","null"],"minLength":1,"maxLength":16,"example":"19:30"},"slot":{"type":"string","enum":["breakfast","lunch","dinner","snack"]},"servings":{"type":"number","exclusiveMinimum":0,"maximum":50},"mealId":{"type":"string","format":"uuid","description":"Add to this meal of yours (from GET /v1/me/log `meals`): its day, kind and time are used. Absent: a breakfast, lunch or dinner joins that day's meal of the same kind logged within 2 hours, else a new meal starts (bug158)"},"recipeId":{"type":"string","format":"uuid"},"plannedMealId":{"type":"string","format":"uuid","description":"The planned meal this cooked; it is marked cooked"}},"required":["date","slot","recipeId"],"additionalProperties":false},{"type":"object","properties":{"date":{"type":"string","format":"date","example":"2026-10-08"},"time":{"type":["string","null"],"minLength":1,"maxLength":16,"example":"19:30"},"slot":{"type":"string","enum":["breakfast","lunch","dinner","snack"]},"servings":{"type":"number","exclusiveMinimum":0,"maximum":50},"mealId":{"type":"string","format":"uuid","description":"Add to this meal of yours (from GET /v1/me/log `meals`): its day, kind and time are used. Absent: a breakfast, lunch or dinner joins that day's meal of the same kind logged within 2 hours, else a new meal starts (bug158)"},"name":{"type":"string","minLength":1,"maxLength":200},"portion":{"type":"string","minLength":1,"maxLength":60,"description":"The amount as typed (\"1 Venti\", \"200 g\")","example":"1 Venti"},"nutrition":{"type":"object","properties":{"kcal":{"type":"number","minimum":0,"maximum":20000},"proteinG":{"type":"number","minimum":0,"maximum":5000},"carbsG":{"type":"number","minimum":0,"maximum":5000},"fatG":{"type":"number","minimum":0,"maximum":5000}},"required":["kcal","proteinG","carbsG","fatG"],"additionalProperties":false,"description":"Per serving, as typed. Absent: the API estimates it (an earlier entry of the same food, a recipe by name, our ingredient reference by portion, the model) and records the basis; a name that lists several foods is logged as the meal's items"}},"required":["date","slot","name"],"additionalProperties":false},{"type":"object","properties":{"date":{"type":"string","format":"date","example":"2026-10-08"},"time":{"type":["string","null"],"minLength":1,"maxLength":16},"slot":{"type":"string","enum":["breakfast","lunch","dinner","snack"]},"mealId":{"type":"string","format":"uuid","description":"Add to this meal of yours (from GET /v1/me/log `meals`): its day, kind and time are used. Absent: a breakfast, lunch or dinner joins that day's meal of the same kind logged within 2 hours, else a new meal starts (bug158)"},"items":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"recipeId":{"type":"string","format":"uuid"},"servings":{"type":"number","exclusiveMinimum":0,"maximum":50},"plannedMealId":{"type":"string","format":"uuid"}},"required":["recipeId"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"portion":{"type":"string","minLength":1,"maxLength":60},"servings":{"type":"number","exclusiveMinimum":0,"maximum":50},"nutrition":{"type":"object","properties":{"kcal":{"type":"number","minimum":0,"maximum":20000},"proteinG":{"type":"number","minimum":0,"maximum":5000},"carbsG":{"type":"number","minimum":0,"maximum":5000},"fatG":{"type":"number","minimum":0,"maximum":5000}},"required":["kcal","proteinG","carbsG","fatG"],"additionalProperties":false},"basis":{"type":"string","enum":["typed","catalog","own_recipe","reference","model"],"description":"With nutrition: how those numbers were worked out when the API estimated them earlier (a Chef log proposal's `items`, bug192), so they are logged as shown with their basis. Absent: sent numbers are `typed`"}},"required":["name"],"additionalProperties":false}]},"minItems":1,"maxItems":12,"description":"The meal's items: recipes and foods (a food without nutrition is estimated alone)"}},"required":["date","slot","items"],"additionalProperties":false}]},"LogPatch":{"type":"object","properties":{"servings":{"type":"number","exclusiveMinimum":0,"maximum":50},"slot":{"type":"string","enum":["breakfast","lunch","dinner","snack"]},"time":{"type":["string","null"],"minLength":1,"maxLength":16},"portion":{"type":["string","null"],"minLength":1,"maxLength":60,"description":"A by-hand entry only: its new amount (\"1 Grande\"); the entry is estimated again (\"Fix\")"},"date":{"type":"string","format":"date","example":"2026-10-08","description":"Moves the item's whole meal to this day, as slot and time do (bug184)"}},"additionalProperties":false},"LogMealRemoved":{"type":"object","properties":{"removed":{"type":"boolean","enum":[true]},"items":{"type":"integer"}},"required":["removed","items"]},"GroceryList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/GroceryItem"}},"version":{"type":"string","description":"A digest of the list as it stands; also the ETag. Poll with If-None-Match: 304 until something changes"},"shared":{"type":"boolean","description":"This is a household’s shared list"}},"required":["items","version","shared"]},"GroceryItem":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"quantity":{"type":["number","null"]},"unit":{"type":["string","null"]},"aisle":{"type":"string","enum":["produce","dairy","meat_fish","pantry","frozen","bakery","other"]},"aisleSource":{"type":"string","enum":["rule","model","user"],"description":"What placed it: the word map, the model fallback, or the person (never re-sorted)"},"source":{"type":"string","enum":["manual","plan","recipe","due_again"],"description":"plan = derived from the planned recipes; recipe = \"add what I need\" from a card; due_again = a tapped due-again suggestion"},"forRecipeIds":{"type":"array","items":{"type":"string","format":"uuid"}},"ticked":{"type":"boolean"},"updatedAt":{"type":"string"},"checkedBy":{"type":["object","null"],"properties":{"memberId":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["memberId","name"],"description":"Who ticked it, in a household; null when unticked or not in a household"}},"required":["id","name","quantity","unit","aisle","aisleSource","source","forRecipeIds","ticked","updatedAt","checkedBy"]},"GroceryAdd":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"example":"lemons"},"quantity":{"type":["number","null"],"minimum":0,"maximum":1000000},"unit":{"type":["string","null"],"minLength":1,"maxLength":24},"aisle":{"type":"string","enum":["produce","dairy","meat_fish","pantry","frozen","bakery","other"],"description":"Guessed from the name when not given"},"source":{"type":"string","enum":["manual","recipe","due_again"],"description":"manual (default) = typed; recipe = \"add what I need\" from a recipe card; due_again = a tapped due-again suggestion (GET /v1/kitchen)"}},"required":["name"],"additionalProperties":false},"GroceryDerive":{"type":"object","properties":{"from":{"type":"string","format":"date","example":"2026-10-08"},"to":{"type":"string","format":"date","example":"2026-10-08"}},"required":["from","to"],"additionalProperties":false},"GroceryStores":{"type":"object","properties":{"stores":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["instacart","walmart","kroger"]},"name":{"type":"string"},"available":{"type":"boolean","description":"Built and shipped. false = hide the tile"},"connected":{"type":"boolean","description":"Our account with the store is set up (its key is in the vault)"}},"required":["id","name","available","connected"]}},"send":{"type":"object","properties":{"allowed":{"type":"boolean","description":"This household’s plan may send to a store"},"requiredTier":{"type":"string","enum":["free","plus","pro"]}},"required":["allowed","requiredTier"]}},"required":["stores","send"]},"GrocerySendPreview":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/GrocerySendLine"}},"skipped":{"type":"array","items":{"$ref":"#/components/schemas/GrocerySkippedLine"}}},"required":["items","skipped"]},"GrocerySendLine":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"quantity":{"type":["number","null"]},"unit":{"type":["string","null"]},"aisle":{"type":"string","enum":["produce","dairy","meat_fish","pantry","frozen","bakery","other"]}},"required":["id","name","quantity","unit","aisle"]},"GrocerySkippedLine":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Hand it back in addBack to send it anyway"},"name":{"type":"string"},"quantity":{"type":["number","null"]},"unit":{"type":["string","null"]},"aisle":{"type":"string","enum":["produce","dairy","meat_fish","pantry","frozen","bakery","other"]},"reason":{"type":"string","enum":["in_pantry"]},"pantryItemId":{"type":"string","format":"uuid"}},"required":["id","name","quantity","unit","aisle","reason","pantryItemId"]},"GrocerySendPreviewRequest":{"type":"object","properties":{"addBack":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":500,"description":"Skipped item ids to send anyway"}},"additionalProperties":false},"GrocerySendResult":{"type":"object","properties":{"store":{"type":"string","enum":["instacart","walmart","kroger"]},"url":{"type":"string","format":"uri","description":"The store page the person opens to finish checkout"},"sentCount":{"type":"integer"},"skippedCount":{"type":"integer"}},"required":["store","url","sentCount","skippedCount"]},"GrocerySendRequest":{"type":"object","properties":{"store":{"type":"string","enum":["instacart","walmart","kroger"]},"addBack":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":500}},"required":["store"],"additionalProperties":false},"GroceryText":{"type":"object","properties":{"text":{"type":"string"},"itemCount":{"type":"integer"},"skippedCount":{"type":"integer"}},"required":["text","itemCount","skippedCount"]},"GroceryTripList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/GroceryTrip"}}},"required":["items"]},"GroceryTrip":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"shoppedAt":{"type":"string"},"store":{"type":["string","null"]},"items":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"qty":{"type":["number","null"]},"unit":{"type":["string","null"]},"fromPlan":{"type":"boolean"}},"required":["name","qty","unit","fromPlan"]}},"itemCount":{"type":"integer"},"planEventId":{"type":["string","null"],"format":"uuid"},"cost":{"$ref":"#/components/schemas/GroceryTripCost"}},"required":["id","shoppedAt","store","items","itemCount","planEventId","cost"]},"GroceryTripCost":{"type":["object","null"],"properties":{"mode":{"type":["string","null"],"enum":["delivery","pickup","in_store",null]},"service":{"type":["string","null"]},"subtotal":{"type":["number","null"]},"deliveryFee":{"type":["number","null"]},"serviceFee":{"type":["number","null"]},"tip":{"type":["number","null"]},"total":{"type":["number","null"]},"currency":{"type":"string"}},"required":["mode","service","subtotal","deliveryFee","serviceFee","tip","total","currency"],"description":"What the trip cost, as the person entered it (0370, plan 6 G1); dollars in `currency`"},"GroceryTripAdd":{"type":"object","properties":{"shoppedAt":{"type":"string","format":"date-time"},"store":{"type":["string","null"],"minLength":1,"maxLength":60},"items":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"qty":{"type":["number","null"],"exclusiveMinimum":0,"maximum":100000},"unit":{"type":["string","null"],"minLength":1,"maxLength":24},"fromPlan":{"type":"boolean"}},"required":["name"],"additionalProperties":false},"minItems":1,"maxItems":300},"planEventId":{"type":"string","format":"uuid"},"cost":{"$ref":"#/components/schemas/GroceryTripCostSet"}},"required":["items"],"additionalProperties":false},"GroceryTripCostSet":{"type":"object","properties":{"mode":{"type":["string","null"],"enum":["delivery","pickup","in_store",null]},"service":{"type":["string","null"],"minLength":1,"maxLength":40},"subtotal":{"type":["number","null"],"minimum":0,"maximum":100000},"deliveryFee":{"type":["number","null"],"minimum":0,"maximum":10000},"serviceFee":{"type":["number","null"],"minimum":0,"maximum":10000},"tip":{"type":["number","null"],"minimum":0,"maximum":10000},"total":{"type":["number","null"],"minimum":0,"maximum":100000}},"additionalProperties":false,"description":"Dollars, to the cent. Replaces the trip’s costs; a field left out is cleared"},"GroceryCosts":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"spend":{"type":"object","properties":{"trips":{"type":"integer"},"withCosts":{"type":"integer"},"byMode":{"type":"object","properties":{"delivery":{"type":"integer"},"pickup":{"type":"integer"},"in_store":{"type":"integer"},"unknown":{"type":"integer"}},"required":["delivery","pickup","in_store","unknown"]},"total":{"type":["number","null"]},"fees":{"type":["number","null"]},"tips":{"type":["number","null"]}},"required":["trips","withCosts","byMode","total","fees","tips"]},"membership":{"type":["object","null"],"properties":{"priceMonthly":{"type":"number"},"waives":{"type":"array","items":{"type":"string","enum":["delivery","service"]}},"months":{"type":"integer"},"deliveries":{"type":"integer"},"feesPaid":{"type":"number"},"membershipCost":{"type":"number"},"difference":{"type":"number"},"text":{"type":"string"}},"required":["priceMonthly","waives","months","deliveries","feesPaid","membershipCost","difference","text"],"description":"Only with membershipMonthly and delivery trips that carry the fees it waives"},"tips":{"type":"object","properties":{"count":{"type":"integer"},"avgTip":{"type":["number","null"]},"avgPctOfSubtotal":{"type":["number","null"]},"history":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"store":{"type":["string","null"]},"service":{"type":["string","null"]},"tip":{"type":"number"},"pctOfSubtotal":{"type":["number","null"]}},"required":["date","store","service","tip","pctOfSubtotal"]}},"policies":{"type":"array","items":{"type":"object","properties":{"service":{"type":"string"},"url":{"type":"string","format":"uri"},"says":{"type":"string"},"read":{"type":"string"}},"required":["service","url","says","read"]}}},"required":["count","avgTip","avgPctOfSubtotal","history","policies"],"description":"Their own tip history beside the service’s published tip page where one is on record; never a \"should tip\" number"}},"required":["from","to","spend","membership","tips"]},"GroceryShare":{"type":"object","properties":{"title":{"type":"string"},"text":{"type":"string"}},"required":["title","text"],"description":"The Web Share API payload: navigator.share(this)"},"GrocerySort":{"type":"object","properties":{"sorted":{"type":"integer"},"state":{"type":"string","enum":["sorted","nothing","off","refused"]}},"required":["sorted","state"]},"GroceryPatch":{"type":"object","properties":{"ticked":{"type":"boolean","description":"true also puts the item in the pantry, unless pantry is false"},"pantry":{"type":"boolean","description":"false: tick it into the trolley only; the pantry is written later (the web list’s Done shopping)"},"quantity":{"type":["number","null"],"minimum":0,"maximum":1000000},"unit":{"type":["string","null"],"minLength":1,"maxLength":24},"aisle":{"type":"string","enum":["produce","dairy","meat_fish","pantry","frozen","bakery","other"]}},"additionalProperties":false},"Insights":{"type":"object","properties":{"range":{"type":"string","enum":["week","month"]},"from":{"type":"string","description":"The first day the numbers read (today when nothing is logged)"},"to":{"type":"string","description":"The last day the numbers read (today when nothing is logged)"},"days":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"totals":{"$ref":"#/components/schemas/Nutrition"}},"required":["date","totals"]},"description":"The logged days the numbers read; an unlogged day is never one of them"},"targets":{"type":"object","properties":{"kcal":{"type":["number","null"]},"proteinG":{"type":["number","null"]}},"required":["kcal","proteinG"]},"proteinHitDays":{"type":["integer","null"],"description":"Logged days at or over the protein target; null with no target"},"loggedDays":{"type":"integer"},"loggedDaysEver":{"type":"integer","description":"Every day the caller has ever logged"},"ready":{"type":"boolean","description":"Three or more logged days ever: show the overview, not the first-week ask"},"basedOn":{"type":"string","description":"\"Based on 3 days (28 Oct, 29 Oct, 30 Oct)\""},"avgKcal":{"type":["number","null"],"description":"Mean over logged days; null when nothing was logged"},"plannedMeals":{"type":"integer"},"cookedFromPlan":{"type":"integer"}},"required":["range","from","to","days","targets","proteinHitDays","loggedDays","loggedDaysEver","ready","basedOn","avgKcal","plannedMeals","cookedFromPlan"]},"LifetimeInsights":{"type":"object","properties":{"today":{"type":"string"},"lifetime":{"type":"object","properties":{"loggedDays":{"type":"integer"},"avgKcal":{"type":["number","null"]},"avgProteinG":{"type":["number","null"]},"recentShare":{"type":["number","null"],"description":"Share of the weight carried by the last 14 days (0 to 1)"},"restsOn":{"type":"string","description":"\"Over 41 logged days, mostly the last 2 weeks\""},"halfLifeDays":{"type":"integer"}},"required":["loggedDays","avgKcal","avgProteinG","recentShare","restsOn","halfLifeDays"],"description":"Every logged day (up to 2 years), weighted toward recent days (half-life 14 days); null when nothing is logged"},"patterns":{"type":"object","properties":{"slots":{"type":"array","items":{"$ref":"#/components/schemas/InsightPattern"}},"weekdays":{"type":"array","items":{"$ref":"#/components/schemas/InsightPattern"}}},"required":["slots","weekdays"],"description":"Per meal slot (last 365 days) and weekday, only where 5 or more days hold data, each with its count"},"workflow":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"planned":{"type":"integer"},"cooked":{"type":"integer"},"eaten":{"type":"integer"},"skipped":{"type":"integer"},"trips":{"type":"integer"},"leftoversExpired":{"type":"integer","description":"Leftovers items past their date with servings still in them"}},"required":["from","to","planned","cooked","eaten","skipped","trips","leftoversExpired"],"description":"The last 90 days: planned vs cooked vs eaten vs skipped, shopping trips, leftovers that expired unused"},"suggestions":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["skipped_weekday","leftovers_expired","protein_short"]},"text":{"type":"string"},"count":{"type":"number"},"of":{"type":"number"}},"required":["kind","text","count","of"]},"description":"By rule only, each from the counts it states; empty when no rule fires"},"months":{"type":"array","items":{"type":"object","properties":{"month":{"type":"string"},"label":{"type":"string"},"loggedDays":{"type":"integer"},"avgKcal":{"type":["number","null"]},"proteinDays":{"type":["integer","null"]},"planned":{"type":"integer"},"cooked":{"type":"integer"},"cookRate":{"type":["number","null"]},"weightChangeKg":{"type":["number","null"]}},"required":["month","label","loggedDays","avgKcal","proteinDays","planned","cooked","cookRate","weightChangeKg"]},"description":"The last 6 calendar months, oldest first"}},"required":["today","lifetime","patterns","workflow","suggestions","months"]},"InsightPattern":{"type":"object","properties":{"key":{"type":"string"},"days":{"type":"integer"},"avgKcal":{"type":"number"},"avgProteinG":{"type":"number"},"basedOn":{"type":"string"}},"required":["key","days","avgKcal","avgProteinG","basedOn"]},"FavoriteList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Favorite"}}},"required":["items"]},"Favorite":{"type":"object","properties":{"recipeId":{"type":"string","format":"uuid"},"recipe":{"type":["object","null"],"properties":{"slug":{"type":"string"},"title":{"type":"string"},"coverImageUrl":{"type":["string","null"]},"minutes":{"type":["number","null"]},"kcal":{"type":["number","null"]},"proteinG":{"type":["number","null"]}},"required":["slug","title","coverImageUrl","minutes","kcal","proteinG"],"description":"The catalog’s own fields; null if the recipe has since been unpublished"},"savedAt":{"type":"string"}},"required":["recipeId","recipe","savedAt"]},"RatingList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Rating"}}},"required":["items"]},"Rating":{"type":"object","properties":{"recipeId":{"type":"string","format":"uuid"},"stars":{"type":"integer","minimum":1,"maximum":5},"updatedAt":{"type":"string"}},"required":["recipeId","stars","updatedAt"]},"RatingPut":{"type":"object","properties":{"stars":{"type":"integer","minimum":1,"maximum":5}},"required":["stars"],"additionalProperties":false},"RecipeDraft":{"type":"object","properties":{"title":{"type":"string"},"servings":{"type":["integer","null"]},"ingredients":{"type":"array","items":{"$ref":"#/components/schemas/DraftIngredient"}},"steps":{"type":"array","items":{"type":"string"}},"imageUrl":{"type":["string","null"]},"sourceUrl":{"type":["string","null"]},"sourceKind":{"type":"string","enum":["web","instagram","tiktok","text","photo","manual","chef"]},"nutritionEstimate":{"$ref":"#/components/schemas/NutritionEstimate"},"estimated":{"type":"boolean","enum":[true]},"nutritionBasis":{"type":"string","enum":["reference","source","model","none"],"description":"reference = our ingredient data; source = the page’s own numbers; model = an AI estimate; none = not worked out"},"via":{"type":"string","enum":["json-ld","caption","text","model","vision"]},"notes":{"type":"array","items":{"type":"string"},"description":"Plain words about anything to check before saving"},"review":{"type":"object","properties":{"needed":{"type":"boolean","description":"true = show \"needs review\": the draft is missing something to cook from"},"missing":{"type":"array","items":{"type":"string","enum":["steps","amounts","servings"]}},"servingsHint":{"type":["integer","null"],"description":"About how many the meat serves (170 g raw a serving, an estimate); null when it cannot tell"}},"required":["needed","missing","servingsHint"],"description":"What the draft still needs checking"}},"required":["title","servings","ingredients","steps","imageUrl","sourceUrl","sourceKind","nutritionEstimate","estimated","nutritionBasis","via","notes","review"]},"DraftIngredient":{"type":"object","properties":{"qty":{"type":["number","null"],"exclusiveMinimum":0},"unit":{"type":["string","null"],"maxLength":40},"name":{"type":"string","minLength":1,"maxLength":300},"section":{"type":["string","null"],"minLength":1,"maxLength":60,"description":"The group the recipe lists it under (\"For the sauce\", \"Dredge\"); absent = no group"}},"required":["qty","unit","name"],"additionalProperties":false},"NutritionEstimate":{"type":["object","null"],"properties":{"kcal":{"type":["number","null"]},"proteinG":{"type":["number","null"]},"carbsG":{"type":["number","null"]},"fatG":{"type":["number","null"]}},"required":["kcal","proteinG","carbsG","fatG"],"additionalProperties":false,"description":"Per serving. Always an estimate: see nutritionBasis"},"RecipeImport":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"description":"A recipe site, a TikTok video or an Instagram post","example":"https://www.allrecipes.com/recipe/12345/lemon-chicken/"},"text":{"type":"string","maxLength":20000,"description":"Pasted text: a caption, a typed recipe, or a share message holding a link"},"imageBase64":{"type":"string","maxLength":7000000,"description":"A photo of a recipe card or cookbook page (JPEG, PNG, WebP or GIF, at most 5 MB), base64; read once, never stored"}},"additionalProperties":false,"description":"Exactly one of url, text or imageBase64"},"UserRecipeList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/UserRecipe"}},"saved":{"type":"object","properties":{"used":{"type":"integer"},"cap":{"type":["integer","null"]}},"required":["used","cap"],"description":"Saved recipes (your own + saved catalog recipes) and the plan’s cap; cap null = no cap (Plus, Pro)"}},"required":["items","saved"]},"UserRecipe":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"servings":{"type":["integer","null"]},"ingredients":{"type":"array","items":{"$ref":"#/components/schemas/DraftIngredient"}},"steps":{"type":"array","items":{"type":"string"}},"imageUrl":{"type":["string","null"]},"sourceUrl":{"type":["string","null"]},"sourceKind":{"type":"string","enum":["web","instagram","tiktok","text","photo","manual","chef"]},"sourceThreadId":{"type":["string","null"]},"nutritionEstimate":{"$ref":"#/components/schemas/NutritionEstimate"},"estimated":{"type":"boolean","enum":[true]},"nutritionBasis":{"type":"string","enum":["reference","source","model","none"]},"gaps":{"type":"array","items":{"type":"string","enum":["steps","amounts","servings","nutrition","image"]},"description":"What GreenplateAi found still missing (0330); rewritten on every reconciliation pass"},"fillsToReview":{"type":"integer","description":"Changes GreenplateAi made on its own, not yet accepted or undone (recipe_fills; the connector’s my_recipe_review)"},"needsReview":{"type":"boolean","description":"A change to look at, or steps, amounts or servings still missing: the app’s “Needs review”"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"alreadySaved":{"type":"boolean","description":"POST /v1/me/recipes only: true when this link was already saved, so that recipe was replaced and no copy was added"}},"required":["id","title","servings","ingredients","steps","imageUrl","sourceUrl","sourceKind","sourceThreadId","nutritionEstimate","estimated","nutritionBasis","gaps","fillsToReview","needsReview","createdAt","updatedAt"]},"UserRecipeSave":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"servings":{"type":["integer","null"],"minimum":1,"maximum":100},"ingredients":{"type":"array","items":{"$ref":"#/components/schemas/DraftIngredient"},"maxItems":100},"steps":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":100},"imageUrl":{"type":["string","null"],"maxLength":2048},"sourceUrl":{"type":["string","null"],"maxLength":2048},"sourceKind":{"type":"string","enum":["web","instagram","tiktok","text","photo","manual","chef"],"description":"chef = a recipe Ask Chef wrote in a chat"},"sourceThreadId":{"type":["string","null"],"minLength":1,"maxLength":200,"description":"For a chef recipe: the chat thread it came from"},"nutritionEstimate":{"$ref":"#/components/schemas/NutritionEstimate"},"nutritionBasis":{"type":"string","enum":["reference","source","model","none"]},"estimated":{"type":"boolean","enum":[true]}},"required":["title","ingredients","steps","sourceKind"],"additionalProperties":false,"description":"A draft from POST /v1/me/recipes/import (its via and notes left out), as edited"},"UserRecipePatch":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"servings":{"type":["integer","null"],"minimum":1,"maximum":100},"ingredients":{"type":"array","items":{"$ref":"#/components/schemas/DraftIngredient"},"maxItems":100},"steps":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":100},"imageUrl":{"type":["string","null"],"maxLength":2048},"nutritionEstimate":{"$ref":"#/components/schemas/NutritionEstimate"}},"additionalProperties":false},"WeightList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/WeightEntry"}}},"required":["items"]},"WeightEntry":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"date":{"type":"string"},"weightKg":{"type":"number","description":"Stored in kg whatever unit was typed"},"unit":{"type":"string","enum":["kg","lb"],"description":"The unit it was typed in"},"value":{"type":"number","description":"The reading in `unit`, one decimal"},"loggedAt":{"type":["string","null"],"description":"When the reading was taken (an ISO instant); null when it was saved with a date only"},"updatedAt":{"type":"string"}},"required":["id","date","weightKg","unit","value","loggedAt","updatedAt"]},"WeightAdd":{"type":"object","properties":{"date":{"type":"string","format":"date","example":"2026-10-08","description":"The person’s LOCAL day of the reading (never a UTC day)"},"value":{"type":"number","exclusiveMinimum":0,"maximum":1000,"example":78.4},"unit":{"type":"string","enum":["kg","lb"],"description":"kg when absent"},"at":{"type":"string","description":"When it was taken, an ISO instant with offset (e.g. 2026-10-22T23:48:00-04:00); absent = time not known","example":"2026-10-22T23:48:00-04:00"}},"required":["date","value"],"additionalProperties":false},"KitList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/KitItem"}}},"required":["items"]},"KitItem":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"item":{"type":"string","description":"A vocabulary key (air-fryer, dutch-oven, baking-dish, …) or a free name, lowercased"},"label":{"type":"string"},"has":{"type":"boolean","description":"true: they have it; false: they said they don’t"},"size":{"type":["string","null"],"description":"In their words, for pan sizing: \"9x13 in\", \"8 in\" (round), \"6 qt\"; null when not said"},"source":{"type":"string","enum":["said","photo","inferred"]},"learnedAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","item","label","has","size","source","learnedAt","updatedAt"]},"KitSetResult":{"type":"object","properties":{"understood":{"type":"array","items":{"$ref":"#/components/schemas/KitItem"},"description":"What was read from `said` (empty: nothing in it was kit we know), or the items given"},"items":{"type":"array","items":{"$ref":"#/components/schemas/KitItem"}}},"required":["understood","items"]},"KitSet":{"type":"object","properties":{"said":{"type":"string","minLength":1,"maxLength":500,"description":"What the person said, in their words (\"I don’t have an air fryer\"); read by rule, no model call"},"items":{"type":"array","items":{"type":"object","properties":{"item":{"type":"string","minLength":1,"maxLength":60},"has":{"type":"boolean"},"size":{"type":["string","null"],"minLength":1,"maxLength":40},"label":{"type":"string","minLength":1,"maxLength":80}},"required":["item","has"]},"maxItems":30}},"description":"Either `said` or `items`. Saying an item again replaces it."},"KitCheck":{"type":"object","properties":{"recipe":{"type":"object","properties":{"slug":{"type":"string"},"title":{"type":"string"}},"required":["slug","title"]},"needs":{"type":"array","items":{"type":"string"},"description":"The kit its steps name (vocabulary keys). Basic kit (bowls, knives, a pan, a pot, the stove) is never listed"},"missing":{"type":"array","items":{"type":"object","properties":{"item":{"type":"string"},"label":{"type":"string"},"swap":{"$ref":"#/components/schemas/KitSwap"}},"required":["item","label","swap"]},"description":"Needs the person SAID they don’t have; kit nobody mentioned is never flagged. A swap only where one is sourced"},"scale":{"type":["object","null"],"properties":{"recipeSize":{"type":"string"},"yourSize":{"type":"string"},"factor":{"type":"number"},"note":{"type":"string"},"source":{"type":"string","format":"uri"}},"required":["recipeSize","yourSize","factor","note","source"],"description":"The batch scaled by pan area to their own baking dish, when the steps name a pan size and theirs differs"}},"required":["recipe","needs","missing","scale"]},"KitSwap":{"type":["object","null"],"properties":{"instead":{"type":"string"},"use":{"type":"string"},"how":{"type":"string"},"source":{"type":"string","format":"uri"}},"required":["instead","use","how","source"]},"KitPlanCheck":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"mealId":{"type":"string"},"date":{"type":"string"},"slot":{"type":"string"},"check":{"$ref":"#/components/schemas/KitCheck"}},"required":["mealId","date","slot","check"]}}},"required":["items"]},"FeedbackSent":{"type":"object","properties":{"feedback":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["request","blocker","bug","idea"]},"text":{"type":"string"},"context":{"type":["string","null"]},"screen":{"type":["string","null"]},"via":{"type":"string","enum":["person","agent"]},"count":{"type":"integer","description":"How many times it was raised"},"topic":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"status":{"type":"string","enum":["received","planned","in_progress","shipped","not_planned"],"description":"What the team decided: received, planned, in_progress, shipped or not_planned"},"reply":{"type":["string","null"],"description":"The team’s reply, in plain words"},"link":{"type":["string","null"],"description":"A public page about what shipped"},"statusAt":{"type":["string","null"],"description":"When the status last changed"}},"required":["id","kind","text","context","screen","via","count","topic","createdAt","updatedAt","status","reply","link","statusAt"]},"alreadyRaised":{"type":"boolean","description":"True when this household raised the same thing in the last 30 days: it was counted again, not stored twice"},"message":{"type":"string"}},"required":["feedback","alreadyRaised","message"]},"FeedbackSend":{"type":"object","properties":{"kind":{"type":"string","enum":["request","blocker","bug","idea"]},"text":{"type":"string","minLength":1,"maxLength":2000,"example":"Let me reserve pantry items for planned dishes"},"context":{"type":"string","minLength":0,"maxLength":1000},"screen":{"type":"string","minLength":0,"maxLength":80,"description":"The screen or tool it was about"}},"required":["kind","text"],"additionalProperties":false},"MyFeedbackList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/MyFeedback"}}},"required":["items"]},"MyFeedback":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["request","blocker","bug","idea"]},"text":{"type":"string"},"context":{"type":["string","null"]},"screen":{"type":["string","null"]},"via":{"type":"string","enum":["person","agent"]},"count":{"type":"integer","description":"How many times it was raised"},"topic":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"status":{"type":"string","enum":["received","planned","in_progress","shipped","not_planned"],"description":"What the team decided: received, planned, in_progress, shipped or not_planned"},"reply":{"type":["string","null"],"description":"The team’s reply, in plain words"},"link":{"type":["string","null"],"description":"A public page about what shipped"},"statusAt":{"type":["string","null"],"description":"When the status last changed"},"history":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["received","planned","in_progress","shipped","not_planned"]},"reply":{"type":["string","null"]},"link":{"type":["string","null"]},"at":{"type":"string"}},"required":["status","reply","link","at"]},"description":"Every change, oldest first"}},"required":["id","kind","text","context","screen","via","count","topic","createdAt","updatedAt","status","reply","link","statusAt","history"]},"Preferences":{"type":"object","properties":{"notifications":{"$ref":"#/components/schemas/NotificationPreferences"},"appearance":{"type":"string","enum":["light","dark"]},"startScreen":{"type":"string","enum":["today","plan","recipes","pantry"]},"units":{"type":"string","enum":["metric","us"]},"weightUnit":{"type":"string","enum":["kg","lb"]},"energyUnit":{"type":"string","enum":["kcal","kj"]},"planReminders":{"$ref":"#/components/schemas/PlanReminders"},"usageAnalytics":{"type":"boolean","description":"Usage analytics: true sends server-side product events (account id, counts, no content); unset or false sends none"},"timeZone":{"type":"string","maxLength":64,"description":"The household’s IANA time zone (America/New_York): saved from the app’s X-GP-TZ when it changes, or set here. The MCP `now` tool answers in it"},"updatedAt":{"type":["string","null"],"description":"null until the first save; an unset key is the app’s own default"}},"required":["updatedAt"]},"NotificationPreferences":{"type":"object","properties":{"weekly":{"type":"boolean"},"remind":{"type":"boolean"},"expiry":{"type":"boolean"},"plan":{"type":"boolean"},"prep":{"type":"boolean"},"news":{"type":"boolean"},"activity":{"type":"boolean","description":"In-app Notifications: what the person logs and what it unlocks (meals, weigh-ins, streaks, goals). Absent = on"}},"additionalProperties":false},"PlanReminders":{"type":"object","properties":{"done":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"},"maxItems":200,"description":"Plan reminders marked done (hidden)"},"snoozed":{"type":"object","additionalProperties":{"type":"string"},"description":"Snoozed reminders → until when (ISO 8601). A passed snooze is not returned"}},"required":["done","snoozed"],"additionalProperties":false},"PreferencesPatch":{"type":"object","properties":{"notifications":{"type":["object","null"],"properties":{"weekly":{"type":"boolean"},"remind":{"type":"boolean"},"expiry":{"type":"boolean"},"plan":{"type":"boolean"},"prep":{"type":"boolean"},"news":{"type":"boolean"},"activity":{"type":"boolean","description":"In-app Notifications: what the person logs and what it unlocks (meals, weigh-ins, streaks, goals). Absent = on"}},"additionalProperties":false,"description":"Merged per toggle; null clears all"},"appearance":{"type":["string","null"],"enum":["light","dark",null]},"startScreen":{"type":["string","null"],"enum":["today","plan","recipes","pantry",null]},"units":{"type":["string","null"],"enum":["metric","us",null]},"weightUnit":{"type":["string","null"],"enum":["kg","lb",null]},"energyUnit":{"type":["string","null"],"enum":["kcal","kj",null]},"planReminders":{"type":["object","null"],"properties":{"done":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"},"maxItems":200,"description":"Plan reminders marked done (hidden)"},"snoozed":{"type":"object","additionalProperties":{"type":"string"},"description":"Snoozed reminders → until when (ISO 8601). A passed snooze is not returned"}},"required":["done","snoozed"],"additionalProperties":false,"description":"Replaced whole"},"usageAnalytics":{"type":["boolean","null"],"description":"Usage analytics: true sends server-side product events (account id, counts, no content); unset or false sends none"},"timeZone":{"type":["string","null"],"maxLength":64,"description":"The household’s IANA time zone (America/New_York): saved from the app’s X-GP-TZ when it changes, or set here. The MCP `now` tool answers in it"}},"additionalProperties":false},"AccountExport":{"type":"object","properties":{"exportedAt":{"type":"string"},"account":{"type":"object","properties":{"userId":{"type":"string","format":"uuid"},"tenantId":{"type":"string"},"band":{"type":"string"},"createdAt":{"type":"string"}},"required":["userId","tenantId","band","createdAt"]},"entitlement":{"$ref":"#/components/schemas/Entitlement"},"profile":{"$ref":"#/components/schemas/Profile"},"preferences":{"$ref":"#/components/schemas/Preferences"},"pantry":{"type":"array","items":{"$ref":"#/components/schemas/PantryItem"}},"groceries":{"type":"array","items":{"$ref":"#/components/schemas/GroceryItem"}},"plannedMeals":{"type":"array","items":{"$ref":"#/components/schemas/PlannedMeal"}},"planEvents":{"type":"array","items":{"$ref":"#/components/schemas/PlanEvent"}},"log":{"type":"array","items":{"$ref":"#/components/schemas/LogEntry"}},"favorites":{"type":"array","items":{"$ref":"#/components/schemas/Favorite"}},"ratings":{"type":"array","items":{"$ref":"#/components/schemas/Rating"}},"userRecipes":{"type":"array","items":{"$ref":"#/components/schemas/UserRecipe"}},"weights":{"type":"array","items":{"$ref":"#/components/schemas/WeightEntry"}},"chefThreads":{"type":"array","items":{"$ref":"#/components/schemas/ChefThread"}},"collections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"createdAt":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"recipeRef":{"type":"string"},"addedAt":{"type":"string"}},"required":["recipeRef","addedAt"]}}},"required":["id","name","createdAt","items"]},"description":"Your named recipe collections with the recipe ids in each (a catalog recipe or one of your own). Favourites is `favorites`."},"storeSends":{"type":"array","items":{"$ref":"#/components/schemas/StoreSend"}},"taste":{"type":"object","properties":{"facts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"key":{"type":"string"},"kind":{"type":"string"},"text":{"type":"string"},"source":{"type":"string"},"phrasedBy":{"type":"string"},"sourceSummary":{"type":"string"},"evidenceCount":{"type":"integer"},"updatedAt":{"type":"string"},"forgottenAt":{"type":["string","null"]}},"required":["id","key","kind","text","source","phrasedBy","sourceSummary","evidenceCount","updatedAt","forgottenAt"]}},"signals":{"type":"array","items":{"type":"object","properties":{"signal":{"type":"string"},"recipeId":{"type":["string","null"]},"plannedMealId":{"type":["string","null"]},"value":{"type":["integer","null"]},"subject":{"type":["string","null"]},"at":{"type":"string"}},"required":["signal","recipeId","plannedMealId","value","subject","at"]}}},"required":["facts","signals"],"description":"Taste memory: every fact (forgotten ones kept only so they are never learned again) and every signal behind them"},"consents":{"type":"array","items":{"type":"object","properties":{"policyKind":{"type":"string"},"policyVersion":{"type":"string"},"decision":{"type":"string"},"method":{"type":"string"},"at":{"type":"string"}},"required":["policyKind","policyVersion","decision","method","at"]}},"household":{"type":["object","null"],"properties":{"role":{"type":"string","enum":["owner","member"]},"member":{"$ref":"#/components/schemas/HouseholdMember"}},"required":["role","member"],"description":"Your own row in your household (name, goals, allergies, meals), wherever the household is; null when none"},"referralCodes":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"createdAt":{"type":"string"}},"required":["code","createdAt"]},"description":"Your own referral code"},"referrals":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"joinedAt":{"type":"string"}},"required":["code","joinedAt"]},"description":"The referral code you joined with, if any"},"votes":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"subject":{"type":"string"},"vote":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["kind","subject","vote","createdAt","updatedAt"]},"description":"Your Vibes votes: like, pass or skip on each table and dish. The totals GreenplateAi keeps name no one and are not here"}},"required":["exportedAt","account","entitlement","profile","preferences","pantry","groceries","plannedMeals","planEvents","log","favorites","ratings","userRecipes","weights","chefThreads","collections","storeSends","taste","consents","household","referralCodes","referrals","votes"]},"ChefThread":{"type":"object","properties":{"id":{"type":"string","example":"t1761300000000"},"title":{"type":"string"},"msgs":{"type":"array","items":{"type":"object","additionalProperties":{},"description":"One message in the app’s shape (me/chef, text, and the cards it carries); stored as given"}},"tour":{"type":["integer","null"],"description":"The getting-started tour’s step while it is open; null after"},"at":{"type":"integer","description":"The thread’s last activity, ms since the epoch: History’s order"},"updatedAt":{"type":"string"}},"required":["id","title","msgs","tour","at","updatedAt"]},"StoreSend":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"store":{"type":"string","enum":["instacart","walmart","kroger"]},"sentCount":{"type":"integer"},"skippedCount":{"type":"integer"},"itemIds":{"type":"array","items":{"type":"string"}},"url":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","store","sentCount","skippedCount","itemIds","url","createdAt"]},"HouseholdMember":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"role":{"type":"string","enum":["owner","member"]},"displayName":{"type":"string"},"joinedAt":{"type":"string"},"goals":{"type":"object","properties":{"kcal":{"type":["integer","null"]},"proteinG":{"type":["integer","null"]}},"required":["kcal","proteinG"]},"allergens":{"type":"array","items":{"type":"string"}},"dislikes":{"type":"array","items":{"type":"string"}},"eatsWith":{"type":"object","properties":{"breakfast":{"type":"boolean"},"lunch":{"type":"boolean"},"dinner":{"type":"boolean"}},"required":["breakfast","lunch","dinner"]}},"required":["id","role","displayName","joinedAt","goals","allergens","dislikes","eatsWith"]},"AccountDeleted":{"type":"object","properties":{"deleted":{"type":"boolean","enum":[true]},"requestId":{"type":"string","format":"uuid","description":"The erasure receipt"},"deletedAt":{"type":"string"},"removed":{"type":"object","additionalProperties":{"type":"integer"},"description":"Rows deleted, per table"},"retained":{"type":"array","items":{"type":"string"},"description":"What is kept, and why, in plain words"}},"required":["deleted","requestId","deletedAt","removed","retained"]},"TasteView":{"type":"object","properties":{"entitled":{"type":"boolean","description":"Plus, Pro or the trial. false = the Free preview"},"preview":{"type":"boolean"},"max":{"type":"integer","description":"The most facts ever shown"},"facts":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/TasteFact"},{"$ref":"#/components/schemas/TastePreviewFact"}]},"description":"The person’s own facts, or (Free) example cards flagged `example: true` — never their data"},"upgrade":{"type":["string","null"],"enum":["plus",null]}},"required":["entitled","preview","max","facts","upgrade"]},"TasteFact":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"key":{"type":"string","description":"What the fact is about, stable across rewording: cuisine:thai, ingredient:mushrooms, time:quick"},"kind":{"type":"string","enum":["likes","dislikes","cuisine","time","habit"],"description":"`dislikes` is the only negative kind"},"text":{"type":"string","example":"Loves spicy food"},"source":{"type":"string","enum":["learned","stated"],"description":"stated = the person wrote or edited it; learning never changes its words"},"sourceSummary":{"type":"string","example":"from 4 ratings and 2 chats"},"evidenceCount":{"type":"integer"},"editedByYou":{"type":"boolean"},"example":{"type":"boolean","enum":[false]},"updatedAt":{"type":"string"}},"required":["id","key","kind","text","source","sourceSummary","evidenceCount","editedByYou","example","updatedAt"]},"TastePreviewFact":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"kind":{"type":"string","enum":["likes","dislikes","cuisine","time","habit"]},"text":{"type":"string"},"sourceSummary":{"type":"string"},"example":{"type":"boolean","enum":[true]}},"required":["id","key","kind","text","sourceSummary","example"]},"TasteForgetAll":{"type":"object","properties":{"forgotten":{"type":"boolean","enum":[true]},"facts":{"type":"integer"},"signals":{"type":"integer"}},"required":["forgotten","facts","signals"]},"TasteFactPatch":{"type":"object","properties":{"text":{"type":"string","minLength":2,"maxLength":120,"example":"Loves Thai and Vietnamese food"}},"required":["text"],"additionalProperties":false},"TasteForgotten":{"type":"object","properties":{"forgotten":{"type":"boolean","enum":[true]}},"required":["forgotten"]},"CookedRating":{"type":"object","properties":{"plannedMealId":{"type":"string","format":"uuid"},"verdict":{"type":"string","enum":["loved","not_for_us","skip"]},"recorded":{"type":"boolean","description":"false for skip, and on Free (nothing is learned about a Free household)"},"status":{"type":"string","enum":["planned","cooked","skipped"],"description":"The planned meal’s status after the answer (a planned meal is marked cooked)"}},"required":["plannedMealId","verdict","recorded","status"]},"CookedRatingBody":{"type":"object","properties":{"verdict":{"type":"string","enum":["loved","not_for_us","skip"],"description":"The \"How was it?\" sheet: Loved it / Not for us / Skip"}},"required":["verdict"],"additionalProperties":false},"ChefAnswer":{"type":"object","properties":{"kind":{"type":"string","enum":["reply","plan"]},"reply":{"type":"string"},"recipes":{"type":"array","items":{"type":"object","properties":{"recipeId":{"type":"string","format":"uuid"},"slug":{"type":"string"},"title":{"type":"string"},"because":{"type":["string","null"],"description":"The \"Because you liked …\" chip from the person’s taste memory (Plus/Pro); null = no chip"}},"required":["recipeId","slug","title","because"]},"description":"Every recipe the chef named, resolved against the published catalog in this call"},"proposal":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"slot":{"type":"string","enum":["breakfast","lunch","dinner"]},"recipeId":{"type":"string","format":"uuid"},"recipe":{"type":"object","properties":{"slug":{"type":"string"},"title":{"type":"string"},"kcal":{"type":["number","null"]},"proteinG":{"type":["number","null"]}},"required":["slug","title","kcal","proteinG"]},"because":{"type":["string","null"],"description":"The \"Because you liked …\" chip; null = no chip"}},"required":["date","slot","recipeId","recipe","because"]},"description":"A proposed plan: NOT stored. Approving it is POST /v1/me/plan per row"},"dropped":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"slot":{"type":"string"},"why":{"type":"string"}},"required":["date","slot","why"]},"description":"Meals the plan could not fill (not in the catalog, an avoided ingredient, missing), said rather than replaced"},"actions":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["pantry_add","grocery_add","log_add","plan_add","weight_add"]},"label":{"type":"string","description":"The button’s words, fixed: \"Add Jasmin rice to your pantry\"","example":"Add Jasmin rice to your pantry"},"name":{"type":"string","description":"pantry_add / grocery_add / log_add: the item, as POST /v1/me/pantry, /v1/me/groceries or /v1/me/log take it"},"quantity":{"type":"number"},"unit":{"type":"string","description":"pantry_add / grocery_add: the amount’s unit; weight_add: kg or lb"},"value":{"type":"number","description":"weight_add: the reading in `unit`, as POST /v1/me/weights takes it"},"portion":{"type":"string","description":"log_add: the amount as said (\"1 bowl\")"},"slot":{"type":"string","enum":["breakfast","lunch","dinner","snack"]},"time":{"type":"string","description":"log_add / weight_add: when it was eaten or taken, local 24-hour HH:MM as said (\"21:00\"), as POST /v1/me/log takes it; absent = not said","example":"21:00"},"day":{"type":"string","description":"log_add: the day it was eaten in the person’s words when not today (\"yesterday\", \"Oct 23\"); the app turns it into the log’s date on the person’s own calendar (bug184); absent = today","example":"yesterday"},"slug":{"type":"string","description":"plan_add: the catalog recipe"},"title":{"type":"string"},"recipeId":{"type":"string","format":"uuid","description":"plan_add: the catalog id POST /v1/me/plan takes"},"daysFromToday":{"type":"integer","minimum":0,"maximum":6,"description":"plan_add: the day, counted from the person’s today (0 = today)"},"items":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"portion":{"type":["string","null"]},"kcal":{"type":["number","null"]},"proteinG":{"type":["number","null"]},"carbsG":{"type":["number","null"]},"fatG":{"type":["number","null"]},"basis":{"type":"string","enum":["typed","catalog","own_recipe","reference","model","none"]}},"required":["name","portion","kcal","proteinG","carbsG","fatG","basis"]},"description":"log_add (bug192): each item of the meal with its estimate per serving, worked out before the tap and shown in `reply`. The app logs these items as shown (POST /v1/me/log `items`, each with `nutrition` and `basis`; an item at `none` without them). Absent: not estimated, log `name` as before"}},"required":["kind","label"]},"description":"Changes the chef PROPOSES (pantry, grocery list, log, plan, weight): NOTHING is written. The app shows each as a button; the person’s tap makes the write through the matching /v1/me route. Chef never says a change happened (bug129)"},"note":{"type":["string","null"],"description":"A saved allergy the gate could not check by ingredient, said plainly"},"safeFor":{"type":["string","null"],"description":"Household plan (Pro): who these suggestions were checked for and what they keep out, e.g. \"Safe for Sam and Jo: keeps out peanut.\""},"allowance":{"type":["object","null"],"properties":{"remaining":{"type":"integer","minimum":0,"description":"Free asks left in this window after this one (the grace is not counted)"},"limit":{"type":"integer","minimum":1,"description":"Free asks per window (chat: per local day, in the X-GP-TZ zone or UTC; a plan: per UTC ISO week)"},"resetsAt":{"type":"string","description":"When the allowance is back in full, as an ISO instant: for chat the person’s next local midnight (later only after a time-zone change within 24h); show it in the person’s own time"},"grace":{"type":"boolean","description":"This was the ask that crossed the free limit: answered in full, and the next ask is refused (429 free_limit, or conversation_limit for a conversation’s messages)"},"messagesLeft":{"type":"integer","minimum":0,"description":"Chat: free messages left in this conversation after this one (the grace is not counted)"},"messageLimit":{"type":"integer","minimum":1,"description":"Chat: free messages per conversation (15)"},"conversationsLeft":{"type":"integer","minimum":0,"description":"Chat: free conversations left today after this one (the grace is not counted)"},"conversationLimit":{"type":"integer","minimum":1,"description":"Chat: free conversations per local day (5)"},"edge":{"type":["string","null"],"enum":["message","day",null],"description":"Chat: the limit this answer graced (or this refusal hit): message = this conversation’s 15, day = today’s 5 conversations; null = neither"}},"required":["remaining","limit","resetsAt","grace"],"description":"The free allowance this answer leaves; null = not counted (a paid plan)"},"threadId":{"type":"string","description":"A chat answer: the conversation it was counted in; send it as threadId with the next message in this thread"}},"required":["kind","reply","recipes","proposal","dropped","actions","note","safeFor","allowance"]},"ChefAsk":{"type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":2000,"example":"What can I cook tonight with what is in my pantry?"},"history":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"type":"string","minLength":1,"maxLength":2000}},"required":["role","content"],"additionalProperties":false},"maxItems":10,"description":"The thread so far (at most 10 turns), oldest first"},"threadId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","description":"The Chef conversation this message belongs to (the app’s thread id). Free plan: 15 messages a conversation, 5 conversations a local day. Absent = a new conversation; the answer’s threadId is its id","example":"t1760198400000"},"plan":{"type":"object","properties":{"from":{"type":"string","format":"date","example":"2026-10-08"},"days":{"type":"integer","minimum":1,"maximum":7},"meals":{"type":"array","items":{"type":"string","enum":["breakfast","lunch","dinner"]},"minItems":1,"maxItems":3},"eaters":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":5,"description":"Household plan (Pro): who the plan is for. Default: everyone who eats the asked meals with the household"}},"required":["from","days","meals"],"additionalProperties":false,"description":"Ask for a plan (proposed, never stored) instead of a chat answer"}},"required":["message"],"additionalProperties":false},"ChefThreadList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ChefThread"}}},"required":["items"]},"ChefThreadPut":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"msgs":{"type":"array","items":{"type":"object","additionalProperties":{},"description":"One message in the app’s shape (me/chef, text, and the cards it carries); stored as given"},"maxItems":400},"tour":{"type":["integer","null"]},"at":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"The thread’s last activity (ms since the epoch, or an ISO instant); absent = now"}},"required":["title","msgs"],"additionalProperties":false},"Household":{"type":"object","properties":{"household":{"type":["object","null"],"properties":{"role":{"type":"string","enum":["owner","member"]},"me":{"type":"string","format":"uuid","description":"The caller’s own member id"},"members":{"type":"array","items":{"$ref":"#/components/schemas/HouseholdMember"}},"maxMembers":{"type":"integer"},"plan":{"type":"string","description":"The household’s entitlement plan"},"features":{"type":"object","properties":{"sharedList":{"type":"boolean","enum":[true]},"sharedPlan":{"type":"boolean"},"memberProfiles":{"type":"boolean"}},"required":["sharedList","sharedPlan","memberProfiles"],"description":"Every household shares its grocery list; the shared plan and per-person goals and allergies are the household plan’s"},"invites":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"createdAt":{"type":"string"},"expiresAt":{"type":"string"},"emailed":{"type":"boolean"}},"required":["id","createdAt","expiresAt","emailed"]},"description":"Open invites (the owner’s; empty for a member)"}},"required":["role","me","members","maxMembers","plan","features","invites"],"description":"null = no household: start one (POST) or join with a link"}},"required":["household"]},"HouseholdCreate":{"type":"object","properties":{"displayName":{"type":"string","minLength":1,"maxLength":40,"example":"Sam"}},"required":["displayName"],"additionalProperties":false},"Invite":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"token":{"type":"string","description":"Shown once. Only its hash is stored"},"url":{"type":"string","description":"The link to share: /join/{token} on the calling app"},"expiresAt":{"type":"string"},"emailed":{"type":"boolean","description":"true = queued for email; false = share the link yourself"}},"required":["id","token","url","expiresAt","emailed"]},"InviteCreate":{"type":"object","properties":{"email":{"type":"string","maxLength":254,"format":"email","description":"Also email the link (only when email is switched on here). The invite is then for that verified address only"}},"additionalProperties":false},"HouseholdJoined":{"type":"object","properties":{"joined":{"type":"boolean","enum":[true]},"memberId":{"type":"string","format":"uuid"}},"required":["joined","memberId"]},"HouseholdJoin":{"type":"object","properties":{"displayName":{"type":"string","minLength":1,"maxLength":40,"example":"Jo"}},"additionalProperties":false},"MemberPatch":{"type":"object","properties":{"displayName":{"type":"string","minLength":1,"maxLength":40},"goals":{"type":"object","properties":{"kcal":{"type":["integer","null"],"minimum":800,"maximum":6000},"proteinG":{"type":["integer","null"],"minimum":10,"maximum":400}},"additionalProperties":false},"allergens":{"type":"array","items":{"type":"string","enum":["peanut","tree_nut","shellfish","fish","gluten","dairy","soy","egg","sesame"]},"maxItems":9},"dislikes":{"type":"array","items":{"type":"string","minLength":1,"maxLength":40},"maxItems":50},"eatsWith":{"type":"object","properties":{"breakfast":{"type":"boolean"},"lunch":{"type":"boolean"},"dinner":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"MemberRemoved":{"type":"object","properties":{"outcome":{"type":"string","enum":["left","removed"]}},"required":["outcome"]},"TestSend":{"type":"object","properties":{"messageId":{"type":"string","format":"uuid"},"operationId":{"type":"string","description":"The ACS Operation-Id the drain presents for this message (derived from the spool key)."},"status":{"type":"string","enum":["pending","claimed","delivered","dead"]},"attempts":{"type":"integer"},"code":{"type":"string","description":"The code in the subject line; only on the enqueue response."},"enqueuedAt":{"type":"string"},"settledAt":{"type":["string","null"]},"failedReason":{"type":["string","null"]}},"required":["messageId","operationId","status","attempts","enqueuedAt","settledAt","failedReason"]},"TestSendRequest":{"type":"object","properties":{},"additionalProperties":false},"OpsFeedback":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/OpsFeedbackRow"}},"topics":{"type":"array","items":{"$ref":"#/components/schemas/OpsFeedbackTopic"}}}},"OpsFeedbackRow":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["request","blocker","bug","idea"]},"text":{"type":"string"},"context":{"type":["string","null"]},"screen":{"type":["string","null"]},"via":{"type":"string","enum":["person","agent"]},"count":{"type":"integer"},"topic":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"household":{"type":"string","description":"The household as an ellipsis and the last 4 characters of its tenant id; never a name, email or user id."}},"required":["id","kind","text","context","screen","via","count","topic","createdAt","updatedAt","household"]},"OpsFeedbackTopic":{"type":"object","properties":{"topic":{"type":"string"},"kind":{"type":"string","enum":["request","blocker","bug","idea"]},"count":{"type":"integer"},"households":{"type":"integer"},"rows":{"type":"integer"},"text":{"type":"string"},"lastRaisedAt":{"type":"string"}},"required":["topic","kind","count","households","rows","text","lastRaisedAt"]},"OpsNotes":{"type":"object","properties":{"notes":{"type":"array","items":{"$ref":"#/components/schemas/OpsNote"}},"results":{"type":"array","items":{"$ref":"#/components/schemas/OpsNoteSearchResult"}}}},"OpsNote":{"type":"object","properties":{"id":{"type":"string"},"note":{"type":"string"},"type":{"type":["string","null"]},"sector":{"type":["string","null"]},"context":{"type":["string","null"]},"authorUserId":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","note","type","sector","context","authorUserId","createdAt"]},"OpsNoteSearchResult":{"allOf":[{"$ref":"#/components/schemas/OpsNote"},{"type":"object","properties":{"rank":{"type":"number","description":"ts_rank of the match; higher is better."}},"required":["rank"]}]},"Checkout":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Hosted Checkout: the Stripe-hosted page (test mode). Redirect the browser here."},"clientSecret":{"type":"string","description":"Embedded Checkout: mount it with Stripe.js (initEmbeddedCheckout) inside the app."},"sessionId":{"type":"string"}},"required":["sessionId"]},"CheckoutRequest":{"type":"object","properties":{"plan":{"type":"string","enum":["plus","pro"],"default":"plus"},"interval":{"type":"string","enum":["month","year"],"default":"month"},"returnTo":{"type":"string","enum":["app"],"description":"'app': Stripe returns the browser to the calling app's own /billing?checkout=success|cancelled (its Origin must be one this API serves). Absent: the site's /plans, as before."},"embedded":{"type":"boolean","description":"With returnTo 'app': Stripe's Embedded Checkout, mounted inside the app. The answer carries clientSecret instead of url, and Stripe returns to the app's /you/plan-billing?session={CHECKOUT_SESSION_ID}."},"promotionCode":{"type":"string","minLength":1,"maxLength":64,"description":"A promotion code the person typed in the app. Checkout applies it; an unknown or used-up code is refused with 400 before any session is made."}}},"BillingPortal":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The Stripe-hosted customer portal (test mode): manage or cancel the subscription. Redirect the browser here."}},"required":["url"]},"AppleToken":{"type":"object","properties":{"appAccountToken":{"type":"string","format":"uuid","description":"Pass to Product.purchase(options: [.appAccountToken(UUID(uuidString:)!)]). The same uuid on every call for this account."}},"required":["appAccountToken"]},"AppleTransactionRequest":{"type":"object","properties":{"signedTransaction":{"type":"string","minLength":1,"maxLength":65536,"description":"Transaction.jwsRepresentation, unaltered (a compact JWS)."}},"required":["signedTransaction"],"additionalProperties":false},"WebhookAck":{"type":"object","properties":{"received":{"type":"boolean","enum":[true]},"outcome":{"type":"string","enum":["applied","ignored","replayed","error"]}},"required":["received","outcome"]}},"parameters":{}},"paths":{"/live":{"get":{"tags":["ops"],"summary":"Liveness: the process is up (no database, no schema)","responses":{"200":{"description":"Alive","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Live"}}}}}}},"/health":{"get":{"tags":["ops"],"summary":"Liveness and readiness","responses":{"200":{"description":"Serving","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"}}}},"503":{"description":"Degraded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"}}}}}}},"/v1/site":{"get":{"tags":["content"],"summary":"The site identity and published prices","responses":{"200":{"description":"The site","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Site"}}}},"400":{"description":"Invalid parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/recipes":{"get":{"tags":["content"],"summary":"Published catalog recipes, by slug, cursor-paged","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"example":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":400,"description":"Opaque; from the previous page’s `nextCursor`."},"required":false,"description":"Opaque; from the previous page’s `nextCursor`.","name":"cursor","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":100,"example":"chicken","description":"Title search: every word must appear in the title, any case, in any order (\"garlic chicken\"). Pages by `cursor` like the full list; `total` stays the whole catalogue."},"required":false,"description":"Title search: every word must appear in the title, any case, in any order (\"garlic chicken\"). Pages by `cursor` like the full list; `total` stays the whole catalogue.","name":"q","in":"query"}],"responses":{"200":{"description":"One page of recipes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecipePage"}}}},"400":{"description":"Invalid parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/recipes/{slug}":{"get":{"tags":["content"],"summary":"One published recipe","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[a-z0-9][a-z0-9-]*$","example":"honey-garlic-chicken"},"required":true,"name":"slug","in":"path"}],"responses":{"200":{"description":"The recipe","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Recipe"}}}},"400":{"description":"Invalid parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No published recipe with that slug","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/articles":{"get":{"tags":["content"],"summary":"Published journal articles, newest first","responses":{"200":{"description":"All published articles","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArticleList"}}}},"400":{"description":"Invalid parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/articles/{slug}":{"get":{"tags":["content"],"summary":"One published article","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[a-z0-9][a-z0-9-]*$","example":"honey-garlic-chicken"},"required":true,"name":"slug","in":"path"}],"responses":{"200":{"description":"The article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Article"}}}},"400":{"description":"Invalid parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No published article with that slug","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/redirects":{"get":{"tags":["content"],"summary":"The redirect map the site emits as _redirects","responses":{"200":{"description":"Every redirect row","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedirectList"}}}},"400":{"description":"Invalid parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me":{"get":{"tags":["account"],"summary":"The signed-in caller, as our own account row sees them","security":[{"clerkSession":[]}],"responses":{"200":{"description":"You","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"tags":["account"],"summary":"Delete the caller’s account: all app data, in one transaction, and their sign-in (Clerk) user","description":"Access ends with this response: the same session is refused from the next request on. Billing records are kept (tax law) and named in `retained`. If the sign-in provider refuses, nothing is deleted (502) and the call can be repeated.","security":[{"clerkSession":[]}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountDeleted"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Only a household account can be deleted here","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"A live subscription must be cancelled first","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"The sign-in provider could not delete the account; nothing was deleted","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/consent":{"post":{"tags":["account"],"summary":"Accept the terms and the privacy notice in force: opens the account of a signed-in caller who had not, or re-opens one whose accepted text changed","description":"For the caller every other /v1/me route answers 403 `consent_required`: a verified session with no account and no acceptance on record (e.g. a Google sign-in that never passed a sign-up consent line). Records the acceptance on the Clerk user (`legal_accepted_at`, now), then provisions the account exactly as the first signed-in request would. Re-consent: for an existing account answered 403 `consent_required` because a text changed since it accepted, it appends a `reconsent` acceptance of each text in force (Clerk is not written), and the account works again. Idempotent: an account that is not refused is answered as it is, and nothing is recorded.","security":[{"clerkSession":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsentAccept"}}}},"responses":{"200":{"description":"Accepted: your account (and, when a referralCode was sent, what became of it)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsentResult"}}}},"400":{"description":"The body is not {\"accept\": true}","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Still consent_required: the terms or privacy notice are unpublished, or this environment cannot record the acceptance","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/client-errors":{"post":{"tags":["ops"],"summary":"Report a sign-in or sign-up failure the app saw (codes and field names only)","description":"Unauthenticated: a failed sign-in has no session. The body is strict: Clerk status, missing field NAMES and error CODES, the provider, the step, a browser/OS family and the build. Nothing a person typed. Logged as one `client.error` line with the request id. Rate-limited per client address.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientError"}}}},"responses":{"204":{"description":"Recorded"},"400":{"description":"The body is not a ClientError (extra or malformed fields are refused)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many reports from this address; try again later","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/entitlement":{"get":{"tags":["account"],"summary":"The live entitlement of this household (plan, tier, status): the higher of the Stripe one and a live App Store subscription","security":[{"clerkSession":[]}],"responses":{"200":{"description":"The live entitlement (tier free / status none when there is none)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Entitlement"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Only a household has an entitlement","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/connections":{"get":{"tags":["account"],"summary":"Whether this account uses GreenplateAi from an AI client (Claude, ChatGPT), which one, and when last","description":"Read-only. Connected = at least one call to the connector (/mcp) made with an AI client’s OAuth access token by this account; the web and store apps’ own calls do not count. From the account’s own audit rows.","security":[{"clerkSession":[]}],"responses":{"200":{"description":"The AI connector state of this account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Connections"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/referral":{"get":{"tags":["account"],"summary":"The caller’s referral code (made on the first read), its link, and how many accounts joined with it","security":[{"clerkSession":[]}],"responses":{"200":{"description":"The code, link and joined count","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Referral"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Only a household account has a referral code","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/referral/claim":{"post":{"tags":["account"],"summary":"A new account names the referral code it signed up with (for a sign-up that made the account on its first request)","description":"One referral per account, ever, and only within 7 days of the account being made. A code is the 8 characters or the whole https://greenplate.ai/r/<code> link. Nothing is granted to anyone.","security":[{"clerkSession":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferralClaimBody"}}}},"responses":{"200":{"description":"Claimed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferralClaim"}}}},"400":{"description":"Not a referral code (code invalid_code)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No account holds that code (code code_not_found)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"This account already joined with a code (code already_referred)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Your own code (code self_referral), or the account is older than the claim window (code too_late)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/products/{gtin}":{"get":{"tags":["kitchen"],"summary":"A packaged food by its barcode: name, brand, serving and nutrition (USDA FoodData Central, Branded Foods)","description":"The barcode is check-digit validated (UPC-A, UPC-E, EAN-8, EAN-13, GTIN-14). A product is read from the venture’s cache, else from FoodData Central, keeping only a food whose gtinUpc is the same code. Rate-limited per person.","security":[{"clerkSession":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":32,"example":"041303020937","description":"The barcode digits: UPC-A, UPC-E, EAN-8, EAN-13 or GTIN-14 (spaces and dashes ignored)"},"required":true,"description":"The barcode digits: UPC-A, UPC-E, EAN-8, EAN-13 or GTIN-14 (spaces and dashes ignored)","name":"gtin","in":"path"},{"schema":{"type":"string","enum":["ean8","upce"],"description":"For an 8-digit code, which symbology the scanner read; absent = EAN-8 first, then UPC-E"},"required":false,"description":"For an 8-digit code, which symbology the scanner read; absent = EAN-8 first, then UPC-E","name":"format","in":"query"}],"responses":{"200":{"description":"The product","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BarcodeProduct"}}}},"400":{"description":"Not a valid barcode (code bad_gtin)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No packaged food with that barcode (code not_found)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many lookups in a minute (code resting)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"FoodData Central did not answer in time (code lookup_failed)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Barcode lookup is not connected on this API (code lookup_not_connected), or the service is not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/pantry":{"get":{"tags":["kitchen"],"summary":"The caller’s own pantry, by name","security":[{"clerkSession":[]}],"responses":{"200":{"description":"Every item (at most 500)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PantryList"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["kitchen"],"summary":"Add one item to the caller’s own pantry","security":[{"clerkSession":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PantryAdd"}}}},"responses":{"200":{"description":"Added","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PantryItem"}}}},"400":{"description":"Invalid item","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The pantry is full (500 items)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/pantry/{id}":{"patch":{"tags":["kitchen"],"summary":"Change the named fields of one of the caller’s items (null clears a field)","security":[{"clerkSession":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0b1c2d3e-4f50-4617-8899-aabbccddeeff"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PantryPatch"}}}},"responses":{"200":{"description":"Changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PantryItem"}}}},"400":{"description":"Invalid change","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such item of yours","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"tags":["kitchen"],"summary":"Remove one of the caller’s items","security":[{"clerkSession":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0b1c2d3e-4f50-4617-8899-aabbccddeeff"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","enum":["used","tossed"],"description":"used = Finished; tossed = Tossed. Kept for the kitchen engine after the item is gone"},"required":false,"description":"used = Finished; tossed = Tossed. Kept for the kitchen engine after the item is gone","name":"outcome","in":"query"}],"responses":{"200":{"description":"Removed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PantryRemoved"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such item of yours","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/profile":{"get":{"tags":["kitchen"],"summary":"The caller’s own profile: goal, targets, allergens, diet, taste (empty until first saved)","security":[{"clerkSession":[]}],"responses":{"200":{"description":"The profile","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Profile"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"tags":["kitchen"],"summary":"Change the named fields of the caller’s profile (null clears a field)","security":[{"clerkSession":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfilePatch"}}}},"responses":{"200":{"description":"Changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Profile"}}}},"400":{"description":"Invalid change","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/onboarding":{"post":{"tags":["kitchen"],"summary":"First-run Goal setup: its answers onto the profile, and the date it was done (idempotent)","security":[{"clerkSession":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Onboarding"}}}},"responses":{"200":{"description":"The profile, onboarded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Profile"}}}},"400":{"description":"Invalid answers","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/plan":{"get":{"tags":["kitchen"],"summary":"The caller’s planned meals between two days (at most 62), each with its catalog recipe","security":[{"clerkSession":[]}],"parameters":[{"schema":{"type":"string","format":"date","example":"2026-10-08"},"required":true,"name":"from","in":"query"},{"schema":{"type":"string","format":"date","example":"2026-10-08","description":"Inclusive; at most 62 days after from"},"required":true,"description":"Inclusive; at most 62 days after from","name":"to","in":"query"}],"responses":{"200":{"description":"The planned meals, by day and slot","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlannedMealList"}}}},"400":{"description":"Invalid range","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["kitchen"],"summary":"Plan one published catalog recipe on a day and slot","security":[{"clerkSession":[]}],"parameters":[{"schema":{"type":"string","enum":["chef","plan"],"description":"chef = a Chef chip the person confirmed; plan = a planned meal ticked; absent = the screen itself (product analytics only)"},"required":false,"description":"chef = a Chef chip the person confirmed; plan = a planned meal ticked; absent = the screen itself (product analytics only)","name":"via","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlannedMealAdd"}}}},"responses":{"200":{"description":"Planned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlannedMeal"}}}},"400":{"description":"Invalid meal","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The plan is full","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"No published catalog recipe with that id","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/plan/events":{"get":{"tags":["kitchen"],"summary":"The caller’s plan events (prep, defrost, shop, delivery, reminder; cook and eat with mealEvents=true) between two days","security":[{"clerkSession":[]}],"parameters":[{"schema":{"type":"string","format":"date","example":"2026-10-08"},"required":true,"name":"from","in":"query"},{"schema":{"type":"string","format":"date","example":"2026-10-08","description":"Inclusive; at most 62 days after from"},"required":true,"description":"Inclusive; at most 62 days after from","name":"to","in":"query"},{"schema":{"type":"string","enum":["true","false"],"description":"true includes cook and eat events (0340). Absent, they are left out, so an app that knows only the older kinds reads its list as before"},"required":false,"description":"true includes cook and eat events (0340). Absent, they are left out, so an app that knows only the older kinds reads its list as before","name":"mealEvents","in":"query"}],"responses":{"200":{"description":"The events, by day and time","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanEventList"}}}},"400":{"description":"Invalid range","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["kitchen"],"summary":"Add one event to the caller’s plan","security":[{"clerkSession":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanEventAdd"}}}},"responses":{"200":{"description":"Added","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanEvent"}}}},"400":{"description":"Invalid event","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/plan/events/{id}":{"patch":{"tags":["kitchen"],"summary":"Move one of the caller’s plan events or say what happened (done, done at another time, skipped)","description":"A move keeps the plan as first made (plannedDate, plannedTime); shiftRest moves the day’s later planned events by the same minutes. A cook marked done records its servings on the meal and puts the extra servings in the pantry as leftovers (good for 3 days); an eat with usesLeftovers marked done takes its servings out of them.","security":[{"clerkSession":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0b1c2d3e-4f50-4617-8899-aabbccddeeff"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanEventPatch"}}}},"responses":{"200":{"description":"The event as it is now","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanEvent"}}}},"400":{"description":"Invalid change","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such event of yours","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"tags":["kitchen"],"summary":"Remove one of the caller’s plan events","security":[{"clerkSession":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0b1c2d3e-4f50-4617-8899-aabbccddeeff"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Removed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PantryRemoved"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such event of yours","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/plan/free":{"get":{"tags":["kitchen"],"summary":"The caller’s plan items in words (not recipes) between two days (at most 62)","security":[{"clerkSession":[]}],"parameters":[{"schema":{"type":"string","format":"date","example":"2026-10-08"},"required":true,"name":"from","in":"query"},{"schema":{"type":"string","format":"date","example":"2026-10-08","description":"Inclusive; at most 62 days after from"},"required":true,"description":"Inclusive; at most 62 days after from","name":"to","in":"query"}],"responses":{"200":{"description":"The items, by day and slot","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FreePlanItemList"}}}},"400":{"description":"Invalid range","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["kitchen"],"summary":"Plan an item in words on a day and slot, optionally the leftovers of a cooked meal","security":[{"clerkSession":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FreePlanItemAdd"}}}},"responses":{"200":{"description":"Planned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FreePlanItem"}}}},"400":{"description":"Invalid item","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The plan is full","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"fromMealId is not a cooked meal of yours","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/plan/free/{id}":{"patch":{"tags":["kitchen"],"summary":"Change one of the caller’s plan items in words (move, rename, servings, nutrition, eaten / skipped)","security":[{"clerkSession":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0b1c2d3e-4f50-4617-8899-aabbccddeeff"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FreePlanItemPatch"}}}},"responses":{"200":{"description":"Changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FreePlanItem"}}}},"400":{"description":"Invalid change","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such item of yours","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"tags":["kitchen"],"summary":"Remove one of the caller’s plan items in words","security":[{"clerkSession":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0b1c2d3e-4f50-4617-8899-aabbccddeeff"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Removed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PantryRemoved"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such item of yours","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/plan/{id}":{"patch":{"tags":["kitchen"],"summary":"Move, swap, resize or mark one of the caller’s planned meals (cooked / skipped)","security":[{"clerkSession":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0b1c2d3e-4f50-4617-8899-aabbccddeeff"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlannedMealPatch"}}}},"responses":{"200":{"description":"Changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlannedMeal"}}}},"400":{"description":"Invalid change","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such planned meal of yours","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"No published catalog recipe with that id","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"tags":["kitchen"],"summary":"Remove one of the caller’s planned meals","security":[{"clerkSession":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0b1c2d3e-4f50-4617-8899-aabbccddeeff"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Removed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PantryRemoved"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such planned meal of yours","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/log":{"get":{"tags":["kitchen"],"summary":"What the caller logged on one day, its totals, and their targets; by-hand entries with no estimate are completed first","security":[{"clerkSession":[]}],"parameters":[{"schema":{"type":"string","format":"date","example":"2026-10-08"},"required":true,"name":"date","in":"query"}],"responses":{"200":{"description":"The day","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogDay"}}}},"400":{"description":"Invalid date","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["kitchen"],"summary":"Log a meal: its items (catalog recipes at nutrition × servings, foods as typed or estimated), into a new meal or one already logged","security":[{"clerkSession":[]}],"parameters":[{"schema":{"type":"string","enum":["chef","plan"],"description":"chef = a Chef chip the person confirmed; plan = a planned meal ticked; absent = the screen itself (product analytics only)"},"required":false,"description":"chef = a Chef chip the person confirmed; plan = a planned meal ticked; absent = the screen itself (product analytics only)","name":"via","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogAdd"}}}},"responses":{"200":{"description":"Logged","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogAdded"}}}},"400":{"description":"Invalid entry","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No meal of yours has that mealId","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"That day is full","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"No published catalog recipe with that id, or it has no nutrition to log","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/today":{"get":{"tags":["kitchen"],"summary":"The Today screen in one read: today’s meals and totals, targets and what is left, today’s plan, and the Sunday-first week with each day’s totals and last dinner","security":[{"clerkSession":[]}],"parameters":[{"schema":{"type":"string","format":"date","example":"2026-10-08"},"required":true,"name":"date","in":"query"}],"responses":{"200":{"description":"Today","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Today"}}}},"400":{"description":"Invalid date","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/kitchen":{"get":{"tags":["kitchen"],"summary":"The kitchen engine: the comfort set (up to 8 recipes cooked again), one recipe to try next, grocery items due again, and pantry items to use soon, each with why","security":[{"clerkSession":[]}],"responses":{"200":{"description":"The kitchen now","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Kitchen"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/kitchen/skip":{"post":{"tags":["kitchen"],"summary":"Skip the Try next recipe: a different one is offered, and this one does not come back for 30 days","security":[{"clerkSession":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KitchenSkip"}}}},"responses":{"200":{"description":"Skipped","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KitchenSkipped"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/votes":{"get":{"tags":["kitchen"],"summary":"The caller’s Vibes votes: like, pass or skip on each table and dish, newest first","security":[{"clerkSession":[]}],"responses":{"200":{"description":"Your votes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Votes"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"put":{"tags":["kitchen"],"summary":"Cast or change one Vibes vote (like, pass or skip) on a table or dish","description":"The vote is the caller’s own (exported and deleted with the account). A total of likes and passes per table or dish is kept by GreenplateAi; it names no one and is not counted down when a vote is cleared or an account is deleted.","security":[{"clerkSession":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoteSet"}}}},"responses":{"200":{"description":"Saved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Vote"}}}},"400":{"description":"Invalid vote","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Too many votes","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/votes/{kind}/{subject}":{"delete":{"tags":["kitchen"],"summary":"Clear one of the caller’s Vibes votes","security":[{"clerkSession":[]}],"parameters":[{"schema":{"type":"string","enum":["table","dish"],"description":"table = a Vibes table (a whole meal scene); dish = one dish"},"required":true,"description":"table = a Vibes table (a whole meal scene); dish = one dish","name":"kind","in":"path"},{"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,63}$","description":"the design id of the table or dish, e.g. \"th1\"","example":"th1"},"required":true,"description":"the design id of the table or dish, e.g. \"th1\"","name":"subject","in":"path"}],"responses":{"200":{"description":"Cleared","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoteCleared"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such vote of yours","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/log/summary":{"get":{"tags":["kitchen"],"summary":"Totals per logged day between two days (at most 92): the week rings and Insights","security":[{"clerkSession":[]}],"parameters":[{"schema":{"type":"string","format":"date","example":"2026-10-08"},"required":true,"name":"from","in":"query"},{"schema":{"type":"string","format":"date","example":"2026-10-08","description":"Inclusive; at most 62 days after from"},"required":true,"description":"Inclusive; at most 62 days after from","name":"to","in":"query"}],"responses":{"200":{"description":"One row per day with entries","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogSummary"}}}},"400":{"description":"Invalid range","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/log/foods":{"get":{"tags":["kitchen"],"summary":"What the caller has logged by hand, newest first, each food once with its latest numbers: Log again","security":[{"clerkSession":[]}],"responses":{"200":{"description":"At most 30 foods","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogFoods"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/log/{id}":{"patch":{"tags":["kitchen"],"summary":"Change one item: its servings (nutrition rescales) or a by-hand item’s portion (estimated again); a date, slot or time moves the item’s whole meal","security":[{"clerkSession":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0b1c2d3e-4f50-4617-8899-aabbccddeeff"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogPatch"}}}},"responses":{"200":{"description":"Changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogEntry"}}}},"400":{"description":"Invalid change, or a portion for a recipe entry","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such entry of yours","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"tags":["kitchen"],"summary":"Remove one of the caller’s log entries","security":[{"clerkSession":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0b1c2d3e-4f50-4617-8899-aabbccddeeff"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Removed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PantryRemoved"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such entry of yours","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/log/meals/{id}":{"delete":{"tags":["kitchen"],"summary":"Remove one of the caller’s meals: every item in it (bug158)","security":[{"clerkSession":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0b1c2d3e-4f50-4617-8899-aabbccddeeff"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Removed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogMealRemoved"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such meal of yours","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/groceries":{"get":{"tags":["kitchen"],"summary":"The caller’s grocery list, un-ticked first, by aisle — the household’s shared list for a member","description":"Live sharing by polling: the response carries `version` and an ETag; send If-None-Match and get 304 until someone in the household changes the list.","security":[{"clerkSession":[]}],"responses":{"200":{"description":"Every item (at most 500)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroceryList"}}}},"304":{"description":"Unchanged since the version sent in If-None-Match"},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["kitchen"],"summary":"Add one item to the caller’s grocery list","security":[{"clerkSession":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroceryAdd"}}}},"responses":{"200":{"description":"Added","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroceryItem"}}}},"400":{"description":"Invalid item","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The list is full (500 items)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/groceries/derive":{"post":{"tags":["kitchen"],"summary":"Rebuild the list’s plan rows from the planned recipes between two days, minus the pantry (idempotent)","security":[{"clerkSession":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroceryDerive"}}}},"responses":{"200":{"description":"The whole list after the rebuild","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroceryList"}}}},"400":{"description":"Invalid range","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/groceries/stores":{"get":{"tags":["kitchen"],"summary":"The stores a list can be sent to: which are built (available), set up (connected), and whether this plan may send","security":[{"clerkSession":[]}],"responses":{"200":{"description":"Every store, built or not; the app hides available: false","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroceryStores"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/groceries/send/preview":{"post":{"tags":["kitchen"],"summary":"What a send would carry, by aisle, and what it skips because the pantry already holds it (free; no store is called)","security":[{"clerkSession":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrocerySendPreviewRequest"}}}},"responses":{"200":{"description":"To send, and skipped with ids to add back","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrocerySendPreview"}}}},"400":{"description":"Invalid body","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/groceries/send":{"post":{"tags":["kitchen"],"summary":"Send the list (minus the pantry, plus addBack) to a store; returns the store page to finish checkout. Pro (STORE_SEND_TIER)","security":[{"clerkSession":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrocerySendRequest"}}}},"responses":{"200":{"description":"The store made a page","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrocerySendResult"}}}},"400":{"description":"Invalid body","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"code upgrade_required: this plan cannot send to a store","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"code store_not_available (not built: hide it) or nothing_to_send","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"code store_failed: the store refused or did not answer; nothing was recorded","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"code store_not_connected: our account with the store is not set up yet; offer Copy / Share","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/groceries/text":{"get":{"tags":["kitchen"],"summary":"The list as text to copy: by aisle, with amounts, minus what the pantry holds (free on every plan)","security":[{"clerkSession":[]}],"responses":{"200":{"description":"Formatted text","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroceryText"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/groceries/trips":{"get":{"tags":["kitchen"],"summary":"The caller’s shopping trips, newest first (at most 50)","security":[{"clerkSession":[]}],"responses":{"200":{"description":"The trips","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroceryTripList"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["kitchen"],"summary":"Record one shopping trip: when, where, and the items as bought (\"Done shopping\" sends the ticked lines)","security":[{"clerkSession":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroceryTripAdd"}}}},"responses":{"200":{"description":"Recorded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroceryTrip"}}}},"400":{"description":"Invalid trip","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Too many trips kept","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/groceries/trips/{id}":{"delete":{"tags":["kitchen"],"summary":"Remove one of the caller’s shopping trips","security":[{"clerkSession":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0b1c2d3e-4f50-4617-8899-aabbccddeeff"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Removed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PantryRemoved"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such trip of yours","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/groceries/trips/{id}/cost":{"put":{"tags":["kitchen"],"summary":"Set what one of the caller’s trips cost: delivery, pickup or in store, subtotal, fees, tip, total (as entered)","security":[{"clerkSession":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0b1c2d3e-4f50-4617-8899-aabbccddeeff"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroceryTripCostSet"}}}},"responses":{"200":{"description":"Saved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroceryTrip"}}}},"400":{"description":"Invalid cost","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such trip of yours","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/groceries/costs":{"get":{"tags":["kitchen"],"summary":"What the caller’s trips actually cost: spend by mode, membership math against a price they enter, their tip history (computed, no store prices)","security":[{"clerkSession":[]}],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":12,"description":"How far back (default 3)"},"required":false,"description":"How far back (default 3)","name":"months","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"maximum":1000,"description":"A membership’s monthly price, as the person enters it"},"required":false,"description":"A membership’s monthly price, as the person enters it","name":"membershipMonthly","in":"query"},{"schema":{"type":"string","enum":["delivery","service","both"],"description":"Which fees that membership waives (default delivery)"},"required":false,"description":"Which fees that membership waives (default delivery)","name":"waives","in":"query"}],"responses":{"200":{"description":"The costs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroceryCosts"}}}},"400":{"description":"Invalid query","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/groceries/share":{"get":{"tags":["kitchen"],"summary":"The Web Share payload for the list (free on every plan)","security":[{"clerkSession":[]}],"responses":{"200":{"description":"navigator.share(body)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroceryShare"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/groceries/sort":{"post":{"tags":["kitchen"],"summary":"Place the items the word map left in Other, with the cheap model (metered: aisle_sort). Never fails the list","security":[{"clerkSession":[]}],"responses":{"200":{"description":"How many moved, and whether the model was reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrocerySort"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/groceries/{id}":{"patch":{"tags":["kitchen"],"summary":"Tick (also adds it to the pantry), re-quantify or move one of the caller’s grocery items","security":[{"clerkSession":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0b1c2d3e-4f50-4617-8899-aabbccddeeff"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroceryPatch"}}}},"responses":{"200":{"description":"Changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroceryItem"}}}},"400":{"description":"Invalid change","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such item of yours","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"tags":["kitchen"],"summary":"Remove one of the caller’s grocery items","security":[{"clerkSession":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0b1c2d3e-4f50-4617-8899-aabbccddeeff"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Removed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PantryRemoved"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such item of yours","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/insights":{"get":{"tags":["kitchen"],"summary":"The caller’s week or month: daily totals vs targets, protein days, plan follow-through (computed, no model)","security":[{"clerkSession":[]}],"parameters":[{"schema":{"type":"string","enum":["week","month"],"default":"week","description":"Up to 7 or 30 of the most recent logged days, within the 90 days ending today"},"required":false,"description":"Up to 7 or 30 of the most recent logged days, within the 90 days ending today","name":"range","in":"query"}],"responses":{"200":{"description":"The insights","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Insights"}}}},"400":{"description":"Invalid range","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/insights/lifetime":{"get":{"tags":["kitchen"],"summary":"Insights that never go blank: lifetime numbers weighted toward recent days, patterns with counts, the plan-to-plate workflow, rule-based suggestions and the last 6 months (computed, no model)","security":[{"clerkSession":[]}],"responses":{"200":{"description":"The insights","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LifetimeInsights"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/favorites":{"get":{"tags":["library"],"summary":"The caller’s saved recipes, newest first, each with its catalog recipe","security":[{"clerkSession":[]}],"responses":{"200":{"description":"Every saved recipe (at most 2000)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FavoriteList"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/favorites/{recipeId}":{"put":{"tags":["library"],"summary":"Save a published catalog recipe to the caller’s library (idempotent: saving twice is one save)","security":[{"clerkSession":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"A published catalog recipe (GET /v1/recipes)","example":"c0000000-0000-4000-8000-000000000001"},"required":true,"description":"A published catalog recipe (GET /v1/recipes)","name":"recipeId","in":"path"}],"responses":{"200":{"description":"Saved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Favorite"}}}},"400":{"description":"Invalid recipe id","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The library is full","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"No published catalog recipe with that id","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"tags":["library"],"summary":"Remove a recipe from the caller’s library","security":[{"clerkSession":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"A published catalog recipe (GET /v1/recipes)","example":"c0000000-0000-4000-8000-000000000001"},"required":true,"description":"A published catalog recipe (GET /v1/recipes)","name":"recipeId","in":"path"}],"responses":{"200":{"description":"Removed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PantryRemoved"}}}},"400":{"description":"Invalid recipe id","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"That recipe is not in your library","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/ratings":{"get":{"tags":["library"],"summary":"The caller’s recipe ratings, newest first","security":[{"clerkSession":[]}],"responses":{"200":{"description":"Every rating (at most 2000)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RatingList"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/ratings/{recipeId}":{"put":{"tags":["library"],"summary":"Rate a published catalog recipe 1–5 stars (a new rating replaces the caller’s last)","security":[{"clerkSession":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"A published catalog recipe (GET /v1/recipes)","example":"c0000000-0000-4000-8000-000000000001"},"required":true,"description":"A published catalog recipe (GET /v1/recipes)","name":"recipeId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RatingPut"}}}},"responses":{"200":{"description":"Rated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Rating"}}}},"400":{"description":"Invalid rating","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"No published catalog recipe with that id","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"tags":["library"],"summary":"Clear the caller’s rating of a recipe","security":[{"clerkSession":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"A published catalog recipe (GET /v1/recipes)","example":"c0000000-0000-4000-8000-000000000001"},"required":true,"description":"A published catalog recipe (GET /v1/recipes)","name":"recipeId","in":"path"}],"responses":{"200":{"description":"Cleared","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PantryRemoved"}}}},"400":{"description":"Invalid recipe id","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"You have not rated that recipe","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/recipes/import":{"post":{"tags":["library"],"summary":"Read a recipe from a link, pasted text or a photo into a DRAFT (nothing is stored)","description":"A recipe-site link is read from its schema.org Recipe JSON-LD with no AI. A TikTok or Instagram link is read from its caption; pasted text by rule; the AI structures what the rules cannot, and reads a photo (free plan: 5 AI reads a day). Nutrition is always an estimate.","security":[{"clerkSession":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecipeImport"}}}},"responses":{"200":{"description":"The draft, to edit and then save with POST /v1/me/recipes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecipeDraft"}}}},"400":{"description":"Not exactly one of url, text or imageBase64; or a link that is not a public web page (code import_bad_url)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"The photo is over 5 MB","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"No recipe could be read from it (code import_unreadable)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"The free plan’s AI reads for today are used (code free_limit), or the AI is resting (code resting)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"The AI could not read it just now (code import_failed)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"AI reading is not switched on, or the service is not ready (code import_off)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/recipes":{"get":{"tags":["library"],"summary":"The caller’s own recipes (imported or written), newest first, and their saved count against the plan’s cap","security":[{"clerkSession":[]}],"responses":{"200":{"description":"Every own recipe (at most 2000)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRecipeList"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["library"],"summary":"Save a recipe draft as one of the caller’s own recipes","description":"The free plan keeps 50 saved recipes (own recipes + saved catalog recipes); past that the answer is 402 with code plus_required. Plus and Pro have no cap.","security":[{"clerkSession":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRecipeSave"}}}},"responses":{"200":{"description":"Saved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRecipe"}}}},"400":{"description":"Invalid recipe","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"The free plan’s saved recipes are full (code plus_required)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The hard bound of 2000 own recipes is reached","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/recipes/{id}":{"get":{"tags":["library"],"summary":"One of the caller’s own recipes","security":[{"clerkSession":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0b1c2d3e-4f50-4617-8899-aabbccddeeff"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The recipe","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRecipe"}}}},"400":{"description":"Invalid id","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not one of your recipes","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"tags":["library"],"summary":"Edit one of the caller’s own recipes","security":[{"clerkSession":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0b1c2d3e-4f50-4617-8899-aabbccddeeff"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRecipePatch"}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRecipe"}}}},"400":{"description":"Invalid change","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not one of your recipes","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"tags":["library"],"summary":"Delete one of the caller’s own recipes","security":[{"clerkSession":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0b1c2d3e-4f50-4617-8899-aabbccddeeff"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PantryRemoved"}}}},"400":{"description":"Invalid id","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not one of your recipes","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/weights":{"get":{"tags":["kitchen"],"summary":"The caller’s weight readings, newest first (by day, then time; at most 400), optionally between two days","security":[{"clerkSession":[]}],"parameters":[{"schema":{"type":"string","format":"date","example":"2026-10-08"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","format":"date","example":"2026-10-08","description":"Inclusive. Newest first, at most 400 readings"},"required":false,"description":"Inclusive. Newest first, at most 400 readings","name":"to","in":"query"}],"responses":{"200":{"description":"The readings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WeightList"}}}},"400":{"description":"Invalid range","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["kitchen"],"summary":"Add a weight reading (kg or lb) on its day, with its time; every reading is kept, several a day included","security":[{"clerkSession":[]}],"parameters":[{"schema":{"type":"string","enum":["chef","plan"],"description":"chef = a Chef chip the person confirmed; plan = a planned meal ticked; absent = the screen itself (product analytics only)"},"required":false,"description":"chef = a Chef chip the person confirmed; plan = a planned meal ticked; absent = the screen itself (product analytics only)","name":"via","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WeightAdd"}}}},"responses":{"200":{"description":"Saved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WeightEntry"}}}},"400":{"description":"Invalid reading","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/weights/{id}":{"delete":{"tags":["kitchen"],"summary":"Remove one of the caller’s weight readings","security":[{"clerkSession":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0b1c2d3e-4f50-4617-8899-aabbccddeeff"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Removed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PantryRemoved"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such reading of yours","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/equipment":{"get":{"tags":["kitchen"],"summary":"The caller’s kitchen kit: what they have and what they said they don’t, with sizes","security":[{"clerkSession":[]}],"responses":{"200":{"description":"The kit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KitList"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["kitchen"],"summary":"Save kit from the person’s words (\"I don’t have an air fryer\") or as items; saying an item again replaces it","security":[{"clerkSession":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KitSet"}}}},"responses":{"200":{"description":"Saved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KitSetResult"}}}},"400":{"description":"Neither said nor items, or both","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/equipment/check":{"get":{"tags":["kitchen"],"summary":"One recipe (recipe=) or the plan between from and to, against the caller’s kit: needs, missing with sourced swaps, pan scaling","security":[{"clerkSession":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":120,"description":"A catalog slug or mine-<id>"},"required":false,"description":"A catalog slug or mine-<id>","name":"recipe","in":"query"},{"schema":{"type":"string","format":"date","example":"2026-10-08"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","format":"date","example":"2026-10-08","description":"With from: every planned meal in the range (at most 62 days)"},"required":false,"description":"With from: every planned meal in the range (at most 62 days)","name":"to","in":"query"}],"responses":{"200":{"description":"The check","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/KitCheck"},{"$ref":"#/components/schemas/KitPlanCheck"}]}}}},"400":{"description":"Give recipe, or from and to","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such recipe","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/equipment/{id}":{"delete":{"tags":["kitchen"],"summary":"Forget one item of the caller’s kit","security":[{"clerkSession":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0b1c2d3e-4f50-4617-8899-aabbccddeeff"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Removed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PantryRemoved"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such item of yours","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/feedback":{"post":{"tags":["account"],"summary":"Send GreenplateAi feedback from the caller’s household (the same as the connector’s feedback_add)","description":"A build request, a blocker, a bug or an idea, in the person’s own words. If this household already raised the same thing in the last 30 days it is counted again rather than stored twice (alreadyRaised: true). Ten a day for a person, one a minute; past either the answer is 429. Read it back, with its status and the team’s reply, from GET /v1/me/feedback.","security":[{"clerkSession":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackSend"}}}},"responses":{"200":{"description":"Received (or counted again)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackSent"}}}},"400":{"description":"Invalid feedback","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Today’s limit, or one a minute","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"get":{"tags":["account"],"summary":"The feedback the caller sent, newest first, with its status, the team’s reply, a public link and the history of each change","security":[{"clerkSession":[]}],"responses":{"200":{"description":"The caller’s feedback","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MyFeedbackList"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/preferences":{"get":{"tags":["account"],"summary":"The caller’s app preferences: notifications, settings, Plan reminder marks (empty until first saved)","security":[{"clerkSession":[]}],"responses":{"200":{"description":"The preferences","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Preferences"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"tags":["account"],"summary":"Change the named preferences (notifications merge per toggle; null clears a key)","security":[{"clerkSession":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferencesPatch"}}}},"responses":{"200":{"description":"Changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Preferences"}}}},"400":{"description":"Invalid change","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/export":{"get":{"tags":["account"],"summary":"Everything we hold about the caller, as one JSON download","description":"Served as an attachment (Content-Disposition). Read under the caller’s own scope; nothing about anyone else.","security":[{"clerkSession":[]}],"responses":{"200":{"description":"The export","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountExport"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/taste":{"get":{"tags":["taste"],"summary":"What GreenplateAi knows about the caller’s taste: at most 12 plain-language facts, each with its source line","description":"Plus, Pro and the trial: the person’s own facts, re-derived from their ratings, cooked and skipped meals and Chef chats. Free: example cards flagged `example: true`, never their data. Allergens and diet are never learned.","security":[{"clerkSession":[]}],"responses":{"200":{"description":"The taste memory (or the Free preview)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TasteView"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"tags":["taste"],"summary":"Forget everything: every taste fact and every signal behind them. Any plan","security":[{"clerkSession":[]}],"responses":{"200":{"description":"Forgotten, with the rows removed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TasteForgetAll"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/taste/{id}":{"patch":{"tags":["taste"],"summary":"Rewrite one fact in the caller’s own words (it becomes `stated`: learning never changes it again)","security":[{"clerkSession":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0b1c2d3e-4f50-4617-8899-aabbccddeeff"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TasteFactPatch"}}}},"responses":{"200":{"description":"The fact, in the person’s words","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TasteFact"}}}},"400":{"description":"Invalid text","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Taste memory is a Plus feature (code plus_required)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such fact","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"An allergy or a diet: those go on the profile, where the allergen check reads them","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"tags":["taste"],"summary":"Forget one fact: it is gone from the list and is never learned again","security":[{"clerkSession":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0b1c2d3e-4f50-4617-8899-aabbccddeeff"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Forgotten","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TasteForgotten"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Taste memory is a Plus feature (code plus_required)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such fact","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/cooked/{plannedMealId}/rating":{"post":{"tags":["taste"],"summary":"The \"How was it?\" sheet for a cooked planned meal: Loved it / Not for us / Skip","description":"A planned meal still `planned` is marked cooked. Loved it and Not for us are taste signals (Plus+); Skip records nothing.","security":[{"clerkSession":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0b1c2d3e-4f50-4617-8899-aabbccddeeff"},"required":true,"name":"plannedMealId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CookedRatingBody"}}}},"responses":{"200":{"description":"Answered","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CookedRating"}}}},"400":{"description":"Invalid verdict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such planned meal of yours","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/chef":{"post":{"tags":["kitchen"],"summary":"Ask the chef: a chat answer, or a proposed plan (never stored). The same metered chef as the MCP door","description":"Grounded in the caller’s own pantry and profile (allergens gate every recipe by ingredient); names only published recipes. Free plan: chat is 5 conversations a day (back at the person’s local midnight, from the X-GP-TZ zone; UTC without one) and 15 messages a conversation (`threadId`; absent = a new conversation), a plan 1 a week; the ask that crosses either chat limit is still answered in full (`allowance.grace`, `allowance.edge`), and the next one is refused. A refusal carries `code`: chef_off (503), free_limit, conversation_limit or resting (429), chef_failed (502). Never a made-up answer.","security":[{"clerkSession":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChefAsk"}}}},"responses":{"200":{"description":"The chef’s answer","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChefAnswer"}}}},"400":{"description":"Invalid ask","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"The free allowance for today (or this week, or this conversation) is used, or the kitchen assistant is resting","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"The chef could not answer just now; nothing was invented","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/chef/threads":{"get":{"tags":["kitchen"],"summary":"The caller’s Chef chats, newest first (at most 300), each with its messages","security":[{"clerkSession":[]}],"responses":{"200":{"description":"The chats","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChefThreadList"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/chef/threads/{id}":{"put":{"tags":["kitchen"],"summary":"Save one Chef chat whole (its title, messages, tour step and last activity): created, or replaced in place","security":[{"clerkSession":[]}],"parameters":[{"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","example":"t1761300000000"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChefThreadPut"}}}},"responses":{"200":{"description":"Saved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChefThread"}}}},"400":{"description":"Invalid chat","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"The chat is too large","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"tags":["kitchen"],"summary":"Delete one of the caller’s Chef chats, on every screen","security":[{"clerkSession":[]}],"parameters":[{"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","example":"t1761300000000"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PantryRemoved"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such chat of yours","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/household":{"get":{"tags":["household"],"summary":"The caller’s household: its members, what its plan unlocks, and (for the owner) open invites","security":[{"clerkSession":[]}],"responses":{"200":{"description":"The household, or null","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Household"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["household"],"summary":"Start a household (up to 5 people, including you). Your goals and allergies are copied in from your profile","security":[{"clerkSession":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HouseholdCreate"}}}},"responses":{"200":{"description":"The household","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Household"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not a household account","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"A member of another household","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/household/invites":{"post":{"tags":["household"],"summary":"Invite someone: a one-use link for 7 days, emailed too when an address is given and email is on here","security":[{"clerkSession":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteCreate"}}}},"responses":{"200":{"description":"The invite; the token is shown once","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invite"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Only the owner invites","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No household yet","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The household is full, or has too many open invites","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/household/invites/{id}":{"delete":{"tags":["household"],"summary":"Revoke an open invite","security":[{"clerkSession":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0b1c2d3e-4f50-4617-8899-aabbccddeeff"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PantryRemoved"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No open invite of yours with that id","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/household/join/{token}":{"post":{"tags":["household"],"summary":"Join a household with an invite link. You keep your own account and data; leaving gives you your own back","security":[{"clerkSession":[]}],"parameters":[{"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"},"required":true,"name":"token","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HouseholdJoin"}}}},"responses":{"200":{"description":"Joined","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HouseholdJoined"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"An emailed invite for another address, or not a household account","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not a valid invite","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Already in a household, your own has members, it is your own, or it is full","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Used or expired","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/household/members/{id}":{"get":{"tags":["household"],"summary":"One member of the caller’s household","security":[{"clerkSession":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0b1c2d3e-4f50-4617-8899-aabbccddeeff"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The member","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HouseholdMember"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not a member of your household","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"tags":["household"],"summary":"Edit a member’s profile: your own, or anyone’s as the owner. Goals, allergies and dislikes are the household plan’s","security":[{"clerkSession":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0b1c2d3e-4f50-4617-8899-aabbccddeeff"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberPatch"}}}},"responses":{"200":{"description":"The member as saved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HouseholdMember"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not yours to edit, or `upgrade_required`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not a member of your household","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"tags":["household"],"summary":"Leave (your own id) or remove a member (the owner). A member who leaves is back on their own data at once","security":[{"clerkSession":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0b1c2d3e-4f50-4617-8899-aabbccddeeff"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Left, or removed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberRemoved"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Only the owner removes someone else","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not a member of your household","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The owner cannot leave their own household","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/ops/comms/test-send":{"post":{"tags":["ops"],"summary":"Spool ONE test email to the verified address of the caller (founder/ops bands; rate-limited)","description":"Takes no recipient, subject or body. Enqueued through the comms spool like any message; the drain sends it.","security":[{"clerkSession":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestSendRequest"}}}},"responses":{"200":{"description":"Spooled; the drain sends it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestSend"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not a founder/ops account, or no identity to send to","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many test sends this hour","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/ops/comms/test-send/{id}":{"get":{"tags":["ops"],"summary":"The status of one test send by the caller, and its ACS operation id","security":[{"clerkSession":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The spool row","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestSend"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not a founder/ops account","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not one of your test sends","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/ops/feedback":{"get":{"tags":["ops"],"summary":"Every household’s in-app feedback, read-only, for the i2 node (a service token, not a Clerk session)","description":"The same rows as the connector’s feedback_list (ops domain): newest first, at most 200, the household as the last 4 characters of its id. aggregate=true groups them by topic and kind instead. Authenticated by `Authorization: Bearer <GP_API_OPS_TOKEN>` and by nothing else (a Clerk token is refused). A missing, wrong or wrong-length token is the same 401. With no token configured the route answers 404, as if it did not exist. GET only; it reads the feedback table and writes nothing but one audit row. Rate-limited per token.","security":[{"opsServiceToken":[]}],"parameters":[{"schema":{"type":"string","enum":["request","blocker","bug","idea"]},"required":false,"name":"kind","in":"query"},{"schema":{"type":"string","description":"An ISO date or date-time; compared with the row’s last-raised time (updatedAt)."},"required":false,"description":"An ISO date or date-time; compared with the row’s last-raised time (updatedAt).","name":"since","in":"query"},{"schema":{"type":"string","description":"An integer 1 to 200. Default 50."},"required":false,"description":"An integer 1 to 200. Default 50.","name":"limit","in":"query"},{"schema":{"type":"string","enum":["true","false"],"description":"true groups the rows by topic and kind, most raised first."},"required":false,"description":"true groups the rows by topic and kind, most raised first.","name":"aggregate","in":"query"}],"responses":{"200":{"description":"{ items } newest first, or { topics } when aggregate=true","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpsFeedback"}}}},"400":{"description":"An unknown parameter, or a value FeedbackListSchema refuses","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No valid service token","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"The route is not enabled on this API","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests for this token; see Retry-After","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/ops/notes":{"get":{"tags":["ops"],"summary":"The founders’ shared notes, read-only, for the i2 node (a service token, not a Clerk session)","description":"Without q, the connector’s solutions_notes_list: { notes }, newest first, filtered by type, sector (case-insensitive), author (a user id; \"me\" is refused) and since, at most 100 (default 20). With q (2 to 300 characters, web-search syntax), the connector’s solutions_kb_search: { results }, best match first, each note plus its rank, at most topK (1 to 12, default 6); the list parameters are refused in search mode and topK in list mode. Authenticated by `Authorization: Bearer <GP_API_OPS_TOKEN>` and by nothing else (a Clerk token is refused). A missing, wrong or wrong-length token is the same 401. With no token configured the route answers 404, as if it did not exist. GET only; it reads the notes table and writes nothing but one audit row, which never holds note text or the query. Rate-limited per token.","security":[{"opsServiceToken":[]}],"parameters":[{"schema":{"type":"string","enum":["decision","idea","friction","feedback","question","todo"],"description":"List mode only."},"required":false,"description":"List mode only.","name":"type","in":"query"},{"schema":{"type":"string","description":"List mode only. 1 to 40 characters; compared case-insensitively."},"required":false,"description":"List mode only. 1 to 40 characters; compared case-insensitively.","name":"sector","in":"query"},{"schema":{"type":"string","description":"List mode only. A user id (uuid). \"me\" is refused: this route has no user."},"required":false,"description":"List mode only. A user id (uuid). \"me\" is refused: this route has no user.","name":"author","in":"query"},{"schema":{"type":"string","description":"List mode only. An ISO date or a date-time with an offset."},"required":false,"description":"List mode only. An ISO date or a date-time with an offset.","name":"since","in":"query"},{"schema":{"type":"string","description":"List mode only. An integer 1 to 100. Default 20."},"required":false,"description":"List mode only. An integer 1 to 100. Default 20.","name":"limit","in":"query"},{"schema":{"type":"string","description":"Search mode: 2 to 300 characters, web-search syntax. With q the list parameters are refused."},"required":false,"description":"Search mode: 2 to 300 characters, web-search syntax. With q the list parameters are refused.","name":"q","in":"query"},{"schema":{"type":"string","description":"Search mode only. An integer 1 to 12. Default 6."},"required":false,"description":"Search mode only. An integer 1 to 12. Default 6.","name":"topK","in":"query"}],"responses":{"200":{"description":"{ notes } without q (newest first), or { results } with q (best match first)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpsNotes"}}}},"400":{"description":"An unknown or repeated parameter, a parameter the mode does not take, or a value NotesListSchema or KbSearchSchema refuses","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No valid service token","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"The route is not enabled on this API","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests for this token; see Retry-After","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/billing/checkout":{"post":{"tags":["billing"],"summary":"Start a Stripe Checkout for this household (test mode); returns the page to redirect to","security":[{"clerkSession":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutRequest"}}}},"responses":{"200":{"description":"The Checkout session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Checkout"}}}},"400":{"description":"Not a plan and interval on sale, returnTo 'app' from an origin this API does not serve, embedded without returnTo 'app', or a promotion code that is unknown (promotion_code_unknown) or expired or used up (promotion_code_unusable)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Only a household account can subscribe","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"This household is already subscribed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/billing/portal":{"post":{"tags":["billing"],"summary":"Open Stripe's customer portal for this household (test mode): manage or cancel; returns the page to redirect to","description":"Returns the browser to the calling app's /billing when its Origin is one this API serves, else to the site.","security":[{"clerkSession":[]}],"responses":{"200":{"description":"The portal session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingPortal"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Only a household account has a subscription","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"This household has never subscribed, so there is nothing to manage","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/billing/apple/token":{"get":{"tags":["billing"],"summary":"This account's appAccountToken for StoreKit 2 purchases (a stable uuid, made on the first call)","security":[{"clerkSession":[]}],"responses":{"200":{"description":"The token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppleToken"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Only a household account can subscribe","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/billing/apple/transactions":{"post":{"tags":["billing"],"summary":"Apply a StoreKit 2 transaction (Transaction.jwsRepresentation) to this household; returns the merged entitlement","description":"Verified against Apple Root CA - G3 (ES256, x5c chain), held to bundle ai.greenplate.app, the four GreenplateAi products and this account's appAccountToken. Idempotent; a transaction older than one already applied changes nothing.","security":[{"clerkSession":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppleTransactionRequest"}}}},"responses":{"200":{"description":"The live entitlement after this transaction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Entitlement"}}}},"400":{"description":"Not a transaction Apple signed, or not one of this app's subscription products","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No valid signed-in session","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Only a household account can subscribe","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The purchase was not made with this account's appAccountToken","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Not ready","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/webhooks/apple":{"post":{"tags":["billing"],"summary":"App Store Server Notifications V2 (signature-verified signedPayload; idempotent by notificationUUID)","description":"Called by Apple, never by a browser. The body is { signedPayload }; no session.","responses":{"200":{"description":"Recorded (a duplicate delivery is `replayed` and changes nothing)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookAck"}}}},"400":{"description":"Not JSON, no signedPayload, or a signature that does not verify to Apple","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error: Apple will retry","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Apple billing is not configured on this API","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/webhooks/stripe":{"post":{"tags":["billing"],"summary":"Stripe events (signature-verified over the raw body; idempotent by event id)","description":"Called by Stripe through the tunnel, never by a browser. Carries a Stripe-Signature header; no session.","responses":{"200":{"description":"Recorded (a duplicate delivery is `replayed` and changes nothing)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookAck"}}}},"400":{"description":"Signature missing, stale or wrong, or not a Stripe event","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error: Stripe will retry","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"No webhook secret configured","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}}},"webhooks":{}}