商户端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"
}

获取七牛上传token

query Parameters
key
required
string

上传文件的key

Responses

Response samples

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

将微信临时素材同步到七牛

query Parameters
server_id
required
string

微信临时素材的id

folder
required
string

七牛文件夹

Responses

Response samples

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

获取用户信息

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
[]

获取当前用户在商户下的信息

path Parameters
merchant_hash
required
string (Hash)

商户hash

Responses

Response samples

Content type
application/json
{
  • "name": "我叫杜晓峰",
  • "staff_hash": "string",
  • "phone": "string",
  • "is_admin": true
}

根据hash获取商户信息

path Parameters
merchant_hash
required
string (Hash)

商户hash

Responses

Response samples

Content type
application/json
{
  • "hash": "string",
  • "region_id": 0,
  • "name": "string",
  • "logo_url": "string",
  • "banners": [],
  • "phone": [
    ],
  • "address": "string",
  • "address_description": "string",
  • "longitude": 39.07151,
  • "latitude": 117.190091,
  • "business_hours": [
    ],
  • "tags": [
    ]
}

获取商户汇总数据

path Parameters
merchant_hash
required
string (Hash)

商户hash

Responses

Response samples

Content type
application/json
{
  • "advertising_budget_balance": 0,
  • "withdrawable_income": 0,
  • "sales_amount": 0,
  • "unsettled_income": 0,
  • "withdrew_income": 0
}

提现信息

path Parameters
merchant_hash
required
string (Hash)

商户hash

Responses

Response samples

Content type
application/json
{
  • "maximum_daily_withdrawable_amount": 0,
  • "remaining_withdrawable_amount": 0,
  • "withdraw_amount": 0,
  • "actual_amount_received": 1,
  • "fee": 1,
  • "rate": "19%"
}

提现记录

path Parameters
merchant_hash
required
string (Hash)

商户hash

query Parameters
offset
number

分页参数

limit
number

分页参数

Responses

Response samples

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

余额提现

path Parameters
merchant_hash
required
string (Hash)

商户hash

Responses

推广支出明细

path Parameters
merchant_hash
required
string (Hash)

商户hash

query Parameters
offset
number

分页参数

limit
number

分页参数

Responses

Response samples

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

推广充值记录

path Parameters
merchant_hash
required
string (Hash)

商户hash

query Parameters
offset
number

分页参数

limit
number

分页参数

Responses

Response samples

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

获取推广充值参数

path Parameters
merchant_hash
required
string (Hash)

商户hash

Request Body schema: application/json
money
required
number

充值金额

Responses

Request samples

Content type
application/json
{
  • "money": 0
}

Response samples

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

获取订单

path Parameters
merchant_hash
required
string (Hash)

商户hash

query Parameters
status
string
Enum: "paying" "sharing" "unused" "finished" "canceled" "expired" "refunded"

订单状态

product_hash
string

产品hash

offset
number

分页参数

limit
number

分页参数

Responses

Response samples

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

获取单个订单

path Parameters
merchant_hash
required
string (Hash)

商户hash

order_no
required
string

订单order_no

Responses

Response samples

Content type
application/json
{
  • "order_no": "string",
  • "name": "string",
  • "phone": "string",
  • "products": [
    ],
  • "status": "processing",
  • "refund_status": "processing",
  • "is_order_expired": true,
  • "required_supporter_number": 0,
  • "current_supporter_number": 0,
  • "total": 0,
  • "amount": 0,
  • "created_at": 0,
  • "paid_at": 0,
  • "is_deposit": true,
  • "balance_paid": 0
}

核销订单

path Parameters
merchant_hash
required
string (Hash)

商户hash

Request Body schema: application/json
order_no_or_verification_code
required
string

订单号或核销码

Responses

Request samples

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

获取员工列表

path Parameters
merchant_hash
required
string (Hash)

商户hash

query Parameters
offset
number

分页参数

limit
number

分页参数

Responses

Response samples

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

审核活动员工申请

path Parameters
merchant_hash
required
string (Hash)

商户hash

Request Body schema: application/json
ids
required
Array of numbers
action
required
string
Enum: "passed" "rejected" "disabled" "enabled" "deleted" "mark_as_verification_clerk"
reason
required
string

拒绝原因

Responses

Request samples

Content type
application/json
{
  • "ids": [
    ],
  • "action": "passed",
  • "reason": "string"
}

统计

path Parameters
merchant_hash
required
string (Hash)

商户hash

Responses

Response samples

Content type
application/json
{
  • "today_sales_amount": 0,
  • "today_settled_amount": 0,
  • "today_withdrew_amount": 0,
  • "today_new_order_number": 0,
  • "today_advertising_expenditure_amount": 0,
  • "today_browse_number": 0,
  • "unpaid_order_number": 0,
  • "unused_order_number": 0
}

排行榜数据

path Parameters
merchant_hash
required
string (Hash)

商户hash

query Parameters
ranking_type
required
string (RankingType)
Enum: "browse" "order" "fission"

排行榜类型

period
required
string

周期

Responses

Response samples

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

根据hash获取商户信息

