商城端api (0.0.1)

Download OpenAPI specification:Download

商城端api协议

获取微信sdk配置,参见:https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/JS-SDK.html#4

query Parameters
url
required
string

需要使用配置的网页地址

Responses

Response samples

Content type
application/json
{
  • "app_id": "string",
  • "timestamp": 0,
  • "nonce_str": "string",
  • "signature": "string"
}

短域名

query Parameters
url
required
string

需要转换成短网址的网页地址

clear
string
Value: 1

是否需要清除缓存

Responses

Response samples

Content type
application/json
{
  • "key": "string",
  • "short_url": "string",
  • "url": "string"
}

当前用户请求发送手机验证码(接口需登录,被攻击的话,可以把用户加入黑名单)

Request Body schema: application/json
phone
required
string

手机号

scene
string
Value: "bind_mobile"

发送短信的场景

Responses

Request samples

Content type
application/json
{
  • "phone": "string",
  • "scene": "bind_mobile"
}

获取文章内容

path Parameters
article_name
required
string

文章名称

Responses

Response samples

Content type
application/json
{
  • "title": "string",
  • "type": 0,
  • "content": "string",
  • "created_at": 0
}

获取用户信息

Responses

Response samples

Content type
application/json
{}

获取可用地址

Responses

Response samples

Content type
application/json
{
  • "list": [
    ]
}

获取联盟信息

path Parameters
union_id
required
integer (Id)

联盟Id

Responses

Response samples

Content type
application/json
{
  • "logo_url": "string",
  • "name": "string",
  • "members": [
    ]
}

用户浏览商城

Request Body schema: application/json
token
required
string

加密后的EncryptedBrowseData对象

longitude
number

经度

latitude
number

纬度

location
string

用户地址

Responses

Request samples

Content type
application/json
{
  • "token": "string",
  • "longitude": 0,
  • "latitude": 0,
  • "location": "string"
}

个人中心数据

Responses

Response samples

Content type
application/json
{
  • "sales_commission": 1289900,
  • "reward_amount": 64300,
  • "ju_coin_balance": 64300,
  • "favorite_number": 105,
  • "total_order_number": 56,
  • "paying_order_number": 2,
  • "sharing_order_number": 12,
  • "unused_order_number": 4
}

更改用户信息

如果传了phone,那么就要检查code

Request Body schema: application/json
name
required
string

用户姓名

phone
string

手机号

code
string

验证码

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "phone": "string",
  • "code": "string"
}

收藏商品

Request Body schema: application/json
product_hash
required
string (Hash)

id

Responses

Request samples

Content type
application/json
{
  • "product_hash": "string"
}

取消收藏商品

Request Body schema: application/json
product_hash
required
string (Hash)

id

Responses

Request samples

Content type
application/json
{
  • "product_hash": "string"
}

收藏商家

Request Body schema: application/json
merchant_hash
required
string (Hash)

id

Responses

Request samples

Content type
application/json
{
  • "merchant_hash": "string"
}

取消收藏商家

Request Body schema: application/json
merchant_hash
required
string (Hash)

id

Responses

Request samples

Content type
application/json
{
  • "merchant_hash": "string"
}

我的邀请浏览收入

Responses

Response samples

Content type
application/json
{
  • "accumulated_income": 0,
  • "withdrew_income": 0,
  • "withdrawable_income": 0
}

我的邀请浏览明细

query Parameters
offset
number

分页参数

limit
number

分页参数

Responses

Response samples

Content type
application/json
{}

邀请提现记录

Responses

Response samples

Content type
application/json
{
  • "list": [
    ]
}

邀请提现

Responses

会员信息

Responses

Response samples

Content type
application/json
{
  • "price": 0,
  • "description": "string"
}

分类信息

query Parameters
region_id
required
integer (Id)

城市id

is_online_categories
required
boolean

是否为线上产品分类

Responses

Response samples

Content type
application/json
[]

店铺分类列表

query Parameters
region_id
required
integer (Id)

城市id

is_online_categories
required
boolean

是否为线上产品分类

Responses

Response samples

Content type
application/json
[]

获取商品列表

query Parameters
region_id
integer (Id)

筛选:城市id

union_id
integer (Id)

联盟id

category_alias
string

筛选:分类别名

excluded_category_alias
string

筛选:除外分类别名,逗号分隔

member_only
boolean

筛选:会员商品

free
boolean

筛选:免费商品

group_purchase
boolean

筛选:团购商品

is_deposit
boolean

筛选:是否订金商品

price99
boolean

筛选:99专区

limited_time_offer
boolean

筛选:限时促销

lnglat
string

筛选:经纬度,经度前,纬度后,逗号分隔(union_id不优先显示)

merchant_hash
string (Hash)

筛选:商家hash

favorite
boolean

筛选:收藏(union_id不优先显示)

related_product_hash
string

