BetterMenu
Studio

Recalculate Nutrition

POST
/studio/recipes/{recipe_id}/recalculate

Authorization

BearerAuth
AuthorizationBearer <token>

JWT Bearer token authentication

In: header

Path Parameters

recipe_id*string

Response Body

application/json

application/json

curl -X POST "https://evh09u6ys0.execute-api.us-west-2.amazonaws.com/studio/recipes/string/recalculate"
{
  "data": {
    "recipe_id": "string",
    "ingredients": [
      {
        "original_text": "string",
        "parsed_quantity": 0,
        "parsed_unit": "string",
        "parsed_ingredient_name": "string",
        "selected_ingredient_id": "string",
        "selected_ingredient_name": "string",
        "metric_quantity_g": 0
      }
    ],
    "nutrition_profile": {
      "is_stale": true,
      "nutrients": [
        {
          "id": 1003,
          "bmid": "string",
          "name": "Protein",
          "total_amount": "string",
          "unit": "g"
        }
      ],
      "total_weight_grams": "string"
    },
    "ingredient_resolutions": [
      {
        "converted": {
          "quantity": 59,
          "steps": [
            {
              "calculation": "0.5 cup x 236ml/cup = 118ml",
              "factor": 236,
              "input_quantity": 0.5,
              "input_unit": "cup",
              "output_quantity": 118,
              "output_unit": "ml"
            }
          ],
          "unit": "g"
        },
        "matches": {
          "candidates": [
            {
              "category": "Fruits and Fruit Juices",
              "ingredient_id": "f_usda_ff:1105073",
              "ingredient_name": "Bananas, overripe, raw",
              "search_confidence": 0.95
            }
          ],
          "query_text": "flour",
          "selected_match": {
            "category": "Fruits and Fruit Juices",
            "ingredient_id": "f_usda_ff:1105073",
            "ingredient_name": "Bananas, overripe, raw",
            "search_confidence": 0.95
          }
        },
        "original_text": "1/2 cup flour",
        "parsed": {
          "ingredient_name": "flour",
          "quantity": 0.5,
          "quantity_text": "1/2",
          "unit": "cup"
        }
      }
    ],
    "updated_at": "string"
  },
  "meta": {
    "version": "string",
    "request_id": "string",
    "timestamp": "string"
  }
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}