The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

WebService::KvKAPI - Query the Dutch Chamber of Commerence (KvK) API

VERSION

version 0.001

AUTHOR

Wesley Schwengle <wesley@mintlab.nl>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2018 by Mintlab / Zaaksysteem.nl.

This is free software, licensed under:

  The European Union Public License (EUPL) v1.1

DESCRIPTION

SYNOPSIS

    use WebSerivce

ATTRIBUTES

api_key

The KvK API key. You can request one at https://developers.kvk.nl/.

client

An OpenAPI::Client object. Build for you.

METHODS

api_call

Directly do an API call towards the KvK API. Returns the JSON datastructure as an HashRef.

profile

Retreive detailed information of one company. Dies when the company cannot be found. Make sure to call search 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_all

Seach 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_max

Seach 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) {
        ...;
    }