Zum Hauptinhalt springen
PUT
/
accounting
/
accounts
/
{id}
cURL
curl -X PUT \
 /accounting/accounts/{id} \
 --header "Content-Type: application/json" \
 --header "Authorization: Bearer <token>" \
 --data '{
    "name": "",
    "number": ""
}'
import requests

url = "https://coreapi.io/accounting/accounts/{id}"

payload = {
"name": "<string>",
"number": "<string>",
"isAutomaticAccount": True,
"removeLegacyBuKey": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
number: '<string>',
isAutomaticAccount: true,
removeLegacyBuKey: true
})
};

fetch('https://coreapi.io/accounting/accounts/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://coreapi.io/accounting/accounts/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'number' => '<string>',
'isAutomaticAccount' => true,
'removeLegacyBuKey' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
{
  "id": "f3b3b3b3-3b3b-3b3b-3b3b-3b3b3b3b3b3b",
  "name": "Bankkonto",
  "number": "1200",
  "type": "revenueGermany",
  "isAutomaticAccount": true,
  "legacyBuKey": "40"
}

Autorisierungen

Authorization
string
header
erforderlich

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Pfadparameter

id
string
erforderlich

AccountingAccount identifier

Body

The updated AccountingAccount resource

name
string
erforderlich

The name of the account

number
string
erforderlich

The number of the account

isAutomaticAccount
boolean

Whether DATEV derives the tax itself (Automatikkonto). Optional; when omitted the current value is kept.

removeLegacyBuKey
boolean

Set to true to remove the fixed legacy Buchungsschlüssel and let Fynn derive the key per booking line again.

Antwort

AccountingAccount resource updated

id
object
read-only
Beispiel:

"f3b3b3b3-3b3b-3b3b-3b3b-3b3b3b3b3b3b"

name
string | null

Account name used for internal labeling.

Beispiel:

"Bankkonto"

number
string

Account number from your used skr 03 or skr 04 chart of accounts.

Beispiel:

"1200"

type
enum<string>
read-only

Type of account which references to the chart of accounts.

Verfügbare Optionen:
bankAccount,
ledgerAccount,
revenueGermany,
revenueGermanyReduced,
salesDeductionAccount,
revenueEurope,
revenueTaxFree,
bankFees,
passiveDeferral,
debtor,
paypal,
stripe,
sepaDebit,
goCardless
Beispiel:

"revenueGermany"

isAutomaticAccount
boolean

Whether DATEV derives the tax itself for this account (Automatikkonto). Revenue lines then carry no Buchungsschlüssel, PRAP lines carry key 40.

Beispiel:

true

legacyBuKey
string | null
read-only

Fixed legacy Buchungsschlüssel (Altbestand) migrated from a dot-notation account number. Read-only; can be removed but not set to a new value.

Beispiel:

"40"