Reset a client (test environment only)
DELETE/clients/:externalTenantId
Deletes a client and all associated data, 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 (cascade)
- All collection cases and invoices for the client
- All leads for the client
- The Creditor account (removes email from matching algorithm)
- The ReferralPartnerClientLink is archived
- Associated users are cleaned up if they have no other relations
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
Request
Responses
- 204
- 403
- 404
- 500
Client and all associated data successfully deleted
Endpoint not available in production environment
No active client link found for this externalTenantId
Internal server error