Change Password
Changes the user's password without using the current password
- Type: stringx
-pch -digest requiredThe signature for the API call
- Type: stringContent
- Type requiredSet this header to application/json.
- Type: stringAcceptrequired
Advertises which content types the client is able to understand
- Type: stringUser
- Agent requiredFor details, see User Agent.
- Type: stringAuthorization
You may pass access_token instead of authentication_token in the Authorization header. It will be passed as a bearer token. If the reset_password_token parameter is included in the request body, an Authorization header is not needed.
- Type: stringclientrequired
Client key of the business
- Type: stringauthentication
_token The authentication token of the user. You can retrieve this from the response of a successful sign-in API call or through the SSO process.
- Type: stringreset
_password _token The user's reset password token. Required if the access_token is not passed via the Authorization header or the authentication_token parameter is not included in the request body. If the reset_password_token parameter is included in the request body, an Authorization header is not needed.
- Type: objectuser
- application/json
- 400
curl https://SERVER_NAME_GOES_HERE.punchh.com/api/auth/users/change_password \
--request PATCH \
--header 'x-pch-digest: SIGNATURE_GOES_HERE' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'User-Agent: Punchh/OnlineOrder/1.0/Web/BrowserVersion/OS_Type' \
--header 'Authorization: Bearer ACCESS_TOKEN_GOES_HERE' \
--data '{
"user": {
"password": "PASSWORD_GOES_HERE",
"password_confirmation": "PASSWORD_GOES_HERE"
},
"client": "CLIENT_GOES_HERE",
"authentication_token": "AUTHENTICATION_TOKEN_GOES_HERE"
}'
{
"address_line1": "ADDRESS_GOES_HERE",
"anniversary": "2013-07-13",
"avatar_remote_url": null,
"birthday": "1985-03-21",
"city": "Mountain View",
"created_at": "2016-03-15T06:33:42Z",
"email": "test@example.com",
"email_verified": false,
"fb_uid": null,
"first_name": "FIRST_NAME_GOES_HERE",
"gender": "male",
"id": 111111111,
"last_name": "LAST_NAME_GOES_HERE",
"state": "California",
"updated_at": "2016-03-15T11:57:44Z",
"zip_code": "94040",
"allow_multiple": false,
"authentication_token": "AUTHENTICATION_TOKEN_GOES_HERE",
"favourite_locations": "304988,304989,304991",
"marketing_email_subscription": true,
"marketing_pn_subscription": true,
"passcode_configured": false,
"preferred_menu_items": [],
"profile_field_answers": {},
"referral_code": "REFERRAL_CODE_GOES_HERE",
"referral_path": "URL_GOES_HERE",
"secondary_email": null,
"terms_and_conditions": false,
"title": "Mr.",
"user_as_barcode": "1111111",
"user_as_qrcode": "QR_CODE_GOES_HERE",
"user_id": 111111111,
"user_relations": [
{
"id": 774,
"name": "FIRST_NAME_GOES_HERE LAST_NAME_GOES_HERE",
"relation": "spouse",
"birthday": "1984-07-18"
}
],
"wants_menu_notifications": false,
"work_zip_code": null,
"mindbody_client_id": null,
"phone": null,
"migrate_status": false,
"email_unsubscribe": false,
"allow_push_notifications": true,
"facebook_signup": false,
"communicable_email": "test@example.com",
"access_token": null
}