const request = require('request');
const options = {
method: 'PATCH',
url: 'https://api.betterez.com/accounts/customers/%7B%7BcustomerId%7D%7D',
headers: {'content-type': 'application/json', 'x-api-key': '{{x-api-key}}'},
body: {
operations: [
{
op: 'reset',
path: '/resetPassword',
value: '{{token}}',
data: {password: '{{new_password}}'}
}
]
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});