ReciPal MCP by usefulapi
Read recipes, nutrition and inventory, manage ingredients and costs, and render ReciPal labels.
使うべきか
品質と安全性
検出事項(7)
- LOWrecipal_list_recipe_ingredients 内
- LOWrecipal_list_current_ingredient_costs 内
- LOWrecipal_get_label_render_status 内
- LOWrecipal_list_finished_good_tags 内
- LOWrecipal_create_recipe_from_ingredients 内
- LOWrecipal_update_recipe_ingredient 内
- LOWrecipal_remove_recipe_ingredient 内
ツール定義とプロトコルへの準拠に関する自動分析に基づいています。
コンテキストコスト
これは、サーバーのツールがモデルのコンテキストに読み込まれるたびに消費されるおおよそのトークン数です。数が多いほど、ほかのタスクに使える注意が減ります。
インストール
ワンクリックインストール
これを `claude_desktop_config.json` ファイルに追加してください:
{
"mcpServers": {
"recipal": {
"url": "https://recipal.usefulapi.io/mcp"
}
}
}リモートエンドポイント
https://recipal.usefulapi.io/mcpstreamable-httpできること
ツール一覧
ツール(30)
🟢recipal_list_recipes(archived, sort_field, sort_direction, full, page, ...)
List your recipes (products) with yield, servings, cost per batch/package and the headline per-serving nutrition (calories, fat, sodium, carbohydrate, protein). Sorted by last update by default. Set full=true for the complete object with every nutrient. Pages of up to 20; a page with fewer rows is the last. GET /recipes.
入力スキーマ
{
"type": "object",
"properties": {
"archived": {
"description": "\"false\" = active only (default), \"true\" = archived only, \"all\" = both.",
"type": "string",
"enum": [
"false",
"true",
"all"
]
},
"sort_field": {
"description": "Sort by \"updated_at\" (default), \"created_at\" or \"name\".",
"type": "string",
"enum": [
"updated_at",
"created_at",
"name"
]
},
"sort_direction": {
"description": "\"desc\" (default) or \"asc\".",
"type": "string",
"enum": [
"asc",
"desc"
]
},
"full": {
"description": "Return every recipe field including all ~80 nutrients (large). Default false.",
"type": "boolean"
},
"page": {
"description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 100000
},
"per_page": {
"description": "Results per page, 1-20 (default 20).",
"type": "integer",
"minimum": 1,
"maximum": 20
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢recipal_get_recipe(recipe_id)
One recipe in full: yield, servings, packages, allergens, costs (ingredient + packaging/labor/overhead), ingredient list, tags, primary label path and the complete per-serving nutrition. GET /recipes/{id}.
入力スキーマ
{
"type": "object",
"properties": {
"recipe_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "ReciPal recipe id."
}
},
"required": [
"recipe_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢recipal_list_recipe_ingredients(recipe_id)
The formula of one recipe: every recipe ingredient line with ingredient id, name, quantity, unit, waste %, total grams and the display name per label language. Use the line ids with recipal_update_recipe_ingredient. GET /recipes/{id}/recipe_ingredients.
入力スキーマ
{
"type": "object",
"properties": {
"recipe_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "ReciPal recipe id."
}
},
"required": [
"recipe_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢recipal_get_recipe_ingredient(recipe_id, recipe_ingredient_id)
One ingredient line of a recipe, including units_and_grams (the units you can use for it, each with its weight in grams). GET /recipes/{recipe_id}/recipe_ingredients/{id}.
入力スキーマ
{
"type": "object",
"properties": {
"recipe_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "ReciPal recipe id."
},
"recipe_ingredient_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "Recipe ingredient (line) id."
}
},
"required": [
"recipe_id",
"recipe_ingredient_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢recipal_list_ingredients(archived, sort_field, sort_direction, full, page, ...)
List your own ingredients (custom and subrecipe ingredients) with allergens, units and headline nutrition per 100 g. Set full=true for every nutrient. Archived ones are hidden unless asked for. GET /ingredients.
入力スキーマ
{
"type": "object",
"properties": {
"archived": {
"description": "\"false\" = active only (default), \"true\" = archived only, \"all\" = both.",
"type": "string",
"enum": [
"false",
"true",
"all"
]
},
"sort_field": {
"description": "Sort by \"updated_at\" (default), \"created_at\" or \"name\".",
"type": "string",
"enum": [
"updated_at",
"created_at",
"name"
]
},
"sort_direction": {
"description": "\"desc\" (default) or \"asc\".",
"type": "string",
"enum": [
"asc",
"desc"
]
},
"full": {
"description": "Return every ingredient field including all nutrients (large). Default false.",
"type": "boolean"
},
"page": {
"description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 100000
},
"per_page": {
"description": "Results per page, 1-20 (default 20).",
"type": "integer",
"minimum": 1,
"maximum": 20
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢recipal_get_ingredient(ingredient_id)
One ingredient in full (yours or a public one): allergens, ingredient-list text, custom units, and every nutrient per 100 grams. GET /ingredients/{id}.
入力スキーマ
{
"type": "object",
"properties": {
"ingredient_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "ReciPal ingredient id."
}
},
"required": [
"ingredient_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢recipal_list_ingredient_costs(ingredient_id, page, per_page)
The cost history of one ingredient: effective date, quantity, unit, price and shipping per entry (the entry with the latest effective_at not in the future is the active one). GET /ingredients/{id}/ingredient_costs.
入力スキーマ
{
"type": "object",
"properties": {
"ingredient_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "ReciPal ingredient id."
},
"page": {
"description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 100000
},
"per_page": {
"description": "Results per page, 1-20 (default 20).",
"type": "integer",
"minimum": 1,
"maximum": 20
}
},
"required": [
"ingredient_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢recipal_list_current_ingredient_costs(page, per_page)
The currently active cost of every ingredient (one entry per ingredient): price, shipping, quantity and unit. GET /ingredient_costs.
入力スキーマ
{
"type": "object",
"properties": {
"page": {
"description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 100000
},
"per_page": {
"description": "Results per page, 1-20 (default 20).",
"type": "integer",
"minimum": 1,
"maximum": 20
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢recipal_get_ingredient_cost(ingredient_cost_id)
One ingredient cost entry by id. GET /ingredient_costs/{id}.
入力スキーマ
{
"type": "object",
"properties": {
"ingredient_cost_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "Ingredient cost id."
}
},
"required": [
"ingredient_cost_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢recipal_get_label(label_token, result_format)
A recipe's saved nutrition-facts label settings (format, which rows show, styling) plus the computed nutrition claims (e.g. Fat Free) and ingredient list per language. The token is the last part of the recipe's primary_label path (/api/v1/labels/{token}). Optionally compute claims and ingredient list for another format. GET /labels/{token}.
入力スキーマ
{
"type": "object",
"properties": {
"label_token": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{8,64}$",
"description": "Label token from the recipe's primary_label path."
},
"result_format": {
"description": "Compute claims and ingredient list for this format instead of the saved one, e.g. legacy_fda/adult/vertical.",
"type": "string",
"minLength": 1,
"maxLength": 100,
"pattern": "^[A-Za-z0-9_/.-]+$"
}
},
"required": [
"label_token"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟡recipal_start_label_render(recipe_id, format, page_size, zoom)
WRITE (render job): start rendering a recipe's nutrition label as a PDF or PNG and return the render status with a token. Always asynchronous: poll recipal_get_label_render_status with the token until status is ready, then give the user the temporary download url. Each account may run 5 renders in parallel. GET /recipes/{id}/label.pdf|label.png?async=true.
入力スキーマ
{
"type": "object",
"properties": {
"recipe_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "ReciPal recipe id."
},
"format": {
"type": "string",
"enum": [
"pdf",
"png"
],
"description": "\"pdf\" or \"png\"."
},
"page_size": {
"description": "PDF only: \"auto\" (default) crops to the label, or letter, legal, A4.",
"type": "string",
"enum": [
"auto",
"letter",
"legal",
"A4"
]
},
"zoom": {
"description": "PNG only: scale from 0.8 to 6 (default 3); larger = crisper, bigger image.",
"type": "number",
"minimum": 0.8,
"maximum": 6
}
},
"required": [
"recipe_id",
"format"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢recipal_get_label_render_status(token)
Status of a label render started with recipal_start_label_render: waiting, processing, ready or error. When ready, url is a temporary presigned download link. Poll about once a second; each poll counts toward the weekly request limit. GET /recipes/label_renders/{token}.
入力スキーマ
{
"type": "object",
"properties": {
"token": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{8,64}$",
"description": "Render token returned by recipal_start_label_render."
}
},
"required": [
"token"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢recipal_list_inventories(q, tags, supplier_id, archived, sort_field, ...)
Raw-material (ingredient) stock rows: quantity on hand, weeks remaining, daily consumption, quantity on order, reorder risk (safe, warning, critical), reorder level and the on-hand value. Needs an inventory plan (otherwise 403 INVENTORY_PLAN_REQUIRED). By default sorted by weeks remaining, lowest first. GET /inventories.
入力スキーマ
{
"type": "object",
"properties": {
"q": {
"description": "Case-insensitive search in the ingredient name.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"tags": {
"description": "Only rows whose ingredient has ALL these tags.",
"maxItems": 20,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"supplier_id": {
"description": "Only rows linked to this supplier.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"archived": {
"description": "\"false\" = active only (default), \"true\" = archived only, \"all\" = both.",
"type": "string",
"enum": [
"false",
"true",
"all"
]
},
"sort_field": {
"description": "Default \"inventories.weeks_remaining\".",
"type": "string",
"enum": [
"inventories.weeks_remaining",
"inventories.updated_at",
"ingredients.name",
"risk"
]
},
"sort_direction": {
"description": "\"asc\" (default), \"desc\", or \"mid\" (warning band first, then critical, then safe; only for weeks_remaining and risk).",
"type": "string",
"enum": [
"asc",
"desc",
"mid"
]
},
"page": {
"description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 100000
},
"per_page": {
"description": "Results per page, 1-20 (default 20).",
"type": "integer",
"minimum": 1,
"maximum": 20
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢recipal_get_inventory(inventory_id)
One raw-material stock row by id (quantity, unit, weeks remaining, reorder guideline, on-hand value). Needs an inventory plan. GET /inventories/{id}.
入力スキーマ
{
"type": "object",
"properties": {
"inventory_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "Inventory row id."
}
},
"required": [
"inventory_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢recipal_list_inventory_tags
Ingredient tags in use with the number of ingredients carrying each, most used first. Use them to filter recipal_list_inventories. Needs an inventory plan. GET /inventories/tags.
入力スキーマ
{
"type": "object",
"properties": {},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢recipal_list_finished_goods(q, tags, archived, sort_field, sort_direction, ...)
Finished-goods stock rows: recipe, quantity on hand, unit, total packages, lot-code settings, case/pallet sizes and the on-hand value. Needs an inventory plan. GET /finished_goods.
入力スキーマ
{
"type": "object",
"properties": {
"q": {
"description": "Case-insensitive search in the recipe name.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"tags": {
"description": "Only rows whose recipe has ALL these tags.",
"maxItems": 20,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"archived": {
"description": "\"false\" = active only (default), \"true\" = archived only, \"all\" = both.",
"type": "string",
"enum": [
"false",
"true",
"all"
]
},
"sort_field": {
"description": "Default \"recipes.name\".",
"type": "string",
"enum": [
"recipes.name",
"finished_goods.updated_at"
]
},
"sort_direction": {
"description": "\"asc\" (default) or \"desc\".",
"type": "string",
"enum": [
"asc",
"desc"
]
},
"page": {
"description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 100000
},
"per_page": {
"description": "Results per page, 1-20 (default 20).",
"type": "integer",
"minimum": 1,
"maximum": 20
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢recipal_get_finished_good(finished_good_id)
One finished-goods stock row by id. Needs an inventory plan. GET /finished_goods/{id}.
入力スキーマ
{
"type": "object",
"properties": {
"finished_good_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "Finished good row id."
}
},
"required": [
"finished_good_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢recipal_list_finished_good_tags
Recipe tags in use with the number of recipes carrying each, most used first. Use them to filter recipal_list_finished_goods. Needs an inventory plan. GET /finished_goods/tags.
入力スキーマ
{
"type": "object",
"properties": {},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴recipal_create_recipe(name, package_yield_unit, servings, suggested_serving, visual_unit_of_measure, ...)
WRITE: create a new, empty recipe (add ingredient lines with recipal_add_recipe_ingredient, or use recipal_create_recipe_from_ingredients to do both at once). All fields are optional. Creates a record in your ReciPal account; it counts against the plan's recipe allowance. POST /recipes.
入力スキーマ
{
"type": "object",
"properties": {
"name": {
"description": "Recipe name.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"package_yield_unit": {
"description": "Unit of the finished package weight: \"grams\" (default), \"ounces\", \"mL\" or \"fluid ounces\".",
"type": "string",
"enum": [
"grams",
"ounces",
"mL",
"fluid ounces"
]
},
"servings": {
"description": "Servings per package (at least 1).",
"type": "number",
"minimum": 1,
"maximum": 100000
},
"suggested_serving": {
"description": "Suggested serving in common terms, e.g. \"1 piece or 1 cup\".",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"visual_unit_of_measure": {
"description": "Visual reference after the metric serving size on FDA labels, e.g. \"5 chips\".",
"type": "string",
"minLength": 1,
"maxLength": 100
},
"prepared_serving_note": {
"description": "Note after the serving size on FDA labels, e.g. \"makes 1 cup prepared\".",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"packages": {
"description": "Number of packages the recipe yields per batch (0 or more).",
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"allergens": {
"type": "object",
"propertyNames": {
"type": "string",
"minLength": 1,
"maxLength": 60
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string",
"minLength": 1,
"maxLength": 120
}
]
},
"description": "Allergens by name, e.g. {\"Milk\": true, \"Almond\": true, \"other-shellfish\": \"Oyster\"}. Standard names: Wheat, Peanuts, Soy, Sesame, Mustard, Sulfites, Milk (Goat milk, Sheep milk), Egg (Duck egg, Quail egg), Fish (Tuna, Cod, Salmon, Bass), Shellfish (Crab, Lobster, Shrimp), tree nuts (Almond, Cashew, Hazelnut, Macadamia nut, Pecan, Pine nut, Pistachio, Walnut ...), Gluten (Barley, Oats, Rye, Triticale). other-milk/-egg/-fish/-shellfish/-treenut take a free-text source. An empty object {} clears all allergens."
},
"packaging_cost": {
"description": "Cost per package of direct and secondary packaging.",
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"labor_cost": {
"description": "Labor cost per batch.",
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"overhead_cost": {
"description": "Overhead cost per batch (rent, electricity, equipment ...).",
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"subrecipe_name": {
"description": "Name shown when this recipe is used as a subrecipe in another recipe's ingredient list.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"subrecipe_name_french": {
"description": "French name shown when used as a subrecipe.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"sku": {
"description": "Your SKU.",
"type": "string",
"minLength": 1,
"maxLength": 100
},
"preparation": {
"description": "Preparation instructions for staff.",
"type": "string",
"maxLength": 5000
},
"package_yield_quantity": {
"description": "Net weight of each finished package, in package_yield_unit (default 0).",
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"ingredient_list": {
"description": "Ingredient list text for the label.",
"type": "string",
"maxLength": 5000
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴recipal_update_recipe(recipe_id, name, package_yield_unit, servings, suggested_serving, ...)
WRITE: change fields of one recipe; fields you leave out stay unchanged. package_yield_quantity "default" sets the package weight to the total weight of the current ingredients (no moisture loss accounted for); ingredient_list "default" rebuilds the label ingredient list in descending weight order. Changes labels and costs of this recipe. Tags cannot be set here. PUT /recipes/{id}.
入力スキーマ
{
"type": "object",
"properties": {
"recipe_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "ReciPal recipe id."
},
"name": {
"description": "Recipe name.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"package_yield_unit": {
"description": "Unit of the finished package weight: \"grams\" (default), \"ounces\", \"mL\" or \"fluid ounces\".",
"type": "string",
"enum": [
"grams",
"ounces",
"mL",
"fluid ounces"
]
},
"servings": {
"description": "Servings per package (at least 1).",
"type": "number",
"minimum": 1,
"maximum": 100000
},
"suggested_serving": {
"description": "Suggested serving in common terms, e.g. \"1 piece or 1 cup\".",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"visual_unit_of_measure": {
"description": "Visual reference after the metric serving size on FDA labels, e.g. \"5 chips\".",
"type": "string",
"minLength": 1,
"maxLength": 100
},
"prepared_serving_note": {
"description": "Note after the serving size on FDA labels, e.g. \"makes 1 cup prepared\".",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"packages": {
"description": "Number of packages the recipe yields per batch (0 or more).",
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"allergens": {
"type": "object",
"propertyNames": {
"type": "string",
"minLength": 1,
"maxLength": 60
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string",
"minLength": 1,
"maxLength": 120
}
]
},
"description": "Allergens by name, e.g. {\"Milk\": true, \"Almond\": true, \"other-shellfish\": \"Oyster\"}. Standard names: Wheat, Peanuts, Soy, Sesame, Mustard, Sulfites, Milk (Goat milk, Sheep milk), Egg (Duck egg, Quail egg), Fish (Tuna, Cod, Salmon, Bass), Shellfish (Crab, Lobster, Shrimp), tree nuts (Almond, Cashew, Hazelnut, Macadamia nut, Pecan, Pine nut, Pistachio, Walnut ...), Gluten (Barley, Oats, Rye, Triticale). other-milk/-egg/-fish/-shellfish/-treenut take a free-text source. An empty object {} clears all allergens."
},
"packaging_cost": {
"description": "Cost per package of direct and secondary packaging.",
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"labor_cost": {
"description": "Labor cost per batch.",
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"overhead_cost": {
"description": "Overhead cost per batch (rent, electricity, equipment ...).",
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"subrecipe_name": {
"description": "Name shown when this recipe is used as a subrecipe in another recipe's ingredient list.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"subrecipe_name_french": {
"description": "French name shown when used as a subrecipe.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"sku": {
"description": "Your SKU.",
"type": "string",
"minLength": 1,
"maxLength": 100
},
"preparation": {
"description": "Preparation instructions for staff.",
"type": "string",
"maxLength": 5000
},
"package_yield_quantity": {
"description": "Net weight of each finished package in package_yield_unit, or \"default\" to total the ingredient weights.",
"anyOf": [
{
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
{
"type": "string",
"const": "default"
}
]
},
"ingredient_list": {
"description": "Ingredient list text for the label, or \"default\" to rebuild it from the ingredients.",
"type": "string",
"maxLength": 5000
}
},
"required": [
"recipe_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴recipal_scale_recipe(recipe_id, name, scale_amount)
WRITE: create a NEW recipe as a copy of an existing one, with every ingredient quantity and the yield multiplied by scale_amount (1 = plain copy; per-serving nutrition stays the same; scaling down cannot take packages below 1). Costs and tags carry over. The original is not changed. Without a name the copy is called "<name> (copy)" or "<name> <n>x". POST /recipes/{id}/scale.
入力スキーマ
{
"type": "object",
"properties": {
"recipe_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "Recipe to copy."
},
"name": {
"description": "Name of the new recipe.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"scale_amount": {
"description": "Multiplier for quantities and yield (default 1).",
"type": "number",
"exclusiveMinimum": 0,
"maximum": 1000000000000
}
},
"required": [
"recipe_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴recipal_create_recipe_from_ingredients(ingredients, name, package_yield_unit, servings, suggested_serving, ...)
WRITE: create a new recipe and its ingredient lines in one call. ingredients lists ingredient ids with the weight of each in grams. Optional yield, servings and packaging fields as in recipal_create_recipe. Creates a record in your ReciPal account. POST /recipes/shortcut.
入力スキーマ
{
"type": "object",
"properties": {
"ingredients": {
"minItems": 1,
"maxItems": 100,
"type": "array",
"items": {
"type": "object",
"properties": {
"ingredient_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "Ingredient id."
},
"grams": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000,
"description": "Weight in grams."
}
},
"required": [
"ingredient_id",
"grams"
],
"additionalProperties": false
},
"description": "Ingredient ids with their weights in grams (1-100 lines)."
},
"name": {
"description": "Recipe name.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"package_yield_unit": {
"description": "Unit of the finished package weight: \"grams\" (default), \"ounces\", \"mL\" or \"fluid ounces\".",
"type": "string",
"enum": [
"grams",
"ounces",
"mL",
"fluid ounces"
]
},
"servings": {
"description": "Servings per package (at least 1).",
"type": "number",
"minimum": 1,
"maximum": 100000
},
"suggested_serving": {
"description": "Suggested serving in common terms, e.g. \"1 piece or 1 cup\".",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"visual_unit_of_measure": {
"description": "Visual reference after the metric serving size on FDA labels, e.g. \"5 chips\".",
"type": "string",
"minLength": 1,
"maxLength": 100
},
"prepared_serving_note": {
"description": "Note after the serving size on FDA labels, e.g. \"makes 1 cup prepared\".",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"packages": {
"description": "Number of packages the recipe yields per batch (0 or more).",
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"allergens": {
"type": "object",
"propertyNames": {
"type": "string",
"minLength": 1,
"maxLength": 60
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string",
"minLength": 1,
"maxLength": 120
}
]
},
"description": "Allergens by name, e.g. {\"Milk\": true, \"Almond\": true, \"other-shellfish\": \"Oyster\"}. Standard names: Wheat, Peanuts, Soy, Sesame, Mustard, Sulfites, Milk (Goat milk, Sheep milk), Egg (Duck egg, Quail egg), Fish (Tuna, Cod, Salmon, Bass), Shellfish (Crab, Lobster, Shrimp), tree nuts (Almond, Cashew, Hazelnut, Macadamia nut, Pecan, Pine nut, Pistachio, Walnut ...), Gluten (Barley, Oats, Rye, Triticale). other-milk/-egg/-fish/-shellfish/-treenut take a free-text source. An empty object {} clears all allergens."
},
"packaging_cost": {
"description": "Cost per package of direct and secondary packaging.",
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"labor_cost": {
"description": "Labor cost per batch.",
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"overhead_cost": {
"description": "Overhead cost per batch (rent, electricity, equipment ...).",
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"subrecipe_name": {
"description": "Name shown when this recipe is used as a subrecipe in another recipe's ingredient list.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"subrecipe_name_french": {
"description": "French name shown when used as a subrecipe.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"sku": {
"description": "Your SKU.",
"type": "string",
"minLength": 1,
"maxLength": 100
},
"preparation": {
"description": "Preparation instructions for staff.",
"type": "string",
"maxLength": 5000
},
"package_yield_quantity": {
"description": "Net weight of each finished package, in package_yield_unit (default 0).",
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"ingredient_list": {
"description": "Ingredient list text for the label.",
"type": "string",
"maxLength": 5000
}
},
"required": [
"ingredients"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴recipal_create_subrecipe(recipe_id)
WRITE: turn a recipe into an ingredient (a subrecipe) with its nutrition, costing and ingredient list, so it can be used inside other recipes. Later changes to the recipe flow through to the ingredient. Fails if the recipe is empty. Returns the new ingredient. POST /recipes/{id}/create_subrecipe.
入力スキーマ
{
"type": "object",
"properties": {
"recipe_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "Recipe to turn into a subrecipe."
}
},
"required": [
"recipe_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴recipal_add_recipe_ingredient(recipe_id, ingredient_id, unit, quantity, waste, ...)
WRITE: add an ingredient line to a recipe, by unit and quantity (the unit must be one the ingredient offers, e.g. "1 cup" or "1 gram"; see units_and_grams from recipal_get_recipe_ingredient or valid_units from recipal_get_ingredient) or directly by total_grams (overrides unit and quantity). Changes the recipe's nutrition, label and cost. POST /recipes/{id}/recipe_ingredients.
入力スキーマ
{
"type": "object",
"properties": {
"recipe_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "ReciPal recipe id."
},
"ingredient_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "Ingredient to add."
},
"unit": {
"description": "Unit of the ingredient (default: its first unit).",
"type": "string",
"minLength": 1,
"maxLength": 100
},
"quantity": {
"description": "Amount of the unit (default 1).",
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"waste": {
"description": "Percent of the ingredient that does not go into the product (0-100). Costed in full, excluded from nutrition.",
"type": "number",
"minimum": 0,
"maximum": 100
},
"total_grams": {
"description": "Weight in grams; overrides unit and quantity.",
"type": "number",
"minimum": 0,
"maximum": 1000000000000
}
},
"required": [
"recipe_id",
"ingredient_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴recipal_update_recipe_ingredient(recipe_id, recipe_ingredient_id, unit, quantity, waste, ...)
WRITE: change the AMOUNT of one ingredient line in a recipe (unit, quantity, waste or total_grams; total_grams overrides unit and quantity). It cannot swap the ingredient: remove the line and add another instead. Changes the recipe's nutrition, label and cost. PUT /recipes/{recipe_id}/recipe_ingredients/{id}.
入力スキーマ
{
"type": "object",
"properties": {
"recipe_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "ReciPal recipe id."
},
"recipe_ingredient_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "Recipe ingredient (line) id from recipal_list_recipe_ingredients."
},
"unit": {
"description": "Unit, one of the ingredient's units.",
"type": "string",
"minLength": 1,
"maxLength": 100
},
"quantity": {
"description": "Amount of the unit.",
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"waste": {
"description": "Waste percent (0-100).",
"type": "number",
"minimum": 0,
"maximum": 100
},
"total_grams": {
"description": "Weight in grams; overrides unit and quantity.",
"type": "number",
"minimum": 0,
"maximum": 1000000000000
}
},
"required": [
"recipe_id",
"recipe_ingredient_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴recipal_remove_recipe_ingredient(recipe_id, recipe_ingredient_id)
WRITE (destructive): permanently remove one ingredient line from a recipe. It cannot be undone, but the same ingredient can be added back (with recipal_add_recipe_ingredient). Changes the recipe's nutrition, label and cost. The ingredient itself is not deleted. DELETE /recipes/{recipe_id}/recipe_ingredients/{id}.
入力スキーマ
{
"type": "object",
"properties": {
"recipe_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "ReciPal recipe id."
},
"recipe_ingredient_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "Recipe ingredient (line) id from recipal_list_recipe_ingredients."
}
},
"required": [
"recipe_id",
"recipe_ingredient_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴recipal_create_ingredient(name, brand, source, food, non_food, ...)
WRITE: create a custom ingredient (private to your account) with its nutrition facts. For a food ingredient give nutrition_unit and nutrition_quantity (the serving the nutrients are entered for, e.g. 1 cup; for units beyond gram/oz/lb/kg add them in measures first) and all required nutrients. food and non_food cannot be changed later. Non-food items: set food=false and non_food to labor, packaging, safety, other_hourly or other_fixed. POST /ingredients.
入力スキーマ
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Ingredient name (unique unless private)."
},
"brand": {
"description": "Brand name, mainly to verify data.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"source": {
"description": "Data source: URL, supplier or recipe id.",
"type": "string",
"minLength": 1,
"maxLength": 500
},
"food": {
"description": "true (default) for a food ingredient; false for a non-food item.",
"type": "boolean"
},
"non_food": {
"description": "Required when food=false.",
"type": "string",
"enum": [
"labor",
"packaging",
"safety",
"other_hourly",
"other_fixed"
]
},
"nutrition_unit": {
"description": "Required for food and safety ingredients. Food: the unit the nutrients are entered in (gram, oz, lb, kg, \"100 grams\", a unit from measures, or a volume unit such as cup once measures includes a volume). Safety: deg_f, deg_c, ph, brix, aw, seconds, minutes, hours, psi, ppm, percent, pass_fail or each.",
"type": "string",
"minLength": 1,
"maxLength": 60
},
"nutrition_quantity": {
"description": "Required for food ingredients: quantity of nutrition_unit the nutrients are for, e.g. 0.5 for 0.5 cup.",
"type": "number",
"exclusiveMinimum": 0,
"maximum": 1000000000000
},
"measures": {
"description": "Custom units, e.g. [{quantity:1, unit:'cup', equivalent_quantity:240, equivalent_unit:'gram'}].",
"maxItems": 15,
"type": "array",
"items": {
"type": "object",
"properties": {
"quantity": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 1000000000000,
"description": "How many of `unit` the measure describes (e.g. 1)."
},
"unit": {
"type": "string",
"minLength": 1,
"maxLength": 60,
"description": "Name of the unit, e.g. \"cookie\" or \"cup\". Not gram, oz, lb or kg (every ingredient has those)."
},
"equivalent_quantity": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 1000000000000,
"description": "How much of equivalent_unit that many units equal (e.g. 20)."
},
"equivalent_unit": {
"type": "string",
"minLength": 1,
"maxLength": 60,
"description": "gram, oz, lb, kg, or another measure's unit."
}
},
"required": [
"quantity",
"unit",
"equivalent_quantity",
"equivalent_unit"
],
"additionalProperties": false
}
},
"ingredient_list": {
"description": "Ingredient list text as it appears on a label, e.g. \"Curlies (Milk, Sugar)\".",
"type": "string",
"maxLength": 2000
},
"allergens": {
"type": "object",
"propertyNames": {
"type": "string",
"minLength": 1,
"maxLength": 60
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string",
"minLength": 1,
"maxLength": 120
}
]
},
"description": "Allergens by name, e.g. {\"Milk\": true, \"Almond\": true, \"other-shellfish\": \"Oyster\"}. Standard names: Wheat, Peanuts, Soy, Sesame, Mustard, Sulfites, Milk (Goat milk, Sheep milk), Egg (Duck egg, Quail egg), Fish (Tuna, Cod, Salmon, Bass), Shellfish (Crab, Lobster, Shrimp), tree nuts (Almond, Cashew, Hazelnut, Macadamia nut, Pecan, Pine nut, Pistachio, Walnut ...), Gluten (Barley, Oats, Rye, Triticale). other-milk/-egg/-fish/-shellfish/-treenut take a free-text source. An empty object {} clears all allergens."
},
"nutrients": {
"type": "object",
"properties": {
"calories": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"protein": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"fat": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"fat_saturated": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"fat_trans": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"cholesterol": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"carbohydrate": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"fiber": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"uncounted_fiber": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"sugar": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"added_sugar": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"sugar_alcohol": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"sodium": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"vitamin_d_IU": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"calcium": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"iron": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"potassium": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"vitamin_a_IU": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"vitamin_c": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"vitamin_e": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"vitamin_k": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"thiamin": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"riboflavin": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"niacin": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"vitamin_b6": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"folate": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"food_folate": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"folic_acid": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"folate_dietary_equivalent": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"vitamin_b12": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"biotin": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"pantothenic_acid": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"phosphorus": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"iodine": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"magnesium": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"zinc": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"selenium": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"copper": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"manganese": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"chromium": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"molybdenum": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"chloride": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"choline": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"fat_monounsaturated": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"fat_polyunsaturated": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"omega_3": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"omega_6": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"water": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"ash": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
}
},
"additionalProperties": false,
"description": "Nutrition facts (food ingredients only). Amounts per serving (nutrition_quantity x nutrition_unit): calories; grams for protein, fat, fat_saturated, fat_trans, carbohydrate, fiber, uncounted_fiber, sugar, added_sugar, sugar_alcohol, fat_monounsaturated, fat_polyunsaturated, omega_3, omega_6, water, ash; milligrams for cholesterol, sodium, calcium, iron, potassium, vitamin_c, vitamin_e, thiamin, riboflavin, niacin, vitamin_b6, pantothenic_acid, phosphorus, magnesium, zinc, copper, manganese, chloride, choline; micrograms for vitamin_k, folate, vitamin_b12, biotin, iodine, selenium, chromium, molybdenum; IU for vitamin_d_IU and vitamin_a_IU. Required for a food ingredient: calories, protein, fat, fat_saturated, fat_trans, cholesterol, carbohydrate, fiber, sugar, added_sugar, sodium, calcium, iron, vitamin_a_IU, vitamin_c."
}
},
"required": [
"name"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴recipal_update_ingredient(ingredient_id, name, brand, source, nutrition_unit, ...)
WRITE: change fields of one of YOUR ingredients (public ingredients cannot be edited); fields you leave out stay unchanged. If nutrition_unit, nutrition_quantity or their measure change, nutrients you do not pass are rescaled to keep the same amount per serving. measures REPLACES the whole list of custom units, so send them all. Setting archived true hides the ingredient from lists; false restores it. The change flows into every recipe using the ingredient. PUT /ingredients/{id}.
入力スキーマ
{
"type": "object",
"properties": {
"ingredient_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "ReciPal ingredient id (one you created)."
},
"name": {
"description": "Ingredient name.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"brand": {
"description": "Brand name.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"source": {
"description": "Data source.",
"type": "string",
"minLength": 1,
"maxLength": 500
},
"nutrition_unit": {
"description": "Unit the nutrients are entered in.",
"type": "string",
"minLength": 1,
"maxLength": 60
},
"nutrition_quantity": {
"description": "Quantity of nutrition_unit the nutrients are for.",
"type": "number",
"exclusiveMinimum": 0,
"maximum": 1000000000000
},
"measures": {
"description": "The FULL list of custom units (replaces the existing list).",
"maxItems": 15,
"type": "array",
"items": {
"type": "object",
"properties": {
"quantity": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 1000000000000,
"description": "How many of `unit` the measure describes (e.g. 1)."
},
"unit": {
"type": "string",
"minLength": 1,
"maxLength": 60,
"description": "Name of the unit, e.g. \"cookie\" or \"cup\". Not gram, oz, lb or kg (every ingredient has those)."
},
"equivalent_quantity": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 1000000000000,
"description": "How much of equivalent_unit that many units equal (e.g. 20)."
},
"equivalent_unit": {
"type": "string",
"minLength": 1,
"maxLength": 60,
"description": "gram, oz, lb, kg, or another measure's unit."
}
},
"required": [
"quantity",
"unit",
"equivalent_quantity",
"equivalent_unit"
],
"additionalProperties": false
}
},
"ingredient_list": {
"description": "Ingredient list text for labels.",
"type": "string",
"maxLength": 2000
},
"allergens": {
"type": "object",
"propertyNames": {
"type": "string",
"minLength": 1,
"maxLength": 60
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string",
"minLength": 1,
"maxLength": 120
}
]
},
"description": "Allergens by name, e.g. {\"Milk\": true, \"Almond\": true, \"other-shellfish\": \"Oyster\"}. Standard names: Wheat, Peanuts, Soy, Sesame, Mustard, Sulfites, Milk (Goat milk, Sheep milk), Egg (Duck egg, Quail egg), Fish (Tuna, Cod, Salmon, Bass), Shellfish (Crab, Lobster, Shrimp), tree nuts (Almond, Cashew, Hazelnut, Macadamia nut, Pecan, Pine nut, Pistachio, Walnut ...), Gluten (Barley, Oats, Rye, Triticale). other-milk/-egg/-fish/-shellfish/-treenut take a free-text source. An empty object {} clears all allergens."
},
"archived": {
"description": "true to archive, false to restore.",
"type": "boolean"
},
"nutrients": {
"type": "object",
"properties": {
"calories": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"protein": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"fat": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"fat_saturated": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"fat_trans": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"cholesterol": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"carbohydrate": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"fiber": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"uncounted_fiber": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"sugar": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"added_sugar": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"sugar_alcohol": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"sodium": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"vitamin_d_IU": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"calcium": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"iron": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"potassium": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"vitamin_a_IU": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"vitamin_c": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"vitamin_e": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"vitamin_k": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"thiamin": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"riboflavin": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"niacin": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"vitamin_b6": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"folate": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"food_folate": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"folic_acid": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"folate_dietary_equivalent": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"vitamin_b12": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"biotin": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"pantothenic_acid": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"phosphorus": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"iodine": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"magnesium": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"zinc": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"selenium": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"copper": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"manganese": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"chromium": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"molybdenum": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"chloride": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"choline": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"fat_monounsaturated": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"fat_polyunsaturated": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"omega_3": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"omega_6": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"water": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"ash": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
}
},
"additionalProperties": false,
"description": "Nutrition facts to change; others are kept. Amounts per serving (nutrition_quantity x nutrition_unit): calories; grams for protein, fat, fat_saturated, fat_trans, carbohydrate, fiber, uncounted_fiber, sugar, added_sugar, sugar_alcohol, fat_monounsaturated, fat_polyunsaturated, omega_3, omega_6, water, ash; milligrams for cholesterol, sodium, calcium, iron, potassium, vitamin_c, vitamin_e, thiamin, riboflavin, niacin, vitamin_b6, pantothenic_acid, phosphorus, magnesium, zinc, copper, manganese, chloride, choline; micrograms for vitamin_k, folate, vitamin_b12, biotin, iodine, selenium, chromium, molybdenum; IU for vitamin_d_IU and vitamin_a_IU."
}
},
"required": [
"ingredient_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴recipal_create_ingredient_cost(ingredient_id, effective_at, unit, quantity, price, ...)
WRITE: add a price for an ingredient that becomes active on effective_at (the active cost is the one with the latest effective_at not after the date; one cost per ingredient per date). price and shipping are per quantity x unit. Changes the cost of every recipe using the ingredient from that date. Not allowed for subrecipe ingredients. POST /ingredient_costs.
入力スキーマ
{
"type": "object",
"properties": {
"ingredient_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "Ingredient id."
},
"effective_at": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Date the cost becomes active, yyyy-mm-dd."
},
"unit": {
"type": "string",
"minLength": 1,
"maxLength": 100,
"description": "A unit of the ingredient, e.g. \"1 cup\", \"1 lb\"."
},
"quantity": {
"description": "How much of the unit the price covers (default 0).",
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"price": {
"description": "Price for quantity x unit (default 0).",
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"shipping": {
"description": "Shipping for quantity x unit (default 0).",
"type": "number",
"minimum": 0,
"maximum": 1000000000000
}
},
"required": [
"ingredient_id",
"effective_at",
"unit"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴recipal_update_ingredient_cost(ingredient_cost_id, effective_at, unit, quantity, price, ...)
WRITE: change an existing ingredient cost entry (date, unit, quantity, price, shipping); fields you leave out stay unchanged. Changes recipe costs that depend on it. Not allowed for subrecipe ingredients. PUT /ingredient_costs/{id}.
入力スキーマ
{
"type": "object",
"properties": {
"ingredient_cost_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "Ingredient cost id."
},
"effective_at": {
"description": "New effective date, yyyy-mm-dd (unique per ingredient).",
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"unit": {
"description": "A unit of the ingredient.",
"type": "string",
"minLength": 1,
"maxLength": 100
},
"quantity": {
"description": "How much of the unit the price covers.",
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"price": {
"description": "Price for quantity x unit.",
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"shipping": {
"description": "Shipping for quantity x unit.",
"type": "number",
"minimum": 0,
"maximum": 1000000000000
}
},
"required": [
"ingredient_cost_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}コミュニティ
エビデンス