Skip to content

Delete Partner

Delete a partner and all associated data.

WARNING

Requires super-admin role.

DANGER

This action is irreversible and will delete all agencies, vehicles, and bookings associated with the partner.

Endpoint

INFO

DELETE /api/v1/dashboard/partners/{partner}

Headers

HeaderValueRequired
Acceptapplication/jsonYes
AuthorizationBearer {token}Yes

Path Parameters

ParameterTypeDescription
partnerintegerPartner ID

Example Request

bash
curl -X DELETE https://api.daakey.com/api/v1/dashboard/partners/1 \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}"

Response

Success (200)

json
{
  "success": true,
  "message": "Partner deleted",
  "data": null,
  "request_id": "uuid",
  "timestamp": "2024-01-01T00:00:00.000Z"
}

Error (400)

json
{
  "success": false,
  "message": "Cannot delete partner",
  "data": {
    "reason": "Partner has active bookings",
    "active_bookings": 5
  },
  "request_id": "uuid",
  "timestamp": "2024-01-01T00:00:00.000Z"
}

Notes

  • Partners with active bookings cannot be deleted
  • Consider deactivating instead of deleting to preserve history

Daakey Car Sharing Platform