Create a new Jackpot Template and Jackpot Instance
This process requires you to have a valid Thrill-ID token which can retrieved by authenticating with Thrill-ID. For more information, see the Thrill-ID section.
Overview
- Create a new Jackpot Template
- Publish the Jackpot Template
- Instantiate a Jackpot Instance from the Jackpot Template
Example Data
- Operator ID:
my-operator - Brand ID:
my-brand
Steps
NOTE: The Operator and Brand must already exist in the system
1. Create a new Jackpot Template
- Service:
ThrillPots Service - Method:
POST - Path:
/templates - Content-Type:
application/json - Body:
{
"name": "Quick Hit Template for Developers",
"owner_id": "my-operator:my-brand",
"currency": "EUR",
"contribution_rules": {
"opt_in_required": true,
"contribution_type": {
"Fixed": 0.1
},
"operator_contribution_percentage": 0
},
"house_hold_contribution": {
"Percentage": 0.3
},
"win_selector_strategy": "Highest",
"pots": [
{
"id": "minor",
"contribution": {
"Percentage": 0.25
},
"seed_contribution": {
"Percentage": 0.85
},
"seed_strategy": {
"initial_seed_value": 10,
"min_reseed_value": 10,
"fund_strategy": "CollectToMinReseed",
"reseed_strategy": "Full"
},
"max_instantiation_count": null,
"is_progressive": true,
"supports_external_trigger": false,
"pot_types": [{
"HitRate": {
"max_magic_number": 5,
"cost_per_attempt": 0.1
}
}],
"criteria": null,
"max_pot_value": null
},
{
"id": "major",
"contribution": {
"Percentage": 0.25
},
"seed_contribution": {
"Percentage": 0.85
},
"seed_strategy": {
"initial_seed_value": 100,
"min_reseed_value": 100,
"fund_strategy": "CollectToMinReseed",
"reseed_strategy": "Full"
},
"max_instantiation_count": null,
"is_progressive": true,
"supports_external_trigger": false,
"pot_types": [{
"HitRate": {
"max_magic_number": 25,
"cost_per_attempt": 0.1
}
}],
"criteria": null,
"max_pot_value": null
},
{
"id": "mega",
"contribution": {
"Percentage": 0.2
},
"seed_contribution": {
"Percentage": 0.85
},
"seed_strategy": {
"initial_seed_value": 1000,
"min_reseed_value": 1000,
"fund_strategy": "CollectToMinReseed",
"reseed_strategy": "Full"
},
"max_instantiation_count": null,
"reseed_amount": null,
"is_progressive": true,
"supports_external_trigger": false,
"pot_types": [{
"HitRate": {
"max_magic_number": 50,
"cost_per_attempt": 0.1
}
}],
"criteria": null,
"max_pot_value": null
}
]
}
The response to this request, if successful, will contain the newly created template. Take a note of the id field for the next steps (We will refer to this as template-id)
NOTE If you want to control the ID assigned to the Jackpot Template, you can specify it by adding an
idfield to the root of the JSON object and giving it a custom identifier.
2. Publish the Jackpot Template
- Service:
ThrillPots Service - Method:
POST - Path:
/templates/publish - Content-Type:
application/json - Body:
{
"owner_id": "my-operator",
"template_id": "template-id",
"publish": true
}
3. Instantiate a Jackpot Instance from the Jackpot Template
- Service:
ThrillPots Service - Method:
POST - Path:
/templates/instantiate - Content-Type:
application/json - Body:
{
"template_owner_id": "my-operator",
"template_id": "template-id",
"instance_owner_id": "my-operator",
"instance_name": "New Jackpot Instance"
}
The response to this call will contain the details of the newly created Jackpot Instance. Take a note of the id field as this is the Jackpot Instance ID and is used in other calls like Adding a new Contribution Source