BETTERMENU
Studio

Get Latest Ingredient Resolution Session

Returns the most recent ingredient resolution session for this recipe. Use after a page refresh to recover the current session state without knowing the session_id. Returns 404 if no session exists.

GET
/studio/recipes/{recipe_id}/ingredient-resolutions/latest

Path Parameters

recipe_id*Recipe Id

Response Body

application/json

application/json

application/json

curl -X GET "https://loading/studio/recipes/string/ingredient-resolutions/latest"
{
  "data": {
    "resolution_id": "string",
    "previous_resolution_id": "string",
    "recipe_id": "string",
    "created_at": "2019-08-24T14:15:22Z",
    "summary": {
      "total": 0,
      "resolved": 0,
      "unresolved": 0,
      "ready_to_confirm": true
    },
    "rows": [
      {
        "row_id": "string",
        "position": 0,
        "original_text": "string",
        "parsed": {
          "position": 0,
          "original_text": "string",
          "quantity": "string",
          "quantity_text": "string",
          "unit": "string",
          "ingredient_name": "string",
          "preparation": "string",
          "quantity_range": [
            "string",
            "string"
          ],
          "error": {
            "message": "string",
            "field": "string"
          }
        },
        "search": {
          "ingredient_id": "string",
          "ingredient_name": "string",
          "provenance": "system_matched",
          "candidates": [
            {
              "ingredient_id": "string",
              "name": "string",
              "item_type": "ingredient",
              "category": "string",
              "preparation": "string",
              "food_form": "string",
              "relevance_score": 0,
              "nutrient_count": 0,
              "portion_count": 0,
              "food_portions": [
                {
                  "id": "string",
                  "amount": "string",
                  "unit_name": "string",
                  "modifier": "string",
                  "gram_weight": "string"
                }
              ],
              "nutrients": [
                {
                  "id": "n_qr2jbh18w4hmo",
                  "name": "protein",
                  "amount": "string",
                  "unit": "g"
                }
              ]
            }
          ]
        },
        "unit_conversion": {
          "quantity_grams": "string",
          "provenance": "identity",
          "conversion_class": "string",
          "steps": [
            {
              "input_quantity": "string",
              "input_unit": "string",
              "output_quantity": "string",
              "output_unit": "string",
              "source": "identity",
              "conversion_class": "string",
              "reasoning": "string"
            }
          ]
        }
      }
    ]
  },
  "meta": {
    "version": "string",
    "request_id": "string",
    "timestamp": "string"
  }
}
{
  "type": "https://api.bettermenu.com/errors/recipe_not_found",
  "title": "Recipe Not Found",
  "status": 400,
  "detail": "Recipe rcpe_abc123 does not exist",
  "code": "recipe_not_found",
  "retryable": true,
  "instance": "/api/v1/recipes/rcpe_abc123",
  "trace_id": "req_xyz789",
  "errors": [
    {}
  ],
  "invalid_ids": [
    "f_abc123",
    "f_xyz789"
  ]
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}