Skip to main content

Reset Test Clients

Delete test clients to re-run the onboarding flow from scratch.

Overview

When testing the client onboarding flow multiple times with the same email, the matching algorithm returns 409 conflicts. The reset endpoints let you delete test clients so you can start fresh.

Available on test environment only. These endpoints return 403 Forbidden in production.

Check if Deletable

Before deleting, verify the client has no blocking data:

GET https://referral-api-test.debitura.com/clients/{externalTenantId}/is-deletable
XApiKey: YOUR_API_KEY

Response:

{
"isDeletable": true,
"blockers": []
}

If isDeletable is false, the blockers array explains why:

BlockerSolution
Creditor either has or had active invoices.Close or delete active cases first
Creditor either has or had active leads.Remove leads with active quotes first

Delete the Client

Once verified deletable:

DELETE https://referral-api-test.debitura.com/clients/{externalTenantId}
XApiKey: YOUR_API_KEY

Returns 204 No Content on success.

What gets deleted:

  • The Creditor account (soft-deleted)
  • The ReferralPartnerClientLink (archived)
  • Associated users (if they have no other creditor relations)

What remains:

  • Any cases created for reference

After Reset

Call POST /clients with the same email:

  • The matching algorithm won't find the deleted client
  • A new client is created
  • IsAttributedClient is true (treated as new introduction)

Constraints

  • Your clients only — You can only delete clients linked to your partner account
  • Pending approvals unaffected — If a client hasn't approved a link request (409 scenario), there's nothing to delete yet. The link request simply expires after 7 days.

Error Handling

StatusCauseSolution
403 ForbiddenProduction environmentOnly available on test
404 Not FoundNo active link for this externalTenantIdVerify the tenant ID and that the client was fully onboarded
422 UnprocessableClient has blockersCheck is-deletable first and resolve blockers

See Error Handling for the full error response format.