seckill.md 18.8 KB

1、获取秒杀时间栏接口

(method=app.seckill.queryActivity) 请求方式:GET

请求参数

参数名称 参数类型 可否为空 示例 默认值 备注

注意,通用的头部没有列出,该接口没有输入参数。
请求示例 http://dev-api.yohops.com:9999/?app_version=5.0.0.0000&client_type=iphone&method=app.seckill.queryActivity&os_version=9.3&screen_size=375x667&v=7

响应

code为200即为成功且只会返回200,每次都会有响应结果。 响应JSON格式如下所示:

{
    "alg": "SALT_MD5",
    "code": 200,
    "data": {
        "currentTime": 1473839306925,   ---当前时间戳
        "secKillProductVoList": [
            {
                "activityId": 1,   ---活动id
                "endTime": 1473739200,   ---该场活动结束时间
                "secKillStatus": 0,   ---无用
                "startTime": 1473732000,   ---该场活动开始时间
                "status": 0,   ---无用
                "storageSum": 0   ---无用
            },
            {
                "activityId": 2,
                "endTime": 1473746400,
                "secKillStatus": 0,
                "startTime": 1473739200,
                "status": 0,
                "storageSum": 0
            },
            {
                "activityId": 3,
                "endTime": 1473753600,
                "secKillStatus": 0,
                "startTime": 1473746400,
                "status": 0,
                "storageSum": 0
            }
        ]
    },
    "md5": "b291f2aa3015749f676f50de0d513437",
    "message": "query secKillActivity info"
}

2、获取指定秒杀活动商品列表接口

(method=app.seckill.queryProductList) 请求方式:GET

请求参数

参数名称 参数类型 可否为空 示例 默认值 备注
activityId Integer 1 null 秒杀活动id

注意,通用的头部没有列出。
请求示例 http://dev-api.yohops.com:9999/?app_version=5.0.0.0000&client_type=iphone&method=app.seckill.queryProductList&activityId=1&os_version=9.3&screen_size=375x667&v=7

响应

code为200即为成功且只会返回200,每次都会有响应结果。 响应JSON格式如下所示:

{
    "alg": "SALT_MD5",
    "code": 200,
    "data": [
        {
            "activityId": 1,   ---秒杀活动id
            "defaultImages": "http://img11.static.yhbimg.com/goodsimg/2016/09/12/14/018aea16153cec3ad0c677a106b5d95c53.png?imageMogr2/thumbnail/{width}x{height}/extent/{width}x{height}/background/d2hpdGU=/position/center/quality/70",
            "endTime": 1473739200,   
            "marketPrice": 100,   ---市场价
            "productName": "blkheimei男休闲/运动鞋南京艾尚仅门店可售", 
            "id": 1,   ---秒杀活动和商品的库中的id,用于秒杀提醒时输入
            "orderBy": 0,   ---秒杀商品排序
            "productSkn": 512581470,
            "secKillPrice": 40,   ---秒杀价
            "secKillSku": [
                {
                    "productSkn": 512581470,
                    "productSku": 1384138,   
                    "storageNum": 5   ---该sku剩余的秒杀库存
                },
                {
                    "productSkn": 512581470,
                    "productSku": 1384140,
                    "storageNum": 5
                },
                {
                    "productSkn": 512581470,
                    "productSku": 1384140,
                    "storageNum": 5
                }
            ],
            "secKillStatus": 1,   ---秒杀库存状态,0:已抢光 1:去抢购  2:还有机会
            "startTime": 1473732000,
            "status": 0,
            "storageSum": 10   ---该skn剩余的秒杀库存
            "remindFlag": true
        }
    ],
    "md5": "f09659c22f275fbd23d8999c58aba994",
    "message": "query secKillProductList info"
}

3、获取秒杀信息接口

(method=app.seckill.data) 请求方式:POST

请求参数

参数名称 参数类型 可否为空 示例 默认值 备注
product_skn String 51000268 null 商品skn

注意,通用的头部没有列出。
请求示例 http://dev-api.yohops.com:9999/?app_version=5.0.0.0000&debug=XYZ&client_type=iphone&method=app.seckill.data&os_version=9.3&product_skn=51000268&screen_size=375x667&v=7

响应

