| Action | Method | Resource | Description |
|---|---|---|---|
| Get all | GET | /business/:business_id/extras/:extra_id/options | Get all options with business_id and extra_id. |
| Get | GET | /business/:business_id/extras/:extra_id/options/:option_id | Get option with id business_id, extra_id and option_id. |
| Create | POST | /business/:business_id/extras/:extra_id/options | Create option with business_id and extra_id. |
| Update | PUT | /business/:business_id/extras/:extra_id/options/:option_id | Update option with business_id, extra_id and option_id. |
| Delete | DELETE | /business/:business_id/extras/:extra_id/options/:option_id | Delete option with business_id, extra_id and option_id. |
The extra option (product option) model is composed of the following attributes:
| Attribute | Type | Required | Description | whereable |
|---|---|---|---|---|
| name | string | no, required to create. | The option's name. | Yes |
| conditioned | boolean | no, required to create. | If is option that is related to a conditional. | Yes |
| respect_to | integer | no | The option's relation to a condition. | No |
| min | integer | no | The option's minimum required selection. | Yes |
| max | integer | no | The option's maximum required selection. | Yes |
| rank | integer | only to update. | The option's order. | Yes |
| with_half_option | boolean | no | The option's enable/disable the middle price for sub options. if disable, suboptions takes the whole prices | No |
| "allow_suboption_quantity | boolean | no | The option's enable/disable the amount of sub-options added. If this is not active the APIs will only receive 1 so that the amount sent is different. | No |
| enabled | boolean | no | The option's enabled | no |
Restrictions for POST, PUT, DELETE extra options.Extra options 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 for any business.
- User type Business owner can create, update or remove only extra options related to his business.

