Search Swedish company bankruptcies (POST)
curl --request POST \
--url https://lens-api.tic.io/search-public/bankruptcies \
--header 'Content-Type: application/json-patch+json' \
--header 'x-api-key: <api-key>' \
--data '
{
"collection": "<string>",
"q": "<string>",
"query_by": "<string>",
"filter_by": "<string>",
"sort_by": "<string>",
"per_page": 123,
"page": 123
}
'import requests
url = "https://lens-api.tic.io/search-public/bankruptcies"
payload = {
"collection": "<string>",
"q": "<string>",
"query_by": "<string>",
"filter_by": "<string>",
"sort_by": "<string>",
"per_page": 123,
"page": 123
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json-patch+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json-patch+json'},
body: JSON.stringify({
collection: '<string>',
q: '<string>',
query_by: '<string>',
filter_by: '<string>',
sort_by: '<string>',
per_page: 123,
page: 123
})
};
fetch('https://lens-api.tic.io/search-public/bankruptcies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://lens-api.tic.io/search-public/bankruptcies",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'collection' => '<string>',
'q' => '<string>',
'query_by' => '<string>',
'filter_by' => '<string>',
'sort_by' => '<string>',
'per_page' => 123,
'page' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json-patch+json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://lens-api.tic.io/search-public/bankruptcies"
payload := strings.NewReader("{\n \"collection\": \"<string>\",\n \"q\": \"<string>\",\n \"query_by\": \"<string>\",\n \"filter_by\": \"<string>\",\n \"sort_by\": \"<string>\",\n \"per_page\": 123,\n \"page\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json-patch+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://lens-api.tic.io/search-public/bankruptcies")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"collection\": \"<string>\",\n \"q\": \"<string>\",\n \"query_by\": \"<string>\",\n \"filter_by\": \"<string>\",\n \"sort_by\": \"<string>\",\n \"per_page\": 123,\n \"page\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://lens-api.tic.io/search-public/bankruptcies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json-patch+json'
request.body = "{\n \"collection\": \"<string>\",\n \"q\": \"<string>\",\n \"query_by\": \"<string>\",\n \"filter_by\": \"<string>\",\n \"sort_by\": \"<string>\",\n \"per_page\": 123,\n \"page\": 123\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"facet_counts": [
{
"counts": [
{
"count": 123,
"highlighted": "<string>",
"value": "<string>"
}
],
"field_name": "<string>",
"sampled": true,
"stats": {
"total_values": 123
},
"localizedFieldName": "<string>"
}
],
"found": 123,
"hits": [
{
"document": {
"id": "<string>",
"companyId": 123,
"registrationNumber": "<string>",
"legalEntityType": "<string>",
"localCompanyCode": "<string>",
"elfCode": "<string>",
"registrationDate": 123,
"mostRecentPurpose": "<string>",
"companyName": "<string>",
"bankruptcyStatusCode": "<string>",
"bankruptcyStatusDescriptionSv": "<string>",
"bankruptcyStatusDescriptionEn": "<string>",
"sniCodes": [
{
"sni_2007Code": "<string>",
"sni_2007Name": "<string>",
"sni_2007Section": "<string>",
"sni_2025Code": "<string>",
"sni_2025Name": "<string>",
"sni_2025Section": "<string>",
"rank": 123
}
],
"courtCase": "<string>",
"courtName": "<string>",
"courtCode": "<string>",
"courtEmail": "<string>",
"initiatedDate": 123,
"initiatedBy": "<string>",
"terminatedDate": 123,
"repealedDate": 123,
"hasTrustee": true,
"trusteeName": "<string>",
"trusteeCO": "<string>",
"trusteeAddressStreet": "<string>",
"trusteeAddressPostalCode": "<string>",
"trusteeAdddressCity": "<string>",
"registeredOfficeMunicipality": "<string>",
"registeredOfficeMunicipalityCode": "<string>",
"registeredOfficeCounty": "<string>",
"registeredOfficeCountyCode": "<string>",
"mostRecentRegisteredAddress": {
"co": "<string>",
"streetAddress": "<string>",
"postalCode": "<string>",
"city": "<string>",
"countryCodeAlpha3": "<string>",
"location": [
123
],
"firstSeenAt": 123,
"lantmaterietLocationalAddressId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lantmaterietLocatedOnPropertyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"addressId": 123,
"propertyId": 123,
"lantmaterietLocationalSupplementalNumber": "<string>"
},
"mostRecentFinancialSummary": {
"periodStart": 123,
"periodEnd": 123,
"rs_NetSalesK": 123,
"rs_OtherOperatingIncomeK": 123,
"rs_OperatingProfitOrLossK": 123,
"rs_SumFinancialItemsK": 123,
"rs_ProfitAfterFinancialItemsK": 123,
"bs_TotalAssetsK": 123,
"fn_NumberOfEmployees": 123,
"km_OperatingMargin": 123,
"km_NetProfitMargin": 123,
"km_EquityAssetsRatio": 123,
"km_GrossMargin": 123,
"isAudited": true,
"software": "<string>"
},
"applicationIfAny": "<string>",
"isPublicSectorVendor": true,
"approxInvoicedToPublicSector": [
{
"year": 123,
"approxInvoiced": 123
}
],
"lastUpdated": 123,
"urlSlug": "<string>",
"isCeased": true,
"ceasedDate": 123
},
"geo_distance_meters": null,
"highlight": null,
"highlights": [
{
"field": "<string>",
"matched_tokens": [
"<string>"
],
"snippet": "<string>"
}
],
"text_match": 123,
"text_match_info": {
"best_field_score": "<string>",
"best_field_weight": 123,
"fields_matched": 123,
"num_tokens_dropped": 123,
"score": "<string>",
"tokens_matched": 123,
"typo_prefix_score": 123
}
}
],
"grouped_hits": {
"group_key": [
"<string>"
],
"hits": [
{
"document": {
"id": "<string>",
"companyId": 123,
"registrationNumber": "<string>",
"legalEntityType": "<string>",
"localCompanyCode": "<string>",
"elfCode": "<string>",
"registrationDate": 123,
"mostRecentPurpose": "<string>",
"companyName": "<string>",
"bankruptcyStatusCode": "<string>",
"bankruptcyStatusDescriptionSv": "<string>",
"bankruptcyStatusDescriptionEn": "<string>",
"sniCodes": [
{
"sni_2007Code": "<string>",
"sni_2007Name": "<string>",
"sni_2007Section": "<string>",
"sni_2025Code": "<string>",
"sni_2025Name": "<string>",
"sni_2025Section": "<string>",
"rank": 123
}
],
"courtCase": "<string>",
"courtName": "<string>",
"courtCode": "<string>",
"courtEmail": "<string>",
"initiatedDate": 123,
"initiatedBy": "<string>",
"terminatedDate": 123,
"repealedDate": 123,
"hasTrustee": true,
"trusteeName": "<string>",
"trusteeCO": "<string>",
"trusteeAddressStreet": "<string>",
"trusteeAddressPostalCode": "<string>",
"trusteeAdddressCity": "<string>",
"registeredOfficeMunicipality": "<string>",
"registeredOfficeMunicipalityCode": "<string>",
"registeredOfficeCounty": "<string>",
"registeredOfficeCountyCode": "<string>",
"mostRecentRegisteredAddress": {
"co": "<string>",
"streetAddress": "<string>",
"postalCode": "<string>",
"city": "<string>",
"countryCodeAlpha3": "<string>",
"location": [
123
],
"firstSeenAt": 123,
"lantmaterietLocationalAddressId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lantmaterietLocatedOnPropertyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"addressId": 123,
"propertyId": 123,
"lantmaterietLocationalSupplementalNumber": "<string>"
},
"mostRecentFinancialSummary": {
"periodStart": 123,
"periodEnd": 123,
"rs_NetSalesK": 123,
"rs_OtherOperatingIncomeK": 123,
"rs_OperatingProfitOrLossK": 123,
"rs_SumFinancialItemsK": 123,
"rs_ProfitAfterFinancialItemsK": 123,
"bs_TotalAssetsK": 123,
"fn_NumberOfEmployees": 123,
"km_OperatingMargin": 123,
"km_NetProfitMargin": 123,
"km_EquityAssetsRatio": 123,
"km_GrossMargin": 123,
"isAudited": true,
"software": "<string>"
},
"applicationIfAny": "<string>",
"isPublicSectorVendor": true,
"approxInvoicedToPublicSector": [
{
"year": 123,
"approxInvoiced": 123
}
],
"lastUpdated": 123,
"urlSlug": "<string>",
"isCeased": true,
"ceasedDate": 123
},
"geo_distance_meters": null,
"highlight": null,
"highlights": [
{
"field": "<string>",
"matched_tokens": [
"<string>"
],
"snippet": "<string>"
}
],
"text_match": 123,
"text_match_info": {
"best_field_score": "<string>",
"best_field_weight": 123,
"fields_matched": 123,
"num_tokens_dropped": 123,
"score": "<string>",
"tokens_matched": 123,
"typo_prefix_score": 123
}
}
]
},
"out_of": 123,
"page": 123,
"request_params": {
"collection_name": "<string>",
"first_q": "<string>",
"per_page": 123,
"q": "<string>"
},
"search_cutoff": true,
"search_time_ms": 123
}
]
}Public Search
Search Swedish company bankruptcies (POST)
Multi-search body equivalent of the GET endpoint. Proxies to the Typesense bankruptcies_se collection. per_page is capped at 50.
POST
/
search-public
/
bankruptcies
Search Swedish company bankruptcies (POST)
curl --request POST \
--url https://lens-api.tic.io/search-public/bankruptcies \
--header 'Content-Type: application/json-patch+json' \
--header 'x-api-key: <api-key>' \
--data '
{
"collection": "<string>",
"q": "<string>",
"query_by": "<string>",
"filter_by": "<string>",
"sort_by": "<string>",
"per_page": 123,
"page": 123
}
'import requests
url = "https://lens-api.tic.io/search-public/bankruptcies"
payload = {
"collection": "<string>",
"q": "<string>",
"query_by": "<string>",
"filter_by": "<string>",
"sort_by": "<string>",
"per_page": 123,
"page": 123
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json-patch+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json-patch+json'},
body: JSON.stringify({
collection: '<string>',
q: '<string>',
query_by: '<string>',
filter_by: '<string>',
sort_by: '<string>',
per_page: 123,
page: 123
})
};
fetch('https://lens-api.tic.io/search-public/bankruptcies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://lens-api.tic.io/search-public/bankruptcies",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'collection' => '<string>',
'q' => '<string>',
'query_by' => '<string>',
'filter_by' => '<string>',
'sort_by' => '<string>',
'per_page' => 123,
'page' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json-patch+json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://lens-api.tic.io/search-public/bankruptcies"
payload := strings.NewReader("{\n \"collection\": \"<string>\",\n \"q\": \"<string>\",\n \"query_by\": \"<string>\",\n \"filter_by\": \"<string>\",\n \"sort_by\": \"<string>\",\n \"per_page\": 123,\n \"page\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json-patch+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://lens-api.tic.io/search-public/bankruptcies")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"collection\": \"<string>\",\n \"q\": \"<string>\",\n \"query_by\": \"<string>\",\n \"filter_by\": \"<string>\",\n \"sort_by\": \"<string>\",\n \"per_page\": 123,\n \"page\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://lens-api.tic.io/search-public/bankruptcies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json-patch+json'
request.body = "{\n \"collection\": \"<string>\",\n \"q\": \"<string>\",\n \"query_by\": \"<string>\",\n \"filter_by\": \"<string>\",\n \"sort_by\": \"<string>\",\n \"per_page\": 123,\n \"page\": 123\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"facet_counts": [
{
"counts": [
{
"count": 123,
"highlighted": "<string>",
"value": "<string>"
}
],
"field_name": "<string>",
"sampled": true,
"stats": {
"total_values": 123
},
"localizedFieldName": "<string>"
}
],
"found": 123,
"hits": [
{
"document": {
"id": "<string>",
"companyId": 123,
"registrationNumber": "<string>",
"legalEntityType": "<string>",
"localCompanyCode": "<string>",
"elfCode": "<string>",
"registrationDate": 123,
"mostRecentPurpose": "<string>",
"companyName": "<string>",
"bankruptcyStatusCode": "<string>",
"bankruptcyStatusDescriptionSv": "<string>",
"bankruptcyStatusDescriptionEn": "<string>",
"sniCodes": [
{
"sni_2007Code": "<string>",
"sni_2007Name": "<string>",
"sni_2007Section": "<string>",
"sni_2025Code": "<string>",
"sni_2025Name": "<string>",
"sni_2025Section": "<string>",
"rank": 123
}
],
"courtCase": "<string>",
"courtName": "<string>",
"courtCode": "<string>",
"courtEmail": "<string>",
"initiatedDate": 123,
"initiatedBy": "<string>",
"terminatedDate": 123,
"repealedDate": 123,
"hasTrustee": true,
"trusteeName": "<string>",
"trusteeCO": "<string>",
"trusteeAddressStreet": "<string>",
"trusteeAddressPostalCode": "<string>",
"trusteeAdddressCity": "<string>",
"registeredOfficeMunicipality": "<string>",
"registeredOfficeMunicipalityCode": "<string>",
"registeredOfficeCounty": "<string>",
"registeredOfficeCountyCode": "<string>",
"mostRecentRegisteredAddress": {
"co": "<string>",
"streetAddress": "<string>",
"postalCode": "<string>",
"city": "<string>",
"countryCodeAlpha3": "<string>",
"location": [
123
],
"firstSeenAt": 123,
"lantmaterietLocationalAddressId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lantmaterietLocatedOnPropertyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"addressId": 123,
"propertyId": 123,
"lantmaterietLocationalSupplementalNumber": "<string>"
},
"mostRecentFinancialSummary": {
"periodStart": 123,
"periodEnd": 123,
"rs_NetSalesK": 123,
"rs_OtherOperatingIncomeK": 123,
"rs_OperatingProfitOrLossK": 123,
"rs_SumFinancialItemsK": 123,
"rs_ProfitAfterFinancialItemsK": 123,
"bs_TotalAssetsK": 123,
"fn_NumberOfEmployees": 123,
"km_OperatingMargin": 123,
"km_NetProfitMargin": 123,
"km_EquityAssetsRatio": 123,
"km_GrossMargin": 123,
"isAudited": true,
"software": "<string>"
},
"applicationIfAny": "<string>",
"isPublicSectorVendor": true,
"approxInvoicedToPublicSector": [
{
"year": 123,
"approxInvoiced": 123
}
],
"lastUpdated": 123,
"urlSlug": "<string>",
"isCeased": true,
"ceasedDate": 123
},
"geo_distance_meters": null,
"highlight": null,
"highlights": [
{
"field": "<string>",
"matched_tokens": [
"<string>"
],
"snippet": "<string>"
}
],
"text_match": 123,
"text_match_info": {
"best_field_score": "<string>",
"best_field_weight": 123,
"fields_matched": 123,
"num_tokens_dropped": 123,
"score": "<string>",
"tokens_matched": 123,
"typo_prefix_score": 123
}
}
],
"grouped_hits": {
"group_key": [
"<string>"
],
"hits": [
{
"document": {
"id": "<string>",
"companyId": 123,
"registrationNumber": "<string>",
"legalEntityType": "<string>",
"localCompanyCode": "<string>",
"elfCode": "<string>",
"registrationDate": 123,
"mostRecentPurpose": "<string>",
"companyName": "<string>",
"bankruptcyStatusCode": "<string>",
"bankruptcyStatusDescriptionSv": "<string>",
"bankruptcyStatusDescriptionEn": "<string>",
"sniCodes": [
{
"sni_2007Code": "<string>",
"sni_2007Name": "<string>",
"sni_2007Section": "<string>",
"sni_2025Code": "<string>",
"sni_2025Name": "<string>",
"sni_2025Section": "<string>",
"rank": 123
}
],
"courtCase": "<string>",
"courtName": "<string>",
"courtCode": "<string>",
"courtEmail": "<string>",
"initiatedDate": 123,
"initiatedBy": "<string>",
"terminatedDate": 123,
"repealedDate": 123,
"hasTrustee": true,
"trusteeName": "<string>",
"trusteeCO": "<string>",
"trusteeAddressStreet": "<string>",
"trusteeAddressPostalCode": "<string>",
"trusteeAdddressCity": "<string>",
"registeredOfficeMunicipality": "<string>",
"registeredOfficeMunicipalityCode": "<string>",
"registeredOfficeCounty": "<string>",
"registeredOfficeCountyCode": "<string>",
"mostRecentRegisteredAddress": {
"co": "<string>",
"streetAddress": "<string>",
"postalCode": "<string>",
"city": "<string>",
"countryCodeAlpha3": "<string>",
"location": [
123
],
"firstSeenAt": 123,
"lantmaterietLocationalAddressId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lantmaterietLocatedOnPropertyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"addressId": 123,
"propertyId": 123,
"lantmaterietLocationalSupplementalNumber": "<string>"
},
"mostRecentFinancialSummary": {
"periodStart": 123,
"periodEnd": 123,
"rs_NetSalesK": 123,
"rs_OtherOperatingIncomeK": 123,
"rs_OperatingProfitOrLossK": 123,
"rs_SumFinancialItemsK": 123,
"rs_ProfitAfterFinancialItemsK": 123,
"bs_TotalAssetsK": 123,
"fn_NumberOfEmployees": 123,
"km_OperatingMargin": 123,
"km_NetProfitMargin": 123,
"km_EquityAssetsRatio": 123,
"km_GrossMargin": 123,
"isAudited": true,
"software": "<string>"
},
"applicationIfAny": "<string>",
"isPublicSectorVendor": true,
"approxInvoicedToPublicSector": [
{
"year": 123,
"approxInvoiced": 123
}
],
"lastUpdated": 123,
"urlSlug": "<string>",
"isCeased": true,
"ceasedDate": 123
},
"geo_distance_meters": null,
"highlight": null,
"highlights": [
{
"field": "<string>",
"matched_tokens": [
"<string>"
],
"snippet": "<string>"
}
],
"text_match": 123,
"text_match_info": {
"best_field_score": "<string>",
"best_field_weight": 123,
"fields_matched": 123,
"num_tokens_dropped": 123,
"score": "<string>",
"tokens_matched": 123,
"typo_prefix_score": 123
}
}
]
},
"out_of": 123,
"page": 123,
"request_params": {
"collection_name": "<string>",
"first_q": "<string>",
"per_page": 123,
"q": "<string>"
},
"search_cutoff": true,
"search_time_ms": 123
}
]
}Max+ tier
Authorizations
Body
application/json-patch+jsonapplication/jsontext/jsonapplication/*+json
Response
Typesense multi-search response
Show child attributes
Show child attributes
⌘I