code为200即为成功且只会返回200,每次都会有响应结果。 响应JSON格式如下所示:

{
  "alg": "SALT_MD5",
  "code": 200,
  "data": {
    "activityId": 4,
    "endTime": 1478758971,
    "formatSecKillPrice": "¥50.00",
    "id": 4,
    "orderBy": 0,
    "productSkn": 512581470,
    "secKillPrice": 50,
    "secKillSku": [
      {
        "activityId": 4,
        "id": 1,
        "productSkn": 512581470,
        "productSku": 1384138,
        "storageNum": 10
      },
      {
        "activityId": 4,
        "id": 2,
        "productSkn": 512581470,
        "productSku": 1384140,
        "storageNum": 5
      }
    ],
    "secKillStatus": 0,
    "startTime": 1474192655,
    "status": 1,---0:作废 1:秒杀前 2:秒杀中 3:秒杀结束
    "storageSum": 0
  },
  "md5": "c3d6dfc778e4dc5e078191f7873980de",
  "message": "query secKillProduct info"
}

product.getBasicProductBySku

请求方式:POST

请求参数

参数名称 参数类型 可否为空 示例 默认值 备注
param String 926992 null 商品sku

注意,通用的头部没有列出。
请求示例 http://192.168.102.205:8083/product/product/getBasicProductBySku

响应

code为200即为成功且只会返回200,每次都会有响应结果。 响应JSON格式如下所示:

{
  "arrivalTime": 0,
  "attribute": 1,
  "auditingTime": 0,
  "brandId": 68,
  "cnAlphabet": "LACOSTESPORTSWEARRENEVAULTSTAR30SRW4107",
  "createTime": 1445837977,
  "editTime": 1448968188,
  "elements": "",
  "erpProductId": 51164996,
  "expectArrivalTime": null,
  "firstShelveTime": 1448968188,
  "gender": "2",
  "id": 294447,
  "instalmentId": 0,
  "isAdvance": "N",
  "isAuditing": "Y",
  "isCollect": "",
  "isDown": "N",
  "isHot": "N",
  "isInstalment": "0",
  "isJit": "N",
  "isLimitBuy": "N",
  "isLimited": "N",
  "isNew": "Y",
  "isOutlets": "N",
  "isPayDelivery": "2",
  "isPromotion": 102,
  "isRecommend": "N",
  "isReplenishment": 0,
  "isRetrieval": "N",
  "isSales": "Y",
  "isSpecial": "N",
  "isSecKill": "N",
  "material": "",
  "maxSortId": 6,
  "middleSortId": 44,
  "pattern": "",
  "phrase": "LACOSTE鞋履回归品牌传统,重回1933年RENE LACOSTE先生最爱的网球场风格,在悠久的品牌传承中汲取灵感,将曾经最受欢迎的款式带 回人们的视线。自从René首次用标志性的醒目鳄鱼图案刺绣装饰赛服起,LACOSTE便开始引领运动与时尚的潮流。LACOSTE新品参考了其网球传统,但并非简单的复制,而是遵循了尊重传统、探索未来的理念。该系列精心考虑了现代实用性,轻松而舒适地完成城市到球场的转换。LACOSTE的鞋履系列,“灵感源自网球场,始于1933年”,突显了“生活是最美的运动”的理念,将LACOSTE的功能和优雅的完美 融合,并注入日常生活。鞋面材质:牛皮革,织物面。",
  "productName": "LACOSTE SPORTSWEAR RENE VAULTSTAR 休闲鞋",
  "productUrl": "",
  "salableTime": "0",
  "salesPhrase": "LACOSTE鞋履回归品牌传统,重回1933年RENE LACOSTE先生最爱的网球场风格,在悠久的品牌传承中汲取灵感,将曾经最受欢迎的款式带 回人们的视线。自从René首次用标志性的醒目鳄鱼图案刺绣",
  "seasons": "autumn,winter",
  "seriesId": 0,
  "shelveTime": 1452304200,
  "shopId": 0,
  "smallSortId": 147,
  "sortId": 0,
  "status": 1,
  "storage": 46,
  "style": "",
  "supplierId": 0
}

product.queryProductBasicInfo

请求方式:POST

请求参数

