Thrill-ID API Documentation (0.1.17)

Download OpenAPI specification:

License: Proprietary

The API uses Bearer token security for its administrative endpoints which is retrieved from a successful call to /accounts/auth endpoint. This token is a JWT token and must be passed via the Authorization header.

Accounts

Authenticate an account and generate a JWT token which contains the accounts claims

Authenticate an account and generate a JWT token which contains the accounts claims If a trusted Service account is authenticated successfully, it will also receive the JWT secret in the response

Request Body schema: application/json
required
username
required
string
password
required
string

Responses

Request samples

Content type
application/json
{
  • "username": "string",
  • "password": "string"
}

Response samples

Content type
application/json
{
  • "token": "string",
  • "refresh_token": "string",
  • "secret": "string",
  • "access_to": {
    },
  • "properties": {
    },
  • "services": {
    }
}

Retrieve account details for the currently logged in account

Retrieve account details for the currently logged in account

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "username": "string",
  • "org_id": "string",
  • "unit_id": "string",
  • "permissions": [
    ],
  • "enabled": true,
  • "trusted": true,
  • "created_on": 0,
  • "last_logged_in": 0,
  • "pending_password_reset": true,
  • "access_to": {
    }
}

Change the password for the currently logged in account

Change the password for the currently logged in account

Request Body schema: application/json
required
password
required
string

Responses

Request samples

Content type
application/json
{
  • "password": "string"
}

Response samples

Content type
application/json
null

Start the forgot password flow for a specific account

Start the forgot password flow for a specific account If the account exists, a one-time-password (OTP) will be generated for the reset password request and an event is sent via pub sub. It is expected that this event will be used by another service to send an email

Request Body schema: application/json
required
username
required
string

Responses

Request samples

Content type
application/json
{
  • "username": "string"
}

Response samples

Content type
application/json
null

Completes a forgotten password flow by resetting the password if a valid OTP is provided

Completes a forgotten password flow by resetting the password if a valid OTP is provided

Request Body schema: application/json
required
username
required
string
otp
required
string
password
required
string

Responses

Request samples

Content type
application/json
{
  • "username": "string",
  • "otp": "string",
  • "password": "string"
}

Response samples

Content type
application/json
null

Refresh a valid JWT token

Refresh a valid JWT token

Request Body schema: application/json
required
token
required
string

Responses

Request samples

Content type
application/json
{
  • "token": "string"
}

Response samples

Content type
application/json
{
  • "token": "string",
  • "refresh_token": "string",
  • "secret": "string",
  • "access_to": {
    },
  • "properties": {
    },
  • "services": {
    }
}

Verify the valdity of a JWT token

Verify the valdity of a JWT token

Request Body schema: application/json
required
token
required
string

Responses

Request samples

Content type
application/json
{
  • "token": "string"
}

Response samples

Content type
application/json
null

Admin/Accounts

Get Account(s)

Get Account(s)

query Parameters
sort_field
required
string

Field to sort on

sort_direction
required
integer <int32>

Direction to sort in (1 = ASC, -1 = DESC)

page
required
integer <int32>

Page to retrieve

limit
required
integer <int32>

Number of items to retrieve

account_type
required
string

Type of account to filter on (User or Service)

account_ids
required
string

Comma separated list of accounts id's to filter for

org_id
required
string

Organisation ID to filter by

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Add an Account to the system

Add an Account to the system

Request Body schema: application/json
required
account_type
required
string (AccountType)
Enum: "User" "System" "Service" "Provider"
system_id
string or null
username
required
string
password
required
string
required
object (OrganisationUnit)
org_bound
boolean or null
required
Array of objects (Permission)
trusted
boolean or null
object or null

Responses

Request samples

Content type
application/json
{
  • "account_type": "User",
  • "system_id": "string",
  • "username": "string",
  • "password": "string",
  • "org_unit": {
    },
  • "org_bound": true,
  • "permissions": [
    ],
  • "trusted": true,
  • "contacts": {
    }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "account_type": "User",
  • "system_id": "string",
  • "username": "string",
  • "password": "string",
  • "org_unit": {
    },
  • "org_bound": true,
  • "permissions": [
    ],
  • "enabled": true,
  • "trusted": true,
  • "created_on": 0,
  • "last_logged_in": 0,
  • "reset_password_otp": {
    },
  • "contacts": {
    }
}

Modify an Account in the system

Modify an Account in the system

