搜寻
接口描述
| 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
响应示例
{
"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
响应示例
{
"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 | String |
|
| warning | warning | true | String | 错误信息 |
调用示例
index.php?route=account/register/api
调用验证码
index.php?route=extension/captcha/basic_captcha/captcha
响应示例
{
"success": "success"
}
会员登入
接口描述
| URL | index.php?route=account/login/api |
| 功能描述 | 会员登入 |
| 返回格式 | Json,UTF8 |
| HTTP请求方式 | POST |
业务参数
| 参数名 | 参数全称 | 必选 | 参数类型 | 参数描述 |
|---|
| email | email | true | String | 邮箱地址 |
| password | password | true | String | 密码 |
返回参数
| 参数名 | 参数全称 | 必选 | 参数类型 | 参数描述 |
|---|
| success | success | true | String |
|
调用示例
index.php?route=account/login/api
响应示例
{
"success": "Login Success",
"customer": {
"firstname": "admin",
"lastname": "test",
"email": "abc@abc.cn",
"gender": "F"
}
}注销退出
index.php?route=account/logout/api
响应示例
{
"success": "Logout Success"
}
忘记密码
接口描述
| URL | index.php?route=account/forgotten/api |
| 功能描述 | 忘记密码 |
| 返回格式 | Json,UTF8 |
| HTTP请求方式 | POST |
业务参数
| 参数名 | 参数全称 | 必选 | 参数类型 | 参数描述 |
|---|
| email | email | true | String | 邮箱地址 |
返回参数
| 参数名 | 参数全称 | 必选 | 参数类型 | 参数描述 |
|---|
| success | success | true | String |
|
| warning | warning | true | String | 错误信息 |
调用示例
index.php?route=account/forgotten/api
响应示例
{
"success": "成功 新密码已发送到您的邮箱,请及时查收!"
}