WebService::KvKAPI - Query the Dutch Chamber of Commerence (KvK) API
version 0.011
Wesley Schwengle <wesley@mintlab.nl>
This software is Copyright (c) 2018 by Mintlab / Zaaksysteem.nl.
This is free software, licensed under:
The European Union Public License (EUPL) v1.1
Query the KvK API via their OpenAPI definition.
use WebService::KvKAPI; my $api = WebService::KvKAPI->new( api_key => 'foobar', ); $api->search(); $api->search_all(); $api->search_max();
The KvK API key. You can request one at https://developers.kvk.nl/.
An OpenAPI::Client object. Build for you.
Optional API host to allow overriding the default host api.kvk.nl.
api.kvk.nl
Check if you have an API host set or if you use the default. Publicly available for those who need it.
Directly do an API call towards the KvK API. Returns the JSON datastructure as an HashRef.
HashRef
Retreive detailed information of one company. Dies when the company cannot be found. Make sure to call "search" in WebService::KvKAPI first in case you don't want to die.
Search the KVK, only retrieves the first 10 entries.
my $results = $self->search(kvkNumber => 12345678, ...); foreach (@$results) { ...; }
Search the KVK, retreives ALL entries. Potentially a very expensive call (money wise). Don't lookup the Albert Heijn KvK number, do more specific searches
my $results = $self->search_all(kvkNumber => 12345678, ...); foreach (@$results) { ...; }
Search the KVK, retreives a maximum of X results up the the nearest 10, eg 15 as a max returns 20 items.
my $results = $self->search_max(15, kvkNumber => 12345678, ...); foreach (@$results) { ...; }
Helper function to always have the correct syntax for the kvkNumber and branchNumber. Publicly available for if you want to do calls yourself via "api_call" in WebService::KvKAPI
The KvK also has test endpoints. While they are supported via the direct api_call method, you can instantiate a model that works only in spoofmode: WebService::KvKAPI::Spoof
api_call
To install WebService::KvKAPI, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebService::KvKAPI
CPAN shell
perl -MCPAN -e shell install WebService::KvKAPI
For more information on module installation, please visit the detailed CPAN module installation guide.