const url = 'https://api.sureshake.com/v2/entities/<entityId>/vouches';
const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
voucherEntityId: '687a822d-209a-4607-9d86-54cce0292c95',
scope: 'general',
confidence: 3,
evidenceHash: 'string',
evidenceCid: 'string',
comment: 'string',
expiresAt: '2019-08-24T14:15:22Z'
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));