# easybill-generated-async

The first version of the easybill REST API. [CHANGELOG](https://api.easybill.de/rest/v1/CHANGELOG.md)

## 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 Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 1.96.0
- Package version: 1.0.0
- Generator version: 7.22.0-SNAPSHOT
- Build package: org.openapitools.codegen.languages.PythonClientCodegen

## Requirements.

Python 3.10+

## Installation & Usage
### pip install

If the python package is hosted on a repository, you can install directly using:

```sh
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
```
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`)

Then import the package:
```python
import easybill_generated_async
```

### Setuptools

Install via [Setuptools](http://pypi.python.org/pypi/setuptools).

```sh
python setup.py install --user
```
(or `sudo python setup.py install` to install the package for all users)

Then import the package:
```python
import easybill_generated_async
```

### Tests

Execute `pytest` to run the tests.

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:

```python

import easybill_generated_async
from easybill_generated_async.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.easybill.de/rest/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = easybill_generated_async.Configuration(
    host = "https://api.easybill.de/rest/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basicAuth
configuration = easybill_generated_async.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Configure API key authorization: Bearer
configuration.api_key['Bearer'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Bearer'] = 'Bearer'


# Enter a context with an instance of the API client
async with easybill_generated_async.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = easybill_generated_async.AttachmentApi(api_client)
    limit = 56 # int | Limited the result. Default is 100. Maximum can be 1000. (optional)
    page = 56 # int | Set current Page. Default is 1. (optional)

    try:
        # Fetch attachments list
        api_response = await api_instance.attachments_get(limit=limit, page=page)
        print("The response of AttachmentApi->attachments_get:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling AttachmentApi->attachments_get: %s\n" % e)

```

## Documentation for API Endpoints

All URIs are relative to *https://api.easybill.de/rest/v1*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*AttachmentApi* | [**attachments_get**](docs/AttachmentApi.md#attachments_get) | **GET** /attachments | Fetch attachments list
*AttachmentApi* | [**attachments_id_content_get**](docs/AttachmentApi.md#attachments_id_content_get) | **GET** /attachments/{id}/content | Fetch attachment content
*AttachmentApi* | [**attachments_id_delete**](docs/AttachmentApi.md#attachments_id_delete) | **DELETE** /attachments/{id} | Delete attachment
*AttachmentApi* | [**attachments_id_get**](docs/AttachmentApi.md#attachments_id_get) | **GET** /attachments/{id} | Fetch attachment
*AttachmentApi* | [**attachments_id_put**](docs/AttachmentApi.md#attachments_id_put) | **PUT** /attachments/{id} | Update attachment
*AttachmentApi* | [**attachments_post**](docs/AttachmentApi.md#attachments_post) | **POST** /attachments | Create attachment
*ContactApi* | [**customers_customer_id_contacts_get**](docs/ContactApi.md#customers_customer_id_contacts_get) | **GET** /customers/{customerId}/contacts | Fetch customer contact list
*ContactApi* | [**customers_customer_id_contacts_id_delete**](docs/ContactApi.md#customers_customer_id_contacts_id_delete) | **DELETE** /customers/{customerId}/contacts/{id} | Delete contact
*ContactApi* | [**customers_customer_id_contacts_id_get**](docs/ContactApi.md#customers_customer_id_contacts_id_get) | **GET** /customers/{customerId}/contacts/{id} | Fetch contact
*ContactApi* | [**customers_customer_id_contacts_id_put**](docs/ContactApi.md#customers_customer_id_contacts_id_put) | **PUT** /customers/{customerId}/contacts/{id} | Update Contact
*ContactApi* | [**customers_customer_id_contacts_post**](docs/ContactApi.md#customers_customer_id_contacts_post) | **POST** /customers/{customerId}/contacts | Create new contact
*CustomerApi* | [**customers_get**](docs/CustomerApi.md#customers_get) | **GET** /customers | Fetch customers list
*CustomerApi* | [**customers_id_delete**](docs/CustomerApi.md#customers_id_delete) | **DELETE** /customers/{id} | Delete customer
*CustomerApi* | [**customers_id_get**](docs/CustomerApi.md#customers_id_get) | **GET** /customers/{id} | Fetch customer
*CustomerApi* | [**customers_id_put**](docs/CustomerApi.md#customers_id_put) | **PUT** /customers/{id} | Update Customer
*CustomerApi* | [**customers_post**](docs/CustomerApi.md#customers_post) | **POST** /customers | Create customer
*CustomerGroupApi* | [**customer_groups_get**](docs/CustomerGroupApi.md#customer_groups_get) | **GET** /customer-groups | Fetch customer group list
*CustomerGroupApi* | [**customer_groups_id_delete**](docs/CustomerGroupApi.md#customer_groups_id_delete) | **DELETE** /customer-groups/{id} | Delete customer group
*CustomerGroupApi* | [**customer_groups_id_get**](docs/CustomerGroupApi.md#customer_groups_id_get) | **GET** /customer-groups/{id} | Fetch customer group
*CustomerGroupApi* | [**customer_groups_id_put**](docs/CustomerGroupApi.md#customer_groups_id_put) | **PUT** /customer-groups/{id} | Update customer group
*CustomerGroupApi* | [**customer_groups_post**](docs/CustomerGroupApi.md#customer_groups_post) | **POST** /customer-groups | Create customer group
*DiscountApi* | [**discounts_position_get**](docs/DiscountApi.md#discounts_position_get) | **GET** /discounts/position | Fetch list of position discounts
*DiscountApi* | [**discounts_position_group_get**](docs/DiscountApi.md#discounts_position_group_get) | **GET** /discounts/position-group | Fetch list of position-group discounts
*DiscountApi* | [**discounts_position_group_id_delete**](docs/DiscountApi.md#discounts_position_group_id_delete) | **DELETE** /discounts/position-group/{id} | Delete the specified position-group discount
*DiscountApi* | [**discounts_position_group_id_get**](docs/DiscountApi.md#discounts_position_group_id_get) | **GET** /discounts/position-group/{id} | Fetch specified position-group discount by id
*DiscountApi* | [**discounts_position_group_id_put**](docs/DiscountApi.md#discounts_position_group_id_put) | **PUT** /discounts/position-group/{id} | Update a position-group discount
*DiscountApi* | [**discounts_position_group_post**](docs/DiscountApi.md#discounts_position_group_post) | **POST** /discounts/position-group | Create a new position-group discount
*DiscountApi* | [**discounts_position_id_delete**](docs/DiscountApi.md#discounts_position_id_delete) | **DELETE** /discounts/position/{id} | Delete the specified position discount
*DiscountApi* | [**discounts_position_id_get**](docs/DiscountApi.md#discounts_position_id_get) | **GET** /discounts/position/{id} | Fetch specified position discount by id
*DiscountApi* | [**discounts_position_id_put**](docs/DiscountApi.md#discounts_position_id_put) | **PUT** /discounts/position/{id} | Update a position discount
*DiscountApi* | [**discounts_position_post**](docs/DiscountApi.md#discounts_position_post) | **POST** /discounts/position | Create a new position discount
*DocumentApi* | [**documents_get**](docs/DocumentApi.md#documents_get) | **GET** /documents | Fetch documents list
*DocumentApi* | [**documents_id_cancel_post**](docs/DocumentApi.md#documents_id_cancel_post) | **POST** /documents/{id}/cancel | Cancel document
*DocumentApi* | [**documents_id_delete**](docs/DocumentApi.md#documents_id_delete) | **DELETE** /documents/{id} | Delete document
*DocumentApi* | [**documents_id_done_put**](docs/DocumentApi.md#documents_id_done_put) | **PUT** /documents/{id}/done | To complete a document.
*DocumentApi* | [**documents_id_download_get**](docs/DocumentApi.md#documents_id_download_get) | **GET** /documents/{id}/download | Fetch the document in best fitting format to the given Accept header
*DocumentApi* | [**documents_id_get**](docs/DocumentApi.md#documents_id_get) | **GET** /documents/{id} | Fetch document
*DocumentApi* | [**documents_id_jpg_get**](docs/DocumentApi.md#documents_id_jpg_get) | **GET** /documents/{id}/jpg | Download a document as an jpeg-image
*DocumentApi* | [**documents_id_pdf_get**](docs/DocumentApi.md#documents_id_pdf_get) | **GET** /documents/{id}/pdf | Fetch pdf document
*DocumentApi* | [**documents_id_put**](docs/DocumentApi.md#documents_id_put) | **PUT** /documents/{id} | Update document
*DocumentApi* | [**documents_id_send_type_post**](docs/DocumentApi.md#documents_id_send_type_post) | **POST** /documents/{id}/send/{type} | Send document
*DocumentApi* | [**documents_id_type_post**](docs/DocumentApi.md#documents_id_type_post) | **POST** /documents/{id}/{type} | Convert an existing document to one of a different type
*DocumentApi* | [**documents_post**](docs/DocumentApi.md#documents_post) | **POST** /documents | Create document
*DocumentPaymentApi* | [**document_payments_get**](docs/DocumentPaymentApi.md#document_payments_get) | **GET** /document-payments | Fetch document payments list
*DocumentPaymentApi* | [**document_payments_id_delete**](docs/DocumentPaymentApi.md#document_payments_id_delete) | **DELETE** /document-payments/{id} | Delete document payment
*DocumentPaymentApi* | [**document_payments_id_get**](docs/DocumentPaymentApi.md#document_payments_id_get) | **GET** /document-payments/{id} | Fetch document payment
*DocumentPaymentApi* | [**document_payments_post**](docs/DocumentPaymentApi.md#document_payments_post) | **POST** /document-payments | Create document payment
*DocumentVersionApi* | [**documents_id_versions_get**](docs/DocumentVersionApi.md#documents_id_versions_get) | **GET** /documents/{id}/versions | List all versions of a given document
*DocumentVersionApi* | [**documents_id_versions_version_id_get**](docs/DocumentVersionApi.md#documents_id_versions_version_id_get) | **GET** /documents/{id}/versions/{versionId} | Show a single version of a given document
*DocumentVersionApi* | [**documents_id_versions_version_id_items_version_item_id_download_get**](docs/DocumentVersionApi.md#documents_id_versions_version_id_items_version_item_id_download_get) | **GET** /documents/{id}/versions/{versionId}/items/{versionItemId}/download | Download a specific file for a single version of a given document
*LoginsApi* | [**logins_get**](docs/LoginsApi.md#logins_get) | **GET** /logins | 
*LoginsApi* | [**logins_id_get**](docs/LoginsApi.md#logins_id_get) | **GET** /logins/{id} | 
*PdfTemplatesApi* | [**pdf_templates_get**](docs/PdfTemplatesApi.md#pdf_templates_get) | **GET** /pdf-templates | Fetch PDF Templates list
*PositionApi* | [**positions_get**](docs/PositionApi.md#positions_get) | **GET** /positions | Fetch positions list
*PositionApi* | [**positions_id_delete**](docs/PositionApi.md#positions_id_delete) | **DELETE** /positions/{id} | Delete position
*PositionApi* | [**positions_id_get**](docs/PositionApi.md#positions_id_get) | **GET** /positions/{id} | Fetch position
*PositionApi* | [**positions_id_put**](docs/PositionApi.md#positions_id_put) | **PUT** /positions/{id} | Update position
*PositionApi* | [**positions_post**](docs/PositionApi.md#positions_post) | **POST** /positions | Create position
*PositionGroupApi* | [**position_groups_get**](docs/PositionGroupApi.md#position_groups_get) | **GET** /position-groups | Fetch position group list
*PositionGroupApi* | [**position_groups_id_delete**](docs/PositionGroupApi.md#position_groups_id_delete) | **DELETE** /position-groups/{id} | Delete position group
*PositionGroupApi* | [**position_groups_id_get**](docs/PositionGroupApi.md#position_groups_id_get) | **GET** /position-groups/{id} | Fetch position group
*PositionGroupApi* | [**position_groups_id_put**](docs/PositionGroupApi.md#position_groups_id_put) | **PUT** /position-groups/{id} | Update position group
*PositionGroupApi* | [**position_groups_post**](docs/PositionGroupApi.md#position_groups_post) | **POST** /position-groups | Create position group
*PostBoxApi* | [**post_boxes_get**](docs/PostBoxApi.md#post_boxes_get) | **GET** /post-boxes | Fetch post box list
*PostBoxApi* | [**post_boxes_id_delete**](docs/PostBoxApi.md#post_boxes_id_delete) | **DELETE** /post-boxes/{id} | Delete post box
*PostBoxApi* | [**post_boxes_id_get**](docs/PostBoxApi.md#post_boxes_id_get) | **GET** /post-boxes/{id} | Fetch post box
*ProjectApi* | [**projects_get**](docs/ProjectApi.md#projects_get) | **GET** /projects | Fetch projects list
*ProjectApi* | [**projects_id_delete**](docs/ProjectApi.md#projects_id_delete) | **DELETE** /projects/{id} | Delete project
*ProjectApi* | [**projects_id_get**](docs/ProjectApi.md#projects_id_get) | **GET** /projects/{id} | Fetch project
*ProjectApi* | [**projects_id_put**](docs/ProjectApi.md#projects_id_put) | **PUT** /projects/{id} | Update project
*ProjectApi* | [**projects_post**](docs/ProjectApi.md#projects_post) | **POST** /projects | Create project
*SepaPaymentApi* | [**sepa_payments_get**](docs/SepaPaymentApi.md#sepa_payments_get) | **GET** /sepa-payments | Fetch SEPA payments list
*SepaPaymentApi* | [**sepa_payments_id_delete**](docs/SepaPaymentApi.md#sepa_payments_id_delete) | **DELETE** /sepa-payments/{id} | Delete SEPA payment
*SepaPaymentApi* | [**sepa_payments_id_get**](docs/SepaPaymentApi.md#sepa_payments_id_get) | **GET** /sepa-payments/{id} | Fetch SEPA payment
*SepaPaymentApi* | [**sepa_payments_id_put**](docs/SepaPaymentApi.md#sepa_payments_id_put) | **PUT** /sepa-payments/{id} | Update SEPA payment
*SepaPaymentApi* | [**sepa_payments_post**](docs/SepaPaymentApi.md#sepa_payments_post) | **POST** /sepa-payments | Create SEPA payment
*SerialNumberApi* | [**serial_numbers_get**](docs/SerialNumberApi.md#serial_numbers_get) | **GET** /serial-numbers | Fetch a list of serial numbers for positions
*SerialNumberApi* | [**serial_numbers_id_delete**](docs/SerialNumberApi.md#serial_numbers_id_delete) | **DELETE** /serial-numbers/{id} | Delete a serial number for a position
*SerialNumberApi* | [**serial_numbers_id_get**](docs/SerialNumberApi.md#serial_numbers_id_get) | **GET** /serial-numbers/{id} | Fetch a serial number for a position
*SerialNumberApi* | [**serial_numbers_post**](docs/SerialNumberApi.md#serial_numbers_post) | **POST** /serial-numbers | Create s serial number for a position
*StockApi* | [**stocks_get**](docs/StockApi.md#stocks_get) | **GET** /stocks | Fetch a list of stock entries for positions
*StockApi* | [**stocks_id_get**](docs/StockApi.md#stocks_id_get) | **GET** /stocks/{id} | Fetch an stock entry for a position
*StockApi* | [**stocks_post**](docs/StockApi.md#stocks_post) | **POST** /stocks | Create a stock entry for a position
*TaskApi* | [**tasks_get**](docs/TaskApi.md#tasks_get) | **GET** /tasks | Fetch tasks list
*TaskApi* | [**tasks_id_delete**](docs/TaskApi.md#tasks_id_delete) | **DELETE** /tasks/{id} | Delete task
*TaskApi* | [**tasks_id_get**](docs/TaskApi.md#tasks_id_get) | **GET** /tasks/{id} | Fetch task
*TaskApi* | [**tasks_id_put**](docs/TaskApi.md#tasks_id_put) | **PUT** /tasks/{id} | Update task
*TaskApi* | [**tasks_post**](docs/TaskApi.md#tasks_post) | **POST** /tasks | Create task
*TextTemplateApi* | [**text_templates_get**](docs/TextTemplateApi.md#text_templates_get) | **GET** /text-templates | Fetch text templates list
*TextTemplateApi* | [**text_templates_id_delete**](docs/TextTemplateApi.md#text_templates_id_delete) | **DELETE** /text-templates/{id} | Delete text template
*TextTemplateApi* | [**text_templates_id_get**](docs/TextTemplateApi.md#text_templates_id_get) | **GET** /text-templates/{id} | Fetch text template
*TextTemplateApi* | [**text_templates_id_put**](docs/TextTemplateApi.md#text_templates_id_put) | **PUT** /text-templates/{id} | Update text template
*TextTemplateApi* | [**text_templates_post**](docs/TextTemplateApi.md#text_templates_post) | **POST** /text-templates | Create text template
*TimeTrackingApi* | [**time_trackings_get**](docs/TimeTrackingApi.md#time_trackings_get) | **GET** /time-trackings | Fetch time trackings list
*TimeTrackingApi* | [**time_trackings_id_delete**](docs/TimeTrackingApi.md#time_trackings_id_delete) | **DELETE** /time-trackings/{id} | Delete time tracking
*TimeTrackingApi* | [**time_trackings_id_get**](docs/TimeTrackingApi.md#time_trackings_id_get) | **GET** /time-trackings/{id} | Fetch time tracking
*TimeTrackingApi* | [**time_trackings_id_put**](docs/TimeTrackingApi.md#time_trackings_id_put) | **PUT** /time-trackings/{id} | Update time tracking
*TimeTrackingApi* | [**time_trackings_post**](docs/TimeTrackingApi.md#time_trackings_post) | **POST** /time-trackings | Create time tracking
*WebhookApi* | [**webhooks_get**](docs/WebhookApi.md#webhooks_get) | **GET** /webhooks | Fetch WebHooks list
*WebhookApi* | [**webhooks_id_delete**](docs/WebhookApi.md#webhooks_id_delete) | **DELETE** /webhooks/{id} | Delete WebHook
*WebhookApi* | [**webhooks_id_get**](docs/WebhookApi.md#webhooks_id_get) | **GET** /webhooks/{id} | Fetch WebHook
*WebhookApi* | [**webhooks_id_put**](docs/WebhookApi.md#webhooks_id_put) | **PUT** /webhooks/{id} | Update WebHook
*WebhookApi* | [**webhooks_post**](docs/WebhookApi.md#webhooks_post) | **POST** /webhooks | Create WebHook


## Documentation For Models

 - [AdvancedDataField](docs/AdvancedDataField.md)
 - [Attachment](docs/Attachment.md)
 - [Attachments](docs/Attachments.md)
 - [Contact](docs/Contact.md)
 - [Contacts](docs/Contacts.md)
 - [Customer](docs/Customer.md)
 - [CustomerGroup](docs/CustomerGroup.md)
 - [CustomerGroups](docs/CustomerGroups.md)
 - [CustomerSnapshot](docs/CustomerSnapshot.md)
 - [Customers](docs/Customers.md)
 - [Discount](docs/Discount.md)
 - [DiscountPosition](docs/DiscountPosition.md)
 - [DiscountPositionGroup](docs/DiscountPositionGroup.md)
 - [DiscountPositionGroups](docs/DiscountPositionGroups.md)
 - [DiscountPositions](docs/DiscountPositions.md)
 - [Document](docs/Document.md)
 - [DocumentAddress](docs/DocumentAddress.md)
 - [DocumentPayment](docs/DocumentPayment.md)
 - [DocumentPayments](docs/DocumentPayments.md)
 - [DocumentPosition](docs/DocumentPosition.md)
 - [DocumentRecurring](docs/DocumentRecurring.md)
 - [DocumentVersion](docs/DocumentVersion.md)
 - [DocumentVersionItem](docs/DocumentVersionItem.md)
 - [DocumentVersions](docs/DocumentVersions.md)
 - [Documents](docs/Documents.md)
 - [FileFormatConfig](docs/FileFormatConfig.md)
 - [List](docs/List.md)
 - [Login](docs/Login.md)
 - [LoginSecurity](docs/LoginSecurity.md)
 - [Logins](docs/Logins.md)
 - [PDFTemplate](docs/PDFTemplate.md)
 - [PDFTemplateSettings](docs/PDFTemplateSettings.md)
 - [PDFTemplateSettingsEmail](docs/PDFTemplateSettingsEmail.md)
 - [PDFTemplates](docs/PDFTemplates.md)
 - [Position](docs/Position.md)
 - [PositionExportIdentifierExtended](docs/PositionExportIdentifierExtended.md)
 - [PositionGroup](docs/PositionGroup.md)
 - [PositionGroups](docs/PositionGroups.md)
 - [Positions](docs/Positions.md)
 - [PostBox](docs/PostBox.md)
 - [PostBoxRequest](docs/PostBoxRequest.md)
 - [PostBoxes](docs/PostBoxes.md)
 - [Project](docs/Project.md)
 - [Projects](docs/Projects.md)
 - [SEPAPayment](docs/SEPAPayment.md)
 - [SEPAPayments](docs/SEPAPayments.md)
 - [SerialNumber](docs/SerialNumber.md)
 - [SerialNumbers](docs/SerialNumbers.md)
 - [ServiceDate](docs/ServiceDate.md)
 - [Stock](docs/Stock.md)
 - [Stocks](docs/Stocks.md)
 - [Task](docs/Task.md)
 - [Tasks](docs/Tasks.md)
 - [TextTemplate](docs/TextTemplate.md)
 - [TextTemplates](docs/TextTemplates.md)
 - [TimeTracking](docs/TimeTracking.md)
 - [TimeTrackings](docs/TimeTrackings.md)
 - [WebHook](docs/WebHook.md)
 - [WebHookLastResponse](docs/WebHookLastResponse.md)
 - [WebHooks](docs/WebHooks.md)


<a id="documentation-for-authorization"></a>
## Documentation For Authorization


Authentication schemes defined for the API:
<a id="Bearer"></a>
### Bearer

- **Type**: API key
- **API key parameter name**: Authorization
- **Location**: HTTP header

<a id="basicAuth"></a>
### basicAuth

- **Type**: HTTP basic authentication


## Author




