creatissimo / easybill
easybill PHP REST API Client, generated with swagger-codegen, inofficial repo - API documentation: https://www.easybill.de/api/
Installs: 198
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/creatissimo/easybill
Requires
- php: >=5.5
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: >=7.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ~1.12
- phpunit/phpunit: ^4.8
- squizlabs/php_codesniffer: ~2.6
README
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.
This PHP package is automatically generated by the Swagger Codegen project:
- API version: 1.70.1
- 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/creatissimo/easybill.git"
}
],
"require": {
"creatissimo/easybill": "*@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: 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 ); $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
| Class | Method | HTTP request | Description |
|---|---|---|---|
| AttachmentApi | attachmentsGet | GET /attachments | Fetch attachments list |
| AttachmentApi | attachmentsIdContentGet | GET /attachments/{id}/content | Fetch attachment content |
| AttachmentApi | attachmentsIdDelete | DELETE /attachments/{id} | Delete attachment |
| AttachmentApi | attachmentsIdGet | GET /attachments/{id} | Fetch attachment |
| AttachmentApi | attachmentsIdPut | PUT /attachments/{id} | Update attachment |
| AttachmentApi | attachmentsPost | POST /attachments | Create attachment |
| ContactApi | customersCustomerIdContactsGet | GET /customers/{customerId}/contacts | Fetch customer contact list |
| ContactApi | customersCustomerIdContactsIdDelete | DELETE /customers/{customerId}/contacts/{id} | Delete contact |
| ContactApi | customersCustomerIdContactsIdGet | GET /customers/{customerId}/contacts/{id} | Fetch contact |
| ContactApi | customersCustomerIdContactsIdPut | PUT /customers/{customerId}/contacts/{id} | Update Contact |
| ContactApi | customersCustomerIdContactsPost | POST /customers/{customerId}/contacts | Create new contact |
| CustomerApi | customersGet | GET /customers | Fetch customers list |
| CustomerApi | customersIdDelete | DELETE /customers/{id} | Delete customer |
| CustomerApi | customersIdGet | GET /customers/{id} | Fetch customer |
| CustomerApi | customersIdPut | PUT /customers/{id} | Update Customer |
| CustomerApi | customersPost | POST /customers | Create customer |
| CustomerGroupApi | customerGroupsGet | GET /customer-groups | Fetch customer group list |
| CustomerGroupApi | customerGroupsIdDelete | DELETE /customer-groups/{id} | Delete customer group |
| CustomerGroupApi | customerGroupsIdGet | GET /customer-groups/{id} | Fetch customer group |
| CustomerGroupApi | customerGroupsIdPut | PUT /customer-groups/{id} | Update customer group |
| CustomerGroupApi | customerGroupsPost | POST /customer-groups | Create customer group |
| DiscountApi | discountsPositionGet | GET /discounts/position | Fetch list of position discounts |
| DiscountApi | discountsPositionGroupGet | GET /discounts/position-group | Fetch list of position-group discounts |
| DiscountApi | discountsPositionGroupIdDelete | DELETE /discounts/position-group/{id} | Delete the specified position-group discount |
| DiscountApi | discountsPositionGroupIdGet | GET /discounts/position-group/{id} | Fetch specified position-group discount by id |
| DiscountApi | discountsPositionGroupIdPut | PUT /discounts/position-group/{id} | Update a position-group discount |
| DiscountApi | discountsPositionGroupPost | POST /discounts/position-group | Create a new position-group discount |
| DiscountApi | discountsPositionIdDelete | DELETE /discounts/position/{id} | Delete the specified position discount |
| DiscountApi | discountsPositionIdGet | GET /discounts/position/{id} | Fetch specified position discount by id |
| DiscountApi | discountsPositionIdPut | PUT /discounts/position/{id} | Update a position discount |
| DiscountApi | discountsPositionPost | POST /discounts/position | Create a new position discount |
| DocumentApi | documentsGet | GET /documents | Fetch documents list |
| DocumentApi | documentsIdCancelPost | POST /documents/{id}/cancel | Cancel document |
| DocumentApi | documentsIdDelete | DELETE /documents/{id} | Delete document |
| DocumentApi | documentsIdDonePut | PUT /documents/{id}/done | To complete a document. |
| DocumentApi | documentsIdGet | GET /documents/{id} | Fetch document |
| DocumentApi | documentsIdJpgGet | GET /documents/{id}/jpg | Download a document as an jpeg-image |
| DocumentApi | documentsIdPdfGet | GET /documents/{id}/pdf | Fetch pdf document |
| DocumentApi | documentsIdPut | PUT /documents/{id} | Update document |
| DocumentApi | documentsIdSendTypePost | POST /documents/{id}/send/{type} | Send document |
| DocumentApi | documentsPost | POST /documents | Create document |
| DocumentPaymentApi | documentPaymentsGet | GET /document-payments | Fetch document payments list |
| DocumentPaymentApi | documentPaymentsIdDelete | DELETE /document-payments/{id} | Delete document payment |
| DocumentPaymentApi | documentPaymentsIdGet | GET /document-payments/{id} | Fetch document payment |
| DocumentPaymentApi | documentPaymentsPost | POST /document-payments | Create document payment |
| LoginsApi | loginsGet | GET /logins | |
| LoginsApi | loginsIdGet | GET /logins/{id} | |
| PdfTemplatesApi | pdfTemplatesGet | GET /pdf-templates | Fetch PDF Templates list |
| PositionApi | positionsGet | GET /positions | Fetch positions list |
| PositionApi | positionsIdDelete | DELETE /positions/{id} | Delete position |
| PositionApi | positionsIdGet | GET /positions/{id} | Fetch position |
| PositionApi | positionsIdPut | PUT /positions/{id} | Update position |
| PositionApi | positionsPost | POST /positions | Create position |
| PositionGroupApi | positionGroupsGet | GET /position-groups | Fetch position group list |
| PositionGroupApi | positionGroupsIdDelete | DELETE /position-groups/{id} | Delete position group |
| PositionGroupApi | positionGroupsIdGet | GET /position-groups/{id} | Fetch position group |
| PositionGroupApi | positionGroupsIdPut | PUT /position-groups/{id} | Update position group |
| PositionGroupApi | positionGroupsPost | POST /position-groups | Create position group |
| PostBoxApi | postBoxesGet | GET /post-boxes | Fetch post box list |
| PostBoxApi | postBoxesIdDelete | DELETE /post-boxes/{id} | Delete post box |
| PostBoxApi | postBoxesIdGet | GET /post-boxes/{id} | Fetch post box |
| ProjectApi | projectsGet | GET /projects | Fetch projects list |
| ProjectApi | projectsIdDelete | DELETE /projects/{id} | Delete project |
| ProjectApi | projectsIdGet | GET /projects/{id} | Fetch project |
| ProjectApi | projectsIdPut | PUT /projects/{id} | Update project |
| ProjectApi | projectsPost | POST /projects | Create project |
| SepaPaymentApi | sepaPaymentsGet | GET /sepa-payments | Fetch SEPA payments list |
| SepaPaymentApi | sepaPaymentsIdDelete | DELETE /sepa-payments/{id} | Delete SEPA payment |
| SepaPaymentApi | sepaPaymentsIdGet | GET /sepa-payments/{id} | Fetch SEPA payment |
| SepaPaymentApi | sepaPaymentsIdPut | PUT /sepa-payments/{id} | Update SEPA payment |
| SepaPaymentApi | sepaPaymentsPost | POST /sepa-payments | Create SEPA payment |
| SerialNumberApi | serialNumbersGet | GET /serial-numbers | Fetch a list of serial numbers for positions |
| SerialNumberApi | serialNumbersIdDelete | DELETE /serial-numbers/{id} | Delete a serial number for a position |
| SerialNumberApi | serialNumbersIdGet | GET /serial-numbers/{id} | Fetch a serial number for a position |
| SerialNumberApi | serialNumbersPost | POST /serial-numbers | Create s serial number for a position |
| StockApi | stocksGet | GET /stocks | Fetch a list of stock entries for positions |
| StockApi | stocksIdGet | GET /stocks/{id} | Fetch an stock entry for a position |
| StockApi | stocksPost | POST /stocks | Create a stock entry for a position |
| TaskApi | tasksGet | GET /tasks | Fetch tasks list |
| TaskApi | tasksIdDelete | DELETE /tasks/{id} | Delete task |
| TaskApi | tasksIdGet | GET /tasks/{id} | Fetch task |
| TaskApi | tasksIdPut | PUT /tasks/{id} | Update task |
| TaskApi | tasksPost | POST /tasks | Create task |
| TextTemplateApi | textTemplatesGet | GET /text-templates | Fetch text templates list |
| TextTemplateApi | textTemplatesIdDelete | DELETE /text-templates/{id} | Delete text template |
| TextTemplateApi | textTemplatesIdGet | GET /text-templates/{id} | Fetch text template |
| TextTemplateApi | textTemplatesIdPut | PUT /text-templates/{id} | Update text template |
| TextTemplateApi | textTemplatesPost | POST /text-templates | Create text template |
| TimeTrackingApi | timeTrackingsGet | GET /time-trackings | Fetch time trackings list |
| TimeTrackingApi | timeTrackingsIdDelete | DELETE /time-trackings/{id} | Delete time tracking |
| TimeTrackingApi | timeTrackingsIdGet | GET /time-trackings/{id} | Fetch time tracking |
| TimeTrackingApi | timeTrackingsIdPut | PUT /time-trackings/{id} | Update time tracking |
| TimeTrackingApi | timeTrackingsPost | POST /time-trackings | Create time tracking |
| WebhookApi | webhooksGet | GET /webhooks | Fetch WebHooks list |
| WebhookApi | webhooksIdDelete | DELETE /webhooks/{id} | Delete WebHook |
| WebhookApi | webhooksIdGet | GET /webhooks/{id} | Fetch WebHook |
| WebhookApi | webhooksIdPut | PUT /webhooks/{id} | Update WebHook |
| WebhookApi | webhooksPost | POST /webhooks | Create WebHook |
Documentation For Models
- Attachment
- Attachments
- AttachmentsBody
- Contact
- Contacts
- Customer
- CustomerGroup
- CustomerGroups
- CustomerSnapshot
- Customers
- Discount
- DiscountPosition
- DiscountPositionGroup
- DiscountPositionGroups
- DiscountPositions
- Document
- DocumentAddress
- DocumentPayment
- DocumentPayments
- DocumentPosition
- DocumentRecurring
- Documents
- Login
- LoginSecurity
- Logins
- ModelList
- PDFTemplate
- PDFTemplates
- Position
- PositionExportIdentifierExtended
- PositionGroup
- PositionGroups
- Positions
- PostBox
- PostBoxRequest
- PostBoxes
- Project
- Projects
- SEPAPayment
- SEPAPayments
- SerialNumber
- SerialNumbers
- ServiceDate
- Stock
- Stocks
- Task
- Tasks
- TextTemplate
- TextTemplates
- TimeTracking
- TimeTrackings
- WebHook
- WebHookLastResponse
- WebHooks
Documentation For Authorization
Bearer
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header
basicAuth
- Type: HTTP basic authentication