Change password
PATCH
/api/website/customers/password
const url = 'https://api.petanqueai.com/api/website/customers/password';const options = { method: 'PATCH', headers: { 'x-storefront-token': '<x-storefront-token>', 'x-customer-session': '<x-customer-session>', 'Content-Type': 'application/json' }, body: '{"currentPassword":"example","password":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.petanqueai.com/api/website/customers/password \ --header 'Content-Type: application/json' \ --header 'x-customer-session: <x-customer-session>' \ --header 'x-storefront-token: <x-storefront-token>' \ --data '{ "currentPassword": "example", "password": "example" }'Changes the signed-in shopper’s password. Needs x-customer-session and the current password; a wrong current password answers 401. Every other session of the shopper is signed out, the current one stays. Answers 204.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
currentPassword
required
string
password
required
string
Example generated
{ "currentPassword": "example", "password": "example"}object
currentPassword
required
string
password
required
string
Example generated
currentPassword=example&password=exampleobject
currentPassword
required
string
password
required
string