BetterMenu · Schema
RecordReferenceFoodViewRequest
A food the member opened, or a portion change in an open food.
Food TechRecipeFormulationFDA ComplianceSoftware-as-a-ServiceCloud
Properties
| Name | Type | Description |
|---|---|---|
| food_id | string | Identifier of the food in the food database. |
| name | string | The food's name as shown to the member. |
| brand | object | The brand as shown, for a branded food. |
| source | object | `generic` for a general food, `branded` for a branded product. |
| per_100g | object | The headline nutrients per 100 g, as shown to the member. |
| data_version | string | Version of the food data the member was shown. |
| action | object | `open` when the member opened the food. `portion` when they changed the portion of a food they already opened. |
| opened_from | object | The tab the food was opened from: `search`, `recent` or `saved`. |
| portion | object | The portion shown. Required for `portion`. On `open` it becomes the food's last portion; when omitted the last portion is kept. |
| result_position | object | Where the food appeared in the search results, starting at 1 (at most 10000). Only for `open` from `search`. |
| query | object | The search text that found the food. Kept in the member's own view history only. Only for `open` from `search`. |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://artifacts.apis.io/bettermenu/json-schema/bettermenu-record-reference-food-view-request-schema.json",
"title": "RecordReferenceFoodViewRequest",
"description": "A food the member opened, or a portion change in an open food.",
"x-generated": "2026-11-04",
"x-method": "derived",
"x-generator": "derive-json-schema.py",
"x-source": "openapi/bettermenu-studio-api-openapi.yml#/components/schemas/RecordReferenceFoodViewRequest",
"properties": {
"food_id": {
"type": "string",
"maxLength": 128,
"minLength": 1,
"pattern": "^[A-Za-z0-9][A-Za-z0-9_.:\\-]*$",
"title": "Food Id",
"description": "Identifier of the food in the food database."
},
"name": {
"type": "string",
"maxLength": 200,
"minLength": 1,
"title": "Name",
"description": "The food's name as shown to the member."
},
"brand": {
"anyOf": [
{
"type": "string",
"maxLength": 200,
"minLength": 1
},
{
"type": "null"
}
],
"title": "Brand",
"description": "The brand as shown, for a branded food."
},
"source": {
"$ref": "#/$defs/ReferenceFoodSource",
"description": "`generic` for a general food, `branded` for a branded product."
},
"per_100g": {
"$ref": "#/$defs/ReferenceFoodPer100g",
"description": "The headline nutrients per 100 g, as shown to the member."
},
"data_version": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"pattern": "^[A-Za-z0-9][A-Za-z0-9_.:+\\-]*$",
"title": "Data Version",
"description": "Version of the food data the member was shown."
},
"action": {
"$ref": "#/$defs/ReferenceFoodViewAction",
"description": "`open` when the member opened the food. `portion` when they changed the portion of a food they already opened."
},
"opened_from": {
"$ref": "#/$defs/ReferenceFoodOpenedFrom",
"description": "The tab the food was opened from: `search`, `recent` or `saved`."
},
"portion": {
"anyOf": [
{
"$ref": "#/$defs/ReferenceFoodPortion"
},
{
"type": "null"
}
],
"description": "The portion shown. Required for `portion`. On `open` it becomes the food's last portion; when omitted the last portion is kept."
},
"result_position": {
"anyOf": [
{
"type": "integer",
"maximum": 10000.0,
"minimum": 1.0
},
{
"type": "null"
}
],
"title": "Result Position",
"description": "Where the food appeared in the search results, starting at 1 (at most 10000). Only for `open` from `search`."
},
"query": {
"anyOf": [
{
"type": "string",
"maxLength": 200,
"minLength": 1
},
{
"type": "null"
}
],
"title": "Query",
"description": "The search text that found the food. Kept in the member's own view history only. Only for `open` from `search`."
}
},
"additionalProperties": false,
"type": "object",
"required": [
"food_id",
"name",
"source",
"per_100g",
"data_version",
"action",
"opened_from"
],
"$defs": {
"ReferenceFoodOpenedFrom": {
"type": "string",
"enum": [
"search",
"recent",
"saved"
],
"title": "ReferenceFoodOpenedFrom",
"description": "The tab the member opened the food from."
},
"ReferenceFoodPer100g": {
"properties": {
"calories": {
"anyOf": [
{
"type": "number",
"maximum": 100000.0,
"minimum": 0.0
},
{
"type": "null"
}
],
"title": "Calories",
"description": "Energy in kilocalories per 100 g. Zero, or from 0.000001 to 100000."
},
"total_fat": {
"anyOf": [
{
"type": "number",
"maximum": 100000.0,
"minimum": 0.0
},
{
"type": "null"
}
],
"title": "Total Fat",
"description": "Total fat in grams per 100 g. Zero, or from 0.000001 to 100000."
},
"total_carbohydrate": {
"anyOf": [
{
"type": "number",
"maximum": 100000.0,
"minimum": 0.0
},
{
"type": "null"
}
],
"title": "Total Carbohydrate",
"description": "Total carbohydrate in grams per 100 g. Zero, or from 0.000001 to 100000."
},
"protein": {
"anyOf": [
{
"type": "number",
"maximum": 100000.0,
"minimum": 0.0
},
{
"type": "null"
}
],
"title": "Protein",
"description": "Protein in grams per 100 g. Zero, or from 0.000001 to 100000."
}
},
"additionalProperties": false,
"type": "object",
"title": "ReferenceFoodPer100g",
"description": "Headline nutrients per 100 g of the food. Each is `null` when unknown."
},
"ReferenceFoodPortion": {
"properties": {
"label": {
"type": "string",
"maxLength": 100,
"minLength": 1,
"title": "Label",
"description": "The portion as shown, e.g. `1 cup` or `100 g`."
},
"grams": {
"type": "number",
"maximum": 100000.0,
"minimum": 0.001,
"title": "Grams",
"description": "The weight of the portion in grams, from 0.001 to 100000."
}
},
"additionalProperties": false,
"type": "object",
"required": [
"label",
"grams"
],
"title": "ReferenceFoodPortion",
"description": "An amount of the food, as shown to the member."
},
"ReferenceFoodSource": {
"type": "string",
"enum": [
"generic",
"branded"
],
"title": "ReferenceFoodSource",
"description": "Which part of the food database a food comes from."
},
"ReferenceFoodViewAction": {
"type": "string",
"enum": [
"open",
"portion"
],
"title": "ReferenceFoodViewAction",
"description": "What the member did that produced a view event."
}
}
}
Work with this as data
Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for schemas
4 MCP tools reach this
find_json_schemasBrowse and filter every JSON Schema in the catalog.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/bettermenu-record-reference-food-view-request"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.