Freebets API

Freebets API is used for granting rewards, and reward campaigns to one or multiple users. First-time user's bonuses are supported by most suppliers, however, in some cases a player must interact with the game before a free bet can be granted.


Freebets API Reference


Create a reward


post

The endpoint for creating one reward. You can create rewards of 2 types: Single-use and Campaign-related.

Creating a Single-use reward

  1. Get a list of available prepaids via /prepaids/list endpoint and select a prepaid.

  2. Add the prepaid_uuid to request.

  3. If the bet_value and/or the bet_count in the prepaid's value is set to NULL, you can enter any values. Otherwise, the values from the prepaid will be used to create the reward.

Creating a Campaign-related reward

  1. Create a campaign via POST campaigns/create.

  2. Pass the campaign_uuid.

  3. prepaid_uuid, bet_value, bet_count, start_time, and end_time values will be inherited from the campaign.

We strongly recommend that you set the start / end dates for individual rewards and campaigns. Otherwise, the rewards will automatically expire in several weeks.

Header parameters
X-Hub88-SignaturestringRequired

RSA-SHA256 is used to sign the request body using the private key. The signature is validated using the public key associated with the provided operator_id.

Body
userstring · min: 3Required

The unique user ID in the Operator’s system. In case of DEMO gameplay, this parameter may be omitted.

Example: john12345
sub_partner_idstringOptional

ID of Operator's sub-partner (brand, whitelabel, site, etc.) which uses same integration and credentials as an Operator. Used for detailed reporting and integration type switching. Sites under the same Operator can use different integration types: TransferWallet or SeamlessWallet. A single site (sub_partner_id) can NOT have both kinds of integration at the same time.

Example: my-casino-id
start_timestring · ISO-8601Optional

The date and time combination in ISO 8601 Extended format (YYYY-MM-DDThh:mm:ss).

Example: 2017-11-05T13:15:30
prepaid_uuidstringOptional

Standard 16-byte prepaid's unique ID (UUID) on Hub88 side referencing a prepaid reward.

Example: 0e6bde62-4713-4b85-b510-59f0d729d8f7
operator_idintegerRequired

Unique identifier for the Operator in Hub88 system. Used to authorize incoming requests. You can obtain your operator_id from the Hub88 BackOffice after your Operator entity is registered and set up in the Hub88 system by the internal teams.

Example: 1
game_codestringOptional

The unique game identifier in Hub88 system in the form of a string. game_code can be obtained from the /game/list endpoint.

Example: clt_dragonrising
end_timestring · ISO-8601Optional

The date and time combination in ISO 8601 Extended format (YYYY-MM-DDThh:mm:ss).

Example: 2017-11-05T13:15:30
campaign_uuidstringOptional

The unique campaign ID in Hub88 side, displayed in standard 16-byte UUID format.

Example: 7b5c8a93-4d3a-4bfb-8554-f923d46aa485
bet_valueintegerOptional

The amount of money displayed in integer (Int64) format. To convert real float value to integer, it is multiplied by 100000. Example: $3.56 is represented as 356000

Example: 100500
bet_countintegerOptionalExample: 5
operator_referencestringOptional

The unique reference of reward on the Operator's side.

Responses
200

OK

