Update Member
cURL
curl --request PUT \
--url https://vanilla-dev02-loyalty.fabric.zone/api/v1/members \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"profileId": "f90a1da5-c072-48b7-a9ea-eb35c5dd506b",
"firstName": "John",
"middleName": "M",
"lastName": "Williams",
"suffix": "<string>",
"gender": "Male",
"birthDate": "1980-11-30",
"emailAddress": "user@abc.com",
"phoneNumber": "923331234567",
"addressLine1": "10400 NE 4th St",
"addressLine2": "Suite 505",
"addressLine3": "null",
"city": "Bellevue",
"region": "Wisconsin",
"postalCode": "98004",
"country": "United States",
"maritalStatus": "Single",
"prefix": "Mr",
"redemptionChoice": "Auto",
"redemptionThreshold": "0.00",
"enrollmentStore": "www.demostore.come",
"enrollmentDate": "2021-01-15",
"lastPaidStatusCenter": "1201",
"lastPaidStatusDate": "2021-01-15",
"tierReference": "GOLD",
"tierExpirationDatetime": "2026-01-15T23:59:59.000Z",
"customAttributes": {
"joiningDate": "2021-07-26",
"confirmationDate": "2021-07-26"
}
}
'
Python Example
import requests
url = "https://vanilla-dev02-loyalty.fabric.zone/api/v1/members"
payload = {
"profileId": "f90a1da5-c072-48b7-a9ea-eb35c5dd506b",
"firstName": "John",
"middleName": "M",
"lastName": "Williams",
"suffix": "<string>",
"gender": "Male",
"birthDate": "1980-11-30",
"emailAddress": "user@abc.com",
"phoneNumber": "923331234567",
"addressLine1": "10400 NE 4th St",
"addressLine2": "Suite 505",
"addressLine3": "null",
"city": "Bellevue",
"region": "Wisconsin",
"postalCode": "98004",
"country": "United States",
"maritalStatus": "Single",
"prefix": "Mr",
"redemptionChoice": "Auto",
"redemptionThreshold": "0.00",
"enrollmentStore": "www.demostore.come",
"enrollmentDate": "2021-01-15",
"lastPaidStatusCenter": "1201",
"lastPaidStatusDate": "2021-01-15",
"tierReference": "GOLD",
"tierExpirationDatetime": "2026-01-15T23:59:59.000Z",
"customAttributes": {
"joiningDate": "2021-07-26",
"confirmationDate": "2021-07-26"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)
JavaScript Example (Fetch)
const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
profileId: 'f90a1da5-c072-48b7-a9ea-eb35c5dd506b',
firstName: 'John',
middleName: 'M',
lastName: 'Williams',
suffix: '<string>',
gender: 'Male',
birthDate: '1980-11-30',
emailAddress: 'user@abc.com',
phoneNumber: '923331234567',
addressLine1: '10400 NE 4th St',
addressLine2: 'Suite 505',
addressLine3: 'null',
city: 'Bellevue',
region: 'Wisconsin',
postalCode: '98004',
country: 'United States',
maritalStatus: 'Single',
prefix: 'Mr',
redemptionChoice: 'Auto',
redemptionThreshold: '0.00',
enrollmentStore: 'www.demostore.come',
enrollmentDate: '2021-01-15',
lastPaidStatusCenter: '1201',
lastPaidStatusDate: '2021-01-15',
tierReference: 'GOLD',
tierExpirationDatetime: '2026-01-15T23:59:59.000Z',
customAttributes: {joiningDate: '2021-07-26', confirmationDate: '2021-07-26'}
})
};
fetch('https://vanilla-dev02-loyalty.fabric.zone/api/v1/members', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
Example Response
Success Response (200)
{
"message": "Member updated",
"errors": {
"ExceptionString": []
},
"data": {
"accounts": [
{
"accountStatus": "Enabled",
"clubReference": "abc_club",
"clubTitle": "ABC Club",
"customAttributes": {
"memberSinceDate": "2021-07-26",
"enrolledAtCenter": "Liberty Store",
"profileCompleted": false
},
"enrollmentEntity": "demo",
"enrollmentStatus": true,
"entityReference": "entity_level_1",
"loyaltyNumber": "10000147371",
"paidStatus": false,
"profileId": "f90a1da5-c072-48b7-a9ea-eb35c5dd506b",
"redemptionChoice": "Auto",
"redemptionThreshold": 10,
"tierExpiryDate": "2022-09-17T14:26:32.192148+00:00",
"tierExternalReference": "GLD",
"tierId": 4185,
"tierTitle": "ClubTier",
"updatedAt": "2021-11-01 12:15:53.831401+00:00"
}
],
"addressLine1": "10400 NE 4th St",
"addressLine2": "Suite 505",
"addressLine3": "",
"birthdate": "1990-11-16",
"channelExternalReference": "Web",
"city": "Austin",
"country": "US",
"emailAddress": "user@abc.com",
"enrollReasonCode": "1234",
"enrollReasonNote": "Guest",
"enrollmentTimestamp": "2021-09-14T11:32:55.508949Z",
"firstName": "John",
"fullCountry": "United States",
"fullRegion": "Texas",
"gender": "Male",
"lastName": "Wayne",
"middleName": "Duke",
"nationality": "",
"phoneNumber": "923331234567",
"postalCode": "98004",
"prefix": "Mr",
"region": "TX",
"sourceExternalReference": "www.abcdemo.com",
"suffix": "<string>"
},
"status": 200
}
Error Response (400)
{
"message": "Error message string",
"errors": {
"ExceptionString": [
"Invalid Field"
]
},
"data": null,
"status": 400
}
Authentication Error (401)
{
"detail": "Authentication Failed"
}