> ## Documentation Index
> Fetch the complete documentation index at: https://docs.maesn.com/llms.txt
> Use this file to discover all available pages before exploring further.

# DATEV Rechnungswesen

> Integrate DATEV Rechnungswesen easily with Maesn’s Unified API. See the documentation with detailed system coverage and setup prerequisites.

**TARGET\_SYSTEM:** `datev-rewe` `datev-rewe-longtoken` `datev-rewe-export`

<div className="integration-table">
  |                      |                          Read                          |                         Create                         |                         Update                         |                         Delete                         |                         Webhook                        |
  | -------------------- | :----------------------------------------------------: | :----------------------------------------------------: | :----------------------------------------------------: | :----------------------------------------------------: | :----------------------------------------------------: |
  | Accounts             | <Icon icon="check" iconType="solid" color="#4db975" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> |
  | Async task           | <Icon icon="check" iconType="solid" color="#4db975" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> |
  | Bank accounts        | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> |
  | Bills                | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> |
  | Bill lines           | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> |
  | Booking proposals    | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> |
  | Contacts             | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="check" iconType="solid" color="#4db975" /> | <Icon icon="check" iconType="solid" color="#4db975" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> |
  | Customers            | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> |
  | Credit notes         | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> |
  | Dimensions           | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> |
  | Expenses             | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> |
  | Files                | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="check" iconType="solid" color="#4db975" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> |
  | Fiscal years         | <Icon icon="check" iconType="solid" color="#4db975" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> |
  | Goods receipts       | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> |
  | Goods receipt lines  | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> |
  | Invoices             | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> |
  | Invoice lines        | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> |
  | Items                | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> |
  | Journals             | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> |
  | Journal entries      | <Icon icon="check" iconType="solid" color="#4db975" /> | <Icon icon="check" iconType="solid" color="#4db975" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> |
  | Offers               | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> |
  | Offer lines          | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> |
  | Open items           | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> |
  | Payments             | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> |
  | Payment terms        | <Icon icon="check" iconType="solid" color="#4db975" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> |
  | Projects             | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> |
  | Purchase orders      | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> |
  | Purchase order lines | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> |
  | Sales orders         | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> |
  | Sales order lines    | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> |
  | Suppliers            | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> |
  | Tax rates            | <Icon icon="check" iconType="solid" color="#4db975" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> |
  | Transactions         | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> |
  | Trial balance        | <Icon icon="check" iconType="solid" color="#4db975" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> |
  | Units                | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> |
  | Users                | <Icon icon="check" iconType="solid" color="#4db975" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> |
  | Vendor credits       | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> |
</div>

<Icon icon="check" iconType="solid" color="#4db975" /> = Supported by Maesn <br />
<Icon icon="phone" iconType="light" color="#828282" /> = On demand - contact us<br />
<Icon icon="xmark" iconType="solid" color="#828282" /> = Not supported by DATEV Rechnungswesen <br />

## What is DATEV Rechnungswesen

DATEV Rechnungswesen is an application for accounting used by small- and medium sized companies. It does not belong to DATEV's suite of online applications, meaning that it is essentially an on-prem application that can be hosted by a provider or on your own server.

Despite this, there is one service available that can be used to transfer a limited set of data to DATEV Rechnungswesen. All other data, such as files and booking proposals need to be transfered via [DATEV Unternehmen Online](/integrations/datev-unternehmen-online).

<img src="https://mintcdn.com/maesn/gCd41Ws3USFubam4/images/datev_overview.svg?fit=max&auto=format&n=gCd41Ws3USFubam4&q=85&s=4ec2e0190d534d20c01ab67e383a8197" title="DATEV infrastructure" alt="Diagram showing overview of DATEV application infrastructure" width="1040" height="480" data-path="images/datev_overview.svg" />

## How to connect to DATEV Rechnungswesen

It is possible to create journal entries, suppliers and customers directly in DATEV Rechnungswesen through maesn's API.

