BETTERMENU
Studio

Compute Nutrition Facts

Compute FDA-rounded nutrition facts for a serving.

⑧ of 8 | Next: done — recipe has FDA-compliant nutrition facts 409? Check steps_required array — call the listed operationId(s), then retry.

Use this to answer: "generate the nutrition label", "compute nutrition facts", "get the FDA label data"

Applies FDA rounding rules (21 CFR § 101.9) to produce per-serving and optionally per-container nutrition facts.

409 scenarios and recovery:

  • MISSING_DEPENDENCY: no nutrition -> call ⑥ computeRecipeNutrition
  • STALE_DEPENDENCY: ingredients changed since nutrition was computed -> call ⑥ again
  • MISSING_DEPENDENCY: no serving -> call ⑦ setRecipeServing After fixing, retry this call.
POST
/studio/recipes/{recipe_id}/servings/{serving_id}/nutrition-facts

Authorization

BearerAuth
AuthorizationBearer <token>

JWT Bearer token authentication

In: header

Path Parameters

recipe_id*string
serving_id*string

Response Body

application/json

application/json

curl -X POST "https://loading/studio/recipes/string/servings/string/nutrition-facts"
{
  "data": {
    "recipe_id": "string",
    "serving_id": "string",
    "per_serving": {
      "serving_id": "string",
      "demographic": "string",
      "reference_weight_grams": "string",
      "nutrients": [
        {
          "bmid": "string",
          "name": "string",
          "amount": "string",
          "unit": "string",
          "percent_daily_value": "string"
        }
      ]
    },
    "per_container": {
      "serving_id": "string",
      "demographic": "string",
      "reference_weight_grams": "string",
      "nutrients": [
        {
          "bmid": "string",
          "name": "string",
          "amount": "string",
          "unit": "string",
          "percent_daily_value": "string"
        }
      ]
    }
  },
  "meta": {
    "version": "string",
    "request_id": "string",
    "timestamp": "string"
  }
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}