HomeGuidesAPI ReferenceChangelogDiscussions
HomeLog In
Guides

Get Affiliate Campaign

Function

To get detailed information for an affiliate campaign with its ID
使用推薦活動 ID 獲取特定一個推薦活動的詳細資料

URL

GET <<api_domain>>/v1/affiliate_campaigns/:id

Request Parameters

ParameterTypeDescriptionExample
id
*Required
StringAffiliate campaign ID
推薦活動 ID
6049d431709478001d7c496b

Request Example

curl --location -g --request GET '<<api_domain>>/v1/affiliate_campaigns/:id' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer your token' \
--header 'Content-Type: application/json'

Response Fields

FieldTypeDescriptionExample
idStringAffiliate campaign ID
推薦活動 ID
6049d431709478001d7c496b
nameStringAffiliate campaign name
推薦活動名稱
Affiliate Campaign Name
condition_valueIntegerCondition for total order over how much money to get the reward
全單超過多少錢可以獲得回饋
100
reward_typeStringReward type
訂單回饋類型

-null : 沒有回饋
amount : 固定金額
percentage : 訂單百分比(%)
amount
reward_valueIntegerReward value
訂單回饋值

-搭配訂單回饋類型使用
if reward_type=amount, reward_value=10 代表回饋 10 元。

if reward_type=percentage, reward_value=10 代表回饋訂單金額 10 %。

if reward_type=null, reward_value=null (default) 代表沒有回饋
10
promotion_idStringPromotion id
套用優惠折扣 ID
5ce0d084e388096bdb229a59
codeStringAffiliate code
推薦代碼
code123
referral_linkStringReferral link
推薦連結
https://domain.shoplineapp.com?sl-ref=code123
partner_infoObjectPartner Info
合作夥伴資訊

- Note:
此欄位 partner_info 內容都會是空的 (因為此資訊只存在推薦活動列表中),如果要取得此資訊請改用Get Affiliate Campaigns
{
"name": "",
"email": ""
}
apply_onStringApply on order or product
套用於訂單或商品

- order
- product
order
apply_methodStringApply method
套用方式

- all: 全部
- item: 逐筆設定
all
use_countIntegerUse count
使用次數
0
affiliate_percentageFloatAffiliate percentage
分潤百分比
30
affiliate_amountMoneyAffiliate amount
分潤固定金額
{
"cents": 9999,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "NT$9,999",
"dollars": 9999
}
condition_min_amountMoneyThe threshold amount (for order level)
門檻金額 (for order level)
{
"cents": 100,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "NT$100",
"dollars": 100
}
campaign_productsArray[Object]指定分潤商品[{
"id": "636df5c595dfd82050ad2220",
"product_id": "5ce0d084e388096bdb229a59",
"affiliate_amount": {
"cents": 12,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "NT$12",
"dollars": 12
}
}]
start_atDateTimeAffiliate campaign start time
推薦活動開始時間
2018-01-10T06:33:45.231+00:00
end_atDateTimeAffiliate campaign end time
推薦活動結束時間

-null = no end date 永不過期
2018-01-10T06:33:45.231+00:00
remarks_translationsTranslationRemarks translations
顯示於KOL Hub 的條款說明
{}
created_atDateTimeAffiliate campaign created time
推薦活動創建時間
2018-01-10T06:33:45.231+00:00
updated_atDateTimeAffiliate campaign updated time
推薦活動更新時間
2018-01-10T06:33:45.231+00:00

Sample Response

{
  "id": "6396c536949f99004ab0929d",
  "name": "New Campaign Name 1670825270",
  "condition_value": 1,
  "reward_type": "percentage",
  "reward_value": 10,
  "promotion_id": null,
  "code": "code1670825270",
  "referral_link": "https://test.shoplineapp.com?sl-ref=code1670825270",
  "partner_info": {
    "name": "",
    "email": ""
  },
  "apply_on": "order",
  "apply_method": "all",
  "use_count": 1,
  "affiliate_percentage": 30,
  "affiliate_amount": {
    "cents": 9999,
    "currency_symbol": "NT$",
    "currency_iso": "TWD",
    "label": "NT$9,999",
    "dollars": 9999
  },
  "condition_min_amount": {
    "cents": 100,
    "currency_symbol": "NT$",
    "currency_iso": "TWD",
    "label": "NT$100",
    "dollars": 100
  },
  "campaign_products": [
    {
      "id": "636df5c595dfd82050ad2220",
      "product_id": "5ce0d084e388096bdb229a59",
      "affiliate_amount": {
        "cents": 12,
        "currency_symbol": "NT$",
        "currency_iso": "TWD",
        "label": "NT$12",
        "dollars": 12
      }
    }
  ],
  "start_at": "2022-12-12T06:07:50.476+00:00",
  "end_at": null,
  "remarks_translations": {},
  "created_at": "2022-12-12T06:07:51.046+00:00",
  "updated_at": "2022-12-12T06:07:51.046+00:00"
}