The Business Game Public API (1.3.0)

Download OpenAPI specification:Download

Introduction

Technical Documentation for The Business Game API. The aim is to permit to a client to chooose a Game and create a session.

To obtain a valid access data contact info@thebusinessgame.it

Versioning

The versioning of the API will be done directly in the URL, https://api.thebusinessgame.it/v1/

Releases

  • version 1.3 01/02/2022 - First version published.

Authentication

bearerAuth

A JWT token needs to be included in the header of all the requests. The header will use the token as the key and the token value as the value.

Security Scheme Type HTTP
HTTP Authorization Scheme bearer
Bearer format "JWT"

Authorization token request

Returns a JWT Token which is used to identify you. Include this token in all other requests in the header with token word as the key and the token-value as the value. Tokens will expire after 30 days. The token have full-access privileges. Pass your accountId and accountSecret in the request body to obtain the JWT Token.

Request Body schema: application/json
accountId
number

Id of your account

accountSecret
string

The secret received from The Business Game

Responses

Request samples

Content type
application/json
{
  • "accountId": 100,
  • "accountSecret": 1
}

Response samples

Content type
application/json
{
  • "accountId": 100,
  • "token": "egccr-235we-werwe3-wefw43wc4twe"
}

Obtain the availables games

Returns a list of all the available games.

Authorizations:

Responses

Response samples

Content type
application/json
{
  • "gameId": 678,
  • "name": "pmbg",
  • "description": "PM game description"
}

Obtain the detail of a game

Returns detailed information about the selected game

Authorizations:
path Parameters
gameId
required
number

The uniq game id

Responses

Response samples

Content type
application/json
{
  • "gameId": 678,
  • "name": "pm",
  • "description": "PM game description"
}

Create a new session

Creates a new session and returns the newly created session data

Authorizations:
Request Body schema: application/json
external
string

An optional external customer session identifier. Can be empty.

gameId
number

Id of the game in which the session will be created

lang
string

Two characters ISO code identifying the language used in the session

Responses

Request samples

Content type
application/json
{
  • "external": "1001-a235-sdfs",
  • "gameId": 1,
  • "lang": "it"
}

Response samples

Content type
application/json
{}

Session status

Return the completed session status

Authorizations:
path Parameters
sessionId
required
number

Numeric ID of the session to get

Responses

Response samples

Content type
application/json
{}