Add a brand to the System

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

  1. Add the new brand to the relevant organisation in Thrill-ID
  2. Authenticate to retrieve a new token
  3. Add the new brand to ThrillPots
  4. Add the new brand to the relevant jackpot instance(s)
  5. Add the new brand to ThrillGate

Example Data

  • New brand ID: my-new-brand
  • Existing brand IDs: ["brand1", "brand2"]
  • Organisation ID: my-organisation
  • Existing Jackpot Instance ID: 321e9e1b-8e7f-4329-bace-b8ec20b7543a

Steps

We need to add the brand to the relevant Organisation in Thrill-ID so that accounts associated with that organisation become aware of the new brand.

1. Add the new brand to the relevant organisation in Thrill-ID

  • Service: Thrill-ID
  • Method: PUT
  • Path: /admin/organisations/my-organisation
  • Content-Type: application/json
  • Body:
{
	"units": [
		"brand1",
		"brand2",
		"my-new-brand"
	]
}

2. Authenticate to retrieve a new token

  • Service: Thrill-ID
  • Method: POST
  • Path: https://thrillid.yourorg.com/accounts/auth
  • Content-Type: application/json
  • Body:
{
	"username": "example-account@yourorg.com",
	"password": "some_really_random_password"
}

Upon successful authentication, the response will look as follows (although the value of the tokens and access entities will be probably be different) and will contain the new brand that you added:

{
    "token": "eyJhbGciOiJIUzI1NiJ9...KydTfNYUSZFDEVNrQnWtKXNX_QYJ46RHn9tLu9qu5n",
    "refresh_token": "eyJhbGciOiJUzI1NiJ9...4lsmg2MWa3TGh6J_g51Q",
    "access_to": {
        "org_id": "my-organisation",
        "unit_ids": [
            "brand1",
            "brand2",
			"my-new-brand"
        ]
    }
}

3. Add the new brand to ThrillPots

  • Service: ThrillPots Service
  • Method: POST
  • Path: /config/operators/:operator_id/brands
  • Content-Type: application/json
  • Body:
[
    {
        "id": "my-new-brand",
        "name": "My New Brand"
    }
]

NOTE: You can add multiple brands using this call. Simply add more elements to the body's array.

4. Add the new brand to the relevant jackpot instance(s)

  • Service: ThrillPots Service
  • Method: POST
  • Path: /instances/allowed_brand
  • Content-Type: application/json
  • Body:
{
    "instance_id": "321e9e1b-8e7f-4329-bace-b8ec20b7543a",
    "brand_id": "my-organisation:my-new-brand"
}

5. Add the new brand to ThrillGate

INFO Currently you need to update the complete Operator in ThrillGate. In the future, more convenient APIs will be provided.

You can retrieve an Operator object using the GET /admin/operators?id={operator_id} method (for example, in this case we would use GET /admin/operators?id=my-operator)

  • Service: ThrillGate Service
  • Method: PUT
  • Path: /admin/operators
  • Content-Type: application/json
  • Body:
{
        "id": "my-operator",
        "name": "My Operator",
        "wallet_id": "",
        "enabled": true,
        "currency": "EUR",
        "brands": [
            {
                "id": "brand1",
                "name": "Brand 1",
                "wallet_id": null,
                "enabled": true,
                "currency": "EUR"
            },
            {
                "id": "brand2",
                "name": "Brand 2",
                "wallet_id": null,
                "enabled": true,
                "currency": "EUR"
            },
            {
                "id": "my-new-brand",
                "name": "My New Brand",
                "wallet_id": null,
                "enabled": true,
                "currency": "EUR"
            }
        ]
    }