Versions Compared

Key

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

...

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

Action name

add get agency number

HTTP path

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

HTTP method

Post

...

As previously stated, to execute Get Agency Number, it is imperative to dispatch a POST GET request to the api/apiaccount/ipnget/agency-numbersanums endpoint of the API. Below, instances of potential communication between the API and consumers are provided.

HTTP Request

Code Block
languagejson
# HTTP GET
# https://ipnapp.dev.thinksurance.de/api/ipn/agency-numbersaccount/get/anums
# 'Accept': 'application/json'
{
# 'Authorization': 'Bearer <some long string value>'
# 'X-Broker-Token': '<some hash>' "token": "{{token}}",
   "aToken": "{{aToken}}"
}

Successful HTTP Response

Code Block
languagejson
# HTTP 200 status code
# 'Content-Type': 'application/json'
{
   "agencyNumbers":[
      {
         "baFinId":"5405",
         "agencyNumbers": [
              {
                  "agencyNumber": "1-agency-number", 
                  "matchCode": "comment", 
                  "externalInsurerId": "", 
                  "externalUniqueId": "uniqueId1", 
                  "defaultForTenders": false, 
                  "defaultForCalculations": false, 
                  "collectionType": "insurer_collection", 
                  "internalComment": "internal comment", 
                  "active": true 
              },
              {
                  "agencyNumber": "2-agency-number", 
                  "matchCode": "comment 2", 
                  "externalInsurerId": "insurerId2", 
                  "externalUniqueId": "", 
                  "defaultForTenders": false, 
                  "defaultForCalculations": false, 
                  "collectionType": "mga_collection", 
                  "internalComment": "internal comment 2", 
                  "active": true 
              },
              {
                  "agencyNumber": "3-agency-number", 
                  "matchCode": "comment 3", 
                  "externalInsurerId": "insurerId3", 
                  "externalUniqueId": "", 
                  "defaultForTenders": true, 
                  "defaultForCalculations": true, 
                  "collectionType": "mga_collection", 
                  "internalComment": "internal comment 3", 
                  "active": true 
              }
          ]
      },
      {
         "insurerId":"5036",
         "agencyNumbers": [
              {
                  "agencyNumber": "A1", 
                  "matchCode": "A1", 
                  "externalInsurerId": "A1", 
                  "externalUniqueId": "A1", 
                  "defaultForTenders": true, 
                  "defaultForCalculations": false, 
                  "collectionType": "insurer_collection", 
                  "internalComment": "A1", 
                  "active": true 
              }
          ]
      },
      {
         "supervisingAuthorityId":"61234",
         "agencyNumbers": [
              {
                  "agencyNumber": "A2", 
                  "matchCode": "A2", 
                  "externalInsurerId": "A2", 
                  "externalUniqueId": "A2", 
                  "defaultForTenders": false, 
                  "defaultForCalculations": true, 
                  "collectionType": "mga_collection", 
                  "internalComment": "A2", 
                  "active": true 
              }
          ]
      }
   ]
}

Failed HTTP Response

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