Skip to main content

Code Beispiele

Schnell, effizient, sicher

So einfach kannst du Daten aus DATEV in der Kanzlei abrufen. Eine vollständige Dokumentation von DATEVconnect findest du unter developer.datev.de. Dort hast du die Möglichkeit, mit Hilfe eines kostenfreien Accounts auf die Dokumentation zuzugreifen.

Hier ein paar Codebeispiele:

GET Mandentenliste

Mit dieser Abfrage kann eine Liste aller Mandanten aus DATEV Rechnungswesen gelesen werden.

Request

curl -X GET \
https://api.cloudgateway.riecken.io/datev/api/accounting/v1/clients \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Basic {username}:{password}'

Response

[
    {
        "name": "Musterholz GmbH",
        "number": 99991,
        "id": "ad547bff-7e0f-45d4-86d8-c51945745172"
    },
    {
        "name": "Muster & Test AT GmbH",
        "number": 99992,
        "id": "c0f42ea7-c7ac-4710-8236-f0b9ae85f310"
    }
]

Request

curl -X GET \
https://api.cloudgateway.riecken.io/datev/api/accounting/v1/clients/c0f42ea7-c7ac-4710-8236-f0b9ae85f310/fiscal-years \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Basic {username}:{password}'

Response

[
    {
        "account_length": 4,
        "account_system": 7,
        "advance_turnover_tax_return": "month",
        "begin": "2014-01-01T00:00:00.000+01:00",
        "client_number": 55007,
        "consultant_number": 228531,
        "cost_length": 8,
        "creditor_term_of_payment_id": 3,
        "currency_code": "EUR",
        "end": "2014-12-31T00:00:00.000+01:00",
        "is_invoice_date_check_on": true,
        "is_locked": false,
        "is_using_delivery_date": false,
        "is_using_individual_referencesystem": false,
        "is_using_receivable_type": false,
        "is_using_referencesystem": false,
        "national_right": "AT",
        "taxation_method": "taxation_based_on_value_of_services_rendered",
        "id": "20140101"
    },
    {
        "account_length": 4,
        "account_system": 7,
        "advance_turnover_tax_return": "month",
        "begin": "2015-01-01T00:00:00.000+01:00",
        "client_number": 55007,
        "consultant_number": 228531,
        "cost_length": 8,
        "creditor_term_of_payment_id": 3,
        "currency_code": "EUR",
        "end": "2015-12-31T00:00:00.000+01:00",
        "is_invoice_date_check_on": true,
        "is_locked": false,
        "is_using_delivery_date": false,
        "is_using_individual_referencesystem": false,
        "is_using_receivable_type": false,
        "is_using_referencesystem": false,
        "national_right": "AT",
        "taxation_method": "taxation_based_on_value_of_services_rendered",
        "id": "20150101"
    },
    {
        "account_length": 4,
        "account_system": 7,
        "advance_turnover_tax_return": "month",
        "begin": "2016-01-01T00:00:00.000+01:00",
        "client_number": 55007,
        "consultant_number": 228531,
        "cost_length": 8,
        "creditor_term_of_payment_id": 3,
        "currency_code": "EUR",
        "end": "2016-12-31T00:00:00.000+01:00",
        "is_invoice_date_check_on": true,
        "is_locked": false,
        "is_using_delivery_date": false,
        "is_using_individual_referencesystem": false,
        "is_using_receivable_type": false,
        "is_using_referencesystem": false,
        "national_right": "AT",
        "taxation_method": "taxation_based_on_value_of_services_rendered",
        "id": "20160101"
    },
    {
        "account_length": 4,
        "account_system": 7,
        "advance_turnover_tax_return": "month",
        "begin": "2017-01-01T00:00:00.000+01:00",
        "client_number": 55007,
        "consultant_number": 228531,
        "cost_length": 8,
        "creditor_term_of_payment_id": 3,
        "currency_code": "EUR",
        "end": "2017-12-31T00:00:00.000+01:00",
        "is_invoice_date_check_on": true,
        "is_locked": false,
        "is_using_delivery_date": false,
        "is_using_individual_referencesystem": false,
        "is_using_receivable_type": false,
        "is_using_referencesystem": false,
        "national_right": "AT",
        "taxation_method": "taxation_based_on_value_of_services_rendered",
        "id": "20170101"
    },
    {
        "account_length": 4,
        "account_system": 7,
        "advance_turnover_tax_return": "month",
        "begin": "2018-01-01T00:00:00.000+01:00",
        "client_number": 55007,
        "consultant_number": 228531,
        "cost_length": 8,
        "creditor_term_of_payment_id": 3,
        "currency_code": "EUR",
        "end": "2018-12-31T00:00:00.000+01:00",
        "is_invoice_date_check_on": true,
        "is_locked": false,
        "is_using_delivery_date": false,
        "is_using_individual_referencesystem": false,
        "is_using_receivable_type": false,
        "is_using_referencesystem": false,
        "national_right": "AT",
        "taxation_method": "taxation_based_on_value_of_services_rendered",
        "id": "20180101"
    }
]