application/json
post
POST /operator/generic/v2/freebet/rewards/create HTTP/1.1
Host: 
X-Hub88-Signature: text
Content-Type: application/json
Accept: */*
Content-Length: 337

{
  "user": "john12345",
  "sub_partner_id": "my-casino-id",
  "start_time": "2017-11-05T13:15:30",
  "prepaid_uuid": "0e6bde62-4713-4b85-b510-59f0d729d8f7",
  "operator_id": 1,
  "game_code": "clt_dragonrising",
  "end_time": "2017-11-05T13:15:30",
  "campaign_uuid": "7b5c8a93-4d3a-4bfb-8554-f923d46aa485",
  "bet_value": 100500,
  "bet_count": 5,
  "operator_reference": "text"
}
200

OK

{
  "status": "FRS_ACTIVE",
  "user": "john12345",
  "start_time": "2017-11-05T13:15:30",
  "currency": "EUR",
  "end_time": "2017-11-05T13:15:30",
  "game_code": "clt_dragonrising",
  "bet_count": 5,
  "bet_value": 100500,
  "operator_reference": "reward_001",
  "campaign_uuid": "7b5c8a93-4d3a-4bfb-8554-f923d46aa485",
  "prepaid_uuid": "0e6bde62-4713-4b85-b510-59f0d729d8f7",
  "reward_uuid": "a28f93f2-98c5-41f7-8fbb-967985acf8fe"
}

Create multiple rewards in bulk


post

The endpoint for creating multiple rewards.

The process is similar to creating one reward (see POST /operator/generic/v2/freebet/rewards/create), but instead of one user you need to provide a list of users. All user's items need to include user and a unique operator_reference per user. You can add max 100 users.

operator_reference is a unique identifier of a reward from the Operator's side to ensure accuracy of the rewards.

The reward properties need to be provided once per request and they will be used to create all the rewards in the request.

Header parameters
X-Hub88-SignaturestringRequired

RSA-SHA256 is used to sign the request body using the private key. The signature is validated using the public key associated with the provided operator_id.

Body
sub_partner_idstringOptional

ID of Operator's sub-partner (brand, whitelabel, site, etc.) which uses same integration and credentials as an Operator. Used for detailed reporting and integration type switching. Sites under the same Operator can use different integration types: TransferWallet or SeamlessWallet. A single site (sub_partner_id) can NOT have both kinds of integration at the same time.

Example: my-casino-id
start_timestring · ISO-8601Optional

The date and time combination in ISO 8601 Extended format (YYYY-MM-DDThh:mm:ss).

Example: 2017-11-05T13:15:30
prepaid_uuidstringOptional

Standard 16-byte prepaid's unique ID (UUID) on Hub88 side referencing a prepaid reward.

Example: 0e6bde62-4713-4b85-b510-59f0d729d8f7
operator_idintegerRequired

Unique identifier for the Operator in Hub88 system. Used to authorize incoming requests. You can obtain your operator_id from the Hub88 BackOffice after your Operator entity is registered and set up in the Hub88 system by the internal teams.

Example: 1
game_codestringOptional

The unique game identifier in Hub88 system in the form of a string. game_code can be obtained from the /game/list endpoint.

Example: clt_dragonrising
end_timestring · ISO-8601Optional

The date and time combination in ISO 8601 Extended format (YYYY-MM-DDThh:mm:ss).

Example: 2017-11-05T13:15:30
campaign_uuidstringOptional

The unique campaign ID in Hub88 side, displayed in standard 16-byte UUID format.

Example: 7b5c8a93-4d3a-4bfb-8554-f923d46aa485
bet_valueintegerOptional

The amount of money displayed in integer (Int64) format. To convert real float value to integer, it is multiplied by 100000. Example: $3.56 is represented as 356000

Example: 100500
bet_countintegerOptionalExample: 5
Responses
200

OK

application/json
post
POST /operator/generic/v2/freebet/rewards/create_bulk HTTP/1.1
Host: 
X-Hub88-Signature: text
Content-Type: application/json
Accept: */*
Content-Length: 349

{
  "users": [
    {
      "user": "john12345",
      "operator_reference": "text"
    }
  ],
  "sub_partner_id": "my-casino-id",
  "start_time": "2017-11-05T13:15:30",
  "prepaid_uuid": "0e6bde62-4713-4b85-b510-59f0d729d8f7",
  "operator_id": 1,
  "game_code": "clt_dragonrising",
  "end_time": "2017-11-05T13:15:30",
  "campaign_uuid": "7b5c8a93-4d3a-4bfb-8554-f923d46aa485",
  "bet_value": 100500,
  "bet_count": 5
}
200

