Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To obtain the payload of a specific documentinquiry, the Thinksurance Public API V1V2, denoted as "the API," offers a specialised endpoint. This endpoint allows consumers to retrieve a document by its identifier (hash) and acquire its complete payload as a base64-encoded data.all releveant inquiry information

Endpoint

To access the specific document, consumers must initiate an HTTP POST request to the /api/doc/get/{:token} endpoint href given by the webhook (see Notification ). The token parameter represents the security token acquired during the Authentication process on the API (see Authentication ) . As essential components of the JSON payload within the body of the request, consumers are required to include the hash token and bToken (serving functioning as the document broker identifier) and bToken or aToken (functioning as the broker account identifier).

Action name

get document

HTTP path

/api/docipn/getinquiry/{:token}

{inquiry_id}} please use href as given in the specific webhook

HTTP method

POST

Attributes of the HTTP request

hashtoken

string

required

An unique identifier of the document.

bToken

string

one of both is required

An unique identifier of the broker.

aToken

string

An unique identifier of the account.

Attributes of the HTTP response

Success response

JSON array of objects containing:

sHash

 

String

required

Security check, if request comes from THINKSURANCE API (see “Security hash

generation”)

data

bToken

String

required

Broker specific token in THINKSURANCE system

bExternalId

String

required

Partner’s internal ID for this Broker

iId

Integer

required

Inquiry ID in THINKSURANCE system

iCreated

String

required

Date of creation of inquiry

iUpdated

String

required

Date of update of inquiry

productName

String

Product name THINKSURANCE system

productId

Integer

Product ID in THINKSURANCE system

industryId

Integer

 

professionName

String

 

professionId

Integer

 

status

Integer

required

Status of the inquiry. Possible values:

2 – Deal break (Lead)

3 – Deal break

4 – Calculated

6 – Booked

15 – Proposal created

Note: When “Broker forward” request

parameter “fullCallback” is 1 IPNs for all

statuses will be send. If “fullCallback” is 0,

ONLY status = 6 IPN will be send.

Employees

Array

Number of employees of the insured

person

Format:

[“full”: XX,

“part”: YY]

Employees - full

String

Number of full time employees given in THINKSURANCE risk questionaire

Employees - part

String

Number of part time employees given in THINKSURANCE risk questionaire

revenue

String (Euro)

Revenue given in THINKSURANCE risk questionaire

bFoundDate

String (date)

Founding date of the broker’s company Format: DD.MM.YYYY

taxPercent

