SwaggerClient-php
The first version of the easybill REST API. CHANGELOG ## Authentication You can choose between two available methods: Basic Auth
or Bearer Token
. In each HTTP request, one of the following HTTP headers is required: # Basic Auth Authorization: Basic base64_encode('<email>:<api_key>') # Bearer Token Authorization: Bearer <api_key>
## Limitations ### Request Limit * PLUS: 10 requests per minute * BUSINESS: 60 requests per minute If the limit is exceeded, you will receive the HTTP error: 429 Too Many Requests
### Result Limit All result lists are limited to 100 by default. This limit can be increased by the query parameter limit
to a maximum of 1000. ## Query filter Many list resources can be filtered. In /documents
you can filter e.g. by number with /documents?number=111028654
. If you want to filter multiple numbers, you can either enter them separated by commas /documents?number=111028654,222006895
or as an array /documents?number[]=111028654&number[]=222006895
. Warning: The maximum size of an HTTP request line in bytes is 4094. If this limit is exceeded, you will receive the HTTP error: 414 Request-URI Too Large
### Escape commas in query You can escape commans in query name=Patrick\\, Peter
if you submit the header X-Easybill-Escape: true
in your request. ## Property login_id This is the login of your admin or employee account. ## Date and Date-Time format Please use the timezone Europe/Berlin
. * date = Y-m-d = 2016-12-31
* date-time = Y-m-d H:i:s = 2016-12-31 03:13:37
Date or datetime can be null
because the attributes have been added later and the entry is older., (*1)
This PHP package is automatically generated by the Swagger Codegen project:, (*2)
- API version: 1.70.1
- Build package: io.swagger.codegen.v3.generators.php.PhpClientCodegen
Requirements
PHP 5.5 and later, (*3)
Installation & Usage
Composer
To install the bindings via Composer, add the following to composer.json
:, (*4)
{
"repositories": [
{
"type": "git",
"url": "https://github.com/creatissimo/easybill.git"
}
],
"require": {
"creatissimo/easybill": "*@dev"
}
}
Then run composer install
, (*5)
Manual Installation
Download the files and include autoload.php
:, (*6)
require_once('/path/to/SwaggerClient-php/vendor/autoload.php');
Tests
To run the unit tests:, (*7)
composer install
./vendor/bin/phpunit
Getting Started
Please follow the installation procedure and then run the following:, (*8)
setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');// Configure HTTP basic authorization: basicAuth
$config = Swagger\Client\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Swagger\Client\Api\AttachmentApi(
// 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
);
$limit = 56; // int | Limited the result. Default is 100. Maximum can be 1000.
$page = 56; // int | Set current Page. Default is 1.
try {
$result = $apiInstance->attachmentsGet($limit, $page);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AttachmentApi->attachmentsGet: ', $e->getMessage(), PHP_EOL;
}
// Configure API key authorization: Bearer
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');// Configure HTTP basic authorization: basicAuth
$config = Swagger\Client\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Swagger\Client\Api\AttachmentApi(
// 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 = 789; // int | ID of attachment
try {
$result = $apiInstance->attachmentsIdContentGet($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AttachmentApi->attachmentsIdContentGet: ', $e->getMessage(), PHP_EOL;
}
// Configure API key authorization: Bearer
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');// Configure HTTP basic authorization: basicAuth
$config = Swagger\Client\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Swagger\Client\Api\AttachmentApi(
// 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 = 789; // int | ID of attachment
try {
$apiInstance->attachmentsIdDelete($id);
} catch (Exception $e) {
echo 'Exception when calling AttachmentApi->attachmentsIdDelete: ', $e->getMessage(), PHP_EOL;
}
// Configure API key authorization: Bearer
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');// Configure HTTP basic authorization: basicAuth
$config = Swagger\Client\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Swagger\Client\Api\AttachmentApi(
// 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 = 789; // int | ID of attachment
try {
$result = $apiInstance->attachmentsIdGet($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AttachmentApi->attachmentsIdGet: ', $e->getMessage(), PHP_EOL;
}
// Configure API key authorization: Bearer
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');// Configure HTTP basic authorization: basicAuth
$config = Swagger\Client\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Swagger\Client\Api\AttachmentApi(
// 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 \Swagger\Client\Model\Attachment(); // \Swagger\Client\Model\Attachment |
$id = 789; // int | ID of attachment
try {
$result = $apiInstance->attachmentsIdPut($body, $id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AttachmentApi->attachmentsIdPut: ', $e->getMessage(), PHP_EOL;
}
// Configure API key authorization: Bearer
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');// Configure HTTP basic authorization: basicAuth
$config = Swagger\Client\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Swagger\Client\Api\AttachmentApi(
// 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 = "file_example"; // string |
try {
$result = $apiInstance->attachmentsPost($file);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AttachmentApi->attachmentsPost: ', $e->getMessage(), PHP_EOL;
}
?>
Documentation for API Endpoints
All URIs are relative to https://api.easybill.de/rest/v1, (*9)
Documentation For Models
Documentation For Authorization
Bearer
-
Type: API key
-
API key parameter name: Authorization
-
Location: HTTP header
basicAuth
-
Type: HTTP basic authentication
Author