筛选:相关商品hash

keyword
string

筛选:关键字搜索

sort_by
string
Enum: "recommended" "popular" "on_shelf_time"

排序,不传就是默认排序

offset
number

分页参数

limit
number

分页参数

Responses

Response samples

Content type
application/json
{
  • "list": [
    ]
}

获取商品信息

path Parameters
product_hash
required
string (Hash)

商品hash

Responses

Response samples

Content type
application/json
{
  • "hash": "string",
  • "region_id": 0,
  • "banners": [],
  • "title": "资深设计师量房+方案设计+装修报价+房型解析定制服务",
  • "sub_title": "仅售1元,价值100元定制平面布局方案,节假日通用",
  • "description": "仅售1元,价值100元定制平面布局方案,节假日通用",
  • "type": "member_only",
  • "merchant": {
    },
  • "original_price": 58.89,
  • "display_price": [
    ],
  • "specifications": {
    },
  • "direct_purchase_specifications": {
    },
  • "inventory": 100,
  • "sold_number": 100,
  • "wechat_share_title": "string",
  • "wechat_share_description": "string",
  • "wechat_share_image_url": "string",
  • "is_favorite": true,
  • "on_shelf": true,
  • "fission_bonus": 0,
  • "is_deposit": true,
  • "deposit_amount": 8,
  • "retail_price": 0,
  • "max_deduction_mounts": 4
}

用户浏览商品

path Parameters
product_hash
required
string (Hash)

商品hash

Request Body schema: application/json
token
required
string

加密后的EncryptedBrowseData对象

longitude
number

经度

latitude
number

纬度

location
string

用户地址

Responses

Request samples

Content type
application/json
{
  • "token": "string",
  • "longitude": 0,
  • "latitude": 0,
  • "location": "string"
}

商品下单,进入邀请流程

path Parameters
product_hash
required
string (Hash)

商品hash

specification_id
required
integer (Id)

规格id

Request Body schema: application/json
delivery_address_id
integer (Id)

id

number
required
number

数量

ju_coin_number
required
number

用于抵扣的聚币数量

required
object (BrowseRequestData)

浏览数据

Responses

Request samples

Content type
application/json
{
  • "delivery_address_id": 0,
  • "number": 0,
  • "ju_coin_number": 0,
  • "browse_data": {
    }
}

Response samples

Content type
application/json
{
  • "order_no": "string"
}

直接购买商品

path Parameters
product_hash
required
string (Hash)

商品hash

specification_id
required
integer (Id)

规格id

Request Body schema: application/json
delivery_address_id
integer (Id)

id

number
required
number

数量

ju_coin_number
required
number

用于抵扣的聚币数量

required
object (BrowseRequestData)

浏览数据

Responses

Request samples

Content type
application/json
{
  • "delivery_address_id": 0,
  • "number": 0,
  • "ju_coin_number": 0,
  • "browse_data": {
    }
}

Response samples

Content type
application/json
{
  • "order_no": "string"
}

商品询价

path Parameters
product_hash
required
string (Hash)

商品hash

specification_id
required
integer (Id)

规格id

Request Body schema: application/json
is_direct_purchase
required
boolean

是否直接购买

number
required
number

数量

ju_coin_number
required
number

用于抵扣的聚币数量

Responses

Request samples

Content type
application/json
{
  • "is_direct_purchase": true,
  • "number": 0,
  • "ju_coin_number": 0
}

Response samples

Content type
application/json
{
  • "product_title": "string",
  • "specification_title": "string",
  • "price": 0,
  • "fee": 0,
  • "validity": {
    },
  • "amount": 1,
  • "total": 1,
  • "max_deductible_ju_coin_number": 1000,
  • "max_deductible_ju_coin_value": 1
}

获取商户列表

query Parameters
favorite
boolean

筛选:收藏

product_hash
string (Hash)

筛选:详情页推荐商户

offset
number

分页参数

limit
number

分页参数

Responses

Response samples

Content type
application/json
{}

获取商家信息

path Parameters
merchant_hash
required
string (Hash)

商家hash

Responses

Response samples

Content type
application/json
{}

订单数据

Responses

Response samples

Content type
application/json
{
  • "list": [
    ]
}

获取单个订单数据

path Parameters
order_no
required
string

订单号

Responses

Response samples

Content type
application/json
{
  • "order_no": "string",
  • "verification_code": "string",
  • "contact_phone_number": [
    ],
  • "products": [
    ],
  • "deduction_fee": 0,
  • "fee": 0,
  • "status": "paying",
  • "refund_status": "processing",
  • "promotion_settings": {
    },
  • "refundable": true,
  • "is_order_expired": true,
  • "total": 0,
  • "amount": 0,
  • "is_deposit": true,
  • "balance_paid": 0,
  • "shipping_info": {
    },
  • "validity": {
    },
  • "closed_at": 0,
  • "created_at": 0,
  • "is_required_balance_payment": true
}

