attachment resource type

Represents an attachment in Business Central.

Note

For information about enabling APIs for Business Central see Enabling the APIs for Dynamics 365 Business Central. An attachment in the Business Central API is defined as an Incoming Document (table 130).

Methods

MethodReturn TypeDescription
GET attachmentattachmentGets a attachments object.
DELETE attachmentnoneDeletes a attachments object.
POST attachmentattachmentCreates a attachments object.
PATCH attachmentattachmentUpdates a attachments object.
NavigationReturn TypeDescription
salesInvoicesalesInvoiceGets the salesinvoice of the attachment.
journalLinejournalLineGets the journalline of the attachment.
generalLedgerEntrygeneralLedgerEntryGets the generalledgerentry of the attachment.
salesOrdersalesOrderGets the salesorder of the attachment.
salesQuotesalesQuoteGets the salesquote of the attachment.
salesCreditMemosalesCreditMemoGets the salescreditmemo of the attachment.
purchaseInvoicepurchaseInvoiceGets the purchaseinvoice of the attachment.
purchaseOrderpurchaseOrderGets the purchaseorder of the attachment.
purchaseCreditMemopurchaseCreditMemoGets the purchasecreditmemo of the attachment.

Properties

PropertyTypeDescription
idGUIDThe unique ID of the attachments. Non-editable.
parentIdGUIDThe ID of the parent entity.
fileNamestringLogical filename.
byteSizeintegerFile size.
attachmentContentstreamThe attachment's content.
lastModifiedDateTimedatetimeThe last datetime the attachments was modified. Read-Only.
parentTypeNAV.attachmentEntityBufferDocumentTypeThe type of the parent document of the attachments. It can be " ", "Journal", "Sales Order", "Sales Quote", "Sales Credit Memo", "Sales Invoice" or "Purchase Invoice".

JSON representation

Here's a JSON representation of the attachment resource.

{
    "id": "GUID",
    "parentId": "GUID",
    "fileName": "string",
    "byteSize": "integer",
    "attachmentContent": "stream",
    "lastModifiedDateTime": "datetime",
    "parentType": "NAV.attachmentEntityBufferDocumentType"
}

GET attachment
DELETE attachment
POST attachment
PATCH attachment