documentAttachment resource type

Represents a document attachment in Business Central.

Note

For information about enabling APIs for Business Central see Enabling the APIs for Dynamics 365 Business Central.

Methods

MethodReturn TypeDescription
GET documentAttachmentdocumentAttachmentGets a document attachment object.
DELETE documentAttachmentnoneDeletes a document attachment object.
POST documentAttachmentdocumentAttachmentCreates a document attachment object.
PATCH documentAttachmentdocumentAttachmentUpdates a document attachment object.
NavigationReturn TypeDescription
itemitemGets the item of the documentAttachment.
customercustomerGets the customer of the documentAttachment.
vendorvendorGets the vendor of the documentAttachment.
salesInvoicesalesInvoiceGets the salesinvoice of the documentAttachment.
employeeemployeeGets the employee of the documentAttachment.
salesOrdersalesOrderGets the salesorder of the documentAttachment.
salesQuotesalesQuoteGets the salesquote of the documentAttachment.
salesCreditMemosalesCreditMemoGets the salescreditmemo of the documentAttachment.
purchaseInvoicepurchaseInvoiceGets the purchaseinvoice of the documentAttachment.
projectprojectGets the project of the documentAttachment.
purchaseOrderpurchaseOrderGets the purchaseorder of the documentAttachment.
purchaseCreditMemopurchaseCreditMemoGets the purchasecreditmemo of the documentAttachment.

Properties

PropertyTypeDescription
idGUIDThe unique ID of the document attachment. Non-editable.
fileNamestringLogical filename.
byteSizeintegerFile size.
attachmentContentstreamThe attachment's content.
parentTypeNAV.attachmentEntityBufferDocumentTypeThe type of the parent document of the document attachment. It can be " ", "Journal", "Sales Order", "Sales Quote", "Sales Credit Memo", "Sales Invoice" or "Purchase Invoice".
parentIdGUIDThe ID of the parent entity.
lineNumberintegerThe document attachment item line number.
documentFlowSalesbooleanSpecifies if the attachment must flow to transactions. Used for integration with Flow; the field is exposed on the Document Attachment Details page.
documentFlowPurchasebooleanSpecifies if the attachment must flow to transactions. Used for integration with Flow; the field is exposed on the Document Attachment Details page.
lastModifiedDateTimedatetimeThe last datetime the document attachment was modified. Read-Only.

JSON representation

Here's a JSON representation of the documentAttachment resource.

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

GET documentAttachment
DELETE documentAttachment
POST documentAttachment
PATCH documentAttachment