Hi,
Why do you not use the API ? https://wiki.dolibarr.org/index.php/Module_Web_Services_REST_(developer)