搜尋
接口描述
| URL | /index.php?route=product/search/api |
| 功能描述 | 通過關鍵詞搜商品 |
| 返回格式 | Json,UTF8 |
| HTTP請求方式 | GET |
業務參數
| 參數名 | 參數全稱 | 必选 | 參數类型 | 參數描述 |
|---|
| search | search | true | String | 查詢關鍵詞 |
| limit | limit | false | Int | 每頁返回結果數 默認:15 |
| page | page | false | Int | 查詢第幾頁數據 |
返回參數
| 參數名 | 參數全稱 | 必选 | 參數類型 | 參數描述 |
|---|
| total | total | true | Int | 結果條數 |
| product_id | product_id | true | Int | 商品 ID |
| thumb | thumb | true | String | 圖片地址 |
| name | name | true | String | 名稱 |
| description | description | true | String | 描述 |
| price | price | true | String | 價格 |
| special | special | true | String | 優惠價格 |
| tax | tax | true | String | 價格含稅 |
| minimum | minimum | true | Int | 最小起訂數量 |
| rating | rating | true | Int | 評價 |
| href | href | true | String | 商品 API |
| search | search | true | String | 關鍵詞 |
调用示例
/index.php?route=product/search/api&search=abc
響應示例
{
"success": true,
"message": "",
"total": "1",
"products": [
{
"product_id": "80",
"thumb": "/image/cache/catalog/TB2fhHlb4vzQeBjSZFxXXXLBpXa_!!12883669.jpg_270x270-300x300.jpg",
"name": "LED 家具燈",
"description": "..",
"price": "HK $300.00",
"special": "HK $290.00",
"tax": false,
"minimum": "1",
"rating": 0,
"href": "/index.php?route=product/product/api&product_id=80&search=abc"
}
......
],
"search": "abc"
}
熱門推介
接口描述
| URL | /index.php?route=common/home/featured_api |
| 功能描述 | 熱門推介 |
| 返回格式 | Json,UTF8 |
| HTTP請求方式 | GET |
返回參數
同上
调用示例
/index.php?route=common/home/featured_api
響應示例
{
"success": true,
"message": "",
"products": [
{
"product_id": "76",
"thumb": "/image/cache/catalog/TB2fhHlb4vzQeBjSZFxXXXLBpXa_!!12883669.jpg_270x270-300x300.jpg",
"name": "女士服裝",
"description": "..",
"price": "HK $300.00",
"special": "HK $288.00",
"tax": false,
"rating": 0,
"href": "/index.php?route=product/product/api&product_id=76"
}
......
]
}
會員註冊
接口描述
| URL | /index.php?route=account/register/api |
| 功能描述 | 會員註冊 |
| 返回格式 | Json,UTF8 |
| HTTP請求方式 | POST |
業務參數
| 參數名 | 參數全稱 | 必选 | 參數类型 | 參數描述 |
|---|
| firstname | firstname | true | String | 名字 |
| lastname | lastname | true | String | 姓氏 |
| gender | gender | true | String | 性别 M(ale):男 F(emale):女 |
| email | email | true | String | 電子郵箱 |
| password | password | true | String | 密碼 |
| confirm | confirm | true | String | 確認密碼 |
| agree | agree | true | Int | 閱讀並同意 Privacy Policy 1:有效,0:沒有 |
| captcha | captcha | true | String | 驗證碼 |
返回參數
| 參數名 | 參數全稱 | 必选 | 參數類型 | 參數描述 |
|---|
| success | success | true | Bool |
|
| message | message | true | String | 錯誤信息 |
调用示例
/index.php?route=account/register/api
调用驗證碼
/index.php?route=extension/captcha/basic_captcha/captcha
響應示例
{
"success": true,
"message": ""
}
會員登入
接口描述
| URL | /index.php?route=account/login/api |
| 功能描述 | 會員登入 |
| 返回格式 | Json,UTF8 |
| HTTP請求方式 | POST |
業務參數
| 參數名 | 參數全稱 | 必选 | 參數类型 | 參數描述 |
|---|
| email | email | true | String | 郵箱地址 |
| password | password | true | String | 密碼 |
返回參數
| 參數名 | 參數全稱 | 必选 | 參數類型 | 參數描述 |
|---|
| success | success | true | Bool |
|
调用示例
/index.php?route=account/login/api
響應示例
{
"success": true,
"message": "Login Success",
"customer": {
"firstname": "admin",
"lastname": "test",
"email": "abc@abc.cn",
"gender": "F"
}
}註銷退出
/index.php?route=account/logout/api
響應示例
{
"success": true,
"message": "Logout Success"
}
忘記密碼
接口描述
| URL | /index.php?route=account/forgotten/api |
| 功能描述 | 忘記密碼 |
| 返回格式 | Json,UTF8 |
| HTTP請求方式 | POST |
業務參數
| 參數名 | 參數全稱 | 必选 | 參數类型 | 參數描述 |
|---|
| email | email | true | String | 郵箱地址 |
返回參數
| 參數名 | 參數全稱 | 必选 | 參數類型 | 參數描述 |
|---|
| success | success | true | Bool |
|
| message | message | true | String | 錯誤信息 |
调用示例
/index.php?route=account/forgotten/api
響應示例
{
"success": true,
"message": "成功 新密碼已發送到您的郵箱,請及時查收!"
}