Request Body schema: application/json
required
id
required
string
account_type
string or null
Enum: "User" "System" "Service" "Provider"
username
string or null
password
string or null
object or null
Array of objects or null (Permission)
trusted
boolean or null
enabled
boolean or null
object or null
org_bound
boolean or null

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "account_type": "User",
  • "username": "string",
  • "password": "string",
  • "org_unit": {
    },
  • "permissions": [
    ],
  • "trusted": true,
  • "enabled": true,
  • "contacts": {
    },
  • "org_bound": true
}

Response samples

Content type
application/json
null

Disable a specific account

Disable a specific account

path Parameters
account_id
required
string

The ID of the account to disable

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "account_type": "User",
  • "system_id": "string",
  • "username": "string",
  • "password": "string",
  • "org_unit": {
    },
  • "org_bound": true,
  • "permissions": [
    ],
  • "enabled": true,
  • "trusted": true,
  • "created_on": 0,
  • "last_logged_in": 0,
  • "reset_password_otp": {
    },
  • "contacts": {
    }
}

Enable a specific account

Enable a specific account

path Parameters
account_id
required
string

The ID of the account to enable

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "account_type": "User",
  • "system_id": "string",
  • "username": "string",
  • "password": "string",
  • "org_unit": {
    },
  • "org_bound": true,
  • "permissions": [
    ],
  • "enabled": true,
  • "trusted": true,
  • "created_on": 0,
  • "last_logged_in": 0,
  • "reset_password_otp": {
    },
  • "contacts": {
    }
}

Admin/Organisations

Get all organisations

Get all organisations

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Add a new organisation

Add a new organisation

Request Body schema: application/json
required
id
required
string

The identifier of the organisation. Must be unique

units
required
Array of strings

The organisation's units

name
string

Organisation descriptive name

parent_id
string or null

Organisation Parent

base_currency
string or null

Organisation Base Currency, if None then use parent.base_currency

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "units": [
    ],
  • "name": "string",
  • "parent_id": "string",
  • "base_currency": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "parent_id": "string",
  • "enabled": true,
  • "base_currency": "string",
  • "children": [
    ],
  • "created": 0,
  • "updated": 0,
  • "units": [
    ]
}

Fetch a specific organisation

Fetch a specific organisation

path Parameters
org_id
required
string

ID of the organisation

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "parent_id": "string",
  • "enabled": true,
  • "base_currency": "string",
  • "children": [
    ],
  • "created": 0,
  • "updated": 0,
  • "units": [
    ]
}

Update a specific organisation

Update a specific organisation

path Parameters
org_id
required
string

ID of the organisation to update

Request Body schema: application/json
required
units
Array of strings or null

The units of the organisation (must be the full list)

enabled
boolean or null

Flag indicating whether the organisation is enabled or not

name
string or null

Organisation descriptive name

parent_id
string or null

Organisation Parent

base_currency
string or null

Organisation Base Currency, if None then use parent.base_currency

Responses

Request samples

Content type
application/json
{
  • "units": [
    ],
  • "enabled": true,
  • "name": "string",
  • "parent_id": "string",
  • "base_currency": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "parent_id": "string",
  • "enabled": true,
  • "base_currency": "string",
  • "children": [
    ],
  • "created": 0,
  • "updated": 0,
  • "units": [
    ]
}

enable_organisation

path Parameters
org_id
required
string

ID of the organisation to update

enable_flag
required
boolean

Enable flag (true / false)

Responses

Response samples

Content type
application/json
null

add_units

path Parameters
org_id
required
string

ID of the organisation to update

Request Body schema: application/json
required
Array
string

Responses

Request samples

Content type
application/json
[
  • "string"
]

Response samples

Content type
application/json
{
  • "succeeded": [
    ],
  • "failed": [
    ]
}

delete_units

path Parameters
org_id
required
string

ID of the organisation to update

Request Body schema: application/json
required
Array
string

Responses

Request samples

Content type
application/json
[
  • "string"
]

Response samples

Content type
application/json
{
  • "succeeded": [
    ],
  • "failed": [
    ]
}

Admin/Systems

Get Account(s)

Get Account(s)

query Parameters
id
required
string

System ID to filter by

name
required
string

System name to filter by

sort_field
required
string

Field to sort on

sort_direction
required
integer <int32>

Direction to sort in (1 = ASC, -1 = DESC)

page
required
integer <int32>

Page to retrieve

limit
required
integer <int32>

Number of items to retrieve

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Health

Service Health

Service Health

Responses

Response samples

Content type
application/json
{
  • "version": "string"
}