Update Station
Update an existing station's information.
Endpoint
INFO
PUT /api/v1/dashboard/stations/{station}
Headers
| Header | Value | Required |
|---|---|---|
Content-Type | application/json | Yes |
Accept | application/json | Yes |
Authorization | Bearer {token} | Yes |
Path Parameters
| Parameter | Type | Description |
|---|---|---|
station | integer | Station ID |
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | No | Station name |
address | string | No | Physical address |
latitude | decimal | No | Location latitude |
longitude | decimal | No | Location longitude |
phone | string | No | Contact phone |
email | string | No | Contact email |
operating_hours | object | No | Operating hours |
amenities | array | No | List of amenities |
status | string | No | Status: active, inactive |
Example Request
bash
curl -X PUT https://api.daakey.com/api/v1/dashboard/stations/1 \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-d '{
"name": "Downtown Station - Main",
"amenities": ["parking", "charging", "restroom", "wifi", "24h_access"]
}'Response
Success (200)
json
{
"success": true,
"message": "Station updated",
"data": {
"id": 1,
"name": "Downtown Station - Main",
"amenities": ["parking", "charging", "restroom", "wifi", "24h_access"],
"updated_at": "2024-01-15T00:00:00Z"
},
"request_id": "uuid",
"timestamp": "2024-01-01T00:00:00.000Z"
}