/
V1 Delete Agency Numbers

V1 Delete Agency Numbers

Introduction

When there is a need to get agency numbers within a specific account or broker 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/account/delete/anums. It anticipates a comprehensive payload as part of the HTTP request, encompassing the requisite broker data.

Endpoint

To add a new agency number via the API, it is necessary to send an HTTP POST request to the endpoint /api/account/delete/anums/. The main part of the HTTP request is a JSON payload of the request body.

Action name

delete agency number

HTTP path

/api/account/delete/anums/{:token}

HTTP method

Post

Attributes of the HTTP request

aToken

string

required

A special token used for account 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

 

baFinRegNr

string

optional2

An insurer’s BaFin registration number.

insurerId

string

optional2

An insurer’s unique identifier number.

supervisingAuthorityId

string

optional2

An insurer’s BaFin ID.

agencyNumbers

array

optional3

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

Agency Number Scheme

 

agencyNumber

string

optional4

The actual agency number.

externalInsurerId

string

optional4

reference ID for insurer in an external system such as CRM system. For some CRMs it is important that the agencyNumber is associated with the right insurer Reference. This ID is also returned in our responses (such as IPN) for the external system to insure referential integrity. Normally this should not be used together with the externalUniqueID

externalUniqueId

string

optional4

unique ID for the agencyNumber entry in an external system such as the CRM. This field will be returned in our response to make sure the applied agency number can be mapped back to the original entity. This number must be unique accross account/broker and cannot be used twice.

Explanations:

 

2 one parameter out of baFinId, insurerId and supervisingAuthorityId is required

3 if agencyNumbers is provided, only those agency numbers will be deleted, otherwise all of them for this insurer

4 one parameter out of agencyNumber, externalInsurerId and externalUniqueId is required

Attributes of the HTTP response

Success response

Success response

JSON array of objects containing:

result

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 Get Agency Number, it is imperative to dispatch a POST request to the api/account/delete/anums endpoint of the API. Below, instances of potential communication between the API and consumers are provided.

HTTP Request

# HTTP GET # https://app.dev.thinksurance.de/api/account/delete/anums # 'Accept': 'application/json' { "token": "{{token}}", "aToken": "{{aToken}}" "agencyNumbers":[ { "baFinRegNr":"5405", "agencyNumbers": [ { "externalUniqueId": "uniqueId1", }, { "externalInsurerId": "insurerId2", } ] }, { "insurerId":"5036" }, { "supervisingAuthorityId":"61234", "agencyNumbers": [ { "externalUniqueId": "A2" } ] } ] }

Successful HTTP Response

# HTTP 200 status code # 'Content-Type': 'application/json' { "result": "OK" }

Failed HTTP Response

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

Related content

V1 Delete Agency Numbers for Brokers
V1 Delete Agency Numbers for Brokers
More like this
V1.1 Delete Agency Number
V1.1 Delete Agency Number
More like this
V1 Get Agency Numbers
V1 Get Agency Numbers
More like this
V1.1 Get Agency Number
V1.1 Get Agency Number
More like this
V0.1 Add Agency Number for Broker (Legacy)
V0.1 Add Agency Number for Broker (Legacy)
More like this
V1.1 Add Agency Number
V1.1 Add Agency Number
More like this