Cancel Document Credit Assignment

The CancelDocumentCreditAssignment API is used to cancel a specific document credit assignment in OCS.io. This API is used when there’s a need to revoke a previously assigned document credit.

API Overview

Fields Required for Document Credit Assignment Cancellation

The following table lists and describes the fields required to cancel a document credit assignment through the CancelDocumentCreditAssignment API:

Field Description

account

ID (Ref ID/ External ID ) of the Account.

monetaryTransactionRefId

ID (Ref ID) of the Monetary Transaction.

reason

Reason for Cancellation.

Detailed API documentation and endpoint specifics are available here.

Request Validations

The following validations are performed when cancelling a document credit assignment:

Cancel a Document Credit Assignment Example

Use the following request’s body to cancel a document credit assignment:

{
  "requestId": "{{$guid}}",
  "user": "crm",
  "account": {
    "externalId": "account_external_id"
  },
  "monetaryTransactionRefId": "monetary_transaction_id",
  "reason": "cancellation_reason"
}

The outcome of the API call is as follows:

  • It is validated, that the Monetary Transaction identified by monetaryTransactionRefId must belong to the account with External ID account_external_id

  • The document credit assignment with reference ID monetary_transaction_id is cancelled

  • The cancellation reason is cancellation_reason