Get Promotion

Function

To get detailed information for a specific promotion with its ID
使用優惠活動ID獲取特定一個優惠活動的詳細資料

URL

GET API_DOMAIN/v1/promotions/:id

Request parameters

ParameterTypeDescriptionExample
:id
*Required
StringPromotion ID
優惠活動ID
ruby 5e8445bcca53240021eab706

Response fields

FieldTypeDescriptionExample
idStringPromotion ID
優惠活動ID
5e8445bcca53240021eab706
discount_percentageFloatDiscount percentage
折扣百分比
  • Applicable when discount_type is percentage
    當discount_type為percentage時適用
10.0
discount_amountMoneyDiscount amount
折扣固定金額
  • Applicable when discount_type is gift
    當discount_type為amount時適用
Please check the link on the left
discountable_quantityIntegerQuantity
獲得數量
  • When discount_type is gift, this field refers to quantity of gift
    當discount_type為gift時,此為贈品數量\

  • When discount_type is addon, this field refers to quality of add-on
    當discount_type為addon時,此為可加購數量

3
discounted_pointIntegerAmount of point to redeem gift
點數兌換
  • Applicable when discount_type is member_point_redeem_gift
    當discount_type為member_point_redeem_gift時適用
100
discounted_priceMoneyDiscounted price
優惠價格
  • Applicable when discount_type is bundle_pricing/ bundle_group/addon
    當discount_type為bundle_pricing/ bundle_group/addon時適用
Please check the link on the left
discountable_product_idsArrayIds of Discounted product
指定商品ids
  • [
    "5e8420f2ad0fba0015406e56",
    "5e8420b54c61c3001ea5155c"
    ]_
discountable_category_idsArrayIds of Discounted category
指定商品分類ids
  • [
    "5e8c5b7ee3880972601cd58c",
    "5f48cb50e38809d8b4801609"
    ]_
conditionsArrayCondition of the promotion to take effect
本階層活動生效條件
  • id = condition id 條件ID
    min_item_count = minimum amount of item 滿件
    min_price = minimum price 滿額
    type = A or B bundle group A組(紅標)或B組(綠標) *Applicable when discount_type is bundle_group 當discount_type為bundle_group時適用
    whitelisted_product_ids = whitelisted product ids指定商品條件ids
    whitelisted_category_ids = whitelisted category ids 指定分類條件ids
    blacklisted_product_ids = blacklisted product ids 指定分類排除商品
  • [
    {
    "id": "5f06c338a5daed002d2dbc7e",
    "minitem_count": 2,
    "min_price": null,
    "type": null,
    "whitelisted_product_ids": [
    "5e8420f2ad0fba0015406e56",
    "5e8420b54c61c3001ea5155c"
    ],
    "whitelisted_category_ids": [],
    "blacklisted_product_ids": []
    }
    ]
discount_onStringPromotion target
優惠套用對象
  • order = Entire shop 全店
    item = Specific item 指定商品
    category = Specific category 指定分類
order
discount_typeStringDiscount type
折扣類型
  • percentage: 折扣%
    amount: 固定金額
    gift: 贈品
    addon: 加購品
    free_shipping: 免運
    bundle_pricing: 任選優惠
    bundle_group: A+B組合優惠(紅配綠)
    member_point_redeem_gift: 點數兌換贈品
    subscription_gift
percentage
is_accumulatedBooleanIs bundle pricing or bundle pricing accumulated?
任選優惠/A+B組合優惠是否累計
true
codesArrayCoupon Code
促銷代碼
  • [
    "VIP001",
    "VIP002"
    ]_
requires_membershipBooleanDoes it require membership?
設定目標群組
  • false: 所有顧客
    true: 會員
true
whitelisted_membership_tier_idsArraySpecific Membership Tiers
適用會員等級
  • [
    "5e844fb7b6c29b000f00f9c6",
    "5e844fa74c61c30030a521f3"
    ]_
membership_tier_idStringPromotion Membership Tier
活動歸屬的會員等級
5e8445bcca53240021eab706
whitelisted_tag_contentsArraySpecific tag contents
活動適用標籤
  • [
    "tagA",
    "tagB"
    ]_
user_max_use_countIntegerLimit per member
每會員最多使用次數
  • null = Unlimited 不限使用次數
1
max_use_countIntegerHow many times can this promotion be used?
活動限使用次數
  • null = Unlimited 不限使用次數
20
use_countIntegerUsage of this layer of promotion
本階層活動已使用次數
5
sum_use_countIntegerTotal usage of promotion
活動已使用次數
14
drew_coupon_countIntegerTotal drew of promotion
優惠券已次數
0
whitelisted_delivery_option_idsArrayDelivery options that applicable to the promotion
活動適用送貨方式
  • [
    "5e8417e7d4f5f100393710fa",
    "5e841409beef3d001b403c3c",
    "5e8413ed563778001e96a319"
    ]_
whitelisted_payment_idsArrayPayment options that applicable to the promotion
活動適用付款方式
  • [
    "5e8413688fa5fc00159950d1",
    "5e84133f95b3340015764347",
    "5e84132050b28e002d149b18",
    "5e840fe1ca53240018eaaa50"
    ]_
start_atDateTimePromotion start time
活動開始時間
2020-07-09T04:00:00.000+00:00
end_atDateTimePromotion end time
活動結束時間
  • null = no end date 永不過期