获取订单的邀请进度

path Parameters
order_no
required
string

订单号

Responses

Response samples

Content type
application/json
{
  • "initiator_avatar_url": "string",
  • "initiator_name": "string",
  • "status": "complete",
  • "participated": true,
  • "required_number": 0,
  • "current_number": 0,
  • "avatar_urls": [
    ],
  • "closed_at": 0
}

为订单助力(不能为自己的订单助力)

path Parameters
order_no
required
string

订单号

Request Body schema: application/json
token
required
string

加密后的EncryptedBrowseData对象

longitude
number

经度

latitude
number

纬度

location
string

用户地址

Responses

Request samples

Content type
application/json
{
  • "token": "string",
  • "longitude": 0,
  • "latitude": 0,
  • "location": "string"
}

加入团购(仅限团购订单)

path Parameters
order_no
required
string

订单号

Request Body schema: application/json
token
required
string

加密后的EncryptedBrowseData对象

longitude
number

经度

latitude
number

纬度

location
string

用户地址

Responses

Request samples

Content type
application/json
{
  • "token": "string",
  • "longitude": 0,
  • "latitude": 0,
  • "location": "string"
}

Response samples

Content type
application/json
{
  • "order_no": "string"
}

获取订单微信支付参数(邀请完成才可调用)

path Parameters
order_no
required
string

订单号

Responses

Response samples

Content type
application/json
{
  • "timestamp": 0,
  • "nonce_str": "string",
  • "package": "string",
  • "sign_type": "string",
  • "pay_sign": "string"
}

取消订单

path Parameters
order_no
required
string

订单号

Responses

获取退款信息

path Parameters
order_no
required
string

订单号

Responses

Response samples

Content type
application/json
{
  • "reason": "dont_want",
  • "description": "string",
  • "amount": 0,
  • "status": "processing",
  • "created_at": 0
}

退款

path Parameters
order_no
required
string

订单号

Request Body schema: application/json
reason
required
string
Enum: "dont_want" "negotiated" "others"

退款原因

description
required
string

描述

Responses

Request samples

Content type
application/json
{
  • "reason": "dont_want",
  • "description": "string"
}

获取购买会员的微信支付参数

Request Body schema: application/json
from_user_hash
string (Hash)

id

from_staff_hash
string (Hash)

id

Responses

Request samples

Content type
application/json
{
  • "from_user_hash": "string",
  • "from_staff_hash": "string"
}

Response samples

Content type
application/json
{
  • "timestamp": 0,
  • "nonce_str": "string",
  • "package": "string",
  • "sign_type": "string",
  • "pay_sign": "string"
}

获取所有收货地址

Responses

Response samples

Content type
application/json
{
  • "list": [
    ]
}

创建收货地址

Request Body schema: application/json
name
required
string

收件人姓名

phone_number
required
string

收件人电话

province
required
string

city
required
string

district
required
string

address
required
string

地址

zip_code
required
string

邮编

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "phone_number": "string",
  • "province": "string",
  • "city": "string",
  • "district": "string",
  • "address": "string",
  • "zip_code": "string"
}

编辑收货地址

path Parameters
delivery_address_id
required
integer (Id)

收货地址id

Request Body schema: application/json
name
required
string

收件人姓名

phone_number
required
string

收件人电话

province
required
string

city
required
string

district
required
string

address
required
string

地址

zip_code
required
string

邮编

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "phone_number": "string",
  • "province": "string",
  • "city": "string",
  • "district": "string",
  • "address": "string",
  • "zip_code": "string"
}

删除收货地址

path Parameters
delivery_address_id
required
integer (Id)

收货地址id

Responses

根据地址获取首页数据

path Parameters
region_id
required
integer (Id)

地址Id

query Parameters
union_id
integer (Id)

联盟Id

longitude
required
number

用户现在所在经度

latitude
required
number

用户现在所在纬度

Responses

Response samples

Content type
application/json
{}

获取直播

path Parameters
region_id
required
integer (Id)

地址Id

query Parameters
union_id
integer (Id)

联盟Id

offset
number

分页参数

limit
number

分页参数

Responses

Response samples

Content type
application/json
{
  • "list": [
    ]
}

聚币明细

query Parameters
offset
number

分页参数

limit
number

分页参数

Responses

Response samples

Content type
application/json
{
  • "list": [
    ]
}

获取订单的物流信息

query Parameters
order_no
string

订单号

Responses

Response samples

Content type
application/json
{
  • "receiving_address": "string",
  • "exp_name": "string",
  • "express": 0,
  • "delivery_time": 0,
  • "courier": "string",
  • "courier_phone": "string",
  • "list": [
    ]
}

获取用户通告一段文案

Responses

Response samples

Content type
application/json
{}