const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Dipping sauces',
options: [
{
name: 'Ranch',
price: {amount: 249, currency: 'USD'},
external_id: '<string>',
default_selected: false,
available: true
}
],
min_selections: 0,
max_selections: 4,
free_selections: 0,
item_external_ids: ['<string>']
})
};
fetch('https://api.lulacommerce.com/v1/modifier-groups/{modifier_group_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));