<Steps>
  <Step title="Configure your integration in the maesn API">
    Since maesn has partnered with DATEV to help bring software companies to successful integrations quickly, the entire setup process is executed with maesn. There is no need to book consulting packages with DATEV.

    Everything from setting up client credentials and getting sandbox access, to getting your integration approved by DATEV is done by maesn.

    * Get in touch with your contact person at maesn to configure the API and DATEV OAuth client.

    If you are not sure who your technical contact is, do not hesitate to [reach out to us](https://www.maesn.com/contact).
  </Step>

  <Step title="Testing your integration in a production environment">
    To test your integration against a live production environment is both recommended and necessary, before offering the functionality to your customers.

    You will need an instance of DATEV Rechnungswesen with the subscriptions to the relevant services for your use case to run your integration in production.

    * Talk to us for advice on how to achieve this in a fast and cost-effective way!
  </Step>
</Steps>

However, creating journal entries, as well as performing a range of other operations, can also be done through [DATEV Unternehmen Online](/integrations/datev-unternehmen-online). In these cases, Unternehmen Online acts as an intermediary between the client (you) and DATEV Rechnungswesen.

Typically, data is uploaded to Unternehmen Online and the tax advisor can approve and amend the data, before submitting it to DATEV Rechnungswesen. This can be achieved through the "Belege bereitstellen"-feature in the Unternehmen Online UI.  However, as already mentioned, journal entries, customers and suppliers can be submitted directly to Rechnungswesen through this interface.

## Authenticate with the long access token

Provide your customer the long access token procedure to authenticate to DATEV Rechnungswesen. The token is valid for 2 years and can be used for authentication throughout that period to the API.
There are two ways to retrieve a long access token:

* Use our [**Interactive Authentication Flow**](/authentication#interactive-authentication-flow)
* Or manually execute each step for more control over the UI

### 🔁 Option 1: Interactive Authentication Flow

<Steps>
  <Step title="Authenticate to DATEV Rechnungswesen">
    * Log in to `datev-rewe-longtoken` using the `/auth` endpoint. Make sure to include the query parameter `environmentSelection=true` in the request.
  </Step>

  <Step title="Choose your Company">
    * From the list, select the target company for your API usage.
    * The selected company's ID is stored automatically — you do not need to send it in subsequent requests.
  </Step>

  <Step title="Retrieve the long token">
    * Click **"submit"**.
    * Accept the connection to your application to complete the process and retrieve your token.
  </Step>
</Steps>

### ⚙️ Option 2: Manual Token Retrieval

<Steps>
  <Step title="Authenticate to DATEV Rechnungswesen using the short token">
    * Log in to `datev-rewe` using the `/auth` endpoint.

    * Retrieve the Account key from the authentication response.
  </Step>

  <Step title="GET company ID">
    * Fetch the company list using the `Get Companies` endpoint.

    * From the list, select the target company to use for the API calls.
  </Step>

  <Step title="Authenticate to DATEV Unternehmen Online using the long token">
    * Authenticate again using the `/auth` endpoint, but this time with `datev-rewe-longtoken` target system, providing the chosen companyId as input.

    * Complete the authentication process.
  </Step>
</Steps>

**Warning:** The long token is only valid for API calls that include the specified company in the input.

## Data Retrieval

**TARGET\_SYSTEM:** `datev-rewe-export`

Data retrieval for Rechnungswesen is possible using the target system `datev-rewe-export`.
Please note that the authentication is only valid for 6 months due to DATEV constraints, and there is no option for a long-lived token.

Since each API call requires a company ID, we recommend using the interactive flow. This allows you to automatically select the company ID during authentication, which will then be used for subsequent API calls.

### 🔁 Option 1: Interactive Authentication Flow

<Steps>
  <Step title="Authenticate to DATEV Rechnungswesen Export ">
    * Log in to `datev-rewe-export` using the `/auth` endpoint. Make sure to include the query parameter `environmentSelection=true` in the request.
  </Step>

  <Step title="Choose your Company">
    * From the list, select the target company for your API usage.
    * The selected company's ID is stored automatically — you do not need to send it in subsequent requests.
  </Step>

  <Step title="Retrieve the token">
    * Click **"submit"**.
    * Accept the connection to your application to complete the process and retrieve your token.
  </Step>
</Steps>

### ⚙️ Option 2: Manual Company Selection

<Steps>
  <Step title="Authenticate to DATEV Rechnungswesen using the short token">
    * Log in to `datev-rewe` using the `/auth` endpoint.

    * Retrieve the Account key from the authentication response.
  </Step>

  <Step title="GET company ID">
    * Fetch the company list using the `Get Companies` endpoint.

    * From the list, select the target company to use for the API calls.
  </Step>

  <Step title="Authenticate to DATEV Rechnungswesen Export">
    * Authenticate again using the `/auth` endpoint, but this time with `datev-rewe-export` target system, providing the chosen companyId as input.

    * Complete the authentication process.
  </Step>
</Steps>
