web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

ParentID for attachments

(0) ShareShare
ReportReport
Posted on by 57

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?

  • Gianfranco C. Profile Picture
    374 on at

    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'

    pastedimage1678224979377v1.png

    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)....

    pastedimage1678225049613v2.png



    if it helped you, please select this answer, thank you

  • se23 Profile Picture
    57 on at

    after i added the parentId and the parentType, no values are showing in the "value" section, it's just empty

  • Gianfranco C. Profile Picture
    374 on at

    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.

    pastedimage1678263297808v1.png

    If it is not in the indicated section, you can upload it via the appropriate action:

  • se23 Profile Picture
    57 on at

    is it possible to get documents attached to a posted sales invoice? im trying to get reports attached through table 1173

  • Verified answer
    Gianfranco C. Profile Picture
    374 on at

    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

    pastedimage1678285124081v2.png


    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:

    pastedimage1678285164308v3.png

    if it helped you, please select this answer, thank you

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.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 753 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 583 Super User 2026 Season 2

#3
AndrewThomas81 Profile Picture

AndrewThomas81 302 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans