Cancel Purchase Credit Memo

Prev Next
Post
/softera/softeraEInvoice/v2.0/companies({companyId})/purchaseCreditMemos({purchaseCreditMemoId})/Microsoft.NAV.cancel

Cancels a posted purchase credit memo by creating and posting a corrective purchase invoice (codeunit Cancel Posted Purch. Cr. Memo). Works only on posted credit memos that are not already canceled. If cancelation fails, the error states whether a corrective invoice was posted, created but not posted, or not created.

Security
OAuth
FlowClient Credentials
Token URLhttps://login.microsoftonline.com/{tenantId}/oauth2/v2.0/token
Scopes:
https://api.businesscentral.dynamics.com/.defaultGrants the permissions assigned to the Microsoft Entra ID application in Business Central
Path parameters
companyId
string (uuid) Required

GUID for targeted Company

Example54c4066e-2b2b-4118-ac75-7dfea25be205
purchaseCreditMemoId
string (uuid) Required

SystemId (GUID) of the purchase credit memo

Example7c41e2a9-5d1b-f011-9346-002248a0b478
Responses
204

No Content

400

Bad Request

Expand All
object
error
object
code
string
ExampleBadRequest
message
string
ExampleThe field Customer No. of table Sales Header contains a value (P9999999) that cannot be found in the related table (Customer). CorrelationId: fc7b9039-73d9-48d2-a9d3-9a8e0f8b91da.
401

Unauthorized

Headers
WWW-Authenticate
string
Expand All
object
error
object
code
string
Default"Unauthorized"
message
string
Default"The credentials provided are incorrect"
404

Not Found

Expand All
object
error
object
code
string
ExampleBadRequest_ResourceNotFound
message
string
ExampleResource not found for the segment 'dimensionValues'. CorrelationId: fc7b9039-73d9-48d2-a9d3-9a8e0f8b91da.