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 the relevant jackpot instance(s)

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"
        ]
    }
}

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"
}