Update Partner
Update an existing partner's information.
WARNING
Requires super-admin role.
Endpoint
INFO
PUT /api/v1/dashboard/partners/{partner}
Headers
| Header | Value | Required |
|---|---|---|
Content-Type | application/json | Yes |
Accept | application/json | Yes |
Authorization | Bearer {token} | Yes |
Path Parameters
| Parameter | Type | Description |
|---|---|---|
partner | integer | Partner ID |
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | No | Partner name |
email | string | No | Contact email |
phone | string | No | Contact phone |
address | string | No | Physical address |
logo | file | No | Partner 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