Get Customer Promotions
To get promotions of a customer
獲取顧客的優惠券
GET https://open.shopline.io/v1/customers/:customerID/promotions
Request Sample
curl --request GET \
--url API_DOMAIN/v1/customers/id/promotions \
--header 'Accept: application/json'Path Param
| Parameter | Column Type | Description | Example |
|---|---|---|---|
| Customer ID | String | Customer ID 顧客 ID | 5f47c96a86a983001614a834 |
Query Param
| Parameter | Column Type | Description | Example |
|---|---|---|---|
| coupon_status | string | status of Promotion enum:
| valid |
| available_platforms | string | Available Platforms 優惠券適用渠道
| ec |
| coupon_type | array | Coupon Type 優惠券形式
| draw
|
| usage | string | Usage 過濾優惠券已領用/不分領用狀況
| coupon 預設是 coupon |
Sample Response
{
"items": [
{
"id": "62de11e0d3cb9338d5c5a950",
"title_translations": {
"en": "Promotions & Campaigns",
"zh-hant": "-當指定商品--送贈品-update"
},
"discount_on": "item",
"codes": [
"hahahahaha1111"
],
"user_max_use_count": 0,
"max_use_count": 30,
"use_count": 0,
"user_use_count": 0,
"first_purchase_only": false,
"start_at": "2022-07-01T00:00:00.000+00:00",
"end_at": "2022-08-01T00:00:00.000+00:00",
"available_platforms": [
"ec"
],
"coupon_type": null
}
]
}Response Param
This API doesn't support pagination. It returns a maximum of 100 items.
此 API 不支援分頁,最多回傳 100 筆資料
| Field | Type | Description | Example |
|---|---|---|---|
| items[].id | String | Promotion ID 優惠活動ID | 5e8445bcca53240021eab706 |
| items[].title_translations | Translation | Title translations 標題翻譯 | Please check the link on the left |
| items[].discount_on | String | Promotion target 優惠套用對象
| order |
| items[].first_purchase_only | Boolean | For first purchase only 限首次購買使用 | false |
| items[].codes | Array | Coupon Code 促銷代碼 |
|
| items[].user_max_use_count | Integer | Limit per member 每會員最多使用次數
| 1 |
| items[].max_use_count | Integer | How many times can this promotion be used? 活動限使用次數
| 10 |
| items[].use_count | Integer | Usage of this layer of promotion 本階層活動已使用次數 | 5 |
| items[].user_use_count | Integer | Customer Usage 該顧客使用次數 | 5 |
| items[].start_at | DateTime | Promotion start time 活動開始時間 | 2020-07-09T04:00:00.000+00:00 |
| items[].end_at | DateTime | Promotion end time 活動結束時間
| null |
| items[].available_platforms | Array | Available Platforms 優惠券適用渠道
| [ec] |
| items[].coupon_type | String | Coupon Type 優惠券形式
| draw |
| items[].drew_coupon_count | Integer | How many times did this promotion been drew? 活動被領取次數 | |
| items[].discount_type | String | discount type of the promotion 優惠券的折扣類型 | |
| items[].user_coupon_status | String | User Coupon Status, Only expose when coupon_type is draw - | active |
| items[].available_channels | Array | available channel 指定通路 | |
| items[].condition_scope | String | Promotion condition scope, Dependent on promotion's conditions 優惠套用條件
| discounted_subtotal |
Updated 8 months ago
Did this page help you?
