BETTERMENU
Studio

Confirm Custom Ingredient

Promote a draft custom ingredient to active; only active ingredients can be composed into recipes. A draft ingredient is always rejected from recipe composition. Confirming an already-active or archived ingredient is rejected — this is a one-time transition, not idempotent.

POST
/studio/custom-ingredients/{custom_ingredient_id}/confirm

Path Parameters

custom_ingredient_id*Custom Ingredient Id

Header Parameters

If-Match*string

Optimistic-concurrency token. Pass the version_id returned by the previous mutation (or by GET /recipes/{id}/versions) so the server can reject the request when another writer has advanced the recipe in the meantime. A stale token (header present but HEAD has moved) surfaces HTTP 409 with the current version_id in the response body. An absent token on a versioned recipe surfaces HTTP 412. Only consumed on API versions that declare the recipe_versioning capability — older versions ignore the header.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://api.bettermenu.live/studio/custom-ingredients/string/confirm" \  -H "If-Match: string"
{
  "data": {
    "id": "stringstringstringstringst",
    "org_id": "stringstringstringstrings",
    "status": "draft",
    "name": "string",
    "entry_method": "form",
    "notes": "string",
    "reference_amount": "string",
    "reference_unit": "string",
    "household_measure": "string",
    "reference_quantity_g": "string",
    "density_g_per_ml": "string",
    "nutrients": [
      {
        "id": "stringstringstringstringst",
        "unit": "string",
        "amount": "string",
        "market_nutrients": {
          "property1": {
            "bmid": "string",
            "nutrient_id": 0
          },
          "property2": {
            "bmid": "string",
            "nutrient_id": 0
          }
        }
      }
    ],
    "approved_markets": [
      "US"
    ],
    "brand": "string",
    "manufacturer": "string",
    "source_url": "string",
    "attributes": [
      {
        "key": "string",
        "type": "string",
        "value": null,
        "searchable": false
      }
    ],
    "artifacts": [
      {
        "key": "string",
        "kind": "string",
        "uploaded_at": "2019-08-24T14:15:22Z"
      }
    ],
    "ingredient_statement": "string",
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z"
  },
  "meta": {
    "version": "string",
    "request_id": "string",
    "timestamp": "string"
  },
  "version_id": "string"
}
{
  "type": "https://api.bettermenu.live/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"
  ]
}
{
  "type": "https://api.bettermenu.live/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"
  ]
}
Empty
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}
BETTERMENU

FDA-compliant nutrition labels from a recipe, in minutes.

Visit bettermenu.live