Update Member
Pending
PUT
https://api.mpc.dev.placewise.com/v3/{loyalty_club_slug}/members/me
API Permit:BL:Api:Members:OAuth:Update
API Context:Loyalty Club
Authorizations:TokenMember
null
.422
) even for current member properties.That's because loyalty club schema may get changed over time which results in invalidating existing users.
validate_partially: true
param which will validate and update onlyattributes that were provided in payload.
URL Parameters
Parameter | Description | Type |
---|---|---|
id | Member's ID | integer |
Body Parameters
Parameter | Description | Type | Default |
---|---|---|---|
properties | JSON with properties for member | JSON Object | null |
consents | Member's consents (similar to Member's consents JSON model) | JSON Object | null |
password | Member's password | string | null |
sms_enabled | Should SMS channel be enabled for member? | Boolean | null |
email_enabled | Should email channel be enabled for member? | Boolean | null |
push_enabled | Should push channel will be enabled for member? | Boolean | null |
validate_partially | Should only provided data be validated? | Boolean | false |
event_occurred_at | See: event_occurred_at param | Date | (current time) |
favorite_stores | IDs of member favorite stores. See Stores | integer[] | [] |
event_occurred_at
param
the actual update time.
Response Body
Error Responses
Status | Description |
---|---|
404 | Member could not be found |
422 | validation errors JSON object. |
Example
{
"id": 42,
"properties": {
"first_name": "Ola",
"last_name": "Nordmann",
"birthday": "1990-10-23",
"interests": [
"bikes_and_cars",
"sportwear"
],
"child_birth_years": [
2010,
2011,
2011
],
"language": "no"
},
"consents": {
"consent1": { "status": true, "updated_at": "2018-12-14T21:57:20.063Z" },
"consent2": { "status": false, "updated_at": "2018-10-25T21:57:43.738Z" }
},
"sms_status": "enabled",
"email_status": "hard_bounced",
"push_status": "disabled",
"optin_channel": "webforms",
"optin_subchannel": "campaign-10-2017",
"created_at": "2017-01-19T10:07:08.336+01:00",
"updated_at": "2017-04-03T09:35:19.313+02:00",
"banned_until": "2137-04-03T09:35:19.313+02:00",
"person_id": 99,
"has_password": false,
"subunit_ids": [1, 2],
"has_push_token": false,
"social_logins": [],
"favorite_stores": []
}
{
"email": [
{
"property": "email",
"error": "duplicated_email_in_community"
}
]
}
Request
Path Params
loyalty_club_slug
stringÂ
required
Example:
infinity-mall
Header Params
X-Loyalty-Club-Slug
stringÂ
required
Default:
{{LOYALTY_CLUB_SLUG}}
X-Client-Authorization
stringÂ
optional
Default:
{{API_TOKEN}}
Request samples
Responses
Modified at 2024-05-07 15:47:57