Şifreyi değiştir
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" }'Giriş yapmış müşterinin şifresini değiştirir. x-customer-session ve mevcut şifre gerekir; yanlış mevcut şifre 401 alır. Müşterinin diğer tüm oturumları kapatılır, mevcut oturum açık kalır. 204 döner.
Yetkilendirmeler
Bölüm başlığı “Authorizations”İstek gövdesizorunlu
Bölüm başlığı “Request Bodyrequired”object
currentPassword
zorunlu
string
password
zorunlu
string
Example generated
{ "currentPassword": "example", "password": "example"}object
currentPassword
zorunlu
string
password
zorunlu
string
Example generated
currentPassword=example&password=exampleobject
currentPassword
zorunlu
string
password
zorunlu
string