Edit Ingredient

Edits an existing ingredient.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Omitted fields in the request will keep their current values.

The archived field

archived – Optional. true archives the ingredient; false unarchives it. If omitted, the ingredient's archive state is left unchanged.

The nutrition_info object

On PATCH, if the for_weight_qty and for_weight_unit fields are null, their current values will be preserved.

The carbon_footprint object

co2eq_cradle_to_gate_kg is the value Apicbase uses for the ingredient's CO₂ equivalent emissions (reporting, totals, product carbon footprint).

  • co2eq_cradle_to_gate_kg – CO₂e from raw materials to factory gate (cradle-to-gate). Use this for the ingredient's main carbon footprint value.
  • co2eq_farm_to_farmgate_kg – CO₂e from farm to farm gate only (narrower scope). Optional / for reference.

On PATCH, you can delete field values by setting them to null.

The stock_variants array

This attribute accepts an array of ingredient IDs, to be set as stock variants for the ingredient being edited.

When this field is included in a request, the current variants are replaced by the variants specified in the array.

Example: consider an ingredient that has variants with IDs 1, 2 and 3. Sending a PATCH request with the following arrays in the stock_variants attribute will have the respective effects:

  • stock_variants: [1, 2, 3, 4] – Ingredient with ID 4 will be added as a stock variant.
  • stock_variants: [4] – Ingredients with ID 1, 2 and 3 will be removed as stock variants, while the ingredient with ID 4 will be added.
  • stock_variants: [1, 3] – Only the ingredient with ID 2 will be removed as a stock variant.
  • stock_variants: [] – All ingredients will be removed as stock variants.

Omitting this field in the request keeps the current list of stock variants unchanged.

Path Params
string
required

An ingredient's ID

Body Params
string
string
boolean
boolean
boolean

If true, the ingredient is archived; if false, it is unarchived. If omitted, the current archive state is preserved.

json
preferred_uoms
array of strings
preferred_uoms
float
string

Internal ID in the user interface. Uniqueness is enforced in this field.

string

External ID in the user interface.

string
string
string
string
string
string
string
string
allergens
object
additional_info
object
nutrition_info
object
images
array of strings

An array of image IDs.

images
string

An image's ID.

carbon_footprint
object
stock_variants
array of strings

An array of ingredient IDs.

stock_variants
Response

Language
Credentials
OAuth2
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json