REST API of openfood. Errors use one envelope {error: {code, message}}. Generated from the running code. openapi.json
/.well-known/og-connect-jwks.jsonog-connect subject assertion keys
/api/docsAPI reference (HTML)
/api/healthRelease health per component
/api/revisionRelease revision (plain text)
/api/v1/admin/agents/statusAggregate agent keys and calls (admin)
/api/v1/admin/community/provisionStart or resume community provisioning
{
"type": "object",
"additionalProperties": false,
"properties": {
"resume": {
"type": "boolean"
}
}
}
/api/v1/admin/community/round-tripSend a test chat message and wait for the AI cook reply
{
"type": "object",
"additionalProperties": false,
"properties": {
"wait_ms": {
"type": "integer",
"minimum": 0,
"maximum": 25000
}
}
}
/api/v1/admin/community/statusCommunity provisioning and AI cook verification
/api/v1/admin/dashboard/statusGet aggregate dashboard activity
/api/v1/admin/foods/coverageMeasured name coverage of the top foods per locale (admin)
/api/v1/admin/foods/importsNutrition import history (admin)
/api/v1/admin/foods/synonymsSynonym review queue (admin)
/api/v1/admin/foods/synonyms/{id}/reviewApprove or reject a synonym (admin)
{
"additionalProperties": false,
"type": "object",
"required": [
"status"
],
"properties": {
"status": {
"anyOf": [
{
"const": "approved",
"type": "string"
},
{
"const": "rejected",
"type": "string"
},
{
"const": "pending_review",
"type": "string"
}
]
}
}
}
/api/v1/admin/goals/statusGoal estimator settings and aggregate check-in and insight activity
/api/v1/admin/ops/insightsSettings, journey metrics, inference usage and product usage counts, 7 days, aggregates only (admin)
/api/v1/admin/ops/statusOperational summary: revision, health, job queue and privacy erasure status (admin)
/api/v1/admin/quick-log/statusAggregate quick log and correction activity
/api/v1/admin/scans/quotasSet daily AI quotas by actor class
{
"additionalProperties": false,
"type": "object",
"required": [
"guest",
"account",
"agent"
],
"properties": {
"guest": {
"minimum": 0,
"maximum": 10000,
"type": "integer"
},
"account": {
"minimum": 0,
"maximum": 10000,
"type": "integer"
},
"agent": {
"minimum": 0,
"maximum": 10000,
"type": "integer"
}
}
}
/api/v1/admin/scans/settingsGet scan quotas, certainty thresholds and inference health
/api/v1/agent-keysList your agent keys (person only)
/api/v1/agent-keysCreate an agent key; the secret is shown once (person only)
{
"additionalProperties": false,
"type": "object",
"required": [
"name",
"scopes"
],
"properties": {
"name": {
"minLength": 1,
"maxLength": 60,
"pattern": "\\S",
"type": "string"
},
"scopes": {
"minItems": 1,
"maxItems": 4,
"uniqueItems": true,
"type": "array",
"items": {
"anyOf": [
{
"const": "diary:read",
"type": "string"
},
{
"const": "diary:write",
"type": "string"
},
{
"const": "scans:write",
"type": "string"
},
{
"const": "profile:read",
"type": "string"
}
]
}
},
"expires_in_days": {
"anyOf": [
{
"const": 7,
"type": "number"
},
{
"const": 30,
"type": "number"
},
{
"const": 90,
"type": "number"
},
{
"const": 365,
"type": "number"
},
{
"type": "null"
}
]
}
}
}
/api/v1/agent-keys/activityWhat your agents did recently (person only)
/api/v1/agent-keys/{id}Revoke an agent key at once (person only)
/api/v1/agent-tasksPreview a multi-step task
{
"additionalProperties": false,
"type": "object",
"required": [
"kind"
],
"properties": {
"kind": {
"description": "plan_and_shop: plan empty slots from your own library, then build the shopping list and show what you already have. replace_meal: swap the meal planned at date+slot for the best alternative from your library, then rebuild the shopping list (needs date and slot)",
"anyOf": [
{
"const": "plan_and_shop",
"type": "string"
},
{
"const": "replace_meal",
"type": "string"
}
]
},
"date": {
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Local date YYYY-MM-DD in the meal timezone",
"type": "string"
},
"slot": {
"anyOf": [
{
"const": "breakfast",
"type": "string"
},
{
"const": "lunch",
"type": "string"
},
{
"const": "dinner",
"type": "string"
},
{
"const": "snack",
"type": "string"
}
]
},
"from": {
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Local date YYYY-MM-DD in the meal timezone",
"type": "string"
},
"days": {
"minimum": 1,
"maximum": 14,
"description": "Days in the window (default 5)",
"type": "integer"
},
"slots": {
"maxLength": 40,
"pattern": "^[a-z]+(,[a-z]+){0,3}$",
"description": "Comma list of breakfast, lunch, dinner, snack (default lunch,dinner)",
"type": "string"
},
"fit": {
"description": "Scale each planned slot to its energy target (0.5 to 3 servings)",
"type": "boolean"
},
"max_minutes": {
"minimum": 5,
"maximum": 600,
"description": "Only recipes with a stated time of at most this many minutes, e.g. 20",
"type": "integer"
},
"tz": {
"minLength": 1,
"maxLength": 64,
"type": "string"
}
}
}
/api/v1/agent-tasksList your recent tasks
/api/v1/agent-tasks/{id}Get a task and its progress
/api/v1/agent-tasks/{id}/cancelCancel a task
{
"additionalProperties": false,
"type": "object",
"properties": {}
}
/api/v1/agent-tasks/{id}/confirmConfirm and run a previewed task
{
"additionalProperties": false,
"type": "object",
"properties": {}
}
/api/v1/ai-connectYour connected AI (OPEN plan)
/api/v1/ai-connect/callbackog-connect authorization callback
/api/v1/ai-connect/disconnectDisconnect your own AI
{
"additionalProperties": false,
"type": "object",
"properties": {}
}
/api/v1/ai-connect/startStart connecting your own AI through og-connect
{
"additionalProperties": false,
"type": "object",
"properties": {}
}
/api/v1/ai-connect/webhookog-connect events (signature-verified)
/api/v1/auth/apple/callbackComplete apple sign-in
/api/v1/auth/apple/startStart apple sign-in
{
"additionalProperties": false,
"type": "object",
"properties": {
"birth_date": {
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"type": "string"
}
}
}
/api/v1/auth/csrfGet a browser CSRF token
/api/v1/auth/email/finishRedeem an email sign-in link
{
"additionalProperties": false,
"type": "object",
"required": [
"token"
],
"properties": {
"token": {
"pattern": "^[A-Za-z0-9_-]{43}$",
"type": "string"
}
}
}
/api/v1/auth/email/startRequest an email sign-in link
{
"additionalProperties": false,
"type": "object",
"required": [
"email"
],
"properties": {
"email": {
"pattern": "^[^\\s<>@\",;:]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}$",
"maxLength": 254,
"type": "string"
},
"locale": {
"anyOf": [
{
"const": "en",
"type": "string"
},
{
"const": "es",
"type": "string"
},
{
"const": "fr",
"type": "string"
},
{
"const": "de",
"type": "string"
},
{
"const": "pt",
"type": "string"
},
{
"const": "it",
"type": "string"
},
{
"const": "nl",
"type": "string"
},
{
"const": "pl",
"type": "string"
},
{
"const": "he",
"type": "string"
},
{
"const": "ar",
"type": "string"
},
{
"const": "zh-CN",
"type": "string"
},
{
"const": "ja",
"type": "string"
},
{
"const": "ko",
"type": "string"
},
{
"const": "ru",
"type": "string"
},
{
"const": "uk",
"type": "string"
},
{
"const": "tr",
"type": "string"
}
]
},
"birth_date": {
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"type": "string"
}
}
}
/api/v1/auth/google/callbackComplete google sign-in
/api/v1/auth/google/startStart google sign-in
{
"additionalProperties": false,
"type": "object",
"properties": {
"birth_date": {
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"type": "string"
}
}
}
/api/v1/auth/guestStart a guest session
{
"additionalProperties": false,
"type": "object",
"properties": {}
}
/api/v1/auth/passkey/register/finishVerify passkey registration
{
"additionalProperties": false,
"type": "object",
"required": [
"challenge",
"credential"
],
"properties": {
"challenge": {
"pattern": "^[A-Za-z0-9_-]{43}$",
"type": "string"
},
"credential": {
"additionalProperties": true,
"type": "object",
"required": [
"id",
"response"
],
"properties": {
"id": {
"minLength": 1,
"maxLength": 1400,
"type": "string"
},
"response": {
"type": "object",
"patternProperties": {
"^(.*)$": {}
}
}
}
}
}
}
/api/v1/auth/passkey/register/optionsStart passkey registration
{
"additionalProperties": false,
"type": "object",
"properties": {
"birth_date": {
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"type": "string"
}
}
}
/api/v1/auth/passkey/sign-in/finishVerify passkey assertion
{
"additionalProperties": false,
"type": "object",
"required": [
"challenge",
"credential"
],
"properties": {
"challenge": {
"pattern": "^[A-Za-z0-9_-]{43}$",
"type": "string"
},
"credential": {
"additionalProperties": true,
"type": "object",
"required": [
"id",
"response"
],
"properties": {
"id": {
"minLength": 1,
"maxLength": 1400,
"type": "string"
},
"response": {
"type": "object",
"patternProperties": {
"^(.*)$": {}
}
}
}
}
}
}
/api/v1/auth/passkey/sign-in/optionsStart passkey sign-in
{
"additionalProperties": false,
"type": "object",
"properties": {}
}
/api/v1/auth/providersList sign-in providers
/api/v1/auth/sign-outRevoke browser session
{
"additionalProperties": false,
"type": "object",
"properties": {}
}
/api/v1/billingGet plan and AI usage
/api/v1/billing/apple/account-tokenYour appAccountToken for App Store purchases
/api/v1/billing/apple/notificationsApp Store Server Notifications v2 (signature-verified)
{
"type": "object",
"required": [
"signedPayload"
],
"properties": {
"signedPayload": {
"minLength": 20,
"maxLength": 16384,
"pattern": "^[A-Za-z0-9_-]+\\.[A-Za-z0-9_-]+\\.[A-Za-z0-9_-]+$",
"type": "string"
}
}
}
/api/v1/billing/apple/verifyVerify an App Store signed transaction and unlock Plus
{
"additionalProperties": false,
"type": "object",
"required": [
"signed_transaction"
],
"properties": {
"signed_transaction": {
"minLength": 20,
"maxLength": 16384,
"pattern": "^[A-Za-z0-9_-]+\\.[A-Za-z0-9_-]+\\.[A-Za-z0-9_-]+$",
"type": "string"
},
"restore": {
"description": "true from Restore Purchases: moves the subscription to this account",
"type": "boolean"
}
}
}
/api/v1/billing/checkoutStart a Stripe Checkout for Plus
{
"additionalProperties": false,
"type": "object",
"required": [
"interval"
],
"properties": {
"interval": {
"anyOf": [
{
"const": "monthly",
"type": "string"
},
{
"const": "yearly",
"type": "string"
}
]
}
}
}
/api/v1/billing/checkout/confirmConfirm a completed Stripe Checkout on return
{
"additionalProperties": false,
"type": "object",
"required": [
"session_id"
],
"properties": {
"session_id": {
"pattern": "^cs_[A-Za-z0-9_]{3,250}$",
"type": "string"
}
}
}
/api/v1/billing/portalOpen the Stripe Customer Portal to manage or cancel
/api/v1/billing/stripe/webhookStripe webhook (signature-verified)
/api/v1/capture/caloriesLog manually entered calories
{
"additionalProperties": false,
"type": "object",
"required": [
"tz",
"meal_type",
"name",
"kcal"
],
"properties": {
"tz": {
"minLength": 1,
"maxLength": 64,
"type": "string"
},
"meal_type": {
"anyOf": [
{
"const": "breakfast",
"type": "string"
},
{
"const": "lunch",
"type": "string"
},
{
"const": "dinner",
"type": "string"
},
{
"const": "snack",
"type": "string"
},
{
"const": "other",
"type": "string"
}
]
},
"consent": {
"additionalProperties": false,
"type": "object",
"required": [
"version"
],
"properties": {
"version": {
"minLength": 1,
"maxLength": 32,
"type": "string"
}
}
},
"name": {
"minLength": 1,
"maxLength": 200,
"pattern": "\\S",
"type": "string"
},
"kcal": {
"exclusiveMinimum": 0,
"maximum": 100000,
"type": "number"
},
"locale": {
"description": "UI locale (16 locales; pt = PT-PT)",
"anyOf": [
{
"const": "en",
"type": "string"
},
{
"const": "es",
"type": "string"
},
{
"const": "fr",
"type": "string"
},
{
"const": "de",
"type": "string"
},
{
"const": "pt",
"type": "string"
},
{
"const": "it",
"type": "string"
},
{
"const": "nl",
"type": "string"
},
{
"const": "pl",
"type": "string"
},
{
"const": "he",
"type": "string"
},
{
"const": "ar",
"type": "string"
},
{
"const": "zh-CN",
"type": "string"
},
{
"const": "ja",
"type": "string"
},
{
"const": "ko",
"type": "string"
},
{
"const": "ru",
"type": "string"
},
{
"const": "uk",
"type": "string"
},
{
"const": "tr",
"type": "string"
}
]
},
"logged_at": {
"format": "date-time",
"type": "string"
}
}
}
/api/v1/checkinsGet check-in
/api/v1/checkinsRun check-in
{
"additionalProperties": false,
"type": "object",
"properties": {}
}
/api/v1/checkins/dayConfirm an intake day
{
"additionalProperties": false,
"type": "object",
"required": [
"date",
"confirmed"
],
"properties": {
"date": {
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"type": "string"
},
"confirmed": {
"type": "boolean"
}
}
}
/api/v1/checkins/decisionDecide a check-in
{
"additionalProperties": false,
"type": "object",
"required": [
"id",
"accept"
],
"properties": {
"id": {
"format": "uuid",
"type": "string"
},
"accept": {
"type": "boolean"
}
}
}
/api/v1/community/chatChat with an AI cook
/api/v1/community/chatMessage an AI cook
{
"additionalProperties": false,
"type": "object",
"required": [
"cook_id",
"body"
],
"properties": {
"cook_id": {
"format": "uuid",
"type": "string"
},
"body": {
"minLength": 1,
"maxLength": 2000,
"pattern": "\\S",
"type": "string"
}
}
}
/api/v1/community/chatsYour chats with AI cooks
/api/v1/community/commentsComment on a community post
{
"additionalProperties": false,
"type": "object",
"required": [
"post_id",
"body"
],
"properties": {
"post_id": {
"format": "uuid",
"type": "string"
},
"body": {
"minLength": 1,
"maxLength": 2000,
"pattern": "\\S",
"type": "string"
}
}
}
/api/v1/community/cookAI cook profile
/api/v1/community/cooksFind AI cooks
/api/v1/community/feedCommunity feed
/api/v1/community/followFollow or unfollow an AI cook
{
"additionalProperties": false,
"type": "object",
"required": [
"cook_id",
"follow"
],
"properties": {
"cook_id": {
"format": "uuid",
"type": "string"
},
"follow": {
"type": "boolean"
}
}
}
/api/v1/community/media/{file}Community image (CC0 or public domain)
/api/v1/community/postCommunity post with comments
/api/v1/community/save-recipeSave a cook's recipe to your library
{
"additionalProperties": false,
"type": "object",
"required": [
"post_id"
],
"properties": {
"post_id": {
"format": "uuid",
"type": "string"
}
}
}
/api/v1/consentsRead consent status and history
/api/v1/consentsGive health-data consent in settings
{
"additionalProperties": false,
"type": "object",
"required": [
"version"
],
"properties": {
"version": {
"minLength": 1,
"maxLength": 32,
"type": "string"
}
}
}
/api/v1/consents/withdrawWithdraw health-data consent
{
"additionalProperties": false,
"type": "object",
"properties": {}
}
/api/v1/dashboard/historyGet calendar marks or timeline detail
/api/v1/dashboard/nutrientsGet daily averages for logged days
/api/v1/dashboard/photos/{id}Get a private meal thumbnail URL
/api/v1/dashboard/todayGet the daily dashboard
/api/v1/daysDaily totals in a date range (cursor pagination)
/api/v1/days/{date}One day: meals and totals (unknown stays unknown)
/api/v1/events/journeyRecord an anonymous journey step (taps, time)
{
"additionalProperties": false,
"description": "Anonymous journey metric: no user id, no PII",
"type": "object",
"required": [
"journey",
"step",
"taps",
"duration_ms",
"client_revision"
],
"properties": {
"journey": {
"pattern": "^[a-z][a-z0-9_]{0,39}$",
"description": "Journey id, e.g. j1_photo_log",
"type": "string"
},
"step": {
"pattern": "^[a-z][a-z0-9_]{0,39}$",
"description": "Step name, e.g. start, logged",
"type": "string"
},
"taps": {
"minimum": 0,
"maximum": 1000,
"type": "integer"
},
"duration_ms": {
"minimum": 0,
"maximum": 3600000,
"type": "integer"
},
"client_revision": {
"pattern": "^[0-9a-z]{1,40}$",
"type": "string"
}
}
}
/api/v1/foodsCreate a private food (label scan or manual entry)
{
"additionalProperties": false,
"description": "Private food from a label or manual entry",
"type": "object",
"required": [
"name",
"basis",
"nutrients"
],
"properties": {
"name": {
"minLength": 1,
"maxLength": 200,
"type": "string"
},
"brand": {
"maxLength": 120,
"type": "string"
},
"locale": {
"description": "UI locale (16 locales; pt = PT-PT)",
"anyOf": [
{
"const": "en",
"type": "string"
},
{
"const": "es",
"type": "string"
},
{
"const": "fr",
"type": "string"
},
{
"const": "de",
"type": "string"
},
{
"const": "pt",
"type": "string"
},
{
"const": "it",
"type": "string"
},
{
"const": "nl",
"type": "string"
},
{
"const": "pl",
"type": "string"
},
{
"const": "he",
"type": "string"
},
{
"const": "ar",
"type": "string"
},
{
"const": "zh-CN",
"type": "string"
},
{
"const": "ja",
"type": "string"
},
{
"const": "ko",
"type": "string"
},
{
"const": "ru",
"type": "string"
},
{
"const": "uk",
"type": "string"
},
{
"const": "tr",
"type": "string"
}
]
},
"basis": {
"default": "per_100g",
"anyOf": [
{
"const": "per_100g",
"type": "string"
},
{
"const": "per_serving",
"type": "string"
}
]
},
"serving_grams": {
"exclusiveMinimum": 0,
"maximum": 5000,
"type": "number"
},
"serving_label": {
"maxLength": 120,
"type": "string"
},
"nutrients": {
"type": "object",
"patternProperties": {
"^[a-z][a-z0-9_]*$": {
"minimum": 0,
"maximum": 100000,
"type": "number"
}
}
},
"portions": {
"maxItems": 16,
"type": "array",
"items": {
"additionalProperties": false,
"description": "Household measure: `amount` `unit` weighs `grams`",
"type": "object",
"required": [
"unit",
"amount",
"grams",
"label"
],
"properties": {
"unit": {
"type": "string"
},
"amount": {
"exclusiveMinimum": 0,
"type": "number"
},
"grams": {
"exclusiveMinimum": 0,
"type": "number"
},
"label": {
"maxLength": 120,
"type": "string"
}
}
}
},
"barcode": {
"pattern": "^[0-9]{8,14}$",
"type": "string"
},
"nova": {
"minimum": 1,
"maximum": 4,
"type": "integer"
}
}
}
/api/v1/foods/barcode/{code}Look up a barcode (Open Food Facts, cached 30 days; not_found ⇒ scan the label)
/api/v1/foods/searchSearch foods by name (16 locales; user locale first, then English)
/api/v1/foods/{id}Get a food (nutrients per 100 g, portions, source, licence)
/api/v1/goalsGet targets
/api/v1/goalsSet targets
{
"additionalProperties": false,
"type": "object",
"required": [
"goal",
"sex",
"age",
"cm",
"version"
],
"properties": {
"goal": {
"anyOf": [
{
"const": "lose025",
"type": "string"
},
{
"const": "lose05",
"type": "string"
},
{
"const": "lose075",
"type": "string"
},
{
"const": "maintain",
"type": "string"
},
{
"const": "gain025",
"type": "string"
}
]
},
"sex": {
"anyOf": [
{
"const": "female",
"type": "string"
},
{
"const": "male",
"type": "string"
}
]
},
"age": {
"minimum": 1,
"maximum": 130,
"type": "integer"
},
"cm": {
"minimum": 50,
"maximum": 300,
"type": "number"
},
"kg": {
"minimum": 20,
"maximum": 500,
"type": "number"
},
"timezone": {
"minLength": 1,
"maxLength": 64,
"type": "string"
},
"activity": {
"anyOf": [
{
"const": "sedentary",
"type": "string"
},
{
"const": "light",
"type": "string"
},
{
"const": "moderate",
"type": "string"
},
{
"const": "high",
"type": "string"
},
{
"const": "very_high",
"type": "string"
}
]
},
"mode": {
"anyOf": [
{
"const": "auto",
"type": "string"
},
{
"const": "ask",
"type": "string"
},
{
"const": "manual",
"type": "string"
}
]
},
"diet": {
"anyOf": [
{
"const": "balanced",
"type": "string"
},
{
"const": "highProtein",
"type": "string"
},
{
"const": "lowCarb",
"type": "string"
},
{
"const": "keto",
"type": "string"
},
{
"const": "vegetarian",
"type": "string"
},
{
"const": "vegan",
"type": "string"
}
]
},
"macros": {
"anyOf": [
{
"anyOf": [
{
"additionalProperties": false,
"type": "object",
"required": [
"unit",
"protein",
"carbs",
"fat"
],
"properties": {
"unit": {
"const": "grams",
"type": "string"
},
"protein": {
"minimum": 0,
"maximum": 2000,
"type": "number"
},
"carbs": {
"minimum": 0,
"maximum": 2000,
"type": "number"
},
"fat": {
"minimum": 0,
"maximum": 2000,
"type": "number"
}
}
},
{
"additionalProperties": false,
"type": "object",
"required": [
"unit",
"protein",
"carbs",
"fat"
],
"properties": {
"unit": {
"const": "percent",
"type": "string"
},
"protein": {
"minimum": 0,
"maximum": 100,
"type": "number"
},
"carbs": {
"minimum": 0,
"maximum": 100,
"type": "number"
},
"fat": {
"minimum": 0,
"maximum": 100,
"type": "number"
}
}
}
]
},
{
"type": "null"
}
]
},
"version": {
"anyOf": [
{
"format": "uuid",
"type": "string"
},
{
"type": "null"
}
]
}
}
}
/api/v1/goals/daySet daily macros
{
"additionalProperties": false,
"type": "object",
"required": [
"date",
"macros"
],
"properties": {
"date": {
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"type": "string"
},
"macros": {
"anyOf": [
{
"anyOf": [
{
"additionalProperties": false,
"type": "object",
"required": [
"unit",
"protein",
"carbs",
"fat"
],
"properties": {
"unit": {
"const": "grams",
"type": "string"
},
"protein": {
"minimum": 0,
"maximum": 2000,
"type": "number"
},
"carbs": {
"minimum": 0,
"maximum": 2000,
"type": "number"
},
"fat": {
"minimum": 0,
"maximum": 2000,
"type": "number"
}
}
},
{
"additionalProperties": false,
"type": "object",
"required": [
"unit",
"protein",
"carbs",
"fat"
],
"properties": {
"unit": {
"const": "percent",
"type": "string"
},
"protein": {
"minimum": 0,
"maximum": 100,
"type": "number"
},
"carbs": {
"minimum": 0,
"maximum": 100,
"type": "number"
},
"fat": {
"minimum": 0,
"maximum": 100,
"type": "number"
}
}
}
]
},
{
"type": "null"
}
]
}
}
}
/api/v1/insights/weekGet weekly insight
/api/v1/insights/weekRequest weekly insight
{
"additionalProperties": false,
"type": "object",
"required": [
"locale"
],
"properties": {
"locale": {
"anyOf": [
{
"const": "en",
"type": "string"
},
{
"const": "es",
"type": "string"
},
{
"const": "fr",
"type": "string"
},
{
"const": "de",
"type": "string"
},
{
"const": "pt",
"type": "string"
},
{
"const": "it",
"type": "string"
},
{
"const": "nl",
"type": "string"
},
{
"const": "pl",
"type": "string"
},
{
"const": "he",
"type": "string"
},
{
"const": "ar",
"type": "string"
},
{
"const": "zh-CN",
"type": "string"
},
{
"const": "ja",
"type": "string"
},
{
"const": "ko",
"type": "string"
},
{
"const": "ru",
"type": "string"
},
{
"const": "uk",
"type": "string"
},
{
"const": "tr",
"type": "string"
}
]
}
}
}
/api/v1/insights/week-reviewGet your week review
/api/v1/libraryList your library
/api/v1/library/favouritesList your favourites
/api/v1/library/favourites/{kind}/{id}Star a library item
/api/v1/library/favourites/{kind}/{id}Unstar a library item
/api/v1/library/foodsCreate library foods
{
"additionalProperties": false,
"type": "object",
"required": [
"name",
"nutrients"
],
"properties": {
"name": {
"minLength": 1,
"maxLength": 200,
"pattern": "\\S",
"type": "string"
},
"locale": {
"description": "UI locale (16 locales; pt = PT-PT)",
"anyOf": [
{
"const": "en",
"type": "string"
},
{
"const": "es",
"type": "string"
},
{
"const": "fr",
"type": "string"
},
{
"const": "de",
"type": "string"
},
{
"const": "pt",
"type": "string"
},
{
"const": "it",
"type": "string"
},
{
"const": "nl",
"type": "string"
},
{
"const": "pl",
"type": "string"
},
{
"const": "he",
"type": "string"
},
{
"const": "ar",
"type": "string"
},
{
"const": "zh-CN",
"type": "string"
},
{
"const": "ja",
"type": "string"
},
{
"const": "ko",
"type": "string"
},
{
"const": "ru",
"type": "string"
},
{
"const": "uk",
"type": "string"
},
{
"const": "tr",
"type": "string"
}
]
},
"serving_grams": {
"exclusiveMinimum": 0,
"maximum": 5000,
"type": "number"
},
"nutrients": {
"type": "object",
"patternProperties": {
"^[a-z][a-z0-9_]*$": {
"minimum": 0,
"maximum": 100000,
"type": "number"
}
}
}
}
}
/api/v1/library/foods/{id}Edit library foods
{
"additionalProperties": false,
"type": "object",
"required": [
"name",
"nutrients"
],
"properties": {
"name": {
"minLength": 1,
"maxLength": 200,
"pattern": "\\S",
"type": "string"
},
"locale": {
"description": "UI locale (16 locales; pt = PT-PT)",
"anyOf": [
{
"const": "en",
"type": "string"
},
{
"const": "es",
"type": "string"
},
{
"const": "fr",
"type": "string"
},
{
"const": "de",
"type": "string"
},
{
"const": "pt",
"type": "string"
},
{
"const": "it",
"type": "string"
},
{
"const": "nl",
"type": "string"
},
{
"const": "pl",
"type": "string"
},
{
"const": "he",
"type": "string"
},
{
"const": "ar",
"type": "string"
},
{
"const": "zh-CN",
"type": "string"
},
{
"const": "ja",
"type": "string"
},
{
"const": "ko",
"type": "string"
},
{
"const": "ru",
"type": "string"
},
{
"const": "uk",
"type": "string"
},
{
"const": "tr",
"type": "string"
}
]
},
"serving_grams": {
"exclusiveMinimum": 0,
"maximum": 5000,
"type": "number"
},
"nutrients": {
"type": "object",
"patternProperties": {
"^[a-z][a-z0-9_]*$": {
"minimum": 0,
"maximum": 100000,
"type": "number"
}
}
}
}
}
/api/v1/library/mealsSave a meal to your library
{
"anyOf": [
{
"additionalProperties": false,
"type": "object",
"required": [
"meal_id"
],
"properties": {
"meal_id": {
"format": "uuid",
"type": "string"
},
"name": {
"minLength": 1,
"maxLength": 200,
"pattern": "\\S",
"type": "string"
}
}
},
{
"additionalProperties": false,
"type": "object",
"required": [
"name",
"items"
],
"properties": {
"name": {
"minLength": 1,
"maxLength": 200,
"pattern": "\\S",
"type": "string"
},
"items": {
"minItems": 1,
"maxItems": 50,
"type": "array",
"items": {
"additionalProperties": false,
"type": "object",
"required": [
"food_id",
"grams"
],
"properties": {
"food_id": {
"format": "uuid",
"type": "string"
},
"grams": {
"exclusiveMinimum": 0,
"maximum": 5000,
"type": "number"
}
}
}
}
}
}
],
"type": "object"
}
/api/v1/library/meals/{id}Edit library meals
{
"additionalProperties": false,
"type": "object",
"required": [
"name",
"items"
],
"properties": {
"name": {
"minLength": 1,
"maxLength": 200,
"pattern": "\\S",
"type": "string"
},
"items": {
"minItems": 1,
"maxItems": 50,
"type": "array",
"items": {
"additionalProperties": false,
"type": "object",
"required": [
"food_id",
"grams"
],
"properties": {
"food_id": {
"format": "uuid",
"type": "string"
},
"grams": {
"exclusiveMinimum": 0,
"maximum": 5000,
"type": "number"
}
}
}
}
}
}
/api/v1/library/recipesCreate library recipes
{
"additionalProperties": false,
"type": "object",
"required": [
"name",
"servings",
"ingredients"
],
"properties": {
"name": {
"minLength": 1,
"maxLength": 200,
"pattern": "\\S",
"type": "string"
},
"locale": {
"description": "UI locale (16 locales; pt = PT-PT)",
"anyOf": [
{
"const": "en",
"type": "string"
},
{
"const": "es",
"type": "string"
},
{
"const": "fr",
"type": "string"
},
{
"const": "de",
"type": "string"
},
{
"const": "pt",
"type": "string"
},
{
"const": "it",
"type": "string"
},
{
"const": "nl",
"type": "string"
},
{
"const": "pl",
"type": "string"
},
{
"const": "he",
"type": "string"
},
{
"const": "ar",
"type": "string"
},
{
"const": "zh-CN",
"type": "string"
},
{
"const": "ja",
"type": "string"
},
{
"const": "ko",
"type": "string"
},
{
"const": "ru",
"type": "string"
},
{
"const": "uk",
"type": "string"
},
{
"const": "tr",
"type": "string"
}
]
},
"servings": {
"minimum": 1,
"maximum": 100,
"type": "integer"
},
"ingredients": {
"minItems": 1,
"maxItems": 50,
"type": "array",
"items": {
"additionalProperties": false,
"type": "object",
"required": [
"food_id",
"grams"
],
"properties": {
"food_id": {
"format": "uuid",
"type": "string"
},
"grams": {
"exclusiveMinimum": 0,
"maximum": 5000,
"type": "number"
}
}
}
},
"prep_minutes": {
"description": "Omit to keep the stored time; null clears it",
"anyOf": [
{
"minimum": 1,
"maximum": 600,
"description": "Total minutes to make it (hands-on plus cooking), as the person states it",
"type": "integer"
},
{
"type": "null"
}
]
},
"source": {
"description": "Omit to keep the stored source; null clears it",
"anyOf": [
{
"additionalProperties": false,
"type": "object",
"required": [
"url",
"site",
"author"
],
"properties": {
"url": {
"pattern": "^https://",
"maxLength": 2000,
"type": "string"
},
"site": {
"minLength": 1,
"maxLength": 253,
"type": "string"
},
"author": {
"anyOf": [
{
"maxLength": 120,
"type": "string"
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
}
}
/api/v1/library/recipes/importRead a recipe from a link
{
"additionalProperties": false,
"type": "object",
"required": [
"url"
],
"properties": {
"url": {
"minLength": 12,
"maxLength": 2000,
"pattern": "^https://",
"description": "One public https:// recipe page",
"type": "string"
},
"locale": {
"description": "UI locale (16 locales; pt = PT-PT)",
"anyOf": [
{
"const": "en",
"type": "string"
},
{
"const": "es",
"type": "string"
},
{
"const": "fr",
"type": "string"
},
{
"const": "de",
"type": "string"
},
{
"const": "pt",
"type": "string"
},
{
"const": "it",
"type": "string"
},
{
"const": "nl",
"type": "string"
},
{
"const": "pl",
"type": "string"
},
{
"const": "he",
"type": "string"
},
{
"const": "ar",
"type": "string"
},
{
"const": "zh-CN",
"type": "string"
},
{
"const": "ja",
"type": "string"
},
{
"const": "ko",
"type": "string"
},
{
"const": "ru",
"type": "string"
},
{
"const": "uk",
"type": "string"
},
{
"const": "tr",
"type": "string"
}
]
}
}
}
/api/v1/library/recipes/{id}Edit library recipes
{
"additionalProperties": false,
"type": "object",
"required": [
"name",
"servings",
"ingredients"
],
"properties": {
"name": {
"minLength": 1,
"maxLength": 200,
"pattern": "\\S",
"type": "string"
},
"locale": {
"description": "UI locale (16 locales; pt = PT-PT)",
"anyOf": [
{
"const": "en",
"type": "string"
},
{
"const": "es",
"type": "string"
},
{
"const": "fr",
"type": "string"
},
{
"const": "de",
"type": "string"
},
{
"const": "pt",
"type": "string"
},
{
"const": "it",
"type": "string"
},
{
"const": "nl",
"type": "string"
},
{
"const": "pl",
"type": "string"
},
{
"const": "he",
"type": "string"
},
{
"const": "ar",
"type": "string"
},
{
"const": "zh-CN",
"type": "string"
},
{
"const": "ja",
"type": "string"
},
{
"const": "ko",
"type": "string"
},
{
"const": "ru",
"type": "string"
},
{
"const": "uk",
"type": "string"
},
{
"const": "tr",
"type": "string"
}
]
},
"servings": {
"minimum": 1,
"maximum": 100,
"type": "integer"
},
"ingredients": {
"minItems": 1,
"maxItems": 50,
"type": "array",
"items": {
"additionalProperties": false,
"type": "object",
"required": [
"food_id",
"grams"
],
"properties": {
"food_id": {
"format": "uuid",
"type": "string"
},
"grams": {
"exclusiveMinimum": 0,
"maximum": 5000,
"type": "number"
}
}
}
},
"prep_minutes": {
"description": "Omit to keep the stored time; null clears it",
"anyOf": [
{
"minimum": 1,
"maximum": 600,
"description": "Total minutes to make it (hands-on plus cooking), as the person states it",
"type": "integer"
},
{
"type": "null"
}
]
},
"source": {
"description": "Omit to keep the stored source; null clears it",
"anyOf": [
{
"additionalProperties": false,
"type": "object",
"required": [
"url",
"site",
"author"
],
"properties": {
"url": {
"pattern": "^https://",
"maxLength": 2000,
"type": "string"
},
"site": {
"minLength": 1,
"maxLength": 253,
"type": "string"
},
"author": {
"anyOf": [
{
"maxLength": 120,
"type": "string"
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
}
}
/api/v1/library/searchSearch food and saved meals
/api/v1/library/{kind}/{id}Delete from your library
/api/v1/library/{kind}/{id}/logLog a library item
{
"additionalProperties": false,
"type": "object",
"required": [
"tz",
"meal_type"
],
"properties": {
"tz": {
"minLength": 1,
"maxLength": 64,
"type": "string"
},
"meal_type": {
"anyOf": [
{
"const": "breakfast",
"type": "string"
},
{
"const": "lunch",
"type": "string"
},
{
"const": "dinner",
"type": "string"
},
{
"const": "snack",
"type": "string"
},
{
"const": "other",
"type": "string"
}
]
},
"consent": {
"additionalProperties": false,
"type": "object",
"required": [
"version"
],
"properties": {
"version": {
"minLength": 1,
"maxLength": 32,
"type": "string"
}
}
},
"servings": {
"exclusiveMinimum": 0,
"maximum": 100,
"type": "number"
}
}
}
/api/v1/meGet current guest or account
/api/v1/meSave profile preferences
{
"additionalProperties": false,
"minProperties": 1,
"type": "object",
"properties": {
"sex": {
"anyOf": [
{
"anyOf": [
{
"const": "female",
"type": "string"
},
{
"const": "male",
"type": "string"
},
{
"const": "other",
"type": "string"
}
]
},
{
"type": "null"
}
]
},
"height_cm": {
"anyOf": [
{
"minimum": 50,
"maximum": 300,
"type": "number"
},
{
"type": "null"
}
]
},
"activity": {
"anyOf": [
{
"anyOf": [
{
"const": "sedentary",
"type": "string"
},
{
"const": "light",
"type": "string"
},
{
"const": "moderate",
"type": "string"
},
{
"const": "high",
"type": "string"
},
{
"const": "very_high",
"type": "string"
}
]
},
{
"type": "null"
}
]
},
"locale": {
"anyOf": [
{
"anyOf": [
{
"const": "en",
"type": "string"
},
{
"const": "es",
"type": "string"
},
{
"const": "fr",
"type": "string"
},
{
"const": "de",
"type": "string"
},
{
"const": "pt",
"type": "string"
},
{
"const": "it",
"type": "string"
},
{
"const": "nl",
"type": "string"
},
{
"const": "pl",
"type": "string"
},
{
"const": "he",
"type": "string"
},
{
"const": "ar",
"type": "string"
},
{
"const": "zh-CN",
"type": "string"
},
{
"const": "ja",
"type": "string"
},
{
"const": "ko",
"type": "string"
},
{
"const": "ru",
"type": "string"
},
{
"const": "uk",
"type": "string"
},
{
"const": "tr",
"type": "string"
}
]
},
{
"type": "null"
}
]
},
"timezone": {
"anyOf": [
{
"maxLength": 64,
"minLength": 1,
"type": "string"
},
{
"type": "null"
}
]
},
"units": {
"anyOf": [
{
"additionalProperties": false,
"type": "object",
"properties": {
"energy": {
"anyOf": [
{
"const": "kcal",
"type": "string"
},
{
"const": "kj",
"type": "string"
}
]
},
"mass": {
"anyOf": [
{
"const": "g",
"type": "string"
},
{
"const": "oz",
"type": "string"
}
]
},
"volume": {
"anyOf": [
{
"const": "ml",
"type": "string"
},
{
"const": "floz",
"type": "string"
},
{
"const": "cup",
"type": "string"
}
]
},
"length": {
"anyOf": [
{
"const": "cm",
"type": "string"
},
{
"const": "ftin",
"type": "string"
}
]
},
"weight": {
"anyOf": [
{
"const": "kg",
"type": "string"
},
{
"const": "lb",
"type": "string"
},
{
"const": "st",
"type": "string"
}
]
}
}
},
{
"type": "null"
}
]
},
"energy_unit": {
"anyOf": [
{
"anyOf": [
{
"const": "kcal",
"type": "string"
},
{
"const": "kj",
"type": "string"
}
]
},
{
"type": "null"
}
]
}
}
}
/api/v1/mealsLog a meal
{
"additionalProperties": false,
"type": "object",
"required": [
"tz",
"meal_type",
"source",
"items"
],
"properties": {
"logged_at": {
"format": "date-time",
"description": "Default: now",
"type": "string"
},
"tz": {
"minLength": 1,
"maxLength": 64,
"description": "IANA timezone of the user when logging (sets the meal day)",
"type": "string"
},
"meal_type": {
"anyOf": [
{
"const": "breakfast",
"type": "string"
},
{
"const": "lunch",
"type": "string"
},
{
"const": "dinner",
"type": "string"
},
{
"const": "snack",
"type": "string"
},
{
"const": "other",
"type": "string"
}
]
},
"source": {
"anyOf": [
{
"const": "photo",
"type": "string"
},
{
"const": "barcode",
"type": "string"
},
{
"const": "label",
"type": "string"
},
{
"const": "voice",
"type": "string"
},
{
"const": "text",
"type": "string"
},
{
"const": "suggestion",
"type": "string"
},
{
"const": "agent",
"type": "string"
},
{
"const": "recipe",
"type": "string"
}
]
},
"scan_id": {
"format": "uuid",
"type": "string"
},
"note": {
"maxLength": 500,
"type": "string"
},
"consent": {
"additionalProperties": false,
"type": "object",
"required": [
"version"
],
"properties": {
"version": {
"minLength": 1,
"maxLength": 32,
"type": "string"
}
}
},
"items": {
"minItems": 1,
"maxItems": 50,
"type": "array",
"items": {
"additionalProperties": false,
"description": "grams, or quantity + unit (converted through the food portions)",
"type": "object",
"required": [
"food_id"
],
"properties": {
"food_id": {
"format": "uuid",
"type": "string"
},
"grams": {
"minimum": 0,
"maximum": 5000,
"type": "number"
},
"quantity": {
"minimum": 0,
"maximum": 10000,
"type": "number"
},
"unit": {
"description": "Mass, volume or household unit",
"anyOf": [
{
"const": "g",
"type": "string"
},
{
"const": "kg",
"type": "string"
},
{
"const": "mg",
"type": "string"
},
{
"const": "oz",
"type": "string"
},
{
"const": "lb",
"type": "string"
},
{
"const": "ml",
"type": "string"
},
{
"const": "l",
"type": "string"
},
{
"const": "tsp",
"type": "string"
},
{
"const": "tbsp",
"type": "string"
},
{
"const": "fl_oz",
"type": "string"
},
{
"const": "cup",
"type": "string"
},
{
"const": "piece",
"type": "string"
},
{
"const": "slice",
"type": "string"
},
{
"const": "small",
"type": "string"
},
{
"const": "medium",
"type": "string"
},
{
"const": "large",
"type": "string"
},
{
"const": "serving",
"type": "string"
},
{
"const": "container",
"type": "string"
},
{
"const": "package",
"type": "string"
},
{
"const": "bar",
"type": "string"
},
{
"const": "stick",
"type": "string"
},
{
"const": "leaf",
"type": "string"
},
{
"const": "clove",
"type": "string"
},
{
"const": "egg",
"type": "string"
},
{
"const": "scoop",
"type": "string"
},
{
"const": "other",
"type": "string"
}
]
},
"portion_label": {
"maxLength": 120,
"type": "string"
},
"name": {
"minLength": 1,
"maxLength": 200,
"type": "string"
},
"model_name": {
"minLength": 1,
"maxLength": 200,
"pattern": "\\S",
"type": "string"
}
}
}
}
}
}
/api/v1/meals/{id}Get a meal
/api/v1/meals/{id}Edit a meal (optimistic concurrency with version)
{
"additionalProperties": false,
"type": "object",
"required": [
"version"
],
"properties": {
"version": {
"minimum": 1,
"description": "Version you edited (optimistic concurrency; stale ⇒ 409)",
"type": "integer"
},
"meal_type": {
"anyOf": [
{
"const": "breakfast",
"type": "string"
},
{
"const": "lunch",
"type": "string"
},
{
"const": "dinner",
"type": "string"
},
{
"const": "snack",
"type": "string"
},
{
"const": "other",
"type": "string"
}
]
},
"note": {
"anyOf": [
{
"maxLength": 500,
"type": "string"
},
{
"type": "null"
}
]
},
"logged_at": {
"format": "date-time",
"type": "string"
},
"local_date": {
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Local date YYYY-MM-DD in the meal timezone",
"type": "string"
},
"items": {
"minItems": 1,
"maxItems": 50,
"type": "array",
"items": {
"additionalProperties": false,
"description": "id = keep this item (snapshot) and change its quantity; food_id = add a new item",
"type": "object",
"properties": {
"id": {
"format": "uuid",
"type": "string"
},
"food_id": {
"format": "uuid",
"type": "string"
},
"grams": {
"minimum": 0,
"maximum": 5000,
"type": "number"
},
"quantity": {
"minimum": 0,
"maximum": 10000,
"type": "number"
},
"unit": {
"description": "Mass, volume or household unit",
"anyOf": [
{
"const": "g",
"type": "string"
},
{
"const": "kg",
"type": "string"
},
{
"const": "mg",
"type": "string"
},
{
"const": "oz",
"type": "string"
},
{
"const": "lb",
"type": "string"
},
{
"const": "ml",
"type": "string"
},
{
"const": "l",
"type": "string"
},
{
"const": "tsp",
"type": "string"
},
{
"const": "tbsp",
"type": "string"
},
{
"const": "fl_oz",
"type": "string"
},
{
"const": "cup",
"type": "string"
},
{
"const": "piece",
"type": "string"
},
{
"const": "slice",
"type": "string"
},
{
"const": "small",
"type": "string"
},
{
"const": "medium",
"type": "string"
},
{
"const": "large",
"type": "string"
},
{
"const": "serving",
"type": "string"
},
{
"const": "container",
"type": "string"
},
{
"const": "package",
"type": "string"
},
{
"const": "bar",
"type": "string"
},
{
"const": "stick",
"type": "string"
},
{
"const": "leaf",
"type": "string"
},
{
"const": "clove",
"type": "string"
},
{
"const": "egg",
"type": "string"
},
{
"const": "scoop",
"type": "string"
},
{
"const": "other",
"type": "string"
}
]
},
"portion_label": {
"maxLength": 120,
"type": "string"
},
"name": {
"minLength": 1,
"maxLength": 200,
"type": "string"
}
}
}
}
}
}
/api/v1/meals/{id}Delete a meal (undo window)
/api/v1/meals/{id}/restoreUndo a meal delete
/api/v1/pantryGet your pantry
/api/v1/pantry/itemUpdate a pantry item
{
"additionalProperties": false,
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"format": "uuid",
"type": "string"
},
"food_id": {
"format": "uuid",
"type": "string"
},
"name": {
"minLength": 1,
"maxLength": 200,
"pattern": "\\S",
"type": "string"
},
"quantity": {
"anyOf": [
{
"exclusiveMinimum": 0,
"maximum": 100000,
"type": "number"
},
{
"type": "null"
}
]
},
"unit": {
"anyOf": [
{
"const": "g",
"type": "string"
},
{
"const": "ml",
"type": "string"
},
{
"const": "pcs",
"type": "string"
}
]
},
"opened": {
"type": "boolean"
},
"best_before": {
"anyOf": [
{
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Local date YYYY-MM-DD in the meal timezone",
"type": "string"
},
{
"type": "null"
}
]
},
"tz": {
"minLength": 1,
"maxLength": 64,
"type": "string"
}
}
}
/api/v1/pantry/item/removeRemove a pantry item
{
"additionalProperties": false,
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"format": "uuid",
"type": "string"
}
}
}
/api/v1/pantry/itemsAdd items to your pantry
{
"additionalProperties": false,
"type": "object",
"required": [
"items"
],
"properties": {
"items": {
"minItems": 1,
"maxItems": 50,
"type": "array",
"items": {
"additionalProperties": false,
"type": "object",
"properties": {
"food_id": {
"format": "uuid",
"type": "string"
},
"name": {
"minLength": 1,
"maxLength": 200,
"pattern": "\\S",
"type": "string"
},
"quantity": {
"anyOf": [
{
"exclusiveMinimum": 0,
"maximum": 100000,
"type": "number"
},
{
"type": "null"
}
]
},
"unit": {
"anyOf": [
{
"const": "g",
"type": "string"
},
{
"const": "ml",
"type": "string"
},
{
"const": "pcs",
"type": "string"
}
]
},
"opened": {
"type": "boolean"
},
"best_before": {
"anyOf": [
{
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Local date YYYY-MM-DD in the meal timezone",
"type": "string"
},
{
"type": "null"
}
]
}
}
}
},
"tz": {
"minLength": 1,
"maxLength": 64,
"type": "string"
}
}
}
/api/v1/pantry/receipt/previewRead a pasted receipt
{
"additionalProperties": false,
"type": "object",
"required": [
"text"
],
"properties": {
"text": {
"minLength": 1,
"maxLength": 8000,
"pattern": "\\S",
"description": "The text of one receipt, pasted or copied from an emailed ticket (up to 8000 characters). Not stored.",
"type": "string"
},
"locale": {
"description": "UI locale (16 locales; pt = PT-PT)",
"anyOf": [
{
"const": "en",
"type": "string"
},
{
"const": "es",
"type": "string"
},
{
"const": "fr",
"type": "string"
},
{
"const": "de",
"type": "string"
},
{
"const": "pt",
"type": "string"
},
{
"const": "it",
"type": "string"
},
{
"const": "nl",
"type": "string"
},
{
"const": "pl",
"type": "string"
},
{
"const": "he",
"type": "string"
},
{
"const": "ar",
"type": "string"
},
{
"const": "zh-CN",
"type": "string"
},
{
"const": "ja",
"type": "string"
},
{
"const": "ko",
"type": "string"
},
{
"const": "ru",
"type": "string"
},
{
"const": "uk",
"type": "string"
},
{
"const": "tr",
"type": "string"
}
]
},
"tz": {
"minLength": 1,
"maxLength": 64,
"type": "string"
}
}
}
/api/v1/pantry/use-upUse up what you have
/api/v1/plan/dinnerPlan dinner from your library
/api/v1/plan/preferencesGet planning preferences
/api/v1/plan/preferencesSet planning preferences
{
"additionalProperties": false,
"type": "object",
"properties": {
"excluded_food_ids": {
"maxItems": 200,
"type": "array",
"items": {
"format": "uuid",
"type": "string"
}
},
"avoided_refs": {
"maxItems": 200,
"type": "array",
"items": {
"pattern": "^(meal|recipe):[0-9a-fA-F-]{36}$",
"type": "string"
}
}
}
}
/api/v1/plan/shopping-listShopping list for saved meals
/api/v1/plan/weekGet your meal plan
/api/v1/plan/week/clearClear a plan slot
{
"additionalProperties": false,
"type": "object",
"required": [
"date"
],
"properties": {
"date": {
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Local date YYYY-MM-DD in the meal timezone",
"type": "string"
},
"slot": {
"anyOf": [
{
"const": "breakfast",
"type": "string"
},
{
"const": "lunch",
"type": "string"
},
{
"const": "dinner",
"type": "string"
},
{
"const": "snack",
"type": "string"
}
]
}
}
}
/api/v1/plan/week/entryPlan a meal in a slot
{
"additionalProperties": false,
"type": "object",
"required": [
"date",
"slot",
"kind",
"id"
],
"properties": {
"date": {
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Local date YYYY-MM-DD in the meal timezone",
"type": "string"
},
"slot": {
"anyOf": [
{
"const": "breakfast",
"type": "string"
},
{
"const": "lunch",
"type": "string"
},
{
"const": "dinner",
"type": "string"
},
{
"const": "snack",
"type": "string"
}
]
},
"kind": {
"anyOf": [
{
"const": "meal",
"type": "string"
},
{
"const": "recipe",
"type": "string"
}
]
},
"id": {
"format": "uuid",
"type": "string"
},
"servings": {
"exclusiveMinimum": 0,
"maximum": 20,
"type": "number"
},
"tz": {
"minLength": 1,
"maxLength": 64,
"type": "string"
},
"move_from": {
"additionalProperties": false,
"type": "object",
"required": [
"date",
"slot"
],
"properties": {
"date": {
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Local date YYYY-MM-DD in the meal timezone",
"type": "string"
},
"slot": {
"anyOf": [
{
"const": "breakfast",
"type": "string"
},
{
"const": "lunch",
"type": "string"
},
{
"const": "dinner",
"type": "string"
},
{
"const": "snack",
"type": "string"
}
]
}
}
}
}
}
/api/v1/plan/week/fillFill empty plan slots
{
"additionalProperties": false,
"type": "object",
"properties": {
"from": {
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Local date YYYY-MM-DD in the meal timezone",
"type": "string"
},
"days": {
"minimum": 1,
"maximum": 14,
"description": "Number of days in the window (default 7)",
"type": "integer"
},
"tz": {
"minLength": 1,
"maxLength": 64,
"type": "string"
},
"slots": {
"maxLength": 40,
"pattern": "^[a-z]+(,[a-z]+){0,3}$",
"description": "Comma list of breakfast, lunch, dinner, snack (default lunch,dinner)",
"type": "string"
},
"max_minutes": {
"minimum": 5,
"maximum": 600,
"description": "Only recipes with a stated time of at most this many minutes (saved meals and recipes without a time are left out)",
"type": "integer"
},
"fit": {
"description": "Scale each filled slot to its energy target (0.5 to 3 servings, quarter steps)",
"type": "boolean"
}
}
}
/api/v1/plan/week/shopping-listShopping list for your meal plan
/api/v1/plan/week/suggestionsSuggest meals for empty plan slots
/api/v1/privacy/deleteRequest permanent erasure of your account and its data
{
"additionalProperties": false,
"type": "object",
"required": [
"confirm",
"account_id"
],
"properties": {
"confirm": {
"const": true,
"type": "boolean"
},
"account_id": {
"format": "uuid",
"type": "string"
}
}
}
/api/v1/privacy/exportDownload a ZIP of your openfood data
/api/v1/profileGet profile
/api/v1/profileSave profile preferences
{
"additionalProperties": false,
"minProperties": 1,
"type": "object",
"properties": {
"sex": {
"anyOf": [
{
"anyOf": [
{
"const": "female",
"type": "string"
},
{
"const": "male",
"type": "string"
},
{
"const": "other",
"type": "string"
}
]
},
{
"type": "null"
}
]
},
"height_cm": {
"anyOf": [
{
"minimum": 50,
"maximum": 300,
"type": "number"
},
{
"type": "null"
}
]
},
"activity": {
"anyOf": [
{
"anyOf": [
{
"const": "sedentary",
"type": "string"
},
{
"const": "light",
"type": "string"
},
{
"const": "moderate",
"type": "string"
},
{
"const": "high",
"type": "string"
},
{
"const": "very_high",
"type": "string"
}
]
},
{
"type": "null"
}
]
},
"locale": {
"anyOf": [
{
"anyOf": [
{
"const": "en",
"type": "string"
},
{
"const": "es",
"type": "string"
},
{
"const": "fr",
"type": "string"
},
{
"const": "de",
"type": "string"
},
{
"const": "pt",
"type": "string"
},
{
"const": "it",
"type": "string"
},
{
"const": "nl",
"type": "string"
},
{
"const": "pl",
"type": "string"
},
{
"const": "he",
"type": "string"
},
{
"const": "ar",
"type": "string"
},
{
"const": "zh-CN",
"type": "string"
},
{
"const": "ja",
"type": "string"
},
{
"const": "ko",
"type": "string"
},
{
"const": "ru",
"type": "string"
},
{
"const": "uk",
"type": "string"
},
{
"const": "tr",
"type": "string"
}
]
},
{
"type": "null"
}
]
},
"timezone": {
"anyOf": [
{
"maxLength": 64,
"minLength": 1,
"type": "string"
},
{
"type": "null"
}
]
},
"units": {
"anyOf": [
{
"additionalProperties": false,
"type": "object",
"properties": {
"energy": {
"anyOf": [
{
"const": "kcal",
"type": "string"
},
{
"const": "kj",
"type": "string"
}
]
},
"mass": {
"anyOf": [
{
"const": "g",
"type": "string"
},
{
"const": "oz",
"type": "string"
}
]
},
"volume": {
"anyOf": [
{
"const": "ml",
"type": "string"
},
{
"const": "floz",
"type": "string"
},
{
"const": "cup",
"type": "string"
}
]
},
"length": {
"anyOf": [
{
"const": "cm",
"type": "string"
},
{
"const": "ftin",
"type": "string"
}
]
},
"weight": {
"anyOf": [
{
"const": "kg",
"type": "string"
},
{
"const": "lb",
"type": "string"
},
{
"const": "st",
"type": "string"
}
]
}
}
},
{
"type": "null"
}
]
},
"energy_unit": {
"anyOf": [
{
"anyOf": [
{
"const": "kcal",
"type": "string"
},
{
"const": "kj",
"type": "string"
}
]
},
{
"type": "null"
}
]
}
}
}
/api/v1/quick-log/corrections/previewPreview draft correction
{
"additionalProperties": false,
"type": "object",
"required": [
"text",
"tz",
"items"
],
"properties": {
"text": {
"minLength": 1,
"maxLength": 500,
"pattern": "\\S",
"type": "string"
},
"locale": {
"description": "UI locale (16 locales; pt = PT-PT)",
"anyOf": [
{
"const": "en",
"type": "string"
},
{
"const": "es",
"type": "string"
},
{
"const": "fr",
"type": "string"
},
{
"const": "de",
"type": "string"
},
{
"const": "pt",
"type": "string"
},
{
"const": "it",
"type": "string"
},
{
"const": "nl",
"type": "string"
},
{
"const": "pl",
"type": "string"
},
{
"const": "he",
"type": "string"
},
{
"const": "ar",
"type": "string"
},
{
"const": "zh-CN",
"type": "string"
},
{
"const": "ja",
"type": "string"
},
{
"const": "ko",
"type": "string"
},
{
"const": "ru",
"type": "string"
},
{
"const": "uk",
"type": "string"
},
{
"const": "tr",
"type": "string"
}
]
},
"item_index": {
"minimum": 0,
"maximum": 49,
"type": "integer"
},
"tz": {
"minLength": 1,
"maxLength": 64,
"type": "string"
},
"items": {
"minItems": 1,
"maxItems": 50,
"type": "array",
"items": {
"additionalProperties": false,
"type": "object",
"required": [
"food_id",
"grams"
],
"properties": {
"food_id": {
"format": "uuid",
"type": "string"
},
"grams": {
"minimum": 0,
"maximum": 5000,
"type": "number"
},
"model_name": {
"minLength": 1,
"maxLength": 200,
"pattern": "\\S",
"type": "string"
}
}
}
}
}
}
/api/v1/quick-log/estimateEstimate a meal from text
{
"additionalProperties": false,
"type": "object",
"required": [
"text"
],
"properties": {
"text": {
"minLength": 1,
"maxLength": 500,
"pattern": "\\S",
"type": "string"
},
"locale": {
"description": "UI locale (16 locales; pt = PT-PT)",
"anyOf": [
{
"const": "en",
"type": "string"
},
{
"const": "es",
"type": "string"
},
{
"const": "fr",
"type": "string"
},
{
"const": "de",
"type": "string"
},
{
"const": "pt",
"type": "string"
},
{
"const": "it",
"type": "string"
},
{
"const": "nl",
"type": "string"
},
{
"const": "pl",
"type": "string"
},
{
"const": "he",
"type": "string"
},
{
"const": "ar",
"type": "string"
},
{
"const": "zh-CN",
"type": "string"
},
{
"const": "ja",
"type": "string"
},
{
"const": "ko",
"type": "string"
},
{
"const": "ru",
"type": "string"
},
{
"const": "uk",
"type": "string"
},
{
"const": "tr",
"type": "string"
}
]
}
}
}
/api/v1/quick-log/mealsLog corrected draft
{
"additionalProperties": false,
"type": "object",
"required": [
"tz",
"meal_type",
"source",
"items",
"ops"
],
"properties": {
"tz": {
"minLength": 1,
"maxLength": 64,
"type": "string"
},
"locale": {
"description": "UI locale (16 locales; pt = PT-PT)",
"anyOf": [
{
"const": "en",
"type": "string"
},
{
"const": "es",
"type": "string"
},
{
"const": "fr",
"type": "string"
},
{
"const": "de",
"type": "string"
},
{
"const": "pt",
"type": "string"
},
{
"const": "it",
"type": "string"
},
{
"const": "nl",
"type": "string"
},
{
"const": "pl",
"type": "string"
},
{
"const": "he",
"type": "string"
},
{
"const": "ar",
"type": "string"
},
{
"const": "zh-CN",
"type": "string"
},
{
"const": "ja",
"type": "string"
},
{
"const": "ko",
"type": "string"
},
{
"const": "ru",
"type": "string"
},
{
"const": "uk",
"type": "string"
},
{
"const": "tr",
"type": "string"
}
]
},
"meal_type": {
"anyOf": [
{
"const": "breakfast",
"type": "string"
},
{
"const": "lunch",
"type": "string"
},
{
"const": "dinner",
"type": "string"
},
{
"const": "snack",
"type": "string"
},
{
"const": "other",
"type": "string"
}
]
},
"source": {
"anyOf": [
{
"const": "text",
"type": "string"
},
{
"const": "voice",
"type": "string"
}
]
},
"consent": {
"additionalProperties": false,
"type": "object",
"required": [
"version"
],
"properties": {
"version": {
"minLength": 1,
"maxLength": 32,
"type": "string"
}
}
},
"items": {
"minItems": 1,
"maxItems": 50,
"type": "array",
"items": {
"additionalProperties": false,
"type": "object",
"required": [
"food_id",
"grams"
],
"properties": {
"food_id": {
"format": "uuid",
"type": "string"
},
"grams": {
"minimum": 0,
"maximum": 5000,
"type": "number"
},
"model_name": {
"minLength": 1,
"maxLength": 200,
"pattern": "\\S",
"type": "string"
}
}
}
},
"ops": {
"minItems": 1,
"maxItems": 8,
"type": "array",
"items": {
"anyOf": [
{
"additionalProperties": false,
"type": "object",
"required": [
"op",
"target"
],
"properties": {
"op": {
"const": "remove",
"type": "string"
},
"target": {
"anyOf": [
{
"minimum": 0,
"maximum": 49,
"type": "integer"
},
{
"pattern": "^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$",
"type": "string"
}
]
}
}
},
{
"additionalProperties": false,
"type": "object",
"required": [
"op",
"target",
"value"
],
"properties": {
"op": {
"const": "scale",
"type": "string"
},
"target": {
"anyOf": [
{
"minimum": 0,
"maximum": 49,
"type": "integer"
},
{
"pattern": "^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$",
"type": "string"
}
]
},
"value": {
"anyOf": [
{
"exclusiveMinimum": 0,
"maximum": 10,
"type": "number"
},
{
"additionalProperties": false,
"type": "object",
"required": [
"grams"
],
"properties": {
"grams": {
"exclusiveMinimum": 0,
"maximum": 5000,
"type": "number"
}
}
}
]
}
}
},
{
"additionalProperties": false,
"type": "object",
"required": [
"op",
"target",
"value"
],
"properties": {
"op": {
"const": "replace",
"type": "string"
},
"target": {
"anyOf": [
{
"minimum": 0,
"maximum": 49,
"type": "integer"
},
{
"pattern": "^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$",
"type": "string"
}
]
},
"value": {
"additionalProperties": false,
"type": "object",
"required": [
"food_id"
],
"properties": {
"food_id": {
"format": "uuid",
"type": "string"
},
"grams": {
"exclusiveMinimum": 0,
"maximum": 5000,
"type": "number"
}
}
}
}
},
{
"additionalProperties": false,
"type": "object",
"required": [
"op",
"target",
"value"
],
"properties": {
"op": {
"const": "add",
"type": "string"
},
"target": {
"type": "null"
},
"value": {
"additionalProperties": false,
"type": "object",
"required": [
"food_id"
],
"properties": {
"food_id": {
"format": "uuid",
"type": "string"
},
"grams": {
"exclusiveMinimum": 0,
"maximum": 5000,
"type": "number"
}
}
}
}
},
{
"additionalProperties": false,
"type": "object",
"required": [
"op",
"target",
"value"
],
"properties": {
"op": {
"const": "move_date",
"type": "string"
},
"target": {
"type": "null"
},
"value": {
"anyOf": [
{
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Local date YYYY-MM-DD in the meal timezone",
"type": "string"
},
{
"const": "yesterday",
"type": "string"
},
{
"const": "today",
"type": "string"
}
]
}
}
}
]
}
}
}
}
/api/v1/quick-log/meals/{id}/correctionsConfirm meal correction
{
"additionalProperties": false,
"type": "object",
"required": [
"version",
"ops"
],
"properties": {
"version": {
"minimum": 1,
"type": "integer"
},
"ops": {
"minItems": 1,
"maxItems": 8,
"type": "array",
"items": {
"anyOf": [
{
"additionalProperties": false,
"type": "object",
"required": [
"op",
"target"
],
"properties": {
"op": {
"const": "remove",
"type": "string"
},
"target": {
"anyOf": [
{
"minimum": 0,
"maximum": 49,
"type": "integer"
},
{
"pattern": "^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$",
"type": "string"
}
]
}
}
},
{
"additionalProperties": false,
"type": "object",
"required": [
"op",
"target",
"value"
],
"properties": {
"op": {
"const": "scale",
"type": "string"
},
"target": {
"anyOf": [
{
"minimum": 0,
"maximum": 49,
"type": "integer"
},
{
"pattern": "^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$",
"type": "string"
}
]
},
"value": {
"anyOf": [
{
"exclusiveMinimum": 0,
"maximum": 10,
"type": "number"
},
{
"additionalProperties": false,
"type": "object",
"required": [
"grams"
],
"properties": {
"grams": {
"exclusiveMinimum": 0,
"maximum": 5000,
"type": "number"
}
}
}
]
}
}
},
{
"additionalProperties": false,
"type": "object",
"required": [
"op",
"target",
"value"
],
"properties": {
"op": {
"const": "replace",
"type": "string"
},
"target": {
"anyOf": [
{
"minimum": 0,
"maximum": 49,
"type": "integer"
},
{
"pattern": "^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$",
"type": "string"
}
]
},
"value": {
"additionalProperties": false,
"type": "object",
"required": [
"food_id"
],
"properties": {
"food_id": {
"format": "uuid",
"type": "string"
},
"grams": {
"exclusiveMinimum": 0,
"maximum": 5000,
"type": "number"
}
}
}
}
},
{
"additionalProperties": false,
"type": "object",
"required": [
"op",
"target",
"value"
],
"properties": {
"op": {
"const": "add",
"type": "string"
},
"target": {
"type": "null"
},
"value": {
"additionalProperties": false,
"type": "object",
"required": [
"food_id"
],
"properties": {
"food_id": {
"format": "uuid",
"type": "string"
},
"grams": {
"exclusiveMinimum": 0,
"maximum": 5000,
"type": "number"
}
}
}
}
},
{
"additionalProperties": false,
"type": "object",
"required": [
"op",
"target",
"value"
],
"properties": {
"op": {
"const": "move_date",
"type": "string"
},
"target": {
"type": "null"
},
"value": {
"anyOf": [
{
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Local date YYYY-MM-DD in the meal timezone",
"type": "string"
},
{
"const": "yesterday",
"type": "string"
},
{
"const": "today",
"type": "string"
}
]
}
}
}
]
}
}
}
}
/api/v1/quick-log/meals/{id}/corrections/previewPreview meal correction
{
"additionalProperties": false,
"type": "object",
"required": [
"text",
"version"
],
"properties": {
"text": {
"minLength": 1,
"maxLength": 500,
"pattern": "\\S",
"type": "string"
},
"locale": {
"description": "UI locale (16 locales; pt = PT-PT)",
"anyOf": [
{
"const": "en",
"type": "string"
},
{
"const": "es",
"type": "string"
},
{
"const": "fr",
"type": "string"
},
{
"const": "de",
"type": "string"
},
{
"const": "pt",
"type": "string"
},
{
"const": "it",
"type": "string"
},
{
"const": "nl",
"type": "string"
},
{
"const": "pl",
"type": "string"
},
{
"const": "he",
"type": "string"
},
{
"const": "ar",
"type": "string"
},
{
"const": "zh-CN",
"type": "string"
},
{
"const": "ja",
"type": "string"
},
{
"const": "ko",
"type": "string"
},
{
"const": "ru",
"type": "string"
},
{
"const": "uk",
"type": "string"
},
{
"const": "tr",
"type": "string"
}
]
},
"item_index": {
"minimum": 0,
"maximum": 49,
"type": "integer"
},
"version": {
"minimum": 1,
"type": "integer"
}
}
}
/api/v1/scansSubmit up to four angles of a meal
{}
/api/v1/scans/{id}Poll a private scan result
/api/v1/scans/{id}/logConfirm a reviewed photo or label and log a meal
{
"anyOf": [
{
"additionalProperties": false,
"type": "object",
"required": [
"tz",
"meal_type",
"items"
],
"properties": {
"tz": {
"minLength": 1,
"maxLength": 64,
"type": "string"
},
"meal_type": {
"anyOf": [
{
"const": "breakfast",
"type": "string"
},
{
"const": "lunch",
"type": "string"
},
{
"const": "dinner",
"type": "string"
},
{
"const": "snack",
"type": "string"
},
{
"const": "other",
"type": "string"
}
]
},
"consent": {
"additionalProperties": false,
"type": "object",
"required": [
"version"
],
"properties": {
"version": {
"minLength": 1,
"maxLength": 32,
"type": "string"
}
}
},
"items": {
"minItems": 1,
"maxItems": 11,
"type": "array",
"items": {
"additionalProperties": false,
"type": "object",
"required": [
"index",
"food_id",
"grams"
],
"properties": {
"index": {
"minimum": 0,
"maximum": 7,
"type": "integer"
},
"hidden": {
"type": "boolean"
},
"food_id": {
"format": "uuid",
"type": "string"
},
"grams": {
"exclusiveMinimum": 0,
"maximum": 5000,
"type": "number"
}
}
}
}
}
},
{
"additionalProperties": false,
"type": "object",
"required": [
"tz",
"meal_type",
"label",
"grams"
],
"properties": {
"tz": {
"minLength": 1,
"maxLength": 64,
"type": "string"
},
"meal_type": {
"anyOf": [
{
"const": "breakfast",
"type": "string"
},
{
"const": "lunch",
"type": "string"
},
{
"const": "dinner",
"type": "string"
},
{
"const": "snack",
"type": "string"
},
{
"const": "other",
"type": "string"
}
]
},
"consent": {
"additionalProperties": false,
"type": "object",
"required": [
"version"
],
"properties": {
"version": {
"minLength": 1,
"maxLength": 32,
"type": "string"
}
}
},
"label": {
"additionalProperties": false,
"type": "object",
"required": [
"name",
"basis",
"nutrients"
],
"properties": {
"name": {
"minLength": 1,
"maxLength": 200,
"pattern": "\\S",
"type": "string"
},
"basis": {
"anyOf": [
{
"const": "per_100g",
"type": "string"
},
{
"const": "per_serving",
"type": "string"
}
]
},
"serving_grams": {
"minimum": 0.1,
"maximum": 5000,
"type": "number"
},
"nutrients": {
"additionalProperties": false,
"type": "object",
"required": [
"energy_kcal",
"protein_g",
"carbs_g",
"fat_g"
],
"properties": {
"energy_kcal": {
"minimum": 0,
"maximum": 100000,
"type": "number"
},
"protein_g": {
"minimum": 0,
"maximum": 100000,
"type": "number"
},
"carbs_g": {
"minimum": 0,
"maximum": 100000,
"type": "number"
},
"fat_g": {
"minimum": 0,
"maximum": 100000,
"type": "number"
},
"fiber_g": {
"minimum": 0,
"maximum": 100000,
"type": "number"
},
"sugars_g": {
"minimum": 0,
"maximum": 100000,
"type": "number"
},
"sodium_mg": {
"minimum": 0,
"maximum": 100000,
"type": "number"
}
}
}
}
},
"grams": {
"exclusiveMinimum": 0,
"maximum": 5000,
"type": "number"
},
"barcode": {
"pattern": "^[0-9]{8,14}$",
"description": "EAN-8, EAN-13, UPC-A or UPC-E digits",
"type": "string"
}
}
}
]
}
/api/v1/suggestionsGet personal food suggestions
/api/v1/suggestions/logLog a suggested food
{
"additionalProperties": false,
"type": "object",
"required": [
"food_id",
"hour"
],
"properties": {
"food_id": {
"format": "uuid",
"type": "string"
},
"hour": {
"minimum": 0,
"maximum": 23,
"type": "integer"
},
"consent": {
"additionalProperties": false,
"type": "object",
"required": [
"version"
],
"properties": {
"version": {
"minLength": 1,
"maxLength": 32,
"type": "string"
}
}
}
}
}
/api/v1/usual-meal/dismissDismiss a usual meal for seven days
{
"additionalProperties": false,
"type": "object",
"required": [
"signature"
],
"properties": {
"signature": {
"pattern": "^[a-f0-9]{64}$",
"type": "string"
},
"consent": {
"additionalProperties": false,
"type": "object",
"required": [
"version"
],
"properties": {
"version": {
"minLength": 1,
"maxLength": 32,
"type": "string"
}
}
}
}
}
/api/v1/usual-meal/logLog the proposed usual meal
{
"additionalProperties": false,
"type": "object",
"required": [
"signature"
],
"properties": {
"signature": {
"pattern": "^[a-f0-9]{64}$",
"type": "string"
},
"consent": {
"additionalProperties": false,
"type": "object",
"required": [
"version"
],
"properties": {
"version": {
"minLength": 1,
"maxLength": 32,
"type": "string"
}
}
}
}
}
/api/v1/waterLog water
{
"additionalProperties": false,
"type": "object",
"properties": {
"date": {
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Local date YYYY-MM-DD in the meal timezone",
"type": "string"
},
"tz": {
"minLength": 1,
"maxLength": 64,
"type": "string"
},
"ml": {
"minimum": 1,
"maximum": 5000,
"type": "integer"
},
"consent": {
"additionalProperties": false,
"type": "object",
"required": [
"version"
],
"properties": {
"version": {
"minLength": 1,
"maxLength": 32,
"type": "string"
}
}
}
}
}
/api/v1/water/settingsGet water settings
/api/v1/water/settingsSet water preferences
{
"additionalProperties": false,
"type": "object",
"required": [
"glass_ml",
"goal_ml",
"reminders"
],
"properties": {
"glass_ml": {
"minimum": 1,
"maximum": 5000,
"type": "integer"
},
"goal_ml": {
"anyOf": [
{
"minimum": 1,
"maximum": 20000,
"type": "integer"
},
{
"type": "null"
}
]
},
"reminders": {
"type": "boolean"
}
}
}
/api/v1/water/{id}Undo a water log
/api/v1/weightsGet weight trend
/api/v1/weightsLog weight
{
"additionalProperties": false,
"type": "object",
"required": [
"kg"
],
"properties": {
"date": {
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"type": "string"
},
"kg": {
"minimum": 20,
"maximum": 500,
"type": "number"
}
}
}
/mcpMCP (Streamable HTTP, stateless JSON-RPC 2.0)
{
"type": "object"
}
/mcpMCP server info (POST JSON-RPC to this URL)
/openapi.jsonOpenAPI 3.1 document
hi@openfood.fun