Skip to main content

Update Marker

Update an existing marker. Only provided fields are updated (partial update supported).

PUT /api/v1/markers/{id}

Parameters

ParameterTypeLocationDescription
iduuidpathMarker ID

Headers

Authorization: Bearer {access_token}
Content-Type: multipart/form-data

Form Data

FieldTypeRequiredDescription
namestringNoMarker name
latitudestringNoGPS latitude
longitudestringNoGPS longitude
descriptionstringNoDetailed description
strainstringNoBamboo species/strain
quantityintegerNoNumber of bamboo (>= 0)
owner_namestringNoLand owner's name
owner_contactstringNoOwner's contact info
imagefileNoImage file (max 10MB)

Response

{
"meta": {
"success": true,
"message": "Marker updated successfully"
},
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"short_code": "ABC123",
"creator_id": "660e8400-e29b-41d4-a716-446655440000",
"name": "Bamboo Cluster A - Updated",
"description": "Updated description",
"strain": "Bambusa vulgaris",
"quantity": 75,
"latitude": "-7.797068",
"longitude": "110.370529",
"image_url": "https://drive.google.com/uc?id=...",
"owner_name": "Pak Bambang",
"owner_contact": "081234567890",
"created_at": "2025-01-01T00:00:00Z",
"updated_at": "2025-01-02T00:00:00Z"
}
}
note

If a new image is provided, the old image is deleted from Google Drive before uploading the new one.