商城数据
大约 9 分钟开发文档API接口文档
商城数据
收藏的商品-根据SKU
POST 收藏的商品
POST /front/shop/userFavoritesItem/add
收藏的商品
请求参数
名称 | 位置 | 类型 | 必选 | 说明 |
---|---|---|---|---|
item_id | query | integer | 是 | item_id |
返回示例
200 Response
{
"code": 0,
"data": {},
"error": "string",
"msg": "string",
"status": 0
}
返回结果
状态码 | 状态码含义 | 说明 | 数据模型 |
---|---|---|---|
200 | OK | OK | Inline |
201 | Created | Created | Inline |
401 | Unauthorized | Unauthorized | Inline |
403 | Forbidden | Forbidden | Inline |
404 | Not Found | Not Found | Inline |
GET 收藏的商品列表
GET /front/shop/userFavoritesItem/lists
收藏的商品列表
请求参数
名称 | 位置 | 类型 | 必选 | 说明 |
---|---|---|---|---|
createTimeEnd | query | string | 否 | 创建时间结束值 |
createTimeStart | query | string | 否 | 创建时间起始值 |
favoritesItemId | query | integer | 否 | 收藏编号 |
favoritesItemTime | query | integer | 否 | 收藏时间 |
itemId | query | integer | 否 | 商品编号 |
like[0].column | query | string | 否 | 搜索字段 |
like[0].like | query | string | 否 | 搜索字符 |
order[0].sidx | query | string | 否 | 排序字段 |
order[0].sort | query | string | 否 | 排序方式 |
page | query | integer | 否 | 分页查询页码 |
sidx | query | string | 否 | none |
size | query | integer | 否 | 分页查询每页数量 |
sort | query | string | 否 | 排序方式 |
userId | query | integer | 否 | 用户编号 |
返回示例
200 Response
{
"code": 0,
"data": {
"items": [
{
"favorites_item_id": 0,
"favorites_item_time": 0,
"item_id": 0,
"item_unit_price": 0,
"product_image": "string",
"product_item_name": "string",
"user_id": 0
}
],
"page": 0,
"records": 0,
"size": 0,
"total": 0
},
"error": "string",
"msg": "string",
"status": 0
}
返回结果
状态码 | 状态码含义 | 说明 | 数据模型 |
---|---|---|---|
200 | OK | OK | Inline |
401 | Unauthorized | Unauthorized | Inline |
403 | Forbidden | Forbidden | Inline |
404 | Not Found | Not Found | Inline |
POST 收藏的商品删除
POST /front/shop/userFavoritesItem/remove
收藏的商品删除
请求参数
名称 | 位置 | 类型 | 必选 | 说明 |
---|---|---|---|---|
item_id | query | integer | 是 | item_id |
返回示例
200 Response
{
"code": 0,
"data": {},
"error": "string",
"msg": "string",
"status": 0
}
返回结果
状态码 | 状态码含义 | 说明 | 数据模型 |
---|---|---|---|
200 | OK | OK | Inline |
201 | Created | Created | Inline |
401 | Unauthorized | Unauthorized | Inline |
403 | Forbidden | Forbidden | Inline |
404 | Not Found | Not Found | Inline |
商城移动端首页
GET 返回搜索关键词
GET /front/shop/mobile/getSearchInfo
用户最新搜索记录及系统推荐搜索关键词
返回示例
200 Response
{
"code": 0,
"data": {
"search_history_words": [
"string"
],
"search_hot_words": [
"string"
],
"suggest_search_words": {
"default_search_label": "string",
"default_search_words": "string"
}
},
"error": "string",
"msg": "string",
"status": 0
}
返回结果
状态码 | 状态码含义 | 说明 | 数据模型 |
---|---|---|---|
200 | OK | OK | Inline |
401 | Unauthorized | Unauthorized | Inline |
403 | Forbidden | Forbidden | Inline |
404 | Not Found | Not Found | Inline |
商品浏览历史表-SPU-不应该直接存数据库
GET 商品浏览历史表-SPU-不应该直接存数据库-分页列表查询
GET /front/shop/userProductBrowse/list
商品浏览历史表-SPU-不应该直接存数据库-分页列表查询
请求参数
名称 | 位置 | 类型 | 必选 | 说明 |
---|---|---|---|---|
browseDate | query | string | 否 | 浏览日期 |
browseTime | query | integer | 否 | 浏览时间 |
categoryId | query | integer | 否 | 商品分类 |
createTimeEnd | query | string | 否 | 创建时间结束值 |
createTimeStart | query | string | 否 | 创建时间起始值 |
itemId | query | integer | 否 | 商品编号 |
like[0].column | query | string | 否 | 搜索字段 |
like[0].like | query | string | 否 | 搜索字符 |
order[0].sidx | query | string | 否 | 排序字段 |
order[0].sort | query | string | 否 | 排序方式 |
page | query | integer | 否 | 分页查询页码 |
productBrowseId | query | integer | 否 | 浏览编号 |
sidx | query | string | 否 | none |
size | query | integer | 否 | 分页查询每页数量 |
sort | query | string | 否 | 排序方式 |
userId | query | integer | 否 | 会员编号 |
返回示例
200 Response
{
"code": 0,
"data": [
{
"activity_type_id": 0,
"activity_type_name": "string",
"browse_date": "2019-08-24T14:15:22Z",
"browse_time": 0,
"category_id": 0,
"item_id": 0,
"item_sale_price": 0,
"product_browse_id": 0,
"product_image": "string",
"product_item_name": "string",
"user_id": 0
}
],
"error": "string",
"msg": "string",
"status": 0
}
返回结果
状态码 | 状态码含义 | 说明 | 数据模型 |
---|---|---|---|
200 | OK | OK | Inline |
401 | Unauthorized | Unauthorized | Inline |
403 | Forbidden | Forbidden | Inline |
404 | Not Found | Not Found | Inline |
POST 商品浏览历史删除
POST /front/shop/userProductBrowse/removeBrowser
商品浏览历史删除
请求参数
名称 | 位置 | 类型 | 必选 | 说明 |
---|---|---|---|---|
browseDate | query | string | 否 | 浏览日期 |
browseTime | query | integer | 否 | 浏览时间 |
categoryId | query | integer | 否 | 商品分类 |
createTimeEnd | query | string | 否 | 创建时间结束值 |
createTimeStart | query | string | 否 | 创建时间起始值 |
itemId | query | integer | 否 | 商品编号 |
like[0].column | query | string | 否 | 搜索字段 |
like[0].like | query | string | 否 | 搜索字符 |
order[0].sidx | query | string | 否 | 排序字段 |
order[0].sort | query | string | 否 | 排序方式 |
page | query | integer | 否 | 分页查询页码 |
productBrowseId | query | integer | 否 | 浏览编号 |
sidx | query | string | 否 | none |
size | query | integer | 否 | 分页查询每页数量 |
sort | query | string | 否 | 排序方式 |
userId | query | integer | 否 | 会员编号 |
返回示例
200 Response
{
"code": 0,
"data": {},
"error": "string",
"msg": "string",
"status": 0
}
返回结果
状态码 | 状态码含义 | 说明 | 数据模型 |
---|---|---|---|
200 | OK | OK | Inline |
201 | Created | Created | Inline |
401 | Unauthorized | Unauthorized | Inline |
403 | Forbidden | Forbidden | Inline |
404 | Not Found | Not Found | Inline |
会员优惠券
POST 领取代金券
POST /front/shop/userVoucher/add
领取代金券
请求参数
名称 | 位置 | 类型 | 必选 | 说明 |
---|---|---|---|---|
activity_id | query | integer | 是 | activity_id |
返回示例
200 Response
{
"code": 0,
"data": {},
"error": "string",
"msg": "string",
"status": 0
}
返回结果
状态码 | 状态码含义 | 说明 | 数据模型 |
---|---|---|---|
200 | OK | OK | Inline |
201 | Created | Created | Inline |
401 | Unauthorized | Unauthorized | Inline |
403 | Forbidden | Forbidden | Inline |
404 | Not Found | Not Found | Inline |
GET 读取优惠券信息
GET /front/shop/userVoucher/get
读取优惠券信息
请求参数
名称 | 位置 | 类型 | 必选 | 说明 |
---|---|---|---|---|
activity_id | query | integer | 是 | activity_id |
user_voucher_id | query | integer | 否 | user_voucher_id |
currency_id | query | integer | 否 | currency_id |
返回示例
200 Response
{
"code": 0,
"data": {
"activity_id": 0,
"activity_name": "string",
"activity_rule": "string",
"activity_rule_json": {
"cutPrice": {
"cut_down_fixed_price": 0,
"cut_down_max_price": 0,
"cut_down_min_limit_price": 0,
"cut_down_min_price": 0,
"cut_down_type": 0,
"cut_down_user_num": 0,
"item_id": 0,
"item_name": "string",
"item_unit_price": 0,
"product_image": "string"
},
"giftBag": {
"activity_bag_category": "string",
"activity_detail_intro": "string",
"activity_video": "string",
"giftbag_amount": 0,
"giftbag_image": "string",
"giftbag_quantity": 0,
"giftbag_zu_image": "string",
"transport_type_id": 0
},
"groupBooking": {
"group_fixed_amount": 0
},
"groupBuyStore": {
"group_buy_limit": 0,
"group_quantity": 0,
"group_sale_price": 0,
"group_sale_quantity": 0,
"product_id": 0,
"product_image": "string",
"product_unit_price": 0
},
"lottery": {
"lottery_award": "string",
"lottery_awards_times": 0,
"lottery_day_times": 0,
"lottery_image": "string",
"lottery_max_awards_times": 0,
"lottery_not_awards_remark": "string",
"lottery_probability": "string",
"lottery_share_add_times": 0,
"lottery_subtitle": "string",
"lottery_type": 0,
"lottery_used_times": 0
},
"marketing": {
"activity_address": "string",
"activity_co_sponsor": "string",
"activity_detail_intro": "string",
"activity_image": "string",
"activity_process": "string",
"activity_sponsor": "string",
"contact_organizer": "string",
"contact_phone": 0,
"end_join_time": 0,
"guest_image": "string",
"start_join_time": 0
},
"popUp": {
"pop_up_image": "string",
"pop_up_type": 0,
"pop_up_url": "string"
},
"requirement": {
"buy": {
"item": [
0
],
"subtotal": 0
},
"points": {
"needed": 0
}
},
"rule": [
{
"item": [
0
],
"max_num": 0,
"points_double": 0,
"points_standard": 0,
"total": 0
}
],
"voucher": {
"voucher_end_date": 0,
"voucher_image": "string",
"voucher_pre_quantity": 0,
"voucher_price": 0,
"voucher_product_limit": 0,
"voucher_quantity": 0,
"voucher_quantity_free": 0,
"voucher_quantity_use": 0,
"voucher_start_date": 0
}
},
"activity_state": 0,
"id": 0,
"item_id": "string",
"item_ids": [
"string"
],
"order_id": "string",
"store_id": 0,
"store_name": "string",
"user_id": 0,
"user_voucher_activetime": "2019-08-24T14:15:22Z",
"user_voucher_id": 0,
"user_voucher_time": "2019-08-24T14:15:22Z",
"voucher_effect": false,
"voucher_end_date": 0,
"voucher_price": 0,
"voucher_start_date": 0,
"voucher_state_id": 0,
"voucher_subtotal": 0,
"voucher_type": 0,
"writeoff_code": "string"
},
"error": "string",
"msg": "string",
"status": 0
}
返回结果
状态码 | 状态码含义 | 说明 | 数据模型 |
---|---|---|---|
200 | OK | OK | Inline |
401 | Unauthorized | Unauthorized | Inline |
403 | Forbidden | Forbidden | Inline |
404 | Not Found | Not Found | Inline |
GET 列举出不同优惠券的数量
GET /front/shop/userVoucher/getEachVoucherNum
列举出不同优惠券的数量
请求参数
名称 | 位置 | 类型 | 必选 | 说明 |
---|---|---|---|---|
voucher_state_id | query | integer | 否 | voucher_state_id |
返回示例
200 Response
{
"code": 0,
"data": {
"voucher_all_num": 0,
"voucher_carcoupon_num": 0,
"voucher_offlined_num": 0,
"voucher_onlined_num": 0,
"voucher_timeout_num": 0,
"voucher_unused_num": 0,
"voucher_used_num": 0
},
"error": "string",
"msg": "string",
"status": 0
}
返回结果
状态码 | 状态码含义 | 说明 | 数据模型 |
---|---|---|---|
200 | OK | OK | Inline |
401 | Unauthorized | Unauthorized | Inline |
403 | Forbidden | Forbidden | Inline |
404 | Not Found | Not Found | Inline |
GET 会员优惠券列表
GET /front/shop/userVoucher/list
会员优惠券列表
请求参数
名称 | 位置 | 类型 | 必选 | 说明 |
---|---|---|---|---|
activityId | query | integer | 否 | 代金券模版编号 |
createTimeEnd | query | string | 否 | 创建时间结束值 |
createTimeStart | query | string | 否 | 创建时间起始值 |
itemId | query | string | 否 | 单品优惠商品编号(DOT) |
like[0].column | query | string | 否 | 搜索字段 |
like[0].like | query | string | 否 | 搜索字符 |
orderId | query | string | 否 | 订单编号 |
order[0].sidx | query | string | 否 | 排序字段 |
order[0].sort | query | string | 否 | 排序方式 |
page | query | integer | 否 | 分页查询页码 |
sidx | query | string | 否 | 排序字段 |
size | query | integer | 否 | 分页查询每页数量 |
sort | query | string | 否 | 排序方式 |
storeId | query | integer | 否 | 所属店铺编号 |
userId | query | integer | 否 | 所属用户 |
userVoucherActivetime | query | string | 否 | 使用时间 |
userVoucherId | query | integer | 否 | 代金券编号 |
userVoucherTime | query | string | 否 | 代金券发放日期 |
voucherEffect | query | string | 否 | 优惠券是否生效(BOOL): false-未生效;true-生效 |
voucherEndDate | query | string | 否 | 失效日期 |
voucherPrice | query | number | 否 | 优惠券可抵扣价格 |
voucherStartDate | query | string | 否 | 到期使用时间 |
voucherStateId | query | integer | 否 | 代金券状态(ENUM):1501-未用;1502-已用;1503-过期;1504-收回 |
voucherSubtotal | query | number | 否 | 使用优惠券的订单金额 |
voucherType | query | integer | 否 | 优惠券类型(ENUM): 0-普通优惠券;1-免拼券 |
voucherUserWay | query | integer | 否 | 使用方式 |
writeoffCode | query | string | 否 | 线下活动提货码 |
返回示例
200 Response
{
"code": 0,
"data": {
"items": [
{
"activity_id": 0,
"activity_name": "string",
"activity_rule": "string",
"activity_rule_json": {
"cutPrice": {
"cut_down_fixed_price": 0,
"cut_down_max_price": 0,
"cut_down_min_limit_price": 0,
"cut_down_min_price": 0,
"cut_down_type": 0,
"cut_down_user_num": 0,
"item_id": 0,
"item_name": "string",
"item_unit_price": 0,
"product_image": "string"
},
"giftBag": {
"activity_bag_category": "string",
"activity_detail_intro": "string",
"activity_video": "string",
"giftbag_amount": 0,
"giftbag_image": "string",
"giftbag_quantity": 0,
"giftbag_zu_image": "string",
"transport_type_id": 0
},
"groupBooking": {
"group_fixed_amount": 0
},
"groupBuyStore": {
"group_buy_limit": 0,
"group_quantity": 0,
"group_sale_price": 0,
"group_sale_quantity": 0,
"product_id": 0,
"product_image": "string",
"product_unit_price": 0
},
"lottery": {
"lottery_award": "string",
"lottery_awards_times": 0,
"lottery_day_times": 0,
"lottery_image": "string",
"lottery_max_awards_times": 0,
"lottery_not_awards_remark": "string",
"lottery_probability": "string",
"lottery_share_add_times": 0,
"lottery_subtitle": "string",
"lottery_type": 0,
"lottery_used_times": 0
},
"marketing": {
"activity_address": "string",
"activity_co_sponsor": "string",
"activity_detail_intro": "string",
"activity_image": "string",
"activity_process": "string",
"activity_sponsor": "string",
"contact_organizer": "string",
"contact_phone": 0,
"end_join_time": 0,
"guest_image": "string",
"start_join_time": 0
},
"popUp": {
"pop_up_image": "string",
"pop_up_type": 0,
"pop_up_url": "string"
},
"requirement": {
"buy": {
"item": [
0
],
"subtotal": 0
},
"points": {
"needed": 0
}
},
"rule": [
{
"item": [
0
],
"max_num": 0,
"points_double": 0,
"points_standard": 0,
"total": 0
}
],
"voucher": {
"voucher_end_date": 0,
"voucher_image": "string",
"voucher_pre_quantity": 0,
"voucher_price": 0,
"voucher_product_limit": 0,
"voucher_quantity": 0,
"voucher_quantity_free": 0,
"voucher_quantity_use": 0,
"voucher_start_date": 0
}
},
"activity_state": 0,
"id": 0,
"item_id": "string",
"item_ids": [
"string"
],
"order_id": "string",
"store_id": 0,
"store_name": "string",
"user_id": 0,
"user_voucher_activetime": "2019-08-24T14:15:22Z",
"user_voucher_id": 0,
"user_voucher_time": "2019-08-24T14:15:22Z",
"voucher_effect": false,
"voucher_end_date": 0,
"voucher_price": 0,
"voucher_start_date": 0,
"voucher_state_id": 0,
"voucher_subtotal": 0,
"voucher_type": 0,
"writeoff_code": "string"
}
],
"page": 0,
"records": 0,
"size": 0,
"total": 0
},
"error": "string",
"msg": "string",
"status": 0
}
返回结果
状态码 | 状态码含义 | 说明 | 数据模型 |
---|---|---|---|
200 | OK | OK | Inline |
401 | Unauthorized | Unauthorized | Inline |
403 | Forbidden | Forbidden | Inline |
404 | Not Found | Not Found | Inline |