Action | Method | Resource | Description |
---|---|---|---|
Get all | GET | /business/:business_id/extras/:extra_id/options/:option_id/suboptions | Get all options with business_id , extra_id and option_id . |
Get | GET | /business/:business_id/extras/:extra_id/options/:option_id/suboptions/:suboption_id | Get option with id business_id , extra_id , option_id and suboption_id . |
Create | POST | /business/:business_id/extras/:extra_id/options/:option_id/suboptions | Create an option with business_id , extra_id and option_id . |
Update | POST | /business/:business_id/extras/:extra_id/options/:option_id/suboptions/:suboption_id | Update option with business_id , extra_id , option_id and suboption_id . |
Delete | DELETE | /business/:business_id/extras/:extra_id/options/:option_id/suboptions/:suboption_id | Delete option with business_id , extra_id , option_id and suboption_id . |
The extra option suboption (product options choice) model is composed of the following attributes:
Attribute | Type | Required | Description | Whereable |
---|---|---|---|---|
name | string | no, required to create. | The suboption's name. | Yes |
price | float | no, required to create. | The suboption's price. | Yes |
image | base64 image, url image or File image | no | The suboption's image. | No |
rank | integer | only to update. | The suboption's order. | Yes |
sku | string | no | The business's sku, is the printer id. | Yes |
max | integer | no | The suboption's max quantity. | no |
half_price | numeric | no | The suboption's partial price. | Yes |
Extra options suboption 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 extra option suboptions for any business.
- User type Business owner can create,update or remove only extra option suboptions related to his business