Skip to main content

Create Marker

Create a new bamboo marker with optional image upload.

POST /api/v1/markers/

Headers

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

Form Data

FieldTypeRequiredDescription
namestringYesMarker name
latitudestringYesGPS latitude
longitudestringYesGPS 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 created successfully"
},
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"short_code": "ABC123",
"creator_id": "660e8400-e29b-41d4-a716-446655440000",
"name": "Bamboo Cluster A",
"description": "Large bamboo cluster near the river",
"strain": "Bambusa vulgaris",
"quantity": 50,
"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-01T00:00:00Z"
}
}
note
  • short_code is auto-generated (6-character alphanumeric)
  • creator_id is automatically set from the authenticated user
  • Image is uploaded to Google Drive with filename {shortCode}.{ext}