Appearance
Template
This method helps get information about a bonus template.
NOTE: This method is optional. The PartnerBoard is the most reasonable way to get information about a bonus template.
The successful response is described in the Templates method section.
POST https://{S2S_API_URL}/bonuses/template
A request examples:
An example using firebase/php-jwt and guzzlehttp/guzzle packages:
php
use Firebase\JWT\JWT;
use GuzzleHttp\Client;
$PARTNER_SECRET = 'testdemo';
$payload = [
'cid' => 'fbet',
'templateId' => 1,
];
$jwtParts = explode('.', JWT::encode($payload, $PARTNER_SECRET, 'HS256'));
$signature = implode('.', [$jwtParts[0], '', $jwtParts[2]]);
// x-sign-jws=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..b_l10uHDIjFiEUbxDGVIEKQ_k8mgDAQdUyKBZcmJ1ew
echo "x-sign-jws=$signature";
// send the request
$body = json_encode($payload, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
$url = 'https://{S2S_API_URL}/bonuses/template';
$client = new Client();
$response = $client->request('POST', $url, [
'body' => $body,
'headers' => [
"Content-type" => "application/json",
"x-sign-jws" => $signature
]
]);
echo $response->getBody()->getContents();The table below describes the following parameters:
| Parameter | Type | Description |
|---|---|---|
| cid | string | Partner API Key. |
| templateId | integer | Parameter of the unique identifier of the bonus pattern assigned by Sportsbook. |
A response examples:
HTTP status code: 200
json
{
"id":1,
"name":"Bonus freebet",
"isEnable":true,
"type":"freebet_standart",
"cid":"fbet",
"stage":2,
"fromTime":1607558400,
"toTime":1639094400,
"daysToUse":5,
"disciplines":[
"csgo"
],
"freebetData":{
"minSelection":1,
"maxSelection":2,
"minOdd":1.01,"maxOdd":3,
"betAmount":5,
"betCount":5,
"maxWin":100,
"currency":"USD",
"maxWinCurrency": "USD"
},
"availableCountries": null,
"availableTournaments": null
}