AOTG API: Get AR Invoice: Difference between revisions
Content added Content deleted
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
==<DRAFT>== |
|||
Incompleted! |
|||
<br/><br/> |
|||
==Get AR Invoice== |
==Get AR Invoice== |
||
Get an AR Invoice from account book. |
Get an AR Invoice from account book. |
||
Line 9: | Line 5: | ||
==API Request Flow== |
==API Request Flow== |
||
[[File:AOTGApiRequestFlow.png|link=]] |
[[File:AOTGApiRequestFlow.png|link=]] |
||
#Submit GetARInvoice request to retrieve one AR Invoice in account book. |
#Submit GetARInvoice request to retrieve one AR Invoice in account book with Id. |
||
#Check the successful request status, if the data is completed (ready). |
#Check the successful request status, if the data is completed (ready). |
||
#Retrieve the data with '''Result method'''. |
#Retrieve the data with '''Result method'''. |
||
Line 299: | Line 295: | ||
200 OK |
200 OK |
||
====Response Successful Body==== |
====Response Successful Body==== |
||
<tabber> |
|||
Body= |
|||
<syntaxhighlight lang="json-object"> |
<syntaxhighlight lang="json-object"> |
||
{ |
{ |
||
"RequestId": "t590eef-2337b-562f-8990-803cbc0b48636", |
"RequestId": "t590eef-2337b-562f-8990-803cbc0b48636", |
||
" |
"RequestName": "GetARInvoice", |
||
"HostName": "---", |
|||
"IPAddress": "---", |
|||
"RequestTypeName": "ARInvoice", |
|||
"ResultJson": "{\"DebtorCode\":\"300-A001\",\"CompanyName\":\"ABC CUSTOMER\",\"Description\":\"AOTG IMPORT TEST A\",\"DocDate\":\"2019-03-03T00:00:00\",\"JournalType\":\"SALES\",\"DueDate\":\"2019-04-02T00:00:00\",\"DocNo\":\"I-000046\",\"LocalAmount\":0.00,\"TaxableAmount\":322.73,\"OutstandingAmount\":355.00,\"CurrencyCode\":\"MYR\",\"Agent\":\"TOM\",\"SourceType\":\"\",\"SourceKey\":\"\",\"CurrencyRate\":1.000000000000,\"Id\":\"1455\",\"RefNo2\":\"AOTG Web API\",\"CreditTerm\":\"Net 30 days\",\"InclusiveTax\":true,\"Note\":\"\",\"Total\":0.0,\"Amount\":355.00,\"TaxAmount\":32.27,\"DetailsLine\":[{\"Id\":\"1456\",\"LineState\":0,\"AccNo\":\"500-0000\",\"Description\":\"AOTG Sales Detail 1\",\"Project\":\"\",\"Dept\":\"\",\"Tax\":\"S-10\",\"Amount\":350.00,\"TaxRate\":10.000000,\"TaxAmount\":31.82,\"TaxAdjustment\":0.00,\"LocalTaxAdjustment\":0.0,\"SubTotal\":318.18,\"TaxableAmount\":350.00,\"LocalTaxAmount\":31.82,\"LocalSubTotal\":318.18,\"ToAccountRate\":1.000000000000,\"LocalTaxableAmount\":350.00,\"NetAmount\":350.00,\"LocalNetAmount\":350.00},{\"Id\":\"1457\",\"LineState\":0,\"AccNo\":\"500-0000\",\"Description\":\"AOTG Sales Detail 2\",\"Project\":\"\",\"Dept\":\"\",\"Tax\":\"S-10\",\"Amount\":5.00,\"TaxRate\":10.000000,\"TaxAmount\":0.45,\"TaxAdjustment\":0.00,\"LocalTaxAdjustment\":0.0,\"SubTotal\":4.55,\"TaxableAmount\":5.00,\"LocalTaxAmount\":0.45,\"LocalSubTotal\":4.55,\"ToAccountRate\":1.000000000000,\"LocalTaxableAmount\":5.00,\"NetAmount\":5.00,\"LocalNetAmount\":5.00}]}", |
|||
"RequestParamJson": null, |
|||
"ResultStream": null, |
|||
"ResultTypeName": "PSW.SOTC.Accounting.Provider.Models.ARInvoiceEntity", |
|||
"Status": "Completed", |
|||
"Version": "1.2.19051.12002", |
|||
"AccountBookInfo": "Plug-In 1.9 Test;1.0.9.77", |
|||
"AccountBookDBInfo": "1.0.9.77", |
|||
"Timestamp": "2019-03-05T05:49:53.5829933Z", |
|||
"ResultedTimestamp": "2019-03-05T05:49:53.6676613Z", |
|||
"ProcessingInterval": 2.8059105, |
|||
"InQueueInterval": 1.0500045, |
|||
"ResultFileURL": null |
|||
} |
} |
||
</syntaxhighlight> |
</syntaxhighlight> |
||
|-| |
|||
Readable of ResultJson= |
|||
<syntaxhighlight lang="json-object"> |
|||
{ |
|||
"DebtorCode": "300-A001", |
|||
"CompanyName": "ABC CUSTOMER", |
|||
"Description": "AOTG IMPORT TEST A", |
|||
"DocDate": "2019-03-03T00:00:00", |
|||
"JournalType": "SALES", |
|||
"DueDate": "2019-04-02T00:00:00", |
|||
"DocNo": "I-000046", |
|||
"LocalAmount": 0, |
|||
"TaxableAmount": 322.73, |
|||
"OutstandingAmount": 355, |
|||
"CurrencyCode": "MYR", |
|||
"Agent": "TOM", |
|||
"SourceType": "", |
|||
"SourceKey": "", |
|||
"CurrencyRate": 1, |
|||
"Id": "1455", |
|||
"RefNo2": "AOTG Web API", |
|||
"CreditTerm": "Net 30 days", |
|||
"InclusiveTax": true, |
|||
"Note": "", |
|||
"Total": 0, |
|||
"Amount": 355, |
|||
"TaxAmount": 32.27, |
|||
"DetailsLine": [ |
|||
{ |
|||
"Id": "1456", |
|||
"LineState": 0, |
|||
"AccNo": "500-0000", |
|||
"Description": "AOTG Sales Detail 1", |
|||
"Project": "", |
|||
"Dept": "", |
|||
"Tax": "S-10", |
|||
"Amount": 350, |
|||
"TaxRate": 10, |
|||
"TaxAmount": 31.82, |
|||
"TaxAdjustment": 0, |
|||
"LocalTaxAdjustment": 0, |
|||
"SubTotal": 318.18, |
|||
"TaxableAmount": 350, |
|||
"LocalTaxAmount": 31.82, |
|||
"LocalSubTotal": 318.18, |
|||
"ToAccountRate": 1, |
|||
"LocalTaxableAmount": 350, |
|||
"NetAmount": 350, |
|||
"LocalNetAmount": 350 |
|||
}, |
|||
{ |
|||
"Id": "1457", |
|||
"LineState": 0, |
|||
"AccNo": "500-0000", |
|||
"Description": "AOTG Sales Detail 2", |
|||
"Project": "", |
|||
"Dept": "", |
|||
"Tax": "S-10", |
|||
"Amount": 5, |
|||
"TaxRate": 10, |
|||
"TaxAmount": 0.45, |
|||
"TaxAdjustment": 0, |
|||
"LocalTaxAdjustment": 0, |
|||
"SubTotal": 4.55, |
|||
"TaxableAmount": 5, |
|||
"LocalTaxAmount": 0.45, |
|||
"LocalSubTotal": 4.55, |
|||
"ToAccountRate": 1, |
|||
"LocalTaxableAmount": 5, |
|||
"NetAmount": 5, |
|||
"LocalNetAmount": 5 |
|||
} |
|||
] |
|||
} |
|||
</syntaxhighlight> |
|||
</tabber> |
|||
<br/> |
<br/> |