Introduction
This knowledge base article provides an overview about how to consume the iVend Retail Web API using REST Call.
Purpose
The key purpose to use REST Call is to make the iVend Retail APIs platform independent, language independent, and run services on HTTPS.
Consuming the iVend Retail Web API using REST Call
With WebHttpBinding endpoint, iVend Retail API is exposed through HTTP requests which can be accessible simply by URL.
The following steps provide an explanation for consuming the iVend Retail API using REST Call with authentication:
1. Define the REST Service URL.
//Declare Rest service URL
1. Create an HTTPWebRequest object with the provided REST service URL.
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(URL);
1. Provide the method type and content type to the request.
1. Pass the header value(s) to the request.
1. Initiate the request and get the response.
1. Check the StatusCode from WebResponse.
Refer to the following screen image of sample code for further guidance.