const url = 'https://api.sureshake.com/v2/entities/<id>/settings';
const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
periodType: 'weekly',
defaultPeriodLength: 0,
autoCreatePeriods: true,
periodNamingTemplate: 'string',
templateId: '196100ac-4eec-4fb6-a7f7-86c8b584771d',
periodsInAdvance: 0,
reminderDays: 0
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));