curl --request POST \
--url https://coreapi.io/api/invoices/credit-notes/{id}/settlement \
--header 'Authorization: Bearer <token>'import requests
url = "https://coreapi.io/api/invoices/credit-notes/{id}/settlement"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://coreapi.io/api/invoices/credit-notes/{id}/settlement', 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/api/invoices/credit-notes/{id}/settlement",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"creditDocument": {
"kind": "document",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"number": "GS-7019-2025",
"documentType": "invoice",
"label": "RE-3843-2025"
},
"currency": "EUR",
"unsettledAmount": "1943.27",
"steps": [
{
"from": {
"kind": "document",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"number": "GS-7019-2025",
"documentType": "invoice",
"label": "RE-3843-2025"
},
"to": {
"kind": "document",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"number": "GS-7019-2025",
"documentType": "invoice",
"label": "RE-3843-2025"
},
"amount": "1943.27",
"tags": [
{
"key": "already_paid",
"label": "bereits bezahlt",
"warning": true
}
]
}
],
"remainingBalance": "174.93",
"remainingBalanceTags": [
{
"key": "already_paid",
"label": "bereits bezahlt",
"warning": true
}
],
"warnings": [
{
"key": "already_paid",
"label": "bereits bezahlt",
"warning": true
}
],
"executable": true,
"executed": true
}{
"status": 409,
"type": "ANALYTICS_FINANCE__PACK_WITHOUT_SNAPSHOT",
"title": "An error occurred",
"detail": "<string>"
}{
"status": 409,
"type": "ANALYTICS_FINANCE__PACK_WITHOUT_SNAPSHOT",
"title": "An error occurred",
"detail": "<string>"
}{
"status": 422,
"type": "https://tools.ietf.org/html/rfc2616#section-10",
"violations": [
{
"propertyPath": "to",
"message": "Der Zeitraum darf höchstens 36 Monate umfassen.",
"code": "analytics.mrr_financials.range_too_long"
}
],
"title": "Validation Failed",
"detail": "<string>"
}Settle a credit note or cancellation
Books the settlement the preview shows, in one transaction: a waiting refund of the credit note is cancelled, the document is booked against its invoice (a cancellation adjustment on the invoice; for a credit note also on the credit note), the rest of a credit note goes to the customer balance and is applied to the customer’s open invoices with the oldest due date first. Every touched document gets an activity entry. No accounting posting is written. A second call finds nothing to settle and returns executed: false. The same endpoint exists as /api/invoices/cancellations/{id}/settlement.
Required permission: invoice:credit.
curl --request POST \
--url https://coreapi.io/api/invoices/credit-notes/{id}/settlement \
--header 'Authorization: Bearer <token>'import requests
url = "https://coreapi.io/api/invoices/credit-notes/{id}/settlement"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://coreapi.io/api/invoices/credit-notes/{id}/settlement', 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/api/invoices/credit-notes/{id}/settlement",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"creditDocument": {
"kind": "document",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"number": "GS-7019-2025",
"documentType": "invoice",
"label": "RE-3843-2025"
},
"currency": "EUR",
"unsettledAmount": "1943.27",
"steps": [
{
"from": {
"kind": "document",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"number": "GS-7019-2025",
"documentType": "invoice",
"label": "RE-3843-2025"
},
"to": {
"kind": "document",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"number": "GS-7019-2025",
"documentType": "invoice",
"label": "RE-3843-2025"
},
"amount": "1943.27",
"tags": [
{
"key": "already_paid",
"label": "bereits bezahlt",
"warning": true
}
]
}
],
"remainingBalance": "174.93",
"remainingBalanceTags": [
{
"key": "already_paid",
"label": "bereits bezahlt",
"warning": true
}
],
"warnings": [
{
"key": "already_paid",
"label": "bereits bezahlt",
"warning": true
}
],
"executable": true,
"executed": true
}{
"status": 409,
"type": "ANALYTICS_FINANCE__PACK_WITHOUT_SNAPSHOT",
"title": "An error occurred",
"detail": "<string>"
}{
"status": 409,
"type": "ANALYTICS_FINANCE__PACK_WITHOUT_SNAPSHOT",
"title": "An error occurred",
"detail": "<string>"
}{
"status": 422,
"type": "https://tools.ietf.org/html/rfc2616#section-10",
"violations": [
{
"propertyPath": "to",
"message": "Der Zeitraum darf höchstens 36 Monate umfassen.",
"code": "analytics.mrr_financials.range_too_long"
}
],
"title": "Validation Failed",
"detail": "<string>"
}Autorisierungen
Pfadparameter
Antwort
The booked rows (executed: true), or the unchanged plan when nothing was left to settle (executed: false).
Settlement of a credit note or cancellation against its invoice and the customer balance, as rows.
War diese Seite hilfreich?