Promotion - 友好速搭 -- 开发文档

友好速搭

开放 API
使用说明 获取授权 全部 API 特殊 API 开放功能

Promotion

Promotion

网站中的营销优惠活动接口

District 相关API

GET /promotions获取网站所有的营销活动GET /promotions/#{id}获取指定 ID 的营销活动数据

Promotion属性

    • id
    • 网站营销活动的唯一表示ID, Integer类型。
    • handle
    • 网站营销活动中的表示handle, String类型。
    • name
    • 网站营销活动名, String类型。
    • active_type
    • 网站营销活动参与顾客, String类型,详细说明: entire - 全部顾客, partial - 指定顾客, customer_level - 指定会员等级, first_trade - 首单顾客
    • discount_type
    • 网站营销活动中的类型,String类型,详细说明: amount_off - 满减, percent_off - 满折, free_shipping - 免邮, coupon - 满赠券, gift - 满赠物
    • range_type
    • 网站营销活动中的参加商品类型,String类型,详细说明: entire - 全部商品, partial - 指定商品
    • products
    • 网站营销活动中限定的商品,Array类型
    • customers
    • 网站营销活动中限定参与的顾客,Array类型
    • customer_levels
    • 网站营销活动中限定参与的顾客等级,Array类型
    • actived_at
    • 网站营销活动开始时间
    • expired_at
    • 网站营销活动过期时间
    • no_expires
    • 网站营销活动是否永久有效 true表示永久有效 false表示有过期时间

GET /promotions

获取网站所有的营销活动

    • limit
    • 可选,返回结果条数
      默认10,最大50
    • page
    • 可选,显示的页码
      默认1
    • ids
    • 可选,指定需要查询的营销活动ID
    • name
    • 可选,执行营销活动的名词,模糊查询
    • 获取营销活动列表
    • GET /promotions
    • ```javascript { "promotions": [
      {
          "active_amount": 2000,
          "active_type": "entire",
          "actived_at": "2016-01-01T16:53:00.000+08:00",
          "customer_levels": [
          ],
          "customers": [
          ],
          "delivery_type": "0,1,2,3,4",
          "discount_type": "free_shipping",
          "expired_at": "2016-01-30T16:53:00.000+08:00",
          "handle": "D000003",
          "id": 1067,
          "name": "满20免邮",
          "no_expires": false,
          "products": [
          ],
          "range_type": "entire"
      },
      {
          "active_amount": 0,
          "active_type": "entire",
          "actived_at": "2016-05-22T19:36:00.000+08:00",
          "customer_levels": [
          ],
          "customers": [
          ],
          "delivery_type": "",
          "discount_type": "amount_off",
          "expired_at": null,
          "handle": "D000002",
          "id": 1476,
          "name": "100",
          "no_expires": true,
          "products": [
          ],
          "range_type": "entire"
      },
      {
          "active_amount": 0,
          "active_type": "entire",
          "actived_at": "2016-07-11T11:47:00.000+08:00",
          "customer_levels": [
          ],
          "customers": [
          ],
          "delivery_type": "0,1,2,3,4",
          "discount_type": "free_shipping",
          "expired_at": null,
          "handle": "D000005",
          "id": 1586,
          "name": "免邮",
          "no_expires": true,
          "products": [
          ],
          "range_type": "entire"
      },
      {
          "active_amount": 0,
          "active_type": "entire",
          "actived_at": "2016-07-11T11:48:00.000+08:00",
          "customer_levels": [
          ],
          "customers": [
          ],
          "delivery_type": "",
          "discount_type": "percent_off",
          "expired_at": null,
          "handle": "D000006",
          "id": 1587,
          "name": "满折扣",
          "no_expires": true,
          "products": [
          ],
          "range_type": "entire"
      },
      {
          "active_amount": 0,
          "active_type": "entire",
          "actived_at": "2016-12-15T14:32:00.000+08:00",
          "customer_levels": [
          ],
          "customers": [
          ],
          "delivery_type": "",
          "discount_type": "coupon",
          "expired_at": "2016-12-31T14:32:00.000+08:00",
          "handle": "D000010",
          "id": 1936,
          "name": "211",
          "no_expires": false,
          "products": [
          ],
          "range_type": "entire"
      },
      {
          "active_amount": 20000,
          "active_type": "entire",
          "actived_at": "2016-12-27T10:31:00.000+08:00",
          "customer_levels": [
          ],
          "customers": [
          ],
          "delivery_type": "0,1,2,3,4",
          "discount_type": "free_shipping",
          "expired_at": "2016-12-30T10:31:00.000+08:00",
          "handle": "D000011",
          "id": 1941,
          "name": "满200包邮",
          "no_expires": false,
          "products": [
          ],
          "range_type": "entire"
      },
      {
          "active_amount": 20000,
          "active_type": "entire",
          "actived_at": "2016-12-30T15:39:00.000+08:00",
          "customer_levels": [
          ],
          "customers": [
          ],
          "delivery_type": "0,1,2,3,4",
          "discount_type": "free_shipping",
          "expired_at": "2017-12-02T15:39:00.000+08:00",
          "handle": "D000013",
          "id": 1945,
          "name": "1111",
          "no_expires": false,
          "products": [
          ],
          "range_type": "entire"
      },
      {
          "active_amount": 0,
          "active_type": "first_trade",
          "actived_at": "2017-01-03T16:24:00.000+08:00",
          "customer_levels": [
          ],
          "customers": [
          ],
          "delivery_type": "",
          "discount_type": "coupon",
          "expired_at": "2017-01-31T16:24:00.000+08:00",
          "handle": "D000014",
          "id": 1959,
          "name": "测试",
          "no_expires": false,
          "products": [
          ],
          "range_type": "entire"
      }
      
      ] }
<!-- endapi -->
<!-- api -->

### **GET** /promotions/count

获取营销活动的总数

<!-- .api-gist -->

* * 获取营销活动的总数
  * GET /promotions/count
  * ```javascript
{
    "count": 10
}

GET /promotions/#{id}

获取指定 ID 的营销活动数据

    • 获取指定 ID 的营销活动数据
    • GET /promotions/#{id}
    • {
      "promotion": {
          "active_amount": 2000,
          "active_type": "entire",
          "actived_at": "2016-01-01T16:53:00.000+08:00",
          "customer_levels": [
          ],
          "customers": [
          ],
          "delivery_type": "0,1,2,3,4",
          "discount_type": "free_shipping",
          "expired_at": "2016-01-30T16:53:00.000+08:00",
          "handle": "D000003",
          "id": 1067,
          "name": "满20免邮",
          "no_expires": false,
          "products": [
          ],
          "range_type": "entire"
      }
      }
      
免费领取15天试用
立即注册
联系客服
微信咨询
微信二维码

领取免费试用资格

姓名 *

电话 *

公司名称

所在地区

意向产品

提交

提交成功

你好, XXX女士/先生 ,你的需求已提交成功,后续会有专门的客户经理与你电话联系。谢谢!