@genz-its/sevdesk-cli 0.0.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/README.md ADDED
@@ -0,0 +1,800 @@
1
+ # @genz-its/sevdesk-cli
2
+
3
+ Unofficial command-line interface for the [sevdesk](https://sevdesk.de/) API.[^1]
4
+
5
+ ## Features
6
+
7
+ - ๐Ÿงพ **Vouchers**: Create vouchers from receipt files (PDF, image, XML), list, book, reset and enshrine them.
8
+ - ๐Ÿ’ณ **Transactions**: List and filter bank transactions, for example the ones that are not booked yet.
9
+ - ๐Ÿฆ **Check accounts**: List accounts, query balances, and create clearing or file import accounts.
10
+ - ๐Ÿงญ **Receipt guidance**: Find bookable accounts and their allowed tax rules.
11
+ - ๐Ÿ“„ **Documents**: List invoices, credit notes and orders, and download them as PDF.
12
+ - ๐Ÿ“ค **Exports**: Export accounting data in the DATEV format, or contacts, invoices, transactions and vouchers as CSV.
13
+ - ๐Ÿค– **Automation-friendly**: `--json` output on every command, non-interactive mode, and stable exit codes.
14
+
15
+ ## Requirements
16
+
17
+ - Node.js 22 or later.
18
+ - A sevdesk account on bookkeeping system version 2.0 (sevdesk-Update 2.0).
19
+
20
+ ## Installation
21
+
22
+ Install the CLI globally:
23
+
24
+ ```bash
25
+ npm install -g @genz-its/sevdesk-cli
26
+ ```
27
+
28
+ Alternatively, run it without installation:
29
+
30
+ ```bash
31
+ npx @genz-its/sevdesk-cli <command>
32
+ ```
33
+
34
+ ## Quickstart
35
+
36
+ ```bash
37
+ # Log in with your sevdesk API token
38
+ sevdesk login
39
+
40
+ # Verify your setup
41
+ sevdesk doctor
42
+
43
+ # Find a booking account and its allowed tax rules
44
+ sevdesk guidance:accounts --expense
45
+
46
+ # Create an open voucher from a receipt file
47
+ sevdesk vouchers:create --file receipt.pdf --supplier-name "ACME GmbH" --amount 119 --tax-rule 9 --account-datev 26
48
+
49
+ # List unbooked bank transactions
50
+ sevdesk transactions:list --unbooked
51
+
52
+ # Book the voucher against a bank transaction
53
+ sevdesk vouchers:book --id 123 --amount 119 --check-account 1 --transaction 456
54
+ ```
55
+
56
+ ## Authentication
57
+
58
+ Run [`sevdesk login`](#login) to validate and store your API token. You can find the token in your sevdesk account under **Settings > User > API token**.
59
+
60
+ The token is resolved in the following order:
61
+
62
+ 1. The `SEVDESK_TOKEN` environment variable.
63
+ 2. The config file written by `sevdesk login` (`~/.config/sevdesk/config.json`, respecting `XDG_CONFIG_HOME`).
64
+
65
+ In CI or other automated environments, prefer the `SEVDESK_TOKEN` environment variable over storing the token on disk.
66
+
67
+ ## Scripting
68
+
69
+ The CLI is designed to be scriptable:
70
+
71
+ - **`--json`**: Every command supports the `--json` flag to output machine-readable JSON.
72
+ - **Non-interactive mode**: When the CLI runs without a TTY or with the `CI` environment variable set, it never prompts. Missing required values cause an error and exit code `1` instead.
73
+ - **`--yes`**: Commands that ask for confirmation accept `--yes` to skip the prompt.
74
+ - **Exit codes**: `0` on success, `1` on any failure.
75
+
76
+ ```bash
77
+ # Example: print the IDs of all unbooked transactions
78
+ sevdesk transactions:list --unbooked --json | jq -r '.[].id'
79
+ ```
80
+
81
+ ## Commands
82
+
83
+ - [`login`](#login)
84
+ - [`logout`](#logout)
85
+ - [`doctor`](#doctor)
86
+ - [`accounts:balance`](#accountsbalance)
87
+ - [`accounts:create-clearing`](#accountscreate-clearing)
88
+ - [`accounts:create-file-import`](#accountscreate-file-import)
89
+ - [`accounts:get`](#accountsget)
90
+ - [`accounts:list`](#accountslist)
91
+ - [`contacts:create`](#contactscreate)
92
+ - [`contacts:delete`](#contactsdelete)
93
+ - [`contacts:get`](#contactsget)
94
+ - [`contacts:list`](#contactslist)
95
+ - [`contacts:update`](#contactsupdate)
96
+ - [`credit-notes:get`](#credit-notesget)
97
+ - [`credit-notes:list`](#credit-noteslist)
98
+ - [`credit-notes:pdf`](#credit-notespdf)
99
+ - [`export:contacts`](#exportcontacts)
100
+ - [`export:datev`](#exportdatev)
101
+ - [`export:invoices`](#exportinvoices)
102
+ - [`export:transactions`](#exporttransactions)
103
+ - [`export:vouchers`](#exportvouchers)
104
+ - [`guidance:accounts`](#guidanceaccounts)
105
+ - [`invoices:get`](#invoicesget)
106
+ - [`invoices:list`](#invoiceslist)
107
+ - [`invoices:pdf`](#invoicespdf)
108
+ - [`orders:get`](#ordersget)
109
+ - [`orders:list`](#orderslist)
110
+ - [`orders:pdf`](#orderspdf)
111
+ - [`parts:get`](#partsget)
112
+ - [`parts:list`](#partslist)
113
+ - [`tags:create`](#tagscreate)
114
+ - [`tags:delete`](#tagsdelete)
115
+ - [`tags:list`](#tagslist)
116
+ - [`transactions:create`](#transactionscreate)
117
+ - [`transactions:get`](#transactionsget)
118
+ - [`transactions:list`](#transactionslist)
119
+ - [`vouchers:book`](#vouchersbook)
120
+ - [`vouchers:create`](#voucherscreate)
121
+ - [`vouchers:enshrine`](#vouchersenshrine)
122
+ - [`vouchers:get`](#vouchersget)
123
+ - [`vouchers:list`](#voucherslist)
124
+ - [`vouchers:reset-to-draft`](#vouchersreset-to-draft)
125
+ - [`vouchers:reset-to-open`](#vouchersreset-to-open)
126
+
127
+ ### `login`
128
+
129
+ Log in with your sevdesk API token. The token is validated against the sevdesk API and stored in the config file. Accounts on bookkeeping system version 1.0 are rejected.
130
+
131
+ ```bash
132
+ sevdesk login [options]
133
+ ```
134
+
135
+ **Options:**
136
+
137
+ - `--token`: The sevdesk API token. If omitted, you will be prompted.
138
+
139
+ ### `logout`
140
+
141
+ Log out by removing the stored API token.
142
+
143
+ ```bash
144
+ sevdesk logout
145
+ ```
146
+
147
+ ### `doctor`
148
+
149
+ Check the CLI setup and the connection to the sevdesk API.
150
+
151
+ ```bash
152
+ sevdesk doctor [options]
153
+ ```
154
+
155
+ **Options:**
156
+
157
+ - `--json`: Output in JSON format.
158
+
159
+ ### `accounts:balance`
160
+
161
+ Show the balance of a check account at a given date. The balance is the sum of all transactions known to sevdesk, which is not necessarily the real bank balance.
162
+
163
+ ```bash
164
+ sevdesk accounts:balance [options]
165
+ ```
166
+
167
+ **Options:**
168
+
169
+ - `--id`: The check account ID. If omitted, you will be prompted.
170
+ - `--date`: The date to calculate the balance for (`YYYY-MM-DD`). Defaults to today.
171
+ - `--json`: Output in JSON format.
172
+
173
+ ### `accounts:create-clearing`
174
+
175
+ Create a clearing check account.
176
+
177
+ ```bash
178
+ sevdesk accounts:create-clearing [options]
179
+ ```
180
+
181
+ **Options:**
182
+
183
+ - `--name`: The name of the check account. If omitted, you will be prompted.
184
+ - `--accounting-number`: The booking account number of the check account.
185
+ - `--json`: Output in JSON format.
186
+
187
+ ### `accounts:create-file-import`
188
+
189
+ Create a check account that imports its transactions from files.
190
+
191
+ ```bash
192
+ sevdesk accounts:create-file-import [options]
193
+ ```
194
+
195
+ **Options:**
196
+
197
+ - `--name`: The name of the check account. If omitted, you will be prompted.
198
+ - `--import-type`: The file format used to import transactions. Supported values are `CSV` and `MT940`. Defaults to `CSV`.
199
+ - `--accounting-number`: The booking account number of the check account.
200
+ - `--iban`: The IBAN of the check account.
201
+ - `--json`: Output in JSON format.
202
+
203
+ ### `accounts:get`
204
+
205
+ Show a single check account.
206
+
207
+ ```bash
208
+ sevdesk accounts:get [options]
209
+ ```
210
+
211
+ **Options:**
212
+
213
+ - `--id`: The check account ID. If omitted, you will be prompted.
214
+ - `--json`: Output in JSON format.
215
+
216
+ ### `accounts:list`
217
+
218
+ List your check accounts.
219
+
220
+ ```bash
221
+ sevdesk accounts:list [options]
222
+ ```
223
+
224
+ **Options:**
225
+
226
+ - `--limit`: The maximum number of check accounts to return.
227
+ - `--offset`: The number of check accounts to skip.
228
+ - `--json`: Output in JSON format.
229
+
230
+ ### `contacts:create`
231
+
232
+ Create a contact. Use `--name` for organizations and `--surename` together with `--familyname` for persons.
233
+
234
+ ```bash
235
+ sevdesk contacts:create [options]
236
+ ```
237
+
238
+ **Options:**
239
+
240
+ - `--name`: Name of the organization. Not to be used for persons. If both `--name` and `--familyname` are omitted, you will be prompted for the organization name.
241
+ - `--surename`: First name of the person. Not to be used for organizations.
242
+ - `--familyname`: Last name of the person. Not to be used for organizations.
243
+ - `--category`: ID of the contact category: `2` supplier, `3` customer, `4` partner. Defaults to `3`.
244
+ - `--customer-number`: Customer number of the contact.
245
+ - `--description`: Description of the contact.
246
+ - `--vat-number`: VAT number of the contact.
247
+ - `--tax-number`: Tax number of the contact.
248
+ - `--json`: Output in JSON format.
249
+
250
+ ### `contacts:delete`
251
+
252
+ Delete a contact.
253
+
254
+ ```bash
255
+ sevdesk contacts:delete [options]
256
+ ```
257
+
258
+ **Options:**
259
+
260
+ - `--id`: The contact ID. If omitted, you will be prompted.
261
+ - `--yes`: Skip the confirmation prompt. Defaults to `false`.
262
+ - `--json`: Output in JSON format.
263
+
264
+ ### `contacts:get`
265
+
266
+ Show a single contact.
267
+
268
+ ```bash
269
+ sevdesk contacts:get [options]
270
+ ```
271
+
272
+ **Options:**
273
+
274
+ - `--id`: The contact ID. If omitted, you will be prompted.
275
+ - `--json`: Output in JSON format.
276
+
277
+ ### `contacts:list`
278
+
279
+ List contacts.
280
+
281
+ ```bash
282
+ sevdesk contacts:list [options]
283
+ ```
284
+
285
+ **Options:**
286
+
287
+ - `--name`: Filter by organization, first or last name.
288
+ - `--customer-number`: Filter by customer number.
289
+ - `--limit`: Maximum number of contacts to return.
290
+ - `--offset`: Number of contacts to skip.
291
+ - `--json`: Output in JSON format.
292
+
293
+ ### `contacts:update`
294
+
295
+ Update a contact. Only the given fields are changed.
296
+
297
+ ```bash
298
+ sevdesk contacts:update [options]
299
+ ```
300
+
301
+ **Options:**
302
+
303
+ - `--id`: The contact ID. If omitted, you will be prompted.
304
+ - `--name`: Name of the organization. Not to be used for persons.
305
+ - `--surename`: First name of the person. Not to be used for organizations.
306
+ - `--familyname`: Last name of the person. Not to be used for organizations.
307
+ - `--category`: ID of the contact category: `2` supplier, `3` customer, `4` partner.
308
+ - `--customer-number`: Customer number of the contact.
309
+ - `--description`: Description of the contact.
310
+ - `--vat-number`: VAT number of the contact.
311
+ - `--tax-number`: Tax number of the contact.
312
+ - `--json`: Output in JSON format.
313
+
314
+ ### `credit-notes:get`
315
+
316
+ Show a single credit note.
317
+
318
+ ```bash
319
+ sevdesk credit-notes:get [options]
320
+ ```
321
+
322
+ **Options:**
323
+
324
+ - `--id`: ID of the credit note. If omitted, you will be prompted.
325
+ - `--json`: Output in JSON format.
326
+
327
+ ### `credit-notes:list`
328
+
329
+ List credit notes.
330
+
331
+ ```bash
332
+ sevdesk credit-notes:list [options]
333
+ ```
334
+
335
+ **Options:**
336
+
337
+ - `--status`: Filter by status: `100` draft, `200` open, `750` partially paid, `1000` paid.
338
+ - `--credit-note-number`: Filter by credit note number.
339
+ - `--start-date`: Only credit notes on or after this date as `dd.mm.yyyy` or Unix timestamp.
340
+ - `--end-date`: Only credit notes on or before this date as `dd.mm.yyyy` or Unix timestamp.
341
+ - `--contact`: ID of the contact whose credit notes to list.
342
+ - `--limit`: Maximum number of credit notes to return.
343
+ - `--offset`: Number of credit notes to skip.
344
+ - `--json`: Output in JSON format.
345
+
346
+ ### `credit-notes:pdf`
347
+
348
+ Download the PDF of a credit note.
349
+
350
+ ```bash
351
+ sevdesk credit-notes:pdf [options]
352
+ ```
353
+
354
+ **Options:**
355
+
356
+ - `--id`: ID of the credit note. If omitted, you will be prompted.
357
+ - `--output`: Path to write the PDF to. Defaults to the file name reported by the API.
358
+ - `--prevent-send-by`: Do not mark the credit note as sent by download. Defaults to `false`.
359
+ - `--json`: Output in JSON format.
360
+
361
+ ### `export:contacts`
362
+
363
+ Export contacts as a CSV file.
364
+
365
+ ```bash
366
+ sevdesk export:contacts [options]
367
+ ```
368
+
369
+ **Options:**
370
+
371
+ - `--output`: Path to write the CSV file to. Defaults to the filename of the export.
372
+ - `--limit`: The maximum number of contacts to export.
373
+ - `--json`: Output in JSON format.
374
+
375
+ ### `export:datev`
376
+
377
+ Export accounting data in the DATEV format as a ZIP archive. The export runs as a background job that the CLI waits for.
378
+
379
+ ```bash
380
+ sevdesk export:datev [options]
381
+ ```
382
+
383
+ **Options:**
384
+
385
+ - `--start-date`: Start of the export period as `dd.mm.yyyy` or Unix timestamp. If omitted, you will be prompted.
386
+ - `--end-date`: End of the export period as `dd.mm.yyyy` or Unix timestamp. If omitted, you will be prompted.
387
+ - `--format`: The DATEV export format. Supported values are `csv` and `xml`. Defaults to `csv`.
388
+ - `--scope`: The models to include as a string of letters: `E` (earnings), `X` (expenditure), `T` (transactions), `C` (cash register) and `D` (assets). XML exports support only `E` and `X`. Defaults to `EXTCD`.
389
+ - `--output`: Path to write the ZIP archive to. Defaults to the filename of the export.
390
+ - `--timeout`: Maximum number of seconds to wait for the export job. Defaults to `300`.
391
+ - `--json`: Output in JSON format.
392
+
393
+ ### `export:invoices`
394
+
395
+ Export invoices as a CSV file.
396
+
397
+ ```bash
398
+ sevdesk export:invoices [options]
399
+ ```
400
+
401
+ **Options:**
402
+
403
+ - `--output`: Path to write the CSV file to. Defaults to the filename of the export.
404
+ - `--limit`: The maximum number of invoices to export.
405
+ - `--start-date`: Only export invoices on or after this date (ISO 8601).
406
+ - `--end-date`: Only export invoices on or before this date (ISO 8601).
407
+ - `--json`: Output in JSON format.
408
+
409
+ ### `export:transactions`
410
+
411
+ Export transactions as a CSV file.
412
+
413
+ ```bash
414
+ sevdesk export:transactions [options]
415
+ ```
416
+
417
+ **Options:**
418
+
419
+ - `--output`: Path to write the CSV file to. Defaults to the filename of the export.
420
+ - `--limit`: The maximum number of transactions to export.
421
+ - `--start-date`: Only export transactions on or after this date (ISO 8601).
422
+ - `--end-date`: Only export transactions on or before this date (ISO 8601).
423
+ - `--json`: Output in JSON format.
424
+
425
+ ### `export:vouchers`
426
+
427
+ Export vouchers as a CSV file.
428
+
429
+ ```bash
430
+ sevdesk export:vouchers [options]
431
+ ```
432
+
433
+ **Options:**
434
+
435
+ - `--output`: Path to write the CSV file to. Defaults to the filename of the export.
436
+ - `--limit`: The maximum number of vouchers to export.
437
+ - `--start-date`: Only export vouchers on or after this date (ISO 8601).
438
+ - `--end-date`: Only export vouchers on or before this date (ISO 8601).
439
+ - `--json`: Output in JSON format.
440
+
441
+ ### `guidance:accounts`
442
+
443
+ List bookable accounts and their allowed tax rules. The first matching filter wins: `--account-number`, `--tax-rule`, `--revenue`, `--expense`. Without a filter, all accounts are listed.
444
+
445
+ ```bash
446
+ sevdesk guidance:accounts [options]
447
+ ```
448
+
449
+ **Options:**
450
+
451
+ - `--account-number`: Only show the account with this datev account number.
452
+ - `--tax-rule`: Tax rule name, for example `USTPFL_UMS_EINN`.
453
+ - `--revenue`: Only show accounts that can be used for revenue. Defaults to `false`.
454
+ - `--expense`: Only show accounts that can be used for expenses. Defaults to `false`.
455
+ - `--json`: Output in JSON format.
456
+
457
+ ### `invoices:get`
458
+
459
+ Show a single invoice.
460
+
461
+ ```bash
462
+ sevdesk invoices:get [options]
463
+ ```
464
+
465
+ **Options:**
466
+
467
+ - `--id`: ID of the invoice. If omitted, you will be prompted.
468
+ - `--json`: Output in JSON format.
469
+
470
+ ### `invoices:list`
471
+
472
+ List invoices.
473
+
474
+ ```bash
475
+ sevdesk invoices:list [options]
476
+ ```
477
+
478
+ **Options:**
479
+
480
+ - `--status`: Filter by status: `50` deactivated recurring, `100` draft, `200` open, `750` partially paid, `1000` paid.
481
+ - `--invoice-number`: Filter by invoice number.
482
+ - `--start-date`: Only invoices on or after this date as `dd.mm.yyyy` or Unix timestamp.
483
+ - `--end-date`: Only invoices on or before this date as `dd.mm.yyyy` or Unix timestamp.
484
+ - `--contact`: ID of the contact whose invoices to list.
485
+ - `--limit`: Maximum number of invoices to return.
486
+ - `--offset`: Number of invoices to skip.
487
+ - `--json`: Output in JSON format.
488
+
489
+ ### `invoices:pdf`
490
+
491
+ Download the PDF of an invoice.
492
+
493
+ ```bash
494
+ sevdesk invoices:pdf [options]
495
+ ```
496
+
497
+ **Options:**
498
+
499
+ - `--id`: ID of the invoice. If omitted, you will be prompted.
500
+ - `--output`: Path to write the PDF to. Defaults to the file name reported by the API.
501
+ - `--prevent-send-by`: Do not mark the invoice as sent by download. Defaults to `false`.
502
+ - `--json`: Output in JSON format.
503
+
504
+ ### `orders:get`
505
+
506
+ Show a single order.
507
+
508
+ ```bash
509
+ sevdesk orders:get [options]
510
+ ```
511
+
512
+ **Options:**
513
+
514
+ - `--id`: ID of the order. If omitted, you will be prompted.
515
+ - `--json`: Output in JSON format.
516
+
517
+ ### `orders:list`
518
+
519
+ List orders.
520
+
521
+ ```bash
522
+ sevdesk orders:list [options]
523
+ ```
524
+
525
+ **Options:**
526
+
527
+ - `--status`: Filter by status: `100` draft, `200` delivered, `300` rejected, `500` accepted, `750` partially calculated, `1000` calculated.
528
+ - `--order-number`: Filter by order number.
529
+ - `--start-date`: Only orders on or after this date as `dd.mm.yyyy` or Unix timestamp.
530
+ - `--end-date`: Only orders on or before this date as `dd.mm.yyyy` or Unix timestamp.
531
+ - `--contact`: ID of the contact whose orders to list.
532
+ - `--limit`: Maximum number of orders to return.
533
+ - `--offset`: Number of orders to skip.
534
+ - `--json`: Output in JSON format.
535
+
536
+ ### `orders:pdf`
537
+
538
+ Download the PDF of an order.
539
+
540
+ ```bash
541
+ sevdesk orders:pdf [options]
542
+ ```
543
+
544
+ **Options:**
545
+
546
+ - `--id`: ID of the order. If omitted, you will be prompted.
547
+ - `--output`: Path to write the PDF to. Defaults to the file name reported by the API.
548
+ - `--prevent-send-by`: Do not mark the order as sent by download. Defaults to `false`.
549
+ - `--json`: Output in JSON format.
550
+
551
+ ### `parts:get`
552
+
553
+ Show a single part.
554
+
555
+ ```bash
556
+ sevdesk parts:get [options]
557
+ ```
558
+
559
+ **Options:**
560
+
561
+ - `--id`: The part ID. If omitted, you will be prompted.
562
+ - `--json`: Output in JSON format.
563
+
564
+ ### `parts:list`
565
+
566
+ List parts.
567
+
568
+ ```bash
569
+ sevdesk parts:list [options]
570
+ ```
571
+
572
+ **Options:**
573
+
574
+ - `--name`: Filter by part name.
575
+ - `--part-number`: Filter by part number.
576
+ - `--limit`: Maximum number of parts to return.
577
+ - `--offset`: Number of parts to skip.
578
+ - `--json`: Output in JSON format.
579
+
580
+ ### `tags:create`
581
+
582
+ Create a tag and attach it to a document.
583
+
584
+ ```bash
585
+ sevdesk tags:create [options]
586
+ ```
587
+
588
+ **Options:**
589
+
590
+ - `--name`: Name of the tag. If omitted, you will be prompted.
591
+ - `--object-type`: Type of the document to tag: `Invoice`, `Voucher`, `Order` or `CreditNote`. If omitted, you will be prompted.
592
+ - `--object-id`: ID of the document to tag. If omitted, you will be prompted.
593
+ - `--json`: Output in JSON format.
594
+
595
+ ### `tags:delete`
596
+
597
+ Delete a tag.
598
+
599
+ ```bash
600
+ sevdesk tags:delete [options]
601
+ ```
602
+
603
+ **Options:**
604
+
605
+ - `--id`: The tag ID. If omitted, you will be prompted.
606
+ - `--yes`: Skip the confirmation prompt. Defaults to `false`.
607
+ - `--json`: Output in JSON format.
608
+
609
+ ### `tags:list`
610
+
611
+ List tags.
612
+
613
+ ```bash
614
+ sevdesk tags:list [options]
615
+ ```
616
+
617
+ **Options:**
618
+
619
+ - `--limit`: Maximum number of tags to return.
620
+ - `--offset`: Number of tags to skip.
621
+ - `--json`: Output in JSON format.
622
+
623
+ ### `transactions:create`
624
+
625
+ Create a transaction. Only use this on file import (online) check accounts.
626
+
627
+ ```bash
628
+ sevdesk transactions:create [options]
629
+ ```
630
+
631
+ **Options:**
632
+
633
+ - `--check-account`: The ID of the check account the transaction belongs to. If omitted, you will be prompted.
634
+ - `--amount`: The amount of the transaction. Negative for expenses. If omitted, you will be prompted.
635
+ - `--payee`: The name of the payee or payer. If omitted, you will be prompted.
636
+ - `--value-date`: The date the transaction was booked (ISO 8601). Defaults to now.
637
+ - `--entry-date`: The date the transaction was imported (ISO 8601).
638
+ - `--purpose`: The payment purpose of the transaction.
639
+ - `--status`: The status of the transaction: `100` created, `200` linked, `300` private, `400` booked. Defaults to `100`.
640
+ - `--json`: Output in JSON format.
641
+
642
+ ### `transactions:get`
643
+
644
+ Show a single transaction.
645
+
646
+ ```bash
647
+ sevdesk transactions:get [options]
648
+ ```
649
+
650
+ **Options:**
651
+
652
+ - `--id`: The transaction ID. If omitted, you will be prompted.
653
+ - `--json`: Output in JSON format.
654
+
655
+ ### `transactions:list`
656
+
657
+ List transactions of your check accounts.
658
+
659
+ ```bash
660
+ sevdesk transactions:list [options]
661
+ ```
662
+
663
+ **Options:**
664
+
665
+ - `--check-account`: Only show transactions of this check account ID.
666
+ - `--unbooked`: Only show transactions that are not yet booked. Defaults to `false`.
667
+ - `--start-date`: Only show transactions on or after this date (ISO 8601).
668
+ - `--end-date`: Only show transactions on or before this date (ISO 8601).
669
+ - `--payee`: Only show transactions with this payee or payer name.
670
+ - `--purpose`: Only show transactions with this payment purpose.
671
+ - `--limit`: The maximum number of transactions to return.
672
+ - `--offset`: The number of transactions to skip.
673
+ - `--json`: Output in JSON format.
674
+
675
+ ### `vouchers:book`
676
+
677
+ Book a payment on a voucher. For online check accounts (bank, PayPal, file import), pass the existing bank transaction via `--transaction`. For clearing accounts and cash registers, omit `--transaction` and sevdesk creates the transaction automatically.
678
+
679
+ ```bash
680
+ sevdesk vouchers:book [options]
681
+ ```
682
+
683
+ **Options:**
684
+
685
+ - `--id`: ID of the voucher. If omitted, you will be prompted.
686
+ - `--amount`: Amount to book. Can also be a partial amount. If omitted, you will be prompted.
687
+ - `--date`: Booking date as ISO 8601. Defaults to now.
688
+ - `--type`: Type of the booking. Supported values are `FULL_PAYMENT`, `N` (partial), `CB` (cash discount), `O` (other), `OF` (reminder charges) and `MTC` (monetary traffic costs). Defaults to `FULL_PAYMENT`.
689
+ - `--check-account`: ID of the check account. If omitted, you will be prompted.
690
+ - `--transaction`: ID of the bank transaction to link. Required for online check accounts, omit for clearing accounts.
691
+ - `--create-feed`: Create a feed entry for the booking.
692
+ - `--yes`: Skip the confirmation prompt. Defaults to `false`.
693
+ - `--json`: Output in JSON format.
694
+
695
+ ### `vouchers:create`
696
+
697
+ Create a voucher from a receipt file. The file is uploaded and attached to the voucher, which is created with a single position.
698
+
699
+ ```bash
700
+ sevdesk vouchers:create [options]
701
+ ```
702
+
703
+ **Options:**
704
+
705
+ - `--file`: Path to the receipt file to attach, for example a PDF, an image or an XML invoice. If omitted, you will be prompted.
706
+ - `--status`: Status of the created voucher. Supported values are `draft` and `open`. Defaults to `open`.
707
+ - `--credit-debit`: `C` for expense (credit), `D` for income (debit) vouchers. Defaults to `C`.
708
+ - `--tax-rule`: ID of the tax rule, for example `9` for deductible input tax expenses. If omitted, you will be prompted.
709
+ - `--account-datev`: ID of the booking account (AccountDatev). Find it with [`guidance:accounts`](#guidanceaccounts). If omitted, you will be prompted.
710
+ - `--amount`: Amount of the voucher position. If omitted, you will be prompted.
711
+ - `--net`: Treat the amount as net instead of gross. Defaults to `false`.
712
+ - `--tax-rate`: Tax rate of the voucher position in percent. Defaults to `19`.
713
+ - `--voucher-date`: Date as `dd.mm.yyyy` or Unix timestamp.
714
+ - `--pay-date`: Date as `dd.mm.yyyy` or Unix timestamp.
715
+ - `--supplier-id`: ID of the supplier contact.
716
+ - `--supplier-name`: Name of the supplier, used when no supplier ID is given.
717
+ - `--description`: The voucher number.
718
+ - `--comment`: Comment for the voucher position.
719
+ - `--json`: Output in JSON format.
720
+
721
+ ### `vouchers:enshrine`
722
+
723
+ Enshrine a voucher so that it can no longer be changed. **This cannot be undone.**
724
+
725
+ ```bash
726
+ sevdesk vouchers:enshrine [options]
727
+ ```
728
+
729
+ **Options:**
730
+
731
+ - `--id`: ID of the voucher. If omitted, you will be prompted.
732
+ - `--yes`: Skip the confirmation prompt. Defaults to `false`.
733
+ - `--json`: Output in JSON format.
734
+
735
+ ### `vouchers:get`
736
+
737
+ Show a single voucher.
738
+
739
+ ```bash
740
+ sevdesk vouchers:get [options]
741
+ ```
742
+
743
+ **Options:**
744
+
745
+ - `--id`: ID of the voucher. If omitted, you will be prompted.
746
+ - `--json`: Output in JSON format.
747
+
748
+ ### `vouchers:list`
749
+
750
+ List vouchers.
751
+
752
+ ```bash
753
+ sevdesk vouchers:list [options]
754
+ ```
755
+
756
+ **Options:**
757
+
758
+ - `--status`: Filter by status: `50` draft, `100` open, `150` transferred, `750` partially paid, `1000` paid.
759
+ - `--credit-debit`: Filter by `C` for expense or `D` for income vouchers.
760
+ - `--description-like`: Filter by voucher number, matching partially.
761
+ - `--start-date`: Only vouchers on or after this date as `dd.mm.yyyy` or Unix timestamp.
762
+ - `--end-date`: Only vouchers on or before this date as `dd.mm.yyyy` or Unix timestamp.
763
+ - `--contact`: ID of the contact whose vouchers to list.
764
+ - `--limit`: Maximum number of vouchers to return.
765
+ - `--offset`: Number of vouchers to skip.
766
+ - `--json`: Output in JSON format.
767
+
768
+ ### `vouchers:reset-to-draft`
769
+
770
+ Reset a voucher to the draft status. This unlinks existing payments.
771
+
772
+ ```bash
773
+ sevdesk vouchers:reset-to-draft [options]
774
+ ```
775
+
776
+ **Options:**
777
+
778
+ - `--id`: ID of the voucher. If omitted, you will be prompted.
779
+ - `--yes`: Skip the confirmation prompt. Defaults to `false`.
780
+ - `--json`: Output in JSON format.
781
+
782
+ ### `vouchers:reset-to-open`
783
+
784
+ Reset a voucher to the open status. This unlinks existing payments.
785
+
786
+ ```bash
787
+ sevdesk vouchers:reset-to-open [options]
788
+ ```
789
+
790
+ **Options:**
791
+
792
+ - `--id`: ID of the voucher. If omitted, you will be prompted.
793
+ - `--yes`: Skip the confirmation prompt. Defaults to `false`.
794
+ - `--json`: Output in JSON format.
795
+
796
+ ## License
797
+
798
+ [MIT](../../LICENSE)
799
+
800
+ [^1]: This project is not affiliated with, endorsed by, sponsored by, or approved by sevDesk GmbH or any of their affiliates or subsidiaries.