แก้ไข Details ตาม Place UID
ใช้ API ต่อไปนี้เพื่ออัปเดตข้อมูลรายละเอียดของสถานที่ (place) ทั้งหมดที่อัปโหลดไว้ในโปรเจกต์หนึ่ง
ใช้ API ต่อไปนี้เพื่ออัปเดตข้อมูลรายละเอียดของสถานที่ (place) ทั้งหมดที่อัปโหลดไว้ในโปรเจกต์หนึ่ง
📍 PUT /open-api/v1/place/{id}
ส่วนหัวของคำขอ (Request Header)
| คีย์ | ค่า | คำอธิบาย |
|---|---|---|
| api-key | {YOUR_API_Key} |
พารามิเตอร์พาธ (Path Parameter)
| คีย์ | ค่า | คำอธิบาย |
|---|---|---|
| id | Number | หมายเลขเฉพาะของสถานที่ที่ต้องการค้นหา |
เนื้อหาคำขอ (Request Body)
{
"categoryId" : 1,
"placeAreaUid" : "B01",
"imageId" : 13,
"trn" : [
{
"language" : "def",
"description" : "description",
"name" : "place name 1"
}
]
}
📦 Response Body หลังอัปเดตสถานที่
200
{
"id": 2,
"placeAreaUid": "B01",
"image": {
"id": 13,
"type": "place",
"image": [
{
"id": 12,
"url": "https://…"
}
]
},
"createDate": "2025-07-16 10:49:52",
"updateDate": "2025-07-16",
"trn": [
{
"language": "def",
"name": "place name 1",
"description": "description"
}
],
"category": "Main category",
"subCategory": "Sub category"
}
400
{
"error": "Invalid request"
}
💻 ตัวอย่าง cURL แก้ไข Details ของสถานที่
curl --location --request PUT 'https://space.api-freegrow.com/open-api/v1/place/2'
--header 'api-key: {YOUR_API_KEY}'
--header 'Content-Type: application/json'
--data '{
"categoryId" : 1,
"placeAreaUid" : "B01",
"imageId" : 13,
"trn" : [
{
"language" : "def",
"description" : "description",
"name" : "place name 1"
}
]
}'
เอกสารที่เกี่ยวข้อง
- คู่มือทั่วไป GrowStudio API
- เรียก Place UID List
- เรียก Details ตาม Place UID
- เรียก Project geojson
- เรียก geojson ตามชั้น
- แก้ไข map color ตาม Place
หากต้องการทราบวิธีใช้บริการ ดูคู่มือ GrowStudio ได้ที่นี่