null
created_atDateTimePromotion created time
活動創建時間
2020-07-09T04:00:00.000+00:00
updated_atDateTimePromotion updated time
活動更新時間
2020-07-09T04:00:00.000+00:00
statusStringPromotion status
活動狀態
  • active: 上架
    draft: 下架
    hidden: 會員默認優惠/主商品加購品
    removed: 刪除
active
usableBooleanIs promotion active
優惠是否進行中
  • true: published and ongoing 活動上架且進行中
false: unpublished or not started or expired 活動下架 或是 尚未開始 或是 已過期
true
first_purchase_onlyBooleanIs first purchase only
是否適用首購優惠
true
show_couponBooleanIs promotion coupons showed
是否顯示活動優惠碼
true
for_affiliate_campaignBooleanIs applicable to affiliate campaign
是否適用於推薦活動
true
is_contain_campaignBooleanIs binded to affiliate campaign
是否已綁定推薦活動
true
seo_keywordsStringSEO keywords
SEO 關鍵字
summer special
seo_description_translationsTranslationDescription of SEO
SEO優化描述
Please check the link on the left
seo_title_translationsTranslationTitle of SEO
SEO優化標題
Please check the link on the left
title_translationsTranslationPromotion Title
活動標題
Please check the link on the left
linkLinkSEO Link
SEO 連結
Please check the link on the left
available_platformsArrayPromotion available platforms
活動適用平台
  • [
    "ec"
    ]_
is_partial_free_shippingBooleanIs partial free shipping
是否部分免運
true
extended_promotion_idStringParent promotion id
母層活動id
  • applicable when this is a child promotion
5f06a6cb0a3509004853443a
extend_promotionsArrayChild layer promotion and condition
多階層優惠活動與條件
  • id = child promotion id 子層活動ID
    discount_percentage = discount percentage 折扣百分比
    discount_amount = Discount amount
    折扣固定金額
    discountable_quantity = Quantity 獲得數量
    discounted_point = Amount of point to redeem gift 點數兌換
    discounted_price = Discounted price 優惠價格
    discountable_product_ids = Ids of Discounted product 指定商品ids
  • [
    {
    "id": "5f06c48a436e2b004b471613",
    "discountpercentage": null,
    "discount_amount": null,
    "discountable_quantity": null,
    "discounted_point": 10000,
    "discounted_price": null,
    "discountable_product_ids": [
    "5f06a6ad2a051a0048caec6f"
    ],
    "conditions": []
    }
    ]

Response Example

{
   "id":"62aaf4d83dc888003b2ce6de",
   "discount_percentage":3,
   "discount_amount":null,
   "discountable_quantity":null,
   "discounted_point":null,
   "discounted_price":null,
   "discountable_product_ids":[
      "629821a3b6aafb0007f5091b"
   ],
   "conditions":[
      {
         "id":"62aaf4d83dc888003b2ce6df",
         "min_item_count":null,
         "min_price":{
            "cents":666,
            "currency_symbol":"NT$",
            "currency_iso":"TWD",
            "label":"NT$666",
            "dollars":666
         },
         "type":null,
         "whitelisted_product_ids":[
            "62440ebeeeaf010008c40ee4",
            "62440ebeeeaf010008c40ed8"
         ],
         "whitelisted_category_ids":[
            
         ],
         "blacklisted_product_ids":[
            
         ]
      }
   ],
   "created_at":"2022-06-16T09:16:08.251+00:00",
   "updated_at":"2022-06-16T09:17:57.118+00:00",
   "title_translations":{
      "en":"44444"
   },
   "discountable_category_ids":[
      
   ],
   "discount_on":"item",
   "discount_type":"percentage",
   "is_accumulated":false,
   "codes":[
      
   ],
   "show_coupon":false,
   "membership_tier_id":null,
   "requires_membership":false,
   "whitelisted_membership_tier_ids":[
      
   ],
   "whitelisted_tag_contents":[
      
   ],
   "user_max_use_count":0,
   "max_use_count":11,
   "use_count":0,
   "sum_use_count":0,
   "first_purchase_only":true,
   "whitelisted_delivery_option_ids":[
      "627cb1148466020038cc2fbd",
      "627cabfca31d87001fc59d15",
      "627cabc8a31d870019c59d15",
      "627c851ce10d0e1df7c9a4c5",
      "6195cd3207d5e70049c9506c"
   ],
   "whitelisted_payment_ids":[
      "6267a9289ad3fd00340665dc",
      "62625477e74c640038cfd928",
      "6195ccfd07d5e7004cc9506b"
   ],
   "start_at":"2022-06-14T17:55:02.000+00:00",
   "end_at":null,
   "status":"active",
   "usable":true,
   "for_affiliate_campaign":false,
   "is_contain_campaign":false,
   "seo_keywords":"abc",
   "seo_description_translations":{
      
   },
   "seo_title_translations":{
      
   },
   "link":null,
   "available_platforms":[
      "ec"
   ],
   "is_partial_free_shipping":false,
   "extended_promotion_id":"62aaf4d83dc88800322ce6e1",
   "extend_promotions":[
      {
         "id":"5f06c48a436e2b004b471613",
         "discount_percentage":null,
         "discount_amount":null,
         "discountable_quantity":null,
         "discounted_point":10000,
         "discounted_price":null,
         "discountable_product_ids":[
            "5f06a6ad2a051a0048caec6f"
         ],
         "conditions":[
            
         ]
      }
   ]
}

Did this page help you?