...
To initiate the Broker Forward action, it is imperative to dispatch an HTTP POST request to the endpoint /api/brokeripn/fwd/{: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.brokers/forward.
Action name | broker forward |
---|
HTTP path | /api/brokeripn/fwd/{:token} brokers/forward |
---|
HTTP method | POST |
---|
Attributes of the HTTP request
HTTP Request Header |
---|
Authorization | string | required | A security token provided from Authentication endpoint. Required to provide as a Bearer Token (in format: “Bearer {{token}}“). |
---|
X-Broker-Token | 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: | 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: |
---|
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. |
---|
...
As previously stated, to execute Broker Forward, it is imperative to dispatch a POST HTTP request to the /api/brokeripn/fwd/{:token}brokers/forward endpoint of the API. Below, instances of potential communication between the API and consumers are provided.
HTTP Request with only broker details |
Code Block |
---|
| # HTTP POST
# https://ipn.dev.thinksurance.de/api/brokeripn/fwd/{:token}brokers/forward
# 'Content-Type': 'application/json'
# 'Accept': 'application/json'
# 'Authorization': 'Bearer <some long string value>'
# 'X-Broker-Token': 'application/json<some hash>'
{
"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 |
---|
| # HTTP POST
# https://ipn.dev.thinksurance.de/api/brokeripn/fwd/{:token}brokers/forward
# 'Content-Type': 'application/json'
# 'Accept': 'application/json'
# 'Authorization': 'Bearer <some long string value>'
# 'X-Broker-Token': 'application/json<some hash>'
{
"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 |
---|
| # HTTP POST
# https://ipn.dev.thinksurance.de/api/brokeripn/fwd/{:token}brokers/forward
# 'Content-Type': 'application/json'
# 'Accept': 'application/json'
# 'Authorization': 'Bearer <some long string value>'
# 'X-Broker-Token': 'application/json<some hash>'
{
"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 |
---|
| # HTTP POST
# https://ipn.dev.thinksurance.de/api/brokeripn/fwd/{:token}brokers/forward
# 'Content-Type': 'application/json'
# 'Accept': 'application/json'
# 'Authorization'
{
"type": 1,: 'Bearer <some long string value>'
# 'X-Broker-Token': '<some hash>'
{
"bTokentype": "someBroketAPIToken"1,
"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 |
---|
| # HTTP POST
# https://ipn.dev.thinksurance.de/api/brokeripn/fwd/{:token}brokers/forward
# 'Content-Type': 'application/json'
# 'Accept': 'application/json'
# 'Authorization': 'Bearer <some {long string "type": 1,value>'
# 'X-Broker-Token': '<some hash>'
{
"bTokentype": "someBroketAPIToken"1,
"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 |
---|
| # 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 |
---|
| # 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 |
---|
| # HTTP 200 status code
# 'Content-Type': 'application/json'
{
"error": "BrokerAPI: Invalid parameters"
} |
|
...