Reset a client (test environment only)
DELETE/clients/:externalTenantId
Deletes a client and their link, allowing you to re-create the client from scratch.
⚠️ TEST ENVIRONMENT ONLY - This endpoint is only available on the test environment (testreferral-api.debitura.com). Calling this endpoint on production will return 403 Forbidden.
Use Cases
- Testing the full onboarding flow multiple times
- Resetting after changing your internal tenant structure during development
- Cleaning up test data without manual intervention
What Gets Deleted
- The Creditor account is soft-deleted (removes email from matching algorithm)
- The ReferralPartnerClientLink is archived
- Associated users are cleaned up if they have no other relations
Prerequisites
- The client must not have active collection cases or leads with quotes
- Use the 'is-deletable' endpoint to check before calling delete
After Reset
- You can call POST /clients with any externalTenantId using the same email
- The matching algorithm will not find the deleted client
- A completely new client will be created (IsAttributedClient=true)
Important
- You can only reset clients that are linked to your partner account
- Pending link requests (409 scenario) cannot be reset - only actual links
- If the client has active cases, deletion will fail with 422
Request
Responses
- 204
- 403
- 404
- 422
- 500
Client successfully deleted
Endpoint not available in production environment
No active client link found for this externalTenantId
Client cannot be deleted (has active cases or leads)
Internal server error