Patch v3producers contracts charges and creditsinternal id
This API view allows to update charge/credit based on customer_contract_id and internal_id.
NOTE: if you update charge/credit that already was applied, this will not change bill automatically. You have to cancel original bill and recreate it with new data.
curl --request PATCH \
--url https://api.lumenaza.de/v3/producers/{userID}/contracts/{contractID}/charges_and_credits/internal_id/{internalId}/ \
--header 'Content-Type: application/json' \
--data '
{
"amount_cent": 1,
"is_gross": true,
"due_date": "2023-12-25",
"no_of_executions": 2,
"input_id": "<string>",
"category": "<string>",
"display_name": "<string>",
"explanation_text": "<string>",
"bookkeeping_account": "<string>"
}
'import requests
url = "https://api.lumenaza.de/v3/producers/{userID}/contracts/{contractID}/charges_and_credits/internal_id/{internalId}/"
payload = {
"amount_cent": 1,
"is_gross": True,
"due_date": "2023-12-25",
"no_of_executions": 2,
"input_id": "<string>",
"category": "<string>",
"display_name": "<string>",
"explanation_text": "<string>",
"bookkeeping_account": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
amount_cent: 1,
is_gross: true,
due_date: '2023-12-25',
no_of_executions: 2,
input_id: '<string>',
category: '<string>',
display_name: '<string>',
explanation_text: '<string>',
bookkeeping_account: '<string>'
})
};
fetch('https://api.lumenaza.de/v3/producers/{userID}/contracts/{contractID}/charges_and_credits/internal_id/{internalId}/', 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://api.lumenaza.de/v3/producers/{userID}/contracts/{contractID}/charges_and_credits/internal_id/{internalId}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'amount_cent' => 1,
'is_gross' => true,
'due_date' => '2023-12-25',
'no_of_executions' => 2,
'input_id' => '<string>',
'category' => '<string>',
'display_name' => '<string>',
'explanation_text' => '<string>',
'bookkeeping_account' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.lumenaza.de/v3/producers/{userID}/contracts/{contractID}/charges_and_credits/internal_id/{internalId}/"
payload := strings.NewReader("{\n \"amount_cent\": 1,\n \"is_gross\": true,\n \"due_date\": \"2023-12-25\",\n \"no_of_executions\": 2,\n \"input_id\": \"<string>\",\n \"category\": \"<string>\",\n \"display_name\": \"<string>\",\n \"explanation_text\": \"<string>\",\n \"bookkeeping_account\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.lumenaza.de/v3/producers/{userID}/contracts/{contractID}/charges_and_credits/internal_id/{internalId}/")
.header("Content-Type", "application/json")
.body("{\n \"amount_cent\": 1,\n \"is_gross\": true,\n \"due_date\": \"2023-12-25\",\n \"no_of_executions\": 2,\n \"input_id\": \"<string>\",\n \"category\": \"<string>\",\n \"display_name\": \"<string>\",\n \"explanation_text\": \"<string>\",\n \"bookkeeping_account\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lumenaza.de/v3/producers/{userID}/contracts/{contractID}/charges_and_credits/internal_id/{internalId}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount_cent\": 1,\n \"is_gross\": true,\n \"due_date\": \"2023-12-25\",\n \"no_of_executions\": 2,\n \"input_id\": \"<string>\",\n \"category\": \"<string>\",\n \"display_name\": \"<string>\",\n \"explanation_text\": \"<string>\",\n \"bookkeeping_account\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"type_of_transaction": "credit",
"amount_cent": 1,
"is_gross": true,
"vat_type": "normal",
"due_date": "2023-12-25",
"input_id": "<string>",
"internal_id": "<string>",
"contract_id": "<string>",
"category": "<string>",
"display_name": "<string>",
"salespartner": "<string>",
"explanation_text": "<string>",
"bookkeeping_account": "<string>"
}Body
Whether the amount shall be charged or credited towards the customers.
credit- creditcharge- charge
credit, charge Monetary Amount in cent. For example "1000" for 10,00 EUR
x >= 0Identifier for whether it is a net (excl. VAT) or gross (incl. VAT) amount
VAT rate for normal is 19% and reduced is 7%. In case of vat changes, the value, which is valid at the due date, will be used.
normal- normalreduced- reduced
normal, reduced Defines which customer bill will include the submitted amount: the bill which covers a billing period including this due_date will contain the submitted amount.
In case of recurring payments this field defines how many times the submitted amount shall beexecuted. The unit (months, years) is defined in the field execution_cycle. If left empty, the value defaults to 1 and the amount is only executed once.
x >= 1In case the no_of_executions has been set to a value greater than 1, this field is used to define the frequency of the executions.
month- monthyear- year
month, year Please submit a unique identifier per contract ID
128Describes the nature of the submitted amount, e. g. "Bonus", and is used to group values of the same category on the customer facing invoice.
40Display name which is exposed on the customer invoice
128Description text explaining the context of the amount. Its displayed on the customer invoice
The bookkeeping account for this transaction, which will be reported back to you in the accounting file. In case of DATEV it is the contra account (Gegenkonto).
128Response
Whether the amount shall be charged or credited towards the customers.
credit- creditcharge- charge
credit, charge Monetary Amount in cent. For example "1000" for 10,00 EUR
x >= 0Identifier for whether it is a net (excl. VAT) or gross (incl. VAT) amount
VAT rate for normal is 19% and reduced is 7%. In case of vat changes, the value, which is valid at the due date, will be used.
normal- normalreduced- reduced
normal, reduced Defines which customer bill will include the submitted amount: the bill which covers a billing period including this due_date will contain the submitted amount.
Please submit a unique identifier per contract ID
128150Describes the nature of the submitted amount, e. g. "Bonus", and is used to group values of the same category on the customer facing invoice.
40Display name which is exposed on the customer invoice
128Description text explaining the context of the amount. Its displayed on the customer invoice
The bookkeeping account for this transaction, which will be reported back to you in the accounting file. In case of DATEV it is the contra account (Gegenkonto).
128curl --request PATCH \
--url https://api.lumenaza.de/v3/producers/{userID}/contracts/{contractID}/charges_and_credits/internal_id/{internalId}/ \
--header 'Content-Type: application/json' \
--data '
{
"amount_cent": 1,
"is_gross": true,
"due_date": "2023-12-25",
"no_of_executions": 2,
"input_id": "<string>",
"category": "<string>",
"display_name": "<string>",
"explanation_text": "<string>",
"bookkeeping_account": "<string>"
}
'import requests
url = "https://api.lumenaza.de/v3/producers/{userID}/contracts/{contractID}/charges_and_credits/internal_id/{internalId}/"
payload = {
"amount_cent": 1,
"is_gross": True,
"due_date": "2023-12-25",
"no_of_executions": 2,
"input_id": "<string>",
"category": "<string>",
"display_name": "<string>",
"explanation_text": "<string>",
"bookkeeping_account": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
amount_cent: 1,
is_gross: true,
due_date: '2023-12-25',
no_of_executions: 2,
input_id: '<string>',
category: '<string>',
display_name: '<string>',
explanation_text: '<string>',
bookkeeping_account: '<string>'
})
};
fetch('https://api.lumenaza.de/v3/producers/{userID}/contracts/{contractID}/charges_and_credits/internal_id/{internalId}/', 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://api.lumenaza.de/v3/producers/{userID}/contracts/{contractID}/charges_and_credits/internal_id/{internalId}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'amount_cent' => 1,
'is_gross' => true,
'due_date' => '2023-12-25',
'no_of_executions' => 2,
'input_id' => '<string>',
'category' => '<string>',
'display_name' => '<string>',
'explanation_text' => '<string>',
'bookkeeping_account' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.lumenaza.de/v3/producers/{userID}/contracts/{contractID}/charges_and_credits/internal_id/{internalId}/"
payload := strings.NewReader("{\n \"amount_cent\": 1,\n \"is_gross\": true,\n \"due_date\": \"2023-12-25\",\n \"no_of_executions\": 2,\n \"input_id\": \"<string>\",\n \"category\": \"<string>\",\n \"display_name\": \"<string>\",\n \"explanation_text\": \"<string>\",\n \"bookkeeping_account\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.lumenaza.de/v3/producers/{userID}/contracts/{contractID}/charges_and_credits/internal_id/{internalId}/")
.header("Content-Type", "application/json")
.body("{\n \"amount_cent\": 1,\n \"is_gross\": true,\n \"due_date\": \"2023-12-25\",\n \"no_of_executions\": 2,\n \"input_id\": \"<string>\",\n \"category\": \"<string>\",\n \"display_name\": \"<string>\",\n \"explanation_text\": \"<string>\",\n \"bookkeeping_account\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lumenaza.de/v3/producers/{userID}/contracts/{contractID}/charges_and_credits/internal_id/{internalId}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount_cent\": 1,\n \"is_gross\": true,\n \"due_date\": \"2023-12-25\",\n \"no_of_executions\": 2,\n \"input_id\": \"<string>\",\n \"category\": \"<string>\",\n \"display_name\": \"<string>\",\n \"explanation_text\": \"<string>\",\n \"bookkeeping_account\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"type_of_transaction": "credit",
"amount_cent": 1,
"is_gross": true,
"vat_type": "normal",
"due_date": "2023-12-25",
"input_id": "<string>",
"internal_id": "<string>",
"contract_id": "<string>",
"category": "<string>",
"display_name": "<string>",
"salespartner": "<string>",
"explanation_text": "<string>",
"bookkeeping_account": "<string>"
}
