Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

Introduction

When there is a need to add a agency number for a broker an account within a specific account via the Thinksurance Public API V1, from now on referred to as "the API," a dedicated endpoint facilitates this capability. This endpoint is accessible at the path /api/broker/set/anums/{:token}. It anticipates a comprehensive payload as part of the HTTP request, encompassing the requisite broker account data.

Endpoint

To add a new agency number via the API, it is necessary to send an HTTP POST request to the endpoint /api/broker/set/anums/{:token}. The parameterised segment of the endpoint, denoted as "{:token}," contains the security token retrievable by the partner during the Authentication process on the API. The rest of the HTTP request is a JSON payload of the request body.

Action name

add agency number for broker

HTTP path

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

HTTP method

POST

Attributes of the HTTP request

agencyNumbermatchCodeinternalComment

bToken

string

required

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

token

string

required

A security token provided from Authentication endpoint.

agencyNumberSets

array

required

An array that holds information on all agency numbers that should be added. Each item of the array is represented by Agency Number Holder Scheme bellow.

Agency Number Holder Scheme

Anchor
holder
holder

baFinId

string

optional1required

An insurer’s BaFin registration number.

insurerId

string

optional1

An insurer’s unique identifier number.

supervisingAuthorityId

string

optional1

An insurer’s BaFin ID.

e2e

array

optional21

An array that holds information on all agency numbers that should be added for one insurer, that should be used with deals made by calculation. Each item of the array is represented by Agency Number Scheme bellow.

db

array

optional2

An array that holds information on all agency numbers that should be added for one insurer, that should be used with deals made in tendering process. Each item of the array is represented by Agency Number Scheme bellow.

Agency Number Scheme

Anchor
agency
agency

brokerAgencyNumber

string

required

The actual agency number.

brokerAgencyEmail

string

optional

externalInsurerId

string

optional

externalUniqueId

Broker’s contact email.

brokerAgencyName

string

optional

defaultForTenders

bool

required

defaultForCalculations

bool

required

collectionType

string

required

Broker’s contact name.

brokerAgencyPhone

string

optional

active

bool

required

Broker’s contact phone.

Explanations:

Anchor
explanations
explanations

1 one parameter out of baFinId, insurerId and supervisingAuthorityId is required
2 one parameter out of db and e2e is requiredrequired if db is empty
2required if e2e is empty

Attributes of the HTTP response

Success response

JSON array of objects containing:

status

string

required

A text providing more information on the succesful operation.

Failed response

error

string

required

It contains a reason for the failed request.

Examples

As previously stated, to execute Add Agency Number, it is imperative to dispatch a POST HTTP request to the /api/broker/set/anums/{:token} endpoint of the API. Below, instances of potential communication between the API and consumers are provided.

HTTP Request

Code Block
languagejson
# HTTP POST
# https://app.dev.thinksurance.de/api/broker/set/anums/{:token}
# 'Content-Type': 'application/json'
# 'Accept': 'application/json'
{
   "bToken":"<some short hash>",
   "token":"<some short hash>"
   "agencyNumbers":[
      {
         "baFinId":"5405",
         "e2e":{
            "brokerAgencyNumber":"api-e2e-alte-deal",
            "brokerAgencyName":"API ALTE CONTACT",
            "brokerAgencyPhone":"api-phone-alte",
            "brokerAgencyEmail":"api-e2e-test@gv24.de"
         },
         "db":{
            "brokerAgencyNumber":"api-e2e-alte-dealdb",
            "brokerAgencyName":"API ALTE CONTACTdb",
            "brokerAgencyPhone":"api-phone-altedb",
            "brokerAgencyEmail":"api-e2e-test@gv24db.de"
         }
      },
      {
         "insurerIdbaFinId":"5036",
         "e2e":{
            "brokerAgencyNumber":"api-e2e-arag-deal",
            "brokerAgencyEmail":"api-e2e-arag@gv24.de"
         },
         "db":{
            "brokerAgencyNumber":"testi",
            "brokerAgencyName":"Herr Testi",
            "brokerAgencyPhone":"Herr Telefon",
            "brokerAgencyEmail":"testiDB@gv24db.de"
         }
      },
      {
         "supervisingAuthorityIdbaFinId":"61234",
         "e2e":{
            "brokerAgencyNumber":"api-e2e-arag-deal1",
            "brokerAgencyEmail":"api-e2earag1@gv24.de"
         }
      }
   ]
}

Successful HTTP Response

Code Block
languagejson
# HTTP 200 status code
# 'Content-Type': 'application/json'
{
  "status": "Broker Api: agency number added succesfully."
}

Failed HTTP Response

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