GET Wirtschaftsjahre

Mit dieser Abfrage werden für die Muster & Test AT GmbH alle Wirtschaftsjahre ausgelesen.

GET Debitoren

Mit dieser Abfrage werden alle Debitorenstammdaten aus dem Rechnungswesenbestand des Wirtschaftsjahres 2018 der Muster & Test AT GmbH ausgelesen.

Request

curl -X GET \
https://api.cloudgateway.riecken.io/datev/api/accounting/v1/clients/c0f42ea7-c7ac-4710-8236-f0b9ae85f310/fiscal-years/20180101/debitors \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Basic {username}:{password}'

Response

[
    {
        "account_number": 100000000,
        "addressee_id": "1286edcc-e270-4144-b123-1c7b37c5fa68",
        "business_partner_relation_id": "00000000-0000-0000-0000-000000000000",
        "caption": "Möbel Testgruber",
        "correspondence_title": "Firma",
        "date_last_modification": "2017-09-27T10:31:20.513+02:00",
        "eu_vat_id_country_code": "AT",
        "eu_vat_id_number": "U28640101",
        "is_business_partner_active": true,
        "is_organization_business_partner": false,
        "legal_entity_type": "legal_person",
        "short_name": "Möbel Testgrube",
        "id": "100000000"
    },
    {
        "account_number": 100010000,
        "addressee_id": "4b7ebcb3-e2ad-4222-8e8e-2ed481df91c1",
        "business_partner_relation_id": "00000000-0000-0000-0000-000000000000",
        "caption": "Hans Musterkunde GmbH",
        "correspondence_title": "Firma",
        "date_last_modification": "2015-10-15T14:38:11.347+02:00",
        "eu_vat_id_country_code": "AT",
        "eu_vat_id_number": "U66169549",
        "is_business_partner_active": true,
        "is_organization_business_partner": false,
        "legal_entity_type": "legal_person",
        "short_name": "Hans Musterkund",
        "id": "100010000"
    },
    {
        "account_number": 100020000,
        "addressee_id": "aed82524-d7ab-48eb-9b25-946f2403ddb7",
        "business_partner_relation_id": "00000000-0000-0000-0000-000000000000",
        "caption": "Seltentest GmbH",
        "correspondence_title": "Firma",
        "date_last_modification": "2015-10-15T14:16:52.007+02:00",
        "eu_vat_id_country_code": "AT",
        "eu_vat_id_number": "U69451737",
        "is_business_partner_active": true,
        "is_organization_business_partner": false,
        "legal_entity_type": "legal_person",
        "short_name": "Seltentest GmbH",
        "id": "100020000"
    },
    {
        "account_number": 100030000,
        "addressee_id": "db7db462-6edd-40e0-9318-a3737c52cdc1",
        "business_partner_relation_id": "00000000-0000-0000-0000-000000000000",
        "caption": "Andreas Riedtest",
        "correspondence_title": "Herrn",
        "date_last_modification": "2015-10-15T14:22:39.437+02:00",
        "eu_vat_id_country_code": "AT",
        "eu_vat_id_number": "U67693926",
        "is_business_partner_active": true,
        "is_organization_business_partner": false,
        "legal_entity_type": "legal_person",
        "short_name": "Andreas Riedtes",
        "id": "100030000"
    },
    {
        "account_number": 100040000,
        "addressee_id": "be08fdf6-feda-4031-8397-d5b7e5f87d01",
        "business_partner_relation_id": "00000000-0000-0000-0000-000000000000",
        "caption": "Maier + Maiertest GmbH",
        "date_last_modification": "2017-09-27T10:31:20.547+02:00",
        "is_business_partner_active": true,
        "is_organization_business_partner": false,
        "legal_entity_type": "legal_person",
        "short_name": "Maier + Maietes",
        "id": "100040000"
    },
    {
        "account_number": 100050000,
        "addressee_id": "f87c7900-fb0b-407c-b120-7c934ccaa4d4",
       "business_partner_relation_id": "00000000-0000-0000-0000-000000000000",
        "caption": "BIO Markt Favoritenbeispiel GmbH",
        "date_last_modification": "2017-09-27T10:31:20.563+02:00",
        "is_business_partner_active": true,
        "is_organization_business_partner": false,
        "legal_entity_type": "legal_person",
        "short_name": "BIO Markt Favor",
        "id": "100050000"
    },
    {
        "account_number": 100060000,
        "addressee_id": "ad4b8603-7ac6-4a5d-8c05-e01d46b883ef",
        "business_partner_relation_id": "00000000-0000-0000-0000-000000000000",
        "caption": "Kautztest Spielwaren GmbH",
        "date_last_modification": "2017-09-27T10:31:20.563+02:00",
        "is_business_partner_active": true,
        "is_organization_business_partner": false,
        "legal_entity_type": "legal_person",
        "short_name": "Kautz Spielware",
        "id": "100060000"
    },
    {
        "account_number": 100070000,
        "addressee_id": "da3732bd-3900-477f-94ae-c4a37b0656a7",
        "business_partner_relation_id": "00000000-0000-0000-0000-000000000000",
        "caption": "Silbernemuster Kugel & Söhne GmbH",
        "date_last_modification": "2017-09-27T10:31:20.563+02:00",
        "is_business_partner_active": true,
        "is_organization_business_partner": false,
        "legal_entity_type": "legal_person",
        "short_name": "Silberne Kugel",
        "id": "100070000"
    },
    {
        "account_number": 100080000,
        "addressee_id": "901a7187-fa3e-48d9-8328-7f10232579ec",
        "business_partner_relation_id": "00000000-0000-0000-0000-000000000000",
        "caption": "Freytest GmbH",
        "date_last_modification": "2017-09-27T10:31:20.577+02:00",
        "is_business_partner_active": true,
        "is_organization_business_partner": false,
        "legal_entity_type": "legal_person",
        "short_name": "Freytest",
        "id": "100080000"
    },
    {
        "account_number": 100090000,
        "addressee_id": "63259a06-b719-4da6-85cc-59bb71b2fd57",
        "business_partner_relation_id": "00000000-0000-0000-0000-000000000000",
        "caption": "Schulungscenter Rennweg GmbH",
        "date_last_modification": "2015-10-15T14:39:06.187+02:00",
        "is_business_partner_active": true,
        "is_organization_business_partner": false,
        "legal_entity_type": "legal_person",
        "short_name": "Schulungscenter",
        "id": "100090000"
    },
    {
        "account_number": 100100000,
        "addressee_id": "fa917757-4958-46d7-add3-2afbf8cf9bd4",
        "business_partner_relation_id": "00000000-0000-0000-0000-000000000000",
        "caption": "Kunst und Kulturverein",
        "date_last_modification": "2017-09-27T10:31:20.593+02:00",
        "is_business_partner_active": true,
        "is_organization_business_partner": false,
        "legal_entity_type": "legal_person",
        "short_name": "Kunst und Kultu",
        "id": "100100000"
    },
    {
        "account_number": 100110000,
        "addressee_id": "a20b7f1b-f4dd-4e0a-b81a-ce9a744ec9ae",
        "business_partner_relation_id": "00000000-0000-0000-0000-000000000000",
        "caption": "Ping.Pongbeispiel Gmbh",
        "date_last_modification": "2017-09-27T10:31:20.593+02:00",
        "is_business_partner_active": true,
        "is_organization_business_partner": false,
        "legal_entity_type": "legal_person",
        "short_name": "Ping.Pongbeisp",
        "id": "100110000"
    },
    {
        "account_number": 100120000,
        "addressee_id": "1fe54280-f47a-4e1a-b94d-74ab98ef195c",
        "business_partner_relation_id": "00000000-0000-0000-0000-000000000000",
        "caption": "Muster & Co GmbH",
        "date_last_modification": "2017-09-27T10:31:20.593+02:00",
        "is_business_partner_active": true,
        "is_organization_business_partner": false,
        "legal_entity_type": "legal_person",
        "short_name": "Muster & Co Gmb",
        "id": "100120000"
    },
    {
        "account_number": 100130000,
        "addressee_id": "1237bf6b-2f2f-4028-924d-ce1448a522be",
        "business_partner_relation_id": "00000000-0000-0000-0000-000000000000",
        "caption": "Kornblumentest Freihandels GmbH",
        "date_last_modification": "2017-09-27T10:31:20.610+02:00",
        "is_business_partner_active": true,
        "is_organization_business_partner": false,
        "legal_entity_type": "legal_person",
        "short_name": "Kornblumen Frei",
        "id": "100130000"
    },
    {
        "account_number": 100140000,
        "addressee_id": "ba7d2513-cc15-4f0a-b5f6-4c72afea3721",
        "business_partner_relation_id": "00000000-0000-0000-0000-000000000000",
        "caption": "Stehtest & Sitz Möbelmanufaktur GmnbH",
        "date_last_modification": "2017-09-27T10:31:20.610+02:00",
        "is_business_partner_active": true,
        "is_organization_business_partner": false,
        "legal_entity_type": "legal_person",
        "short_name": "Stehtest & Sitz",
        "id": "100140000"
    },
    {
        "account_number": 100150000,
        "addressee_id": "3b192793-814a-4ac8-a457-816cc9a1aa16",
        "business_partner_relation_id": "00000000-0000-0000-0000-000000000000",
        "caption": "Farben und Musterlacke GmbH",
        "correspondence_title": "Firma",
        "date_last_modification": "2017-09-27T10:31:20.623+02:00",
        "eu_vat_id_country_code": "AT",
        "eu_vat_id_number": "U31500505",
        "is_business_partner_active": true,
        "is_organization_business_partner": false,
        "legal_entity_type": "legal_person",
        "short_name": "Farben und Must",
        "id": "100150000"
    },
    {
        "account_number": 100160000,
        "addressee_id": "91a8f5b4-a132-46ad-abdd-afdd72c04973",
        "business_partner_relation_id": "00000000-0000-0000-0000-000000000000",
        "caption": "Testbieg & Brech Holzmann GmbH",
        "correspondence_title": "Firma",
        "date_last_modification": "2017-09-27T10:31:20.623+02:00",
        "eu_vat_id_country_code": "AT",
        "eu_vat_id_number": "U50347806",
        "is_business_partner_active": true,
        "is_organization_business_partner": false,
        "legal_entity_type": "legal_person",
        "short_name": "Testbieg & Br",
        "id": "100160000"
    },
    {
        "account_number": 101000000,
        "addressee_id": "fec461a4-a70d-4b1a-bc3a-a635a0ebb7cf",
        "business_partner_relation_id": "00000000-0000-0000-0000-000000000000",
        "caption": "Einrichtungshaus Finkmuster",
        "correspondence_title": "Firma",
        "date_last_modification": "2017-09-27T10:31:20.640+02:00",
        "is_business_partner_active": true,
        "is_organization_business_partner": false,
        "legal_entity_type": "legal_person",
        "short_name": "Finkmuster",
        "id": "101000000"
    },
    {
        "account_number": 102000000,
        "addressee_id": "e8dadb15-c816-491e-8ff7-34262506b0d1",
        "business_partner_relation_id": "00000000-0000-0000-0000-000000000000",
        "caption": "Gärtnerei Beispielgrün",
        "correspondence_title": "Firma",
        "date_last_modification": "2015-12-01T10:20:15.693+01:00",
        "eu_vat_id_country_code": "AT",
        "eu_vat_id_number": "U27846506",
        "is_business_partner_active": true,
        "is_organization_business_partner": false,
        "legal_entity_type": "legal_person",
        "short_name": "Gärtnerei Beisp",
        "id": "102000000"
    },
    {
        "account_number": 103000000,
        "addressee_id": "6d59be6b-9de3-470b-af86-88cec23c1732",
        "business_partner_relation_id": "00000000-0000-0000-0000-000000000000",
        "caption": "Bautestmarkt Holzhauser",
        "correspondence_title": "Firma",
        "date_last_modification": "2015-12-01T09:10:30.957+01:00",
        "eu_vat_id_country_code": "AT",
        "eu_vat_id_number": "U41090902",
        "is_business_partner_active": true,
        "is_organization_business_partner": false,
        "legal_entity_type": "legal_person",
        "short_name": "Bautestmarkt Ho",
        "id": "103000000"
    }
]