V1 List Inquiries for Broker
Introduction
To obtain the list of relevant inquiries, belonging to one single broker, the Thinksurance Public API, denoted as "the API," offers a specialised endpoint. This endpoint allows consumers to retrieve a list of relevant inquiries
Endpoint
To search for a list of inquiries belonging to the specific account, consumers should send a HTTP POST request to endpoint /api/inq/get/{:token}. The token parameter represents the security token acquired during the Authentication process on the API (see https://thinksurance.atlassian.net/wiki/spaces/TSWIKI/pages/3173417034). As essential components of the JSON payload within the body of the request, consumers are required to include bToken (functioning as the account identifier).
Action name | search inquiries |
---|---|
HTTP path | /api/inq/get/{:token}
|
HTTP method | POST |
Attributes of the HTTP request
bToken | string | required | An unique identifier of the broker. |
---|---|---|---|
lastDays | int | optional | If defined, only inquiries that were created or updated that last number of days, will be included in the result. Otherwise, inquiries created or updated in last three months will be included. |
Attributes of the HTTP response
Success response | |||
---|---|---|---|
JSON dictionary of key-value pairs. Each key is an unique identifier of an inquiry and value represents a concrete item with some inquiry related data. To understand the item data, check Item Scheme below. | |||
Item Scheme | |||
data | object | required | A root object that holds information on inquiry items. Check Inquiry Scheme bellow. |
customer | object | optional | A root object that holds information on customer items. Check Customer Scheme bellow. |
iId | integer | required | Inquiry ID in THINKSURANCE system |
productId | integer | required | Product ID in THINKSURANCE system |
status | integer | required | Status ID in THINKSURANCE System |
lastUpdate | string | required | Last update of the inquiry. Format: DD.MM.YYYY |
cExternalId | string | optional | Unique customer’s ID in the partners system. |
Failed response | |||
---|---|---|---|
error | string | required | It contains a reason for the failed request. |
Examples
This section shows examples of different HTTP requests and responses associated with the endpoint.
HTTP Request with simple payload |
# HTTP POST
# https://app.dev.thinksurance.de/api/inq/get/<some long hash>
#
# HTTP headers
# 'Content-Type': 'application/json'
# 'Accept': 'application/json'
#
{
"bToken": "<some encrypted string>"
} |
HTTP Request with last days specified |
# HTTP POST
# https://app.dev.thinksurance.de/api/inq/get/<some long hash>
#
# HTTP headers
# 'Content-Type': 'application/json'
# 'Accept': 'application/json'
#
{
"bToken": "<some encrypted string>",
"lastDays": 1 #includes results from today and yesterday
} |
Successful HTTP Response |
# HTTP 200 status code
# 'Content-Type': 'application/json'
{
"2155636": {
"data": {
"iId": 2155636,
"productId": 17,
"status": 25,
"lastUpdate": "05.04.2024"
}
},
"2155633": {
"data": {
"iId": 2155633,
"productId": 17,
"status": 25,
"lastUpdate": "05.04.2024"
}
},
"2155552": {
"data": {
"iId": 2155552,
"productId": 17,
"status": 25,
"lastUpdate": "05.04.2024"
}
},
"2031151": {
"data": {
"iId": 2031151,
"productId": 17,
"status": 6,
"lastUpdate": "26.11.2023"
},
"customer": {
"cExternalId": "1"
}
}
} |
Failed HTTP Response |