GET - Active Replacements

Get products that have a replacing product

URL

Verb Url
GET - Basic authentication /api/Replacement?ShopCode=shopcode&Take=take&Page=page

Request Parameters

Parameter Description Format
ShopCode Shop identifier as provided with your account string
Page Optional Parameter for paging, containing the page which is asked integer, default 0
Take Optional Parameter for paging, containing the number of items to return integer, default and maximum 500

Response Elements

Name Description
ProductIdentifier Identifier of the product (the old product)
Eancode Eancode of the product (the old product)
ReplacementProductIdentifier Identifier of the replacement product (the new product)
ReplacementEancode Eancode of the replacement product (the new product)
StartDate Startdate of the replacement. Can be null
EndDate Enddate of the replacement. Can be null
ProductSource Who has determined that this is a replacement.

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