Versions Compared

Key

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

Introduction

To obtain a list of all insurance providers 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 either the complete list of insurance providers.

Endpoint

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

HTTP path

/api/insurers

HTTP method

POST

Attributes of the HTTP request

token

string

required

A security token provided from Authentication endpoint.

Attributes of the HTTP response

Success response

JSON array of objects containing:

id

int

required

An unique identifier of the insurer.

name

string

required

An insurer’s name.

bafin

string

required

An insurer’s BaFinId.

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/insurers.

HTTP Request

Code Block
languagejson
# HTTP POST
# https://app.dev.thinksurance.de/api/insurers
# 'Content-Type': 'application/json'
# 'Accept': 'application/json'
{
  "token": "some long string value"
}

Successful HTTP Response

Code Block
languagejson
# HTTP 200 status code
# 'Content-Type': 'application/json'
[
  {
    "id": 1,
    "name": "Insurer1",
    "bafin": "id123456"
  },
  {
    "id": 2,
    "name": "Insurer2",
    "bafin": "id654321"
  }
]

Failed HTTP Response

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