Ausgaben
Mit diesen Methoden pflegst du die Ausgaben deines Kontos: Eingangsrechnungen, Quittungen und Gutschriften deiner Lieferanten, mit ihren Zahlungen und ihrem Beleg.
Die Methoden brauchen die Erweiterung Ausgaben. Ist sie für dein Konto nicht aktiv, antwortet jede von ihnen mit 403. Was sich nicht so speichern lässt, wie du es sendest, wird mit dem Grund abgelehnt: Nichts wird stillschweigend gekürzt oder weggelassen. Die Längen zählen in der gespeicherten Form: billware speichert Text wie der Kundenbereich, dort belegt & fünf Zeichen, < und > je vier, " und ' je sechs.
expense.create
Legt eine neue Ausgabe an.Daten
| Felder | Beschreibung | Erlaubte Werte | Standard |
|---|---|---|---|
| price Pflicht | Nettobetrag der Ausgabe. Negativ für eine Gutschrift des Lieferanten: Sie gilt als bezahlt, sobald der Lieferant das Geld erstattet hat. | Float |
|
| tax_rate Pflicht | Steuersatz in Prozent, von 0 bis 99.9999. |
Float |
|
| origin Pflicht | Woher die Leistung kommt. | "domestic" Inland "eu" EU-Ausland "other" Drittland |
|
| date_invoice | Belegdatum. Formate: JJJJ-MM-TT, JJJJ-MM-TT HH:MM:SS oder ISO 8601 (z. B. 2026-10-05T09:30:00+02:00). Ohne Angabe einer Zeitzone gilt die Zeitzone deines Kontos. |
String |
|
| date_due | Fälligkeit, in denselben Formaten wie date_invoice. |
String |
|
| reference_nr | Belegnummer des Lieferanten, höchstens 64 Zeichen. | String |
"" |
| expense_nr | Ausgabennummer, höchstens 32 Zeichen. Sie darf im Konto nur einmal vorkommen. Ohne Angabe vergibt billware die nächste Nummer deines Nummernkreises. | String |
Generated Number |
| user_note | Notiz, höchstens 1024 Zeichen. | String |
"" |
| external_ident | Kennung der Ausgabe in deinem System, höchstens 512 Zeichen. Nach ihr kannst du in expense.list filtern. | String |
"" |
| expense_type | Quelle der Ausgabe, höchstens 32 Zeichen, z. B. der Name deines Systems. | String |
"billware" |
| supplier_ident | Kennung eines Lieferanten deines Kontos, siehe Lieferanten. | String |
|
| account_ident | Kennung eines Buchungskontos deines Kontos. Du findest sie in der Antwort von expense.read unter account. |
String |
|
| expense_category_ident | Kennung der Kategorie, siehe Kategorien. | String |
|
| write_off_years | Nutzungsdauer in Jahren, von 1 bis 50. Zählt nur bei Kategorien für Abschreibungen (AfA). |
Integer |
5 |
Codebeispiele
# Get your API credentials from your billware customer area
API_APPID="your-app-id"
API_SECRET="your-api-secret"
PAYLOAD='{"price":46.72,"tax_rate":19,"origin":"domestic","date_invoice":"2026-10-05","date_due":"2026-10-19","reference_nr":"RE-2026-0815","user_note":"Toner und Papier","external_ident":"TX-5001","supplier_ident":"ckt8w78bfmj54054","expense_category_ident":"306820h1R33790Ap"}'
# The HMAC is calculated over the exact request body that is sent
HMAC=$(printf '%s' "$PAYLOAD" | openssl dgst -sha256 -hmac "$API_SECRET" -binary | base64)
curl -X POST "https://www.billware.de/api/v1" \
-H "X-Bw-Hmac: $API_APPID:$HMAC" \
-H "X-Bw-Method: expense.create" \
-H "Content-Type: application/json" \
-d "$PAYLOAD"<?php
// Get your API credentials from your billware customer area
$apiAppId = 'your-app-id';
$apiSecret = 'your-api-secret';
$payload = json_encode([
'price' => 46.72,
'tax_rate' => 19,
'origin' => 'domestic',
'date_invoice' => '2026-10-05',
'date_due' => '2026-10-19',
'reference_nr' => 'RE-2026-0815',
'user_note' => 'Toner und Papier',
'external_ident' => 'TX-5001',
'supplier_ident' => 'ckt8w78bfmj54054',
'expense_category_ident' => '306820h1R33790Ap',
]);
// The HMAC is calculated over the exact request body that is sent
$hmac = base64_encode(hash_hmac('sha256', $payload, $apiSecret, true));
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://www.billware.de/api/v1',
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $payload,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Bw-Hmac: '.$apiAppId.':'.$hmac,
'X-Bw-Method: expense.create',
'Content-Type: application/json',
],
]);
$response = curl_exec($curl);
curl_close($curl);
print_r(json_decode($response, true));import crypto from 'node:crypto';
// Get your API credentials from your billware customer area
const apiAppId = 'your-app-id';
const apiSecret = 'your-api-secret';
const payload = JSON.stringify({
"price": 46.72,
"tax_rate": 19,
"origin": "domestic",
"date_invoice": "2026-10-05",
"date_due": "2026-10-19",
"reference_nr": "RE-2026-0815",
"user_note": "Toner und Papier",
"external_ident": "TX-5001",
"supplier_ident": "ckt8w78bfmj54054",
"expense_category_ident": "306820h1R33790Ap"
});
// The HMAC is calculated over the exact request body that is sent
const hmac = crypto.createHmac('sha256', apiSecret).update(payload).digest('base64');
const response = await fetch('https://www.billware.de/api/v1', {
method: 'POST',
headers: {
'X-Bw-Hmac': `${apiAppId}:${hmac}`,
'X-Bw-Method': 'expense.create',
'Content-Type': 'application/json'
},
body: payload
});
console.log(await response.json());import base64
import hashlib
import hmac
import json
import requests
# Get your API credentials from your billware customer area
api_appid = "your-app-id"
api_secret = "your-api-secret"
payload = json.dumps({
"price": 46.72,
"tax_rate": 19,
"origin": "domestic",
"date_invoice": "2026-10-05",
"date_due": "2026-10-19",
"reference_nr": "RE-2026-0815",
"user_note": "Toner und Papier",
"external_ident": "TX-5001",
"supplier_ident": "ckt8w78bfmj54054",
"expense_category_ident": "306820h1R33790Ap",
})
# The HMAC is calculated over the exact request body that is sent
signature = base64.b64encode(
hmac.new(api_secret.encode(), payload.encode(), hashlib.sha256).digest()
).decode()
response = requests.post(
"https://www.billware.de/api/v1",
data=payload,
headers={
"X-Bw-Hmac": f"{api_appid}:{signature}",
"X-Bw-Method": "expense.create",
"Content-Type": "application/json",
},
)
print(response.json())using System.Net.Http;
using System.Security.Cryptography;
using System.Text;
using System.Text.Json;
// Get your API credentials from your billware customer area
const string apiAppId = "your-app-id";
const string apiSecret = "your-api-secret";
var payload = JsonSerializer.Serialize(new
{
price = 46.72,
tax_rate = 19,
origin = "domestic",
date_invoice = "2026-10-05",
date_due = "2026-10-19",
reference_nr = "RE-2026-0815",
user_note = "Toner und Papier",
external_ident = "TX-5001",
supplier_ident = "ckt8w78bfmj54054",
expense_category_ident = "306820h1R33790Ap"
});
// The HMAC is calculated over the exact request body that is sent
using var hmac = new HMACSHA256(Encoding.UTF8.GetBytes(apiSecret));
var signature = Convert.ToBase64String(hmac.ComputeHash(Encoding.UTF8.GetBytes(payload)));
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://www.billware.de/api/v1")
{
Content = new StringContent(payload, Encoding.UTF8, "application/json")
};
request.Headers.Add("X-Bw-Hmac", $"{apiAppId}:{signature}");
request.Headers.Add("X-Bw-Method", "expense.create");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());Rückgabewerte
Die Antwort enthält die angelegte Ausgabe mit derselben Struktur wie expense.read.
Beispielantworten
// SUCCESS
{
"response": true,
"data": {
"expense_ident": "0nzgcohs25s4y7zv",
"expense_nr": "AG-0001",
"price": "46.7200",
"tax_rate": "19.0000",
"price_total": 55.5968,
...
},
"message": "expense created"
}
// ERROR
{
"response": false,
"data": null,
"message": "tax_rate is required"
}
expense.read
Liefert eine Ausgabe mit ihren Zahlungen und ihrem Beleg.Daten
| Felder | Beschreibung | Erlaubte Werte |
|---|---|---|
| expense_ident Pflicht | Kennung der Ausgabe | String |
Codebeispiele
# Get your API credentials from your billware customer area
API_APPID="your-app-id"
API_SECRET="your-api-secret"
PAYLOAD='{"expense_ident":"0nzgcohs25s4y7zv"}'
# The HMAC is calculated over the exact request body that is sent
HMAC=$(printf '%s' "$PAYLOAD" | openssl dgst -sha256 -hmac "$API_SECRET" -binary | base64)
curl -X POST "https://www.billware.de/api/v1" \
-H "X-Bw-Hmac: $API_APPID:$HMAC" \
-H "X-Bw-Method: expense.read" \
-H "Content-Type: application/json" \
-d "$PAYLOAD"<?php
// Get your API credentials from your billware customer area
$apiAppId = 'your-app-id';
$apiSecret = 'your-api-secret';
$payload = json_encode([
'expense_ident' => '0nzgcohs25s4y7zv',
]);
// The HMAC is calculated over the exact request body that is sent
$hmac = base64_encode(hash_hmac('sha256', $payload, $apiSecret, true));
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://www.billware.de/api/v1',
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $payload,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Bw-Hmac: '.$apiAppId.':'.$hmac,
'X-Bw-Method: expense.read',
'Content-Type: application/json',
],
]);
$response = curl_exec($curl);
curl_close($curl);
print_r(json_decode($response, true));import crypto from 'node:crypto';
// Get your API credentials from your billware customer area
const apiAppId = 'your-app-id';
const apiSecret = 'your-api-secret';
const payload = JSON.stringify({
"expense_ident": "0nzgcohs25s4y7zv"
});
// The HMAC is calculated over the exact request body that is sent
const hmac = crypto.createHmac('sha256', apiSecret).update(payload).digest('base64');
const response = await fetch('https://www.billware.de/api/v1', {
method: 'POST',
headers: {
'X-Bw-Hmac': `${apiAppId}:${hmac}`,
'X-Bw-Method': 'expense.read',
'Content-Type': 'application/json'
},
body: payload
});
console.log(await response.json());import base64
import hashlib
import hmac
import json
import requests
# Get your API credentials from your billware customer area
api_appid = "your-app-id"
api_secret = "your-api-secret"
payload = json.dumps({
"expense_ident": "0nzgcohs25s4y7zv",
})
# The HMAC is calculated over the exact request body that is sent
signature = base64.b64encode(
hmac.new(api_secret.encode(), payload.encode(), hashlib.sha256).digest()
).decode()
response = requests.post(
"https://www.billware.de/api/v1",
data=payload,
headers={
"X-Bw-Hmac": f"{api_appid}:{signature}",
"X-Bw-Method": "expense.read",
"Content-Type": "application/json",
},
)
print(response.json())using System.Net.Http;
using System.Security.Cryptography;
using System.Text;
using System.Text.Json;
// Get your API credentials from your billware customer area
const string apiAppId = "your-app-id";
const string apiSecret = "your-api-secret";
var payload = JsonSerializer.Serialize(new
{
expense_ident = "0nzgcohs25s4y7zv"
});
// The HMAC is calculated over the exact request body that is sent
using var hmac = new HMACSHA256(Encoding.UTF8.GetBytes(apiSecret));
var signature = Convert.ToBase64String(hmac.ComputeHash(Encoding.UTF8.GetBytes(payload)));
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://www.billware.de/api/v1")
{
Content = new StringContent(payload, Encoding.UTF8, "application/json")
};
request.Headers.Add("X-Bw-Hmac", $"{apiAppId}:{signature}");
request.Headers.Add("X-Bw-Method", "expense.read");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());Rückgabewerte
| Felder | Beschreibung |
|---|---|
| expense_ident | Kennung der Ausgabe |
| expense_nr | Ausgabennummer |
| reference_nr | Belegnummer des Lieferanten |
| expense_type | Quelle der Ausgabe |
| external_ident | Kennung der Ausgabe in deinem System |
| user_note | Notiz |
| price | Nettobetrag, als Zeichenkette mit vier Nachkommastellen |
| tax_rate | Steuersatz in Prozent |
| price_total | Bruttobetrag, nicht gerundet |
| origin | Herkunft der Leistung: domestic, eu oder other |
| date_invoice date_due date_paid |
Belegdatum, Fälligkeit und Tag der Zahlung in Serverzeit (UTC). Ein Datum, das du ohne Uhrzeit sendest, wird als 12:00 Uhr in der Zeitzone deines Kontos gespeichert. Die Felder mit der Endung _user zeigen dasselbe Datum im Datumsformat deines Kontos. |
| date_created date_updated |
Zeitpunkt der Anlage und der letzten Änderung in Serverzeit (UTC) |
| is_paid | Ob die Ausgabe als bezahlt gilt: 1 oder 0 |
| calculation | open_amount: der noch offene Bruttobetrag. is_paid: ob nichts mehr offen ist. |
| status | Status der Ausgabe mit seinem Namen in der Sprache deines Kontos und seiner Farbe |
| supplier_ident supplier |
Kennung des Lieferanten und der Lieferant mit seinen Feldern, sonst null |
| account_ident account |
Kennung des Buchungskontos und das Konto mit Nummer und Bezeichnung, sonst null |
| expense_category_ident category |
Kennung der Kategorie und die Kategorie mit ihrem Namen in beiden Sprachen, sonst null |
| booked_payments | Die gebuchten Zahlungen, jede wie in der Antwort von expense.createPayment |
| file | Der Beleg wie in der Antwort von expense.fileUpload, sonst null |
| write_off_years | Nutzungsdauer in Jahren |
| input_tax_deductible | Ob die Vorsteuer der Ausgabe abziehbar ist: 1 oder 0 |
| repetition | Immer null: Angaben zur Wiederholung haben nur die Vorlagen wiederkehrender Ausgaben, und die gibt die API nicht aus. |
Beispielantworten
// SUCCESS
{
"response": true,
"data": {
"expense_ident": "0nzgcohs25s4y7zv",
"expense_nr": "AG-0001",
"expense_type": "billware",
"external_ident": "TX-5001",
"reference_nr": "RE-2026-0815",
"user_note": "Toner und Papier",
"price": "46.7200",
"tax_rate": "19.0000",
"price_total": 55.5968,
"currency": "EUR",
"origin": "domestic",
"date_invoice": "2026-10-05 10:00:00",
"date_invoice_user": "05.10.2026",
"date_due": "2026-10-19 10:00:00",
"date_due_user": "19.10.2026",
"date_paid": null,
"date_paid_user": null,
"date_created": "2026-11-16 10:30:10",
"date_updated": "2026-11-16 10:30:10",
"is_paid": 0,
"calculation": {
"open_amount": 35.6,
"is_paid": 0
},
"status": {
"color": "#ffb800",
"name": "Fällig"
},
"supplier_ident": "ckt8w78bfmj54054",
"supplier": {
"supplier_ident": "ckt8w78bfmj54054",
"supplier_nr": "L-7001",
"bill_company": "Papier & Druck KG",
...
},
"account_ident": "oo017520wieoo3vt",
"account": {
"account_ident": "oo017520wieoo3vt",
"account_nr": 4930,
"title": "Bürobedarf",
...
},
"expense_category_ident": "306820h1R33790Ap",
"category": {
"expense_category_ident": "306820h1R33790Ap",
"lang_de": "Büroausstattung und -bedarf",
"lang_en": "Office equipment",
...
},
"booked_payments": [
{
"expense_payment_ident": "lejbm9d8w8rw3e2s",
"expense_ident": "0nzgcohs25s4y7zv",
"date_paid": "2026-10-12 10:00:00",
"amount": "20.0000",
"fee": "0.0000",
"payment_name": "Überweisung",
"external_ident": "",
"user_note": "Anzahlung",
...
}
],
"file": {
"href": "https://www.billware.de/file?t=...",
"file_ident": "71ahxmkcu6ockdzd",
"file_user_name": "Rechnung RE-2026-0815.pdf",
"file_extension": "pdf",
...
},
"write_off_years": 5,
"input_tax_deductible": 1,
"repetition": null,
...
},
"message": "Read expense with ident: 0nzgcohs25s4y7zv"
}
// ERROR
{
"response": false,
"data": null,
"message": "Expense not found"
}
expense.list
Liefert mehrere Ausgaben als Liste.Daten
| Felder | Beschreibung | Erlaubte Werte | Standard |
|---|---|---|---|
| date_type | Das Datum, nach dem der Zeitraum gilt und die Liste sortiert ist, das neueste zuerst. | "date_created" "date_updated" "date_invoice" "date_due" "date_paid" |
"date_created" |
| start_date | Beginn des Zeitraums. Format: Y-m-d H:i:s (z. B. "2026-10-01 00:00:00"), verglichen wird mit den gespeicherten Zeitpunkten in Serverzeit (UTC). |
String |
|
| end_date | Ende des Zeitraums, im selben Format wie start_date. |
String |
|
| expense_type | Nur Ausgaben dieser Quelle. | String |
|
| external_ident | Nur die Ausgabe mit dieser Kennung aus deinem System. | String |
|
| supplier_ident | Nur Ausgaben dieses Lieferanten. | String |
|
| account_ident | Nur Ausgaben auf diesem Buchungskonto. | String |
|
| expense_category_ident | Nur Ausgaben dieser Kategorie. | String |
|
| is_paid | Nur bezahlte oder nur offene Ausgaben. | 0 Nein 1 Ja |
|
| page | Seite der Liste. Ohne Angabe kommt die erste Seite. | Integer |
1 |
| limit | Zahl der Einträge je Seite, von 1 bis 100. |
Integer |
25 |
Alle Angaben sind optional und lassen sich kombinieren, eine Ausgabe muss dann zu jedem Filter passen. Ohne Angaben enthält die Liste alle Ausgaben deines Kontos. Die Vorlagen wiederkehrender Ausgaben gehören nicht dazu.
Codebeispiele
expense.list
# Get your API credentials from your billware customer area
API_APPID="your-app-id"
API_SECRET="your-api-secret"
PAYLOAD='{"date_type":"date_invoice","start_date":"2026-10-01 00:00:00","end_date":"2026-10-31 23:59:59","is_paid":0,"page":1,"limit":50}'
# The HMAC is calculated over the exact request body that is sent
HMAC=$(printf '%s' "$PAYLOAD" | openssl dgst -sha256 -hmac "$API_SECRET" -binary | base64)
curl -X POST "https://www.billware.de/api/v1" \
-H "X-Bw-Hmac: $API_APPID:$HMAC" \
-H "X-Bw-Method: expense.list" \
-H "Content-Type: application/json" \
-d "$PAYLOAD"<?php
// Get your API credentials from your billware customer area
$apiAppId = 'your-app-id';
$apiSecret = 'your-api-secret';
$payload = json_encode([
'date_type' => 'date_invoice',
'start_date' => '2026-10-01 00:00:00',
'end_date' => '2026-10-31 23:59:59',
'is_paid' => 0,
'page' => 1,
'limit' => 50,
]);
// The HMAC is calculated over the exact request body that is sent
$hmac = base64_encode(hash_hmac('sha256', $payload, $apiSecret, true));
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://www.billware.de/api/v1',
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $payload,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Bw-Hmac: '.$apiAppId.':'.$hmac,
'X-Bw-Method: expense.list',
'Content-Type: application/json',
],
]);
$response = curl_exec($curl);
curl_close($curl);
print_r(json_decode($response, true));import crypto from 'node:crypto';
// Get your API credentials from your billware customer area
const apiAppId = 'your-app-id';
const apiSecret = 'your-api-secret';
const payload = JSON.stringify({
"date_type": "date_invoice",
"start_date": "2026-10-01 00:00:00",
"end_date": "2026-10-31 23:59:59",
"is_paid": 0,
"page": 1,
"limit": 50
});
// The HMAC is calculated over the exact request body that is sent
const hmac = crypto.createHmac('sha256', apiSecret).update(payload).digest('base64');
const response = await fetch('https://www.billware.de/api/v1', {
method: 'POST',
headers: {
'X-Bw-Hmac': `${apiAppId}:${hmac}`,
'X-Bw-Method': 'expense.list',
'Content-Type': 'application/json'
},
body: payload
});
console.log(await response.json());import base64
import hashlib
import hmac
import json
import requests
# Get your API credentials from your billware customer area
api_appid = "your-app-id"
api_secret = "your-api-secret"
payload = json.dumps({
"date_type": "date_invoice",
"start_date": "2026-10-01 00:00:00",
"end_date": "2026-10-31 23:59:59",
"is_paid": 0,
"page": 1,
"limit": 50,
})
# The HMAC is calculated over the exact request body that is sent
signature = base64.b64encode(
hmac.new(api_secret.encode(), payload.encode(), hashlib.sha256).digest()
).decode()
response = requests.post(
"https://www.billware.de/api/v1",
data=payload,
headers={
"X-Bw-Hmac": f"{api_appid}:{signature}",
"X-Bw-Method": "expense.list",
"Content-Type": "application/json",
},
)
print(response.json())using System.Net.Http;
using System.Security.Cryptography;
using System.Text;
using System.Text.Json;
// Get your API credentials from your billware customer area
const string apiAppId = "your-app-id";
const string apiSecret = "your-api-secret";
var payload = JsonSerializer.Serialize(new
{
date_type = "date_invoice",
start_date = "2026-10-01 00:00:00",
end_date = "2026-10-31 23:59:59",
is_paid = 0,
page = 1,
limit = 50
});
// The HMAC is calculated over the exact request body that is sent
using var hmac = new HMACSHA256(Encoding.UTF8.GetBytes(apiSecret));
var signature = Convert.ToBase64String(hmac.ComputeHash(Encoding.UTF8.GetBytes(payload)));
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://www.billware.de/api/v1")
{
Content = new StringContent(payload, Encoding.UTF8, "application/json")
};
request.Headers.Add("X-Bw-Hmac", $"{apiAppId}:{signature}");
request.Headers.Add("X-Bw-Method", "expense.list");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());expense.list (one supplier)
# Get your API credentials from your billware customer area
API_APPID="your-app-id"
API_SECRET="your-api-secret"
PAYLOAD='{"supplier_ident":"ckt8w78bfmj54054"}'
# The HMAC is calculated over the exact request body that is sent
HMAC=$(printf '%s' "$PAYLOAD" | openssl dgst -sha256 -hmac "$API_SECRET" -binary | base64)
curl -X POST "https://www.billware.de/api/v1" \
-H "X-Bw-Hmac: $API_APPID:$HMAC" \
-H "X-Bw-Method: expense.list" \
-H "Content-Type: application/json" \
-d "$PAYLOAD"<?php
// Get your API credentials from your billware customer area
$apiAppId = 'your-app-id';
$apiSecret = 'your-api-secret';
$payload = json_encode([
'supplier_ident' => 'ckt8w78bfmj54054',
]);
// The HMAC is calculated over the exact request body that is sent
$hmac = base64_encode(hash_hmac('sha256', $payload, $apiSecret, true));
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://www.billware.de/api/v1',
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $payload,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Bw-Hmac: '.$apiAppId.':'.$hmac,
'X-Bw-Method: expense.list',
'Content-Type: application/json',
],
]);
$response = curl_exec($curl);
curl_close($curl);
print_r(json_decode($response, true));import crypto from 'node:crypto';
// Get your API credentials from your billware customer area
const apiAppId = 'your-app-id';
const apiSecret = 'your-api-secret';
const payload = JSON.stringify({
"supplier_ident": "ckt8w78bfmj54054"
});
// The HMAC is calculated over the exact request body that is sent
const hmac = crypto.createHmac('sha256', apiSecret).update(payload).digest('base64');
const response = await fetch('https://www.billware.de/api/v1', {
method: 'POST',
headers: {
'X-Bw-Hmac': `${apiAppId}:${hmac}`,
'X-Bw-Method': 'expense.list',
'Content-Type': 'application/json'
},
body: payload
});
console.log(await response.json());import base64
import hashlib
import hmac
import json
import requests
# Get your API credentials from your billware customer area
api_appid = "your-app-id"
api_secret = "your-api-secret"
payload = json.dumps({
"supplier_ident": "ckt8w78bfmj54054",
})
# The HMAC is calculated over the exact request body that is sent
signature = base64.b64encode(
hmac.new(api_secret.encode(), payload.encode(), hashlib.sha256).digest()
).decode()
response = requests.post(
"https://www.billware.de/api/v1",
data=payload,
headers={
"X-Bw-Hmac": f"{api_appid}:{signature}",
"X-Bw-Method": "expense.list",
"Content-Type": "application/json",
},
)
print(response.json())using System.Net.Http;
using System.Security.Cryptography;
using System.Text;
using System.Text.Json;
// Get your API credentials from your billware customer area
const string apiAppId = "your-app-id";
const string apiSecret = "your-api-secret";
var payload = JsonSerializer.Serialize(new
{
supplier_ident = "ckt8w78bfmj54054"
});
// The HMAC is calculated over the exact request body that is sent
using var hmac = new HMACSHA256(Encoding.UTF8.GetBytes(apiSecret));
var signature = Convert.ToBase64String(hmac.ComputeHash(Encoding.UTF8.GetBytes(payload)));
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://www.billware.de/api/v1")
{
Content = new StringContent(payload, Encoding.UTF8, "application/json")
};
request.Headers.Add("X-Bw-Hmac", $"{apiAppId}:{signature}");
request.Headers.Add("X-Bw-Method", "expense.list");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());Rückgabewerte
Das Array expenses enthält Einträge mit derselben Struktur wie die Antwort von expense.read.
Seitenweise Ausgabe
Die Antwort enthält Angaben zur seitenweisen Ausgabe:
page: Die angeforderte Seitennummer.limit: Die Zahl der Einträge je Seite.total: Die Gesamtzahl der Einträge, die zum Filter passen.total_pages: Die Zahl der Seiten, die sich aus Trefferzahl und Seitengröße ergibt.
Mit page blätterst du durch die Seiten, mit limit legst du fest, wie viele Einträge eine Seite hat. Eine Seite hat höchstens 100 Einträge, insgesamt gibt es keine Obergrenze: Über die Seiten bis total_pages erreichst du jeden Eintrag.
Beispielantworten
// SUCCESS
{
"response": true,
"data": {
"page": 1,
"limit": 25,
"total": 38,
"total_pages": 2,
"expenses": [
{
"expense_ident": "0nzgcohs25s4y7zv",
"expense_nr": "AG-0001",
"date_invoice": "2026-10-05 10:00:00",
"price": "46.7200",
...
},
...
]
},
"message": "Expense list retrieved successfully"
}
// ERROR
{
"response": false,
"data": null,
"message": "Invalid date_type. Allowed: date_created, date_updated, date_invoice, date_due, date_paid"
}
expense.update
Ändert ein oder mehrere Felder einer Ausgabe.Daten
| Felder | Beschreibung | Erlaubte Werte |
|---|---|---|
| expense_ident Pflicht | Kennung der Ausgabe | String |
Dazu jedes Feld von expense.create, das du ändern willst. Nur gesendete Felder ändern sich. Ein leerer Text leert ein Textfeld; bei einem Datum oder einer Kennung (supplier_ident, account_ident, expense_category_ident) nimmt er das Datum oder die Zuordnung weg. Die Ausgabennummer lässt sich nicht leeren.
Codebeispiele
# Get your API credentials from your billware customer area
API_APPID="your-app-id"
API_SECRET="your-api-secret"
PAYLOAD='{"expense_ident":"0nzgcohs25s4y7zv","user_note":"Toner, Papier und Ordner","date_due":"2026-10-26"}'
# The HMAC is calculated over the exact request body that is sent
HMAC=$(printf '%s' "$PAYLOAD" | openssl dgst -sha256 -hmac "$API_SECRET" -binary | base64)
curl -X POST "https://www.billware.de/api/v1" \
-H "X-Bw-Hmac: $API_APPID:$HMAC" \
-H "X-Bw-Method: expense.update" \
-H "Content-Type: application/json" \
-d "$PAYLOAD"<?php
// Get your API credentials from your billware customer area
$apiAppId = 'your-app-id';
$apiSecret = 'your-api-secret';
$payload = json_encode([
'expense_ident' => '0nzgcohs25s4y7zv',
'user_note' => 'Toner, Papier und Ordner',
'date_due' => '2026-10-26',
]);
// The HMAC is calculated over the exact request body that is sent
$hmac = base64_encode(hash_hmac('sha256', $payload, $apiSecret, true));
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://www.billware.de/api/v1',
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $payload,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Bw-Hmac: '.$apiAppId.':'.$hmac,
'X-Bw-Method: expense.update',
'Content-Type: application/json',
],
]);
$response = curl_exec($curl);
curl_close($curl);
print_r(json_decode($response, true));import crypto from 'node:crypto';
// Get your API credentials from your billware customer area
const apiAppId = 'your-app-id';
const apiSecret = 'your-api-secret';
const payload = JSON.stringify({
"expense_ident": "0nzgcohs25s4y7zv",
"user_note": "Toner, Papier und Ordner",
"date_due": "2026-10-26"
});
// The HMAC is calculated over the exact request body that is sent
const hmac = crypto.createHmac('sha256', apiSecret).update(payload).digest('base64');
const response = await fetch('https://www.billware.de/api/v1', {
method: 'POST',
headers: {
'X-Bw-Hmac': `${apiAppId}:${hmac}`,
'X-Bw-Method': 'expense.update',
'Content-Type': 'application/json'
},
body: payload
});
console.log(await response.json());import base64
import hashlib
import hmac
import json
import requests
# Get your API credentials from your billware customer area
api_appid = "your-app-id"
api_secret = "your-api-secret"
payload = json.dumps({
"expense_ident": "0nzgcohs25s4y7zv",
"user_note": "Toner, Papier und Ordner",
"date_due": "2026-10-26",
})
# The HMAC is calculated over the exact request body that is sent
signature = base64.b64encode(
hmac.new(api_secret.encode(), payload.encode(), hashlib.sha256).digest()
).decode()
response = requests.post(
"https://www.billware.de/api/v1",
data=payload,
headers={
"X-Bw-Hmac": f"{api_appid}:{signature}",
"X-Bw-Method": "expense.update",
"Content-Type": "application/json",
},
)
print(response.json())using System.Net.Http;
using System.Security.Cryptography;
using System.Text;
using System.Text.Json;
// Get your API credentials from your billware customer area
const string apiAppId = "your-app-id";
const string apiSecret = "your-api-secret";
var payload = JsonSerializer.Serialize(new
{
expense_ident = "0nzgcohs25s4y7zv",
user_note = "Toner, Papier und Ordner",
date_due = "2026-10-26"
});
// The HMAC is calculated over the exact request body that is sent
using var hmac = new HMACSHA256(Encoding.UTF8.GetBytes(apiSecret));
var signature = Convert.ToBase64String(hmac.ComputeHash(Encoding.UTF8.GetBytes(payload)));
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://www.billware.de/api/v1")
{
Content = new StringContent(payload, Encoding.UTF8, "application/json")
};
request.Headers.Add("X-Bw-Hmac", $"{apiAppId}:{signature}");
request.Headers.Add("X-Bw-Method", "expense.update");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());Rückgabewerte
Die Antwort enthält die Ausgabe im neuen Stand, mit derselben Struktur wie expense.read.
Beispielantworten
// SUCCESS
{
"response": true,
"data": {
"expense_ident": "0nzgcohs25s4y7zv",
"user_note": "Toner, Papier und Ordner",
...
},
"message": "expense updated"
}
// ERROR
{
"response": false,
"data": null,
"message": "expense_nr is taken already"
}
expense.put
Legt eine Ausgabe an oder ändert sie, in einem Aufruf.Mit expense_ident ändert der Aufruf diese Ausgabe wie expense.update. Ohne expense_ident legt er eine neue an wie expense.create, dann sind price, tax_rate und origin Pflicht. Felder und Antwort sind dieselben wie dort.
Codebeispiele
expense.put (create)
# Get your API credentials from your billware customer area
API_APPID="your-app-id"
API_SECRET="your-api-secret"
PAYLOAD='{"price":13.64,"tax_rate":19,"origin":"domestic","date_invoice":"2026-11-03","external_ident":"TX-5003"}'
# The HMAC is calculated over the exact request body that is sent
HMAC=$(printf '%s' "$PAYLOAD" | openssl dgst -sha256 -hmac "$API_SECRET" -binary | base64)
curl -X POST "https://www.billware.de/api/v1" \
-H "X-Bw-Hmac: $API_APPID:$HMAC" \
-H "X-Bw-Method: expense.put" \
-H "Content-Type: application/json" \
-d "$PAYLOAD"<?php
// Get your API credentials from your billware customer area
$apiAppId = 'your-app-id';
$apiSecret = 'your-api-secret';
$payload = json_encode([
'price' => 13.64,
'tax_rate' => 19,
'origin' => 'domestic',
'date_invoice' => '2026-11-03',
'external_ident' => 'TX-5003',
]);
// The HMAC is calculated over the exact request body that is sent
$hmac = base64_encode(hash_hmac('sha256', $payload, $apiSecret, true));
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://www.billware.de/api/v1',
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $payload,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Bw-Hmac: '.$apiAppId.':'.$hmac,
'X-Bw-Method: expense.put',
'Content-Type: application/json',
],
]);
$response = curl_exec($curl);
curl_close($curl);
print_r(json_decode($response, true));import crypto from 'node:crypto';
// Get your API credentials from your billware customer area
const apiAppId = 'your-app-id';
const apiSecret = 'your-api-secret';
const payload = JSON.stringify({
"price": 13.64,
"tax_rate": 19,
"origin": "domestic",
"date_invoice": "2026-11-03",
"external_ident": "TX-5003"
});
// The HMAC is calculated over the exact request body that is sent
const hmac = crypto.createHmac('sha256', apiSecret).update(payload).digest('base64');
const response = await fetch('https://www.billware.de/api/v1', {
method: 'POST',
headers: {
'X-Bw-Hmac': `${apiAppId}:${hmac}`,
'X-Bw-Method': 'expense.put',
'Content-Type': 'application/json'
},
body: payload
});
console.log(await response.json());import base64
import hashlib
import hmac
import json
import requests
# Get your API credentials from your billware customer area
api_appid = "your-app-id"
api_secret = "your-api-secret"
payload = json.dumps({
"price": 13.64,
"tax_rate": 19,
"origin": "domestic",
"date_invoice": "2026-11-03",
"external_ident": "TX-5003",
})
# The HMAC is calculated over the exact request body that is sent
signature = base64.b64encode(
hmac.new(api_secret.encode(), payload.encode(), hashlib.sha256).digest()
).decode()
response = requests.post(
"https://www.billware.de/api/v1",
data=payload,
headers={
"X-Bw-Hmac": f"{api_appid}:{signature}",
"X-Bw-Method": "expense.put",
"Content-Type": "application/json",
},
)
print(response.json())using System.Net.Http;
using System.Security.Cryptography;
using System.Text;
using System.Text.Json;
// Get your API credentials from your billware customer area
const string apiAppId = "your-app-id";
const string apiSecret = "your-api-secret";
var payload = JsonSerializer.Serialize(new
{
price = 13.64,
tax_rate = 19,
origin = "domestic",
date_invoice = "2026-11-03",
external_ident = "TX-5003"
});
// The HMAC is calculated over the exact request body that is sent
using var hmac = new HMACSHA256(Encoding.UTF8.GetBytes(apiSecret));
var signature = Convert.ToBase64String(hmac.ComputeHash(Encoding.UTF8.GetBytes(payload)));
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://www.billware.de/api/v1")
{
Content = new StringContent(payload, Encoding.UTF8, "application/json")
};
request.Headers.Add("X-Bw-Hmac", $"{apiAppId}:{signature}");
request.Headers.Add("X-Bw-Method", "expense.put");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());expense.put (update)
# Get your API credentials from your billware customer area
API_APPID="your-app-id"
API_SECRET="your-api-secret"
PAYLOAD='{"expense_ident":"0nzgcohs25s4y7zv","price":50}'
# The HMAC is calculated over the exact request body that is sent
HMAC=$(printf '%s' "$PAYLOAD" | openssl dgst -sha256 -hmac "$API_SECRET" -binary | base64)
curl -X POST "https://www.billware.de/api/v1" \
-H "X-Bw-Hmac: $API_APPID:$HMAC" \
-H "X-Bw-Method: expense.put" \
-H "Content-Type: application/json" \
-d "$PAYLOAD"<?php
// Get your API credentials from your billware customer area
$apiAppId = 'your-app-id';
$apiSecret = 'your-api-secret';
$payload = json_encode([
'expense_ident' => '0nzgcohs25s4y7zv',
'price' => 50,
]);
// The HMAC is calculated over the exact request body that is sent
$hmac = base64_encode(hash_hmac('sha256', $payload, $apiSecret, true));
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://www.billware.de/api/v1',
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $payload,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Bw-Hmac: '.$apiAppId.':'.$hmac,
'X-Bw-Method: expense.put',
'Content-Type: application/json',
],
]);
$response = curl_exec($curl);
curl_close($curl);
print_r(json_decode($response, true));import crypto from 'node:crypto';
// Get your API credentials from your billware customer area
const apiAppId = 'your-app-id';
const apiSecret = 'your-api-secret';
const payload = JSON.stringify({
"expense_ident": "0nzgcohs25s4y7zv",
"price": 50
});
// The HMAC is calculated over the exact request body that is sent
const hmac = crypto.createHmac('sha256', apiSecret).update(payload).digest('base64');
const response = await fetch('https://www.billware.de/api/v1', {
method: 'POST',
headers: {
'X-Bw-Hmac': `${apiAppId}:${hmac}`,
'X-Bw-Method': 'expense.put',
'Content-Type': 'application/json'
},
body: payload
});
console.log(await response.json());import base64
import hashlib
import hmac
import json
import requests
# Get your API credentials from your billware customer area
api_appid = "your-app-id"
api_secret = "your-api-secret"
payload = json.dumps({
"expense_ident": "0nzgcohs25s4y7zv",
"price": 50,
})
# The HMAC is calculated over the exact request body that is sent
signature = base64.b64encode(
hmac.new(api_secret.encode(), payload.encode(), hashlib.sha256).digest()
).decode()
response = requests.post(
"https://www.billware.de/api/v1",
data=payload,
headers={
"X-Bw-Hmac": f"{api_appid}:{signature}",
"X-Bw-Method": "expense.put",
"Content-Type": "application/json",
},
)
print(response.json())using System.Net.Http;
using System.Security.Cryptography;
using System.Text;
using System.Text.Json;
// Get your API credentials from your billware customer area
const string apiAppId = "your-app-id";
const string apiSecret = "your-api-secret";
var payload = JsonSerializer.Serialize(new
{
expense_ident = "0nzgcohs25s4y7zv",
price = 50
});
// The HMAC is calculated over the exact request body that is sent
using var hmac = new HMACSHA256(Encoding.UTF8.GetBytes(apiSecret));
var signature = Convert.ToBase64String(hmac.ComputeHash(Encoding.UTF8.GetBytes(payload)));
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://www.billware.de/api/v1")
{
Content = new StringContent(payload, Encoding.UTF8, "application/json")
};
request.Headers.Add("X-Bw-Hmac", $"{apiAppId}:{signature}");
request.Headers.Add("X-Bw-Method", "expense.put");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());expense.delete
Löscht eine Ausgabe mit ihren Zahlungen und ihrem Beleg.Daten
| Felder | Beschreibung | Erlaubte Werte |
|---|---|---|
| expense_ident Pflicht | Kennung der Ausgabe | String |
Codebeispiele
# Get your API credentials from your billware customer area
API_APPID="your-app-id"
API_SECRET="your-api-secret"
PAYLOAD='{"expense_ident":"0nzgcohs25s4y7zv"}'
# The HMAC is calculated over the exact request body that is sent
HMAC=$(printf '%s' "$PAYLOAD" | openssl dgst -sha256 -hmac "$API_SECRET" -binary | base64)
curl -X POST "https://www.billware.de/api/v1" \
-H "X-Bw-Hmac: $API_APPID:$HMAC" \
-H "X-Bw-Method: expense.delete" \
-H "Content-Type: application/json" \
-d "$PAYLOAD"<?php
// Get your API credentials from your billware customer area
$apiAppId = 'your-app-id';
$apiSecret = 'your-api-secret';
$payload = json_encode([
'expense_ident' => '0nzgcohs25s4y7zv',
]);
// The HMAC is calculated over the exact request body that is sent
$hmac = base64_encode(hash_hmac('sha256', $payload, $apiSecret, true));
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://www.billware.de/api/v1',
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $payload,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Bw-Hmac: '.$apiAppId.':'.$hmac,
'X-Bw-Method: expense.delete',
'Content-Type: application/json',
],
]);
$response = curl_exec($curl);
curl_close($curl);
print_r(json_decode($response, true));import crypto from 'node:crypto';
// Get your API credentials from your billware customer area
const apiAppId = 'your-app-id';
const apiSecret = 'your-api-secret';
const payload = JSON.stringify({
"expense_ident": "0nzgcohs25s4y7zv"
});
// The HMAC is calculated over the exact request body that is sent
const hmac = crypto.createHmac('sha256', apiSecret).update(payload).digest('base64');
const response = await fetch('https://www.billware.de/api/v1', {
method: 'POST',
headers: {
'X-Bw-Hmac': `${apiAppId}:${hmac}`,
'X-Bw-Method': 'expense.delete',
'Content-Type': 'application/json'
},
body: payload
});
console.log(await response.json());import base64
import hashlib
import hmac
import json
import requests
# Get your API credentials from your billware customer area
api_appid = "your-app-id"
api_secret = "your-api-secret"
payload = json.dumps({
"expense_ident": "0nzgcohs25s4y7zv",
})
# The HMAC is calculated over the exact request body that is sent
signature = base64.b64encode(
hmac.new(api_secret.encode(), payload.encode(), hashlib.sha256).digest()
).decode()
response = requests.post(
"https://www.billware.de/api/v1",
data=payload,
headers={
"X-Bw-Hmac": f"{api_appid}:{signature}",
"X-Bw-Method": "expense.delete",
"Content-Type": "application/json",
},
)
print(response.json())using System.Net.Http;
using System.Security.Cryptography;
using System.Text;
using System.Text.Json;
// Get your API credentials from your billware customer area
const string apiAppId = "your-app-id";
const string apiSecret = "your-api-secret";
var payload = JsonSerializer.Serialize(new
{
expense_ident = "0nzgcohs25s4y7zv"
});
// The HMAC is calculated over the exact request body that is sent
using var hmac = new HMACSHA256(Encoding.UTF8.GetBytes(apiSecret));
var signature = Convert.ToBase64String(hmac.ComputeHash(Encoding.UTF8.GetBytes(payload)));
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://www.billware.de/api/v1")
{
Content = new StringContent(payload, Encoding.UTF8, "application/json")
};
request.Headers.Add("X-Bw-Hmac", $"{apiAppId}:{signature}");
request.Headers.Add("X-Bw-Method", "expense.delete");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());Beispielantworten
// SUCCESS
{
"response": true,
"data": null,
"message": "expense deleted"
}
// ERROR
{
"response": false,
"data": null,
"message": "Expense not found"
}
expense.createPayment
Bucht eine Zahlung auf eine Ausgabe.Daten
| Felder | Beschreibung | Erlaubte Werte | Standard |
|---|---|---|---|
| expense_ident Pflicht | Kennung der Ausgabe | String |
|
| date_paid Pflicht | Tag der Zahlung. Formate: JJJJ-MM-TT, JJJJ-MM-TT HH:MM:SS oder ISO 8601 (z. B. 2026-10-05T09:30:00+02:00). Ohne Angabe einer Zeitzone gilt die Zeitzone deines Kontos. |
String |
|
| amount | Betrag der Zahlung, nicht 0. Negativ, wenn der Lieferant eine Gutschrift erstattet. Ohne Angabe wird der offene Betrag der Ausgabe gebucht. |
Float |
Der offene Betrag |
| fee | Gebühr der Zahlung, ab 0. |
Float |
0 |
| payment_name | Zahlungsart, höchstens 64 Zeichen, z. B. "Überweisung". | String |
"" |
| external_ident | Kennung der Zahlung in deinem System, höchstens 256 Zeichen. | String |
"" |
| user_note | Notiz zur Zahlung, höchstens 1024 Zeichen. | String |
"" |
| set_paid | Ob die Ausgabe danach als bezahlt gilt. Ohne Angabe gilt sie als bezahlt, sobald nichts mehr offen ist. Lässt eine Zahlung wieder etwas offen, etwa eine Rückbuchung, gilt eine bezahlte Ausgabe wieder als offen. | 0 Nein 1 Ja |
Codebeispiele
# Get your API credentials from your billware customer area
API_APPID="your-app-id"
API_SECRET="your-api-secret"
PAYLOAD='{"expense_ident":"0nzgcohs25s4y7zv","date_paid":"2026-10-12","amount":20,"payment_name":"Überweisung","user_note":"Anzahlung"}'
# The HMAC is calculated over the exact request body that is sent
HMAC=$(printf '%s' "$PAYLOAD" | openssl dgst -sha256 -hmac "$API_SECRET" -binary | base64)
curl -X POST "https://www.billware.de/api/v1" \
-H "X-Bw-Hmac: $API_APPID:$HMAC" \
-H "X-Bw-Method: expense.createPayment" \
-H "Content-Type: application/json" \
-d "$PAYLOAD"<?php
// Get your API credentials from your billware customer area
$apiAppId = 'your-app-id';
$apiSecret = 'your-api-secret';
$payload = json_encode([
'expense_ident' => '0nzgcohs25s4y7zv',
'date_paid' => '2026-10-12',
'amount' => 20,
'payment_name' => 'Überweisung',
'user_note' => 'Anzahlung',
]);
// The HMAC is calculated over the exact request body that is sent
$hmac = base64_encode(hash_hmac('sha256', $payload, $apiSecret, true));
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://www.billware.de/api/v1',
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $payload,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Bw-Hmac: '.$apiAppId.':'.$hmac,
'X-Bw-Method: expense.createPayment',
'Content-Type: application/json',
],
]);
$response = curl_exec($curl);
curl_close($curl);
print_r(json_decode($response, true));import crypto from 'node:crypto';
// Get your API credentials from your billware customer area
const apiAppId = 'your-app-id';
const apiSecret = 'your-api-secret';
const payload = JSON.stringify({
"expense_ident": "0nzgcohs25s4y7zv",
"date_paid": "2026-10-12",
"amount": 20,
"payment_name": "Überweisung",
"user_note": "Anzahlung"
});
// The HMAC is calculated over the exact request body that is sent
const hmac = crypto.createHmac('sha256', apiSecret).update(payload).digest('base64');
const response = await fetch('https://www.billware.de/api/v1', {
method: 'POST',
headers: {
'X-Bw-Hmac': `${apiAppId}:${hmac}`,
'X-Bw-Method': 'expense.createPayment',
'Content-Type': 'application/json'
},
body: payload
});
console.log(await response.json());import base64
import hashlib
import hmac
import json
import requests
# Get your API credentials from your billware customer area
api_appid = "your-app-id"
api_secret = "your-api-secret"
payload = json.dumps({
"expense_ident": "0nzgcohs25s4y7zv",
"date_paid": "2026-10-12",
"amount": 20,
"payment_name": "Überweisung",
"user_note": "Anzahlung",
})
# The HMAC is calculated over the exact request body that is sent
signature = base64.b64encode(
hmac.new(api_secret.encode(), payload.encode(), hashlib.sha256).digest()
).decode()
response = requests.post(
"https://www.billware.de/api/v1",
data=payload,
headers={
"X-Bw-Hmac": f"{api_appid}:{signature}",
"X-Bw-Method": "expense.createPayment",
"Content-Type": "application/json",
},
)
print(response.json())using System.Net.Http;
using System.Security.Cryptography;
using System.Text;
using System.Text.Json;
// Get your API credentials from your billware customer area
const string apiAppId = "your-app-id";
const string apiSecret = "your-api-secret";
var payload = JsonSerializer.Serialize(new
{
expense_ident = "0nzgcohs25s4y7zv",
date_paid = "2026-10-12",
amount = 20,
payment_name = "Überweisung",
user_note = "Anzahlung"
});
// The HMAC is calculated over the exact request body that is sent
using var hmac = new HMACSHA256(Encoding.UTF8.GetBytes(apiSecret));
var signature = Convert.ToBase64String(hmac.ComputeHash(Encoding.UTF8.GetBytes(payload)));
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://www.billware.de/api/v1")
{
Content = new StringContent(payload, Encoding.UTF8, "application/json")
};
request.Headers.Add("X-Bw-Hmac", $"{apiAppId}:{signature}");
request.Headers.Add("X-Bw-Method", "expense.createPayment");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());Rückgabewerte
Die Antwort enthält die gebuchte Zahlung. Ihre expense_payment_ident brauchst du, um die Zahlung mit expense.deletePayment wieder zurückzunehmen. Die Felder mit der Endung _user zeigen dieselben Werte im Format deines Kontos.
Beispielantworten
// SUCCESS
{
"response": true,
"data": {
"expense_payment_ident": "lejbm9d8w8rw3e2s",
"expense_ident": "0nzgcohs25s4y7zv",
"date_created": "2026-11-16 10:30:10",
"date_paid": "2026-10-12 10:00:00",
"date_paid_user": "12.10.2026 12:00",
"amount": "20.0000",
"amount_user": "20,00 €",
"fee": "0.0000",
"fee_user": "0,00 €",
"payment_name": "Überweisung",
"payment_name_user": "Überweisung",
"external_ident": "",
"user_note": "Anzahlung",
"type": "payment",
...
},
"message": "Expense payment created"
}
// ERROR
{
"response": false,
"data": null,
"message": "date_paid is required"
}
expense.deletePayment
Nimmt eine gebuchte Zahlung zurück.Daten
| Felder | Beschreibung | Erlaubte Werte |
|---|---|---|
| expense_ident Pflicht | Kennung der Ausgabe | String |
| expense_payment_ident Pflicht | Kennung der Zahlung, aus der Antwort von expense.createPayment oder aus booked_payments der Ausgabe. |
String |
Codebeispiele
# Get your API credentials from your billware customer area
API_APPID="your-app-id"
API_SECRET="your-api-secret"
PAYLOAD='{"expense_ident":"0nzgcohs25s4y7zv","expense_payment_ident":"lejbm9d8w8rw3e2s"}'
# The HMAC is calculated over the exact request body that is sent
HMAC=$(printf '%s' "$PAYLOAD" | openssl dgst -sha256 -hmac "$API_SECRET" -binary | base64)
curl -X POST "https://www.billware.de/api/v1" \
-H "X-Bw-Hmac: $API_APPID:$HMAC" \
-H "X-Bw-Method: expense.deletePayment" \
-H "Content-Type: application/json" \
-d "$PAYLOAD"<?php
// Get your API credentials from your billware customer area
$apiAppId = 'your-app-id';
$apiSecret = 'your-api-secret';
$payload = json_encode([
'expense_ident' => '0nzgcohs25s4y7zv',
'expense_payment_ident' => 'lejbm9d8w8rw3e2s',
]);
// The HMAC is calculated over the exact request body that is sent
$hmac = base64_encode(hash_hmac('sha256', $payload, $apiSecret, true));
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://www.billware.de/api/v1',
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $payload,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Bw-Hmac: '.$apiAppId.':'.$hmac,
'X-Bw-Method: expense.deletePayment',
'Content-Type: application/json',
],
]);
$response = curl_exec($curl);
curl_close($curl);
print_r(json_decode($response, true));import crypto from 'node:crypto';
// Get your API credentials from your billware customer area
const apiAppId = 'your-app-id';
const apiSecret = 'your-api-secret';
const payload = JSON.stringify({
"expense_ident": "0nzgcohs25s4y7zv",
"expense_payment_ident": "lejbm9d8w8rw3e2s"
});
// The HMAC is calculated over the exact request body that is sent
const hmac = crypto.createHmac('sha256', apiSecret).update(payload).digest('base64');
const response = await fetch('https://www.billware.de/api/v1', {
method: 'POST',
headers: {
'X-Bw-Hmac': `${apiAppId}:${hmac}`,
'X-Bw-Method': 'expense.deletePayment',
'Content-Type': 'application/json'
},
body: payload
});
console.log(await response.json());import base64
import hashlib
import hmac
import json
import requests
# Get your API credentials from your billware customer area
api_appid = "your-app-id"
api_secret = "your-api-secret"
payload = json.dumps({
"expense_ident": "0nzgcohs25s4y7zv",
"expense_payment_ident": "lejbm9d8w8rw3e2s",
})
# The HMAC is calculated over the exact request body that is sent
signature = base64.b64encode(
hmac.new(api_secret.encode(), payload.encode(), hashlib.sha256).digest()
).decode()
response = requests.post(
"https://www.billware.de/api/v1",
data=payload,
headers={
"X-Bw-Hmac": f"{api_appid}:{signature}",
"X-Bw-Method": "expense.deletePayment",
"Content-Type": "application/json",
},
)
print(response.json())using System.Net.Http;
using System.Security.Cryptography;
using System.Text;
using System.Text.Json;
// Get your API credentials from your billware customer area
const string apiAppId = "your-app-id";
const string apiSecret = "your-api-secret";
var payload = JsonSerializer.Serialize(new
{
expense_ident = "0nzgcohs25s4y7zv",
expense_payment_ident = "lejbm9d8w8rw3e2s"
});
// The HMAC is calculated over the exact request body that is sent
using var hmac = new HMACSHA256(Encoding.UTF8.GetBytes(apiSecret));
var signature = Convert.ToBase64String(hmac.ComputeHash(Encoding.UTF8.GetBytes(payload)));
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://www.billware.de/api/v1")
{
Content = new StringContent(payload, Encoding.UTF8, "application/json")
};
request.Headers.Add("X-Bw-Hmac", $"{apiAppId}:{signature}");
request.Headers.Add("X-Bw-Method", "expense.deletePayment");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());Rückgabewerte
Die Antwort enthält die Ausgabe im neuen Stand, mit derselben Struktur wie expense.read. Decken die übrigen Zahlungen den Betrag nicht mehr, gilt die Ausgabe wieder als offen.
Beispielantworten
// SUCCESS
{
"response": true,
"data": {
"expense_ident": "0nzgcohs25s4y7zv",
"is_paid": 0,
"booked_payments": [],
...
},
"message": "Expense payment deleted"
}
// ERROR
{
"response": false,
"data": null,
"message": "Expense payment not found"
}
expense.fileUpload
Speichert den Beleg einer Ausgabe.Daten
| Felder | Beschreibung | Erlaubte Werte | Standard |
|---|---|---|---|
| expense_ident Pflicht | Kennung der Ausgabe | String |
|
| file_base64 | Der Inhalt der Datei, Base64-kodiert. Entweder file_base64 oder file_url, nicht beides. |
String |
|
| file_url | Ein Link, von dem billware die Datei selbst abruft. Nur https und nur öffentlich erreichbare Adressen. |
String |
|
| file_name | Name der Datei. Ohne Angabe heißt der Beleg wie die Ausgabennummer, z. B. AG-0001.pdf. |
String |
Die Ausgabennummer |
- Ein Beleg ist eine PDF-Datei, eine XML-Datei (eine E-Rechnung, z. B. XRechnung), ein Bild als JPG oder PNG oder eine Textdatei (TXT).
- Erkannt wird die Datei an ihrem Inhalt, nicht an ihrem Namen. Eine Datei darf höchstens 10 MB groß sein.
- Im Dateinamen sind Buchstaben, Ziffern, Leerzeichen und
. _ - ( )erlaubt, höchstens 128 Zeichen. Die Endung muss zum Inhalt passen: Eine PDF-Datei heißt.pdf. - Eine Ausgabe hat einen Beleg: Ein neuer ersetzt den bisherigen.
- Bei
file_urlfolgt billware höchstens drei Weiterleitungen, bricht nach 20 Sekunden ab und ruft nichts ab, was größer als 10 MB ist.
Codebeispiele
expense.fileUpload (Base64)
# Get your API credentials from your billware customer area
API_APPID="your-app-id"
API_SECRET="your-api-secret"
PAYLOAD='{"expense_ident":"0nzgcohs25s4y7zv","file_base64":"JVBERi0xLjQKMSAwIG9iago8PCAvVHlwZSAvQ2F0YWxvZyA+PgplbmRvYmoKdHJhaWxlcgo8PCAvUm9vdCAxIDAgUiA+PgolJUVPRgo=","file_name":"Rechnung RE-2026-0815.pdf"}'
# The HMAC is calculated over the exact request body that is sent
HMAC=$(printf '%s' "$PAYLOAD" | openssl dgst -sha256 -hmac "$API_SECRET" -binary | base64)
curl -X POST "https://www.billware.de/api/v1" \
-H "X-Bw-Hmac: $API_APPID:$HMAC" \
-H "X-Bw-Method: expense.fileUpload" \
-H "Content-Type: application/json" \
-d "$PAYLOAD"<?php
// Get your API credentials from your billware customer area
$apiAppId = 'your-app-id';
$apiSecret = 'your-api-secret';
$payload = json_encode([
'expense_ident' => '0nzgcohs25s4y7zv',
'file_base64' => 'JVBERi0xLjQKMSAwIG9iago8PCAvVHlwZSAvQ2F0YWxvZyA+PgplbmRvYmoKdHJhaWxlcgo8PCAvUm9vdCAxIDAgUiA+PgolJUVPRgo=',
'file_name' => 'Rechnung RE-2026-0815.pdf',
]);
// The HMAC is calculated over the exact request body that is sent
$hmac = base64_encode(hash_hmac('sha256', $payload, $apiSecret, true));
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://www.billware.de/api/v1',
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $payload,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Bw-Hmac: '.$apiAppId.':'.$hmac,
'X-Bw-Method: expense.fileUpload',
'Content-Type: application/json',
],
]);
$response = curl_exec($curl);
curl_close($curl);
print_r(json_decode($response, true));import crypto from 'node:crypto';
// Get your API credentials from your billware customer area
const apiAppId = 'your-app-id';
const apiSecret = 'your-api-secret';
const payload = JSON.stringify({
"expense_ident": "0nzgcohs25s4y7zv",
"file_base64": "JVBERi0xLjQKMSAwIG9iago8PCAvVHlwZSAvQ2F0YWxvZyA+PgplbmRvYmoKdHJhaWxlcgo8PCAvUm9vdCAxIDAgUiA+PgolJUVPRgo=",
"file_name": "Rechnung RE-2026-0815.pdf"
});
// The HMAC is calculated over the exact request body that is sent
const hmac = crypto.createHmac('sha256', apiSecret).update(payload).digest('base64');
const response = await fetch('https://www.billware.de/api/v1', {
method: 'POST',
headers: {
'X-Bw-Hmac': `${apiAppId}:${hmac}`,
'X-Bw-Method': 'expense.fileUpload',
'Content-Type': 'application/json'
},
body: payload
});
console.log(await response.json());import base64
import hashlib
import hmac
import json
import requests
# Get your API credentials from your billware customer area
api_appid = "your-app-id"
api_secret = "your-api-secret"
payload = json.dumps({
"expense_ident": "0nzgcohs25s4y7zv",
"file_base64": "JVBERi0xLjQKMSAwIG9iago8PCAvVHlwZSAvQ2F0YWxvZyA+PgplbmRvYmoKdHJhaWxlcgo8PCAvUm9vdCAxIDAgUiA+PgolJUVPRgo=",
"file_name": "Rechnung RE-2026-0815.pdf",
})
# The HMAC is calculated over the exact request body that is sent
signature = base64.b64encode(
hmac.new(api_secret.encode(), payload.encode(), hashlib.sha256).digest()
).decode()
response = requests.post(
"https://www.billware.de/api/v1",
data=payload,
headers={
"X-Bw-Hmac": f"{api_appid}:{signature}",
"X-Bw-Method": "expense.fileUpload",
"Content-Type": "application/json",
},
)
print(response.json())using System.Net.Http;
using System.Security.Cryptography;
using System.Text;
using System.Text.Json;
// Get your API credentials from your billware customer area
const string apiAppId = "your-app-id";
const string apiSecret = "your-api-secret";
var payload = JsonSerializer.Serialize(new
{
expense_ident = "0nzgcohs25s4y7zv",
file_base64 = "JVBERi0xLjQKMSAwIG9iago8PCAvVHlwZSAvQ2F0YWxvZyA+PgplbmRvYmoKdHJhaWxlcgo8PCAvUm9vdCAxIDAgUiA+PgolJUVPRgo=",
file_name = "Rechnung RE-2026-0815.pdf"
});
// The HMAC is calculated over the exact request body that is sent
using var hmac = new HMACSHA256(Encoding.UTF8.GetBytes(apiSecret));
var signature = Convert.ToBase64String(hmac.ComputeHash(Encoding.UTF8.GetBytes(payload)));
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://www.billware.de/api/v1")
{
Content = new StringContent(payload, Encoding.UTF8, "application/json")
};
request.Headers.Add("X-Bw-Hmac", $"{apiAppId}:{signature}");
request.Headers.Add("X-Bw-Method", "expense.fileUpload");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());expense.fileUpload (link)
# Get your API credentials from your billware customer area
API_APPID="your-app-id"
API_SECRET="your-api-secret"
PAYLOAD='{"expense_ident":"0nzgcohs25s4y7zv","file_url":"https://www.example.com/rechnungen/RE-2026-0815.pdf"}'
# The HMAC is calculated over the exact request body that is sent
HMAC=$(printf '%s' "$PAYLOAD" | openssl dgst -sha256 -hmac "$API_SECRET" -binary | base64)
curl -X POST "https://www.billware.de/api/v1" \
-H "X-Bw-Hmac: $API_APPID:$HMAC" \
-H "X-Bw-Method: expense.fileUpload" \
-H "Content-Type: application/json" \
-d "$PAYLOAD"<?php
// Get your API credentials from your billware customer area
$apiAppId = 'your-app-id';
$apiSecret = 'your-api-secret';
$payload = json_encode([
'expense_ident' => '0nzgcohs25s4y7zv',
'file_url' => 'https://www.example.com/rechnungen/RE-2026-0815.pdf',
]);
// The HMAC is calculated over the exact request body that is sent
$hmac = base64_encode(hash_hmac('sha256', $payload, $apiSecret, true));
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://www.billware.de/api/v1',
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $payload,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Bw-Hmac: '.$apiAppId.':'.$hmac,
'X-Bw-Method: expense.fileUpload',
'Content-Type: application/json',
],
]);
$response = curl_exec($curl);
curl_close($curl);
print_r(json_decode($response, true));import crypto from 'node:crypto';
// Get your API credentials from your billware customer area
const apiAppId = 'your-app-id';
const apiSecret = 'your-api-secret';
const payload = JSON.stringify({
"expense_ident": "0nzgcohs25s4y7zv",
"file_url": "https://www.example.com/rechnungen/RE-2026-0815.pdf"
});
// The HMAC is calculated over the exact request body that is sent
const hmac = crypto.createHmac('sha256', apiSecret).update(payload).digest('base64');
const response = await fetch('https://www.billware.de/api/v1', {
method: 'POST',
headers: {
'X-Bw-Hmac': `${apiAppId}:${hmac}`,
'X-Bw-Method': 'expense.fileUpload',
'Content-Type': 'application/json'
},
body: payload
});
console.log(await response.json());import base64
import hashlib
import hmac
import json
import requests
# Get your API credentials from your billware customer area
api_appid = "your-app-id"
api_secret = "your-api-secret"
payload = json.dumps({
"expense_ident": "0nzgcohs25s4y7zv",
"file_url": "https://www.example.com/rechnungen/RE-2026-0815.pdf",
})
# The HMAC is calculated over the exact request body that is sent
signature = base64.b64encode(
hmac.new(api_secret.encode(), payload.encode(), hashlib.sha256).digest()
).decode()
response = requests.post(
"https://www.billware.de/api/v1",
data=payload,
headers={
"X-Bw-Hmac": f"{api_appid}:{signature}",
"X-Bw-Method": "expense.fileUpload",
"Content-Type": "application/json",
},
)
print(response.json())using System.Net.Http;
using System.Security.Cryptography;
using System.Text;
using System.Text.Json;
// Get your API credentials from your billware customer area
const string apiAppId = "your-app-id";
const string apiSecret = "your-api-secret";
var payload = JsonSerializer.Serialize(new
{
expense_ident = "0nzgcohs25s4y7zv",
file_url = "https://www.example.com/rechnungen/RE-2026-0815.pdf"
});
// The HMAC is calculated over the exact request body that is sent
using var hmac = new HMACSHA256(Encoding.UTF8.GetBytes(apiSecret));
var signature = Convert.ToBase64String(hmac.ComputeHash(Encoding.UTF8.GetBytes(payload)));
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://www.billware.de/api/v1")
{
Content = new StringContent(payload, Encoding.UTF8, "application/json")
};
request.Headers.Add("X-Bw-Hmac", $"{apiAppId}:{signature}");
request.Headers.Add("X-Bw-Method", "expense.fileUpload");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());Rückgabewerte
| Felder | Beschreibung |
|---|---|
| href | Link zum Herunterladen der Datei. Er funktioniert ohne Anmeldung, gib ihn also nur an Berechtigte weiter. |
| file_ident | Kennung der Datei |
| parent_ident | Kennung des Datensatzes, zu dem die Datei gehört |
| file_user_name | Der Dateiname, wie du ihn gesendet hast |
| file_name | Der Name, unter dem billware die Datei speichert |
| file_extension | Endung der Datei, z. B. pdf |
| reference_nr | Nummer des Datensatzes, zu dem die Datei gehört, so wie sie beim Hochladen war |
| date_updated | Zeitpunkt des Hochladens in Serverzeit (UTC) |
Beispielantworten
// SUCCESS
{
"response": true,
"data": {
"href": "https://www.billware.de/file?t=...",
"file_ident": "71ahxmkcu6ockdzd",
"controller": "expense",
"parent_ident": "0nzgcohs25s4y7zv",
"file_name": "file_8ebbc5cc9f30521b4fcb3d259befdb66985c146e.pdf",
"file_user_name": "Rechnung RE-2026-0815.pdf",
"file_type": "user",
"file_extension": "pdf",
"reference_nr": "AG-0001",
"date_updated": "2026-11-16 10:30:10",
"date_updated_user": "16.11.2026"
},
"message": "File uploaded"
}
// ERROR
{
"response": false,
"data": null,
"message": "Only PDF, XML, JPG, PNG and TXT files are accepted"
}
expense.fileDelete
Löscht den Beleg einer Ausgabe.Daten
| Felder | Beschreibung | Erlaubte Werte |
|---|---|---|
| expense_ident Pflicht | Kennung der Ausgabe | String |
| file_ident | Kennung des Belegs. Sie ist nicht nötig, weil eine Ausgabe nur einen Beleg hat. Sendest du sie, muss sie zu diesem Beleg gehören. | String |
Codebeispiele
# Get your API credentials from your billware customer area
API_APPID="your-app-id"
API_SECRET="your-api-secret"
PAYLOAD='{"expense_ident":"0nzgcohs25s4y7zv"}'
# The HMAC is calculated over the exact request body that is sent
HMAC=$(printf '%s' "$PAYLOAD" | openssl dgst -sha256 -hmac "$API_SECRET" -binary | base64)
curl -X POST "https://www.billware.de/api/v1" \
-H "X-Bw-Hmac: $API_APPID:$HMAC" \
-H "X-Bw-Method: expense.fileDelete" \
-H "Content-Type: application/json" \
-d "$PAYLOAD"<?php
// Get your API credentials from your billware customer area
$apiAppId = 'your-app-id';
$apiSecret = 'your-api-secret';
$payload = json_encode([
'expense_ident' => '0nzgcohs25s4y7zv',
]);
// The HMAC is calculated over the exact request body that is sent
$hmac = base64_encode(hash_hmac('sha256', $payload, $apiSecret, true));
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://www.billware.de/api/v1',
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $payload,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Bw-Hmac: '.$apiAppId.':'.$hmac,
'X-Bw-Method: expense.fileDelete',
'Content-Type: application/json',
],
]);
$response = curl_exec($curl);
curl_close($curl);
print_r(json_decode($response, true));import crypto from 'node:crypto';
// Get your API credentials from your billware customer area
const apiAppId = 'your-app-id';
const apiSecret = 'your-api-secret';
const payload = JSON.stringify({
"expense_ident": "0nzgcohs25s4y7zv"
});
// The HMAC is calculated over the exact request body that is sent
const hmac = crypto.createHmac('sha256', apiSecret).update(payload).digest('base64');
const response = await fetch('https://www.billware.de/api/v1', {
method: 'POST',
headers: {
'X-Bw-Hmac': `${apiAppId}:${hmac}`,
'X-Bw-Method': 'expense.fileDelete',
'Content-Type': 'application/json'
},
body: payload
});
console.log(await response.json());import base64
import hashlib
import hmac
import json
import requests
# Get your API credentials from your billware customer area
api_appid = "your-app-id"
api_secret = "your-api-secret"
payload = json.dumps({
"expense_ident": "0nzgcohs25s4y7zv",
})
# The HMAC is calculated over the exact request body that is sent
signature = base64.b64encode(
hmac.new(api_secret.encode(), payload.encode(), hashlib.sha256).digest()
).decode()
response = requests.post(
"https://www.billware.de/api/v1",
data=payload,
headers={
"X-Bw-Hmac": f"{api_appid}:{signature}",
"X-Bw-Method": "expense.fileDelete",
"Content-Type": "application/json",
},
)
print(response.json())using System.Net.Http;
using System.Security.Cryptography;
using System.Text;
using System.Text.Json;
// Get your API credentials from your billware customer area
const string apiAppId = "your-app-id";
const string apiSecret = "your-api-secret";
var payload = JsonSerializer.Serialize(new
{
expense_ident = "0nzgcohs25s4y7zv"
});
// The HMAC is calculated over the exact request body that is sent
using var hmac = new HMACSHA256(Encoding.UTF8.GetBytes(apiSecret));
var signature = Convert.ToBase64String(hmac.ComputeHash(Encoding.UTF8.GetBytes(payload)));
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://www.billware.de/api/v1")
{
Content = new StringContent(payload, Encoding.UTF8, "application/json")
};
request.Headers.Add("X-Bw-Hmac", $"{apiAppId}:{signature}");
request.Headers.Add("X-Bw-Method", "expense.fileDelete");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());Rückgabewerte
Die Antwort enthält die Ausgabe im neuen Stand, mit derselben Struktur wie expense.read; file ist dann null.
Beispielantworten
// SUCCESS
{
"response": true,
"data": {
"expense_ident": "0nzgcohs25s4y7zv",
"file": null,
...
},
"message": "File deleted"
}
// ERROR
{
"response": false,
"data": null,
"message": "File not found"
}
Kategorien
Die Kategorien sind für alle Konten dieselben. Eine Kategorie ordnet die Ausgabe in deine Auswertungen ein, zum Beispiel in die Einnahmen-Überschuss-Rechnung. Bei den Kategorien für Abschreibungen (AfA) zählt zusätzlich write_off_years.
| expense_category_ident | Kategorie | Gruppe | Abschreibung (AfA) |
|---|---|---|---|
1541Va0E606695KI |
Fremdleistungen | Nein | |
15KVm4d10x066E95 |
Waren, Rohstoffe und Hilfsstoffe | Nein | |
3kkqyys4uag4kg8p |
AfA auf Büroausstattung (bewegliche Wirtschaftsgüter) | Absetzung für Abnutzung (AfA) | Ja |
x17t13u5ztopaf1u |
AfA auf immaterielle Wirtschaftsgüter | Absetzung für Abnutzung (AfA) | Ja |
thnjv54nvgomnvv3 |
AfA auf Kraftfahrzeuge (bewegliche Wirtschaftsgüter) | Absetzung für Abnutzung (AfA) | Ja |
vod9ym8whckeibhp |
AfA auf unbewegliche Wirtschaftsgüter | Absetzung für Abnutzung (AfA) | Ja |
xbsyq14mv2vj1y2e |
Aufwendungen für geringwertige Wirtschaftsgüter (GWG) | Absetzung für Abnutzung (AfA) | Nein |
6n16yxc40L26l780 |
Bewirtungsaufwendungen | Beschränkt Abziehbar | Nein |
6166h7482030J8eD |
Geschenke | Beschränkt Abziehbar | Nein |
15Yw4xs169m5077H |
Gewerbesteuer | Beschränkt Abziehbar | Nein |
154M1u6E92Rn5077 |
Häusliches Arbeitszimmer | Beschränkt Abziehbar | Nein |
43625Y23071G43d2 |
Sonstige Ausgaben (beschränkt abziehbar) | Beschränkt Abziehbar | Nein |
4A6f27E5V0852V31 |
Verpflegungsmehraufwendungen | Beschränkt Abziehbar | Nein |
30QX8201yk332T90 |
Privatentnahmen | Entnahmen | Nein |
308RVgJ2015339f0 |
Forderungen aus Lieferung und Leistung | Forderungen und Verbindlichkeiten | Nein |
46230n2s00cLl854 |
Verbindlichkeiten aus Lieferung und Leistung | Forderungen und Verbindlichkeiten | Nein |
462Y50pC8d5231za |
Entfernungspauschale | KFZ- und Fahrtkosten | Nein |
61666780M3308H46 |
Fahrtkosten für außerbetriebliche Fahrzeuge | KFZ- und Fahrtkosten | Nein |
15416zH950Qmk7l7 |
Fahrtkosten Wohnung-Arbeit | KFZ- und Fahrtkosten | Nein |
6j16402367X3x80P |
Leasingkosten | KFZ- und Fahrtkosten | Nein |
462H50852JG33i1m |
Reperaturen und Wartungen | KFZ- und Fahrtkosten | Nein |
6rq16n6780YZ30j8 |
Sonstige Fahrtkosten | KFZ- und Fahrtkosten | Nein |
61640KQa26X7X8S0 |
Steuern, Versicherungen und Maut | KFZ- und Fahrtkosten | Nein |
61u6E4702n66u780 |
Gehälter | Personalausgaben | Nein |
46250Ac85k231QQi |
Lohn- und Kirchensteuer | Personalausgaben | Nein |
1p5d4t21S00669Q5 |
Reisekosten Arbeitnehmer | Personalausgaben | Nein |
15ta41x006CJ695H |
Sozialversicherungen | Personalausgaben | Nein |
1Dp54X169505n77t |
Aufwendungen für doppelte Haushaltsführung | Raumkosten | Nein |
30n8Ab20Hn1339i0 |
Miete | Raumkosten | Nein |
1D541p0063698ak5 |
Nebenkosten | Raumkosten | Nein |
3w50v8l339IF0154 |
An das Finanzamt gezahlte Umsatzsteuer | Unbeschränkt abziehbare Ausgaben | Nein |
9y3kp4yx4ay4ythj |
Arbeitsmittel (Bürobedarf, Porto, Reparatur) | Unbeschränkt abziehbare Ausgaben | Nein |
616h4026j7810yA8 |
Bank- und Finanzkosten | Unbeschränkt abziehbare Ausgaben | Nein |
1L541e6b9q50L7k7 |
Beiträge, Gebühren und Abgaben | Unbeschränkt abziehbare Ausgaben | Nein |
306820h1R33790Ap |
Büroausstattung und -bedarf | Unbeschränkt abziehbare Ausgaben | Nein |
bjn4bnjh9h90fxcb |
Einfuhrumsatzsteuer | Unbeschränkt abziehbare Ausgaben | Nein |
30U8j33a90154Wwu |
Fortbildungskosten | Unbeschränkt abziehbare Ausgaben | Nein |
616678G7aeDn0308 |
Gezahlte Vorsteuerbeträge | Unbeschränkt abziehbare Ausgaben | Nein |
pfysr7ryoq6j90nv |
Kosten für Verpackung und Transport | Unbeschränkt abziehbare Ausgaben | Nein |
jj7mduecx9okfsot |
Laufende EDV-Kosten (Beratung, Wartung, Reparatur) | Unbeschränkt abziehbare Ausgaben | Nein |
462wx5cF0985231B |
Miete und Leasing | Unbeschränkt abziehbare Ausgaben | Nein |
15P43tk169C5k077 |
Rechts-, Steuerberatung und Buchführung | Unbeschränkt abziehbare Ausgaben | Nein |
46Bx2U5085N23I1U |
Schuldzinsen zur Finanzierung | Unbeschränkt abziehbare Ausgaben | Nein |
15n4XP1m0066Tt95 |
Soft- und Hardware | Unbeschränkt abziehbare Ausgaben | Nein |
6164q0P2F678aDY0 |
Sonstige Ausgaben (unbeschränkt abziehbar) | Unbeschränkt abziehbare Ausgaben | Nein |
30833V901Ca5vYE4 |
Sonstige Schuldzinsen | Unbeschränkt abziehbare Ausgaben | Nein |
6N16FC5640267w80 |
Telefon und Internet | Unbeschränkt abziehbare Ausgaben | Nein |
4623p0200X85v20R |
Übernachtungs- und Reisenebenkosten - Unternehmer | Unbeschränkt abziehbare Ausgaben | Nein |
13a5pm541006F695 |
Versicherungen | Unbeschränkt abziehbare Ausgaben | Nein |
4w6Yr238020C085Q |
Werbekosten | Unbeschränkt abziehbare Ausgaben | Nein |