# 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<../enabling-apis-for-dynamics-nav>.
## Methods
Method|Return Type|Description
../api/dynamics_documentattachment_get|documentAttachment|Gets a document attachment object.
../api/dynamics_documentattachment_delete|none|Deletes a document attachment object.
POST documentAttachment<../api/dynamics_documentattachment_create>|documentAttachment|Creates a document attachment object.
PATCH documentAttachment<../api/dynamics_documentattachment_update>|documentAttachment|Updates a document attachment object.
## Navigation
Navigation|Return Type|Description
dynamics_item|item|Gets the item of the documentAttachment.
dynamics_customer|customer|Gets the customer of the documentAttachment.
dynamics_vendor|vendor|Gets the vendor of the documentAttachment.
dynamics_salesinvoice|salesInvoice|Gets the salesinvoice of the documentAttachment.
dynamics_employee|employee|Gets the employee of the documentAttachment.
dynamics_salesorder|salesOrder|Gets the salesorder of the documentAttachment.
dynamics_salesquote|salesQuote|Gets the salesquote of the documentAttachment.
dynamics_salescreditmemo|salesCreditMemo|Gets the salescreditmemo of the documentAttachment.
dynamics_purchaseinvoice|purchaseInvoice|Gets the purchaseinvoice of the documentAttachment.
dynamics_project|project|Gets the project of the documentAttachment.
dynamics_purchaseorder|purchaseOrder|Gets the purchaseorder of the documentAttachment.
dynamics_purchasecreditmemo|purchaseCreditMemo|Gets the purchasecreditmemo of the documentAttachment.
## Properties
Property|Type|Description
id|GUID|The unique ID of the document attachment. Non-editable.
fileName|string|Logical filename.
byteSize|integer|File size.
attachmentContent|stream|The attachment's content.
parentType|NAV.attachmentEntityBufferDocumentType|The 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".
parentId|GUID|The ID of the parent entity.
lineNumber|integer|The document attachment item line number.
documentFlowSales|boolean|Specifies if the attachment must flow to transactions. Used for integration with Flow; the field is exposed on the Document Attachment Details page.
documentFlowPurchase|boolean|Specifies if the attachment must flow to transactions. Used for integration with Flow; the field is exposed on the Document Attachment Details page.
lastModifiedDateTime|datetime|The last datetime the document attachment was modified. Read-Only.
## JSON representation
Here's a JSON representation of the documentAttachment resource.
```json
{
    "id": "GUID",
    "fileName": "string",
    "byteSize": "integer",
    "attachmentContent": "stream",
    "parentType": "NAV.attachmentEntityBufferDocumentType",
    "parentId": "GUID",
    "lineNumber": "integer",
    "documentFlowSales": "boolean",
    "documentFlowPurchase": "boolean",
    "lastModifiedDateTime": "datetime"
}
```
## Related information
../api/dynamics_documentattachment_get
../api/dynamics_documentattachment_delete
POST documentAttachment<../api/dynamics_documentattachment_create>
PATCH documentAttachment<../api/dynamics_documentattachment_update>

Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/api-reference/v2.0/resources/dynamics_documentattachment, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact. https://jonas-paprotka.de/docs/dev-itpro/api-reference/v2.0/resources/dynamics_documentattachment/
