Business Products Model

ActionMethodResourceDescription
Get allGET/business/:business_id/categories/:category_id/productsGet all products with business_id and category_id.
GetGET/business/:business_id/categories/:category_id/products/:product_idGet product with id business_id, category_id and product_id.
CreatePOST/business/:business_id/categories/:category_id/productsCreate a product with business_id and category_id.
UpdatePOST/business/:business_id/categories/:category_id/products/:product_idUpdate product with business_id, category_id and product_id.
DeleteDELETE/business/:business_id/categories/:category_id/procuts/:product_idDelete product with business_id, category_id and product_id.

The product model is composed of the following attributes:

AttributeTypeRequiredDescription
namestringno, required to create.The product's name.
pricefloatno, required to create.The product's price.
descriptionstringnoThe product's description.
imagesbase64 image, url image or File image.noThe product's image.
inventoriedbooleannoIf product is inventoried or not.
quantityintegernoThe product's quantity when the product is inventoried.
featuredbooleannoIf the product is featured or not.
extrasjsonnoThe product's extras.
enabledbooleannoThe product's status.
upsellingboleanno
minimum_per_orderintegernoThe minimum quantity of the product to be valid in cart
maximum_per_orderfloatnoThe maximum quantity of the product to be valid in cart
in_offerbooleannoEnabled product in offer.
offer_pricefloatnoThe product's offer price.

🚧

Product Gallery

If you're looking for Product Gallery Documentation, please click the following link:

Product Gallery Model

📘

Restrictions for POST, PUT, DELETE products.

Business products 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 business products.
  • User type Business owner can create,update or remove only business products related to his business.

📘

GET responses for business menus

In general, there are no restrictions to obtain business products but exist to paths to obtain and data obtained depends on the type of user:

  • Normal
  • mode:dashboard

Therefore, depending on the mode and the type of user response will be obtained as shown below:

  • User type Administrator and mode:dashboard can get all business products.
  • User type Business owner and mode:dashboard can get business products related to his business.
  • User type Customer can get all business products bounded by the business he can get and if business products are enabled for his request.

📘

Upselling feature

This feature has been implemented to have a way to promote new products, the best use for this is once you finish filling the cart and ask if you want any of these products with this attribute if you have ingredients or extras, this product options are opened and if it is not added directly to the cart.

Example: