Withdraw an attributed client
POST/clients/:externalTenantId/withdraw
Withdraws a client that never completed onboarding. Archives the referral partner link and closes all pending cases with close code CaseNeverStartedInternal.
The same externalTenantId can be re-submitted via POST /clients after withdrawal.
Path Parameter
- externalTenantId - Your internal identifier for the client
Business Rules
- Only attributed clients (IsAttributedClient = true) can be withdrawn
- All cases for this client must be in PendingContractSigning status
What Happens
- The referral partner client link is archived
- All pending cases are closed with close code CaseNeverStartedInternal
What Does NOT Happen
- The client record itself is not deleted or anonymised. The company, its users, its KYC record and any signed agreements are all retained
After Withdrawal
- The same externalTenantId can be re-submitted via POST /clients
- Provided the re-submission still identifies the SAME client — that is, it carries a user email or supportEmail already registered on it — it re-links that original client rather than creating a second one: a new active link is established on the same Debitura client, attribution (IsAttributedClient=true) is preserved, and the archived link is kept for audit. The call returns 201/202 as normal — not a 409
- Any cases in the re-submission are created against that client. A CreditorReference used by a case that this withdrawal closed can be reused, because such a case no longer reserves it
- Any approval request left pending for this externalTenantId is resolved as declined, since the link it was asking the client to approve now exists
- Re-submitting with entirely different contact emails does NOT re-link. A matching email is our only independent confirmation that this is the same client; without one we cannot tell a genuine re-submission apart from the same externalTenantId being reused for somebody else — so a new client is created, exactly as before this behaviour existed
- The re-link does not update the client or add users. Client details and Users in the re-submission are ignored, and the new link keeps the original onboarding user
- Re-linking only applies to your own withdrawn client. If the externalTenantId now resolves to a different client, or that client has since linked to another partner, the normal 409 ClientExistsNeedsLinking / AlreadyLinkedToAnotherPartner handling applies unchanged
Error Cases
- 404 Not Found - No active client link exists for this externalTenantId and your partner account
- 409 Conflict - Client cannot be withdrawn because:
- IsAttributedClient = false (non-attributed clients cannot be withdrawn)
- One or more cases have progressed beyond PendingContractSigning
Request
Responses
- 204
- 404
- 409
- 500
Client withdrawn successfully
No active client link found for this externalTenantId
Cannot withdraw — client not attributed or cases have progressed beyond onboarding
Internal server error