Free rounds
Disable free rounds bonus code
Disables a single bonus code. The player holding this code can no longer redeem it.
The parent campaign and any other bonus codes are not affected.
DELETE
/
api
/
v1
/
free-rounds
/
campaigns
/
codes
/
{code}
Disable free rounds bonus code
curl --request DELETE \
--url https://{host}/api/v1/free-rounds/campaigns/codes/{code} \
--header 'X-Operator: <api-key>' \
--header 'X-Zd-Signature: <api-key>' \
--header 'X-Zd-Timestamp: <api-key>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{host}/api/v1/free-rounds/campaigns/codes/{code}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("X-Operator", "<api-key>")
req.Header.Add("X-Zd-Signature", "<api-key>")
req.Header.Add("X-Zd-Timestamp", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}const options = {
method: 'DELETE',
headers: {
'X-Operator': '<api-key>',
'X-Zd-Signature': '<api-key>',
'X-Zd-Timestamp': '<api-key>'
}
};
fetch('https://{host}/api/v1/free-rounds/campaigns/codes/{code}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/api/v1/free-rounds/campaigns/codes/{code}"
headers = {
"X-Operator": "<api-key>",
"X-Zd-Signature": "<api-key>",
"X-Zd-Timestamp": "<api-key>"
}
response = requests.delete(url, headers=headers)
print(response.text)HttpResponse<String> response = Unirest.delete("https://{host}/api/v1/free-rounds/campaigns/codes/{code}")
.header("X-Operator", "<api-key>")
.header("X-Zd-Signature", "<api-key>")
.header("X-Zd-Timestamp", "<api-key>")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{host}/api/v1/free-rounds/campaigns/codes/{code}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"X-Operator: <api-key>",
"X-Zd-Signature: <api-key>",
"X-Zd-Timestamp: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"message": "invalid currency code"
}{
"message": "invalid signature"
}{
"message": "<string>"
}{
"message": "internal error"
}Authorizations
Your operator identifier, issued by Zero-Dash during onboarding.
Hex-encoded HMAC-SHA512(apiPath|timestamp|data, secretKey). See Request signature.
Unix time in milliseconds, and the exact value signed. Requests older than 5 minutes are rejected.
Path Parameters
The bonusCode to disable.
Response
Bonus code disabled. No response body.
⌘I
Disable free rounds bonus code
curl --request DELETE \
--url https://{host}/api/v1/free-rounds/campaigns/codes/{code} \
--header 'X-Operator: <api-key>' \
--header 'X-Zd-Signature: <api-key>' \
--header 'X-Zd-Timestamp: <api-key>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{host}/api/v1/free-rounds/campaigns/codes/{code}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("X-Operator", "<api-key>")
req.Header.Add("X-Zd-Signature", "<api-key>")
req.Header.Add("X-Zd-Timestamp", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}const options = {
method: 'DELETE',
headers: {
'X-Operator': '<api-key>',
'X-Zd-Signature': '<api-key>',
'X-Zd-Timestamp': '<api-key>'
}
};
fetch('https://{host}/api/v1/free-rounds/campaigns/codes/{code}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/api/v1/free-rounds/campaigns/codes/{code}"
headers = {
"X-Operator": "<api-key>",
"X-Zd-Signature": "<api-key>",
"X-Zd-Timestamp": "<api-key>"
}
response = requests.delete(url, headers=headers)
print(response.text)HttpResponse<String> response = Unirest.delete("https://{host}/api/v1/free-rounds/campaigns/codes/{code}")
.header("X-Operator", "<api-key>")
.header("X-Zd-Signature", "<api-key>")
.header("X-Zd-Timestamp", "<api-key>")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{host}/api/v1/free-rounds/campaigns/codes/{code}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"X-Operator: <api-key>",
"X-Zd-Signature: <api-key>",
"X-Zd-Timestamp: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"message": "invalid currency code"
}{
"message": "invalid signature"
}{
"message": "<string>"
}{
"message": "internal error"
}