Versions Compared

Key

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

...

Action name

create broker

HTTP path

/api/ipn/broker/set/{:token}

token - a security token retrieved from Authentication

brokers/tokens

HTTP method

POST

Attributes of the HTTP request

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 providing critical information for the broker creation.

...

aToken

...

string

...

required

...

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-Account-Token

string

required

An unique identifier of the account.

Attributes of the HTTP request

requiredisMissingRequiredParameters

1 required if bCompany is not set
2 required if bLastName is not set

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 System

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

bLastName

string

optional1

Broker person’s last name.

bEmail

string

required

Broker person’s email address.

bCompany

string

requiredoptional2

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.

Explanations:

Anchor
brokerbrokertrue

Attributes of the HTTP response

Success response

JSON array of objects object containing:

status

string

required

A text providing more information on the succesful operation.

bToken

string

required

An identifier for the new broker.

Failed response

error

string

required

It contains a reason for the failed request.

...

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

HTTP Request with minimal data for

company

a person

Code Block
# HTTP POST
# https://ipn.dev.thinksurance.de/api/
broker
ipn/
set
brokers/
{:
token
}

# 'Content-Type': 'application/json'
# 'Accept': 'application/json'
{ "aToken"
# 'X-Account-Token: "
some string as an identifier", "type": 1, "bExternalId": "T5", "bEmail": "awesome.gmbh@email.com", "bCompany": "Awesome GmbH" }

HTTP Request with minimal data for a person

Code Block# HTTP POST # /api/broker/set/{:token} # 'Content-Type': 'application/json' # 'Accept': 'application/json' { "aToken": "some string as an identifier", "
<some hash>"
# 'Authorization: Bearer "<some long hash>"
{
  "type": 1,
  "bExternalId": "T5",
  "bEmail": "mustermann@email.com",
  "bLastName": "Mustermann"
}

Successful HTTP Response

Code Block
# HTTP 200 status code
# 'Content-Type': 'application/json'
{
    "status": "Broker Api: existing broker 
created succesfully
for the provided request.",
    "bToken": "
some hashed string
<bToken>"
}

Failed HTTP Response

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