I am trying to get attachment from business central through postman but it keeps asking me for a parentID, how do I get this parentID?
Hello the correct syntax for retrieving attachments is as follows:
https://api.businesscentral.dynamics.com/v2.0/TenantID/environmentName/api/v2.0/companies(companyId)/attachments?$filter=parentId eq SYSTEMID and parentType eq 'RECORDTYPE'
RECORDTYPE can take these values:
" "
Journal
Sales Order
Sales Quote
Sales Credit Memo
Sales Invoice,
Purchase Invoice
Purchase Order
SYSTEMID is relative to the record that has attachments (e.g. the systemid of a Sales Invoice, a Journal)....
if it helped you, please select this answer, thank you
after i added the parentId and the parentType, no values are showing in the "value" section, it's just empty
are you sure the attachment is in the right section? this API reads table 130, not 1173.Check which section your document has the attachment in.
If it is not in the indicated section, you can upload it via the appropriate action:
is it possible to get documents attached to a posted sales invoice? im trying to get reports attached through table 1173
in the v22 release of Business Central it is possible to obtain the attachment of table 1173 with this call:
api.businesscentral.dynamics.com/.../salesInvoices
up to release v21 you can only have expand=attachments (table 130)
if you want to get all attachments in table 1173 , you can use the call:
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Rishabh Kanaskar 2,828
Sumit Singh 2,617
YUN ZHU 1,861 Super User 2025 Season 2