2,743
edits
(5 intermediate revisions by the same user not shown) | |||
Line 20:
url = "http://aotg.cloud:8080/api/public/v1/ARInvoice/CreateARInvoice"
payload = "{\r\n \"DebtorCode\": \"300-A001\",\r\n \"Description\": \"AOTG IMPORT TEST A\",\r\n \"DocDate\": \"01-01-2019\",\r\n \"DocNo\": \"AOTG007\",\r\n \"JournalType\": \"SALES\",\r\n \"RefNo2\": \"AOTG Web API\",\r\n \"InclusiveTax\": true,\r\n \"Agent\": \"TOM\",\r\n \"CreditTerm\": \"Net 30 days\",\r\n \"CurrencyCode\": \"MYR\",\r\n \"DetailsLine\": [\r\n {\r\n \"LineState\":
headers = {
'SOTC_AUTH': "SAMc13a36d2-a139-e911-b8b3-000d3aa04f3d",
Line 58:
"DetailsLine": [
{
"LineState":
"AccNo": "500-0000",
"Description": "AOTG Sales Detail 1",
Line 65:
},
{
"LineState":
"AccNo": "500-0000",
"Description": "AOTG Sales Detail 2",
Line 89:
request.AddHeader("Content-Type", "application/json");
request.AddHeader("SOTC_AUTH", "SAMc13a36d2-a139-e911-b8b3-000d3aa04f3d");
request.AddParameter("undefined", "{\r\n \"DebtorCode\": \"300-A001\",\r\n \"Description\": \"AOTG IMPORT TEST A\",\r\n \"DocDate\": \"01-01-2019\",\r\n \"DocNo\": \"AOTG007\",\r\n \"JournalType\": \"SALES\",\r\n \"RefNo2\": \"AOTG Web API\",\r\n \"InclusiveTax\": true,\r\n \"Agent\": \"TOM\",\r\n \"CreditTerm\": \"Net 30 days\",\r\n \"CurrencyCode\": \"MYR\",\r\n \"DetailsLine\": [\r\n {\r\n \"LineState\":
IRestResponse response = client.Execute(request);
</syntaxhighlight>
Line 107:
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\r\n \"DebtorCode\": \"300-A001\",\r\n \"Description\": \"AOTG IMPORT TEST A\",\r\n \"DocDate\": \"01-01-2019\",\r\n \"DocNo\": \"AOTG007\",\r\n \"JournalType\": \"SALES\",\r\n \"RefNo2\": \"AOTG Web API\",\r\n \"InclusiveTax\": true,\r\n \"Agent\": \"TOM\",\r\n \"CreditTerm\": \"Net 30 days\",\r\n \"CurrencyCode\": \"MYR\",\r\n \"DetailsLine\": [\r\n {\r\n \"LineState\":
CURLOPT_HTTPHEADER => array(
"Content-Type: application/json",
Line 148:
<br/>
==Get Status of the Create Debtor==
===Code Snippets===
Line 233 ⟶ 234:
}}
====Response Status====
▲ "RequestId": "def14c1a-cdb5-4aa4-834d-0b9c1faa1532",
<br/>
==Use RESULT method to get the failed reason of Create Debtor request==
===Code Snippets===
Line 344 ⟶ 330:
<syntaxhighlight lang="json-object">
{
"RequestId": "
"RequestName": "CreateARInvoice",
"HostName": "---",
Line 379 ⟶ 365:
<syntaxhighlight lang="json-object">
{
"RequestId": "
"RequestName": "CreateARInvoice",
"HostName": "---",
Line 409 ⟶ 395:
</syntaxhighlight>
</tabber>
=====Unknown Sql Exception...=====
'''Unknonw Sql Exception''' is a general sql error. Therefore, the solution can be varied.<br/>
Line 417 ⟶ 404:
<syntaxhighlight lang="json-object">
{
"RequestId": "
"RequestName": "CreateARInvoice",
"HostName": "---",
|