---
# System prepended metadata

title: APP init
tags: [共通]

---

# APP init

**API 修改紀錄**
|版本|日期|備註|
| ------------ |------------ |------------ |
| v1 |2024/03/15| 發佈 |
| v1.1 |2024/04/16| 加入app語系 |
| v1.2 |2024/04/17| 加入潛水模式資訊 |
| v1.3 |2024/05/17| 加入手錶可連結型號清單 |
| v1.4 |2024/05/17| 將語系移到APP 語系 init的API裡 |
| v1.5 |2025/03/03| 新增電腦錶設定類型|

**開啟APP後 Call此支API進行APP與SERVER端的資料同步**
1. 目前所有手錶的最新韌體版本號及型號名稱
2. 手錶可連結型號清單
3. 潛水模式資訊 RGB ICon


#### 網址
https://{domain}/api/v1/app/index

#### Http Method
GET

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

#### HTTP Request Body 傳入參數

|欄位名稱|必填|型態|欄位|備註|
| ------------ | :-----------: |:-----------: |------------ |------------ |


#### HTTP Response 回傳參數

|Name|Type|說明|
| ------------ | ------------ |------------ |
| device_list | Array |所有手錶資訊 |
| bluetooth_list | Array |手錶可連結型號清單 |
| setting_list | Array |電腦錶設定類型清單 |
| dive_mode_list | Array |潛水模式資料 |




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

#### Json Example
Request Json


Response Json Success
```json

{
    "status": true,
    "code": 200,
    "message": "success",
    "result": {
        "device_list": [
            {
                "firmware_name": "123123", //最新韌體名稱
                "name": "CREST-CR5L" //手錶名稱
            },
            {
                "firmware_name": "3213213",
                "name": "Crest-CR4"
            },
            {
                "firmware_name": "SH1008",
                "name": "SHERWOOD-Logic"
            }
        ],
        "bluetooth_list": {
            "None": [ //未被分類
                "TEST"
            ],
            "CR1": [
                "CR1"
            ],
            "CR4": [
                "CREST-CR4P",
                "CR4P",
                "Crest-CR4",
                "CR4"
            ],
            "CR5": [
                "CREST-CR5L",
                "CR5L",
            ],
            "General": [
                "SHERWOOD-Logic",
            ]
        },
        "setting_list": {
            "None": [ //未被分類
                "TEST"
            ],
            "CR1": [
                "CR1"
            ],
            "CR4": [
                "CREST-CR4P",
                "CR4P",
                "Crest-CR4",
                "CR4"
            ],
            "CR5": [
                "CREST-CR5L",
                "CR5L",
            ],
            "General": [
                "SHERWOOD-Logic",
            ],
            "General-GAD001": [
                "SHERWOOD-Logic",
            ]
        },
        "dive_mode_list": [
            {
                "code": "0",
                "name": "Scuba",
                "imageUrl": "url",
                "start_rgb": {
                    "r": 255,
                    "g": 255,
                    "b": 255
                },
                "end_rgb": {
                    "r": 184,
                    "g": 203,
                    "b": 184
                }
            },
            ....
        ]
    }
}
```

Response Json Error
