Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Reverted from v. 1

...

To obtain the payload of a specific inquiry, the Thinksurance Public API V2, denoted as "the API," offers a specialised endpoint. This endpoint allows consumers to retrieve all relevant releveant inquiry information.

Endpoint

To access the specific document, consumers must initiate an HTTP GET POST request to the 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 token and bToken (functioning as the broker identifier) or aToken (functioning as the account identifier).

Action name

get inquirydocument

HTTP path

/api/ipn/inquiriesinquiry/{:inquiryId}

inquiryId - an unique identifier of the requested inquiry

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

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}}“).

X-Broker-Token

string

optional1

An unique identifier of the document.

bToken

string

one of both is required

An unique identifier of the broker.

X-Account-Token

aToken

string

optional1

An unique identifier of the account.

Explanations: Anchorrequestrequest

1 at least one of bToken and aToken is required in the payload

Attributes of the HTTP response

Success response

JSON array of objects containing:

sHash

 

sHash

string

String

required

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

data

object

required

A root object that holds information on inquiry items. Check Inquiry Scheme bellow.Inquiry Scheme Anchorinquiryinquiry

bToken

string

customer

object

optional

A root object that holds information on customer items. Check Customer Scheme bellow.

docs

array

optional

A root object that holds a list of document metadata items Check Document Scheme bellow.

bToken

String

required

Broker specific token in THINKSURANCE system

bExternalId

string

String

required

Partner’s internal ID for this Broker

iId

int

Integer

required

Inquiry ID in THINKSURANCE system

iCreated

string

String

required

Date of creation of inquiry

iUpdated

string

String

required

Date of update of inquiry

productName

string

optional

A product’s name on Thinksurance System.

String

Product name THINKSURANCE system

productId

int

optional

A product’s unique identifier on Thinksurance System.

industryId

int

optional

An industry’s unique identifier on Thinksurance System.

professionName

string

optional

 A profession’s name on Thinksurance System.

professionId

int

optional

 A profession’s unique identifier on Thinksurance System.

status

int

required

Enumeration value that defines the status of an

Integer

Product ID in THINKSURANCE system

industryId

Integer

 

professionName

String

 

professionId

Integer

 

status

Integer

required

Status of the inquiry. Possible values:

2

- tendering (lead)
  • 3 - tendering

  • 4 - calculated

  • 6 - ordered

  • 15 - proposal created

  • employees

    object

    optional

    A root object that contains information on employees in the insured company. Check Employee Scheme bellow.

    revenue

    string2

    optional

    Revenue given in Thinksurance Risk Assessment questionnaire.

    bFoundDate

    string

    optional

    – Deal break (Lead) 3 – Deal break, 4 – Calculated, 6 – Booked 15 – Proposal created

    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

    .
    MySQL format for date: {{ YYYY-MM-DD }}Revenue given in Thinksurance Risk Assessment questionnaire.

    Format: DD.MM.YYYY

    taxPercent

    int

    optional1

    contractPayDate

    string

    optional1

    The contract’s payment date.
    MySQL format for date: {{ YYYY-MM-DD }}

    insuranceCompanyName

    string

    optional

    Integer ('%)

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

    contractStartDate

    string

    optional1

    The starting date of the contract start date.
    MySQL format for date: {{ YYYY-MM-DD }}

    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

    int

    Integer

    optional

    Insurance company

    unique identifier on Thinksurance system.

    ID in THINKSURANCE system

    coverage

    int23

    optional

    Integer (euro)

    Coverage amount for specific insurance company

    .

    Note: In some cases(specific products like Firmenrechtsschutz) it could be string(“unbegrenzt”)

    deductible

    int2

    optional

    optional1

    Integer (euro)

    Deductible for specific insurance company

    premiumYearly

    int4

    Integer

    (cents)

    Yearly gross premium. Will be not

    provided in case status is 2, 3, 4

    contractDuration

    int

    Integer

    optional1

    Contract period in years

    .Enumeration value that defines the payment

    Will be not provided in case status is 2, 3, 4 (Example: 1)

    paymentInterval

    int

    optional1

    Integer

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

    :
    • 1 - paid monthly

    • 3 - paid quarterly

    • 6 - paid half yearly

    • 12 - paid yearly

    Employee Scheme Anchoremployeeemployee

    full

    string

    optional

    Number of full time employees given in Thinksurance Risk Assessment questionnaire.

    part

    string

    optional

    Number of part time employees given in Thinksurance Risk Assessment questionnaire.

    Customer Scheme Anchorcustomercustomer

    cId

    int

    optional

    A customer unique identifier on Thinksurance System.

    cExternalId

    string

    optional

    Unique customer’s ID in the partners system.

    cSalutation

    int

    optional

    Enumeration value that defines salutation of the customer person:

    • 1 - Mr

    • 2 - Ms

    cFirstName

    string

    optional

    Customer person’s first name.

    cLastName

    string

    optional

    Customer person’s last name.

    cBirthDate

    string

    optional

    Customer person’s date of birth.
    MySQL format for date: {{ YYYY-MM-DD }}

    cEmail

    string

    optional

    Customer person’s email address.

    cStreet

    string

    optional

    Customer person’s street name.

    cStreetNumber

    string

    optional

    Customer person’s street number.

    cZip

    string

    optional

    Customer person’s postcode.

    cCity

    string

    optional

    Customer person’s city.

    cWebsite

    string

    optional

    Customer person’s website.

    cPhone

    string

    optional

    Customer person’s phone number.

    cPrivateIsCompanyAddress

    int

    optional

    Enumeration value that defines if customer person’s address should be used as actual business address for the customer:

    • 0 - no, use address from cCompany section

    • 1 - yes

    cCompany

    string

    optional

    Customer company’s name.

    cCompanyStreet

    string

    optional

    Customer business address street name.

    cCompanyStreetNumber

    string

    optional

    Customer business address street number.

    cCompanyZip

    string

    optional

    Customer business address postcode.

    cCompanyCity

    string

    optional

    Customer business address city.

    Document Scheme Anchordocumentdocument

    token

    string

    optional

    [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.: "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

    String

    optional

    Expiration

    Experation date for document token

    files

    array

    Array

    optional

    Object of the document. Every document has it’s own object

    .Explanations: Anchorexplanationsexplanations

    1 It is not provided for inquiries in the status 2, 3, 4.

    2 Value represented in EUR.

    3 In some cases (specific products like Firmenrechtsschutz) it could be string(“unbegrenzt”)

    .

    4 Value represented in CENTS.

    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.

    HTTP Request

    Code Block
    languagejson
    # HTTP GETPOST
    # https://ipn.dev.thinksurance.de/api/ipn/inquiries/<some ID>inquiry/{{inquiry_id}}
    # # HTTP headers
    'Content-Type': 'application/json'
    # 'Accept': 'application/json'
    # 'Authorization': 'Bearer <some {
      "token": "some long string value>'
    # 'X-Broker-Token': '<some hash>'
    # value",
      "btoken": some encrypted string
    }

    Successful HTTP Response

    json
    Code Block
    language
    # HTTP 200 status code
    # 'Content-Type': 'application/json'
    {
        "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

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