Product Gallery Model

ActionMethodResourceDescription
Get allGET/business/:business_id/categories/:category_id/products/:product_id/galleryGet all items gallery with business_id , category_id and product_id.
GetGET/business/:business_id/categories/:category_id/products/:product_id/gallery/:item_idGet item gallery with id business_id, category_id, product_id and item_id.
Create POST/business/:business_id/categories/:category_id/products/:product_id/galleryCreate a item gallery with business_id, category_id and product_id.
Update PUT/business/:business_id/categories/:category_id/products/:product_id/gallery/:item_idUpdate item gallery with business_id, category_id, product_id and item_id.
Delete DELETE/business/:business_id/categories/:category_id/procuts/:product_id/gallery/item_idDelete item gallery with business_id, category_id, product_id and item_id.

The product gallery item model is composed of the following attributes:

AttributeTypeRequiredDescriptionWhereable
typeintegerno, required to create.Identifier, which can only have to values '1' or '2'Yes
filebase64 image, url image or File image.noThe item's image.No
videostringnoThe item's video. (YouTube url).No
titlestringnoThe item's title.Yes
descriptionstringnoDescription identifier of the image, video you're uploading.Yes

👍

Attribute: type

1 is for image
2 is for videos URLs

📘

Restrictions for POST, PUT, DELETE items in product gallery.

Image or videos in business product gallery can only be added, updated or removed by users level 0 (Type: Administrator) and user level 2 (Type: Business owner).

  • User type Administrator can add, update or remove an item from any business gallery.
  • User Type Business owner can add, update or remove only items in product gallery related to his business.