Skip to content

Counterparty Type Still Referenced

URI: https://docs.ankatech.co/errors/counterparty-type-referenced
HTTP Status: 409 Conflict

When you see this

You tried to delete a counterparty type that is still referenced by existing resources. Remove or reassign the references first.

Common Causes

  • Deleting a counterparty type that active exchange contexts or grants still use.
  • Existing records depending on the counterparty type being removed.
  • References to the counterparty type that have not yet been cleared.

Response Example

{
  "type": "https://docs.ankatech.co/errors/counterparty-type-referenced",
  "title": "Counterparty Type Still Referenced",
  "status": 409,
  "detail": "Counterparty type 'BANK' is still referenced by existing resources and cannot be deleted.",
  "instance": "/api/v3/admin/counterparty-types/BANK",
  "correlationId": "550e8400-e29b-41d4-a716-446655440000",
  "timestamp": 1730000000
}

Content-Type: application/problem+json — the response follows RFC 7807 Problem Details.

How to Resolve

  1. List the resources that reference the counterparty type (the detail field indicates the dependency).
  2. Remove or reassign those references first.
  3. Re-attempt the deletion once the counterparty type is no longer referenced.

For full schema definitions, examples, and interactive testing, see the Developer Hub Reference.