Updates a purchase credit memo. Only draft (not posted) credit memos can be changed. The id cannot be changed.
ETag for concurrency (use * to force update)
GUID for targeted Company
SystemId (GUID) of the purchase credit memo
Change shortcut dimensions
{
"shortcutDimension1Code": "PIRK",
"shortcutDimension2Code": "222"
}Writable purchase credit memo fields. On create, vendorNumber or vendorId must be provided.
purchaseCreditMemoLines and dimensionSetLines can be included for a deep insert.
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.
URL stored as a record link on the document.
Text stored as a record note on the document.
SystemId of the posted purchase invoice to apply the credit memo to. Send an empty GUID to clear.
Number of the posted purchase invoice to apply the credit memo to. Must match invoiceId if both are sent.
SystemId of the reason code.
Assigned User ID (BC user name, not a GUID).
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)
Writable purchase credit memo line fields. documentId is filled automatically when the line is created
under a purchase credit memo. documentId, sequence and lineObjectNumber 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)
OK
Buy-from vendor number. Either vendorId or vendorNumber is required on create.
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.
URL stored as a record link on the document.
Text stored as a record note on the document.
SystemId of the posted purchase invoice the credit memo is applied to (Applies-to Doc. No.).
Number of the posted purchase invoice the credit memo is applied to (Applies-to Doc. No.).
SystemId of the reason code.
Assigned User ID (BC user name, not a GUID).
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)
The page has no ODataKeyFields, so a line is keyed by documentId + sequence
(e.g. purchaseCreditMemoLines(documentId=...,sequence=10000)), not by id.
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