Skip to content

Update Station

Update an existing station's information.

Endpoint

INFO

PUT /api/v1/dashboard/stations/{station}

Headers

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

Path Parameters

ParameterTypeDescription
stationintegerStation ID

Request Body

ParameterTypeRequiredDescription
namestringNoStation name
addressstringNoPhysical address
latitudedecimalNoLocation latitude
longitudedecimalNoLocation longitude
phonestringNoContact phone
emailstringNoContact email
operating_hoursobjectNoOperating hours
amenitiesarrayNoList of amenities
statusstringNoStatus: 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"
}

Daakey Car Sharing Platform