Update User Information
Updates details in the user profile, such as first name, last name, birthday, anniversary, or change password.
Note: Due to fraud protections, guests are permitted to update their birthdays only once. Subsequent attempts to modify the birthday parameter using the API will fail. In such a case, the API returns a 200 response, but the birthday is not updated.
- 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: stringAuthorizationrequired
You may pass the access_token instead of the authentication_token in Online Ordering endpoints to authorize the request. It must be supplied as
Bearer ACCESS_TOKEN_GOES_HERE.
- 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: object ·user
- application/json
- 401
- 412
Sending invalid Signature
- 422
Sending invalid Entity
curl https://SERVER_NAME_GOES_HERE.punchh.com/api/auth/users \
--request PUT \
--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 '{
"client": "CLIENT_ID_GOES_HERE",
"authentication_token": "AUTHENTICATION_TOKEN_GOES_HERE",
"user": {
"address_line1": "ADDRESS_GOES_HERE",
"anniversary": null,
"avatar_remote_url": "URL_GOES_HERE",
"birthday": "1993-01-01",
"city": "Columbus",
"email": "test@example.com",
"first_name": "FIRST_NAME_GOES_HERE",
"age_verified": true,
"privacy_policy": true,
"gender": "female",
"last_name": "LAST_NAME_GOES_HERE",
"state": "Ohio",
"zip_code": "43016",
"allow_multiple": true,
"favourite_locations": "",
"marketing_email_subscription": true,
"marketing_pn_subscription": true,
"profile_field_answers": {
"upf0": "Coffee|Tea|Lemonade",
"upf1": "Pasta|Pizza|Hamburger",
"upf2": "Movies|Music|Sports"
},
"secondary_email": "test@example.com",
"terms_and_conditions": true,
"title": "",
"user_relations": [
{
"relation": "spouse",
"name": "SPOUSE_NAME_GOES_HERE",
"birthday": "1999-01-01"
}
],
"work_zip_code": "",
"preferred_locale": "",
"sms_subscription": true,
"phone": "1111111111",
"unsubscribed": true,
"allow_push_notifications": true,
"apn_token": "APN_TOKEN_GOES_HERE",
"gcm_token": "GCM_TOKEN_GOES_HERE",
"age_verified_status": true
}
}'
{
"address_line1": "ADDRESS_GOES_HERE",
"anniversary": null,
"avatar_remote_url": null,
"birthday": null,
"city": "",
"created_at": "2016-10-10T07:19:19Z",
"email": "test@example.com",
"email_verified": false,
"fb_uid": "",
"first_name": "FIRST_NAME_GOES_HERE",
"gender": "",
"id": 111111111,
"last_name": "LAST_NAME_GOES_HERE",
"state": "",
"updated_at": "2017-10-11T16:03:19Z",
"zip_code": "25110",
"allow_multiple": true,
"authentication_token": "AUTHENTICATION_TOKEN_GOES_HERE",
"favourite_locations": "308052",
"favourite_store_numbers": "2310",
"marketing_email_subscription": true,
"marketing_pn_subscription": true,
"passcode_configured": false,
"profile_field_answers": {
"profile_question_key": "Answer"
},
"referral_code": "REFERRAL_CODE_GOES_HERE",
"referral_path": "URL_GOES_HERE",
"secondary_email": "",
"terms_and_conditions": false,
"title": "",
"user_as_barcode": "1111111",
"user_as_qrcode": "QR_CODE_GOES_HERE",
"user_code": "P11111111",
"user_id": 111111111,
"user_relations": [],
"wants_menu_notifications": false,
"work_zip_code": null,
"mindbody_client_id": null,
"preferred_locale": "en",
"phone": "",
"migrate_status": false,
"email_unsubscribe": false,
"allow_push_notifications": true,
"facebook_signup": false,
"communicable_email": "test@example.com",
"access_token": null,
"expiration_date": "2018-07-31",
"age_verified_status": true
}