# 會員_我的潛點_更新 **API 修改紀錄** |版本|日期|備註| | ------------ |------------ |------------ | | v1 |2024/05/15| 發佈 | | v1 |2024/05/20| 更改欄位名稱 name -> spot_name| **會員_我的潛點_更新** 使用 [圖片上傳API](https://hackmd.io/Lq4vMNGvQkGKmkWzR32jJg) 把回傳的資料push到image array 刪除直接變更image array 後儲存 #### 網址 https://{domain}/api/v1/dive-site/update #### Http Method POST #### HTTP Header accept-language : language code apikey : apk key #### HTTP Request Body 傳入參數 |欄位名稱|必填|型態|欄位|備註| | ------------ | :-----------: |:-----------: |------------ |------------ | |id|Y|int |潛點id |status|Y|boolean |狀態| false:停用 true:啟用 |spot_name|Y|string |潛點名稱(spot) |site_name|N|string |潛點名稱(site) |latitude|Y|float |緯度 |longitude|Y|float |經度 |deep_start|N|float |起始深度範圍|公尺 |deep_end|N|float |結束深度範圍|公尺 |visibility|N|float |能見度|公尺 |categories|N|array |類型 |exp_levels|N|array |經驗等級 |image|N|array |圖片檔案 |description|N|string |特點描述 |notice|N|string |注意事項 #### HTTP Response 回傳參數 |Name|Type|說明| | ------------ | ------------ |------------ | #### Request Header Authoriztion ```json { "accept-language" : "en", //or 'zh_tw' "apikey" : "api key string" } ``` #### Json Example Request Json ```json { "id": 1, "status": true, "spot_name": "東澳漁港", "site_name": "台灣,新北市 萬里區", "latitude": 30.0404682159424, "longitude": -85.6215286254883, "deep_start": 10.2, "deep_end": 30.5, "visibility": 10.5, "categories": [ { "id": 1, "name": "岸灣" }, { "id": 2, "name": "礁石" }, { "id": 3, "name": "海洋" }, { "id": 4, "name": "技術" } ], "exp_levels": [ { "id": 1, "name": "岸灣" }, { "id": 2, "name": "礁石" }, { "id": 3, "name": "海洋" }, { "id": 4, "name": "技術" } ], "image": [ { "id": 2836, "response": "https://url" } ], "description": "特點描述", "notice": "注意事項" } ``` Response Json Success ```json { "status": true, "code": 200, "message": "更新資料成功", "result": 1 } ``` Response Json Error