Integer ('%)

Tax. Will be not provided in case status is 2, 3, 4

contractStartDate

String

Contract start date. Will be not provided in case status is 2, 3, 4 Format: DD.MM.YYYY (Example: 01.01.2019)

contractPayDate

String (Date)

Contract payment date. Will be not provided in case status is 2, 3, 4 Format: DD.MM.YYYY (Example: 01.01.2019)

insuranceCompanyName

String

Insurance company name selected by Customer/Partner

insuranceCompanyId

Integer

Insurance company ID in THINKSURANCE

system

coverage

Integer (euro)

Coverage amount for specific insurance company

Note: In some cases(specific products like Firmenrechtsschutz) it could be

string(“unbegrenzt”)

deductible

Integer (euro)

Deductible for specific insurance company

premiumYearly

Integer

(cents)

Yearly gross premium. Will be not

provided in case status is 2, 3, 4

contractDuration

Integer

Contract period in years Will be not provided in case status is 2, 3, 4

(Example: 1)

paymentInterval

Integer

Payment interval in months Will be not provided in case status is 2, 3, 4. Possible

values [1, 3, 6, 12]

customer

cId

Integer

Thinksurance Customer System ID

cExternalId

String

Customer ID in partner-system to be

uniquely identified

cSalutation

String

Customer Salutation: . Values: [1,2] 1 – Herr, 2 – Frau, 3 - Divers

cTitle

String

Not used in plattform anymore

cFirstName

String

Customer’s given name

cLastName

String

Customer’s family name

cBirthday

String

Customer’s birthdate.:

Base64 encoded content of the document

"YYYY-MM-DD"

cEmail

String

Customer’s Email adress

cCompany

String

customer’s company

cCompanyForm

String

Legal form of customer’s company.

Values: [1-10]

1  – AG

2  – Einzelunternehmen

3  – GbR

4  – GmbH

5  – GmbH & Co KG

6  – KG

7  – Ltd.

8  – OHG

9  – UG (haftungsbeschränkt)

10  - Sonstige Rechtsform

cStreet

String

Customer’s adress – street name

cStreetNumber

String

Customer’s adress – street number

cZip

String

Customer’s adress – postcode

cCity

String

Customer’s adress – city name

cPhone

String

Customer’s phone number

cWebsite

String

Customer’s web site

cAccountType

String

Differentiates customer between

corporate (0) and private entity (1)

cAdressIsCompany

Integer

Does the customer’s address equal the

business adress? 0 – No 1 – Yes

cCompanyStreet

Integer

Object’s address (company address if

different) – street name

cCompanyStreetNumber

String

Object’s address (if different) – street number

cCompanyZip

String

Object’s address (if different) – post code

cCompanyCity

String

Object’s address (if different) – city

docs

docsToken

Array

 

token

String

Token which allows for access to

documents per Link

expired

String

Experation date for document token

files

Array

Object of the document. Every document

has it’s own object.

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/doc/get/{:token}.

HTTP Request without profession filter

Code Block
# HTTP POST
# /api/docipn/getinquiry/{:token{{inquiry_id}}
# 'Content-Type': 'application/json'
# 'Accept': 'application/json'
{
  "hashtoken": "some encryptedlong string value",
  "bTokenbtoken": "some encrypted string"
}

Successful HTTP Request with profession filterResponse

Code Block
# HTTP POST200 # /api//doc/get/{token}status code
# 'Content-Type': 'application/json'
# 'Accept': 'application/json'
{
  "token": "some long string value",
  "professionId": 123
}

Successful HTTP Response

Code Block
# HTTP 200 status code
# 'Content-Type': 'text/pdf'
Base64 encoded payload{
    "sHash": "bf02dfa7c7bc64c2cfb5",
    "data": {
        "bToken": "41ba17f637177a0b34d2ac11d",
        "bExternalId": "1",
        "iId": 1878887,
        "iCreated": "2024-03-06",
        "iUpdated": "2024-03-06",
        "productName": "Cyberversicherung",
        "productId": 95,
        "industryName": "Gastronomie",
        "industryId": 113,
        "professionName": "Cafe",
        "professionId": 258,
        "status": 25,
        "iExternalReferences": [
            {
                "origin": "crm",
                "paramKey": "oV-Angebots-Nr",
                "paramValue": "4342344"
            },
            {
                "origin": "crm",
                "paramKey": "oV-Antrags-Nr",
                "paramValue": "4342344"
            },
            {
                "origin": "crm",
                "paramKey": "oV-Deckungskonzept-ID",
                "paramValue": "11052060"
            },
            {
                "origin": "crm",
                "paramKey": "oV-Vertrag-ID",
                "paramValue": "4342343"
            },
            {
                "origin": "crm",
                "paramKey": "oV-Vertrags-Nr",
                "paramValue": "4342345"
            },
            {
                "origin": "crm",
                "paramKey": "oV-Vertragsart-ID",
                "paramValue": "1021640"
            }
        ],
        "employees": {
            "full": "",
            "part": ""
        },
        "revenue": "",
        "bFoundDate": ""
    },
    "customer": {
        "cId": 520108,
        "cExternalId": "9975",
        "cSalutation": "",
        "cTitle": "",
        "cFirstName": "Testuser",
        "cLastName": "cu",
        "cBirthday": "",
        "cEmail": "cust@mer3.com",
        "cCompany": "",
        "cCompanyForm": "",
        "cStreet": "",
        "cStreetNumber": "",
        "cZip": "",
        "cCity": "",
        "cPhone": "",
        "cWebsite": "",
        "cAccountType": 0,
        "cAddressIsCompany": 1,
        "cCompanyStreet": "",
        "cCompanyStreetNumber": "",
        "cCompanyZip": "",
        "cCompanyCity": "",
        "cExternalReferences": [
            {
                "origin": "crm",
                "paramKey": "oV-Kunden-Nr",
                "paramValue": "12345"
            },
            {
                "origin": "crm",
                "paramKey": "oV-Partner-Nr",
                "paramValue": "12345"
            }
        ]
    },
    "docs": []
}

Failed HTTP Response

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