Reigner Ouano
Reigner Ouano

Reputation: 135

how to upload a photo in acumatica using put

I just want to ask if it is possible to upload or attach a file in a contact using rest API I can currently put a new contact in Acumatica using put. My question now is can I also attach a link for its file like url/cloudstorage/image.jpg. I want to put it on file and be an image for the new contact

Upvotes: 0

Views: 636

Answers (1)

Hugues Beauséjour
Hugues Beauséjour

Reputation: 8268

You need to make a separate PUT call to upload the image and append entity key/files/image_filename to the URL:

http://localhost/AcumaticaDB/entity/Default/18.200.001/StockItem/AALEGO500/files/Sample.jpg

With REST API you can currently only upload files to master entity (form/header). If you need to attach files to detail entities you need to create a custom maintenance screen for the detail entity and extend the webservice endpoint to add that custom screen. Essentially it creates a master screen for the detail.

Reference:

https://help-2020r1.acumatica.com/Help?ScreenId=ShowWiki&pageid=591def3d-5fe5-42c1-bb35-cfe5b4c77f6f

Upvotes: 1

Related Questions