v1

latestOpenAPI 3.0.02026-07-26318168886.7 KB
Promotions

Create Promotion

To create detailed information of couple promotions<br>建立優惠活動

post/promotions

Request body

Response

CREATED

idstring

Promotion ID<br>優惠活動ID

discount_percentagenumber

Discount percentage<br>折扣百分比<br>-<br>*Applicable when discount_type is percentage<br>當discount_type為percentage時適用

discountable_quantityinteger

Quantity<br>獲得數量<br>-<br>*When discount_type is gift, this field refers to quantity of gift<br>當discount_type為gift時,此為贈品數量<br><br>*When discount_type is addon, this field refers to quality of add-on<br>當discount_type為addon時,此為可加購數量

discounted_pointinteger

Amount of point to redeem gift<br>點數兌換<br>-<br>*Applicable when discount_type is member_point_redeem_gift<br>當discount_type為member_point_redeem_gift時適用

discountable_product_idsstring[]

Ids of Discounted product<br>指定商品ids

created_atstring

Created Time<br>建立時間

updated_atstring

Updated Time<br>更新時間

discountable_category_idsstring[]

Ids of Discounted category<br>指定商品分類ids

discount_on'order' | 'item' | 'category'

Promotion target<br>優惠套用對象<br>-<br>order = Entire shop 全店<br>item = Specific item 指定商品<br>category = Specific category 指定分類

discount_type'percentage' | 'amount' | 'gift' | 'addon' | 'free_shipping' | 'bundle_pricing' | 'bundle_group' | 'member_point_redeem_gift' | 'subscription_gift'

Discount type<br>折扣類型<br>-<br>percentage: 折扣%<br>amount: 固定金額<br>gift: 贈品<br>addon: 加購品<br>free_shipping: 免運<br>bundle_pricing: 任選優惠<br>bundle_group: A+B組合優惠(紅配綠)<br>member_point_redeem_gift: 點數兌換贈品<br>subscription_gift

is_accumulatedboolean

Is bundle pricing or bundle pricing accumulated?<br>任選優惠/A+B組合優惠是否累計

first_purchase_onlyboolean

For first purchase only<br>創建自動套用—每位會員限用優惠一次的任選優惠

first_purchase_all_platformboolean

For first purchase all platform<br>全通路首購

codesstring[]

Coupon Code<br>促銷代碼

show_couponboolean
membership_tier_idstring
requires_membershipboolean

Does it require membership?<br>設定目標群組<br>-<br>false: 所有顧客<br>true: 會員

whitelisted_membership_tier_idsstring[]

Specific Membership Tiers<br>適用會員等級

whitelisted_tag_contentsstring[]
user_max_use_countinteger

Limit per member<br>每會員最多使用次數<br>-<br>null = Unlimited 不限使用次數

max_use_countinteger

How many times can this promotion be used?<br>活動限使用次數<br>-<br>null = Unlimited 不限使用次數

use_countinteger

Usage of this layer of promotion<br>本階層活動已使用次數

sum_use_countinteger

Total usage of promotion<br>活動已使用次數

whitelisted_delivery_option_idsstring[]

Delivery options that applicable to the promotion<br>活動適用送貨方式

whitelisted_payment_idsstring[]

Payment options that applicable to the promotion<br>活動適用付款方式

start_atstring

Promotion start time<br>活動開始時間

end_atstring

Promotion end time<br>活動結束時間<br>-<br>null = no end date 永不過期

status'active' | 'draft' | 'hidden'

Promotion status<br>活動狀態<br>-<br>active: 上架<br>draft: 下架<br>hidden: 會員默認優惠/主商品加購品<br>removed: 刪除

usableboolean

Is promotion active<br>優惠是否進行中<br>-<br>true: published and not expired上架且沒有過期<br>false: unpublished or published and expired上架已過期 或是 下架

for_affiliate_campaignboolean

Is applicable to affiliate campaign<br>是否適用於推薦活動

is_contain_campaignboolean

Is binded to affiliate campaign<br>是否已綁定推薦活動

seo_enabledboolean

Generate promotion page and SEO sitemap or not

seo_keywordsstring

SEO keywords<br>SEO 關鍵字

available_platformsstring[]

指定平台(目前僅接受 "ec", "retail", "app" 值)

is_partial_free_shippingboolean
coupon_type'draw' | 'single' | 'multi'
extended_promotion_idstring

Parent promotion id<br>母層活動id<br>-<br>*applicable when this is a child promotion

drew_coupon_countinteger

How many times did this promotion been drew?<br>活動被領取次數

whitelisted_membership_tiersobject[]

指定會員資料

summaryobject

優惠概況

available_channel_idsstring[]

Ids of available channel<br>指定通路ids

Example response

