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 |
|
Query Param
Parameter | Column Type | Description | Example |
|---|---|---|---|
coupon_status | string | status of Promotion
| valid |
available_platforms | string | Available Platforms
| ec |
coupon_type | array | Coupon Type
| draw
|
usage | string | Usage
| 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 | 5e8445bcca53240021eab706 |
items[].title_translations | 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 21 days ago