Versions Compared

Key

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

...

To initiate the Broker Forward action, it is imperative to dispatch an HTTP POST request to the endpoint /api/ipnbroker/brokers/forwardfwd/{:token}. The parameterised segment of the endpoint, denoted as "{:token}," pertains to the security token retrievable by the partner during the Authentication process on the API.

Action name

broker forward

HTTP path

/api/ipnbroker/brokers/forwardfwd/{:token}

HTTP method

POST

Attributes of the HTTP request

...

...

Authorization

...

string

...

required

...

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

...

Broker

...

string

...

required

...

An unique identifier of the broker.

Broker Parameters

The initial set of parameters pertains to broker data. Only specific elements within this data subset are mandatory for delivery. These required elements assist the API in accurately mapping the request to the designated broker. If supplementary data for the broker is provided, the mapped broker information will be updated accordingly.

type

int

required

Enumeration value that defines the way for mapping broker data from the request:

  • 1 - it requires to have broker’s ID from the partner system provided to Thinksurance System

  • 2 - it doesn’t requires to have broker’s ID from the partner system provided to Thinksurance Systemsystem provided to Thinksurance System

bToken

string

required

A special token used for brokers to identify itself during API calls. Provided by Thinksurance Support Team.

bExternalId

string

required

Broker’s ID from the partner system.

bGender

int

optional

Enumeration value that defines salutation of the broker person:

  • 1 - Mr

  • 2 - Ms

bFirstName

string

optional

Broker person’s first name.

bLastName

string

optional

Broker person’s last name.

bEmail

string

optional

Broker person’s email address.

bCompany

string

optional

Broker company’s name.

bStreet

string

optional

Broker company’s street name.

bStreetNumber

string

optional

Broker company’s street number.

bZip

string

optional

Broker company’s postcode.

bCity

string

optional

Broker company’s city.

bPhone

string

optional

Broker company’s phone number.

bCompanyRegNumber

string

optional

Broker company’s commercial register number.

bRegNumber

string

optional

Broker company’s IHK register number.

...

instantInquiryCreation

string

optional1

Enumeration value that defines if a new inquiry should be created on Thinksurance Platform during Broker Forward. In case both productId and professionId are present, inquiry will be created during later, Switch action.

  • True - new inquiry will be created if further validation rules are met (see bellow).

  • False - skip creation.

productId

int

optional2

An identifier for the product on Thinksurance Platform. All values are visible from the API endpoint Get Products.

professionId

int

optional2

An identifier for the profession on Thinksurance Platform. All values are visible from the API endpoint Get Professions.

iExternalReferences

array

optional

An array of objects, containing custom values requested to properly identify the entity on the partners system related to the inquiry.

Anchor
inquiry
inquiry
Explanations:

1 available only if type is set to 1
2 required if instantInquiryCreation is set to True

...

As previously stated, to execute Broker Forward, it is imperative to dispatch a POST HTTP request to the /api/ipnbroker/brokers/forwardfwd/{:token} endpoint of the API. Below, instances of potential communication between the API and consumers are provided.

HTTP Request with only broker details

Code Block
languagejson
# HTTP POST
# https://ipn.dev.thinksurance.de/api/ipnbroker/brokers/forwardfwd/{:token}
# 'Content-Type': 'application/json'
# 'Accept': 'application/json'
# 'Authorization': 'Bearer <some long string value>'
# 'X-Broker-Token': '<some hash>application/json'
{
  "type": 1,
  "bToken": "someBroketAPIToken",
  "bExternalId": "someExternalId"
}
# Expected:
# 1. Redirect URL points to dashboard on Advisory Suite or 
#    landing page of Consult Direct.

HTTP Request with update for broker data

Code Block
languagejson
# HTTP POST
# https://ipn.dev.thinksurance.de/api/ipnbroker/brokers/forwardfwd/{:token}
# 'Content-Type': 'application/json'
# 'Accept': 'application/json'
# 'Authorization': 'Bearer <some long string value>'
# 'X-Broker-Token': '<some hash>application/json'
{
  "type": 1,
  "bToken": "someBroketAPIToken",
  "bExternalId": "someExternalId",
  "bFirstName": "Max",
  "bLastName": "Mustermann",
  "bEmail": "max.mustermann@awesome.company.de",
  "bCompany": "Awesome Company"
}
# Expected:
# 1. Redirect URL points to dashboard on Advisory Suite or 
#    landing page of Consult Direct.
# 2. Broker data is updated

HTTP Request with created or updated customer

