Skip to content

Toggle Partner Status

Activate or deactivate a partner.

WARNING

Requires super-admin role.

Endpoint

INFO

PATCH /api/v1/dashboard/partners/{partner}/toggle-status

Headers

HeaderValueRequired
Acceptapplication/jsonYes
AuthorizationBearer {token}Yes

Path Parameters

ParameterTypeDescription
partnerintegerPartner ID

Example Request

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

Response

Success (200)

json
{
  "success": true,
  "message": "Partner status updated",
  "data": {
    "id": 1,
    "name": "Acme Car Rentals",
    "status": "inactive",
    "updated_at": "2024-01-15T00:00:00Z"
  },
  "request_id": "uuid",
  "timestamp": "2024-01-01T00:00:00.000Z"
}

Error (400)

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

Notes

  • Deactivating a partner also deactivates all agencies
  • Deactivated partners cannot accept new bookings
  • Existing bookings continue until completion

Daakey Car Sharing Platform