Using more complex sqlfilters with REST API

I have been working on a program to make Dolibarr REST AP callsI in Python. I need to load all data from the server, but it must be done in batches due to sheer size of it.

For Invoices I have been trying to find a way to load them between certain references (FA2301-0001 to FA2301-0100, but the problem is that the field is alphanumerical so it must be cut in the middle and cast into integer. Following statement works in SQL fine:

SELECT * FROM db.llx_facture
where ref LIKE ‘FA____-%’
and cast(substring_index(ref, ‘-’, -1) as signed) > 200;

But I have trouble converting to it into sqlfilter. So far I have only managed to get 400 Bad syntax of the search string. There is not really much info in the internet about more advanced properties of the REST API, so I would like to get some help how does it work and what exactly is the syntax for it.