Code Block
languagejson
# HTTP POST
# https://ipn.dev.thinksurance.de/api/ipnbroker/brokers/forwardfwd/{:token}
# 'Content-Type': 'application/json'
# 'Accept': 'application/json'
# 'Authorization': 'Bearer <some long string value>'
# 'X-Broker-Token 'Accept': '<some hash>application/json'
{
  "type": 1,
  "bToken": "someBroketAPIToken",
  "bExternalId": "someExternalId",
  "cFirstName": "Max",
  "cLastName": "Mustermann",
  "cExternalId": "someCustomerId",
  "cEmail": "customer@gmail.com",
  "cExternalReferences": [
    {
      "origin": "crm",
      "paramKey": "AccountNumber",
      "paramValue": "1233436547564erf5434"
    }
  ],
  "crmIdent": "openVIVAv1"
}
# Expected:
# 1. Redirect URL points to Customer information page on Advisory Suite or 
#    landing page of Consult Direct.
# 2. Customer is either created or updated if the customer with
#    the same external id exists.

HTTP Request with created or updated customer and created inquiry

Code Block
languagejson
# HTTP POST
# https://ipn.dev.thinksurance.de/api/ipnbroker/brokers/forwardfwd/{:token}
# 'Content-Type': 'application/json'
# 'Accept': 'application/json'
#{
'Authorization': 'Bearer <some long string value>'
# 'X-Broker-Token': '<some hash>'
{ "type": 1,
  "typebToken": 1"someBroketAPIToken",
  "bExternalId": "someExternalId",
  "cFirstName": "Max",
  "cLastName": "Mustermann",
  "cExternalId": "someCustomerId",
  "cEmail": "customer@gmail.com",
  "cExternalReferences": [
    {
      "origin": "crm",
      "paramKey": "AccountNumber",
      "paramValue": "1233436547564erf5434"
    }
  ],
  "crmIdent": "openVIVAv1",
  "professionId": 253,
  "productId": 95,
  "instantInquiryCreation": true
}
# Expected:
# 1. Redirect URL points to the consultation overview on Advisory Suite 
#    or questionnaire page of Consult Direct.
# 2. Consultation is created for the provided profession.
# 3. Customer is created or updated.
# 4. Customer is attached for the consultation.
# 5. Inquiry is created for the provided product and created consultation.

HTTP Request with created or updated customer, created inquiry and questionnaire pre-populated

Code Block
languagejson
# HTTP POST
# https://ipn.dev.thinksurance.de/api/ipnbroker/brokers/forwardfwd/{:token}
# 'Content-Type': 'application/json'
# 'Accept': 'application/json'
# 'Authorization': 'Bearer <some long string value>'
# 'X-Broker-Token': '<some hash>'
{
  "type": 1{
  "type": 1,
  "bToken": "someBroketAPIToken",
  "bExternalId": "someExternalId",
  "cFirstName": "Max",
  "cLastName": "Mustermann",
  "cExternalId": "someCustomerId",
  "cEmail": "customer@gmail.com",
  "cExternalReferences": [
    {
      "origin": "crm",
      "paramKey": "AccountNumber",
      "paramValue": "1233436547564erf5434"
    }
  ],
  "crmIdent": "openVIVAv1",
  "professionId": 253,
  "productId": 95,
  "instantInquiryCreation": true,
  "qasCustProfile": { 
    "categories": [
      { 
        "id": "default", 
        "questions": [ 
          { 
            "id": "100"
            "answers": [ "10001" ]
          },
          { 
            "id": "101"
            "answers": [ "10011" ]
          },
          { 
            "id": "customer.fullname"
            "answers": [ "Max Mustermann" ]
          }
        ]
      },
      { 
        "id": "2", 
        "questions": [ 
          { 
            "id": "200"
            "answers": [ "20001", "20007" ]
          },
          { 
            "id": "201"
            "answers": [ "10000 eur" ]
          }
        ]
      }
    ]
  }
}
# Expected:
# 1. Redirect URL points to the consultation overview on Advisory Suite 
#    or questionnaire page of Consult Direct.
# 2. Consultation is created for the provided profession.
# 3. Customer is created or updated.
# 4. Customer is attached for the consultation.
# 5. Inquiry is created for the provided product and created consultation.
# 6. Some questions from questionnaire are pre-populated.

Successful HTTP Response without created inquiry

Code Block
languagejson
# HTTP 200 status code
# 'Content-Type': 'application/json'
{
  "url": "https://app.thinksurance.de/api/broker/switch/abcdef1234567890"
}

Successful HTTP Response with created inquiry

Code Block
languagejson
# HTTP 200 status code
# 'Content-Type': 'application/json'
{
  "url": "https://app.thinksurance.de/api/broker/switch/abcdef1234567890",
  "inquiryId": 12345,
  "inquiryHash": "a1b2c3d4e5f6"
}

Failed HTTP Response

Code Block
languagejson
# HTTP 200 status code
# 'Content-Type': 'application/json'
{
  "error": "BrokerAPI: Invalid parameters"
}

...