const url = 'https://api.sureshake.com/v2/entities/<id>/periods';
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'string',
startDate: '2019-08-24T14:15:22Z',
endDate: '2019-08-24T14:15:22Z',
periodType: 'string'
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));