GET - Customer
Get customer information based on the internal Identifier
URL
Verb |
Url |
GET - Basic authentication |
/api/apiCustomer/GetCustomerByIdentifier?ShopCode=shop code&Identifier=identifier |
Request Parameters
Parameter |
Description |
Format |
ShopCode |
Shop identifier as provided with your account |
string |
Identifier |
Internal Identifier of the customer |
string |
Response Elements
{
"Identifier":"RTN_LOY_123",
"CustomerNumber": 123, /* Used for Identification in POST / PUT / DELETE */
"Surname":"Lastname", /* Used for Identification in POST / PUT / DELETE */
"Insertion":"Between Initials and Lastname",
"Initials":"Initials",
"Name": "Firstname",
"PhoneNumber":"0123-456789",
"DateOfBirth":"yyyy-MM-dd",
"MobileNumber":"06-12345678",
"Email":"someone@somewhere.com", /* Used for Identification in POST / PUT / DELETE */
"Gender": "M",
"Newsletter": true, /* Customer wants to recieve the Newsletter */
"Advertisement": true, /* Customer wants to recieve Advertising */
"IsDebtor": true, /* Is the customer known as a Debtor in RetailNxt. This property cannot be saved to RetailNxt from the API */
"Branch":
{
"Identifier": "FL_NL_1",
"StoreEanAddresscode": "1234567890123",
"MainStoreEanAddresscode": "3210987654321",
"Name": "ShopName",
"Description": "Fullname of Shop",
"Active": true,
"StoreFormat": "Formula",
"Addresses":
[
{
"Street":"streetname",
"Housenumber": 1,
"HouseNumberExtension":"a",
"Residence":"City",
"ZipCode":"1234AA",
"Country":"NL",
"Type":"address type" /* Default Postadres */
}
]
},
"Addresses":
[
{
"Street":"streetname",
"Housenumber": 1,
"HouseNumberExtension":"a",
"Residence":"City",
"ZipCode":"1234AA",
"Country":"NL",
"Type":"address type" /* Default Postadres */
}
],
"LoyaltyCards":
[
{
"Identifier": 123, /* Internal identifier of the Card */
"LoyaltyCardNumber": "9875461230879",
"LoyaltyPoints": 100, /* Total points saved */
"RewardedLoyaltyPoints": 10, /* Total points rewarded */
"RemainingAmount": 0.50, /* Amount below 1 point saved */
"LoyaltyCardRowId": 123, /* Internal identifier of the Card */
"RemainingLoyaltyPoints": 90 /* LoyaltyPoints - RewardedLoyaltyPoints */
}
]
}
Code Samples
C#.net
public string RequestUrlGET(string URL, string SourceUser, string SourcePassword)
{
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(URL);
string credentials = Convert.ToBase64String(ASCIIEncoding.ASCII.GetBytes(SourceUser + ":" + SourcePassword));
request.Headers.Add("Authorization", "Basic " + credentials);
using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
{
using (StreamReader content = new StreamReader(response.GetResponseStream()))
{
return content.ReadToEnd();
}
}
}