参数名称 参数类型 可否为空 示例 默认值 备注
param String 294447 null 商品id

注意,通用的头部没有列出。
请求示例 http://192.168.102.205:8083/product/product/queryProductBasicInfo

响应

code为200即为成功且只会返回200,每次都会有响应结果。 响应JSON格式如下所示:

{
  "appType": 0,
  "arrivalTime": 0,
  "attribute": 1,
  "auditingTime": 0,
  "brand": null,
  "brandId": 68,
  "categoryBoList": [],
  "cnAlphabet": "LACOSTESPORTSWEARRENEVAULTSTAR30SRW4107",
  "commentBoWrapper": null,
  "consultBoWrapper": null,
  "createTime": 1445837977,
  "editTime": 1448968188,
  "elements": "",
  "erpProductId": 51164996,
  "expectArrivalTime": null,
  "firstShelveTime": 1448968188,
  "folderId": 0,
  "gender": "2",
  "goodsList": [],
  "id": 294447,
  "instalmentId": 0,
  "isAdvance": "N",
  "isAuditing": "Y",
  "isCollect": "",
  "isDown": "N",
  "isEdit": 1,
  "isHot": "N",
  "isInstalment": "0",
  "isJit": "N",
  "isLimitBuy": "N",
  "isLimited": "N",
  "isNew": "Y",
  "isOutlets": "N",
  "isPayDelivery": "2",
  "isPromotion": 102,
  "isRecommend": "N",
  "isReplenishment": 0,
  "isRetrieval": "N",
  "isSales": "Y",
  "isSpecial": "N",
  "isSecKill": "N",
  "limitProductCode": "",
  "limitProductSku": "",
  "material": "",
  "maxSortId": 6,
  "middleSortId": 44,
  "pattern": "",
  "phrase": "LACOSTE鞋履回归品牌传统,重回1933年RENE LACOSTE先生最爱的网球场风格,在悠久的品牌传承中汲取灵感,将曾经最受欢迎的款式带 回人们的视线。自从René首次用标志性的醒目鳄鱼图案刺绣装饰赛服起,LACOSTE便开始引领运动与时尚的潮流。LACOSTE新品参考了其网球传统,但并非简单的复制,而是遵循了尊重传统、探索未来的理念。该系列精心考虑了现代实用性,轻松而舒适地完成城市到球场的转换。LACOSTE的鞋履系列,“灵感源自网球场,始于1933年”,突显了“生活是最美的运动”的理念,将LACOSTE的功能和优雅的完美 融合,并注入日常生活。鞋面材质:牛皮革,织物面。",
  "productName": "LACOSTE SPORTSWEAR RENE VAULTSTAR 休闲鞋",
  "productPriceBo": null,
  "productTagBoList": [],
  "productUrl": "",
  "promotionBoList": [],
  "salableTime": "0",
  "saleStatus": 0,
  "salesPhrase": "LACOSTE鞋履回归品牌传统,重回1933年RENE LACOSTE先生最爱的网球场风格,在悠久的品牌传承中汲取灵感,将曾经最受欢迎的款式带 回人们的视线。自从René首次用标志性的醒目鳄鱼图案刺绣",
  "seasons": "autumn,winter",
  "sellChannels": "0",
  "seriesId": 0,
  "shelveTime": 1452304200,
  "shopId": 0,
  "showStatus": 0,
  "showWeightAndHeight": false,
  "smallSortId": 147,
  "sortId": 0,
  "status": 1,
  "storage": 46,
  "style": "",
  "supplierId": 0,
  "vipDiscountType": 1
}

product.queryShopCartBySkuIdForSecKill

请求方式:POST

请求参数

参数名称 参数类型 可否为空 示例 默认值 备注
params String 1385642 null 商品sku

注意,通用的头部没有列出。
请求示例 http://192.168.102.205:8083/product/product/queryShopCartBySkuIdForSecKill

响应

code为200即为成功且只会返回200,每次都会有响应结果。 响应JSON格式如下所示:

