> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tic.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Bankruptcy search fields and examples

> Fields, status codes and examples for the company bankruptcy search collection behind /search-public/bankruptcies.

<Badge color="purple" size="sm">Max+ tier</Badge>

These are the fields of the `bankruptcies` search collection behind `/search-public/bankruptcies` ([GET](/api-lens/publicsearch/search-swedish-company-bankruptcies-get), [POST](/api-lens/publicsearch/search-swedish-company-bankruptcies-post)). Use them in `query_by`, `filter_by` and `sort_by`. The parameters, plan limits, Pro tier filtering, redacted properties and date handling that apply to every collection are described in [Search](/api-lens/search), and the response schema on the endpoint pages.

Field guides for the other collections:

* [Companies](/api-lens/publicsearch/company-search-fields)
* [Workplaces](/api-lens/publicsearch/workplace-search-fields)
* [Financial reports](/api-lens/publicsearch/report-search-fields)
* **Bankruptcies (you are here)**
* [Vehicles](/api-lens/publicsearch/vehicle-search-fields)
* [Properties](/api-lens/publicsearch/property-search-fields)

## Bankruptcies search

With our search you can query (query\_by) based on a number fields listed in the next chapter.

Examples on what you can query on:

* Bankruptcies per day, week, month, year
* Bankruptcies per sector, industry type per SNI code
* Trustee
* Status

## Bankruptcy status codes

<Note>
  Please note that filed applications have bankruptcyStatusCode 255. If a
  bankruptcy is commenced the status code would change to 20 (from 255). If the
  status code keeps being 255 it means that the application could have been
  withdrawn, still pending court decision or that the bankruptcy is not
  monitored by the companies registration office. Therefore 255 does not
  mean that the proceedings have commenced.
</Note>

These are the status codes that could appear in bankruptcyStatusCode:

| Code | Description | Property for event date |
| - | - | - |
| 20 | Bankruptcy proceedings commenced | initiatedDate |
| 21 | Bankruptcy proceedings terminated | terminatedDate |
| 22 | Bankruptcy terminated with surplus | terminatedDate |
| 24 | Bankruptcy repealed by court | repealedDate |
| 255 | Bankruptcy application filed | initiatedDate |

## Fields indexed

The following fields are currently indexed in memory. These can be used in the query\_by and filter\_by parameter.

<Note>
  initiatedDate contains the date when the bankruptcy was commenced (status code
  20\). But in the event that the bankruptcy has not started it will represented
  the filed date at the court (status code 255).
</Note>

