hryvinskyi/billwerk-api

1.0.0 2025-02-19 12:30 UTC

This package is auto-updated.

Last update: 2025-02-19 12:36:19 UTC


README

This document describes the endpoints of the billwerk REST API. You can find out more about billwerk here.

Swagger interactive usage / authentication:
This documentation offers interactive features which will enable you to test how our system behaves. To use the interactive features you have to aquire a bearer token for your active billwerk sandbox account. This procedure is described here. OAuth token URL for sandbox is https://sandbox.billwerk.com/oauth/token/, for production https://app.billwerk.com/oauth/token/. Please be aware the URL does not include [...]/api/v1/[...]After aquiring the token you must go through the 'Authorize'-Form down below (green button). You're now able to use the interactive features.
Please be aware your sandbox account will be affected trying out the endpoints!

Updates to API
We are constantly improving our API. We are trying to avoid breaking changes as much as possible. However, sometimes we have to make breaking changes. We will inform about breaking changes directly if these endpoints are used by your integration and grant sufficient time to react to the upcoming change. We will also inform about breaking changes in our changelog. Please be aware that we will not inform explicitly about non-breaking changes. We will not inform about changes in the following cases:

  • Adding a new enum value to a published public API endpoint is not considered a breaking change.
  • Adding new fields in API endpoint (request and response) is not considered a breaking change.
Integrations need to be built in a robust way that can deal with these sorts of changes by handling responses and objects in a generic way and ignoring unexpected types, enum values, fields.



Endpoints marked with [FEATURE] is an feature discriminated endpoint. Make sure your account has this feature enabled or contact <a href="mailto:support@billwerk.com">support.Return to https://developer.billwerk.io/

This PHP package is automatically generated by the Swagger Codegen project:

  • API version: v1
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.v3.generators.php.PhpClientCodegen

Requirements

PHP 5.5 and later

Installation & Usage

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/hryvinskyi/billwerk-api.git"
    }
  ],
  "require": {
    "hryvinskyi/billwerk-api": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

    require_once('/path/to/SwaggerClient-php/vendor/autoload.php');

Tests

To run the unit tests:

composer install
./vendor/bin/phpunit

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: BearerAuth
$config = Billwerk\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Billwerk\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$apiInstance = new Billwerk\Api\AccountingExportsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$file_id = "file_id_example"; // string | AccountingExport File Id

try {
    $result = $apiInstance->accountingExportFilesCreateDownloadLinkFileIdPOST($file_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountingExportsApi->accountingExportFilesCreateDownloadLinkFileIdPOST: ', $e->getMessage(), PHP_EOL;
}

// Configure API key authorization: BearerAuth
$config = Billwerk\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Billwerk\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$apiInstance = new Billwerk\Api\AccountingExportsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$file_id = "file_id_example"; // string | AccountingExport File Id

try {
    $apiInstance->accountingExportFilesGetDirectDownloadFileIdGET($file_id);
} catch (Exception $e) {
    echo 'Exception when calling AccountingExportsApi->accountingExportFilesGetDirectDownloadFileIdGET: ', $e->getMessage(), PHP_EOL;
}

// Configure API key authorization: BearerAuth
$config = Billwerk\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Billwerk\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$apiInstance = new Billwerk\Api\AccountingExportsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$id = "id_example"; // string | AccountingExport Id

try {
    $result = $apiInstance->accountingExportFilesGetIdGET($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountingExportsApi->accountingExportFilesGetIdGET: ', $e->getMessage(), PHP_EOL;
}

// Configure API key authorization: BearerAuth
$config = Billwerk\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Billwerk\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$apiInstance = new Billwerk\Api\AccountingExportsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$id = "id_example"; // string | Accounting export request Id

try {
    $result = $apiInstance->accountingExportsGetIdGET($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountingExportsApi->accountingExportsGetIdGET: ', $e->getMessage(), PHP_EOL;
}

// Configure API key authorization: BearerAuth
$config = Billwerk\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Billwerk\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$apiInstance = new Billwerk\Api\AccountingExportsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$kind = new \Billwerk\Model\AccountingExportKind(); // \Billwerk\Model\AccountingExportKind | Accounting export kind
$include_files = false; // bool | Include files
$from = "from_example"; // string | Cursor from where on the items are listed
$take = 56; // int | Limit returned items (Max = 500, Default = 200)

try {
    $result = $apiInstance->accountingExportsGetKindIncludeFilesFromTakeGET($kind, $include_files, $from, $take);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountingExportsApi->accountingExportsGetKindIncludeFilesFromTakeGET: ', $e->getMessage(), PHP_EOL;
}

// Configure API key authorization: BearerAuth
$config = Billwerk\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Billwerk\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$apiInstance = new Billwerk\Api\AccountingExportsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$body = new \Billwerk\Model\AccountingExportCreateDTO(); // \Billwerk\Model\AccountingExportCreateDTO | Accounting export request

try {
    $result = $apiInstance->accountingExportsPostDtoPOST($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountingExportsApi->accountingExportsPostDtoPOST: ', $e->getMessage(), PHP_EOL;
}

// Configure API key authorization: BearerAuth
$config = Billwerk\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Billwerk\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$apiInstance = new Billwerk\Api\AccountingExportsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);

try {
    $result = $apiInstance->accountingStatusGetGET();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountingExportsApi->accountingStatusGetGET: ', $e->getMessage(), PHP_EOL;
}
?>

Documentation for API Endpoints

All URIs are relative to https://app.billwerk.com

Documentation For Models

Documentation For Authorization

BearerAuth

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

Author

support@billwerk.com