Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

Introduction

To retrieve a list of supported professions on the Platform, 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 professions used to map all business to them.

Endpoint

To retrieve professions, consumers are required to send an HTTP GET POST request to the /api/ipn/professions 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 professions

HTTP path

/api/ipn/professions

HTTP method

GETPOST

Attributes of the HTTP request

HTTP Request Header

Authorization

token

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

JSON array of objects containing:

id

int

required

An unique identifier of the profession.

name

string

required

A profession’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/professions.

HTTP Request

Code Block
languagejson
# HTTP GETPOST
# https://ipnapp.dev.thinksurance.de/api/ipn/professions
# # HTTP headers'Content-Type': 'application/json'
# 'Accept': 'application/json'
{
# 'Authorization'  "token": 'Bearer "<some long string value>'
# hash>"
}

Successful HTTP Response

Code Block
languagejson
# HTTP 200 status code
# 'Content-Type': 'application/json'
[
  {
    "id": 1,
    "name": "Profession1"
  },
  {
    "id": 2,
    "name": "Profession2"
  }
]

Failed HTTP Response

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