V1 List Inquiries for Account
Introduction
To obtain the list of relevant inquiries, belonging to one single account, 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/account-inq/get/{:token}. The token parameter represents the security token acquired during the Authentication process on the API (see V1 Authentication). As essential components of the JSON payload within the body of the request, consumers are required to include aToken (functioning as the account identifier).
Action name | search inquiries |
---|---|
HTTP path | /api/account-inq/get/{:token}
|
HTTP method | POST |
Attributes of the HTTP request
aToken | string | required | An unique identifier of the account. |
---|---|---|---|
status | int | optional | Filter for status of inquiries that should be shown. If defined as status=6 |
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/account-inq/get/<some long hash>
#
# HTTP headers
# 'Content-Type': 'application/json'
# 'Accept': 'application/json'
#
{
"aToken": "<some encrypted string>"
} |
HTTP Request with status filter |
# HTTP POST
# https://app.dev.thinksurance.de/api/account-inq/get/<some long hash>
#
# HTTP headers
# 'Content-Type': 'application/json'
# 'Accept': 'application/json'
#
{
"aToken": "<some encrypted string>",
"status": 6
} |
HTTP Request with last days specified |
# HTTP POST
# https://app.dev.thinksurance.de/api/account-inq/get/<some long hash>
#
# HTTP headers
# 'Content-Type': 'application/json'
# 'Accept': 'application/json'
#
{
"aToken": "<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"
}
}
} |
Failed HTTP Response |
# HTTP 200 status code
# 'Content-Type': 'application/json'
{
"error": "API User is not existing or deactivated."
} |