GET - Related Products For Eancode
Get products that are related to each other for an Eancode
URL
Verb |
Url |
GET - Basic authentication |
/api/RelatedProducts/GetRelatedProductsForEancode?ShopCode=shopcode&Eancode=eancode |
Request Parameters
Parameter |
Description |
Format |
ShopCode |
Shop identifier as provided with your account |
string |
Eancode |
Ean13 code of the product |
string |
Response Elements
[
{
"Description": "Description of the Relation / Main product",
"Bron":
{
"Id": "1", /* Id of the Bron */
"Name": "LuxeNL", /* Name of the Bron */
"Number": "LU0000001" /* Number of the Bron */
},
"Products": /* Products that are related to each other */
[
{
"Identifier": "LX_NL_123",
"Eancode": "8713059008003"
}
]
}
]
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();
}
}
}