Versions Compared

Key

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

...

eventType

string

required

An actual business event that happened on the Platform. It is a string enumeration and it must have one of following values:

  • for inquiry: inquiry_created, inquiry_updated, inquiry_cancelled

  • for tender: tender_created, tender_closed, tender_cancelled

  • for offer: offers_created, offer_selected

  • for booking: booking_created, proposal_created, contract_createdInquiryCreated

  • InquiryUpdated

  • InquiryProposalCreated

  • InquiryOrdered

eventTime

string

required

Exact time the business event occurred on the Microservice, formatted according to RFC-3339.

eventId

string

required

A unique identifier of the event on the Platform. Consumers might use it for internal tracking purposes.

notificationId

string

required

A unique identifier for the sent notification

accountReference

string

required

An unique identifier of account (in this case, account tag from Thinksurance System) for which business event occurred.

brokerReference

string

required

An unique identifier of broker (in this case, original broker identifier from the partner system) for which business event occurred.

affected

array

required

A list of references to data that is affected by the occurred event. Each element of the array is one of the Affected Scheme.

Affected Scheme

referenceType

string

required

The type of the reference, bound to the underlying entity that was affected by the event. One event can refer to multiple different affected entities.

The referenceType can have one of the following potential values: inquiry, consultation, customer, booking, contract, file, offer, questionnaire, tender.

referenceId

string

required

A unique identifier referencing the underlying entity. The value is an opaque string with a maximum length of 64 ASCII characters. Its value should not be interpreted by clients in any way.

links

array

optional

It contains a list of all endpoints from where the data on a particular entity can be fetched. Data can be in the form of a REST API response containing entity information, binary data representing a file or any plain text format containing some more information on the entity. The response always contains data that was relevant for that entity at the time the particular event occurred. The resource will always either return a HTTP success (2xx), redirect (3xx), or error (4xx) codes. Clients are expected to correctly interpret redirections. In some cases, for particular reference type and event type (like in case of deletion), links parameter might be empty.

Each element of the array is one of the Link Scheme.

Link Scheme

contentType

string

required

Defines the content of the response from the endpoint as a MIME type used in the HTTP Content-Type header. Possible values:

  • for REST API: application/json, application/xml

  • for files: application/pdf, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document, image/jpeg, image/png

  • for publicly available content: text/html, text/plain

href

string

required

An absolute path for a snapshot of the resource relevant to the event itself. Each payload in the REST API is cached and it doesn’t change over time (snapshots of data), even if the structure of the underlying entities changes. That means, that the response for the same reference type might vary, depending on the time the event occurred and therefore when the snapshot was created.

...

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",
  "notificationId": "ded21bfa-18cb-11ef-9fc4-0a5332324815",
  "accountReference": "demopool",
  "brokerReference": "456",
  "translations": {
    "eventType": {
      "de_DE": "Beratung erstellt"
    }
  },
  "affected": [
    {
      "referenceType": "inquiry",
      "referenceId": "567",
      "links": [
        {
          "contentType": "application/json",
          "href": "https://app.thinksurance.de/ipn/inquiry/567"
        }
      ]
    }
  ]
}

HTTP Request with inquiry_orderd event

Code Block
languagejson
# HTTP POST
# 'Content-Type': 'application/json'
# 'Accept': 'application/json'
{
  "eventType": "InquiryOrdered",
  "eventTime": "2024-04-26T16:48:31.118Z",
  "eventId": "",
  "notificationId": "ded21bfa-18cb-11ef-9fc4-0a5332324815",
  "translations": {
    "eventType": {
      "de_DE": "Deckungsauftrag erstellt"
    }
  },
  "accountReference": "thinksurance",
  "brokerReference": "420",
  "affected": [
    {
      "referenceType": "inquiry",
      "referenceId": "2144385",
      "links": [
        {
          "contentType": "application/json",
          "href": "https://ipn.thinksurance.de/api/ipn/inquiry/2144385"
        }
      ]
    },
    {
      "referenceType": "contract",
      "referenceId": "b75fcf90-0584-4bd8-850e-91eb0e4c15e1",
      "links": [
        {
          "contentType": "application/json",
          "href": "https://rest.thinksurance.de/api/public/v2/notifications/47/contracts/b75fcf90-0584-4bd8-850e-91eb0e4c15e1"
        }
      ]
    },
    {
      "referenceType": "customer",
      "referenceId": "695056",
      "links": [
        {
          "contentType": "application/json",
          "href": "https://rest.thinksurance.de/api/public/v2/notifications/47/customers/695056"
        }
      ]
    }
  ]
}

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."
  ]
}

...