Skip to content

Update Partner

Update an existing partner's information.

WARNING

Requires super-admin role.

Endpoint

INFO

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

Headers

HeaderValueRequired
Content-Typeapplication/jsonYes
Acceptapplication/jsonYes
AuthorizationBearer {token}Yes

Path Parameters

ParameterTypeDescription
partnerintegerPartner ID

Request Body

ParameterTypeRequiredDescription
namestringNoPartner name
emailstringNoContact email
phonestringNoContact phone
addressstringNoPhysical address
logofileNoPartner logo

Example Request

bash
curl -X PUT https://api.daakey.com/api/v1/dashboard/partners/1 \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}" \
  -d '{
    "name": "Acme Car Rentals Inc",
    "phone": "+1987654321"
  }'

Response

Success (200)

json
{
  "success": true,
  "message": "Partner updated",
  "data": {
    "id": 1,
    "name": "Acme Car Rentals Inc",
    "code": "ACME001",
    "email": "contact@acme.com",
    "phone": "+1987654321",
    "address": "123 Business Ave, New York, NY",
    "status": "active",
    "updated_at": "2024-01-15T00:00:00Z"
  },
  "request_id": "uuid",
  "timestamp": "2024-01-01T00:00:00.000Z"
}

Notes

  • Partner code cannot be changed
  • Only provided fields are updated

Daakey Car Sharing Platform