Item/PLU Get Item/PLU list by passing required parameter.
Key | Value |
---|---|
URL | https://api.ovvihq.com/Inventory |
APIKey | Provided by OVVI |
- public string GetInventory()
- {
- get
- {
- string strResult = string.Empty;
- try
- {
- HttpWebRequest request = (HttpWebRequest)WebRequest.Create("https://api.ovvihq.com/Inventory");
- request.ContentType = "application/json";
- request.Method = "GET";
- request.Headers.Add("APIKey", "Provided by OVVI");
- // Set some reasonable limits on resources used by this request
- request.ContentLength = 0;
- // Set credentials to use for this request.
- request.Credentials = CredentialCache.DefaultCredentials;
- HttpWebResponse response = (HttpWebResponse)request.GetResponse();
- // Get the stream associated with the response.
- Stream receiveStream = response.GetResponseStream();
- // Pipes the stream to a higher level stream reader with the required encoding format.
- StreamReader readStream = new StreamReader(receiveStream, Encoding.UTF8);
- strResult = readStream.ReadToEnd().ToString();
- response.Close();
- readStream.Close();
- return strResult;
- }
- catch (Exception ex)
- {
- strResult = Convert.ToString(ex.Message);
- return strResult;
- }
- }
- }
Key | Data Type | Description |
---|---|---|
ItemNumber | nvarchar(20) | Item Number/Id. |
ItemName | nvarchar(100) | Item Name. |