Hi @jinin,
It looks like this post requires an update.
Since the System Contract 4 (Default endpoints 20.200.001 and 22.200.001) it is possible to attach the files to the document details. Here is a documentation: https://help.acumatica.com/(W(6))/Help?ScreenId=ShowWiki&pageid=591def3d-5fe5-42c1-bb35-cfe5b4c77f6f
If you make the GET call like this:
{{sitename}}/entity/Default/22.200.001/SalesOrder/{{Type}}/{{OrderNbr}}?$expand=Details
In response you will get following node:
"_links": {
"files:put": "/{{SitePath}}/entity/Default/20.200.001/files/PX.Objects.SO.SOOrderEntry/Transactions/2bc54f8e-75f0-4a75-b850-4931565b168d/{filename}"
Following PUT request and the link in "files:put" would attach the file to the detail record:
{{sitename}}/entity/Default/20.200.001/files/PX.Objects.SO.SOOrderEntry/Transactions/2bc54f8e-75f0-4a75-b850-4931565b168d/MyFile.png
As before, the content of the file should be passed as binary in the body of the request.