1. Home
  2. Docs
  3. Endpoints
  4. SEARCH Filters
  5. /api/search/filters

/api/search/filters

Dette endpoint søger efter virksomheder og produktionsenheder der anvender EAN numre og i givent fald hvor mange EAN numre de har tilknyttet.

BEMÆRK: Dette endpoint er kun tilgængeligt med Enterprise abonnement.

Der kan filtreres på følgende parametre

Det som ønskes søgt EFTER
"for": "company", "punit" eller "company/punit"
Parametere der kan sættes i Request
"employees_from": antal ansatte fra,
"employees_to": antal ansatte til,
"awu_from": Årsværk fra,
"awu_to": Årsværk til,
"punit_count_from": Antal produktionsenheder tilknyttet fra,
"punit_count_to": Antal produktionsenheder tilknyttet til,
"ean_count_from": Antal tilknyttede EAN numre fra,
"ean_count_to": Antal tilknyttede EAN numre til,
"zipcodes": Postnumre (specifikke),
"zipcode_from": Postnummer fra,
"zipcode_to": Postnummer til,
"cities": Byer,
"industrycodes": Industrikoder,
"municipality_codes": Kommunekoder,
"municipality_names": Kommunenavn

Returformat når der findes resultater

{
    "for": "company,punit",
    "by": "filters",
    "query": {
        "types": [
            "company",
            "punit"
        ],
        "page": 1,
        "employees_from": null,
        "employees_to": null,
        "awu_from": null,
        "awu_to": null,
        "punit_count_from": null,
        "punit_count_to": null,
        "ean_count_from": null,
        "ean_count_to": null,
        "zipcodes": null,
        "zipcode_from": 2000,
        "zipcode_to": 2100,
        "cities": null,
        "industrycodes": null,
        "municipality_codes": null,
        "municipality_names": null
    },
    "results": {
        "companies": {
            "page": 1,
            "total_pages": integer,
            "results": [
                {
                    "id": integer,
                    "vat_number": integer,
                    "expiration_at": Y-m-d H:i:s,
                    "punits_count": integer,
                    "ean_numbers_count": integer,
                    "name": "",
                    "address": "",
                    "addressco": "",
                    "postbox": "",
                    "zipcode": "",
                    "city": "",
                    "cityname": "",
                    "industrycode": integer,
                    "industrydesc": "",
                    "startdate": Y-m-d H:i:s,
                    "enddate": null,
                    "advertising_protected": boolean,
                    "public_emails": [],
                    "public_phone_numbers": [
                        {
                            "last_updated": "",
                            "phone_number": "",
                            "valid_from": Y-m-d,
                            "valid_to": null
                        }
                    ],
                    "municipality_code": integer,
                    "municipality_name": "",
                    "erst_last_updated": Y-m-d H:i:s,
                    "erst_year": integer,
                    "erst_month":integer,
                    "erst_annual_work_unit": "",
                    "erst_annual_work_unit_interval_code": "",
                    "erst_number_employees": integer,
                    "erst_number_employees_interval_code": ""
                }
            ]
        },
        "punits": {
            "page": 1,
            "total_pages": integer,
            "results": [
                {
                    "id": integer,
                    "vat_number": integer,
                    "expiration_at": Y-m-d H:i:s,
                    "punits_count": integer,
                    "ean_numbers_count": integer,
                    "name": "",
                    "address": "",
                    "addressco": "",
                    "postbox": "",
                    "zipcode": "",
                    "city": "",
                    "cityname": "",
                    "industrycode": integer,
                    "industrydesc": "",
                    "startdate": Y-m-d H:i:s,
                    "enddate": null,
                    "advertising_protected": boolean,
                    "public_emails": [],
                    "public_phone_numbers": [
                        {
                            "last_updated": "",
                            "phone_number": "",
                            "valid_from": Y-m-d,
                            "valid_to": null
                        }
                    ],
                    "municipality_code": integer,
                    "municipality_name": "",
                    "erst_last_updated": Y-m-d H:i:s,
                    "erst_year": integer,
                    "erst_month":integer,
                    "erst_annual_work_unit": "",
                    "erst_annual_work_unit_interval_code": "",
                    "erst_number_employees": integer,
                    "erst_number_employees_interval_code": ""
                }
            ]
        }
    }
}

Returformat når der ikke findes resultater

{
    "for": "company,punit",
    "by": "filters",
    "query": {
        "types": [
            "company",
            "punit"
        ],
        "page": 1,
        "employees_from": null,
        "employees_to": null,
        "awu_from": null,
        "awu_to": null,
        "punit_count_from": null,
        "punit_count_to": null,
        "ean_count_from": null,
        "ean_count_to": null,
        "zipcodes": null,
        "zipcode_from": 999999,
        "zipcode_to": 999999,
        "cities": null,
        "industrycodes": null,
        "municipality_codes": null,
        "municipality_names": null
    },
    "results": {
        "companies": {
            "page": 1,
            "total_pages": 0,
            "results": []
        },
        "punits": {
            "page": 1,
            "total_pages": 0,
            "results": []
        }
    }
}

Returformat ved fejl

{
    error:
    {
        error_key: "error_message"
    }
}

How can we help?