AOTG API: Get List of AR Invoice: Difference between revisions

no edit summary
No edit summary
 
Line 206:
{{AOTGResponseStatus|"f5175ac-8d11-4593-96ce-ccd36085d0d1"}}
 
<br/>
 
<br/>
==Get data (result)==
===Code Snippets===
Line 213:
|Python=
<syntaxhighlight lang="Python">
import requests
 
url = "http://aotg.cloud:8080/api/public/v1/Result/GetARInvoiceList/f5175ac-8d11-4593-96ce-ccd36085d0d1/result"
 
payload = ""
headers = {
'SOTC_AUTH': "SAMs1a36d2-a139-e911-b8b3-000aa03t3d",
'cache-control': "no-cache"
}
 
response = requests.request("GET", url, data=payload, headers=headers)
 
print(response.text)
</syntaxhighlight>
|PHPHttp=
<syntaxhighlight lang="PHP">
<?php
 
$request = new HttpRequest();
$request->setUrl('http://aotg.cloud:8080/api/public/v1/Result/GetARInvoiceList/f5175ac-8d11-4593-96ce-ccd36085d0d1/result');
$request->setMethod(HTTP_METH_GET);
 
$request->setHeaders(array(
'cache-control' => 'no-cache',
'SOTC_AUTH' => 'SAMs1a36d2-a139-e911-b8b3-000aa03t3d'
));
 
try {
$response = $request->send();
 
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
</syntaxhighlight>
|RestSharp=
<syntaxhighlight lang="C#">
var client = new RestClient("http://aotg.cloud:8080/api/public/v1/Result/GetARInvoiceList/f5175ac-8d11-4593-96ce-ccd36085d0d1/result");
var request = new RestRequest(Method.GET);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("SOTC_AUTH", "SAMs1a36d2-a139-e911-b8b3-000aa03t3d");
IRestResponse response = client.Execute(request);
</syntaxhighlight>
|PHPcURL=
<syntaxhighlight lang="PHP">
<?php
 
$curl = curl_init();
 
curl_setopt_array($curl, array(
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://aotg.cloud:8080/api/public/v1/Result/GetARInvoiceList/f5175ac-8d11-4593-96ce-ccd36085d0d1/result",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => array(
"SOTC_AUTH: SAMs1a36d2-a139-e911-b8b3-000aa03t3d",
"cache-control: no-cache"
),
));
 
$response = curl_exec($curl);
$err = curl_error($curl);
 
curl_close($curl);
 
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
</syntaxhighlight>
}}