{
  "brandBo": null,
  "goodsBo": {
    "colorCode": "",
    "colorId": 2,
    "colorImage": "http://img13.static.yhbimg.com/goodsimg/2016/09/19/11/025d9624ad1daf8215efd9054411cf86b6.jpg?imageMogr2/thumbnail/{width}x{height}/extent/{width}x{height}/background/d2hpdGU=/position/center/quality/80",
    "colorName": "黑色",
    "colorValue": "",
    "factorySn": "",
    "firstShelveTime": 0,
    "goodsImagesList": [],
    "goodsName": "",
    "goodsSizeBoList": [],
    "id": 458628,
    "isDefault": "Y",
    "isDown": "N",
    "matchExplain": "",
    "productId": 502776,
    "productSkc": 534530,
    "status": 1,
    "viewNum": 0
  },
  "goodsSizeBo": {
    "attributeId": "",
    "createTime": 0,
    "goodsId": null,
    "goodsSizeLocated": null,
    "goodsSizeSkuId": null,
    "goodsSizeStorageNum": null,
    "id": 216,
    "orderBy": 1157,
    "sizeName": "XXL",
    "skuStatus": null,
    "sortId": 0,
    "updateTime": 0
  },
  "productActivityId": null,
  "productBasicInfoBo": {
    "arrivalTime": 0,
    "attribute": 1,
    "auditingTime": 0,
    "brandId": 2298,
    "cnAlphabet": "zsqnanTxusijileimu-ceshi",
    "createTime": 1474342406,
    "editTime": 1474342631,
    "elements": "",
    "erpProductId": 512581900,
    "expectArrivalTime": null,
    "firstShelveTime": 1474342631,
    "gender": "1",
    "id": 502776,
    "instalmentId": 0,
    "isAdvance": "N",
    "isAuditing": "",
    "isCollect": "",
    "isDown": "",
    "isHot": "",
    "isInstalment": "0",
    "isJit": "Y",
    "isLimitBuy": "N",
    "isLimited": "N",
    "isNew": "Y",
    "isOutlets": "B",
    "isPayDelivery": "2",
    "isPromotion": 0,
    "isRecommend": "N",
    "isReplenishment": null,
    "isRetrieval": "",
    "isSales": "Y",
    "isSeckill": "",
    "isSpecial": "",
    "material": "",
    "maxSortId": 1,
    "middleSortId": 11,
    "pattern": "",
    "phrase": "",
    "productName": "zsq男T恤四级类目-测试",
    "productUrl": "",
    "salableTime": "0",
    "salesPhrase": "",
    "seasons": "seasons",
    "seriesId": 0,
    "shelveTime": 0,
    "shopId": 760,
    "smallSortId": 114,
    "sortId": 0,
    "status": 1,
    "storage": 1129,
    "style": "",
    "supplierId": 1592
  },
  "productPriceBo": {
    "formatMarketPrice": "¥2.00",
    "formatSalesPrice": "¥1.00",
    "formatSpecialPrice": "¥0.00",
    "marketPrice": 2,
    "productCoinNum": 0,
    "productId": 502776,
    "productSkn": 512581900,
    "salesPrice": 1,
    "seckillPrice": null,
    "specialPrice": 0,
    "studentCoinNum": null,
    "studentCoinRate": 0,
    "studentDiscountRate": 0.9,
    "studentPrice": null,
    "vipDiscount": 0,
    "vipDiscountType": 3,
    "vipPrice": "0.00",
    "vipPrices": [],
    "yohoCoinNum": 0
  },
  "secKillProductBo": {
    "activityId": 40,
    "endTime": 1478755932,
    "formatPrice": "¥199.00",
    "id": 12,
    "orderBy": 1,
    "price": 199,
    "productSkn": 512581900,
    "secKillSku": [
      {
        "activityId": 40,
        "id": 14,
        "productSkn": 512581900,
        "productSku": 1385642,
        "storageNum": 5
      },
      {
        "activityId": 40,
        "id": 16,
        "productSkn": 512581900,
        "productSku": 4,
        "storageNum": 3
      }
    ],
    "startTime": 1473755932,
    "status": 2
  },
  "storageBo": {
    "createTime": 1474342406,
    "erpSkuId": 1385642,
    "frozenNum": 0,
    "goodsDimensionId": 216,
    "goodsId": 458628,
    "marketPrice": 2,
    "productId": 502776,
    "productSkn": null,
    "salePrice": 1,
    "salesNum": 0,
    "seckillStorageNum": null,
    "status": 1,
    "storageNum": 1129,
    "storeroom": 0,
    "updateTime": 1474342406
  }
}