OK

{
  "reward": {
    "start_time": "2017-11-05T13:15:30",
    "prepaid_uuid": "0e6bde62-4713-4b85-b510-59f0d729d8f7",
    "game_code": "clt_dragonrising",
    "end_time": "2017-11-05T13:15:30",
    "currency": "EUR",
    "campaign_uuid": "7b5c8a93-4d3a-4bfb-8554-f923d46aa485",
    "bet_value": 100500,
    "bet_count": 5
  },
  "success": [
    {
      "user": "john12345",
      "operator_reference": "9a049723-da79-42c6-b630-09509be86688",
      "reward_uuid": "379c1408-00bf-498a-8597-e98d081d0088"
    },
    {
      "user": "amy12345",
      "operator_reference": "1018a15b-2547-4c47-ad6f-252538b7da58",
      "reward_uuid": "80a83382-836b-4ed5-bef0-867d49ea87ab"
    }
  ],
  "failed": [
    {
      "user": "mark12345",
      "operator_reference": "72a70bac-5493-4cd3-95e8-80e3236f6d5e",
      "reason": "Operator refence was already used for different reward."
    }
  ],
  "error": true,
  "message": "Not all rewards were created successfully, please see specific reasons from failed."
}

Get a List of Rewards


post

The endpoint for retrieving a list of Rewards. The endpoint allows pagination using cursors, for fetching specific patches of Rewards. See more about Pagination here.

Header parameters
X-Hub88-SignaturestringRequired

RSA-SHA256 is used to sign the request body using the private key. The signature is validated using the public key associated with the provided operator_id.

Body
operator_idintegerRequired

Unique identifier for the Operator in Hub88 system. Used to authorize incoming requests. You can obtain your operator_id from the Hub88 BackOffice after your Operator entity is registered and set up in the Hub88 system by the internal teams.

Example: 1
campaign_uuidstringOptional

The unique campaign ID in Hub88 side, displayed in standard 16-byte UUID format.

Example: 7b5c8a93-4d3a-4bfb-8554-f923d46aa485
start_timestring · ISO-8601Optional

The date and time combination in ISO 8601 Extended format (YYYY-MM-DDThh:mm:ss).

Example: 2017-11-05T13:15:30
end_timestring · ISO-8601Optional

The date and time combination in ISO 8601 Extended format (YYYY-MM-DDThh:mm:ss).

Example: 2017-11-05T13:15:30
reward_uuidstringOptional

The unique identifier for an reward on Hub88 side in standard 16-byte UUID format.

Example: a28f93f2-98c5-41f7-8fbb-967985acf8fe
userstring · min: 3Optional

The unique user ID in the Operator’s system.

Example: john12345
Responses
200

OK