| Field | Type | Description |
| - | - | - |
| companyId | Int32 | Our global internal company identifier |
| companyName | String | The name in the financial report |
| registrationNumber | String | The local registration number |
| legalEntityType | String | The legal entity type as appeared locally |
| localCompanyCode | String | The local code for the legal entity type |
| elfCode | String | An ISO code for the legal entity type (ISO 20275: Entity Legal Forms Code) |
| registrationDate | Int64 | Unix epoch |
| mostRecentPurpose | String | The company's most recent purpose |
| bankruptcyStatusCode | String | A status code for the bankruptcy |
| sniCodes.sni\_2007Name | String | SNI 2007 name |
| sniCodes.sni\_2007Code | String | SNI 2007 code |
| courtCase | String | The case number at the court |
| courtName | String | The name of the court |
| courtCode | String | The code of the court |
| courtEmail | String | The email address to the court |
| initiatedBy | Int64 | Information and who applied to bankrupcty (from 2024 and onwards) |
| initiatedDate | Int64 | Unix epoch |
| terminatedDate | Int64 | Unix epoch when the bankruptcy was terminated |
| repealedDate | Int64 | Unix epoch of the appeal date |
| hasTrustee | Bool | Help flag if the trustee exists |
| trusteeName | String | The email address to the court |
| trusteeCO | String | The C/O of the trustee |
| trusteeAddressStreet | String | The address to the trustee |
| trusteeAddressPostalCode | String | The postalcode to the trustee |
| trusteeAdddressCity | String | The city to to the trustee |
| registeredOfficeMunicipality | String | The municipality name of the registered office |
| registeredOfficeMunicipalityCode | String | The municipality code (4 characters) as specified by SCB |
| registeredOfficeCounty | String | The county name |
| registeredOfficeCountyCode | String | The county code (2 characters) as specified by SCB |
| mostRecentRegisteredAddress.co | String | C/O = care of address |
| mostRecentRegisteredAddress.street | String | Street name |
| mostRecentRegisteredAddress.houseNumber | String | The street number |
| mostRecentRegisteredAddress.city | String | City |
| mostRecentRegisteredAddress.postalCode | String | Postal Code |
| mostRecentRegisteredAddress.location | GeoPoint | Allows geosearch |
| mostRecentRegisteredAddress.addressType | Int32 | 0 = mailAddress, 1 = visitingAddress, 2 = bothMailAndVisitingAddress |
| mostRecentRegisteredAddress.countryCodeAlpha3 | String | Country code 3 char alpha |
| mostRecentFinancialSummary.annualReportPeriod | Int32 | The endpoint report of the annual report in YYYYMM as Int32 |
| mostRecentFinancialSummary.periodStart | Int64 | Start period epoch seconds |
| mostRecentFinancialSummary.periodEnd | Int64 | End period epoch seconds |
| mostRecentFinancialSummary.rs\_NetSalesK | Int32 | Net sales in K (thousands) |
| mostRecentFinancialSummary.rs\_OtherOperatingIncomeK | Int32 | Other operating income in K (thousands) |
| mostRecentFinancialSummary.rs\_OperatingProfitOrLossK | Int32 | Operating profit or loss in K (thousands) |
| mostRecentFinancialSummary.rs\_SumFinancialItemsK | Int32 | Sum of financial items in K (thousands) |
| mostRecentFinancialSummary.rs\_ProfitAfterFinancialItemsK | Int32 | Profit after financial items in K (thousands) |
| mostRecentFinancialSummary.bs\_TotalAssetsK | Int32 | Total assets in balance sheet in K (thouands) |
| mostRecentFinancialSummary.fn\_NumberOfEmployees | Float | Number of employees with one decimal |
| mostRecentFinancialSummary.km\_OperatingMargin | Float | Operating margin with four decimals |
| mostRecentFinancialSummary.km\_NetProfitMargin | Float | Net profit margin with four decimals |
| mostRecentFinancialSummary.km\_EquityAssetsRatio | Float | Equity asset ratio with four decimals |
| mostRecentFinancialSummary.km\_GrossMargin | Float | Gross margin with four decimals |
| mostRecentFinancialSummary.software | String | Software used to generate the financial report (if known) |
| applicationIfAny | String | Link to the application (from january 2024 and onwards) |
| isPublicSectorVendor | Bool | If the company exists as a vendor to the public sector |
| approxInvoicedToPublicSector2022 | Decimal | Approx value invoices by the vendor to the public sector 2022 |
| approxInvoicedToPublicSector2023 | Decimal | Approx value invoices by the vendor to the public sector 2023 |

## Examples

We have put together a few example of how you can use search in financial reports to easy find data.

### Search for bankruptcies initiated from 2024-12-09 00:00:00 and forward

```bash cURL theme={null}
curl -H "x-api-key: YOUR_API_KEY" \
  "https://lens-api.tic.io/search-public/bankruptcies?q=*&query_by=registrationNumber&filter_by=initiatedDate:>=1733702400"
{
    "facet_counts": [],
    "found": 61,
    "hits": [
        {
            "document": {
                "bankruptcyStatusCode": "20",
                "bankruptcyStatusDescriptionEn": "Bankruptcy proceedings commenced",
                "bankruptcyStatusDescriptionSv": "Konkurs inledd",
                "companyId": 3367569,
                "companyName": "Mix Ranch AB",
                "courtCase": "K 1651-24",
                "courtCode": "TGO",
                "courtEmail": "gotlands.tingsratt@dom.se",
                "courtName": "Gotlands tingsrätt",
                "elfCode": "XJHM",
                "hasTrustee": true,
                "id": "299652",
                "initiatedDate": 1733702400,
                "legalEntityType": "Aktiebolag",
                "localCompanyCode": "AB",
                "mostRecentFinancialSummary": {
                    "bs_TotalAssetsK": 773,
                    "isAudited": false,
                    "km_EquityAssetsRatio": 0.123,
                    "periodEnd": 1672444800,
                    "periodStart": 1640995200,
                    "rs_NetSalesK": 0,
                    "rs_OperatingProfitOrLossK": -9,
                    "rs_OtherOperatingIncomeK": 0,
                    "rs_ProfitAfterFinancialItemsK": -35,
                    "rs_SumFinancialItemsK": -26
                },
                "mostRecentPurpose": "Bolaget verksamhet skall bestå i bedrivande av nöjesanläggning, / restaurang, säkerhetsutbildningar, personskydd, MC- och / bilverkstad samt därmed förenlig verksamhet.",
                "mostRecentRegisteredAddress": {
                    "addressType": "mailAddress",
                    "city": "Tingstäde",
                    "co": "C/O Edmarg",
                    "countryCodeAlpha3": "SWE",
                    "houseNumber": "641",
                    "location": [
                        57.7984,
                        18.54896
                    ],
                    "postalCode": "62442",
                    "street": "Stenkyrka Broungs"
                },
                "registeredOfficeCounty": "Gotlands län",
                "registeredOfficeCountyCode": "09",
                "registeredOfficeMunicipality": "Gotland",
                "registeredOfficeMunicipalityCode": "0980",
                "registrationDate": 1124064000,
                "registrationNumber": "5566845250",
                "sniCodes": [
                    {
                        "sni_2007Code": "55202",
                        "sni_2007Name": "Stugbyverksamhet m.m."
                    },
                    {
                        "sni_2007Code": "55300",
                        "sni_2007Name": "Campingplatsverksamhet"
                    },
                    {
                        "sni_2007Code": "56100",
                        "sni_2007Name": "Restaurangverksamhet"
                    },
                    {
                        "sni_2007Code": "93290",
                        "sni_2007Name": "Övrig fritids- och nöjesverksamhet"
                    }
                ],
                "trusteeAdddressCity": "STOCKHOLM",
                "trusteeAddressPostalCode": "111 22",
                "trusteeAddressStreet": "Olof Palmes gata 23",
                "trusteeCO": "c/o Merino Advokatbyrå AB",
                "trusteeName": "XXX"
            },
            "highlight": {},
            "highlights": []
        }...
```

