凍結免費轉活動
curl --request POST \
--url https://your-api-host/vendor/v2.0/freespin/freeze \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"eventID": "<string>",
"channelID": 123,
"memberAccount": "<string>",
"grantID": "<string>",
"sign": "<string>"
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://your-api-host/vendor/v2.0/freespin/freeze",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'eventID' => '<string>',
'channelID' => 123,
'memberAccount' => '<string>',
'grantID' => '<string>',
'sign' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
eventID: '<string>',
channelID: 123,
memberAccount: '<string>',
grantID: '<string>',
sign: '<string>'
})
};
fetch('https://your-api-host/vendor/v2.0/freespin/freeze', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://your-api-host/vendor/v2.0/freespin/freeze"
payload = {
"eventID": "<string>",
"channelID": 123,
"memberAccount": "<string>",
"grantID": "<string>",
"sign": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"frozenGrants": [
"abccc1234567890aaaaa1254",
"abccc1234567890aaaaa1231",
"abccc1234567890aaaaa1299",
"abccc1234567890aaaaa1288",
"abccc1234567890aaaaa1277"
]
},
"status": {
"code": "0",
"message": "success",
"datetime": "2022-07-01T10:13:54.920+08:00",
"traceCode": "7cf25e1957cc47fe8e01f1a7c6d504d6"
}
}
免費旋轉
凍結免費轉活動
POST
/
vendor
/
v2.0
/
freespin
/
freeze
凍結免費轉活動
curl --request POST \
--url https://your-api-host/vendor/v2.0/freespin/freeze \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"eventID": "<string>",
"channelID": 123,
"memberAccount": "<string>",
"grantID": "<string>",
"sign": "<string>"
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://your-api-host/vendor/v2.0/freespin/freeze",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'eventID' => '<string>',
'channelID' => 123,
'memberAccount' => '<string>',
'grantID' => '<string>',
'sign' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
eventID: '<string>',
channelID: 123,
memberAccount: '<string>',
grantID: '<string>',
sign: '<string>'
})
};
fetch('https://your-api-host/vendor/v2.0/freespin/freeze', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://your-api-host/vendor/v2.0/freespin/freeze"
payload = {
"eventID": "<string>",
"channelID": 123,
"memberAccount": "<string>",
"grantID": "<string>",
"sign": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"frozenGrants": [
"abccc1234567890aaaaa1254",
"abccc1234567890aaaaa1231",
"abccc1234567890aaaaa1299",
"abccc1234567890aaaaa1288",
"abccc1234567890aaaaa1277"
]
},
"status": {
"code": "0",
"message": "success",
"datetime": "2022-07-01T10:13:54.920+08:00",
"traceCode": "7cf25e1957cc47fe8e01f1a7c6d504d6"
}
}
- 凍結指定會員在此活動下的 grant。eventID / channelID / memberAccount 必填;grantID 選填。
- 有帶 grantID:僅凍結該張 (需同時屬於該 eventID 與該 memberAccount)。
- 未帶 grantID:凍結該會員此活動下所有可凍結 (New/Active) 的 grant。
請求參數
string
必填
參與簽章
活動編號 (24 碼 hex)
number
必填
參與簽章
渠道編號(若無渠道,請帶入1)
string
必填
參與簽章
會員帳號(允許字元:
a-z A-Z 0-9 _-)string
參與簽章
派發卡編號 (24 碼 hex)
回應
成功(HTTP 狀態碼固定為 200,請以status.code 判斷結果)
object
{
"data": {
"frozenGrants": [
"abccc1234567890aaaaa1254",
"abccc1234567890aaaaa1231",
"abccc1234567890aaaaa1299",
"abccc1234567890aaaaa1288",
"abccc1234567890aaaaa1277"
]
},
"status": {
"code": "0",
"message": "success",
"datetime": "2022-07-01T10:13:54.920+08:00",
"traceCode": "7cf25e1957cc47fe8e01f1a7c6d504d6"
}
}