Change Password

Changes the user's password without using the current password

Headers
  • x-pch-digest
    Type: string
    required

    The signature for the API call

  • Content-Type
    Type: string
    required

    Set this header to application/json.

  • Accept
    Type: string
    required

    Advertises which content types the client is able to understand

  • User-Agent
    Type: string
    required

    For details, see User Agent.

  • Authorization
    Type: string

    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.

Body
application/json
  • client
    Type: string
    required

    Client key of the business

  • authentication_token
    Type: string

    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.

  • reset_password_token
    Type: string

    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.

  • user
    Type: object
Responses
  • application/json
  • 400
Request Example for patch/api/auth/users/change_password
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
}