V1.1 Get Industries

Introduction

To obtain a list of all industries used on the Platform, which groups together related professions, the Thinksurance Public API V1 (referred to as "the API") provides a dedicated endpoint designed specifically for this purpose. This endpoint enables consumers to retrieve the complete list of all industries.

Endpoint

To retrieve industries, consumers are required to send an HTTP GET request to the /api/ipn/industries endpoint. This endpoint requires the security token, obtained during the Authentication process on the API, as an integral component of the JSON payload within the body of the request.

Action name

get industries

HTTP path

/api/ipn/industries

HTTP method

GET

Attributes of the HTTP request

HTTP Request Header

HTTP Request Header

Authorization

string

required

A security token provided from Authentication endpoint.
Required to provide as a Bearer Token (in format: “Bearer {{token}}“).

Attributes of the HTTP response

Success response

Success response

JSON array of objects containing:

id

int

required

An unique identifier of the industry.

name

string

required

A industry’s name.

Failed response

error

string

required

It contains a reason for the failed request.

Examples

This section shows examples of different HTTP requests and responses associated with the endpoint /api/ipn/industries.

HTTP Request

# HTTP GET # https://ipn.dev.thinksurance.de/api/ipn/industries # # HTTP headers # 'Accept': 'application/json' # 'Authorization': 'Bearer <some long string value>' #

Successful HTTP Response

# HTTP 200 status code # 'Content-Type': 'application/json' [ { "id": 1, "name": "Industry1" }, { "id": 2, "name": "Industry2" } ]

Failed HTTP Response

# HTTP 200 status code # 'Content-Type': 'application/json' { "error": "API User is not existing or deactivated." }