{
  "id": "5e8445bcca53240021eab706",
  "discount_percentage": 10,
  "discount_amount": {
    "cents": 999999999,
    "currency_symbol": "NT$",
    "currency_iso": "TWD",
    "label": "NT$999,999,999",
    "dollars": 999999999
  },
  "discountable_quantity": 3,
  "discounted_point": 100,
  "discounted_price": {
    "cents": 999999999,
    "currency_symbol": "NT$",
    "currency_iso": "TWD",
    "label": "NT$999,999,999",
    "dollars": 999999999
  },
  "discountable_product_ids": [
    "5e8420f2ad0fba0015406e56",
    "5e8420b54c61c3001ea5155c"
  ],
  "conditions": [
    {
      "id": "5e8445bcca53240021eab706",
      "min_item_count": 10,
      "min_price": {
        "cents": 999999999,
        "currency_symbol": "NT$",
        "currency_iso": "TWD",
        "label": "NT$999,999,999",
        "dollars": 999999999
      },
      "type": "red",
      "subscription_period": 4
    }
  ],
  "created_at": "2019-12-30T09:16:46.142+00:00",
  "updated_at": "2019-12-30T09:16:46.142+00:00",
  "discountable_category_ids": [
    "5e8c5b7ee3880972601cd58c",
    "5f48cb50e38809d8b4801609"
  ],
  "discount_on": "order",
  "discount_type": "percentage",
  "is_accumulated": true,
  "first_purchase_only": true,
  "first_purchase_all_platform": true,
  "codes": [
    "VIP001",
    "VIP002"
  ],
  "show_coupon": true,
  "membership_tier_id": "5e844fb7b6c29b000f00f9c6",
  "requires_membership": true,
  "whitelisted_membership_tier_ids": [
    "5e844fb7b6c29b000f00f9c6",
    "5e844fa74c61c30030a521f3"
  ],
  "user_max_use_count": 1,
  "max_use_count": 20,
  "use_count": 5,
  "sum_use_count": 14,
  "whitelisted_delivery_option_ids": [
    "5e8417e7d4f5f100393710fa",
    "5e841409beef3d001b403c3c",
    "5e8413ed563778001e96a319"
  ],
  "whitelisted_payment_ids": [
    "5e8413688fa5fc00159950d1",
    "5e84133f95b3340015764347",
    "5e84132050b28e002d149b18",
    "5e840fe1ca53240018eaaa50"
  ],
  "start_at": "2020-07-09T04:00:00.000+00:00",
  "end_at": "null",
  "status": "active",
  "usable": true,
  "for_affiliate_campaign": true,
  "is_contain_campaign": true,
  "seo_enabled": true,
  "seo_keywords": "summer special",
  "link": {
    "created_at": "2019-12-30T09:16:46.142+00:00",
    "updated_at": "2019-12-30T09:16:46.142+00:00"
  },
  "available_platforms": [
    "ec",
    "retail"
  ],
  "is_partial_free_shipping": true,
  "coupon_type": "draw",
  "extended_promotion_id": "5f06a6cb0a3509004853443a",
  "extend_promotions": [
    {
      "id": "5e8445bcca53240021eab706",
      "discount_percentage": 10,
      "discount_amount": {
        "cents": 999999999,
        "currency_symbol": "NT$",
        "currency_iso": "TWD",
        "label": "NT$999,999,999",
        "dollars": 999999999
      },
      "discountable_quantity": 3,
      "discounted_point": 100,
      "discounted_price": {
        "cents": 999999999,
        "currency_symbol": "NT$",
        "currency_iso": "TWD",
        "label": "NT$999,999,999",
        "dollars": 999999999
      },
      "discountable_product_ids": [
        "5e8420f2ad0fba0015406e56",
        "5e8420b54c61c3001ea5155c"
      ],
      "conditions": [
        {
          "id": "5e8445bcca53240021eab706",
          "min_item_count": 10,
          "min_price": {
            "cents": 999999999,
            "currency_symbol": "NT$",
            "currency_iso": "TWD",
            "label": "NT$999,999,999",
            "dollars": 999999999
          },
          "type": "red",
          "subscription_period": 4
        }
      ]
    }
  ],
  "drew_coupon_count": 20,
  "whitelisted_membership_tiers": [
    {
      "_id": "id value",
      "name_translations": "membership_tier_name"
    }
  ],
  "summary": {
    "en": "summary",
    "zh-hant": "概況"
  },
  "available_channel_ids": [
    "5e8420f2ad0fba0015406e56",
    "5e8420b54c61c3001ea5155c"
  ],
  "banner_medias": {
    "id": "5f8e5dc08a8bb70a5c9cd93c",
    "alt_translations": {
      "en": "Image ALT",
      "zh-hant": "圖片ALT"
    },
    "images": {
      "original": {
        "width": 800,
        "height": 800,
        "url": "https://img.example.com/media/1234/thumb.jpg"
      }
    }
  }
}