Asynchronous User Update
Updates the details of a user asynchronously.
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.
Headers
- Type: stringx
-pch -digest requiredThe signature for the API call
- Type: stringAcceptrequired
Advertises which content types the client is able to understand
- Type: stringContent
- Type requiredSet this header to application/json.
- Type: stringUser
- Agent requiredUsed to identify the software, device, and application initiating the request, providing information about the client to the server. For details, see User Agent.
- Type: stringAuthorizationrequired
Used to authorize the request with access_token. It should be supplied as
Bearer ACCESS_TOKEN_GOES_HERE.
Body
application/json
- Type: stringclientrequired
OAuth client ID provided by the business
- Properties: 19Type: objectuser
Responses
- application/json
Request Example for patch/api2/mobile/async_users
curl https://SERVER_NAME_GOES_HERE.punchh.com/api2/mobile/async_users \
--request PATCH \
--header 'x-pch-digest: {{$$.env.signature}}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'User-Agent: AppName/AppVersion/BuildNumber (OS; Model; MANUFACTURER; MODEL; OS Version)' \
--header 'Authorization: Bearer ACCESS_TOKEN_GOES_HERE' \
--data '{
"client": "CLIENT_GOES_HERE",
"user": {
"first_name": "FIRST_NAME_GOES_HERE",
"last_name": "LAST_NAME_GOES_HERE",
"avatar_remote_url": "URL_GOES_HERE",
"email": "test@example.com",
"current_password": "PASSWORD_GOES_HERE",
"password": "PASSWORD_GOES_HERE",
"password_confirmation": "PASSWORD_GOES_HERE",
"apn_token": "APN_TOKEN_GOES_HERE",
"gcm_token": "GCM_TOKEN_GOES_HERE",
"birthday": "",
"favourite_location_ids": "304155",
"secondary_email": "test@example.com",
"anniversary": "",
"zip_code": "70001",
"address": "ADDRESS_GOES_HERE",
"state": "Ohio",
"phone": "1111111111",
"gender": "male",
"profile_field_answers": {
"upf0": "Coffee|Tea|Lemonade",
"upf1": "Pasta|Pizza|Hamburger",
"upf2": "Movies|Music|Sports"
}
}
}'
null