Delete counterparty
Delete a counterparty.
Permanently deletes the counterparty. System counterparties (the tenant catch-all records) cannot be deleted. Issued invoices, transactions, and catalog payment methods are kept: this counterparty link is cleared, so they become unlinked rather than deleted or moved to Default System. Shared payment methods stay linked to their other counterparties. Existing matches between invoices and transactions are unchanged.
Path parameters
| Name | Type | Required |
|---|---|---|
codeCounterparty code (`account_code`). Example: CPT-042 | string Max 50 | Required |
Errors
This operation can return the following errors in addition to generic HTTP failures.
| Error | HTTP code | Description |
|---|---|---|
Missing Bearer token | 401 | The Authorization header is missing or is not a Bearer token. |
Invalid or revoked API key | 401 | The API key is unknown, malformed, expired, or has been revoked. |
API key is missing scope counterparties:write | 403 | The key does not include counterparties:write. A write scope does not imply the matching read scope. |
Too many requests, please try again later | 429 | Wait and retry. The Retry-After header is the number of seconds to wait. |
Counterparty not found | 404 | No counterparty with this code exists in the authenticated tenant. |
Cannot delete a system counterparty | 403 | The counterparty is a system record (for example Unclassified) and is not deletable. |
Internal server error | 500 | Unexpected server error. The JSON body includes correlationId. Retry with backoff. |