JuiceyBrucey wrote:Hi, I need to do a query that gets all debtor specific transactions so that I can create an API method that returns all, or filtered types, of transactions.
Which table would I get them from?
Cheers
DB_Trans is the table which contains all debtor transactions. But I wouldn't do that yourself manually - we've done the heavy lifting for you and have AutoQuery setup - you just need to add the route in your own custom plugin:
- Code: Select all
AppHost.Routes.Add(typeof(DB_TransQuery), "/Queries/DB_Trans", "GET", "Retrieves a list of debtor transactions.", "");
requests to this route can specify what value of any column to filter on, so the request can specify a specific DebtorID.
If you want greater control, or don't trust the requestor to look at transactions for any debtor, you can do that also - explicitly inject a filter value - the UserSettingsGETManyRequest in the standard REST API plugin is a good example.