{"title":"documentAttachment resource type","url":"https://jonas-paprotka.de/docs/dev-itpro/api-reference/v2.0/resources/dynamics_documentattachment/","by":"JOP-AL","license":"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.","credit":"Microsoft Corporation, CC BY 4.0","origin":"https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/api-reference/v2.0/resources/dynamics_documentattachment","source":{"name":"Business Central developer and IT pro docs","repo":"https://github.com/MicrosoftDocs/dynamics365smb-devitpro-pb","commit":"828b6ee72fcd75755627cd6011f3d20899217ab2","date":"2026-11-19"},"checked":"2026-11-19","description":"A document attachment object in Dynamics 365 Business Central.","date":"2026-08-21","meta":{"topic":"reference"},"outline":[{"level":1,"title":"documentAttachment resource type","slug":"documentattachment-resource-type","at":0,"chars":3391},{"level":2,"title":"Methods","slug":"methods","at":247,"chars":469},{"level":2,"title":"Navigation","slug":"navigation","at":716,"chars":1003},{"level":2,"title":"Properties","slug":"properties","at":1719,"chars":997},{"level":2,"title":"JSON representation","slug":"json-representation","at":2716,"chars":437},{"level":2,"title":"Related information","slug":"related-information","at":3153,"chars":238}],"text":"# documentAttachment resource type\nRepresents a document attachment in Business Central.\n> NOTE\n> For information about enabling APIs for Business Central see Enabling the APIs for Dynamics 365 Business Central<../enabling-apis-for-dynamics-nav>.\n## Methods\nMethod|Return Type|Description\n../api/dynamics_documentattachment_get|documentAttachment|Gets a document attachment object.\n../api/dynamics_documentattachment_delete|none|Deletes a document attachment object.\nPOST documentAttachment<../api/dynamics_documentattachment_create>|documentAttachment|Creates a document attachment object.\nPATCH documentAttachment<../api/dynamics_documentattachment_update>|documentAttachment|Updates a document attachment object.\n## Navigation\nNavigation|Return Type|Description\ndynamics_item|item|Gets the item of the documentAttachment.\ndynamics_customer|customer|Gets the customer of the documentAttachment.\ndynamics_vendor|vendor|Gets the vendor of the documentAttachment.\ndynamics_salesinvoice|salesInvoice|Gets the salesinvoice of the documentAttachment.\ndynamics_employee|employee|Gets the employee of the documentAttachment.\ndynamics_salesorder|salesOrder|Gets the salesorder of the documentAttachment.\ndynamics_salesquote|salesQuote|Gets the salesquote of the documentAttachment.\ndynamics_salescreditmemo|salesCreditMemo|Gets the salescreditmemo of the documentAttachment.\ndynamics_purchaseinvoice|purchaseInvoice|Gets the purchaseinvoice of the documentAttachment.\ndynamics_project|project|Gets the project of the documentAttachment.\ndynamics_purchaseorder|purchaseOrder|Gets the purchaseorder of the documentAttachment.\ndynamics_purchasecreditmemo|purchaseCreditMemo|Gets the purchasecreditmemo of the documentAttachment.\n## Properties\nProperty|Type|Description\nid|GUID|The unique ID of the document attachment. Non-editable.\nfileName|string|Logical filename.\nbyteSize|integer|File size.\nattachmentContent|stream|The attachment's content.\nparentType|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\".\nparentId|GUID|The ID of the parent entity.\nlineNumber|integer|The document attachment item line number.\ndocumentFlowSales|boolean|Specifies if the attachment must flow to transactions. Used for integration with Flow; the field is exposed on the Document Attachment Details page.\ndocumentFlowPurchase|boolean|Specifies if the attachment must flow to transactions. Used for integration with Flow; the field is exposed on the Document Attachment Details page.\nlastModifiedDateTime|datetime|The last datetime the document attachment was modified. Read-Only.\n## JSON representation\nHere's a JSON representation of the documentAttachment resource.\n```json\n{\n    \"id\": \"GUID\",\n    \"fileName\": \"string\",\n    \"byteSize\": \"integer\",\n    \"attachmentContent\": \"stream\",\n    \"parentType\": \"NAV.attachmentEntityBufferDocumentType\",\n    \"parentId\": \"GUID\",\n    \"lineNumber\": \"integer\",\n    \"documentFlowSales\": \"boolean\",\n    \"documentFlowPurchase\": \"boolean\",\n    \"lastModifiedDateTime\": \"datetime\"\n}\n```\n## Related information\n../api/dynamics_documentattachment_get\n../api/dynamics_documentattachment_delete\nPOST documentAttachment<../api/dynamics_documentattachment_create>\nPATCH documentAttachment<../api/dynamics_documentattachment_update>"}