application/json
post
POST /operator/generic/v2/freebet/rewards/list HTTP/1.1
Host: 
X-Hub88-Signature: text
Content-Type: application/json
Accept: */*
Content-Length: 314

{
  "operator_id": 1,
  "campaign_uuid": "7b5c8a93-4d3a-4bfb-8554-f923d46aa485",
  "start_time": "2017-11-05T13:15:30",
  "end_time": "2017-11-05T13:15:30",
  "reward_uuid": "a28f93f2-98c5-41f7-8fbb-967985acf8fe",
  "user": "john12345",
  "pagination": {
    "cursor": "eyJpZCI6OTAyLCJjcmVhdGVkX2F0IjoiMjAyNC0wNS0xMFQxMzozMDoyMVoifQ",
    "limit": "50"
  }
}
200

OK

{
  "rewards": [
    {
      "status": "FRS_ACTIVE",
      "user": "john12345",
      "start_time": "2017-11-05T13:15:30",
      "currency": "EUR",
      "end_time": "2017-11-05T13:15:30",
      "game_code": "clt_dragonrising",
      "bet_count": 5,
      "bet_value": 100500,
      "operator_reference": "reward_001",
      "campaign_uuid": "7b5c8a93-4d3a-4bfb-8554-f923d46aa485",
      "prepaid_uuid": "0e6bde62-4713-4b85-b510-59f0d729d8f7",
      "reward_uuid": "a28f93f2-98c5-41f7-8fbb-967985acf8fe"
    }
  ],
  "pagination": {
    "next_cursor": "eyJpZCI6OTAyLCJjcmVhdGVkX2F0IjoiMjAyNC0wNS0xMFQxMzozMDoyMVoifQ",
    "previous_cursor": "ey09876bnmOTAyLCJjcmVhdGVkX2F0IjoiMjAyNC0wNS0xMFQxMzozMDoyMVoifQ",
    "limit": "50"
  }
}

Cancel a reward


post

The endpoint for cancelling a granted reward. Note that a reward already claimed by a user cannot be canceled. Either reward_uuid or operator_reference must be specified.

Header parameters
X-Hub88-SignaturestringRequired

RSA-SHA256 is used to sign the request body using the private key. The signature is validated using the public key associated with the provided operator_id.

Body
reward_uuidstringOptional

The unique identifier for an reward on Hub88 side in standard 16-byte UUID format.

Example: a28f93f2-98c5-41f7-8fbb-967985acf8fe
operator_idintegerRequired

Unique identifier for the Operator in Hub88 system. Used to authorize incoming requests. You can obtain your operator_id from the Hub88 BackOffice after your Operator entity is registered and set up in the Hub88 system by the internal teams.

Example: 1
operator_referencestringOptional

The unique reference of reward on the Operator's side.

Example: reward_001
Responses
200

OK

application/json
post
POST /operator/generic/v2/freebet/rewards/cancel HTTP/1.1
Host: 
X-Hub88-Signature: text
Content-Type: application/json
Accept: */*
Content-Length: 104

{
  "reward_uuid": "a28f93f2-98c5-41f7-8fbb-967985acf8fe",
  "operator_id": 1,
  "operator_reference": "reward_001"
}
200

OK

{
  "status": "FRS_ACTIVE",
  "user": "john12345",
  "start_time": "2017-11-05T13:15:30",
  "currency": "EUR",
  "end_time": "2017-11-05T13:15:30",
  "game_code": "clt_dragonrising",
  "bet_count": 5,
  "bet_value": 100500,
  "operator_reference": "reward_001",
  "campaign_uuid": "7b5c8a93-4d3a-4bfb-8554-f923d46aa485",
  "prepaid_uuid": "0e6bde62-4713-4b85-b510-59f0d729d8f7",
  "reward_uuid": "a28f93f2-98c5-41f7-8fbb-967985acf8fe"
}

Get a list of available prepaids


post

Provides a list of all available prepaids. Prepaids with field bonus_buy set to true are meant to give a free bonus buy and are not suitable to be used for multiple (bet_count).

Header parameters
X-Hub88-SignaturestringRequired

RSA-SHA256 is used to sign the request body using the private key. The signature is validated using the public key associated with the provided operator_id.

Body
operator_idintegerRequired

Unique identifier for the Operator in Hub88 system. Used to authorize incoming requests. You can obtain your operator_id from the Hub88 BackOffice after your Operator entity is registered and set up in the Hub88 system by the internal teams.

Example: 1
game_codestringRequired

The unique game identifier in Hub88 system in the form of a string. game_code can be obtained from the /game/list endpoint.

Example: clt_dragonrising
currencystring · enumRequired

The ISO 4217 currency code. The following list contains all currencies supported by our system. Note that native gameplay support for these currencies may vary per Provider. Please contact us to know which Provider supports which currencies.

Example: EURPossible values:
Responses
200

OK

