---
# System prepended metadata

title: 潛水日誌上傳-CR1
tags: [日誌]

---

# 潛水日誌上傳-CR1

**API 修改紀錄**
|版本|日期|備註|
| ------------ |------------ |------------ |
| v1 |2024/02/23| 發佈 |
| v1.1 |2024/02/26| remoteId修改成serial_number |

**潛水日誌上傳-CR1**

同步完成後如果需要列表，請在另外呼叫列表Api
一次上傳一個檔案，如有多個檔案，可以呼叫多次

#### 網址
https://{domain}/api/v1/member-dive-log/sync

#### Http Method
FORM POST

#### HTTP Header
accept-language : language code
apikey : apk key

#### HTTP Request Body 傳入參數

|欄位名稱|必填|型態|欄位|備註|
| ------------ | :-----------: |:-----------: |------------ |------------ |
|file |Y |FILE |檔案 |file |
|from |Y |string | 來自哪裡| sync_log|
|serial_number |Y |string | 手錶序號| 



#### HTTP Response 回傳參數

|Name|Type|說明|
| ------------ | ------------ |------------ |
|status  |boolen |狀態 |
|code  |string |Response Code |
|message  |string |說明 |


#### Request Header Authoriztion
```json
{
    "accept-language" : "en",     //or 'zh_tw'
    "apikey" : "api key string"
}
```

#### Json Example
Request Form Data
```json
{
    "file": FILE,
    "from": "sync_log",
    "serial_number" : "string...."
}
```


Response Json Success
```json
{
    "status": true,
    "code": 200,
    "message": "sync success",
    "result": 2
}
```
Response Json Error
```json
{
    "status": false,
    "code": 422,
    "message": "request data error(lost device id)",
    "result": null
}
```
