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"
}Accounting
Update account
Updates account name and number. Adapt the account number to your chart of accounts.
Required permissions:accounting:accounts:writePUT
/
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
Body
application/jsontext/html
The updated AccountingAccount resource
Antwort
AccountingAccount resource updated
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"
War diese Seite hilfreich?