product.decreaseSeckillStorageBySkuId

请求方式:POST

请求参数

{ "updateStorageRequest": { "skuId": 926992, "storageNum": 1 } }

注意,通用的头部没有列出。
请求示例 http://192.168.102.205:8083/product/product/decreaseSeckillStorageBySkuId 请求体: { "storageNum":1, "skuId":4, "secKillActivityId":40 }

响应

code为200即为成功且只会返回200,每次都会有响应结果。 响应JSON格式如下所示:

{
  "code": 200,
  "success": true
}

新增秒杀提醒接口

(method=app.seckill.addUserReminder) 请求方式:GET

请求参数

参数名称 参数类型 可否为空 示例 默认值 备注
activity_id Integer 1 null 秒杀活动id
product_skn Integer 1 null skn
uid Integer 12345 null uid
sec_kill_id Integer null null 秒杀id
app_type Integer 0 0 yoho还是blk

注意,通用的头部没有列出。
请求示例 http://dev-api.yohops.com:9999/?app_version=5.0.0.0000&client_type=iphone&method=app.seckill.addUserReminder&activity_id=1&product_skn=512581470&uid=12345&sec_kill_id=1&os_version=9.3&screen_size=375x667&v=7&client_secret=22a5984c03b5b998f6feda6f6c67ac66&debug=XYZ

响应

code为200即为成功且只会返回200,每次都会有响应结果。 响应JSON格式如下所示:

{
  "code": 200,
  "success": true
}

取消秒杀提醒接口

(method=app.seckill.cancelUserReminder) 请求方式:GET

请求参数

参数名称 参数类型 可否为空 示例 默认值 备注
activity_id Integer 1 null 秒杀活动id
product_skn Integer 1 null skn
uid Integer 12345 null uid
app_type Integer 0 0 yoho还是blk

注意,通用的头部没有列出。
请求示例 http://dev-api.yohops.com:9999/?app_version=5.0.0.0000&client_type=iphone&method=app.seckill.addUserReminder&activity_id=1&product_skn=512581470&uid=12345&os_version=9.3&screen_size=375x667&v=7&client_secret=22a5984c03b5b998f6feda6f6c67ac66&debug=XYZ

响应

code为200即为成功且只会返回200,每次都会有响应结果。 响应JSON格式如下所示:

{
  "code": 200,
  "success": true
}
## 查询秒杀提醒列表接口##

(method=app.seckill.queryRemindList)
请求方式:GET
#### 请求参数
| 参数名称 | 参数类型 |  可否为空 | 示例 | 默认值 | 备注 | 
|:-------| -----:|-----:|-----:|-----:|----:|
|activity_id|Integer|否|1|null|秒杀活动id|
|uid|Integer|否|12345|null|uid|

注意,通用的头部没有列出。  
请求示例
http://api-test3.yohops.com:9999/?app_version=4.9.0&client_type=web&method=app.seckill.queryRemindList&activityId=1&uid=12345&os_version=yohobuy%3Aweb&screen_size=720x1280&v=7&client_secret=c09613ba166b112ffcfe9befd3b5a2cc

### 响应
code为200即为成功且只会返回200,每次都会有响应结果。 
响应JSON格式如下所示:
```json
{
    "alg": "SALT_MD5",
    "code": 200,
    "data": [
        {
            "activityId": 1,
            "id": 2,
            "price": "",
            "productSkn": 512581470,
            "secKillId": 1,
            "userId": 12345
        },
        {
            "activityId": 1,
            "id": 4,
            "price": "",
            "productSkn": 512581470,
            "secKillId": 1,
            "userId": 12345
        },
        {
            "activityId": 1,
            "id": 20,
            "price": "",
            "productSkn": 512581470,
            "secKillId": 1,
            "userId": 12345
        },
        {
            "activityId": 1,
            "id": 36,
            "price": "",
            "productSkn": 512581470,
            "secKillId": 1,
            "userId": 12345
        }
    ],
    "md5": "33ba7b93d9ea1ec921602a111f33c212",
    "message": "queryRemindList info"
}