Create flash price campaign
POST <<api_domain>>/v1/flash_price_campaigns
To create new flash price campaign
創建新商品限時促銷價活動
Request Example
curl --request POST \
--url '<<api_domain>>/v1/flash_price_campaigns' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '
{
"flash_price_campaign": {
"start_at": "2022-01-01 00:00:00",
"end_at": "2022-01-02 00:00:00",
"title": "2022-01-02 00:00:00",
"price_sets": [
{
"product_id": "610258858c5acd00452fcf8d",
"price": 23.16,
"price_sale": 20.28,
"price_details": [
{
"variation_key": "610258858c5acd00452fcf8d",
"price": 996.12,
"price_sale": 11.11
}
]
}
]
}
}
'
Request Body
start_at Required |
string |
The start time of the event 商品限時促銷價活動的開始時間 Should use UTC time 應使用UTC時間 |
end_at Required |
String |
The end time of the event 商品限時促銷價活動的結束時間 Should use UTC time 應使用UTC時間 |
title Required |
string |
Flash price campaign's title 商品限時促銷價活動的名稱 |
price_sets |
array |
The product price sets of this flash price campaigns. 商品限時促銷價活動的商品限時價格。 |
price_sets[].product_id Required |
string |
The id of the product 商品ID |
price_sets[].price |
number |
The price of the product when the event is started 商品限時促銷價活動的商品限時價格 |
price_sets[].price_sale |
number |
The price sale of the product when the event is started 商品限時促銷價活動的商品限時促銷價格 |
price_sets[].price_details |
array |
The price sets of the variations of the product of this event 商品限時促銷價活動的商品規格價錢組 |
price_sets[].price_details[].variation_key Required |
string |
The price sets of the variations of the product of this event 商品限時促銷價活動的商品規格價錢組 |
price_sets[].price_details[].price Required |
string |
The price of the product when the event is started 商品限時促銷價活動的商品規格限時價格 |
price_sets[].price_details[].price_sale Required |
string |
The price sale of the product when the event is started 商品限時促銷價活動的商品規格限時促銷價格 |
Sample Response
{
"id": "5892d8679f9a4fc07b008295",
"title": "Summer flash sale 2021!",
"start_at": "2021-08-19T18:00:00.000Z",
"end_at": "2021-08-21T15:30:00.000Z",
"product_ids": [
"string"
],
"price_sets": [
{
"id": "610258858c5acd00452fcf8d",
"price": {
"cents": 999999999,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "NT$999,999,999",
"dollars": 999999999
},
"price_sale": {
"cents": 999999999,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "NT$999,999,999",
"dollars": 999999999
},
"product": {
"title_translations": {
"en": "testing SL-8049",
"zh-hant": "測試 SL-8049 round 2"
},
"price": {
"cents": 999999999,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "NT$999,999,999",
"dollars": 999999999
},
"price_sale": {
"cents": 999999999,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "NT$999,999,999",
"dollars": 999999999
},
"same_price": true,
"media_thumb_url": "https://img-shoplineapp-com.s3.amazonaws.com/media/image_clips/60c9cc630053cc00462aad34/original.jpg?1623837795"
},
"price_details": [
{
"variation_key": "610258858c5acd00452fcf8d",
"price": {
"cents": 999999999,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "NT$999,999,999",
"dollars": 999999999
},
"price_sale": {
"cents": 999999999,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "NT$999,999,999",
"dollars": 999999999
},
"variation": {
"title_translations": {
"en": "testing SL-8049",
"zh-hant": "測試 SL-8049 round 2"
},
"price": {
"cents": 999999999,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "NT$999,999,999",
"dollars": 999999999
},
"price_sale": {
"cents": 999999999,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "NT$999,999,999",
"dollars": 999999999
}
}
}
]
}
]
}
Updated about 1 month ago