GET - Customer

Get customer information based on given parameters

URL

Verb Url
GET - Basic authentication /api/apiCustomer/GetCustomers?ShopCode=shop code&Surname=surname&Insertion=insertion&Name=name&Email=email&BirthDate=birthdate&CustomerNumber=customer number& Street=street>&Postalcode=postalcode&Housenumber=housenumber&HousenumberExtension=housenumberextension&City=city&LoyaltyCardNumber=loyaltycardnumber

Request Parameters

At least one of the optional parameters need to be provided

Parameter Description Format
ShopCode Shop identifier as provided with your account string
Surname Last name of the customer Optional string
Insertion Insertion between first and last name Optional string
Name First name of the customer Optional string
Email Email address of the customer Optional string
BirthDate Birth date of the customer Optional string in date format "yyyy-MM-dd"
CustomerNumber Unique customer number within RetailNxt Optional string
Street Street of the residence of the customer Optional string
Postalcode Postalcode of the residence of the customer. System will conduct a OR search on postcodes with an without spaces (1234AB or 1234 AB). Only provide one postalcode Optional string
Housenumber Housenumber of the residence of the customer. Optional string
HousenumberExtension Housenumber extension of the residence of the customer. Optional string
City City extension of the residence of the customer. Optional string
LoyaltyCardNumber Cardnumber of the customer. Optional 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 */
        }
        ]
        }

        ,
        { ... (next customer) ... }
        ]
    

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();
                }
            }
        }