@kreiseck/kasseneck-api 0.15.0 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +46 -0
- package/README.md +45 -0
- package/dist/cjs/client/aufrufe.d.ts +1 -1
- package/dist/cjs/client/aufrufe.js +2 -0
- package/dist/cjs/rechnung/api.d.ts +10 -3
- package/dist/cjs/rechnung/api.js +3 -1
- package/dist/cjs/rechnung/endpunkte.d.ts +19 -4
- package/dist/cjs/rechnung/endpunkte.js +37 -3
- package/dist/cjs/rechnung/index.d.ts +4 -3
- package/dist/cjs/rechnung/index.js +10 -1
- package/dist/cjs/rechnung/texte.d.ts +202 -0
- package/dist/cjs/rechnung/texte.js +377 -0
- package/dist/cjs/rechnung/typen.d.ts +37 -2
- package/dist/cjs/rechnung/vertrag.d.ts +40 -2
- package/dist/cjs/rechnung/vertrag.js +166 -2
- package/dist/esm/client/aufrufe.d.ts +1 -1
- package/dist/esm/client/aufrufe.js +2 -0
- package/dist/esm/rechnung/api.d.ts +10 -3
- package/dist/esm/rechnung/api.js +4 -2
- package/dist/esm/rechnung/endpunkte.d.ts +19 -4
- package/dist/esm/rechnung/endpunkte.js +35 -3
- package/dist/esm/rechnung/index.d.ts +4 -3
- package/dist/esm/rechnung/index.js +3 -2
- package/dist/esm/rechnung/texte.d.ts +202 -0
- package/dist/esm/rechnung/texte.js +373 -0
- package/dist/esm/rechnung/typen.d.ts +37 -2
- package/dist/esm/rechnung/vertrag.d.ts +40 -2
- package/dist/esm/rechnung/vertrag.js +165 -1
- package/fixtures/hobex-hps-codes.json +1 -1
- package/fixtures/kasse-texte.json +1 -1
- package/fixtures/oberflaeche.json +76 -3
- package/fixtures/rechnung-api-beispiele/brands-ok.json +8 -0
- package/fixtures/rechnung-api-beispiele/issue-englisch.json +30 -0
- package/fixtures/rechnung-api-beispiele/issue-fehler-einheit.json +26 -0
- package/fixtures/rechnung-api-beispiele/issue-fehler-sprache.json +26 -0
- package/fixtures/rechnung-api-beispiele/issue-netto-20.json +1 -1
- package/fixtures/rechnung-api-beispiele/setup-status-fehler-feld.json +14 -0
- package/fixtures/rechnung-api-beispiele/setup-status-ok.json +8 -0
- package/fixtures/rechnung-api.schema.json +151 -6
- package/fixtures/rechnung-texte.json +424 -0
- package/package.json +2 -1
|
@@ -30,6 +30,8 @@ export const RECHNUNG_AUFRUFE = [
|
|
|
30
30
|
'listInvoices',
|
|
31
31
|
'getInvoicePdf',
|
|
32
32
|
'getInvoiceXml',
|
|
33
|
+
'getInvoiceSetupStatus',
|
|
34
|
+
'listBrands',
|
|
33
35
|
];
|
|
34
36
|
/**
|
|
35
37
|
* Stabile Fehlercodes. Das Fremdsystem verzweigt am Code, der Text darf sich
|
|
@@ -51,6 +53,10 @@ export const INVOICE_ERROR_CODES = [
|
|
|
51
53
|
'partial_credit_exists',
|
|
52
54
|
'credit_exceeds_invoice',
|
|
53
55
|
'einvoice_incomplete',
|
|
56
|
+
'invoice_api_not_enabled',
|
|
57
|
+
'invoice_setup_incomplete',
|
|
58
|
+
'language_not_allowed',
|
|
59
|
+
'brand_not_found',
|
|
54
60
|
];
|
|
55
61
|
/** Gruende einer Gutschrift. Der Server druckt den deutschen Anzeigetext. */
|
|
56
62
|
export const CREDIT_NOTE_REASONS = [
|
|
@@ -67,6 +73,153 @@ export const CUSTOMER_TYPES = ['private', 'company'];
|
|
|
67
73
|
export const INVOICE_LIST_STATUS = ['final', 'paid', 'cancelled', 'open', 'overdue'];
|
|
68
74
|
export const DOC_TYPES = ['RE', 'GU'];
|
|
69
75
|
export const EINVOICE_FORMATS = ['ubl', 'cii'];
|
|
76
|
+
/**
|
|
77
|
+
* Sprachen einer Rechnung. Die Sprache wird beim Festschreiben eingefroren;
|
|
78
|
+
* fehlt sie an Kunde oder Rechnung, gilt `de`. Behoerden bekommen immer `de`
|
|
79
|
+
* (`language_not_allowed`). Datum und Betraege bleiben in jeder Sprache
|
|
80
|
+
* oesterreichisch formatiert.
|
|
81
|
+
*/
|
|
82
|
+
export const INVOICE_LANGUAGES = ['de', 'en'];
|
|
83
|
+
/**
|
|
84
|
+
* Einheiten einer Position. Die API nimmt nur diese Schluessel an; gedruckt
|
|
85
|
+
* wird das Kuerzel in der Sprache der Rechnung (`RECHNUNG_TEXTE`,
|
|
86
|
+
* `einheit.<schluessel>`), die E-Rechnung fuehrt den UN/ECE-Code
|
|
87
|
+
* (`RECHNUNG_EINHEITEN_CODES`). Ohne Angabe gilt `piece`.
|
|
88
|
+
*/
|
|
89
|
+
export const INVOICE_UNITS = [
|
|
90
|
+
'piece',
|
|
91
|
+
'pair',
|
|
92
|
+
'set',
|
|
93
|
+
'dozen',
|
|
94
|
+
'second',
|
|
95
|
+
'minute',
|
|
96
|
+
'hour',
|
|
97
|
+
'day',
|
|
98
|
+
'night',
|
|
99
|
+
'week',
|
|
100
|
+
'month',
|
|
101
|
+
'quarter',
|
|
102
|
+
'half_year',
|
|
103
|
+
'year',
|
|
104
|
+
'milligram',
|
|
105
|
+
'gram',
|
|
106
|
+
'kilogram',
|
|
107
|
+
'tonne',
|
|
108
|
+
'millimetre',
|
|
109
|
+
'centimetre',
|
|
110
|
+
'metre',
|
|
111
|
+
'running_metre',
|
|
112
|
+
'kilometre',
|
|
113
|
+
'square_metre',
|
|
114
|
+
'hectare',
|
|
115
|
+
'millilitre',
|
|
116
|
+
'litre',
|
|
117
|
+
'cubic_metre',
|
|
118
|
+
'kilowatt_hour',
|
|
119
|
+
'megawatt_hour',
|
|
120
|
+
'gigabyte',
|
|
121
|
+
'terabyte',
|
|
122
|
+
'flat_rate',
|
|
123
|
+
'person',
|
|
124
|
+
'licence',
|
|
125
|
+
'user',
|
|
126
|
+
'device',
|
|
127
|
+
'session',
|
|
128
|
+
'trip',
|
|
129
|
+
'page',
|
|
130
|
+
'sheet',
|
|
131
|
+
'package',
|
|
132
|
+
'box',
|
|
133
|
+
'carton',
|
|
134
|
+
'bottle',
|
|
135
|
+
'can',
|
|
136
|
+
'roll',
|
|
137
|
+
'bag',
|
|
138
|
+
'pallet',
|
|
139
|
+
];
|
|
140
|
+
/**
|
|
141
|
+
* UN/ECE-Code je Einheit (Recommendation 20, Verpackungen aus Recommendation 21
|
|
142
|
+
* mit `X`). Mehrere Einheiten duerfen denselben Code tragen (Meter und
|
|
143
|
+
* Laufmeter; Lizenz, Benutzer, Geraet als Stueck). Die Validatoren der
|
|
144
|
+
* E-Rechnung pruefen jeden Code im Backend (Beispiel `api-einheiten`).
|
|
145
|
+
*/
|
|
146
|
+
export const RECHNUNG_EINHEITEN_CODES = Object.freeze({
|
|
147
|
+
piece: 'C62',
|
|
148
|
+
pair: 'PR',
|
|
149
|
+
set: 'SET',
|
|
150
|
+
dozen: 'DZN',
|
|
151
|
+
second: 'SEC',
|
|
152
|
+
minute: 'MIN',
|
|
153
|
+
hour: 'HUR',
|
|
154
|
+
day: 'DAY',
|
|
155
|
+
night: 'C62',
|
|
156
|
+
week: 'WEE',
|
|
157
|
+
month: 'MON',
|
|
158
|
+
quarter: 'QAN',
|
|
159
|
+
half_year: 'SAN',
|
|
160
|
+
year: 'ANN',
|
|
161
|
+
milligram: 'MGM',
|
|
162
|
+
gram: 'GRM',
|
|
163
|
+
kilogram: 'KGM',
|
|
164
|
+
tonne: 'TNE',
|
|
165
|
+
millimetre: 'MMT',
|
|
166
|
+
centimetre: 'CMT',
|
|
167
|
+
metre: 'MTR',
|
|
168
|
+
running_metre: 'MTR',
|
|
169
|
+
kilometre: 'KMT',
|
|
170
|
+
square_metre: 'MTK',
|
|
171
|
+
// Rec 20 fuehrt fuer Hektar HAR, EN 16931 laesst davon nur H18
|
|
172
|
+
// („square hectometre", Synonym hectare) zu.
|
|
173
|
+
hectare: 'H18',
|
|
174
|
+
millilitre: 'MLT',
|
|
175
|
+
litre: 'LTR',
|
|
176
|
+
cubic_metre: 'MTQ',
|
|
177
|
+
kilowatt_hour: 'KWH',
|
|
178
|
+
megawatt_hour: 'MWH',
|
|
179
|
+
gigabyte: 'E34',
|
|
180
|
+
terabyte: 'E35',
|
|
181
|
+
flat_rate: 'LS',
|
|
182
|
+
person: 'IE',
|
|
183
|
+
licence: 'C62',
|
|
184
|
+
user: 'C62',
|
|
185
|
+
device: 'C62',
|
|
186
|
+
session: 'C62',
|
|
187
|
+
trip: 'C62',
|
|
188
|
+
page: 'ZP',
|
|
189
|
+
// Ebenso: ST („sheet") steht nicht in der Liste von EN 16931, LEF („leaf") schon.
|
|
190
|
+
sheet: 'LEF',
|
|
191
|
+
package: 'XPK',
|
|
192
|
+
box: 'XBX',
|
|
193
|
+
carton: 'XCT',
|
|
194
|
+
bottle: 'XBO',
|
|
195
|
+
can: 'XCA',
|
|
196
|
+
roll: 'XRO',
|
|
197
|
+
bag: 'XSA',
|
|
198
|
+
pallet: 'XPX',
|
|
199
|
+
});
|
|
200
|
+
/**
|
|
201
|
+
* Was erfuellt sein muss, bevor ueber die API ausgestellt werden darf — in
|
|
202
|
+
* dieser Reihenfolge meldet `getInvoiceSetupStatus`, was fehlt, und dieselben
|
|
203
|
+
* Schluessel stehen in `invoice_setup_incomplete`.
|
|
204
|
+
*
|
|
205
|
+
* - `module_active` Modul Rechnung aktiv
|
|
206
|
+
* - `api_enabled` Rechnungs-API fuer das Konto von Kasseneck freigegeben (nur live)
|
|
207
|
+
* - `live_enabled` Konto live freigeschaltet (nur live)
|
|
208
|
+
* - `business_name`, `address`, `vat_id` Pflichtangaben des Ausstellers (§ 11 UStG;
|
|
209
|
+
* `vat_id` entfaellt bei Kleinunternehmern)
|
|
210
|
+
* - `bank_account` IBAN und Kontoinhaber
|
|
211
|
+
* - `number_format` Rechnungsnummern-Format bewusst gespeichert
|
|
212
|
+
*/
|
|
213
|
+
export const INVOICE_SETUP_REQUIREMENTS = [
|
|
214
|
+
'module_active',
|
|
215
|
+
'api_enabled',
|
|
216
|
+
'live_enabled',
|
|
217
|
+
'business_name',
|
|
218
|
+
'address',
|
|
219
|
+
'vat_id',
|
|
220
|
+
'bank_account',
|
|
221
|
+
'number_format',
|
|
222
|
+
];
|
|
70
223
|
const text = (max, pflicht = false, extra = {}) => ({ typ: 'string', pflicht, max, ...(pflicht && extra.min === undefined ? { min: 1 } : {}), ...extra });
|
|
71
224
|
const idempotencyKey = (pflicht) => ({ typ: 'string', pflicht, min: 1, max: 120 });
|
|
72
225
|
const id = { typ: 'string', pflicht: false, min: 1, max: 128 };
|
|
@@ -91,6 +244,8 @@ export const KUNDE_FELDER = Object.freeze({
|
|
|
91
244
|
isAuthority: { typ: 'boolean', pflicht: false },
|
|
92
245
|
note: text(1000),
|
|
93
246
|
externalId: { typ: 'string', pflicht: false, min: 1, max: 120 },
|
|
247
|
+
/** Sprache der Rechnungen an diesen Kunden; fehlt = `de`. */
|
|
248
|
+
language: { typ: 'enum', pflicht: false, werte: INVOICE_LANGUAGES },
|
|
94
249
|
});
|
|
95
250
|
/** Beim Aendern ist jedes Kundenfeld optional. */
|
|
96
251
|
const KUNDE_PATCH = Object.freeze(Object.fromEntries(Object.entries(KUNDE_FELDER).map(([name, feld]) => [name, { ...feld, pflicht: false }])));
|
|
@@ -99,7 +254,8 @@ export const POSITION_FELDER = Object.freeze({
|
|
|
99
254
|
description: text(300, true),
|
|
100
255
|
subtitle: text(1000),
|
|
101
256
|
quantity: { typ: 'number', pflicht: true, min: 0, exklusivMin: true, max: 1_000_000, nachkomma: 3 },
|
|
102
|
-
|
|
257
|
+
/** Einheit aus `INVOICE_UNITS`; ohne Angabe `piece`. */
|
|
258
|
+
unit: { typ: 'enum', pflicht: false, werte: INVOICE_UNITS },
|
|
103
259
|
unitPriceCents: { typ: 'integer', pflicht: true, min: 0, max: 100_000_000 },
|
|
104
260
|
vatRate: { typ: 'enum', pflicht: true, werte: VAT_RATES },
|
|
105
261
|
discountPct: { typ: 'number', pflicht: false, min: 0, max: 100, nachkomma: 2 },
|
|
@@ -142,6 +298,10 @@ export const RECHNUNG_ANFRAGEN = Object.freeze({
|
|
|
142
298
|
tracking: { typ: 'boolean', pflicht: false },
|
|
143
299
|
items: positionen,
|
|
144
300
|
metadata: { typ: 'map', pflicht: false, maxSchluessel: 20, schluesselMuster: '^[a-zA-Z0-9_]{1,40}$', wertMax: 500 },
|
|
301
|
+
/** Sprache dieser Rechnung; sonst die des Kunden, sonst `de`. */
|
|
302
|
+
language: { typ: 'enum', pflicht: false, werte: INVOICE_LANGUAGES },
|
|
303
|
+
/** Marke (Kennung aus `listBrands`); sonst die Standardmarke. */
|
|
304
|
+
brandId: id,
|
|
145
305
|
},
|
|
146
306
|
cancelInvoice: {
|
|
147
307
|
idempotencyKey: idempotencyKey(true),
|
|
@@ -171,11 +331,15 @@ export const RECHNUNG_ANFRAGEN = Object.freeze({
|
|
|
171
331
|
},
|
|
172
332
|
getInvoicePdf: {
|
|
173
333
|
invoiceId: idPflicht,
|
|
334
|
+
/** Andere Sprache als die der Rechnung: gekennzeichnete Uebersetzungskopie, keine eigene Rechnung. */
|
|
335
|
+
language: { typ: 'enum', pflicht: false, werte: INVOICE_LANGUAGES },
|
|
174
336
|
},
|
|
175
337
|
getInvoiceXml: {
|
|
176
338
|
invoiceId: idPflicht,
|
|
177
339
|
format: { typ: 'enum', pflicht: false, werte: EINVOICE_FORMATS },
|
|
178
340
|
},
|
|
341
|
+
getInvoiceSetupStatus: {},
|
|
342
|
+
listBrands: {},
|
|
179
343
|
});
|
|
180
344
|
/** Genau eines dieser Felder muss gesetzt sein (je Aufruf, je Gruppe). */
|
|
181
345
|
export const RECHNUNG_GENAU_EINS = Object.freeze({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.
|
|
2
|
+
"version": "0.17.0",
|
|
3
3
|
"aufrufe": [
|
|
4
4
|
"activateCashregister",
|
|
5
5
|
"cancelInvoice",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"getFirstReceiptDate",
|
|
26
26
|
"getInvoice",
|
|
27
27
|
"getInvoicePdf",
|
|
28
|
+
"getInvoiceSetupStatus",
|
|
28
29
|
"getInvoiceXml",
|
|
29
30
|
"getKasseSettings",
|
|
30
31
|
"getPartnerCustomer",
|
|
@@ -36,6 +37,7 @@
|
|
|
36
37
|
"issueInvoice",
|
|
37
38
|
"listCustomerCashregisters",
|
|
38
39
|
"listInvoices",
|
|
40
|
+
"listBrands",
|
|
39
41
|
"listMyArticleGroups",
|
|
40
42
|
"listMyArticles",
|
|
41
43
|
"listMyCashregisters",
|
|
@@ -395,7 +397,15 @@
|
|
|
395
397
|
"not_cancellable",
|
|
396
398
|
"partial_credit_exists",
|
|
397
399
|
"credit_exceeds_invoice",
|
|
398
|
-
"einvoice_incomplete"
|
|
400
|
+
"einvoice_incomplete",
|
|
401
|
+
"invoice_api_not_enabled",
|
|
402
|
+
"invoice_setup_incomplete",
|
|
403
|
+
"language_not_allowed",
|
|
404
|
+
"brand_not_found"
|
|
405
|
+
],
|
|
406
|
+
"invoiceLanguages": [
|
|
407
|
+
"de",
|
|
408
|
+
"en"
|
|
399
409
|
],
|
|
400
410
|
"invoiceListStatus": [
|
|
401
411
|
"final",
|
|
@@ -404,6 +414,67 @@
|
|
|
404
414
|
"open",
|
|
405
415
|
"overdue"
|
|
406
416
|
],
|
|
417
|
+
"invoiceSetupRequirements": [
|
|
418
|
+
"module_active",
|
|
419
|
+
"api_enabled",
|
|
420
|
+
"live_enabled",
|
|
421
|
+
"business_name",
|
|
422
|
+
"address",
|
|
423
|
+
"vat_id",
|
|
424
|
+
"bank_account",
|
|
425
|
+
"number_format"
|
|
426
|
+
],
|
|
427
|
+
"invoiceUnits": [
|
|
428
|
+
"piece",
|
|
429
|
+
"pair",
|
|
430
|
+
"set",
|
|
431
|
+
"dozen",
|
|
432
|
+
"second",
|
|
433
|
+
"minute",
|
|
434
|
+
"hour",
|
|
435
|
+
"day",
|
|
436
|
+
"night",
|
|
437
|
+
"week",
|
|
438
|
+
"month",
|
|
439
|
+
"quarter",
|
|
440
|
+
"half_year",
|
|
441
|
+
"year",
|
|
442
|
+
"milligram",
|
|
443
|
+
"gram",
|
|
444
|
+
"kilogram",
|
|
445
|
+
"tonne",
|
|
446
|
+
"millimetre",
|
|
447
|
+
"centimetre",
|
|
448
|
+
"metre",
|
|
449
|
+
"running_metre",
|
|
450
|
+
"kilometre",
|
|
451
|
+
"square_metre",
|
|
452
|
+
"hectare",
|
|
453
|
+
"millilitre",
|
|
454
|
+
"litre",
|
|
455
|
+
"cubic_metre",
|
|
456
|
+
"kilowatt_hour",
|
|
457
|
+
"megawatt_hour",
|
|
458
|
+
"gigabyte",
|
|
459
|
+
"terabyte",
|
|
460
|
+
"flat_rate",
|
|
461
|
+
"person",
|
|
462
|
+
"licence",
|
|
463
|
+
"user",
|
|
464
|
+
"device",
|
|
465
|
+
"session",
|
|
466
|
+
"trip",
|
|
467
|
+
"page",
|
|
468
|
+
"sheet",
|
|
469
|
+
"package",
|
|
470
|
+
"box",
|
|
471
|
+
"carton",
|
|
472
|
+
"bottle",
|
|
473
|
+
"can",
|
|
474
|
+
"roll",
|
|
475
|
+
"bag",
|
|
476
|
+
"pallet"
|
|
477
|
+
],
|
|
407
478
|
"priceModes": [
|
|
408
479
|
"net",
|
|
409
480
|
"gross"
|
|
@@ -419,7 +490,9 @@
|
|
|
419
490
|
"getInvoice",
|
|
420
491
|
"listInvoices",
|
|
421
492
|
"getInvoicePdf",
|
|
422
|
-
"getInvoiceXml"
|
|
493
|
+
"getInvoiceXml",
|
|
494
|
+
"getInvoiceSetupStatus",
|
|
495
|
+
"listBrands"
|
|
423
496
|
],
|
|
424
497
|
"taxSchemes": [
|
|
425
498
|
"normal",
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"aufruf": "issueInvoice",
|
|
3
|
+
"beschreibung": "Englische Rechnung mit gewählter Marke",
|
|
4
|
+
"anfrage": {
|
|
5
|
+
"idempotencyKey": "bsp-en-1",
|
|
6
|
+
"customerId": "kunde_beispiel",
|
|
7
|
+
"taxScheme": "normal",
|
|
8
|
+
"priceMode": "net",
|
|
9
|
+
"serviceStart": "2026-09-15",
|
|
10
|
+
"language": "en",
|
|
11
|
+
"brandId": "marke_beispiel",
|
|
12
|
+
"items": [
|
|
13
|
+
{
|
|
14
|
+
"description": "Consulting",
|
|
15
|
+
"quantity": 2,
|
|
16
|
+
"unitPriceCents": 5000,
|
|
17
|
+
"vatRate": 20,
|
|
18
|
+
"unit": "hour"
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
"erwartet": {
|
|
23
|
+
"ok": true,
|
|
24
|
+
"totals": {
|
|
25
|
+
"netCents": 10000,
|
|
26
|
+
"vatCents": 2000,
|
|
27
|
+
"grossCents": 12000
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"aufruf": "issueInvoice",
|
|
3
|
+
"beschreibung": "Einheit als freier Text statt Schlüssel",
|
|
4
|
+
"anfrage": {
|
|
5
|
+
"idempotencyKey": "bsp-einheit",
|
|
6
|
+
"taxScheme": "normal",
|
|
7
|
+
"priceMode": "net",
|
|
8
|
+
"serviceStart": "2026-09-15",
|
|
9
|
+
"items": [
|
|
10
|
+
{
|
|
11
|
+
"description": "Beratung",
|
|
12
|
+
"quantity": 2,
|
|
13
|
+
"unit": "Std",
|
|
14
|
+
"unitPriceCents": 5000,
|
|
15
|
+
"vatRate": 20
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
"erwartet": {
|
|
20
|
+
"ok": false,
|
|
21
|
+
"code": "validation",
|
|
22
|
+
"fields": [
|
|
23
|
+
"items[0].unit"
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"aufruf": "issueInvoice",
|
|
3
|
+
"beschreibung": "Unbekannte Sprache",
|
|
4
|
+
"anfrage": {
|
|
5
|
+
"idempotencyKey": "bsp-en-2",
|
|
6
|
+
"taxScheme": "normal",
|
|
7
|
+
"priceMode": "net",
|
|
8
|
+
"serviceStart": "2026-09-15",
|
|
9
|
+
"language": "fr",
|
|
10
|
+
"items": [
|
|
11
|
+
{
|
|
12
|
+
"description": "Beratung",
|
|
13
|
+
"quantity": 1,
|
|
14
|
+
"unitPriceCents": 1000,
|
|
15
|
+
"vatRate": 20
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
"erwartet": {
|
|
20
|
+
"ok": false,
|
|
21
|
+
"code": "validation",
|
|
22
|
+
"fields": [
|
|
23
|
+
"language"
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"title": "Kasseneck Rechnungs-API",
|
|
4
4
|
"version": 1,
|
|
5
|
-
"paket": "0.
|
|
5
|
+
"paket": "0.17.0",
|
|
6
6
|
"aufrufe": {
|
|
7
7
|
"createCustomer": {
|
|
8
8
|
"anfrage": {
|
|
@@ -79,6 +79,12 @@
|
|
|
79
79
|
"type": "string",
|
|
80
80
|
"minLength": 1,
|
|
81
81
|
"maxLength": 120
|
|
82
|
+
},
|
|
83
|
+
"language": {
|
|
84
|
+
"enum": [
|
|
85
|
+
"de",
|
|
86
|
+
"en"
|
|
87
|
+
]
|
|
82
88
|
}
|
|
83
89
|
},
|
|
84
90
|
"required": [
|
|
@@ -204,6 +210,12 @@
|
|
|
204
210
|
"type": "string",
|
|
205
211
|
"minLength": 1,
|
|
206
212
|
"maxLength": 120
|
|
213
|
+
},
|
|
214
|
+
"language": {
|
|
215
|
+
"enum": [
|
|
216
|
+
"de",
|
|
217
|
+
"en"
|
|
218
|
+
]
|
|
207
219
|
}
|
|
208
220
|
},
|
|
209
221
|
"additionalProperties": false
|
|
@@ -350,8 +362,57 @@
|
|
|
350
362
|
"x-decimals": 3
|
|
351
363
|
},
|
|
352
364
|
"unit": {
|
|
353
|
-
"
|
|
354
|
-
|
|
365
|
+
"enum": [
|
|
366
|
+
"piece",
|
|
367
|
+
"pair",
|
|
368
|
+
"set",
|
|
369
|
+
"dozen",
|
|
370
|
+
"second",
|
|
371
|
+
"minute",
|
|
372
|
+
"hour",
|
|
373
|
+
"day",
|
|
374
|
+
"night",
|
|
375
|
+
"week",
|
|
376
|
+
"month",
|
|
377
|
+
"quarter",
|
|
378
|
+
"half_year",
|
|
379
|
+
"year",
|
|
380
|
+
"milligram",
|
|
381
|
+
"gram",
|
|
382
|
+
"kilogram",
|
|
383
|
+
"tonne",
|
|
384
|
+
"millimetre",
|
|
385
|
+
"centimetre",
|
|
386
|
+
"metre",
|
|
387
|
+
"running_metre",
|
|
388
|
+
"kilometre",
|
|
389
|
+
"square_metre",
|
|
390
|
+
"hectare",
|
|
391
|
+
"millilitre",
|
|
392
|
+
"litre",
|
|
393
|
+
"cubic_metre",
|
|
394
|
+
"kilowatt_hour",
|
|
395
|
+
"megawatt_hour",
|
|
396
|
+
"gigabyte",
|
|
397
|
+
"terabyte",
|
|
398
|
+
"flat_rate",
|
|
399
|
+
"person",
|
|
400
|
+
"licence",
|
|
401
|
+
"user",
|
|
402
|
+
"device",
|
|
403
|
+
"session",
|
|
404
|
+
"trip",
|
|
405
|
+
"page",
|
|
406
|
+
"sheet",
|
|
407
|
+
"package",
|
|
408
|
+
"box",
|
|
409
|
+
"carton",
|
|
410
|
+
"bottle",
|
|
411
|
+
"can",
|
|
412
|
+
"roll",
|
|
413
|
+
"bag",
|
|
414
|
+
"pallet"
|
|
415
|
+
]
|
|
355
416
|
},
|
|
356
417
|
"unitPriceCents": {
|
|
357
418
|
"type": "integer",
|
|
@@ -392,6 +453,17 @@
|
|
|
392
453
|
"type": "string",
|
|
393
454
|
"maxLength": 500
|
|
394
455
|
}
|
|
456
|
+
},
|
|
457
|
+
"language": {
|
|
458
|
+
"enum": [
|
|
459
|
+
"de",
|
|
460
|
+
"en"
|
|
461
|
+
]
|
|
462
|
+
},
|
|
463
|
+
"brandId": {
|
|
464
|
+
"type": "string",
|
|
465
|
+
"minLength": 1,
|
|
466
|
+
"maxLength": 128
|
|
395
467
|
}
|
|
396
468
|
},
|
|
397
469
|
"required": [
|
|
@@ -490,8 +562,57 @@
|
|
|
490
562
|
"x-decimals": 3
|
|
491
563
|
},
|
|
492
564
|
"unit": {
|
|
493
|
-
"
|
|
494
|
-
|
|
565
|
+
"enum": [
|
|
566
|
+
"piece",
|
|
567
|
+
"pair",
|
|
568
|
+
"set",
|
|
569
|
+
"dozen",
|
|
570
|
+
"second",
|
|
571
|
+
"minute",
|
|
572
|
+
"hour",
|
|
573
|
+
"day",
|
|
574
|
+
"night",
|
|
575
|
+
"week",
|
|
576
|
+
"month",
|
|
577
|
+
"quarter",
|
|
578
|
+
"half_year",
|
|
579
|
+
"year",
|
|
580
|
+
"milligram",
|
|
581
|
+
"gram",
|
|
582
|
+
"kilogram",
|
|
583
|
+
"tonne",
|
|
584
|
+
"millimetre",
|
|
585
|
+
"centimetre",
|
|
586
|
+
"metre",
|
|
587
|
+
"running_metre",
|
|
588
|
+
"kilometre",
|
|
589
|
+
"square_metre",
|
|
590
|
+
"hectare",
|
|
591
|
+
"millilitre",
|
|
592
|
+
"litre",
|
|
593
|
+
"cubic_metre",
|
|
594
|
+
"kilowatt_hour",
|
|
595
|
+
"megawatt_hour",
|
|
596
|
+
"gigabyte",
|
|
597
|
+
"terabyte",
|
|
598
|
+
"flat_rate",
|
|
599
|
+
"person",
|
|
600
|
+
"licence",
|
|
601
|
+
"user",
|
|
602
|
+
"device",
|
|
603
|
+
"session",
|
|
604
|
+
"trip",
|
|
605
|
+
"page",
|
|
606
|
+
"sheet",
|
|
607
|
+
"package",
|
|
608
|
+
"box",
|
|
609
|
+
"carton",
|
|
610
|
+
"bottle",
|
|
611
|
+
"can",
|
|
612
|
+
"roll",
|
|
613
|
+
"bag",
|
|
614
|
+
"pallet"
|
|
615
|
+
]
|
|
495
616
|
},
|
|
496
617
|
"unitPriceCents": {
|
|
497
618
|
"type": "integer",
|
|
@@ -614,6 +735,12 @@
|
|
|
614
735
|
"type": "string",
|
|
615
736
|
"minLength": 1,
|
|
616
737
|
"maxLength": 128
|
|
738
|
+
},
|
|
739
|
+
"language": {
|
|
740
|
+
"enum": [
|
|
741
|
+
"de",
|
|
742
|
+
"en"
|
|
743
|
+
]
|
|
617
744
|
}
|
|
618
745
|
},
|
|
619
746
|
"required": [
|
|
@@ -643,6 +770,20 @@
|
|
|
643
770
|
],
|
|
644
771
|
"additionalProperties": false
|
|
645
772
|
}
|
|
773
|
+
},
|
|
774
|
+
"getInvoiceSetupStatus": {
|
|
775
|
+
"anfrage": {
|
|
776
|
+
"type": "object",
|
|
777
|
+
"properties": {},
|
|
778
|
+
"additionalProperties": false
|
|
779
|
+
}
|
|
780
|
+
},
|
|
781
|
+
"listBrands": {
|
|
782
|
+
"anfrage": {
|
|
783
|
+
"type": "object",
|
|
784
|
+
"properties": {},
|
|
785
|
+
"additionalProperties": false
|
|
786
|
+
}
|
|
646
787
|
}
|
|
647
788
|
},
|
|
648
789
|
"codes": [
|
|
@@ -660,7 +801,11 @@
|
|
|
660
801
|
"not_cancellable",
|
|
661
802
|
"partial_credit_exists",
|
|
662
803
|
"credit_exceeds_invoice",
|
|
663
|
-
"einvoice_incomplete"
|
|
804
|
+
"einvoice_incomplete",
|
|
805
|
+
"invoice_api_not_enabled",
|
|
806
|
+
"invoice_setup_incomplete",
|
|
807
|
+
"language_not_allowed",
|
|
808
|
+
"brand_not_found"
|
|
664
809
|
],
|
|
665
810
|
"gruende": [
|
|
666
811
|
"cancellation",
|