application/json
post
POST /operator/generic/v2/freebet/prepaids/list HTTP/1.1
Host: 
X-Hub88-Signature: text
Content-Type: application/json
Accept: */*
Content-Length: 65

{
  "operator_id": 1,
  "game_code": "clt_dragonrising",
  "currency": "EUR"
}
200

OK

[
  {
    "prepaid_uuid": "0e6bde62-4713-4b85-b510-59f0d729d8f7",
    "game_code": "clt_dragonrising",
    "currency": "EUR",
    "bet_value": 100500,
    "bet_count": 5,
    "bonus_buy": true,
    "meta": {}
  }
]

Create a campaign


post

Creating a campaign: 1. Get a list of available prepaids via /prepaids/list and select a prepaid. 2. Add the prepaid_uuid to request. 3. If bet_value and/or bet_count in the prepaid is NULL, you can enter any values. Otherwise, the values from the prepaid will be used to create the reward. 4. Submit /campaigns/create request.

Header parameters
X-Hub88-SignaturestringRequired

RSA-SHA256 is used to sign the request body using the private key. The signature is validated using the public key associated with the provided operator_id.

Body
start_timestring · ISO-8601Optional

The date and time combination in ISO 8601 Extended format (YYYY-MM-DDThh:mm:ss).

Example: 2017-11-05T13:15:30
prepaid_uuidstringRequired

Standard 16-byte prepaid's unique ID (UUID) on Hub88 side referencing a prepaid reward.

Example: 0e6bde62-4713-4b85-b510-59f0d729d8f7
operator_idintegerRequired

Unique identifier for the Operator in Hub88 system. Used to authorize incoming requests. You can obtain your operator_id from the Hub88 BackOffice after your Operator entity is registered and set up in the Hub88 system by the internal teams.

Example: 1
namestringRequired

The name of the campaign.

Example: st. patrick 5 x 1.005 EUR
game_codestringOptional

The unique game identifier in Hub88 system in the form of a string. game_code can be obtained from the /game/list endpoint.

Example: clt_dragonrising
end_timestring · ISO-8601Optional

The date and time combination in ISO 8601 Extended format (YYYY-MM-DDThh:mm:ss).

Example: 2017-11-05T13:15:30
bet_valueintegerOptional

The amount of money displayed in integer (Int64) format. To convert real float value to integer, it is multiplied by 100000. Example: $3.56 is represented as 356000

Example: 100500
bet_countintegerOptionalExample: 5
operator_referencestringOptional

The unique reference of a campaign on the Operator's side.

Example: reward_001
Responses
200

OK

application/json
post
POST /operator/generic/v2/freebet/campaigns/create HTTP/1.1
Host: 
X-Hub88-Signature: text
Content-Type: application/json
Accept: */*
Content-Length: 272

{
  "start_time": "2017-11-05T13:15:30",
  "prepaid_uuid": "0e6bde62-4713-4b85-b510-59f0d729d8f7",
  "operator_id": 1,
  "name": "st. patrick 5 x 1.005 EUR",
  "game_code": "clt_dragonrising",
  "end_time": "2017-11-05T13:15:30",
  "bet_value": 100500,
  "bet_count": 5,
  "operator_reference": "reward_001"
}
200

OK

{
  "name": "st. patrick 5 x 1.005 EUR",
  "start_time": "2017-11-05T13:15:30",
  "currency": "EUR",
  "end_time": "2017-11-05T13:15:30",
  "game_code": "clt_dragonrising",
  "game_id": "007",
  "bet_count": 5,
  "bet_value": 100500,
  "prepaid_uuid": "0e6bde62-4713-4b85-b510-59f0d729d8f7",
  "campaign_uuid": "7b5c8a93-4d3a-4bfb-8554-f923d46aa485",
  "operator_reference": "text"
}

Get a list of campaigns


post

Provides a list of available campaigns. In some cases, can return a full list of campaigns, including expired campaigns.

Header parameters
X-Hub88-SignaturestringRequired

RSA-SHA256 is used to sign the request body using the private key. The signature is validated using the public key associated with the provided operator_id.

