Order Type Get Order Types by passing required parameter.
Key | Value |
---|---|
URL | https://api.ovvihq.com/OnlineOrder/OrderTypes |
APIKey | Provided by OVVI |
- public string GetOrderType()
- {
- get
- {
- string strResult = string.Empty;
- try
- {
- HttpWebRequest request = (HttpWebRequest)WebRequest.Create("https://api.ovvihq.com/OnlineOrder/OrderTypes");
- 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;
- }
- }
- }
- <OrderTypeOptions>
- <OrderType>
- <Name> Take Out </Name>
- <Id> 1 </Id>
- </OrderType>
- <OrderType>
- <Name> Delivery </Name>
- <Id> 2 </Id>
- </OrderType>
- <OrderTypeOptions>
Xml Node | Description |
---|---|
OrderType | |
Name | Name of the Order type. Take out or Delivery. |
ID | Order Type Id. |