v1

latestOpenAPI 3.0.02026-07-26318168886.7 KB
Affiliate Campaigns

Create Affiliate Campaign

To create affiliate campaign.<br>建立推薦活動。

post/affiliate_campaigns

Request body

namestring required

Affiliate Campaign Name<br>推薦活動名稱

reward_typestring

Reward type<br>訂單回饋類型<br>

promotion_idsstring[]

Promotion Ids<br>套用優惠折扣 ID 列表

codestring required

Affiliate code<br>推薦代碼

start_atstring date-time

Affiliate campaign start time<br>推薦活動開始時間<br>-<br>*UTC Time

end_atstring date-time

Affiliate campaign end time<br>推薦活動結束時間<br>-<br>*UTC Time

remarks_translationsobject

Remarks translations<br>顯示於 KOL Hub 的條款說明

apply_on'order' | 'product'

Apply on order or product<br>套用於訂單或商品

apply_method'all' | 'product'

Apply method<br> 套用方式:<br> - all: 全部<br> - item: 逐筆設定

affiliate_percentagenumber float

Affiliate percentage<br>分潤百分比

affiliate_amountobject

Affiliate amount<br>分潤固定金額

condition_min_amountobject

The threshold amount (for order level)<br>門檻金額 (for order level)

Response

OK

idstring

Affiliate Campaign Unique ID<br>推薦活動ID

namestring

Affiliate Campaign Name<br>推薦活動名稱

type'affiliate_referral' | 'product_attribution'

Affiliate Campaign Type<br>推薦活動類型

condition_valueinteger

Condition for total order over how much money to get the reward<br>全單超過多少錢可以獲得回饋

reward_typestring

Reward type<br>訂單回饋類型<br>

reward_valueinteger

Reward value<br>訂單回饋值

promotion_idsstring[]

Promotion ids<br>套用優惠折扣 ID 列表

codestring

Affiliate code<br>推薦代碼

referral_linkstring

Referral link<br>推薦連結

partner_infoobject

Partner Info<br>合作夥伴資訊

apply_on'order' | 'product'

Apply on order or product<br>套用於訂單或商品

apply_method'all' | 'product'

Apply method<br> 套用方式:<br> - all: 全部<br> - item: 逐筆設定

use_countinteger

Use count<br>使用次數

affiliate_percentagenumber float

Affiliate percentage<br>分潤百分比

start_atstring

Affiliate campaign start time<br>推薦活動開始時間<br>-<br>*UTC Time

end_atstring

Affiliate campaign end time<br>推薦活動結束時間<br>-<br>*UTC Time

created_atstring

Affiliate campaign created time<br>推薦活動創建時間<br>-<br>*UTC Time

updated_atstring

Affiliate campaign updated time<br>推薦活動更新時間<br>-<br>*UTC Time

Example response

{
  "id": "5ce0d084e388096bdb229a59",
  "name": "Affiliate Campaign Name",
  "type": "affiliate_referral",
  "condition_value": 100,
  "reward_type": "percentage",
  "reward_value": 10,
  "promotion_ids": [
    "5ce0d084e388096bdb229a59"
  ],
  "code": "iris123",
  "referral_link": "https://irishsu400.shoplineapp.com?sl-ref=iris123",
  "partner_info": {
    "name": "",
    "email": ""
  },
  "apply_on": "order",
  "apply_method": "all",
  "use_count": 1,
  "affiliate_percentage": 30,
  "affiliate_amount": {
    "cents": 999999999,
    "currency_symbol": "NT$",
    "currency_iso": "TWD",
    "label": "NT$999,999,999",
    "dollars": 999999999
  },
  "condition_min_amount": {
    "cents": 999999999,
    "currency_symbol": "NT$",
    "currency_iso": "TWD",
    "label": "NT$999,999,999",
    "dollars": 999999999
  },
  "campaign_products": {
    "id": "5ce0d084e388096bdb229a59",
    "product_id": "5ce0d084e388096bdb229a59",
    "affiliate_percentage": 30,
    "affiliate_amount": {
      "cents": 999999999,
      "currency_symbol": "NT$",
      "currency_iso": "TWD",
      "label": "NT$999,999,999",
      "dollars": 999999999
    }
  },
  "start_at": "2018-01-10T06:33:45.231Z",
  "end_at": "2018-01-10T06:33:45.231Z",
  "remarks_translations": {
    "zh-hant": "條款說明"
  },
  "created_at": "2018-01-10T06:33:45.231Z",
  "updated_at": "2018-01-10T06:33:45.231Z",
  "total_reward_value": {
    "cents": 999999999,
    "currency_symbol": "NT$",
    "currency_iso": "TWD",
    "label": "NT$999,999,999",
    "dollars": 999999999
  }
}