@eminentcoder wrote:
Hi All,
Tax Authorities in Pakistan have asked all the restaurants to integrate their softwares with Restaurant Invoice Monitoring System (RIMS). And provided sample codes for different languages like C#, Java, JavaScript, Php etc.It is basically a REST API where our software needs to send details of every sale.
The Documentation Link is : http://rims.punjab.gov.pk/Documentation/index.html
The C# code sample is give below:
string URI = "http://rims.punjab.gov.pk/api/databaseupdate/formdata";
string myParameters = "key="+ lbl_key.Text +"&data={\"pntn\":\"25251490\",\"branchcode\":\"BR25251490496\",\"invoice_number\":\"431-01\",\"invoice_date\": \"2015-08-04\",\"invoice_time\": \"02:41\",\"discount_percent\": \"2\",\"service_charges_percent\": \"5\",\"tax_percent\":\"16\",\"table_no\": \"1\",\"phone\": \"042456456\",\"customer_name\":\"Sani\",\"detail\":[{\"item_code\":\"34\",\"item\":\"Piza\", \"quantity\":\"1\",\"unit_price\":\"725\"}]}";
using (WebClient wc = new WebClient())
{
wc.Headers[HttpRequestHeader.ContentType] = "application/x-www-form-urlencoded";
string HtmlResult = wc.UploadString(URI, myParameters);
txt_postData.Text = HtmlResult;
}Similarly javascript sample code is also provided.
Is it possible to integrate SambaPos5 with such an API. If so then please guide me to some tutorials or other similar stuff to get started.
Posts: 3
Participants: 2