Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Attachments in Business Central represent an Incoming Document and can be associated to a variety of record types.

Objects Supporting Attachments

  • Journal

  • Sales Order

  • Sales Quote

  • Sales Credit Memo

  • Sales Invoice

  • Purchase Invoice

Creation of an attachment is a two step process. First, create a new Attachment with the attachments request. You must have a valid invoice id available (GUID) for the transaction to succeed.

{
    "parentId":"{p_invoiceId}",
    "fileName":"myPDF.pdf",
    "parentType":"Purchase Invoice"
}

When an attachment is created, the response will include the attachment’s internal ID (GUID), which is required for the second step.

With the attachment created, make an update / patch request with the returned id attachments({p_id})/attachmentContent and enable the Document is Request Body check box. When this option is selected, the JSON request body is ignored, and the document attached to the process is included in that request.

  • No labels