Hi All,
In Addition to my topic with Acumatica REST API where I showed how to retrieve and save records using Acumatica Contract Base Rest API I want to share with you now how can you attach files with the same way.
To Attach file you just need to put binary data by following URL:
https://<server>/entity/<endpoint>/<version>/<entity>/<key1>/<key2>/files/<filename>
For example, to attach file to stock item you will have following URL:
http://acusea.acumatica.com/entity/Default/6.00.001/StockItem/AACOMPUT01/files/image.png
File will be attached to entity automatically.
Have a nice integration!
Hi Sergey,
Do you know if it is possible to add version of the file when attaching file with REST api?
Do you mean you want to get the specific version or just add a version when yoг put it there?
I guess you can add some text with version into the name
It’s very useful your post.
I’m trying to attach files to Sales Invoice. Is it possible to attach files with REST API where de document is in Closed status?
I’m getting this error:
“message”: “An error has occurred.”,
“exceptionMessage”: “Error: The Save button is disabled.”
I did it manually in Acumatica and I can upload the file even if the document is closed. But I have no success with REST
Hi Anahi,
I saw this error before, and even have seen a bug for that. Could you please advise what version of Acumatica do you use? I think it should work correctly in 218R2. In case not, please create a support case as we need to escalate to developers.
I’m using Acumatica 2017 R2
Hi Anahi,
I recommend you to create a support case, as file attaching should be consistent in UI and API.