Skip to main content
DELETE
/
api
/
v2
/
admin
/
tenants
/
{id}
Delete tenant
curl --request DELETE \
  --url https://faisalshop.mvp-apps.ae/api/v2/admin/tenants/{id} \
  --header 'Authorization: Bearer <token>'

Overview

Delete a tenant (organization). This uses soft deletes, so the tenant can be recovered if needed.

Authorization

  • User must be authenticated with a valid Bearer token
  • User must have ADMIN role in the tenant

Soft Deletes

Tenants are soft-deleted, meaning:
  • The tenant is marked as deleted but not removed from the database
  • Associated data is preserved
  • The tenant can be restored if needed
  • Deleted tenants don’t appear in normal queries

Important Considerations

Before deleting a tenant:
  • Ensure all team members are notified
  • Export any important data
  • Consider archiving instead of deleting
  • Review associated products, orders, and customers

Example Usage

curl -X DELETE \
  https://faisalshop.mvp-apps.ae/api/v2/admin/tenants/123 \
  -H 'Authorization: Bearer YOUR_TOKEN'
await axios.delete(
  `/api/v2/admin/tenants/${tenantId}`,
  {
    headers: {
      Authorization: `Bearer ${token}`
    }
  }
);

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

tenantId
integer
required

Tenant ID

Response

200

Tenant deleted