path Parameters
merchant_hash
required
string (Hash)

商户hash

Responses

Response samples

Content type
application/json
{
  • "hash": "string",
  • "region_id": 0,
  • "name": "string",
  • "logo_url": "string",
  • "banners": [],
  • "phone": [
    ],
  • "address": "string",
  • "address_description": "string",
  • "longitude": 39.07151,
  • "latitude": 117.190091,
  • "business_hours": [
    ],
  • "tags": [
    ]
}

设置商户信息

path Parameters
merchant_hash
required
string (Hash)

商户hash

Request Body schema: application/json
name
required
string

名称

phone
required
Array of strings

电话

logo_key
required
string

logo图片七牛key

banner_keys
required
Array of strings
address
required
string

地址

address_description
required
string

地址描述

longitude
required
number

经度

latitude
required
number

纬度

business_hours
Array of strings
tags
required
Array of strings

标签

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "phone": [
    ],
  • "logo_key": "string",
  • "banner_keys": [
    ],
  • "address": "string",
  • "address_description": "string",
  • "longitude": 39.07151,
  • "latitude": 117.190091,
  • "business_hours": [
    ],
  • "tags": [
    ]
}

获取商品列表

path Parameters
merchant_hash
required
string (Hash)

商户hash

query Parameters
offset
number

分页参数

limit
number

分页参数

Responses

Response samples

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

添加商品

path Parameters
merchant_hash
required
string (Hash)

商户hash

Request Body schema: application/json
title
required
string

标题

sub_title
required
string

副标题

type
required
string (MerchantProductType)
Enum: "free" "group_purchase" "direct_purchase" "seckill"

商品类型

cover_key
required
string

封面图片七牛key

banner_keys
required
Array of strings
retail_price
number

销售价

deposit_amount
number

定金

original_price
required
number

原价

stock
required
number

库存

description
required
string

商品描述

required
object

有效期

category_alias
required
string

分类别名

is_deposit
boolean

是否订金商品

is_required_balance_payment
boolean

是否线上收取尾款

object (PromotionSetting)
object (PromotionSetting)
object (LimitedTimeOfferSetting)

限时促销设置

purchase_limit
number

限购数量

browse_reward_amount
number

浏览奖励

wechat_sharing_title
string

微信分享标题

wechat_sharing_description
string

微信分享描述

Responses

Request samples

Content type
application/json
{
  • "title": "string",
  • "sub_title": "string",
  • "type": "free",
  • "cover_key": "string",
  • "banner_keys": [
    ],
  • "retail_price": 0,
  • "deposit_amount": 0,
  • "original_price": 0,
  • "stock": 0,
  • "description": "string",
  • "validity": {
    },
  • "category_alias": "string",
  • "is_deposit": true,
  • "is_required_balance_payment": true,
  • "group_purchase_setting": {
    },
  • "seckill_setting": {
    },
  • "limited_time_offer_setting": {
    },
  • "purchase_limit": 0,
  • "browse_reward_amount": 0,
  • "wechat_sharing_title": "string",
  • "wechat_sharing_description": "string"
}

获取商品

path Parameters
merchant_hash
required
string (Hash)

商户hash

product_hash
required
string (Hash)

商品hash

Responses

Response samples

Content type
application/json
{
  • "hash": "string",
  • "title": "string",
  • "sub_title": "string",
  • "cover_url": "string",
  • "banners": [],
  • "type": "free",
  • "current_price": 0,
  • "retail_price": 0,
  • "deposit_amount": 0,
  • "original_price": 0,
  • "lowest_price": 0,
  • "stock": 0,
  • "description": "string",
  • "group_purchase_setting": {
    },
  • "seckill_setting": {
    },
  • "purchase_limit": 0,
  • "browse_reward_amount": 0,
  • "on_shelf": true,
  • "wechat_sharing_title": "string",
  • "wechat_sharing_description": "string",
  • "validity": {
    },
  • "limited_time_offer_setting": {
    },
  • "category_alias": "string",
  • "is_deposit": true,
  • "is_required_balance_payment": true
}

编辑商品

path Parameters
merchant_hash
required
string (Hash)

商户hash

product_hash
required
string (Hash)

商品hash

Request Body schema: application/json
title
required
string

标题

sub_title
required
string

副标题

type
required
string (MerchantProductType)
Enum: "free" "group_purchase" "direct_purchase" "seckill"

商品类型

cover_key
required
string

封面图片七牛key

banner_keys
required
Array of strings
retail_price
number

销售价

deposit_amount
number

定金

original_price
required
number

原价

stock
required
number

库存

description
required
string

商品描述

required
object

有效期

category_alias
required
string

分类别名

is_deposit
boolean

是否订金商品

is_required_balance_payment
boolean

是否线上收取尾款

object (PromotionSetting)
object (PromotionSetting)
object (LimitedTimeOfferSetting)

限时促销设置

purchase_limit
number

限购数量

browse_reward_amount
number

浏览奖励

wechat_sharing_title
string

微信分享标题

wechat_sharing_description
string

微信分享描述

Responses

Request samples

