Purchase Credit Memos Realtime-enabled
GETPOSTPATCHDELETETable: Purchase Header
Read and write unposted Purchase Credit Memos. The source is the Purchase Header filtered to Document Type = Credit Memo, so the document type is stamped for you on insert. You never send it. Mirrors the Purchase Invoices endpoint; POST a full credit memo as a single deep insert with its purchaseCreditMemoLines.
Resolving the vendor
Three ways to point a credit memo at a vendor, all of which set Buy-from Vendor No.: send vendorNumber directly, send vendorId, or send vendorIntegrationId, your external key, looked up against the resolver on the Vendor. An unknown vendorIntegrationId is rejected with an error rather than silently ignored. vendorCrMemoNumber carries the supplier's own credit-memo reference and is independent of the vendor lookup.
Deep insert with lines
POST/purchaseCreditMemos
{
"vendorIntegrationId": "ACME-001",
"vendorCrMemoNumber": "CR-7781",
"integrationId": "store-cm-42",
"purchaseCreditMemoLines": [
{ "itemNumber": "1000", "quantity": 2, "directUnitCost": 50 }
]
}Currency translation
currencyCode follows the ISO convention: the blank local currency (LCY) round-trips as the empty string, and a foreign ISO code is translated to and from the Business Central currency code on read and write.
Bound actions
release performs a manual release and reopen returns a released credit memo to Open. post releases the credit memo on its way through, so use release when you want it released and left unposted for a person to check.
POST/purchaseCreditMemos({id})/Microsoft.NAV.release
The bound action post sets Invoice := true and runs Purch.-Post, turning the credit memo into a posted document.
POST/purchaseCreditMemos({id})/Microsoft.NAV.post
archive / cancel snapshot a version and keep the credit memo open, or archive then delete it (soft delete). See Archiving & cancelling.
totalAmountExcludingTax, totalTaxAmount, totalAmountIncludingTax) are computed from the lines and are read-only.