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.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
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": 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"
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}