Updates a draft sales credit memo. Posted documents cannot be modified.
The id cannot be changed. Totals and invoice discount are recalculated after the update.
ETag for concurrency (use * to force update)
GUID for targeted Company
SystemId (GUID) of the sales credit memo
Change shortcut dimension
{
"shortcutDimension2Code": "333"
}Change dates
{
"postingDate": "2025-04-05",
"dueDate": "2025-04-15"
}Payload to create or update a sales credit memo.
On create either customerId or customerNumber must be provided.
salesCreditMemoLines can be included on create (deep insert).
The fields postingDescription, paymentMethodCode, locationCode, userId, apiTotalAmountExclVAT and
apiTotalAmountInclVAT are applied only when they are not empty (not zero), so they cannot be cleared through the API.
documentLink and documentNote add a record link and a record note to the document.
Total excluding VAT as calculated by the external system. Compared with the amount calculated by Business Central when Check VAT Mismatch in API Request is enabled.
Total including VAT as calculated by the external system. Used for the VAT mismatch check and, when Allow VAT Auto Correction is enabled, to correct VAT differences within Max. VAT Difference Allowed.
Deep insert of lines (create only).
Payload to create or update a sales credit memo line. Lines can only be changed on draft credit memos.
documentId is required when the line is created through the root salesCreditMemoLines endpoint.
shortcutDimension1Code and shortcutDimension2Code are applied only when not empty.
OK
Sales credit memo, draft or posted. A draft credit memo is a Sales Header with document type Credit Memo,
a posted credit memo is a Sales Cr.Memo Header. Use posted and status to tell them apart.
Sell-to customer SystemId. Either customerId or customerNumber is required on create.
Sell-to customer number. Either customerId or customerNumber is required on create.
SystemId of the posted sales invoice the credit memo applies to.
Number of the posted sales invoice the credit memo applies to (Applies-to Doc. No.).
Total excluding VAT as calculated by the external system. Compared with the amount calculated by Business Central when Check VAT Mismatch in API Request is enabled.
Total including VAT as calculated by the external system. Used for the VAT mismatch check and, when Allow VAT Auto Correction is enabled, to correct VAT differences within Max. VAT Difference Allowed.
Assigned User ID of the document.
URL stored as a record link on the document.
Text stored as a record note on the document.
SystemId of the Reason Code.
Dimension set line (standard page "APIV2 - Dimension Set Lines").
If the customer, vendor, G/L account or item has default dimensions, overriding them on a document line needs additional PATCH requests;
without default dimensions, send the dimensions with the line in the same request.
For documents with hundreds of lines, post dimensions in a separate $batch request.
SystemId of the dimension (not of the line)
SystemId of the sales credit memo. Cannot be changed.
Line No. Cannot be changed, delete and insert the line again.
Item or G/L account number, depending on lineType. Cannot be changed once set.
Dimension set line (standard page "APIV2 - Dimension Set Lines").
If the customer, vendor, G/L account or item has default dimensions, overriding them on a document line needs additional PATCH requests;
without default dimensions, send the dimensions with the line in the same request.
For documents with hundreds of lines, post dimensions in a separate $batch request.
SystemId of the dimension (not of the line)
Location (standard page "APIV2 - Locations").
PDF of the document (standard page "APIV2 - PDF Document", read-only).
Download the file with GET .../pdfDocument/pdfDocumentContent.
The report and layout come from Report Selections for the document type; if more than one report is set up, the first in sequence is used.
Incoming document attachment (standard page "APIV2 - Attachments").
Upload or download the file content via .../attachments({id})/attachmentContent.
Document attachment (standard page "APIV2 - Document Attachments").
Upload or download the file content via .../documentAttachments({id})/attachmentContent.
When the attachment is created together with the document (e.g. a signed sales contract), the file content is sent in a separate PATCH request.
Bad Request
Unauthorized
Not Found