Versions Compared

Key

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

...

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 Token, it is imperative to dispatch a POST HTTP request to the /api/ipn/brokers/token endpoint of the API. Below, instances of potential communication between the API and consumers are provided.

HTTP Request with minimal data for a person

Code Block
# HTTP POST
# https://ipn.dev.thinksurance.de/api/ipn/brokers/token
# 'Content-Type': 'application/json'
# 'Accept': 'application/json'
# 'X-Account-Token: "<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 for the provided request.",
    "bToken": "<bToken>"
}

Failed HTTP Response

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