Question

attach files to Bills and Adjustments via REST API

  • 10 April 2024
  • 4 replies
  • 38 views

Hi,

I have a customer trying to implement integration and we’re trying to attach files to bills but are unable to do so. it’s showing as success, but there’s no attachment.

here’s the sample URL request:

https://dev-acumatica.customername.com/customeracct/entity/default/22.200.001/Bill/INV/026331/files/file.pdf

I’m trying to find any related API documentation for this specific endpoint but failed to do so.

 


4 replies

Userlevel 7
Badge +4

Hi @daryldiaday,

Refer to the example available in the following help article, https://help-2023r1.acumatica.com/Help?ScreenId=ShowWiki&pageid=591def3d-5fe5-42c1-bb35-cfe5b4c77f6f

The step in short,

  1. Do a GET request for the Bill to which you need to attach the file
  2. From the response in the step 2, use the URL from the files field available under the _links entity to attach the file

Feel free to post if you have any questions. Good Luck,

Userlevel 7
Badge +4

@daryldiaday another reference: Attach Files with Rest API - Acumatica Developers Blog . .

Hi Rohit/Vignesh,

Thank you for the responses.

I have questions regarding the links you’ve provided as there are 2 different ways to attach files to the record:

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

for this specific article, it’s using the files:put “URL” for the next request to attach the file.

 

While this article, https://asiablog.acumatica.com/2018/01/attach-files-with-rest-api.html

using a different PUT URL request:
 

 

Are these 2 requests valid and just the same?

Userlevel 7
Badge +4

Hey @daryldiaday,

If you are using or extending the Default endpoint 22.200.001 and above, I would suggest you use the _links approach. As far as, I remember, these are functionalities introduced in Default endpoint 22.200.001. 

If you are using the 20.200.001 and below version, you can use the approach suggested by @RohitRattan88. Hope that clarifies.!

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved