web
You’re offline. This is a read only version of the page.
close
Skip to main content
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?

I have the same question (0)
  • Gianfranco C. Profile Picture
    370 on at
    RE: ParentID for attachments

    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
    RE: ParentID for attachments

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

  • Gianfranco C. Profile Picture
    370 on at
    RE: ParentID for attachments

    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
    RE: ParentID for attachments

    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
    370 on at
    RE: ParentID for attachments

    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

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

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 2,828

#2
Sumit Singh Profile Picture

Sumit Singh 2,617

#3
YUN ZHU Profile Picture

YUN ZHU 1,861 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans