Retrieve the loyalty member information associated with the session.
curl --request GET \
--url https://{apiBaseUrl}/v2/{sessionId}/loyalty/memberconst url = 'https://{apiBaseUrl}/v2/{sessionId}/loyalty/member';
const options = {method: 'GET'};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "https://{apiBaseUrl}/v2/{sessionId}/loyalty/member"
response = requests.get(url)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{apiBaseUrl}/v2/{sessionId}/loyalty/member",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}using RestSharp;
var options = new RestClientOptions("https://{apiBaseUrl}/v2/{sessionId}/loyalty/member");
var client = new RestClient(options);
var request = new RestRequest("");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.get("https://{apiBaseUrl}/v2/{sessionId}/loyalty/member")
.asString();{
"memberId": "123",
"title": "Mr.",
"firstName": "John",
"lastName": "Doe",
"address": {
"addressLines": [
"66 rue des Archives"
],
"postalCode": "75001",
"cityName": "Paris",
"countryCode": "FR"
},
"emailAddress": "j.doe@loyalty.com",
"phone": {
"number": "060606060606",
"phoneCode": 33,
"countryCode": "FR",
"internationalNumber": "003360606060606"
},
"level": "Platinum",
"levelNumber": 3,
"points": 1500
}{
"code": "InvalidSessionId"
}{
"code": "LoyaltyProviderTokenExpired",
"message": "The loyalty provider token has expired"
}{
"code": "LoyaltyProviderGenericError",
"message": "An error occured while calling the loyalty provider"
}{
"code": "LoyaltyProviderGenericError",
"message": "An error occured while calling the loyalty provider"
}{
"code": "LoyaltyProviderGenericError",
"message": "An error occured while calling the loyalty provider"
}Loyalty
Retrieve the loyalty member information
Retrieve the loyalty member information associated with the session
GET
/
v2
/
{sessionId}
/
loyalty
/
member
Retrieve the loyalty member information associated with the session.
curl --request GET \
--url https://{apiBaseUrl}/v2/{sessionId}/loyalty/memberconst url = 'https://{apiBaseUrl}/v2/{sessionId}/loyalty/member';
const options = {method: 'GET'};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "https://{apiBaseUrl}/v2/{sessionId}/loyalty/member"
response = requests.get(url)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{apiBaseUrl}/v2/{sessionId}/loyalty/member",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}using RestSharp;
var options = new RestClientOptions("https://{apiBaseUrl}/v2/{sessionId}/loyalty/member");
var client = new RestClient(options);
var request = new RestRequest("");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.get("https://{apiBaseUrl}/v2/{sessionId}/loyalty/member")
.asString();{
"memberId": "123",
"title": "Mr.",
"firstName": "John",
"lastName": "Doe",
"address": {
"addressLines": [
"66 rue des Archives"
],
"postalCode": "75001",
"cityName": "Paris",
"countryCode": "FR"
},
"emailAddress": "j.doe@loyalty.com",
"phone": {
"number": "060606060606",
"phoneCode": 33,
"countryCode": "FR",
"internationalNumber": "003360606060606"
},
"level": "Platinum",
"levelNumber": 3,
"points": 1500
}{
"code": "InvalidSessionId"
}{
"code": "LoyaltyProviderTokenExpired",
"message": "The loyalty provider token has expired"
}{
"code": "LoyaltyProviderGenericError",
"message": "An error occured while calling the loyalty provider"
}{
"code": "LoyaltyProviderGenericError",
"message": "An error occured while calling the loyalty provider"
}{
"code": "LoyaltyProviderGenericError",
"message": "An error occured while calling the loyalty provider"
}Headers
Path Parameters
Response
Returns the loyalty member profile
Was this page helpful?