Content type
application/json
{
  • "title": "string",
  • "sub_title": "string",
  • "type": "free",
  • "cover_key": "string",
  • "banner_keys": [
    ],
  • "retail_price": 0,
  • "deposit_amount": 0,
  • "original_price": 0,
  • "stock": 0,
  • "description": "string",
  • "validity": {
    },
  • "category_alias": "string",
  • "is_deposit": true,
  • "is_required_balance_payment": true,
  • "group_purchase_setting": {
    },
  • "seckill_setting": {
    },
  • "limited_time_offer_setting": {
    },
  • "purchase_limit": 0,
  • "browse_reward_amount": 0,
  • "wechat_sharing_title": "string",
  • "wechat_sharing_description": "string"
}

删除商品

path Parameters
merchant_hash
required
string (Hash)

商户hash

product_hash
required
string (Hash)

商品hash

Responses

商品上架

path Parameters
merchant_hash
required
string (Hash)

商户hash

product_hash
required
string (Hash)

商品hash

Responses

商品下架

path Parameters
merchant_hash
required
string (Hash)

商户hash

product_hash
required
string (Hash)

商品hash

Responses

商品移到顶端

path Parameters
merchant_hash
required
string (Hash)

商户hash

product_hash
required
string (Hash)

商品hash

Responses

获取商品浏览记录

path Parameters
merchant_hash
required
string (Hash)

商户hash

product_hash
required
string (Hash)

商品hash

query Parameters
offset
number

分页参数

limit
number

分页参数

Responses

Response samples

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

获取当前用户的申请信息

path Parameters
merchant_hash
required
string (Hash)

商户hash

Responses

Response samples

Content type
application/json
{
  • "status": "passed",
  • "reason": "string",
  • "name": "string",
  • "phone": "string"
}

加入商户

path Parameters
merchant_hash
required
string (Hash)

商户hash

Request Body schema: application/json
name
required
string

名称

phone
required
string

手机号

Responses

Request samples

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

分销收入

path Parameters
merchant_hash
required
string (Hash)

商户hash

Responses

Response samples

Content type
application/json
{
  • "cumulative_income": 1,
  • "unsettled_income": 1,
  • "withdrawable_income": 1,
  • "number_of_customers": 1
}

分销提现信息

path Parameters
merchant_hash
required
string (Hash)

商户hash

Responses

Response samples

Content type
application/json
{
  • "maximum_daily_withdrawable_amount": 0,
  • "remaining_withdrawable_amount": 0,
  • "withdraw_amount": 0,
  • "actual_amount_received": 1,
  • "fee": 1,
  • "rate": "19%"
}

商品分销明细

path Parameters
merchant_hash
required
string (Hash)

商户hash

query Parameters
offset
number

分页参数

limit
number

分页参数

Responses

Response samples

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

员工分销明细

path Parameters
merchant_hash
required
string (Hash)

商户hash

query Parameters
offset
number

分页参数

limit
number

分页参数

Responses

Response samples

Content type
application/json
{}

会员分销明细

path Parameters
merchant_hash
required
string (Hash)

商户hash

query Parameters
offset
number

分页参数

limit
number

分页参数

Responses

Response samples

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

分销客户明细

path Parameters
merchant_hash
required
string (Hash)

商户hash

query Parameters
keyword
string

搜索关键字(客户姓名,手机号,微信昵称)

offset
number

分页参数

limit
number

分页参数

Responses

Response samples

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

分销提现记录

path Parameters
merchant_hash
required
string (Hash)

商户hash

query Parameters
offset
number

分页参数

limit
number

分页参数

Responses

Response samples

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

分销提现

path Parameters
merchant_hash
required
string (Hash)

商户hash

Responses

纪律分数据

path Parameters
merchant_hash
required
string (Hash)

商户hash

Responses

Response samples

Content type
application/json
{
  • "cumulative_points": 0,
  • "reset_at": 0,
  • "allow_staff_to_distribute": true,
  • "allow_merchant_to_distribute": true,
  • "allow_merchant_to_withdraw": true
}

纪律分变更详情

path Parameters
merchant_hash
required
string (Hash)

商户hash

query Parameters
offset_id
number

分页参数

limit
number

分页参数

Responses

Response samples

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

获取聚币信息

path Parameters
merchant_hash
required
string (Hash)

商户hash

Responses

Response samples

Content type
application/json
{
  • "balance": 0
}

赠送聚币

path Parameters
merchant_hash
required
string (Hash)

商户hash

Request Body schema: application/json
client_phone_number
required
string

客户手机号

amount
required
number

赠送聚币数量

Responses

Request samples

Content type
application/json
{
  • "client_phone_number": "string",
  • "amount": 0
}

聚币明细

path Parameters
merchant_hash
required
string (Hash)

商户hash

query Parameters
offset
number

分页参数

limit
number

分页参数

Responses

Response samples

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

生成尾款收款码

path Parameters
merchant_hash
required
string (Hash)

商户hash

query Parameters
order_no_or_verification_code
required
string

订单号

money
number

收款金额

Responses

Response samples

Content type
application/json
{
  • "qrcode_url": "string",
  • "money": 0
}