Body
operator_idintegerRequired

Unique identifier for the Operator in Hub88 system. Used to authorize incoming requests. You can obtain your operator_id from the Hub88 BackOffice after your Operator entity is registered and set up in the Hub88 system by the internal teams.

Example: 1
start_timestring · ISO-8601Optional

The date and time combination in ISO 8601 Extended format (YYYY-MM-DDThh:mm:ss).

Example: 2017-11-05T13:15:30
end_timestring · ISO-8601Optional

The date and time combination in ISO 8601 Extended format (YYYY-MM-DDThh:mm:ss).

Example: 2017-11-05T13:15:30
namestringOptional

The name of the campaign.

Example: st. patrick 5 x 1.005 EUR
prepaid_uuidstringOptional

Standard 16-byte prepaid's unique ID (UUID) on Hub88 side referencing a prepaid reward.

Example: 0e6bde62-4713-4b85-b510-59f0d729d8f7
operator_referencestringOptional

The unique reference of a campaign on the Operator's side.

Example: reward_001
Responses
200

OK

application/json
post
POST /operator/generic/v2/freebet/campaigns/list HTTP/1.1
Host: 
X-Hub88-Signature: text
Content-Type: application/json
Accept: */*
Content-Length: 208

{
  "operator_id": 1,
  "start_time": "2017-11-05T13:15:30",
  "end_time": "2017-11-05T13:15:30",
  "name": "st. patrick 5 x 1.005 EUR",
  "prepaid_uuid": "0e6bde62-4713-4b85-b510-59f0d729d8f7",
  "operator_reference": "reward_001"
}
200

OK

[
  {
    "name": "st. patrick 5 x 1.005 EUR",
    "start_time": "2017-11-05T13:15:30",
    "currency": "EUR",
    "end_time": "2017-11-05T13:15:30",
    "game_code": "clt_dragonrising",
    "game_id": "007",
    "bet_count": 5,
    "bet_value": 100500,
    "prepaid_uuid": "0e6bde62-4713-4b85-b510-59f0d729d8f7",
    "campaign_uuid": "7b5c8a93-4d3a-4bfb-8554-f923d46aa485",
    "operator_reference": "text"
  }
]

Get a Campaign by UUID

post

Provides details of a specified Campaign.

Header parameters
X-Hub88-SignaturestringRequired

RSA-SHA256 is used to sign the request body using the private key. The signature is validated using the public key associated with the provided operator_id.

Body
operator_idintegerRequired

Unique identifier for the Operator in Hub88 system. Used to authorize incoming requests. You can obtain your operator_id from the Hub88 BackOffice after your Operator entity is registered and set up in the Hub88 system by the internal teams.

Example: 1
campaign_uuidstringRequired

The unique campaign ID in Hub88 side, displayed in standard 16-byte UUID format.

Example: 7b5c8a93-4d3a-4bfb-8554-f923d46aa485
Responses
200

OK

application/json
post
POST /operator/generic/v2/freebet/campaigns/info HTTP/1.1
Host: 
X-Hub88-Signature: text
Content-Type: application/json
Accept: */*
Content-Length: 72

{
  "operator_id": 1,
  "campaign_uuid": "7b5c8a93-4d3a-4bfb-8554-f923d46aa485"
}
200

OK

{
  "name": "st. patrick 5 x 1.005 EUR",
  "start_time": "2017-11-05T13:15:30",
  "currency": "EUR",
  "end_time": "2017-11-05T13:15:30",
  "game_code": "clt_dragonrising",
  "game_id": "007",
  "bet_count": 5,
  "bet_value": 100500,
  "prepaid_uuid": "0e6bde62-4713-4b85-b510-59f0d729d8f7",
  "campaign_uuid": "7b5c8a93-4d3a-4bfb-8554-f923d46aa485",
  "operator_reference": "text"
}

Last updated

Was this helpful?