attachment resource type

Represents an attachments 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

Method Return Type Description
GET attachment attachment Gets a attachments object.
DELETE attachment none Deletes a attachments object.
POST attachment attachment Creates a attachments object.
PATCH attachment attachment Updates a attachments object.
Navigation Return Type Description
salesInvoice salesInvoice Gets the salesinvoice of the attachment.
journalLine journalLine Gets the journalline of the attachment.
generalLedgerEntry generalLedgerEntry Gets the generalledgerentry of the attachment.
salesOrder salesOrder Gets the salesorder of the attachment.
salesQuote salesQuote Gets the salesquote of the attachment.
salesCreditMemo salesCreditMemo Gets the salescreditmemo of the attachment.
purchaseInvoice purchaseInvoice Gets the purchaseinvoice of the attachment.
purchaseOrder purchaseOrder Gets the purchaseorder of the attachment.
purchaseCreditMemo purchaseCreditMemo Gets the purchasecreditmemo of the attachment.

Properties

Property Type Description
id GUID The unique ID of the attachments. Non-editable.
parentId GUID The ID of the parent entity.
fileName string Logical filename.
byteSize integer File size.
attachmentContent stream The attachment's content.
lastModifiedDateTime datetime The last datetime the attachments was modified. Read-Only.
parentType NAV.attachmentEntityBufferDocumentType The 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 is a JSON representation of the attachment resource.

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

See Also

GET attachment
DELETE attachment
POST attachment
PATCH attachment