Skip to main content
Solved

How to add a comment to an attached file via REST API in Acumatica 2024 R1?

  • July 21, 2025
  • 4 replies
  • 113 views

Hi everyone,

I'm currently working with Acumatica Cloud ERP 2024 R1 and using the REST API to manage file attachments on various documents (e.g., Sales Orders, Invoices, etc.).

What I can already do:

I’m successfully attaching files to entities using the files endpoint like this:

PUT /entity/Default/24.200.001/files/PX.Objects.AR.CustomerMaint/BAccount/{entityID}/{filename}

This works well — the file is successfully attached and visible under the Files tab on the customer screen.

What I want to do next:

I would like to add a comment to this file — just like you can do manually in the UI by entering a comment when attaching a file.

My assumption so far:

From what I understand, this may require two separate REST calls:

  1. PUT — attach the file (already working ✅)

  2. Some second request to update the file record and add a comment (❓)

But I haven't found a working REST example for that.

My Questions:

  1. Is it possible to attach a comment to a file via REST API in Acumatica 2024 R1?

  2. If yes — what is the recommended way or endpoint to do it?

  3. If not directly supported — would it work via a custom endpoint?

Any help, tips, or examples would be very appreciated!

Thanks in advance,
Daria Maksymova

Best answer by Dmitrii Naumov

@DariaMaksymova ​@Nilkanth Dipak 

This only works starting from 24r2 version. Before that there is no way to specify the comment.

4 replies

DipakNilkanth
Pro III
Forum|alt.badge.img+14

Hi ​@DariaMaksymova,

Please check below link for the same.

https://help.acumatica.com/(W(20))/Help?ScreenId=ShowWiki&pageid=591def3d-5fe5-42c1-bb35-cfe5b4c77f6f

Hope, it helps!


Thank you for the link!

Unfortunately, the PX-CbFileComment header doesn't seem to work — I’ve tested it both in Postman and in our Laravel (PHP) project.

The file uploads successfully via PUT, but the comment is not saved or visible anywhere.
It seems like PX-CbFileComment is being ignored entirely.

Any idea what could be missing or required additionally?

Thanks in advance!

Postman 11.55.0
Laravel Project (php)
Customers (ScreenId AR3030PL)

 


Dmitrii Naumov
Acumatica Moderator
Forum|alt.badge.img+7
  • Acumatica Moderator
  • Answer
  • July 21, 2025

@DariaMaksymova ​@Nilkanth Dipak 

This only works starting from 24r2 version. Before that there is no way to specify the comment.


DipakNilkanth
Pro III
Forum|alt.badge.img+14

@Dmitrii Naumov , Thanks for the further information!