| Action | Method | Resource | Description |
|---|---|---|---|
| Get all | GET | /business/:business_id/categories/:category_id/products/:product_id/gallery | Get all items gallery with business_id , category_id and product_id. |
| Get | GET | /business/:business_id/categories/:category_id/products/:product_id/gallery/:item_id | Get item gallery with id business_id, category_id, product_id and item_id. |
| Create | POST | /business/:business_id/categories/:category_id/products/:product_id/gallery | Create a item gallery with business_id, category_id and product_id. |
| Update | PUT | /business/:business_id/categories/:category_id/products/:product_id/gallery/:item_id | Update 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_id | Delete item gallery with business_id, category_id, product_id and item_id. |
The product gallery item model is composed of the following attributes:
| Attribute | Type | Required | Description | Whereable |
|---|---|---|---|---|
| type | integer | no, required to create. | Identifier, which can only have to values '1' or '2' | Yes |
| file | base64 image, url image or File image. | no | The item's image. | No |
| video | string | no | The item's video. (YouTube url). | No |
| title | string | no | The item's title. | Yes |
| description | string | no | Description identifier of the image, video you're uploading. | Yes |
Attribute: type1 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.