### Search for bankruptcies from 2024-10-09 00:00:00 and onwards with the trustee C/O Fylgia law firm

```bash cURL theme={null}
curl -H "x-api-key: YOUR_API_KEY" \
  "https://lens-api.tic.io/search-public/bankruptcies?q=*&query_by=registrationNumber&filter_by=initiatedDate:>=1733702400"
{
    "facet_counts": [],
    "found": 2,
    "hits": [
        {
            "document": {
                "bankruptcyStatusCode": "20",
                "bankruptcyStatusDescriptionEn": "Bankruptcy proceedings commenced",
                "bankruptcyStatusDescriptionSv": "Konkurs inledd",
                "companyId": 3319268,
                "companyName": "Kemze Konsult AB",
                "courtCase": "K 11798-24",
                "courtCode": "TVA",
                "courtEmail": "varbergs.tingsratt@dom.se",
                "courtName": "Varbergs tingsrätt",
                "elfCode": "XJHM",
                "hasTrustee": true,
                "id": "299600",
                "initiatedDate": 1733702400,
                "legalEntityType": "Aktiebolag",
                "localCompanyCode": "AB",
                "mostRecentFinancialSummary": {
                    "bs_TotalAssetsK": 1,
                    "isAudited": false,
                    "km_EquityAssetsRatio": 1.0,
                    "periodEnd": 1688083200,
                    "periodStart": 1656633600,
                    "rs_NetSalesK": 0,
                    "rs_OperatingProfitOrLossK": -22,
                    "rs_OtherOperatingIncomeK": 0,
                    "rs_ProfitAfterFinancialItemsK": -22,
                    "rs_SumFinancialItemsK": 0,
                    "software": "BL Bokslut"
                },
                "mostRecentPurpose": "Föremålet för bolagets verksamhet är att tillhandahålla / assistenthjälp, bedriva konsultations- och föreläsnings/ verksamhet, äga och förvalta värdepapper och därmed / förenlig verksamhet.",
                "mostRecentRegisteredAddress": {
                    "addressType": "registeredAddress",
                    "city": "Hagalund",
                    "co": "C/O Ola Kemze",
                    "countryCodeAlpha3": "SWE",
                    "houseNumber": "14",
                    "location": [
                        59.36196,
                        18.00999
                    ],
                    "postalCode": "16963",
                    "street": "Hagalundsgatan"
                },
                "registeredOfficeCounty": "Stockholms län",
                "registeredOfficeCountyCode": "01",
                "registeredOfficeMunicipality": "Solna",
                "registeredOfficeMunicipalityCode": "0184",
                "registrationDate": 1274054400,
                "registrationNumber": "5568084767",
                "sniCodes": [
                    {
                        "sni_2007Code": "88102",
                        "sni_2007Name": "Öppna sociala insatser för personer med funktionshinder"
                    },
                    {
                        "sni_2007Code": "90010",
                        "sni_2007Name": "Artistisk verksamhet"
                    }
                ],
                "trusteeAdddressCity": "STOCKHOLM",
                "trusteeAddressPostalCode": "102 04",
                "trusteeAddressStreet": "Box 55555",
                "trusteeCO": "Advokatfirman Fylgia KB",
                "trusteeName": "XXX"
            }...
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.