Page 1 of 1

Debtor API Keys and Accounts on Hold

PostPosted: Wed Dec 11, 2019 6:14 pm
by SBarnes
Hi Mike,

will a debtor account that is on hold or trading status of inactive with an api key still login or not?

I realise I can create a request filter to make it happen if it doesn't exist but thought it better to ask before reinventing the wheel.

Re: Debtor API Keys and Accounts on Hold  Topic is solved

PostPosted: Wed Dec 11, 2019 6:35 pm
by Mike.Sheen
SBarnes wrote:will a debtor account that is on hold or trading status of inactive with an api key still login or not?

I realise I can create a request filter to make it happen if it doesn't exist but thought it better to ask before reinventing the wheel.


Hi Stuart,

Yes, it will still allow the login if the debtor has a trading status of inactive or on hold.

You can, as you mentioned, use a request filter to prevent that - or you can via a plugin hook into the business logic SaveEnd SaveEnding event of a debtor and disable all API Keys for the debtor.

I don't think us by default disallowing login if the trading status is inactive or their account on hold is entirely the best approach - as you may want to still allow some access, or altered behaviour. Some people might want inactive debtors or on hold still be able to get a list of outstanding invoices and things like that. One should maximise the chances of outstanding accounts being paid!

Mike