Versions Compared

Key

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

...

HTTP Request with inquiry_created event

Code Block
languagejson
# HTTP POST
# 'Content-Type': 'application/json'
# 'Accept': 'application/json'
{
  "eventType": "inquiry_created",
  "eventTime": "2020-12-09T16:09:53+00:00",
  "eventId": "66948656-d8cd-452f-a9c5-000eca2d0684",
  "eventNameTranslations": {
      "de_DE": "Beratung erstellt"
  },
  "affected": [
    {
      "referenceType": "inquiry",
      "referenceId": "567",
      "links": [
        {
          "contentType": "application/json",
          "href": "https://app.thinksurance.de/ipn/inquiry/567"
        },
        {
          "contentType": "plain/html",
          "href": "https://demopool.thinksurance.de/inquiry/32efda3424432"
        }
      ]
    },
    {
      "referenceType": "customer",
      "referenceId": "789",
      "links": [
        {
          "contentType": "application/xml",
          "href": "https://app.thinksurance.de/ipn/customer/789"
        }
      ]
    },
    {
      "referenceType": "file",
      "referenceId": "111",
      "links": [
        {
          "contentType": "application/json",
          "href": "https://app.thinksurance.de/api/v1/files/111"
        },
        {
          "contentType": "application/pdf",
          "href": "https://app.thinksurance.de/api/v1/files/111/download"
        }
      ]
    }
  ]
}

HTTP Request with tender_cancelled event

Code Block
languagejson
# HTTP POST
# 'Content-Type': 'application/json'
# 'Accept': 'application/json'
{
  "eventType": "tender_cancelled",
  "eventTime": "2020-12-09T16:09:53+00:00",
  "eventId": "66948656-d8cd-452f-a9c5-000eca2d0684",
  "eventNameTranslations": {
      "de_DE": "Ausschreibung abgebrochen"
  },
  "affected": [
    {
      "referenceType": "tender",
      "referenceId": "111"
    },
    {
      "referenceType": "inquiry",
      "referenceId": "567",
      "links": [
        {
          "contentType": "application/json",
          "href": "https://app.thinksurance.de/ipn/inquiry/567"
        },
        {
          "contentType": "plain/html",
          "href": "https://demopool.thinksurance.de/inquiry/32efda3424432"
        }
      ]
    }
  ]
}

Successful HTTP Response

Code Block
languagejson
# HTTP 204 status code

Failed HTTP Response

Code Block
languagejson
# HTTP 400 status code
# 'Content-Type': 'application/json'
{
  "errors": [
    "Unknown entity tender.",
    "Attribute 'referenceId' is of the wrong type."
  ]
}

...

Whenever some event occurs on the Thinksurance Platform, Notification System will notify Partner’s System via a webhook. After receiving a notification, the Partner’s system can get information about involved entities by sending HTTP requests to the API.

Drawio
lbox
mVer2
zoom1
simple0
zoominComment10
inCommentcustContentId03206479997
pageId3207036929
custContentIdlbox32064799971
diagramDisplayNameUntitled Diagram-1708422561362.drawio
1contentVer1
revision1
baseUrlhttps://thinksurance.atlassian.net/wiki
diagramNameUntitled Diagram-1708422561362.drawio
pCenter0
width572
links
tbstyle
height251

Recommendation and expectation from Thinksurance side is that the Partner asynchronously fetch data about affected entities from the API, independent fro the original webhook HTTP request. That practically means that after a webhook, the partner is encouraged to store notification payload in some kind of internal storage and return 204 HTTP response.
After that, in a separate thread, the partner system should retrieve data bound to entities on the API.

Drawio
mVer2
zoom1
simple0
zoominComment10
inCommentcustContentId03206774994
pageId3207036929
custContentIdlbox32067749941
diagramDisplayNameUntitled Diagram-1708422868420.drawiolbox1
contentVer1
revision1
baseUrlhttps://thinksurance.atlassian.net/wiki
diagramNameUntitled Diagram-1708422868420.drawio
pCenter0
width461
links
tbstyle
height561