NAME

WWW::Bizowie::API - Perl API interface to Bizowie's erp software.

SYNOPSIS

my $bz = WWW::Bizowie::API->new(
    api_key    => '02cc7058-cd22-4c8e-ad7c-a8f3f2a64bd0',
    secret_key => '58c57abc-1e16-3571-bb35-73876bcef746',
    site       => 'mysite.bizowie.com',
);

$bz->call(
    'databases/add_note/3/10/123', {
        comment => "I added this comment via the API!",
    },
);

METHODS

new

Returns a new instance of WWW::Bizowie::API

Requires three parameters: api_key (your Bizowie API key), secret_key, and site (the hostname of your Bizowie instance).

Optionally accepts:

  • v2 - if true, calls are routed through the v2 API endpoint (/bz/apiv2/call/) instead of the v1 endpoint (/bz/api/). Recommended for new integrations.

  • api_version - when v2 mode is enabled, specifies the API version sent with each request (defaults to '1.00').

  • debug - if true, warns with the raw HTTP response when a response cannot be decoded as JSON.

call

Makes a Bizowie API call.

Takes two parameters: a string indicating the path to the API method you wish to call, and a hash reference of the parameters to be passed.

If the object was constructed with v2 => 1, the request is dispatched to the v2 endpoint; otherwise the v1 endpoint is used.

DEPENDENCIES

HTTP::Request::Common, LWP::UserAgent, Try::Tiny, JSON, Mo

AUTHORS

Bizowie

COPYRIGHT AND LICENSE

Copyright (C) 2013 Bizowie

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.