Re: REST API
s4m3shms wrote:I was testing the sales APIs from your latest repository, none of the methods worked for me.
For example:
http://url/modules/api/sales/
or
http://url/modules/api/sales/5returns nothing.
@s4m3shms The endpoint for the sales url needs to have a transaction type on the end, and its not optional. So:
http://url/modules/api/sales/10
Have a look at the Sales_Test file to see an example of how to use the api using php.
https://github.com/cambell-prince/FrontAccountingSimpleAPI/blob/master-upstream/tests/Sales_Test.php
would give you all the sales invoices for example. To get a particular invoice it would be:
http://url/modules/api/sales/5/10
assuming there was an invoice number 5.
Have a look at the Sales_Test.php file to see an example of using the api in php
https://github.com/cambell-prince/FrontAccountingSimpleAPI/blob/master-upstream/tests/Sales_Test.php
Thanks Cambell
In fact I was not aware of the API format, its working now.
I am trying to run your Sales_Test.php page, its not going through due to PHPUnit dependency issue.
Am trying to sort it out and update here.
Thanks again