Current Loyalty session token, represents a 'signed-in' member
Vista Digital Platform (V1)
Request
Full personalDetails object from GetMember containing updated values must be sent to this endpoint. If field is not provided then it's considered that it must be cleared.
Note: currently Vista Loyalty doesn't support clearing fields. Also enum fields don't support setting value 0 where it is equivalent of clearing field (e.g. NotSpecified)
- Vista.Ocapi
- application/json
- text/json
- application/*+json
- application/json-patch+json
Member personal details to update
Gets the name
Gets the contact details
Gets the list of phone number entities
Gets the list of member interest subscription entities
Gets the preferences
Gets the site preferences
Gets the unique identifier of the loyalty site used for pickup orders
Gets the unique identifier of the primary loyalty site
Gets the genre preferences
Gets the contact preferences
Gets the list of preferred member contact method entities
Gets the mailer frequency
Gets the list of member custom preference entities
Gets the unique identifier of the custom preference
Gets the marital status
Gets the number of people living in the household, if known
- Mock serverhttps://developer.vista.co/_mock/openapi/digital-platform/openapi/ocapi/v1/members/current/personal-details
- cURL
- JavaScript
- Node.js
- application/json
- text/json
- application/*+json
- application/json-patch+json
curl -i -X PUT \
https://developer.vista.co/_mock/openapi/digital-platform/openapi/ocapi/v1/members/current/personal-details \
-H 'Connect-Region-Code: string' \
-H 'Content-Type: application/json' \
-H 'loyaltySessionToken: string' \
-d '{
"name": {
"givenName": "string",
"familyName": "string",
"middleName": "string"
},
"contactDetails": {
"phoneNumbers": [
{
"type": "Home",
"number": "string"
}
],
"address": {
"line1": "60 Khyber Pass Road",
"suburb": "Grafton",
"city": "Auckland",
"state": null,
"postCode": "1023",
"country": "New Zealand"
},
"pushNotificationToken": {
"id": "string",
"type": "Android"
}
},
"interestSubscriptions": [
{
"interestId": 0,
"interestContactMethodIds": [
0
]
}
],
"preferences": {
"sites": {
"pickupSiteId": "string",
"primarySiteId": "string",
"preferredSiteIds": [
"string"
]
},
"genres": {
"preferredGenreIds": [
"string"
]
},
"contact": {
"contactMethods": [
"Sms"
],
"mailerFrequency": "Never",
"allowThirdPartyContact": true
},
"customPreferences": [
{
"customPreferenceId": 0,
"customPreferenceOptionIds": [
0
]
}
],
"languageTag": "en-US",
"allowThirdPartyProfiling": true
},
"birthDate": "2019-08-24T14:15:22Z",
"maritalStatus": "NotSpecified",
"gender": "NotSpecified",
"educationLevelId": 0,
"occupationId": 0,
"householdPersonCount": 0,
"nationalId": "string",
"externalId": "string"
}'Request
The photo is uploaded via a form-data key/value pair with type file and the key being "MemberPhoto".
The Photo file should be uploaded using the HTTP request body type form-data set to File, with a Key of MemberPhoto and Value of the photo file to be uploaded.
Supported photo file formats are: JPEG, BMP, PNG, HEIC, WebP. File size limit and photo dimensions are configured in Loyalty. The file size limit specifies and upper-bound on file size, while photo dimensions are an exact requirement.
An HTTP Bad Request is returned in the following cases:
- No Loyalty member is currently logged in.
- No photo is uploaded.
- Based on Loyalty configuration, the Loyalty member isn't eligible to update their photo
- The photo file size is too large.
- The photo dimensions don't match the dimensions configured in Loyalty.
- The photo format isn't accepted.
An HTTP Bad Gateway is returned if the connection to Loyalty times out.
- Vista.Ocapi
- Vista.Loyalty.MemberPhotos
- Mock serverhttps://developer.vista.co/_mock/openapi/digital-platform/openapi/ocapi/v1/members/current/photo
- cURL
- JavaScript
- Node.js
curl -i -X PUT \
https://developer.vista.co/_mock/openapi/digital-platform/openapi/ocapi/v1/members/current/photo \
-H 'Connect-Region-Code: string' \
-H 'Content-Type: multipart/form-data' \
-H 'loyaltySessionToken: string' \
-F ContentType=string \
-F ContentDisposition=string \
-F 'Headers[property1]=string' \
-F 'Headers[property2]=string' \
-F Length=0 \
-F Name=string \
-F FileName=string{ "memberPhoto": { "isUpdatable": true, "canBeUpdatedAt": "2019-08-24T14:15:22Z", "uriExpiresAt": "2019-08-24T14:15:22Z", "uri": "http://example.com" } }
- application/json
- text/json
- application/*+json
- application/json-patch+json
Details to validate email availability
- Mock serverhttps://developer.vista.co/_mock/openapi/digital-platform/openapi/ocapi/v1/members/email-availability
- cURL
- JavaScript
- Node.js
- application/json
- text/json
- application/*+json
- application/json-patch+json
curl -i -X POST \
https://developer.vista.co/_mock/openapi/digital-platform/openapi/ocapi/v1/members/email-availability \
-H 'Connect-Region-Code: string' \
-H 'Content-Type: application/json' \
-d '{
"email": "string"
}'{ "isAvailable": true }