Create Custom Ingredient
Create a new custom ingredient as an empty draft. Only name is required. The response carries version_id — the sealed Version ULID — which callers can pass back on a future mutation for optimistic concurrency.
application/json- body
Create a custom ingredient, optionally with nutrients and serving in one shot.
Only name is required. nutrients and the serving fields
(reference_amount, reference_unit, household_measure,
reference_quantity_g, density_g_per_ml) are optional and
order-agnostic — when supplied, the first committed Version already
carries them (one draft version), instead of requiring a
create-then-two-PUTs sequence. Omitted fields keep the entity's
empty default, exactly as a name-only create. The created entity
always starts in draft status — confirming (draft -> active)
remains a separate, deliberate step.
name*NameUser-given custom ingredient name.
1 <= length <= 255approved_markets?array<>|Markets this ingredient is approved for. Omitted (None) defaults to the org's market, so the ingredient is searchable/gettable immediately.
nutrients?array<>|The complete nutrient list. Omitted (None) leaves the entity's empty draft nutrient list untouched.
reference_amount?||Serving as entered, e.g. 15 / 100 / 1.
reference_unit?|Unit the reference amount is expressed in — metric (g, ml), household (tablespoon, cup), or a count (e.g. 'cookie', 'slice').
household_measure?|Display/source provenance, e.g. "1 Tablespoon".
reference_quantity_g?||Derived as-sold gram basis.
density_g_per_ml?number||nullSuccessful Response
application/json- response
Response for the create-custom-ingredient endpoint.
data*A custom ingredient's full data: identity, lifecycle status, serving/nutrition data, and descriptive attributes.
meta*Response metadata.
version_id?|Version committed for this creation; pass on a future mutation as If-Match for optimistic concurrency.
curl -X POST 'https://api.bettermenu.live/studio/custom-ingredients' \ -H 'Content-Type: application/json' \ -d '{ "name": "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": 1 }, "property2": { "bmid": "string", "nutrient_id": 1 } } } ], "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"}