E-commerce API
POST /services/webshop/v1/customer/password/change Auth

Change password

Changes the authenticated customer's password. Requires the current password as confirmation. All existing tokens (on this and every other device) are revoked and a fresh token is returned for this session — the client must swap it into storage and headers to stay logged in.

Request Body Required

FieldTypeRequiredDescriptionExample
current_password string
max: 191
Yes current-correct-horse-battery-staple
password string
max: 191
Yes new-correct-horse-battery-staple
password_confirmation string
max: 191
Yes

Responses

200
422
401
429
Password changed. Fresh token returned — client must swap it in.
Headers
HeaderTypeDescriptionExample
X-RateLimit-Limit integer Maximum number of requests allowed per minute 60
X-RateLimit-Remaining integer Number of requests remaining in the current window 57
FieldTypeDescription
error boolean
message string
data object
data.token string
Current password incorrect or validation failed
Headers
HeaderTypeDescriptionExample
X-RateLimit-Limit integer Maximum number of requests allowed per minute 60
X-RateLimit-Remaining integer Number of requests remaining in the current window 57
FieldTypeDescription
error boolean
message string
errors object
errors.current_password array
Unauthenticated — missing or invalid Bearer token
Headers
HeaderTypeDescriptionExample
X-RateLimit-Limit integer Maximum number of requests allowed per minute 60
X-RateLimit-Remaining integer Number of requests remaining in the current window 57
FieldTypeDescription
error boolean
message string
Too Many Requests — rate limit exceeded
Headers
HeaderTypeDescriptionExample
X-RateLimit-Limit integer Maximum number of requests allowed per minute 60
X-RateLimit-Remaining integer Number of requests remaining in the current window 57
Retry-After integer Seconds until the rate limit resets 60
FieldTypeDescription
error boolean
message string
Base URL
https://api.wemasy.nl/api
Authentication

Request Sample
cURL
JS
PHP
Python
curl -X POST "https://api.wemasy.nl/api/services/webshop/v1/customer/password/change" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "current_password": "current-correct-horse-battery-staple",
    "password": "new-correct-horse-battery-staple",
    "password_confirmation": "string"
}'
fetch('https://api.wemasy.nl/api/services/webshop/v1/customer/password/change', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Accept': 'application/json',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "current_password": "current-correct-horse-battery-staple",
    "password": "new-correct-horse-battery-staple",
    "password_confirmation": "string"
})})
.then(r => r.json())
.then(data => console.log(data));
$response = Http::withToken('YOUR_API_TOKEN')
    ->accept('application/json')
    ->post('https://api.wemasy.nl/api/services/webshop/v1/customer/password/change', {
    "current_password": "current-correct-horse-battery-staple",
    "password": "new-correct-horse-battery-staple",
    "password_confirmation": "string"
});
$data = $response->json();
import requests

headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Accept": "application/json"
}
data = {
    "current_password": "current-correct-horse-battery-staple",
    "password": "new-correct-horse-battery-staple",
    "password_confirmation": "string"
}
r = requests.post("https://api.wemasy.nl/api/services/webshop/v1/customer/password/change", headers=headers, json=data)
print(r.json())
Response Example
{
    "token": "5292|newFreshTokenValue...",
    "message": "Password changed. Other devices have been signed out."
}

Try It
Request Body Required

Export