Page 1 of 1

newbie: Get a list of Debtor transactions

PostPosted: Thu Jan 21, 2021 5:08 pm
by JuiceyBrucey
Hi, im a newby.
I need to get a list of debtor transactions via the API using curl. I have found the method /Queries/DebtorTransactionList, but I cannot find any info on it such as parameters etc.
can anyone shed any light on this?
Cheers, thank you

Re: newbie: Get a list of Debtor transactions  Topic is solved

PostPosted: Fri Jan 22, 2021 9:21 am
by SBarnes
The short answer is you can't get it out of the box as debtor transactions are not exposed.

However ServiceStack does support auto query which means you can expose db_trans which is the table that you need to access, to see an example of how to do this look at any of the routes under queries, then see how that route can be added by having a look at how any of these routes are actually exposed in the REST API plugin, Jiwa have already created/defined the query and response objects in the Service Model name space so all you need to do is add the route and possibly service to do it.

You can also create a view and expose that but in that case you would also need to define the request and response classes also and then create the service.

Jiwa also have a sample plugin for defining additional routes that you could look at. The following link should also help https://docs.jiwa.com.au/display/J7UG/A ... e+REST+API

Re: newbie: Get a list of Debtor transactions

PostPosted: Sat Jan 23, 2021 5:41 pm
by JuiceyBrucey
Hi Stuart. Thank you very much for your reply.
This has put me on the path to creating this route. The tutorial was very helpful and your answer very much appreciated.
I may update you when I have finished it.
Cheers

Re: newbie: Get a list of Debtor transactions

PostPosted: Sun Jan 24, 2021 10:00 am
by JuiceyBrucey
Thank you very much for the reply Stuart.
I have this working now.
Cheers