curl --request POST \
--url https://coreapi.io/api/invoices/credit-notes/{id}/settlement/preview \
--header 'Authorization: Bearer <token>'import requests
url = "https://coreapi.io/api/invoices/credit-notes/{id}/settlement/preview"
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/preview', 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/preview",
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": 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>"
}Preview the settlement of a credit note or cancellation
Plans the settlement of a credit note or cancellation that is not yet booked against its invoice, without booking anything. The rows: the document against its invoice (a cancellation by its whole open part, a credit note up to the invoice’s open amount), the rest of a credit note to the customer balance, the balance applied to the customer’s open invoices with the oldest due date first, and the customer balance left. Warnings mark what the checks would report afterwards. The same endpoint exists as /api/invoices/cancellations/{id}/settlement/preview.
Required permission: invoice:credit.
curl --request POST \
--url https://coreapi.io/api/invoices/credit-notes/{id}/settlement/preview \
--header 'Authorization: Bearer <token>'import requests
url = "https://coreapi.io/api/invoices/credit-notes/{id}/settlement/preview"
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/preview', 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/preview",
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": 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 settlement as rows. steps is empty and unsettledAmount 0.00 when the document is settled already.
Settlement of a credit note or cancellation against its invoice and the customer balance, as rows.
War diese Seite hilfreich?