GET - Order advice by Eancode
Get Order advice for the product based on Eancode
URL
Verb |
Url |
GET - Basic authentication |
/api/Advice?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
ShopCode |
Shop identifier as provided with your account |
string |
Eancode |
Ean13 code of the product |
string |
ArtikelIdentifier |
Identifier of the product |
string |
AdviceConsumerUnits |
The Quantity that should be ordered of the product. In conusumer units |
string |
AdvicePackages |
The number of packages that should be ordered of the product. |
string |
PackageType |
The default package type in which the products will be ordered |
string |
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();
}
}
}