创建新用户
email required | string <email> (Email) |
username required | string (Username) |
password required | string (Password) >= 8 characters |
{- "email": "user@example.com",
- "username": "string",
- "password": "stringst"
}
{- "email": "user@example.com",
- "username": "string",
- "id": 0,
- "is_active": true,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
用户登录获取令牌
username_or_email required | string (Username Or Email) 用户名或邮箱 |
password required | string (Password) 密码 |
{- "username_or_email": "string",
- "password": "string"
}
{- "access_token": "string",
- "refresh_token": "string",
- "token_type": "string"
}
使用刷新令牌获取新的访问令牌
refresh_token required | string (Refresh Token) 刷新令牌 |
{- "refresh_token": "string"
}
{- "access_token": "string",
- "refresh_token": "string",
- "token_type": "string"
}
退出登录
将当前的访问令牌和刷新令牌(如果提供)添加到黑名单中,使它们失效
Authorization (string) or Authorization (null) (Authorization) |
refresh_token required | string (Refresh Token) 刷新令牌 |
{- "refresh_token": "string"
}
null
获取权限列表
skip | integer (Skip) Default: 0 |
limit | integer (Limit) Default: 100 |
[- {
- "name": "string",
- "code": "string",
- "description": "string",
- "id": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
]
创建新权限
name required | string (Name) 权限名称 |
code required | string (Code) 权限代码 |
Description (string) or Description (null) (Description) 权限描述 |
{- "name": "string",
- "code": "string",
- "description": "string"
}
{- "name": "string",
- "code": "string",
- "description": "string",
- "id": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
获取特定权限
permission_id required | integer (Permission Id) |
{- "name": "string",
- "code": "string",
- "description": "string",
- "id": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
更新权限
permission_id required | integer (Permission Id) |
Name (string) or Name (null) (Name) 权限名称 | |
Code (string) or Code (null) (Code) 权限代码 | |
Description (string) or Description (null) (Description) 权限描述 |
{- "name": "string",
- "code": "string",
- "description": "string"
}
{- "name": "string",
- "code": "string",
- "description": "string",
- "id": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
获取角色列表
skip | integer (Skip) Default: 0 |
limit | integer (Limit) Default: 100 |
[- {
- "name": "string",
- "description": "string",
- "id": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "permissions": [ ]
}
]
创建新角色
name required | string (Name) 角色名称 |
Description (string) or Description (null) (Description) 角色描述 | |
Array of Permission Ids (integers) or Permission Ids (null) (Permission Ids) 权限ID列表 |
{- "name": "string",
- "description": "string",
- "permission_ids": [
- 0
]
}
{- "name": "string",
- "description": "string",
- "id": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "permissions": [ ]
}
获取特定角色
role_id required | integer (Role Id) |
{- "name": "string",
- "description": "string",
- "id": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "permissions": [ ]
}
更新角色
role_id required | integer (Role Id) |
Name (string) or Name (null) (Name) 角色名称 | |
Description (string) or Description (null) (Description) 角色描述 | |
Array of Permission Ids (integers) or Permission Ids (null) (Permission Ids) 权限ID列表 |
{- "name": "string",
- "description": "string",
- "permission_ids": [
- 0
]
}
{- "name": "string",
- "description": "string",
- "id": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "permissions": [ ]
}
获取用户的角色列表
user_id required | integer (User Id) |
[- {
- "name": "string",
- "description": "string",
- "id": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "permissions": [ ]
}
]
更新用户的角色
user_id required | integer (User Id) |
role_ids required | Array of integers (Role Ids) 角色ID列表 |
{- "role_ids": [
- 0
]
}
null
获取分类列表,可以通过parent_id筛选特定父分类下的子分类
skip | integer (Skip) Default: 0 |
limit | integer (Limit) Default: 100 |
Parent Id (integer) or Parent Id (null) (Parent Id) |
[- {
- "name": "string",
- "description": "string",
- "parent_id": 0,
- "is_navigation": true,
- "sort_order": 0,
- "icon_url": "string",
- "id": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "parent": {
- "id": 0,
- "name": "string",
- "icon_url": "string"
}, - "children": [ ]
}
]
创建新分类
name required | string (Name) <= 100 characters 分类名称 |
Description (string) or Description (null) (Description) 分类描述 | |
Parent Id (integer) or Parent Id (null) (Parent Id) 父分类ID | |
is_navigation | boolean (Is Navigation) Default: true 是否显示在导航中 |
sort_order | integer (Sort Order) Default: 0 排序权重(数字越大越靠前) |
Icon Url (string) or Icon Url (null) (Icon Url) 分类图标URL |
{- "name": "string",
- "description": "string",
- "parent_id": 0,
- "is_navigation": true,
- "sort_order": 0,
- "icon_url": "string"
}
{- "name": "string",
- "description": "string",
- "parent_id": 0,
- "is_navigation": true,
- "sort_order": 0,
- "icon_url": "string",
- "id": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "parent": {
- "id": 0,
- "name": "string",
- "icon_url": "string"
}, - "children": [ ]
}
{- "name": "string",
- "description": "string",
- "parent_id": 0,
- "is_navigation": true,
- "sort_order": 0,
- "icon_url": "string",
- "id": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "parent": {
- "id": 0,
- "name": "string",
- "icon_url": "string"
}, - "children": [ ]
}
更新分类
category_id required | integer (Category Id) |
Name (string) or Name (null) (Name) 分类名称 | |
Description (string) or Description (null) (Description) 分类描述 | |
Parent Id (integer) or Parent Id (null) (Parent Id) 父分类ID | |
is_navigation | boolean (Is Navigation) Default: true 是否显示在导航中 |
sort_order | integer (Sort Order) Default: 0 排序权重(数字越大越靠前) |
Icon Url (string) or Icon Url (null) (Icon Url) 分类图标URL |
{- "name": "string",
- "description": "string",
- "parent_id": 0,
- "is_navigation": true,
- "sort_order": 0,
- "icon_url": "string"
}
{- "name": "string",
- "description": "string",
- "parent_id": 0,
- "is_navigation": true,
- "sort_order": 0,
- "icon_url": "string",
- "id": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "parent": {
- "id": 0,
- "name": "string",
- "icon_url": "string"
}, - "children": [ ]
}
获取商品列表,支持多种筛选条件
skip | integer (Skip) Default: 0 |
limit | integer (Limit) Default: 100 |
Category Id (integer) or Category Id (null) (Category Id) | |
Tag Id (integer) or Tag Id (null) (Tag Id) | |
Is Active (boolean) or Is Active (null) (Is Active) | |
Search (string) or Search (null) (Search) |
[- {
- "name": "string",
- "description": "string",
- "price": 0,
- "stock": 0,
- "category_id": 0,
- "is_active": true,
- "id": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "category": {
- "id": 0,
- "name": "string",
- "icon_url": "string"
}, - "tags": [ ]
}
]
创建新商品
name required | string (Name) <= 100 characters 商品名称 |
Description (string) or Description (null) (Description) 商品描述 | |
price required | number (Price) > 0 商品价格 |
stock | integer (Stock) >= 0 Default: 0 商品库存 |
category_id required | integer (Category Id) 商品分类ID |
is_active | boolean (Is Active) Default: true 是否上架 |
Array of Tag Ids (integers) or Tag Ids (null) (Tag Ids) 商品标签ID列表 |
{- "name": "string",
- "description": "string",
- "price": 0,
- "stock": 0,
- "category_id": 0,
- "is_active": true,
- "tag_ids": [
- 0
]
}
{- "name": "string",
- "description": "string",
- "price": 0,
- "stock": 0,
- "category_id": 0,
- "is_active": true,
- "id": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "category": {
- "id": 0,
- "name": "string",
- "icon_url": "string"
}, - "tags": [ ]
}
{- "name": "string",
- "description": "string",
- "price": 0,
- "stock": 0,
- "category_id": 0,
- "is_active": true,
- "id": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "category": {
- "id": 0,
- "name": "string",
- "icon_url": "string"
}, - "tags": [ ]
}
更新商品
product_id required | integer (Product Id) |
Name (string) or Name (null) (Name) 商品名称 | |
Description (string) or Description (null) (Description) 商品描述 | |
Price (number) or Price (null) (Price) 商品价格 | |
Stock (integer) or Stock (null) (Stock) 商品库存 | |
Category Id (integer) or Category Id (null) (Category Id) 商品分类ID | |
Is Active (boolean) or Is Active (null) (Is Active) 是否上架 | |
Array of Tag Ids (integers) or Tag Ids (null) (Tag Ids) 商品标签ID列表 |
{- "name": "string",
- "description": "string",
- "price": 0,
- "stock": 0,
- "category_id": 0,
- "is_active": true,
- "tag_ids": [
- 0
]
}
{- "name": "string",
- "description": "string",
- "price": 0,
- "stock": 0,
- "category_id": 0,
- "is_active": true,
- "id": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "category": {
- "id": 0,
- "name": "string",
- "icon_url": "string"
}, - "tags": [ ]
}
获取属性列表
skip | integer (Skip) Default: 0 |
limit | integer (Limit) Default: 100 |
[- {
- "name": "string",
- "description": "string",
- "input_type": "select",
- "is_sku": true,
- "sort_order": 0,
- "id": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "values": [ ]
}
]
创建新属性
name required | string (Name) <= 50 characters 属性名称 |
Description (string) or Description (null) (Description) 属性描述 | |
input_type | string (Input Type) <= 20 characters Default: "select" 输入类型:select(单选)、multiple(多选)、input(输入框)等 |
is_sku | boolean (Is Sku) Default: true 是否用于SKU生成 |
sort_order | integer (Sort Order) Default: 0 排序权重(数字越大越靠前) |
{- "name": "string",
- "description": "string",
- "input_type": "select",
- "is_sku": true,
- "sort_order": 0
}
{- "name": "string",
- "description": "string",
- "input_type": "select",
- "is_sku": true,
- "sort_order": 0,
- "id": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "values": [ ]
}
{- "name": "string",
- "description": "string",
- "input_type": "select",
- "is_sku": true,
- "sort_order": 0,
- "id": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "values": [ ]
}
更新属性
attribute_id required | integer (Attribute Id) |
Name (string) or Name (null) (Name) 属性名称 | |
Description (string) or Description (null) (Description) 属性描述 | |
Input Type (string) or Input Type (null) (Input Type) 输入类型 | |
Is Sku (boolean) or Is Sku (null) (Is Sku) 是否用于SKU生成 | |
Sort Order (integer) or Sort Order (null) (Sort Order) 排序权重 |
{- "name": "string",
- "description": "string",
- "input_type": "string",
- "is_sku": true,
- "sort_order": 0
}
{- "name": "string",
- "description": "string",
- "input_type": "select",
- "is_sku": true,
- "sort_order": 0,
- "id": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "values": [ ]
}
获取属性值列表,可选择按属性ID筛选
skip | integer (Skip) Default: 0 |
limit | integer (Limit) Default: 100 |
Attribute Id (integer) or Attribute Id (null) (Attribute Id) |
[- {
- "value": "string",
- "extra": "string",
- "sort_order": 0,
- "attribute_id": 0,
- "id": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "attribute": {
- "name": "string",
- "description": "string",
- "input_type": "select",
- "is_sku": true,
- "sort_order": 0,
- "id": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "values": [ ]
}
}
]
创建新属性值
value required | string (Value) <= 50 characters 属性值 |
Extra (string) or Extra (null) (Extra) 附加信息(如颜色代码、图片URL等) | |
sort_order | integer (Sort Order) Default: 0 排序权重(数字越大越靠前) |
attribute_id required | integer (Attribute Id) 所属属性ID |
{- "value": "string",
- "extra": "string",
- "sort_order": 0,
- "attribute_id": 0
}
{- "value": "string",
- "extra": "string",
- "sort_order": 0,
- "attribute_id": 0,
- "id": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
{- "value": "string",
- "extra": "string",
- "sort_order": 0,
- "attribute_id": 0,
- "id": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "attribute": {
- "name": "string",
- "description": "string",
- "input_type": "select",
- "is_sku": true,
- "sort_order": 0,
- "id": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "values": [ ]
}
}
更新属性值
value_id required | integer (Value Id) |
Value (string) or Value (null) (Value) 属性值 | |
Extra (string) or Extra (null) (Extra) 附加信息 | |
Sort Order (integer) or Sort Order (null) (Sort Order) 排序权重 | |
Attribute Id (integer) or Attribute Id (null) (Attribute Id) 所属属性ID |
{- "value": "string",
- "extra": "string",
- "sort_order": 0,
- "attribute_id": 0
}
{- "value": "string",
- "extra": "string",
- "sort_order": 0,
- "attribute_id": 0,
- "id": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
获取SKU列表,可选择按商品ID筛选
skip | integer (Skip) Default: 0 |
limit | integer (Limit) Default: 100 |
Product Id (integer) or Product Id (null) (Product Id) |
[- {
- "product_id": 0,
- "code": "string",
- "name": "string",
- "price": 0,
- "stock": 0,
- "is_active": true,
- "image_url": "string",
- "id": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "attribute_values": [ ]
}
]
创建新SKU
product_id required | integer (Product Id) 商品ID |
Code (string) or Code (null) (Code) SKU编码 | |
name required | string (Name) <= 200 characters SKU名称 |
price required | number (Price) > 0 SKU价格 |
stock | integer (Stock) >= 0 Default: 0 SKU库存 |
is_active | boolean (Is Active) Default: true 是否启用 |
Image Url (string) or Image Url (null) (Image Url) 图片URL | |
attribute_value_ids required | Array of integers (Attribute Value Ids) 属性值ID列表 |
{- "product_id": 0,
- "code": "string",
- "name": "string",
- "price": 0,
- "stock": 0,
- "is_active": true,
- "image_url": "string",
- "attribute_value_ids": [
- 0
]
}
{- "product_id": 0,
- "code": "string",
- "name": "string",
- "price": 0,
- "stock": 0,
- "is_active": true,
- "image_url": "string",
- "id": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "attribute_values": [ ]
}
{- "product_id": 0,
- "code": "string",
- "name": "string",
- "price": 0,
- "stock": 0,
- "is_active": true,
- "image_url": "string",
- "id": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "attribute_values": [ ]
}
更新SKU
sku_id required | integer (Sku Id) |
Product Id (integer) or Product Id (null) (Product Id) 商品ID | |
Code (string) or Code (null) (Code) SKU编码 | |
Name (string) or Name (null) (Name) SKU名称 | |
Price (number) or Price (null) (Price) SKU价格 | |
Stock (integer) or Stock (null) (Stock) SKU库存 | |
Is Active (boolean) or Is Active (null) (Is Active) 是否启用 | |
Image Url (string) or Image Url (null) (Image Url) 图片URL | |
Array of Attribute Value Ids (integers) or Attribute Value Ids (null) (Attribute Value Ids) 属性值ID列表 |
{- "product_id": 0,
- "code": "string",
- "name": "string",
- "price": 0,
- "stock": 0,
- "is_active": true,
- "image_url": "string",
- "attribute_value_ids": [
- 0
]
}
{- "product_id": 0,
- "code": "string",
- "name": "string",
- "price": 0,
- "stock": 0,
- "is_active": true,
- "image_url": "string",
- "id": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "attribute_values": [ ]
}
根据属性组合批量生成SKU
product_id required | integer (Product Id) 商品ID |
attribute_ids required | Array of integers (Attribute Ids) 用于生成SKU的属性ID列表 |
Price Increment (number) or Price Increment (null) (Price Increment) Default: 0 SKU价格增量(相对于商品基础价格) | |
Stock Initial (integer) or Stock Initial (null) (Stock Initial) Default: 0 SKU初始库存 |
{- "product_id": 0,
- "attribute_ids": [
- 0
], - "price_increment": 0,
- "stock_initial": 0
}
[- {
- "product_id": 0,
- "code": "string",
- "name": "string",
- "price": 0,
- "stock": 0,
- "is_active": true,
- "image_url": "string",
- "id": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "attribute_values": [ ]
}
]
获取商品评价列表,支持多种筛选条件和排序选项
Product Id (integer) or Product Id (null) (Product Id) | |
User Id (integer) or User Id (null) (User Id) | |
Min Rating (integer) or Min Rating (null) (Min Rating) | |
Max Rating (integer) or Max Rating (null) (Max Rating) | |
verified_only | boolean (Verified Only) Default: false |
sort_by | string (Sort By) Default: "created_at" Enum: "created_at" "rating" |
sort_order | string (Sort Order) Default: "desc" Enum: "asc" "desc" |
skip | integer (Skip) Default: 0 |
limit | integer (Limit) Default: 20 |
[- {
- "product_id": 0,
- "rating": 1,
- "content": "string",
- "images": "string",
- "is_anonymous": false,
- "id": 0,
- "user_id": 0,
- "order_id": 0,
- "is_verified_purchase": true,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "username": "string",
- "replies": [ ]
}
]
创建商品评价
product_id required | integer (Product Id) 商品ID |
rating required | integer (Rating) [ 1 .. 5 ] 评分(1-5) |
Content (string) or Content (null) (Content) 评价内容 | |
Images (string) or Images (null) (Images) 评价图片,多个图片URL以逗号分隔 | |
is_anonymous | boolean (Is Anonymous) Default: false 是否匿名评价 |
Order Id (integer) or Order Id (null) (Order Id) 订单ID |
{- "product_id": 0,
- "rating": 1,
- "content": "string",
- "images": "string",
- "is_anonymous": false,
- "order_id": 0
}
{- "product_id": 0,
- "rating": 1,
- "content": "string",
- "images": "string",
- "is_anonymous": false,
- "id": 0,
- "user_id": 0,
- "order_id": 0,
- "is_verified_purchase": true,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "username": "string",
- "replies": [ ]
}
获取单个评价详情
review_id required | integer (Review Id) |
{- "product_id": 0,
- "rating": 1,
- "content": "string",
- "images": "string",
- "is_anonymous": false,
- "id": 0,
- "user_id": 0,
- "order_id": 0,
- "is_verified_purchase": true,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "username": "string",
- "replies": [ ]
}
更新商品评价
review_id required | integer (Review Id) |
Rating (integer) or Rating (null) (Rating) 评分(1-5) | |
Content (string) or Content (null) (Content) 评价内容 | |
Images (string) or Images (null) (Images) 评价图片,多个图片URL以逗号分隔 | |
Is Anonymous (boolean) or Is Anonymous (null) (Is Anonymous) 是否匿名评价 |
{- "rating": 1,
- "content": "string",
- "images": "string",
- "is_anonymous": true
}
{- "product_id": 0,
- "rating": 1,
- "content": "string",
- "images": "string",
- "is_anonymous": false,
- "id": 0,
- "user_id": 0,
- "order_id": 0,
- "is_verified_purchase": true,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "username": "string",
- "replies": [ ]
}
创建评价回复
review_id required | integer (Review Id) |
content required | string (Content) 回复内容 |
{- "content": "string"
}
{- "content": "string",
- "id": 0,
- "review_id": 0,
- "user_id": 0,
- "is_merchant": true,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "username": "string"
}
更新评价回复
reply_id required | integer (Reply Id) |
Content (string) or Content (null) (Content) 回复内容 |
{- "content": "string"
}
{- "content": "string",
- "id": 0,
- "review_id": 0,
- "user_id": 0,
- "is_merchant": true,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "username": "string"
}
商品搜索 :param q: 搜索关键词 :param category_id: 分类ID :param tag_ids: 标签ID列表 :param price_min: 最低价格 :param price_max: 最高价格 :param sort_by: 排序字段,如 "price", "created_at", "avg_rating" :param sort_order: 排序方向,"asc" 或 "desc" :param page: 页码 :param size: 每页数量 :param highlight: 是否启用高亮功能,默认启用 :param attributes: 属性筛选列表(复杂属性筛选的话,建议使用POST接口product_search/advanced) :return: 商品搜索结果
Q (string) or Q (null) (Q) | |
Category Id (integer) or Category Id (null) (Category Id) | |
Tag Ids (string) or Tag Ids (null) (Tag Ids) | |
Price Min (number) or Price Min (null) (Price Min) | |
Price Max (number) or Price Max (null) (Price Max) | |
Sort By (string) or Sort By (null) (Sort By) | |
Sort Order (string) or Sort Order (null) (Sort Order) Default: "asc" | |
page | integer (Page) >= 1 Default: 1 |
size | integer (Size) [ 1 .. 100 ] Default: 10 |
highlight | boolean (Highlight) Default: true |
name required | string (Name) |
values required | Array of strings (Values) |
null
{- "total": 0,
- "page": 0,
- "size": 0,
- "items": [ ]
}
商品搜索POST接口,支持复杂的属性筛选
请求体示例:
{
"q": "手机",
"category_id": 1,
"tag_ids": "1,2,3",
"price_min": 100,
"price_max": 1000,
"attributes": [
{"name": "颜色", "values": ["红色", "蓝色"]},
{"name": "尺寸", "values": ["S", "M"]}
],
"sort_by": "price",
"sort_order": "asc",
"page": 1,
"size": 10,
"highlight": true
}
Q (string) or Q (null) (Q) | |
Category Id (integer) or Category Id (null) (Category Id) | |
Tag Ids (string) or Tag Ids (null) (Tag Ids) | |
Price Min (number) or Price Min (null) (Price Min) | |
Price Max (number) or Price Max (null) (Price Max) | |
Sort By (string) or Sort By (null) (Sort By) | |
Sort Order (string) or Sort Order (null) (Sort Order) Default: "asc" | |
page | integer (Page) Default: 1 |
size | integer (Size) Default: 10 |
highlight | boolean (Highlight) Default: true |
Array of Attributes (objects) or Attributes (null) (Attributes) |
{- "q": "string",
- "category_id": 0,
- "tag_ids": "string",
- "price_min": 0,
- "price_max": 0,
- "sort_by": "string",
- "sort_order": "asc",
- "page": 1,
- "size": 10,
- "highlight": true,
- "attributes": [
- {
- "name": "string",
- "values": [
- "string"
]
}
]
}
{- "total": 0,
- "page": 0,
- "size": 0,
- "items": [ ]
}
创建仓库
name required | string (Name) |
location required | string (Location) |
Contact Name (string) or Contact Name (null) (Contact Name) | |
Contact Phone (string) or Contact Phone (null) (Contact Phone) | |
Contact Email (string) or Contact Email (null) (Contact Email) | |
is_active | boolean (Is Active) Default: true |
Description (string) or Description (null) (Description) |
{- "name": "string",
- "location": "string",
- "contact_name": "string",
- "contact_phone": "string",
- "contact_email": "string",
- "is_active": true,
- "description": "string"
}
{- "success": true,
- "message": "string",
- "data": {
- "name": "string",
- "location": "string",
- "contact_name": "string",
- "contact_phone": "string",
- "contact_email": "string",
- "is_active": true,
- "description": "string",
- "id": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
}
获取所有仓库
skip | integer (Skip) >= 0 Default: 0 |
limit | integer (Limit) [ 1 .. 100 ] Default: 100 |
Is Active (boolean) or Is Active (null) (Is Active) | |
Name (string) or Name (null) (Name) |
{- "success": true,
- "message": "string",
- "data": [
- {
- "name": "string",
- "location": "string",
- "contact_name": "string",
- "contact_phone": "string",
- "contact_email": "string",
- "is_active": true,
- "description": "string",
- "id": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
], - "total": 0,
- "page": 0,
- "size": 0
}
获取单个仓库详情
warehouse_id required | integer (Warehouse Id) > 0 |
{- "success": true,
- "message": "string",
- "data": {
- "name": "string",
- "location": "string",
- "contact_name": "string",
- "contact_phone": "string",
- "contact_email": "string",
- "is_active": true,
- "description": "string",
- "id": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
}
更新仓库
warehouse_id required | integer (Warehouse Id) > 0 |
Name (string) or Name (null) (Name) | |
Location (string) or Location (null) (Location) | |
Contact Name (string) or Contact Name (null) (Contact Name) | |
Contact Phone (string) or Contact Phone (null) (Contact Phone) | |
Contact Email (string) or Contact Email (null) (Contact Email) | |
Is Active (boolean) or Is Active (null) (Is Active) | |
Description (string) or Description (null) (Description) |
{- "name": "string",
- "location": "string",
- "contact_name": "string",
- "contact_phone": "string",
- "contact_email": "string",
- "is_active": true,
- "description": "string"
}
{- "success": true,
- "message": "string",
- "data": {
- "name": "string",
- "location": "string",
- "contact_name": "string",
- "contact_phone": "string",
- "contact_email": "string",
- "is_active": true,
- "description": "string",
- "id": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
}
删除仓库(只是软删除,is_active 设置为 False)
warehouse_id required | integer (Warehouse Id) > 0 |
{- "success": true,
- "message": "string",
- "data": {
- "name": "string",
- "location": "string",
- "contact_name": "string",
- "contact_phone": "string",
- "contact_email": "string",
- "is_active": true,
- "description": "string",
- "id": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
}
创建库存项
sku_id required | integer (Sku Id) |
warehouse_id required | integer (Warehouse Id) |
quantity | integer (Quantity) Default: 0 |
reserved_quantity | integer (Reserved Quantity) Default: 0 |
Alert Threshold (integer) or Alert Threshold (null) (Alert Threshold) |
{- "sku_id": 0,
- "warehouse_id": 0,
- "quantity": 0,
- "reserved_quantity": 0,
- "alert_threshold": 0
}
{- "success": true,
- "message": "string",
- "data": {
- "sku_id": 0,
- "warehouse_id": 0,
- "quantity": 0,
- "reserved_quantity": 0,
- "alert_threshold": 0,
- "id": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "available_quantity": 0,
- "sku_code": "string",
- "sku_price": 0,
- "product_id": 0,
- "product_name": "string"
}
}
列出库存项,可选择按仓库、SKU、商品等进行筛选
skip | integer (Skip) >= 0 Default: 0 |
limit | integer (Limit) [ 1 .. 100 ] Default: 100 |
Warehouse Id (integer) or Warehouse Id (null) (Warehouse Id) | |
Sku Id (integer) or Sku Id (null) (Sku Id) | |
Product Id (integer) or Product Id (null) (Product Id) | |
Low Stock (boolean) or Low Stock (null) (Low Stock) |
{- "success": true,
- "message": "string",
- "data": [
- {
- "sku_id": 0,
- "warehouse_id": 0,
- "quantity": 0,
- "reserved_quantity": 0,
- "alert_threshold": 0,
- "id": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "available_quantity": 0,
- "sku_code": "string",
- "sku_price": 0,
- "product_id": 0,
- "product_name": "string"
}
], - "total": 0,
- "page": 0,
- "size": 0
}
按 ID 获取单个库存项
item_id required | integer (Item Id) > 0 |
{- "success": true,
- "message": "string",
- "data": {
- "sku_id": 0,
- "warehouse_id": 0,
- "quantity": 0,
- "reserved_quantity": 0,
- "alert_threshold": 0,
- "id": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "available_quantity": 0,
- "sku_code": "string",
- "sku_price": 0,
- "product_id": 0,
- "product_name": "string"
}
}
更新库存项
item_id required | integer (Item Id) > 0 |
Quantity (integer) or Quantity (null) (Quantity) | |
Reserved Quantity (integer) or Reserved Quantity (null) (Reserved Quantity) | |
Alert Threshold (integer) or Alert Threshold (null) (Alert Threshold) |
{- "quantity": 0,
- "reserved_quantity": 0,
- "alert_threshold": 0
}
{- "success": true,
- "message": "string",
- "data": {
- "sku_id": 0,
- "warehouse_id": 0,
- "quantity": 0,
- "reserved_quantity": 0,
- "alert_threshold": 0,
- "id": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "available_quantity": 0,
- "sku_code": "string",
- "sku_price": 0,
- "product_id": 0,
- "product_name": "string"
}
}
获取库存交易记录
skip | integer (Skip) >= 0 Default: 0 |
limit | integer (Limit) [ 1 .. 100 ] Default: 100 |
Inventory Item Id (integer) or Inventory Item Id (null) (Inventory Item Id) | |
Transaction Type (string) or Transaction Type (null) (Transaction Type) | |
Reference Id (string) or Reference Id (null) (Reference Id) | |
Reference Type (string) or Reference Type (null) (Reference Type) | |
Start Date (string) or Start Date (null) (Start Date) | |
End Date (string) or End Date (null) (End Date) |
{- "success": true,
- "message": "string",
- "data": [
- {
- "inventory_item_id": 0,
- "quantity": 0,
- "transaction_type": "stock_in",
- "reference_id": "string",
- "reference_type": "string",
- "notes": "string",
- "id": 0,
- "created_at": "2019-08-24T14:15:22Z"
}
], - "total": 0,
- "page": 0,
- "size": 0
}
入库
sku_id required | integer (Sku Id) |
warehouse_id required | integer (Warehouse Id) |
quantity required | integer (Quantity) > 0 |
Reference Id (string) or Reference Id (null) (Reference Id) | |
Reference Type (string) or Reference Type (null) (Reference Type) | |
Notes (string) or Notes (null) (Notes) |
{- "sku_id": 0,
- "warehouse_id": 0,
- "quantity": 0,
- "reference_id": "string",
- "reference_type": "string",
- "notes": "string"
}
{- "success": true,
- "message": "string",
- "data": { }
}
预留库存
sku_id required | integer (Sku Id) |
warehouse_id required | integer (Warehouse Id) |
quantity required | integer (Quantity) > 0 |
reference_type | string (Reference Type) Default: "reserve" |
Notes (string) or Notes (null) (Notes) |
{- "sku_id": 0,
- "warehouse_id": 0,
- "quantity": 0,
- "reference_type": "reserve",
- "notes": "string"
}
{- "success": true,
- "message": "string",
- "data": { }
}
手动释放预留库存,主要是为了配合 stock/reserve 使用
reference_id required | string (Reference Id) |
reference_type | string (Reference Type) Default: "manual_release" |
Notes (string) or Notes (null) (Notes) |
{- "reference_id": "string",
- "reference_type": "manual_release",
- "notes": "string"
}
{- "success": true,
- "message": "string",
- "data": { }
}
确认出库,主要是为了配合stock/reserve使用
reference_id required | string (Reference Id) |
reference_type | string (Reference Type) Default: "confirm" |
Notes (string) or Notes (null) (Notes) |
{- "reference_id": "string",
- "reference_type": "confirm",
- "notes": "string"
}
{- "success": true,
- "message": "string",
- "data": { }
}
库存调整(主要是用于盘点差异、数据纠错)
sku_id required | integer (Sku Id) |
warehouse_id required | integer (Warehouse Id) |
new_quantity required | integer (New Quantity) >= 0 |
reason required | string (Reason) |
Notes (string) or Notes (null) (Notes) |
{- "sku_id": 0,
- "warehouse_id": 0,
- "new_quantity": 0,
- "reason": "string",
- "notes": "string"
}
{- "success": true,
- "message": "string",
- "data": { }
}
批量库存调整
required | Array of objects (Adjustments) |
{- "adjustments": [
- {
- "sku_id": 0,
- "warehouse_id": 0,
- "new_quantity": 0,
- "reason": "string",
- "notes": "string"
}
]
}
{- "success": true,
- "message": "string",
- "data": { }
}
库存调拨
sku_id required | integer (Sku Id) |
source_warehouse_id required | integer (Source Warehouse Id) |
target_warehouse_id required | integer (Target Warehouse Id) |
quantity required | integer (Quantity) > 0 |
Notes (string) or Notes (null) (Notes) |
{- "sku_id": 0,
- "source_warehouse_id": 0,
- "target_warehouse_id": 0,
- "quantity": 0,
- "notes": "string"
}
{- "success": true,
- "message": "string",
- "data": { }
}
批量调拨库存
required | Array of objects (Transfers) |
{- "transfers": [
- {
- "sku_id": 0,
- "source_warehouse_id": 0,
- "target_warehouse_id": 0,
- "quantity": 0,
- "notes": "string"
}
]
}
{- "success": true,
- "message": "string",
- "data": { }
}
按需手动获取低库存预警
Warehouse Id (integer) or Warehouse Id (null) (Warehouse Id) |
{- "items": [
- {
- "inventory_item_id": 0,
- "sku_id": 0,
- "sku_code": "string",
- "product_id": 0,
- "product_name": "string",
- "warehouse_id": 0,
- "warehouse_name": "string",
- "current_quantity": 0,
- "reserved_quantity": 0,
- "available_quantity": 0,
- "alert_threshold": 0
}
], - "total": 0
}
向购物车中添加商品
sku_id required | integer (Sku Id) SKU ID |
quantity required | integer (Quantity) > 0 Quantity |
{- "sku_id": 0,
- "quantity": 0
}
{- "user_id": 0,
- "id": 0,
- "items": [ ],
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
更新购物车中商品的数量
item_id required | integer (Item Id) |
quantity required | integer (Quantity) > 0 Quantity |
{- "quantity": 0
}
{- "user_id": 0,
- "id": 0,
- "items": [ ],
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
从购物车创建新订单
receiver_name required | string (Receiver Name) |
receiver_phone required | string (Receiver Phone) |
receiver_address required | string (Receiver Address) |
Notes (string) or Notes (null) (Notes) | |
User Coupon Id (integer) or User Coupon Id (null) (User Coupon Id) 用户优惠券ID |
{- "receiver_name": "string",
- "receiver_phone": "string",
- "receiver_address": "string",
- "notes": "string",
- "user_coupon_id": 0
}
{- "total_amount": 0,
- "status": "pending_payment",
- "id": 0,
- "order_sn": "string",
- "user_id": 0,
- "promotion_amount": 0,
- "coupon_discount_amount": 0,
- "pay_amount": 0,
- "user_coupon_id": 0,
- "receiver_name": "string",
- "receiver_phone": "string",
- "receiver_address": "string",
- "notes": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "items": [ ],
- "promotion": {
- "name": "string",
- "description": "string",
- "start_time": "2019-08-24T14:15:22Z",
- "end_time": "2019-08-24T14:15:22Z",
- "is_active": true,
- "target_type": "ALL",
- "target_ids": [
- 0
], - "condition_type": "NO_THRESHOLD",
- "condition_value": "string",
- "action_type": "FIXED",
- "action_value": "string",
- "id": 0
}
}
从购物车中选择指定商品创建新订单
receiver_name required | string (Receiver Name) |
receiver_phone required | string (Receiver Phone) |
receiver_address required | string (Receiver Address) |
Notes (string) or Notes (null) (Notes) | |
User Coupon Id (integer) or User Coupon Id (null) (User Coupon Id) 用户优惠券ID | |
selected_cart_item_ids required | Array of integers (Selected Cart Item Ids) non-empty |
{- "receiver_name": "string",
- "receiver_phone": "string",
- "receiver_address": "string",
- "notes": "string",
- "user_coupon_id": 0,
- "selected_cart_item_ids": [
- 0
]
}
{- "total_amount": 0,
- "status": "pending_payment",
- "id": 0,
- "order_sn": "string",
- "user_id": 0,
- "promotion_amount": 0,
- "coupon_discount_amount": 0,
- "pay_amount": 0,
- "user_coupon_id": 0,
- "receiver_name": "string",
- "receiver_phone": "string",
- "receiver_address": "string",
- "notes": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "items": [ ],
- "promotion": {
- "name": "string",
- "description": "string",
- "start_time": "2019-08-24T14:15:22Z",
- "end_time": "2019-08-24T14:15:22Z",
- "is_active": true,
- "target_type": "ALL",
- "target_ids": [
- 0
], - "condition_type": "NO_THRESHOLD",
- "condition_value": "string",
- "action_type": "FIXED",
- "action_value": "string",
- "id": 0
}
}
获取单个订单的详细信息
order_sn required | string (Order Sn) |
{- "total_amount": 0,
- "status": "pending_payment",
- "id": 0,
- "order_sn": "string",
- "user_id": 0,
- "promotion_amount": 0,
- "coupon_discount_amount": 0,
- "pay_amount": 0,
- "user_coupon_id": 0,
- "receiver_name": "string",
- "receiver_phone": "string",
- "receiver_address": "string",
- "notes": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "items": [ ],
- "promotion": {
- "name": "string",
- "description": "string",
- "start_time": "2019-08-24T14:15:22Z",
- "end_time": "2019-08-24T14:15:22Z",
- "is_active": true,
- "target_type": "ALL",
- "target_ids": [
- 0
], - "condition_type": "NO_THRESHOLD",
- "condition_value": "string",
- "action_type": "FIXED",
- "action_value": "string",
- "id": 0
}
}
用户主动取消一个“待支付”的订单
order_sn required | string (Order Sn) |
{- "total_amount": 0,
- "status": "pending_payment",
- "id": 0,
- "order_sn": "string",
- "user_id": 0,
- "promotion_amount": 0,
- "coupon_discount_amount": 0,
- "pay_amount": 0,
- "user_coupon_id": 0,
- "receiver_name": "string",
- "receiver_phone": "string",
- "receiver_address": "string",
- "notes": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "items": [ ],
- "promotion": {
- "name": "string",
- "description": "string",
- "start_time": "2019-08-24T14:15:22Z",
- "end_time": "2019-08-24T14:15:22Z",
- "is_active": true,
- "target_type": "ALL",
- "target_ids": [
- 0
], - "condition_type": "NO_THRESHOLD",
- "condition_value": "string",
- "action_type": "FIXED",
- "action_value": "string",
- "id": 0
}
}
创建一个新的促销活动。需要商品管理权限
name required | string (Name) <= 100 characters 促销活动名称 |
Description (string) or Description (null) (Description) 促销活动描述 | |
start_time required | string <date-time> (Start Time) 开始时间 |
end_time required | string <date-time> (End Time) 结束时间 |
is_active | boolean (Is Active) Default: true 是否激活 |
target_type | string (PromotionTargetType) Default: "ALL" Enum: "ALL" "PRODUCT" "CATEGORY" "TAG" 促销适用目标类型 |
Array of Target Ids (integers) or Target Ids (null) (Target Ids) 目标ID列表 | |
condition_type | string (PromotionConditionType) Default: "NO_THRESHOLD" Enum: "NO_THRESHOLD" "MIN_AMOUNT" "MIN_QUANTITY" 触发条件类型 |
Condition Value (number) or Condition Value (string) or Condition Value (null) (Condition Value) 触发条件的值 | |
action_type required | string (PromotionActionType) Enum: "FIXED" "PERCENTAGE" "SINGLE_PRODUCT_BUY_N_GET_M_FREE" 优惠动作类型 |
required | Action Value (number) or Action Value (string) (Action Value) 优惠动作的值 |
{- "name": "string",
- "description": "string",
- "start_time": "2019-08-24T14:15:22Z",
- "end_time": "2019-08-24T14:15:22Z",
- "is_active": true,
- "target_type": "ALL",
- "target_ids": [
- 0
], - "condition_type": "NO_THRESHOLD",
- "condition_value": 0,
- "action_type": "FIXED",
- "action_value": 0
}
{- "name": "string",
- "description": "string",
- "start_time": "2019-08-24T14:15:22Z",
- "end_time": "2019-08-24T14:15:22Z",
- "is_active": true,
- "target_type": "ALL",
- "target_ids": [
- 0
], - "condition_type": "NO_THRESHOLD",
- "condition_value": "string",
- "action_type": "FIXED",
- "action_value": "string",
- "id": 0
}
检索所有促销活动,支持分页
skip | integer (Skip) Default: 0 |
limit | integer (Limit) Default: 100 |
[- {
- "name": "string",
- "description": "string",
- "start_time": "2019-08-24T14:15:22Z",
- "end_time": "2019-08-24T14:15:22Z",
- "is_active": true,
- "target_type": "ALL",
- "target_ids": [
- 0
], - "condition_type": "NO_THRESHOLD",
- "condition_value": "string",
- "action_type": "FIXED",
- "action_value": "string",
- "id": 0
}
]
{- "name": "string",
- "description": "string",
- "start_time": "2019-08-24T14:15:22Z",
- "end_time": "2019-08-24T14:15:22Z",
- "is_active": true,
- "target_type": "ALL",
- "target_ids": [
- 0
], - "condition_type": "NO_THRESHOLD",
- "condition_value": "string",
- "action_type": "FIXED",
- "action_value": "string",
- "id": 0
}
更新指定ID的促销活动信息。需要商品管理权限
promotion_id required | integer (Promotion Id) |
Name (string) or Name (null) (Name) 促销活动名称 | |
Description (string) or Description (null) (Description) 促销活动描述 | |
Start Time (string) or Start Time (null) (Start Time) 开始时间 | |
End Time (string) or End Time (null) (End Time) 结束时间 | |
Is Active (boolean) or Is Active (null) (Is Active) 是否激活 | |
PromotionTargetType (string) or null 促销适用目标类型 | |
Array of Target Ids (integers) or Target Ids (null) (Target Ids) 目标ID列表 | |
PromotionConditionType (string) or null 触发条件类型 | |
Condition Value (number) or Condition Value (string) or Condition Value (null) (Condition Value) 触发条件的值 | |
PromotionActionType (string) or null 优惠动作类型 | |
Action Value (number) or Action Value (string) or Action Value (null) (Action Value) 优惠动作的值 |
{- "name": "string",
- "description": "string",
- "start_time": "2019-08-24T14:15:22Z",
- "end_time": "2019-08-24T14:15:22Z",
- "is_active": true,
- "target_type": "ALL",
- "target_ids": [
- 0
], - "condition_type": "NO_THRESHOLD",
- "condition_value": 0,
- "action_type": "FIXED",
- "action_value": 0
}
{- "name": "string",
- "description": "string",
- "start_time": "2019-08-24T14:15:22Z",
- "end_time": "2019-08-24T14:15:22Z",
- "is_active": true,
- "target_type": "ALL",
- "target_ids": [
- 0
], - "condition_type": "NO_THRESHOLD",
- "condition_value": "string",
- "action_type": "FIXED",
- "action_value": "string",
- "id": 0
}
创建优惠券模板
name required | string (Name) <= 100 characters 优惠券名称 |
type required | string (CouponType) Enum: "FIXED" "PERCENTAGE" 优惠券类型 |
required | Value (number) or Value (string) (Value) 面值或折扣率 |
Min Spend (number) or Min Spend (string) (Min Spend) Default: "0.0" 最低消费金额 | |
Valid From (string) or Valid From (null) (Valid From) 有效期开始时间 | |
Valid To (string) or Valid To (null) (Valid To) 有效期结束时间 | |
total_quantity | integer (Total Quantity) >= 0 Default: 0 发行总量, 0为不限制 |
usage_limit_per_user | integer (Usage Limit Per User) >= 1 Default: 1 每位用户可领取/使用上限 |
is_active | boolean (Is Active) Default: true 是否激活 |
Code Prefix (string) or Code Prefix (null) (Code Prefix) 优惠券码前缀, 留空则为通用券 |
{- "name": "string",
- "type": "FIXED",
- "value": 0,
- "min_spend": "0.0",
- "valid_from": "2019-08-24T14:15:22Z",
- "valid_to": "2019-08-24T14:15:22Z",
- "total_quantity": 0,
- "usage_limit_per_user": 1,
- "is_active": true,
- "code_prefix": "string"
}
{- "name": "string",
- "type": "FIXED",
- "value": "string",
- "min_spend": "0.0",
- "valid_from": "2019-08-24T14:15:22Z",
- "valid_to": "2019-08-24T14:15:22Z",
- "total_quantity": 0,
- "usage_limit_per_user": 1,
- "is_active": true,
- "id": 0,
- "code_prefix": "string",
- "issued_quantity": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
获取所有优惠券模板
page | integer (Page) Default: 1 |
size | integer (Size) Default: 10 |
{- "items": [
- {
- "name": "string",
- "type": "FIXED",
- "value": "string",
- "min_spend": "0.0",
- "valid_from": "2019-08-24T14:15:22Z",
- "valid_to": "2019-08-24T14:15:22Z",
- "total_quantity": 0,
- "usage_limit_per_user": 1,
- "is_active": true,
- "id": 0,
- "code_prefix": "string",
- "issued_quantity": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
], - "total": 0
}
更新优惠劵模板
template_id required | integer (Template Id) |
Name (string) or Name (null) (Name) | |
Valid From (string) or Valid From (null) (Valid From) | |
Valid To (string) or Valid To (null) (Valid To) | |
Total Quantity (integer) or Total Quantity (null) (Total Quantity) | |
Usage Limit Per User (integer) or Usage Limit Per User (null) (Usage Limit Per User) | |
Is Active (boolean) or Is Active (null) (Is Active) |
{- "name": "string",
- "valid_from": "2019-08-24T14:15:22Z",
- "valid_to": "2019-08-24T14:15:22Z",
- "total_quantity": 0,
- "usage_limit_per_user": 1,
- "is_active": true
}
{- "name": "string",
- "type": "FIXED",
- "value": "string",
- "min_spend": "0.0",
- "valid_from": "2019-08-24T14:15:22Z",
- "valid_to": "2019-08-24T14:15:22Z",
- "total_quantity": 0,
- "usage_limit_per_user": 1,
- "is_active": true,
- "id": 0,
- "code_prefix": "string",
- "issued_quantity": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
按优惠券的模板ID领取优惠券
template_id required | integer (Template Id) |
{- "user_id": 0,
- "coupon_template_id": 0,
- "code": "string",
- "status": "UNUSED",
- "id": 0,
- "claimed_at": "2019-08-24T14:15:22Z",
- "used_at": "2019-08-24T14:15:22Z",
- "template": {
- "name": "string",
- "type": "FIXED",
- "value": "string",
- "min_spend": "0.0",
- "valid_from": "2019-08-24T14:15:22Z",
- "valid_to": "2019-08-24T14:15:22Z",
- "total_quantity": 0,
- "usage_limit_per_user": 1,
- "is_active": true,
- "id": 0,
- "code_prefix": "string",
- "issued_quantity": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
}
获取当前登录用户的所有优惠券,可根据状态筛选,支持分页
CouponStatus (string) or Coupon Status (null) (Coupon Status) 根据状态筛选 | |
page | integer (Page) >= 1 Default: 1 页码 |
size | integer (Size) [ 1 .. 100 ] Default: 10 每页数量 |
{- "items": [
- {
- "id": 0,
- "code": "string",
- "status": "UNUSED",
- "claimed_at": "2019-08-24T14:15:22Z",
- "used_at": "2019-08-24T14:15:22Z",
- "template": {
- "name": "string",
- "type": "FIXED",
- "value": "string",
- "min_spend": "0.0",
- "valid_from": "2019-08-24T14:15:22Z",
- "valid_to": "2019-08-24T14:15:22Z",
- "total_quantity": 0,
- "usage_limit_per_user": 1,
- "is_active": true,
- "id": 0,
- "code_prefix": "string",
- "issued_quantity": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
}
], - "total": 0
}
获取当前用户拥有的某一张优惠券的详细信息
user_coupon_id required | integer (User Coupon Id) |
{- "id": 0,
- "code": "string",
- "status": "UNUSED",
- "claimed_at": "2019-08-24T14:15:22Z",
- "used_at": "2019-08-24T14:15:22Z",
- "template": {
- "name": "string",
- "type": "FIXED",
- "value": "string",
- "min_spend": "0.0",
- "valid_from": "2019-08-24T14:15:22Z",
- "valid_to": "2019-08-24T14:15:22Z",
- "total_quantity": 0,
- "usage_limit_per_user": 1,
- "is_active": true,
- "id": 0,
- "code_prefix": "string",
- "issued_quantity": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
}
name required | string (Name) [ 1 .. 100 ] characters 活动名称 |
Description (string) or Description (null) (Description) 活动描述 | |
start_time required | string <date-time> (Start Time) 秒杀开始时间 |
end_time required | string <date-time> (End Time) 秒杀结束时间 |
{- "name": "string",
- "description": "string",
- "start_time": "2019-08-24T14:15:22Z",
- "end_time": "2019-08-24T14:15:22Z"
}
{- "name": "string",
- "description": "string",
- "start_time": "2019-08-24T14:15:22Z",
- "end_time": "2019-08-24T14:15:22Z",
- "id": 0,
- "status": "PENDING",
- "products": [ ]
}
skip | integer (Skip) Default: 0 |
limit | integer (Limit) Default: 100 |
[- {
- "name": "string",
- "description": "string",
- "start_time": "2019-08-24T14:15:22Z",
- "end_time": "2019-08-24T14:15:22Z",
- "id": 0,
- "status": "PENDING",
- "products": [ ]
}
]
activity_id required | integer (Activity Id) |
{- "name": "string",
- "description": "string",
- "start_time": "2019-08-24T14:15:22Z",
- "end_time": "2019-08-24T14:15:22Z",
- "id": 0,
- "status": "PENDING",
- "products": [ ]
}
activity_id required | integer (Activity Id) |
Name (string) or Name (null) (Name) 活动名称 | |
Description (string) or Description (null) (Description) 活动描述 | |
Start Time (string) or Start Time (null) (Start Time) 秒杀开始时间 | |
End Time (string) or End Time (null) (End Time) 秒杀结束时间 | |
SeckillActivityStatus (string) or null 活动状态 |
{- "name": "string",
- "description": "string",
- "start_time": "2019-08-24T14:15:22Z",
- "end_time": "2019-08-24T14:15:22Z",
- "status": "PENDING"
}
{- "name": "string",
- "description": "string",
- "start_time": "2019-08-24T14:15:22Z",
- "end_time": "2019-08-24T14:15:22Z",
- "id": 0,
- "status": "PENDING",
- "products": [ ]
}
activity_id required | integer (Activity Id) |
sku_id required | integer (Sku Id) 商品SKU ID |
seckill_price required | number (Seckill Price) > 0 秒杀价 |
seckill_stock required | integer (Seckill Stock) > 0 秒杀库存 |
purchase_limit | integer (Purchase Limit) > 0 Default: 1 每人限购数量 |
{- "sku_id": 0,
- "seckill_price": 0,
- "seckill_stock": 0,
- "purchase_limit": 1
}
{- "sku_id": 0,
- "seckill_price": 0,
- "seckill_stock": 0,
- "purchase_limit": 1,
- "id": 0,
- "activity_id": 0
}
product_id required | integer (Product Id) |
Seckill Price (number) or Seckill Price (null) (Seckill Price) 秒杀价 | |
Seckill Stock (integer) or Seckill Stock (null) (Seckill Stock) 秒杀库存 | |
Purchase Limit (integer) or Purchase Limit (null) (Purchase Limit) 每人限购数量 |
{- "seckill_price": 0,
- "seckill_stock": 0,
- "purchase_limit": 0
}
{- "sku_id": 0,
- "seckill_price": 0,
- "seckill_stock": 0,
- "purchase_limit": 1,
- "id": 0,
- "activity_id": 0
}
获取所有对用户可见的秒杀活动列表
PENDING
(未开始) 和 ACTIVE
(进行中) 的活动skip | integer (Skip) Default: 0 |
limit | integer (Limit) Default: 100 |
[- {
- "name": "string",
- "description": "string",
- "start_time": "2019-08-24T14:15:22Z",
- "end_time": "2019-08-24T14:15:22Z",
- "id": 0,
- "status": "PENDING"
}
]
获取单个秒杀活动的详细信息,包括关联的秒杀商品
PENDING
(未开始) 和 ACTIVE
(进行中) 的活动activity_id required | integer (Activity Id) |
{- "name": "string",
- "description": "string",
- "start_time": "2019-08-24T14:15:22Z",
- "end_time": "2019-08-24T14:15:22Z",
- "id": 0,
- "status": "PENDING",
- "products": [ ]
}
处理用户的秒杀请求
request_id
,用于后续查询订单处理状态activity_id required | integer (Activity Id) |
sku_id required | integer (Sku Id) 商品SKU ID |
quantity required | integer (Quantity) > 0 购买数量 |
receiver_name required | string (Receiver Name) <= 100 characters 收货人姓名 |
receiver_phone required | string (Receiver Phone) 收货人手机号 |
receiver_address required | string (Receiver Address) <= 255 characters 收货地址 |
Notes (string) or Notes (null) (Notes) 订单备注 |
{- "sku_id": 0,
- "quantity": 0,
- "receiver_name": "string",
- "receiver_phone": "string",
- "receiver_address": "string",
- "notes": "string"
}
{- "request_id": "string"
}
name required | string (Name) [ 1 .. 100 ] characters 活动名称 |
Description (string) or Description (null) (Description) 活动描述 | |
start_time required | string <date-time> (Start Time) 秒杀开始时间 |
end_time required | string <date-time> (End Time) 秒杀结束时间 |
{- "name": "string",
- "description": "string",
- "start_time": "2019-08-24T14:15:22Z",
- "end_time": "2019-08-24T14:15:22Z"
}
{- "name": "string",
- "description": "string",
- "start_time": "2019-08-24T14:15:22Z",
- "end_time": "2019-08-24T14:15:22Z",
- "id": 0,
- "status": "PENDING",
- "products": [ ]
}
skip | integer (Skip) Default: 0 |
limit | integer (Limit) Default: 100 |
[- {
- "name": "string",
- "description": "string",
- "start_time": "2019-08-24T14:15:22Z",
- "end_time": "2019-08-24T14:15:22Z",
- "id": 0,
- "status": "PENDING",
- "products": [ ]
}
]
activity_id required | integer (Activity Id) |
{- "name": "string",
- "description": "string",
- "start_time": "2019-08-24T14:15:22Z",
- "end_time": "2019-08-24T14:15:22Z",
- "id": 0,
- "status": "PENDING",
- "products": [ ]
}
activity_id required | integer (Activity Id) |
Name (string) or Name (null) (Name) 活动名称 | |
Description (string) or Description (null) (Description) 活动描述 | |
Start Time (string) or Start Time (null) (Start Time) 秒杀开始时间 | |
End Time (string) or End Time (null) (End Time) 秒杀结束时间 | |
SeckillActivityStatus (string) or null 活动状态 |
{- "name": "string",
- "description": "string",
- "start_time": "2019-08-24T14:15:22Z",
- "end_time": "2019-08-24T14:15:22Z",
- "status": "PENDING"
}
{- "name": "string",
- "description": "string",
- "start_time": "2019-08-24T14:15:22Z",
- "end_time": "2019-08-24T14:15:22Z",
- "id": 0,
- "status": "PENDING",
- "products": [ ]
}
activity_id required | integer (Activity Id) |
sku_id required | integer (Sku Id) 商品SKU ID |
seckill_price required | number (Seckill Price) > 0 秒杀价 |
seckill_stock required | integer (Seckill Stock) > 0 秒杀库存 |
purchase_limit | integer (Purchase Limit) > 0 Default: 1 每人限购数量 |
{- "sku_id": 0,
- "seckill_price": 0,
- "seckill_stock": 0,
- "purchase_limit": 1
}
{- "sku_id": 0,
- "seckill_price": 0,
- "seckill_stock": 0,
- "purchase_limit": 1,
- "id": 0,
- "activity_id": 0
}
product_id required | integer (Product Id) |
Seckill Price (number) or Seckill Price (null) (Seckill Price) 秒杀价 | |
Seckill Stock (integer) or Seckill Stock (null) (Seckill Stock) 秒杀库存 | |
Purchase Limit (integer) or Purchase Limit (null) (Purchase Limit) 每人限购数量 |
{- "seckill_price": 0,
- "seckill_stock": 0,
- "purchase_limit": 0
}
{- "sku_id": 0,
- "seckill_price": 0,
- "seckill_stock": 0,
- "purchase_limit": 1,
- "id": 0,
- "activity_id": 0
}
获取所有对用户可见的秒杀活动列表
PENDING
(未开始) 和 ACTIVE
(进行中) 的活动skip | integer (Skip) Default: 0 |
limit | integer (Limit) Default: 100 |
[- {
- "name": "string",
- "description": "string",
- "start_time": "2019-08-24T14:15:22Z",
- "end_time": "2019-08-24T14:15:22Z",
- "id": 0,
- "status": "PENDING"
}
]
获取单个秒杀活动的详细信息,包括关联的秒杀商品
PENDING
(未开始) 和 ACTIVE
(进行中) 的活动activity_id required | integer (Activity Id) |
{- "name": "string",
- "description": "string",
- "start_time": "2019-08-24T14:15:22Z",
- "end_time": "2019-08-24T14:15:22Z",
- "id": 0,
- "status": "PENDING",
- "products": [ ]
}
处理用户的秒杀请求
request_id
,用于后续查询订单处理状态activity_id required | integer (Activity Id) |
sku_id required | integer (Sku Id) 商品SKU ID |
quantity required | integer (Quantity) > 0 购买数量 |
receiver_name required | string (Receiver Name) <= 100 characters 收货人姓名 |
receiver_phone required | string (Receiver Phone) 收货人手机号 |
receiver_address required | string (Receiver Address) <= 255 characters 收货地址 |
Notes (string) or Notes (null) (Notes) 订单备注 |
{- "sku_id": 0,
- "quantity": 0,
- "receiver_name": "string",
- "receiver_phone": "string",
- "receiver_address": "string",
- "notes": "string"
}
{- "request_id": "string"
}
获取当前登录用户最近的浏览历史记录.
limit | integer (Limit) Default: 20 |
[- {
- "id": 0,
- "browsed_at": "2019-08-24T14:15:22Z",
- "user_id": 0,
- "sku_id": 0,
- "sku": {
- "product_id": 0,
- "code": "string",
- "name": "string",
- "price": 0,
- "stock": 0,
- "is_active": true,
- "image_url": "string",
- "id": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "attribute_values": [ ]
}
}
]
sku_id required | integer (Sku Id) |
limit | integer (Limit) Default: 20 |
[- {
- "product_id": 0,
- "code": "string",
- "name": "string",
- "price": 0,
- "stock": 0,
- "is_active": true,
- "image_url": "string",
- "id": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "attribute_values": [ ]
}
]
history_limit | integer (History Limit) Default: 20 |
recommend_limit | integer (Recommend Limit) Default: 20 |
[- {
- "product_id": 0,
- "code": "string",
- "name": "string",
- "price": 0,
- "stock": 0,
- "is_active": true,
- "image_url": "string",
- "id": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "attribute_values": [ ]
}
]
Tag Key (string) or Tag Key (null) (Tag Key) | |
Limit (integer) or Limit (null) (Limit) |
[- {
- "tag_key": "string",
- "tag_value": "string",
- "weight": 1,
- "id": 0,
- "updated_at": "2019-08-24T14:15:22Z"
}
]