1

Authorize end user

Your end user must first authorize your application to access their data in DATEV Unternehmen Online through maesn Connect.

2

Get user info

Fetch the user info associated to your end users’s DATEV account using the GET /user-info endpoint. Display the retrieved information in your application’s UI as required by DATEV (see last step).

3

Get companies

Fetch all the companies associated to your end users’s DATEV account using the GET /companies endpoint. The user will need to select a company to proceed, as the company ID will be needed for subsequent steps.

4

Check company permissions

Verify that the selected company has the required permissions to create the specified document type for the given fiscal year and posting month in DATEV. Use the GET /check-client-permissions endpoint. If permissions are insufficient, prompt the user to choose a different fiscal year, posting month, or document type based on the response.

5

Create the document

Use the data retrieved from the previous step (e.g., jobId, fiscalYear, postingMonth, accountLength) to create the document in DATEV. Call the POST /create-invoices or /create-bills endpoint as appropriate.

6

Check status

Verify the status of the created documents using the GET /check-status endpoint. If the status is not processed successfully, retry the check after a few seconds.

7

Retrieve Protocol Details

Fetch detailed protocol information for the created documents using the GET /protocols endpoint.

8

Check DATEV general requirements

Review the DATEV interface requirements to ensure that your application complies with DATEV’s specifications.

Important Requirement from DATEV:

DO NOT: Generate a job Id for each individual invoice or bill.
DO: Create a single job Id for multiple invoices or bills in one batch. This approach minimizes the number of API calls and optimizes performance.

Optional:

1

Delete end user

If your user deletes their account, you may delete the end user from our API and revoke their token using the the POST /delete-end-users. This step ensures both actions are handled on the backend.