Dear,
This one is my first post here so welcome everyone. I’m using Dolibarr 14.0.1. For external app purposes, I need to generate pdf doc via REST API, which does have /builddoc gateway. The question is: how to use it correctly? Implementation notes advices: { “modulepart”: “invoice”, “original_file”: “FA1701-001/FA1701-001.pdf”, “doctemplate”: “crabe”, “langcode”: “fr_FR” }. However, the server responds 404. Could anyone help with this issue? Did anyone use it successfully before?
Hello,
404 error means file not found, so either you have issues with your apache/nginx or some files are missing or wrong path.
Dear,
Thanks for the suggestion. Hence the server is located on a Windows Server machine (IIS) it might have something with file rights in common. However, I suppose the file and the path are both correct, there might be something wrong with IIS or WebDAV (WebDAV is deleted due to POST issues).
Is there anyone who try POST on Windows Server machines? Please kindly check if you have no trouble and leave feedback. Thanks for all.
After a couple of manipulations, I didnt managed to generate a PDF doc successfully using REST API. After calling POST thru the dolibarr’s Swagger API explorer server responded: “404 No such file or directory”. I cant work this out why is it so. To be honest I modified dolibarr’s dirs/files permitions allowing everything (Windows Server).
Did someone of you try POST builddoc call three REST API?
My API call:
URL: [WEBSITE]/api/index.php/documents/builddoc
documentsBuilddocModel: { “modulepart”: “invoice”, “original_file”: “FA1701-001/FA1701-001.pdf”, “doctemplate”: “crabe”, “langcode”: “fr_FR” }
Both directory and file exists in documents/facture dir.
Please help. Best Regards!
3 years later. I partly struggle with the same. I had to write propal, not “proposal” to get it to work on 18.0.5 - maybe it’s the same with facture and not invoice?