Product Ingredients Model

Ingredients can be used for food products, or ingredients can be used as specifications or characteristics for a product.

ActionMethodResource
Get allGET/business/:business_id/categories/:category_id/products/:product_id/ingredientsGet all ingredients of a product with business_id category_id and product_id.
GetGET/business/:business_id/:category_id/products/:product_id/ingredients/:ingredient_idGet all ingredient of a product with business_id category_id , product_id and ingredient_id.
CreatePOST/business/:business_id/categories/:category_id/products/:product_id/ingredientscreate ingredients of a product with business_id category_id and product_id.
UpdatePOST/business/:business_id/:category_id/products/:product_id/ingredients/:ingredient_idUpdate ingredient of a product with business_id category_id , product_id and ingredient_id.
DeleteDELETE/business/:business_id/:category_id/products/:product_id/ingredients/:ingredient_iddelete ingredient of a product with business_id category_id , product_id and ingredient_id.
AttributeTypeRequiredDescription
namestringno, required to createThe ingredient name.
imagestringnoThe ingredient image.

📘

Restrictions for POST, PUT, DELETE ingredients.

Product ingredients can only be created, updated or removed by user level 0 (Type: Administrator) and user level 2 (Type: Business owner).

  • User type Administrator can create, update or remove any products ingredients for any business.
  • User type Business owner can create, update or remove only product ingredients related to his business.

Note: Unlike the extras that are shared between products, the ingredients are directly linked to the products and are not shared between products.