v1

latestOpenAPI 3.0.02026-07-26318168886.7 KB
Promotions

Get Promotions

To get detailed information of couple promotions sorted by time<br>利用時間範圍選取與排序獲取數筆優惠活動

get/promotions

Query parameters

updated_afterstring

Filter data by those updated after specific time.<br> 取得 updated_at 大於指定時間的優惠活動(包含指定時間)<br> *Should use UTC time'

updated_beforestring

Filter data by those updated before specific time.<br> 取得 updated_at 小於指定時間的優惠活動(包含指定時間)<br> *Should use UTC time'

created_afterstring

Filter data by those created after specific time.<br> 取得 created_at 大於指定時間的優惠活動(包含指定時間)<br> *Should use UTC time'

created_beforestring

Filter data by those created before specific time.<br> 取得 created_at 小於指定時間的優惠活動(包含指定時間)<br> *Should use UTC time'

start_afterstring

Filter data by those updated after specific time.<br> 取得 start_at 大於指定時間的優惠活動(包含指定時間)<br> *Should use UTC time'

start_beforestring

Filter data by those updated before specific time.<br> 取得 start_at 小於指定時間的優惠活動(包含指定時間)<br> *Should use UTC time'

end_afterstring

Filter data by those updated after specific time.<br> 取得 end_at 大於指定時間的優惠活動(包含指定時間)<br> *Should use UTC time'

end_beforestring

Filter data by those updated before specific time.<br> 取得 end_at 小於指定時間的優惠活動(包含指定時間)<br> *Should use UTC time'

customer_idstring

用戶id

scope'valid' | 'invalid'

promotion是否失效 (搭配customer_id使用)

promotion_idsstring[]

Filter promotions by IDs.<br> The promotion_ids parameter must be used standalone.<br> 透過 IDs 獲取相關優惠活動,此參數須單獨使用。

pageinteger

Page Number<br>頁數

per_pageinteger

Numbers of Orders per Page<br>每頁顯示 n 筆資料<br> 上限 100

Response

OK

Example response

{
  "items": [
    {
      "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"
          }
        }
      }
    }
  ],
  "pagination": {
    "current_page": 1,
    "per_page": 24,
    "total_count": 1,
    "total_pages": 1
  }
}