-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathopenapi.yaml
16764 lines (16531 loc) · 647 KB
/
openapi.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.0.0
info:
title: sevdesk API
description: "<b>Contact:</b> To contact our support click <a href='https://landing.sevdesk.de/service-support-center-technik'>here</a><br><br> \r\n# General information\r\nWelcome to our API!<br>\r\nsevdesk offers you the possibility of retrieving data using an interface, namely the sevdesk API, and making changes without having to use the web UI. The sevdesk interface is a REST-Full API. All sevdesk data and functions that are used in the web UI can also be controlled through the API.\r\n\n# Cross-Origin Resource Sharing\r\nThis API features Cross-Origin Resource Sharing (CORS).<br>\r\nIt enables cross-domain communication from the browser.<br>\r\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\r\n\r\n# Embedding resources\r\nWhen retrieving resources by using this API, you might encounter nested resources in the resources you requested.<br>\r\nFor example, an invoice always contains a contact, of which you can see the ID and the object name.<br>\r\nThis API gives you the possibility to embed these resources completely into the resources you originally requested.<br>\r\nTaking our invoice example, this would mean, that you would not only see the ID and object name of a contact, but rather the complete contact resource.\r\n\r\nTo embed resources, all you need to do is to add the query parameter 'embed' to your GET request.<br>\r\nAs values, you can provide the name of the nested resource.<br>\r\nMultiple nested resources are also possible by providing multiple names, separated by a comma.\r\n \n# Authentication and Authorization\n The sevdesk API uses a token authentication to authorize calls. For this purpose every sevdesk administrator has one API token, which is a <b>hexadecimal string</b> containing <b>32 characters</b>. The following clip shows where you can find the API token if this is your first time with our API.<br><br> <video src='openAPI/img/findingTheApiToken.mp4' controls width='640' height='360'> Your browser cannot play this video.<br> This video explains how to find your sevDesk API token. </video> <br> The token will be needed in every request that you want to send and needs to be provided as a value of an <b>Authorization Header</b>.<br> In this case, we used some random API token. The example shows the token in the Authorization Header. <ul> <li>\"Authorization\" :<span style='color:red'>\"b7794de0085f5cd00560f160f290af38\"</span></li> </ul> The api tokens have an infinite lifetime and, in other words, exist as long as the sevdesk user exists.<br> For this reason, the user should <b>NEVER</b> be deleted.<br> If really necessary, it is advisable to save the api token as we will <b>NOT</b> be able to retrieve it afterwards!<br> It is also possible to generate a new API token, for example, if you want to prevent the usage of your sevdesk account by other people who got your current API token.<br> To achieve this, you just need to click on the \"generate new\" symbol to the right of your token and confirm it with your password. \n# API News\n To never miss API news and updates again, subscribe to our <b>free API newsletter</b> and get all relevant information to keep your sevdesk software running smoothly. To subscribe, simply click <a href = 'https://landing.sevdesk.de/api-newsletter'><b>here</b></a> and confirm the email address to which we may send all updates relevant to you. \n# API Requests\n In our case, REST API requests need to be build by combining the following components. <table> <tr> <th><b>Component</b></th> <th><b>Description</b></th> </tr> <tr> <td>HTTP-Methods</td> <td> <ul> <li>GET (retrieve a resource)</li> <li>POST (create a resource)</li> <li>PUT (update a resource)</li> <li>DELETE (delete a resource)</li> </ul> </td> </tr> <tr> <td>URL of the API</td> <td><span style='color: #2aa198'>ht</span><span style='color: #2aa198'>tps://my.sevdesk.de/api/v1</span></td> </tr> <tr> <td>URI of the resource</td> <td>The resource to query.<br>For example contacts in sevdesk:<br><br> <span style='color:red'>/Contact</span><br><br> Which will result in the following complete URL:<br><br> <span style='color: #2aa198'>ht</span><span style='color: #2aa198'>tps://my.sevdesk.de/api/v1</span><span style='color:red'>/Contact</span> </td> </tr> <tr> <td>Query parameters</td> <td>Are attached by using the connectives <b>?</b> and <b>&</b> in the URL.<br></td> </tr> <tr> <td>Request headers</td> <td>Typical request headers are for example:<br> <div> <br> <ul> <li>Content-type</li> <li>Authorization</li> <li>Accept-Encoding</li> <li>User-Agent</li> <li>X-Version: Used for resource versioning see information below</li> <li>...</li> </ul> </div> </td> </tr> <tr> <td>Response headers</td> <td> Typical response headers are for example:<br><br> <div> <ul> <li>Deprecation: If a resource is deprecated we return true or a timestamp since when</li> <li>...</li> </ul> </div> </td> </tr> <tr> <td>Request body</td> <td>Mostly required in POST and PUT requests.<br> Often the request body contains json, in our case, it also accepts url-encoded data. </td> </tr> </table><br> <span style='color:red'>Note</span>: please pass a meaningful entry at the header \"User-Agent\". If the \"User-Agent\" is set meaningfully, we can offer better support in case of queries from customers.<br> An example how such a \"User-Agent\" can look like: \"Integration-name by abc\". <br><br> This is a sample request for retrieving existing contacts in sevdesk using curl:<br><br> <img src='openAPI/img/GETRequest.PNG' alt='Get Request' height='150'><br><br> As you can see, the request contains all the components mentioned above.<br> It's HTTP method is GET, it has a correct endpoint (<span style='color: #2aa198'>ht</span><span style='color: #2aa198'>tps://my.sevdesk.de/api/v1</span><span style='color:red'>/Contact</span>), query parameters and additional <b>header</b> information!<br><br> <b>Query Parameters</b><br><br> As you might have seen in the sample request above, there are several query parameters located in the url.<br> Those are mostly optional but prove to be very useful for a lot of requests as they can limit, extend, sort or filter the data you will get as a response.<br><br> These are the most used query parameter for the sevdesk API. <table> <tr> <th><b>Parameter</b></th> <th><b>Description</b></th> </tr> <tr> <td>embed</td> <td>Will extend some of the returned data.<br> A brief example can be found below.</td> </tr> <tr> <td>countAll</td> <td>\"countAll=true\" returns the number of items</td> </tr> </table> This is an example for the usage of the embed parameter.<br> The following first request will return all company contact entries in sevdesk up to a limit of 100 without any additional information and no offset.<br><br> <img src='openAPI/img/ContactQueryWithoutEmbed.PNG' width='900' height='850'><br><br> Now have a look at the category attribute located in the response.<br> Naturally, it just contains the id and the object name of the object but no further information.<br> We will now use the parameter embed with the value \"category\".<br><br> <img src='openAPI/img/ContactQueryWithEmbed.PNG' width='900' height='850'><br><br> As you can see, the category object is now extended and shows all the attributes and their corresponding values.<br><br> There are lot of other query parameters that can be used to filter the returned data for objects that match a certain pattern, however, those will not be mentioned here and instead can be found at the detail documentation of the most used API endpoints like contact, invoice or voucher.<br><br>\n<b>Pagination</b><br> <table> <tr> <th><b>Parameter</b></th> <th><b>Description</b></th> </tr> <tr> <td>limit</td> <td>Limits the number of entries that are returned.<br> Most useful in GET requests which will most likely deliver big sets of data like country or currency lists.<br> In this case, you can bypass the default limitation on returned entries by providing a high number. </td> </tr> <tr> <td>offset</td> <td>Specifies a certain offset for the data that will be returned.<br> As an example, you can specify \"offset=2\" if you want all entries except for the first two.</td> </tr> </table> Example: <ul><li><code>ht<span>tps://my.sevdesk.de/api/v1/Invoice?offset=20&limit=10<span></code></li></ul> <b>Request Headers</b><br><br> The HTTP request (response) headers allow the client as well as the server to pass additional information with the request.<br> They transfer the parameters and arguments which are important for transmitting data over HTTP.<br> Three headers which are useful / necessary when using the sevdesk API are \"Authorization, \"Accept\" and \"Content-type\".<br> Underneath is a brief description of why and how they should be used.<br><br> <b>Authorization</b><br><br> Should be used to provide your API token in the header. <ul> <li>Authorization:<span style='color:red'>yourApiToken</span></li> </ul> <b>Accept</b><br><br> Specifies the format of the response.<br> Required for operations with a response body. <ul> <li>Accept:application/<span style='color:red'>format</span> </li> </ul> In our case, <code><span style='color:red'>format</span></code> could be replaced with <code>json</code> or <code>xml</code><br><br> <b>Content-type</b><br><br> Specifies which format is used in the request.<br> Is required for operations with a request body. <ul> <li>Content-type:application/<span style='color:red'>format</span></li> </ul> In our case,<code><span style='color:red'>format</span></code>could be replaced with <code>json</code> or <code>x-www-form-urlencoded</code> <br><br><b>API Responses</b><br><br> HTTP status codes<br> When calling the sevdesk API it is very likely that you will get a HTTP status code in the response.<br> Some API calls will also return JSON response bodies which will contain information about the resource.<br> Each status code which is returned will either be a <b>success</b> code or an <b>error</b> code.<br><br> Success codes <table> <tr> <th><b>Status code</b></th> <th><b>Description</b></th> </tr> <tr> <td><code>200 OK</code></td> <td>The request was successful</td> </tr> <tr> <td><code>201 Created</code></td> <td>Most likely to be found in the response of a <b>POST</b> request.<br> This code indicates that the desired resource was successfully created.</td> </tr> </table> <br>Error codes <table> <tr> <th><b>Status code</b></th> <th><b>Description</b></th> </tr> <tr> <td><code>400 Bad request</code></td> <td>The request you sent is most likely syntactically incorrect.<br> You should check if the parameters in the request body or the url are correct.</td> </tr> <tr> <td><code>401 Unauthorized</code></td> <td>The authentication failed.<br> Most likely caused by a missing or wrong API token.</td> </tr> <tr> <td><code>403 Forbidden</code></td> <td>You do not have the permission the access the resource which is requested.</td> </tr> <tr> <td><code>404 Not found</code></td> <td>The resource you specified does not exist.</td> </tr> <tr> <td><code>500 Internal server error</code></td> <td>An internal server error has occurred.<br> Normally this means that something went wrong on our side.<br> However, sometimes this error will appear if we missed to catch an error which is normally a 400 status code! </td> </tr> </table> <br><br> <b>Resource Versioning</b> <br><br> We use resource versioning to handle breaking changes for our endpoints, these are rarely used and will be communicated before we remove older versions.<br> To call a different version we use a specific header <code>X-Version</code> that should be filled with the desired version.<br> <ul> <li>If you do not specify any version we assume <code>default</code></li> <li>If you specify a version that does not exist or was removed, you will get an error with information which versions are available</li> </ul> <table> <tr> <th>X-Version</th> <th>Description</th> </tr> <tr> <td><code>default</code></td> <td>Should always reference the oldest version.<br> If a specific resource is updated with a new version, <br> then the default version stays the same until the old version is deleted</td> </tr> <tr> <td><code>1.0</code> ... <code>1.9</code></td> <td>Our incrementally version for each resource independent<br> <b>Important</b>: A resource can be available via <code>default</code> but not <code>1.0</code></td> </tr> </table> \n# Your First Request\n After reading the introduction to our API, you should now be able to make your first call.<br> For testing our API, we would always recommend to create a trial account for sevdesk to prevent unwanted changes to your main account.<br> A trial account will be in the highest tariff (materials management), so every sevdesk function can be tested! \n\nTo start testing we would recommend one of the following tools: <ul> <li><a href='https://www.getpostman.com/'>Postman</a></li> <li><a href='https://curl.haxx.se/download.html'>cURL</a></li> </ul> This example will illustrate your first request, which is creating a new Contact in sevdesk.<br> <ol> <li>Download <a href='https://www.getpostman.com/'><b>Postman</b></a> for your desired system and start the application</li> <li>Enter <span><b>ht</span>tps://my.sevdesk.de/api/v1/Contact</b> as the url</li> <li>Create an authorization header and insert your API token as the value</li> <li>For this test, select <b>POST</b> as the HTTP method</li> <li>Go to <b>Headers</b> and enter the key-value pair <b>Content-type</b> + <b>application/x-www-form-urlencoded</b><br> As an alternative, you can just go to <b>Body</b> and select <b>x-www-form-urlencoded</b></li> <li>Now go to <b>Body</b> (if you are not there yet) and enter the key-value pairs as shown in the following picture<br><br> <img src='openAPI/img/FirstRequestPostman.PNG' width='900'><br><br></li> <li>Click on <b>Send</b>. Your response should now look like this:<br><br> <img src='openAPI/img/FirstRequestResponse.PNG' width='900'></li> </ol> As you can see, a successful response in this case returns a JSON-formatted response body containing the contact you just created.<br> For keeping it simple, this was only a minimal example of creating a contact.<br> There are however numerous combinations of parameters that you can provide which add information to your contact. \n# sevdesk-Update 2.0\n Started in 2024 we introduced a new era of bookkeeping in sevdesk. You can check if you already received the update by clicking on your profile in the top right in the sevdesk WebApp or by using the [Tools/bookkeepingSystemVersion endpoint](#tag/Basics/operation/bookkeepingSystemVersion).<br> The old version will be available for some customers until the end of 2024. In this short list we have outlined the changed endpoints with links to jump to the descriptions. If you received the [api newsletter](https://landing.sevdesk.de/api-newsletter) you already know what changed. Otherwise you can check the api changes [here](https://tech.sevdesk.com/api_news/posts/2024_04_04-system-update-breaking-changes/). \n## Check your bookkeeping system version\n With this endpoint you can check which version you / your client uses. On that basis you must use the old or new versions of the endpoints. [Tools/bookkeepingSystemVersion Endpoint](#tag/Basics/operation/bookkeepingSystemVersion) \n## Tax Rules\n <I><b>(affects the properties taxType and taxSet)</b></I><br> With sevdesk-Update 2.0 we changed the available tax rules. Due to a high likeliness of non-compliant accounting, we won't support the following tax type with the sevdesk-Update 2.0 anymore:\n `taxType = custom (this includes 'taxSet': ... )`\n If you only use <code>taxType = default</code>, <code>taxType = eu</code> and / or <code>taxType = ss</code>, these tax types will automatically be mapped to the new tax rules for a transition period, but you have to make sure the taxRate used in positions is within the allowed ones (you may use the [ReceiptGuidance endpoint](#tag/Voucher/operation/forAllAccounts) for that), otherwise the API will return a validation error (HTTP status code 422). For [orders](#tag/Order), [invoices](#tag/Invoice), [vouchers](#tag/Voucher) and [credit notes](#tag/CreditNote) that were created within sevdesk-Update 2.0 the response will change in all endpoints in which these objects are returned.<br> So orders, invoices, vouchers and credit notes created within sevdesk system version 1.0 still have a taxType in the response. When they are created in sevdesk-Update 2.0 they will have a taxRule instead.<br> You can continue to use taxType at first, but we recommend switching to taxRule as there are new options available that were not previously supported.<br> For orders, invoices, vouchers and credit notes that were created within sevdesk-Update 2.0 the response will change in all endpoints in which these objects are returned. This documentation holds the most current version of the endpoints.<br> Here are lists of the currently available tax rules, sorted by their use case, structured into revenue/expense and 'Regelbesteuerer'/'Kleinunternehmer'. \n#### VAT rules for 'Regelbesteuerung' in sevdesk-Update 2.0 (Revenue)\n <table> <tr> <th>VAT Rule</th> <th>New Property</th> <th>Allowed taxRate in positions</th> <th>Old property (deprecated)</th> </tr> <tr> <td>Umsatzsteuerpflichtige Umsätze</td> <td><code>'taxRule': 1</code></td> <td> <ul> <li>0.0</li> <li>7.0</li> <li>19.0</li> </ul> </td> <td><code>'taxType': 'default'</code></td> </tr> <tr> <td>Ausfuhren</td> <td><code>'taxRule': 2</code></td> <td> <ul> <li>0.0</li> </ul> </td> <td>-</td> </tr> <tr> <td>Innergemeinschaftliche Lieferungen</td> <td><code>'taxRule': 3</code></td> <td> <ul> <li>0.0</li> <li>7.0</li> <li>19.0</li> </ul> </td> <td><code>'taxType': 'eu'</code></td> </tr> <tr> <td>Steuerfreie Umsätze §4 UStG</td> <td><code>'taxRule': 4</code></td> <td> <ul> <li>0.0</li> </ul> </td> <td>-</td> </tr> <tr> <td>Reverse Charge gem. §13b UStG</td> <td><code>'taxRule': 5</code></td> <td> <ul> <li>0.0</li> </ul> </td> <td>-</td> </tr> <tr> <td> Nicht im Inland steuerbare Leistung<br> Not available for: <ul> <li>advance invoice (<code>invoiceType': 'AR'</code>)</li> <li>partial invoice (<code>'invoiceType': 'TR'</code>)</li> <li>final invoice (<code>'invoiceType': 'ER'</code>)</li> </ul> </td> <td><code>'taxRule': 17</code></td> <td> <ul> <li>0.0</li> </ul> </td> <td><code>'taxType': 'noteu'</code></td> </tr> </table> \n \n#### VAT rules for 'Regelbesteuerung' in sevdesk-Update 2.0 (Expense)\n <table> <tr> <th>VAT Rule</th> <th>New Property</th> <th>Allowed taxRate in positions</th> <th>Old property (deprecated)</th> </tr> <tr> <td>Innergemeinschaftliche Erwerbe</td> <td><code>'taxRule': 8</code></td> <td> <ul> <li>0.0</li> <li>7.0</li> <li>19.0</li> </ul> </td> <td>-</td> </tr> <tr> <td>Vorsteuerabziehbare Aufwendungen</td> <td><code>'taxRule': 9</code></td> <td> <ul> <li>0.0</li> <li>7.0</li> <li>19.0</li> </ul> </td> <td><code>'taxType': 'default'</code></td> </tr> <tr> <td>Nicht vorsteuerabziehbare Aufwendungen</td> <td><code>'taxRule': 10</code></td> <td> <ul> <li>0.0</li> </ul> </td> <td>-</td> </tr> <tr> <td>Reverse Charge gem. §13b Abs. 2 UStG mit Vorsteuerabzug 0% (19%)</td> <td><code>'taxRule': 12</code></td> <td> <ul> <li>0.0</li> </ul> </td> <td>-</td> </tr> <tr> <td>Reverse Charge gem. §13b UStG ohne Vorsteuerabzug 0% (19%)</td> <td><code>'taxRule': 13</code></td> <td> <ul> <li>0.0</li> </ul> </td> <td>-</td> </tr> <tr> <td>Reverse Charge gem. §13b Abs. 1 EU Umsätze 0% (19%)</td> <td><code>'taxRule': 14</code></td> <td> <ul> <li>0.0</li> </ul> </td> <td>-</td> </tr> </table> \n \n#### VAT rules for small business owner ('Kleinunternehmer') in sevdesk-Update 2.0 (Revenue)\n <table> <tr> <th>VAT Rule</th> <th>New Property</th> <th>Allowed taxRate in positions</th> <th>Old property (deprecated)</th> </tr> <tr> <td>Steuer nicht erhoben nach §19UStG</td> <td><code>'taxRule': 11</code></td> <td> <ul> <li>0.0</li> </ul> </td> <td><code>'taxType': 'ss'</code></td> </tr> </table> \n \n#### VAT rules for small business owner ('Kleinunternehmer') in sevdesk-Update 2.0 (Expense)\n <table> <tr> <th>VAT Rule</th> <th>New Property</th> <th>Allowed taxRate in positions</th> <th>Old property (deprecated)</th> </tr> <tr> <td>Nicht vorsteuerabziehbare Aufwendungen</td> <td><code>'taxRule': 10</code></td> <td> <ul> <li>0.0</li> </ul> </td> <td><code>'taxType': 'ss'</code></td> </tr> <tr> <td>Reverse Charge gem. §13b UStG ohne Vorsteuerabzug 0% (19%)</td> <td><code>'taxRule': 13</code></td> <td> <ul> <li>0.0</li> </ul> </td> <td>-</td> </tr> </table> \n \n## Booking Accounts\n <I><b>(affects the property accountingType)</b></I><br> With sevdesk-Update 2.0 we changed the available booking accounts and their combinatorics. If you use accountingTypes with SKR numbers that are still available in our receipt guidance, you do not have to change anything in your requests. These booking accounts will automatically be mapped to the new representation (Account Datev). But you have to make sure the taxRate used in positions and taxRule used in the voucher is within the allowed ones (check the [ReceiptGuidance](#tag/Voucher/operation/forAllAccounts)) of the provided booking account, otherwise the API will return a validation error (HTTP status code 422). For orders, invoices, vouchers and credit notes in that were created within sevdesk-Update 2.0 the response will change in all endpoints were these objects are returned. \n## Receipt Guidance\n To help you decide which account can be used in conjunction with which tax rules, tax rates and documents, we created several guidance endpoints just there for you to get helpful information. You can find the descriptions in the changes section for Vouchers below or jump directly to the endpoint description by using this link: [Receipt Guidance](#tag/Voucher/operation/forAllAccounts).<br> Receipt Guidance is planned to give you guidance in which account you can pick (depending on your filter criteria and the client settings (e.g. 'Kleinunternehmer')) and which tax rate and [tax rules](#section/sevdesk-Update-2.0/Tax-Rules) are comptaible with them. \n## Vouchers\n \n### Saving a new voucher ([Voucher/Factory/saveVoucher](#tag/Voucher/operation/voucherFactorySaveVoucher))\n Following use cases do not work anymore or have changed: <ol> <li>Custom vat regulations (taxType = custom and provided taxSet)</li> <li>Only specific tax rates and booking accounts are available. Check [ReceiptGuidance](#tag/Voucher/operation/forAllAccounts)</li> <li>Custom accounting types do not work anymore</li> <li>Using an asset booking account without creating an asset is no longer possible</li> <li>A voucher can not be directly set to paid anymore, therefore only status <code>DRAFT (50)</code> or <code>UNPAID / DUE (100)</code> are possible when creating a new voucher. Use the [/api/v1/Voucher/{voucherId}/bookAmount endpoint](#tag/Voucher/operation/bookVoucher) to set a voucher to paid</li> <li>Setting or changing the property enshrined. Use our new endpoint [/api/v1/Voucher/{voucherId}/enshrine](#tag/Voucher/operation/voucherEnshrine) to enshrine a voucher</li> </ol> \n### Get or update an existing voucher ([Voucher/{voucherId}](#tag/Voucher/operation/updateVoucher))\n Following use cases do not work anymore or have changed: <ol> <li>Custom vat regulations (taxType = custom and provided taxSet)</li> <li>See [ReceiptGuidance](#tag/Voucher/operation/forAllAccounts) to check which tax rates are available in conjunction with which tax rules</li> </ol> \n### Book a voucher ([Voucher/{voucherId}](#tag/Voucher/operation/bookVoucher))\n Following use cases do not work anymore or have changed: <ol> <li>Voucher with negative voucher positions can not use 'cash discount' as a payment difference anymore</li> <li>A Voucher can only be booked when it was registered beforehand (see above)</li> <li>Based on the combination of voucher positions some payment difference reasons are not possible anymore</li> <li>The currency fluctuation (CF) type is no longer supported as a payment difference reason</li> </ol> \n## Banking\n Following use cases do not work anymore or have changed: <ol> <li>Setting or changing the property enshrined will now only be available by using the [appropriate enshrine endpoint](#tag/CheckAccountTransaction/operation/checkAccountTransactionEnshrine)</li> </ol> \n## Invoicing\n The changes to the vat rules also apply here. Check the documentation of voucher above as the changes are the same. \n### General stricter validation in PUT and POST endpoints\n We added stricter validation to ensure only correct invoices are created which than can be further processed in sevdesk. Following use cases do not work anymore or have changed: <ol> <li>Creating an invoice with taxType <code>custom</code> does not work anymore</li> <li>Processing an invoice beyond status <code>DRAFT (100)</code> without a contact does not work anymore</li> <li>Advanced invoices (<code>invoiceType: 'AR'</code>) and partial invoices (<code>invoiceType: 'TR'</code>) can only be created with the tax rule 'Umsatzsteuerpflichtige Umsätze (taxRule: 1)'(for Regelbesteuerer) or 'Steuer nicht erhoben nach §19 UStG (taxRule: 11)'(for Kleinunternehmer)</li> <li>Creating a dunning (<code>invoiceType: 'MA'</code>) with the value of property <code>reminderCharge</code> greater than 0 does not work anymore</li> <li>Creating an advanced invoice (<code>invoiceType: 'AR'</code>), a partial invoice (<code>invoiceType: 'TR'</code>) or a final invoice (<code>invoiceType: 'ER'</code>) with a currency deviating from the clients <code>defaultCurrency</code> is not possible anymore</li> <li>Changing the status manually does not work anymore (see 'Removed endpoint /Invoice/{invoiceId}/changeStatus' below)</li> <li>Enshrining now has to be done by using the [enshrine endpoint](#tag/Invoice/operation/invoiceEnshrine) (see below)</li> </ol> \n### Saving an invoice ([Invoice/Factory/saveInvoice](#tag/Invoice/operation/createInvoiceByFactory))\n Following use cases do not work anymore or have changed: <ol> <li>Invoices can only be created with the status <code>DRAFT (100)</code> and can not be changed manually. Use the matching endpoints (e.g. [sendViaEmail](#tag/Invoice/operation/sendInvoiceViaEMail)) to automatically change the status accordingly</li> <li>Setting or changing the property <code>enshrined</code> is now only possible by using the [enshrine endpoint](#tag/CheckAccountTransaction/operation/checkAccountTransactionEnshrine)</li> </ol> \n### Using an order to create an invoice ([Invoice/Factory/createInvoiceFromOrder](#tag/Invoice/operation/createInvoiceFromOrder))\n Following use cases do not work anymore or have changed: <ol> <li>Creating a final invoice (partialType: 'ER') is not possible if an advanced invoice (partialType: 'AR') or partial invoice (partialType: 'TR') exists. This functionality will be added in a later update</li> </ol> \n### Removed endpoint /Invoice/{invoiceId}/changeStatus\n This endpoint will be completely removed (including sevdesk system version 1.0!). Using these endpoints will automatically change the status accordingly: <ul> <li>[Invoice/{invoiceId}/sendViaEmail](#tag/Invoice/operation/sendInvoiceViaEMail)</li> <li>[Invoice/{invoiceId}/sendBy](#tag/Invoice/operation/invoiceSendBy)</li> <li>[Invoice/{invoiceId}/bookAmount](#tag/Invoice/operation/bookInvoice)</li> <li>[Invoice/{invoiceId}/resetToDraft](#tag/Invoice/operation/invoiceResetToDraft)</li> <li>[Invoice/{invoiceId}/resetToOpen](#tag/Invoice/operation/invoiceResetToOpen)</li> </ul> \n### New endpoint [Invoice/{invoiceId}/resetToDraft](#tag/Invoice/operation/invoiceResetToDraft)\n This new endpoint can be used to reset the status of an invoice to <code>DRAFT (100)</code>. \n### New endpoint [Invoice/{invoiceId}/resetToOpen](#tag/Invoice/operation/invoiceResetToOpen)\n This new endpoint can be used to reset the status of an invoice to <code>OPEN (200)</code>. \n### New endpoint [Invoice/{invoiceId}/enshrine]((#tag/Invoice/operation/invoiceEnshrine))\n The enshrine endpoint is now used to set the property <code>enshrined</code>. <b>This operation CAN NOT be undone due to legal reasons!</b> \n## Credit Notes\n The changes to the vat rules also apply here. Check the documentation of voucher above as the changes are the same. \n### General stricter validation in PUT and POST endpoints\n We added stricter validation to ensure only correct credit notes are created which than can be further processed in sevdesk. Due to the move from taxTypes/taxSets to taxRules you need to check the compatibility of the taxRules in combination with the tax rates. Following use cases do not work anymore or have changed: <ol> <li>Creating a credit note without a date of delivery (<code>deliveryDateUntil</code>) for an invoice that has a date of delivery (<code>deliveryDateUntil</code>) is no longer possible</li> <li>Creating a credit note with a date of delivery (<code>deliveryDateUntil</code>) for an invoice that has no date of delivery (<code>deliveryDateUntil</code>) is no longer possible</li> <li>Creating a credit note with a date of delivery (<code>deliveryDateUntil</code>) that is before the date of delivery (<code>deliveryDateUntil</code>) of the invoice is no longer possible</li> <li>Creating a credit note for an advanced invoice (<code>invoiceType: 'AR'</code>) or partial invoice (<code>invoiceType: 'TR'</code>) is no longer possible</li> <li>Creating a credit note for a voucher is no longer possible</li> <li>Creating a credit note with a <code>bookingCategory</code> other than <code>UNDERACHIEVEMENT</code> is no longer possible</li> <li>Currency fluctuation (CF) is no longer supported as a payment difference</li> </ol> \n### Saving a credit note ([CreditNote/Factory/saveCreditNote](#tag/CreditNote/operation/createcreditNote))\n Following use cases do not work anymore or have changed: <ol> <li>Credit notes can only be created with the status <code>DRAFT (100)</code> and can not be changed manually. Use the matching endpoints (e.g. [sendViaEmail](#tag/CreditNote/operation/sendCreditNoteViaEMail)) to automatically change the status accordingly</li> <li>Enshrining now has to be done by using the enshrine endpoint (see below)</li> </ol> \n### Removed endpoint /CreditNote/Factory/createFromVoucher\n The endpoint will be removed. It is not possible anymore to create credit notes for vouchers within sevdesk-Update 2.0. The endpoint continues to stay available for existing sevdesk system version 1.0 clients. \n### Removed endpoint /CreditNote/{creditNoteId}/changeStatus\n This endpoint will be completely removed (including sevdesk system version 1.0!). Using these endpoints will automatically change the status accordingly: <ul> <li>[CreditNote/{creditNoteId}/sendViaEmail](#tag/CreditNote/operation/sendCreditNoteViaEMail)</li> <li>[CreditNote/{creditNoteId}/sendBy](#tag/CreditNote/operation/creditNoteSendBy)</li> <li>[CreditNote/{creditNoteId}/bookAmount](#tag/CreditNote/operation/bookCreditNote)</li> <li>[CreditNote/{creditNoteId}/resetToDraft](#tag/CreditNote/operation/creditNoteResetToDraft)</li> <li>[CreditNote/{creditNoteId}/resetToOpen](#tag/CreditNote/operation/creditNoteResetToOpen)</li> </ul> \n### New endpoint CreditNote/{creditNoteId}/resetToDraft\n This new endpoint can be used to reset the status of a credit note to <code>DRAFT (100)</code>. You can find the documentation [here](#tag/CreditNote/operation/creditNoteResetToDraft). \n### New endpoint CreditNote/{creditNoteId}/resetToOpen\n This new endpoint can be used to reset the status of a credit note to <code>OPEN (200)</code>. You can find the documentation [here](#tag/CreditNote/operation/creditNoteResetToOpen). \n### New endpoint CreditNote/{creditNoteId}/enshrine\n [The enshrine endpoint](#tag/CreditNote/operation/creditNoteEnshrine) is now used to set the property <code>enshrined</code>. <b>This operation CAN NOT be undone due to legal reasons!</b>\n## Parts\n \n### General stricter validation in PUT and POST endpoints\n Following use cases do not work anymore or have changed: <ol> <li>Creating products with a tax rate other than 0.0, 7.0 and 19.0 is no longer possible</li> </ol> "
version: 2.0.0
x-logo:
url: https://my.sevdesk.de/images/logo.svg
servers:
- url: https://my.sevdesk.de/api/v1
description: Our main application instance which most of our customers work with
- url: http://sevdesk.local/api/v1
description: sevdesk internal local instance
tags:
- name: Basics
description: >-
This is a collection of basic sevdesk functions that don't really belong
into any other category.
x-displayName: Basics
- name: CheckAccount
description: >-
A check account is a payment account on which payments to or from the
customer are stored.<br> There are three general types of check accounts:
<ul><li>Offline</li> <li>Online</li> <li>Register</li> </ul> Offline
accounts are accounts on which transactions can be created and booked over
the API or over CSV and MT940 imports.<br> The only exception is the
standard account, on which transactions can not be created over the
API.<br> Please also note, that accounts with CSV and MT940 imports will
have online given as the value for their type attribute.<br> Nevertheless,
they count as offline accounts.<br> Online accounts are directly connected
to a bank application and can not be manipulated over the API.<br>
Register accounts represent the cash register for sevdesk account holders
needing one and they behave the same way as offline
accounts.<br><br>Regarding the check accounts, you will most certainly
only need to request existing check accounts for using their ID in further
requests.<br> Therefore, you only need to send normal GET requests to the
CheckAccount endpoint.<br>
x-displayName: CheckAccount
- name: CheckAccountTransaction
description: >-
A check account transaction is a payment on a check account from or to the
customer.<br> They are essential for booking invoices, vouchers (receipts)
and credit notes with them to mark them as paid.<br> For a correct
bookkeeping, there is always one or multiple transactions linked to an
invoice, a voucher or a credit note, until the relevant object is
completely payed.
x-displayName: CheckAccountTransaction
- name: AccountingContact
description: >-
A accounting contact object belongs to one specific contact object and
holds the accounting information for this contact, which is mainly the
vendor / receivable accounts number.<br> This information is very
important to guarantee valid bookkeeping reports.<br> As this endpoint is
also pretty easy to understand, we won't cover it here, but we really
recommend you having a look at the POST to create accounting contacts and
at the request which checks if a number is still available.
x-displayName: AccountingContact
- name: CommunicationWay
description: >-
A communication way is a medium with which a contact can be reached out
to.<br> This can be: <ul> <li>A phone number (landline or mobile)</li>
<li>An email</li> <li>A website</li> </ul> They can not be a part of the
contact attributes for the same reason as addresses.<br> Each
communication way also is of one of the following types, called
communication way keys, which are also their own resource: <ul>
<li>Private (ID: 1)</li> <li>Work (ID: 2)</li> <li>Fax (ID: 3)</li>
<li>Mobile (ID: 4)</li> <li>Empty (ID: 5)</li> <li>Autobox (ID: 6)</li>
<li>Newsletter (ID: 7)</li> <li>Invoicing (ID: 8)</li> </ul>
x-displayName: CommunicationWay
- name: ContactAddress
description: >-
As one contact can have multiple addresses, they can not be part of the
contact attributes.<br> Instead, they have their own endpoint which makes
it possible to create as many addresses for one contact as needed.<br> For
creating contact addresses have a look at our Swagger specification.
Everything should be pretty straight forward.
x-displayName: ContactAddress
- name: Contact
description: |-
# Purpose of contacts in sevdesk
Every time one of our sevdesk customers sells / buys an item or provides a service there is a end customer involved to which it is sold / from which it is bought or to which the service is provided.<br> These end-customers need to be tracked in sevdesk as our customers will need to link them to the invoices, orders, receipts and all other documents relevant for their bookkeeping which involve the end customer.
# Types of contacts
As our customers can either deal with individual persons or with whole organisations, we need to differentiate between these two types.<br> Therefore, every contact in sevdesk is either a <b>person</b> or a <b>organisation</b>.<br> At the moment, both share the same set of attributes but designating values to some might not make sense for both types.<br> In the next section, we will distinguish between the two and this will become obvious.<br> Furthermore, naturally, individuals can be part of organisations but organisations can not be part of individuals. Also more in the next section.<br> <br> <b>How do I know to which type a contact belongs?</b><br> <br> It is very important to note, that we currently don't have any attribute which shows to which type a contact belongs.<br> Instead, we separate them by the attributes <b>name</b>, <b>surename</b> and <b>familyname</b>.<br> If you designate values to the attribute <b>surename</b> OR <b>familyname</b> the contact will be regarded as a individual person.<br> If you designate a value to <b>name</b> it will be regarded as an organisation.<br><br> <b>Contact Categories</b><br><br> Additionally to the two main types of contacts, every contact belongs to one of the following categories: <ul> <li>Supplier (ID: 2)</li> <li>Customer (ID: 3)</li> <li>Partner (ID: 4)</li> <li>Prospect Customer (ID: 28)</li> </ul>
# Attributes of a contact
Here is a table of all attributes of a contact.<br> Necessary attributes, which must not be left out, are marked red.<br> Attributes which are strongly recommended for valid bookkeeping are marked orange. <table> <tr> <th>Attribute</th> <th>Contact Type</th> <th>Description</th> <th>Attribute Type</th> </tr> <tr> <td><span style='color:darkorange'>name</span></td> <td>Organisations</td> <td> The name of an organisation </td> <td>String</td> </tr> <tr> <td><span style='color:darkorange'>surename</span></td> <td>Individuals</td> <td> The first name of an individual (yes, we know...) </td> <td>String</td> </tr> <tr> <td><span style='color:darkorange'>familyname</span></td> <td>Individuals</td> <td> The last name of an individual </td> <td>String</td> </tr> <tr> <td>name2</td> <td>Individuals</td> <td> The middle name (or name-suffix) of an individual </td> <td>String</td> </tr> <tr> <td><span style='color:red'>category</span></td> <td>Organisations, Individuals</td> <td> The category of the contact<br> </td> <td>Nested object (Category)</td> </tr> <tr> <td>defaultCashbackTime</td> <td>Organisations, Individuals</td> <td> Time frame in which a cashback is granted to the customer if he pays an invoice </td> <td>Integer</td> </tr> <tr> <td>defaultCashbackPercent</td> <td>Organisations, Individuals</td> <td> Percentage of which the price of an invoice is reduced if paid in above time frame </td> <td>Double</td> </tr> <tr> <td><span style='color:darkorange'>taxNumber</span></td> <td>Organisations, Individuals</td> <td> Tax number of the contact. </td> <td>String</td> </tr> <tr> <td><span style='color:darkorange'>excemptVat</span></td> <td>Organisations, Individuals</td> <td> Defines if the contact is free of vat </td> <td>Boolean</td> </tr> <tr> <td>defaultTimeToPay</td> <td>Organisations, Individuals</td> <td> The default time this end customer has to pay invoices </td> <td>Integer</td> </tr> <tr> <td><span style='color:darkorange'>bankNumber</span></td> <td>Organisations, Individuals</td> <td> The bank number of the contact </td> <td>Integer</td> </tr> <tr> <td>birthday</td> <td>Individuals</td> <td> The birthday </td> <td>Unix-Timestamp</td> </tr> <tr> <td><span style='color:darkorange'>vatNumber</span></td> <td>Organisations, Individuals</td> <td> The vat number </td> <td>String</td> </tr> <tr> <td>defaultDiscountAmount</td> <td>Organisations, Individuals</td> <td> A default discount amount this contact gets </td> <td>Double</td> </tr> <tr> <td>defaultDiscountPercentage</td> <td>Organisations, Individuals</td> <td> Define if the value in defaultDiscountAmount is regarded as a percentage. </td> <td>Boolean</td> </tr> <tr> <td>gender</td> <td>Individuals</td> <td> Gender (m,w, or your own definition) </td> <td>String</td> </tr> <tr> <td>academicTitle</td> <td>Individuals</td> <td> Academic title of the contact </td> <td>String</td> </tr> <tr> <td>description</td> <td>Organisations, Individuals</td> <td> A description for the contact </td> <td>String (can contain some html)</td> </tr> <tr> <td>titel</td> <td>Individuals</td> <td> Position an individual holds in an organisation </td> <td>String</td> </tr> <tr> <td><span style='color:darkorange'>parent</span></td> <td>Individuals</td> <td> The organisation to which this individual belongs </td> <td>Nested object (Contact)</td> </tr> <tr> <td><span style='color:darkorange'>customerNumber</span></td> <td>Organisations, Individuals</td> <td> The customer number of the contact. </td> <td>String</td> </tr> <tr> <td><span style='color:darkorange'>bankAccount</span></td> <td>Organisations, Individuals</td> <td> The bank account number </td> <td>String</td> </tr> </table>
# The customer number
The customer number is not an attribute that must be supplied when creating a contact, however for most, if not all of our customers, a correct enumeration is the key to structured bookkeeping, which is why duplicate entries must be avoided.<br> For this reason, most of the time a manual assignment of numbers is not the best idea and we are happy to provide you two contact endpoints which will help out.<br><br> The first GET request you can send will check if a customer number is still available.<br> All you need to provide in the query string is the customer number which should be checked. <ul> <li>ht<span>tps://my.sevdesk.de/api/v1/Contact/Mapper/checkCustomerNumberAvailability?customerNumber=KD-1000</span></li> </ul> The second GET request you can send will check what the next customer number should be, so that a correct enumeration is kept.<br> This time, you only need to send the request to the endpoint. <ul> <li>ht<span>tps://my.sevdesk.de/api/v1/Contact/Factory/getNextCustomerNumber</span></li> </ul>
# How to filter for certain contacts
Often you don't want to retrieve all contacts in a sevdesk account or one specific contact of which you know the ID, but rather a list of contacts or a single contact with certain properties.<br> For this purpose we provide a bunch of filters that you can attach to your GET query string for nearly all endpoints.<br> Here are all filters applicable to a contact query. <table> <tr> <th>Filter</th> <th>Description</th> </tr> <tr> <td>depth=1</td> <td> Retrieve organisations AND persons.<br> This attribute is not active as default, so if you don't specify it as true, you will only get organisations. </td> </tr> <tr> <td>category[id]={<span style='color:red'>id</span>}&category[objectName]=Category</td> <td>Only retrieve all contacts with <span style='color:red'>id</span> as a category</td> </tr> <tr> <td>city={<span style='color:red'>cityName</span>}</td> <td>Only retrieve all contacts with <span style='color:red'>cityName</span> as a city</td> </tr> <tr> <td>tags[x][id]={<span style='color:red'>id</span>}&tags[x][objectName]=Tag</td> <td>Only retrieve all contacts with <span style='color:red'>id</span> as a tag.<br> You can specify multiple tags by adding more array entries. </td> </tr> <tr> <td>customerNumber={<span style='color:red'>number</span>}</td> <td>Only retrieve all contacts with <span style='color:red'>number</span> as a customer number</td> </tr> <tr> <td>parent[id]={<span style='color:red'>id</span>}&parent[objectName]=Contact</td> <td>Only retrieve all contacts with <span style='color:red'>id</span> as a parent organisation</td> </tr> <tr> <td>name={<span style='color:red'>name</span>}</td> <td>Only retrieve all contacts with <span style='color:red'>name</span> as a name, surename or familyname</td> </tr> <tr> <td>zip={<span style='color:red'>zipCode</span>}</td> <td>Only retrieve all contacts with <span style='color:red'>zipCode</span> as a zip</td> </tr> <tr> <td>country[id]={<span style='color:red'>id</span>}&country[objectName]=StaticCountry</td> <td>Only retrieve all contacts with <span style='color:red'>id</span> as a country</td> </tr> <tr> <td>createBefore={<span style='color:red'>timestamp</span>}</td> <td>Only retrieve all contacts created before <span style='color:red'>timestamp</span></td> </tr> <tr> <td>createAfter={<span style='color:red'>timestamp</span>}</td> <td>Only retrieve all contacts created after <span style='color:red'>timestamp</span></td> </tr> <tr> <td>updateBefore={<span style='color:red'>timestamp</span>}</td> <td>Only retrieve all contacts updated last before <span style='color:red'>timestamp</span></td> </tr> <tr> <td>updateAfter={<span style='color:red'>timestamp</span>}</td> <td>Only retrieve all contacts updated last after <span style='color:red'>timestamp</span></td> </tr> <tr> <td>orderByCustomerNumber={<span style='color:red'>ASC/DESC</span>}</td> <td>Order all contacts after customer number in <span style='color:red'>ASC/DESC</span> order</td> </tr> </table>
x-displayName: Contact
- name: ContactField
description: >-
The contact fields are placeholders that can be titled and filled per
contact. The contact fields can then be used in invoices, credit notes and
emails.
x-displayName: ContactField
- name: CreditNote
description: |-
# Purpose of credit notes in sevdesk
A credit notes is essentially a special type of invoice which is not written by the service provider but rather by the beneficiary.<br> In common use, the term credit note is used when someone receives a payment for which he did not write an invoice.<br> In sevdesk you need to choose a booking category for the credit note you want to create.<br> This booking category describes why you need to create a credit note and can't be disregarded.<br>
# Credit note booking categories
As mentioned above, every credit note needs to have a booking category.<br> The following categories are available at the moment. </p> <table> <tr> <th>Booking Category</th> <th>Description</th> <th>Abbreviation</th> </tr> <tr> <td>Provision</td> <td> <b>Not supported in sevdesk-Update 2.0.</b><br> The credit note is a provision. </td> <td><code>PROVISION</code></td> </tr> <tr> <td>Assigned royalty</td> <td> <b>Not supported in sevdesk-Update 2.0.</b><br> The credit note is a assigned royalty. </td> <td><code>ROYALTY_ASSIGNED</code></td> </tr> <tr> <td>Unassigned royalty</td> <td> <b>Not supported in sevdesk-Update 2.0.</b><br> The credit note is a unassigned royalty. </td> <td><code>ROYALTY_UNASSIGNED</code></td> </tr> <tr> <td>Underachievement of invoice</td> <td> The Credit Note is a underachievement of an invoice or voucher.<br> If this is the case, you need to provide the ID of this invoice or voucher in the attribute <code>refSrcInvoice</code> or <code>refSrcVoucher</code>! </td> <td><code>UNDERACHIEVEMENT</code></td> </tr> <tr> <td>To be booked on special account</td> <td> <b>Not supported in sevdesk-Update 2.0.</b><br> The Credit Note should be booked on a special account.<br> If this is the case, you need to provide the ID of this account in the attribute accountingType! </td> <td><code>ACCOUNTING_TYPE</code></td> </tr> </table>
# Status of credit notes
<table> <tr> <th>Credit note status</th> <th>Meaning</th> <th>Status code</th> </tr> <tr> <td>Draft</td> <td> The credit note is still a draft.<br> It has not been sent to the end-customer and can still be changed. </td> <td> 100 </td> </tr> <tr> <td>Open / Delivered</td> <td> The credit note has been sent to the end-customer.<br> </td> <td> 200 </td> </tr> <tr> <td>Partially paid</td> <td> The credit note has been partially paid.<br> </td> <td> 1000 </td> </tr> <tr> <td>Paid</td> <td> The credit note has been paid.<br> </td> <td> 1000 </td> </tr> </table> It is again important to keep in mind the status codes for all status of credit notes or at least the one you will need.
# Attributes of a credit note
Here is the table of all attributes of credit notes.<br> Necessary attributes, which must not be left out, are marked red.<br> Attributes which are strongly recommended for valid bookkeeping are marked orange.<br> There is also a distinction between credit note types. <table> <tr> <th>Attribute</th> <th>Credit Note Type</th> <th>Description</th> <th>Attribute Type</th> </tr> <tr> <td><span style='color:red'>taxType</span></td> <td>Any</td> <td> <b>Use this in sevdesk-Update 1.0 (instead of taxRule).</b><br> Defines the vat-regulation.<br> Can be: <ul> <li><code>default</code></li> <li><code>eu</code></li> <li><code>noteu</code></li> <li><code>custom</code></li> <li><code>ss</code></li> </ul> </td> <td>String</td> </tr> <tr> <td>taxSet</td> <td>Any</td> <td> <b>Use this in sevdesk-Update 1.0 (instead of taxRule).</b><br> Use for custom defined vat-regulations.<br> Requires <code>"taxType": "custom"</code> </td> <td>Integer</td> </tr> <tr> <td><span style='color:red'>taxRule</span></td> <td>Any</td> <td> <b>Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).</b><br> Defines the vat-regulation.<br> <br> For "Regelbesteuerung" it can be one of: <ul> <li><code>1</code> - Umsatzsteuerpflichtige Umsätze - tax rates: 0.0, 7.0, 19.0 - replaces <code>"taxType": "default"</code></li> <li><code>2</code> - Ausfuhren - allowedTaxRates: 0.0</li> <li><code>3</code> - Innergemeinschaftliche Lieferungen - tax rates: 0.0, 7.0, 19.0 - replaces <code>"taxType": "eu"</code></li> <li><code>4</code> - Steuerfreie Umsätze §4 UStG - tax rates: 0.0</li> <li><code>5</code> - Reverse Charge gem. §13b UStG - tax rates: 0.0</li> <li><code>17</code> - Nicht im Inland steuerbare Leistung - tax rates: 0.0 - replaces <code>"taxType": "noteu"</code></li> </ul> For small business owner ("Kleinunternehmer") it can be: <ul> <li><code>11</code> - Steuer nicht erhoben nach §19UStG - tax rates: 0.0 - replaces <code>"taxType": "ss"</code></li> </ul> Example for Umsatzsteuerpflichtige Umsätze: <code>"taxRule": {"id": "1", "objectName": "TaxRule"}</code> </td> <td>Nested object (TaxRule)</td> </tr> <tr> <td><span style='color:darkorange'>accountingType</span></td> <td>Any</td> <td> The account on which this credit note should be booked.<br> This attribute <b>has</b> to be used in case the booking category <b>ACCOUNTING_TYPE</b> is used. </td> <td>Integer</td> </tr> <tr> <td><span style='color:darkorange'>refSrcInvoice</span></td> <td>Any</td> <td> The invoice from which the underachievement originates.<br> This attribute <b>has</b> to be used if <code>"bookingCategory": "UNDERACHIEVEMENT"</code> is used.<br> <br> We recommend to use <a href="#tag/CreditNote/operation/createCreditNoteFromInvoice">/CreditNote/Factory/createFromInvoice</a> to create a credit note for an invoices. </td> <td>Integer</td> </tr> <tr> <td><span style='color:darkorange'>refSrcVoucher</span></td> <td>Any</td> <td> <b>Not supported in sevdesk-Update 2.0.</b><br> The voucher from which the underachievement originates.<br> This attribute <b>has</b> to be used in case the booking category <code>UNDERACHIEVEMENT</code> is used.<br> <br> We recommend to use <a href="#tag/CreditNote/operation/createCreditNoteFromVoucher">/CreditNote/Factory/createFromVoucher</a> to create a credit note for an invoices. </td> <td>Integer</td> </tr> <tr> <td><span style='color:red'>currency</span></td> <td>Any</td> <td> Currency of the credit note.<br> Needs to be currency code according to ISO-4217. </td> <td>String</td> </tr> <tr> <td><span style='color:red'>taxText</span></td> <td>Any</td> <td> Text describing the vat regulation you chose.<br> A common text of our German customers would be:<br> Umsatzsteuer ausweisen or zzgl. Umsatzsteuer 19% </td> <td>String</td> </tr> <tr> <td>taxRate</td> <td>Any</td> <td> This is not used anymore. Use the taxRate of the individual positions instead. </td> <td>Integer</td> </tr> <tr> <td><span style='color:red'>contactPerson</span></td> <td>Any</td> <td> The sevdesk user which acts as a contact person for this credit note.<br> </td> <td>Nested object (SevUser)</td> </tr> <tr> <td>smallSettlement</td> <td>Any</td> <td> If the sevdesk account is falling under the small entrepreneur scheme the credit notes must't contain any vat.<br> If this is the case, this attribute should be true, otherwise false. </td> <td>Boolean</td> </tr> <tr> <td><span style='color:red'>creditNoteDate</span></td> <td>Any</td> <td> The credit note date. </td> <td>Date / Timestamp</td> </tr> <tr> <td><span style='color:red'>status</span></td> <td>Any</td> <td> The credit note status. </td> <td>Integer</td> </tr> <tr> <td><span style='color:darkorange'>showNet</span></td> <td>Any</td> <td> This attribute determines, if the price you give the credit note positions will be regarded as gross or net.<br> If true, the price attribute will hold the net value, otherwise the gross value, as described in the section above. </td> <td>Boolean</td> </tr> <tr> <td>enshrined</td> <td>Any</td> <td> Enshrined credit notes cannot be changed.<br> Can only be set via <a href="#tag/CreditNote/operation/creditNoteEnshrine">/CreditNote/{creditNoteId}/enshrine</a>. This operation cannot be undone. </td> <td>Date / Timestamp</td> </tr> <tr> <td>customerInternalNote</td> <td>Any</td> <td> You can use this attribute to provide a note for the credit note.<br> It can be used for reference numbers, order numbers or other important information. </td> <td>String</td> </tr> <tr> <td><span style='color:darkorange'>address</span></td> <td>Any</td> <td> Holds the <b>complete</b> address to which the credit note is directed.<br> You can use line brakes to separate the different address parts. </td> <td>String</td> </tr> <tr> <td>deliveryDate</td> <td>Any</td> <td> The delivery date of the credit note.<br> This can also be a date range if you provide another timestamp for <b>deliveryDateUntil</b>. </td> <td>Timestamp</td> </tr> <tr> <td>deliveryDateUntil</td> <td>Any</td> <td> You can provide a value here if you want the delivery date to be a date range and you have already given a timestamp to <b>deliveryDate</b>. </td> <td>Timestamp</td> </tr> <tr> <td><span style='color:darkorange'>sendType</span></td> <td>Any</td> <td> Is set when using [CreditNote/{creditNoteId}/sendBy](#tag/CreditNote/operation/creditNoteSendBy) / [CreditNote/{creditNoteId}/sendViaEmail](#tag/CreditNote/operation/sendCreditNoteViaEMail).<br> Valid types are: VPR (printed), VPDF (downloaded), VM (mailed), VP (postal). </td> <td>String</td> </tr> <tr> <td><span style='color:darkorange'>creditNoteNumber</span></td> <td>Any</td> <td> The credit note number. </td> <td>String</td> </tr> <tr> <td><span style='color:darkorange'>contact</span></td> <td>Any</td> <td> The end-customer to which the credit note is directed.<br> </td> <td>Nested object (Contact)</td> </tr> <tr> <td><span style='color:darkorange'>header</span></td> <td>Any</td> <td> The credit note header.<br> Usually consists of the credit note number and a prefix. </td> <td>String</td> </tr> <tr> <td>headText</td> <td>Any</td> <td> A head text for the credit note.<br> Can contain certain html tags. </td> <td>String</td> </tr> <tr> <td>footText</td> <td>Any</td> <td> A foot text for the credit note.<br> Can contain certain html tags. </td> <td>String</td> </tr> <tr> <td>payDate</td> <td>Any</td> <td> The date the credit note has been paid. </td> <td>Timestamp</td> </tr> <tr> <td>costCentre</td> <td>Any</td> <td> A cost centre for the credit note. </td> <td>Nested object (CostCentre)</td> </tr> <tr> <td>sendDate</td> <td>Any</td> <td> The date the credit note has been sent to the end-customer. </td> <td>Timestamp</td> </tr> <tr> <td><span style='color:red'>bookingCategory</span></td> <td>Any</td> <td> The booking category of the credit note.<br> <b>Must be <code>UNDERACHIEVEMENT</code> in sevdesk-Update 2.0.</b> </td> <td>String</td> </tr> </table>
# The credit note number
At this point we wan't to pay special attention to the credit note number again.<br> The credit note number is not an attribute that must be supplied when creating a credit note, however for most, if not all of our customers, a correct enumeration is the key to structured bookkeeping, which is why duplicate entries must be avoided.<br> For this reason, most of the time a manual assignment of numbers is not the best idea and we are happy to provide you a endpoints which will help out finding the next credit note number. <br><br> This GET request will check what the next credit note number should be, so that a correct enumeration is kept.<br> The concrete endpoint can be used for a multitude of enumerations, but we will just concentrate on checking the next credit note number.<br> <ul> <li><b>v1/SevSequence/Factory/getByType?objectType=CreditNote&type=CN</b></li> </ul>
# How to filter for certain credit notes
Often you don't want to retrieve all credit notes in a sevdesk account or one specific credit note of which you know the ID, but rather a list of credit notes or a single credit note with certain properties.<br> For this purpose we provide a bunch of filters that you can attach to your GET query string for nearly all endpoints.<br> Here are all filters applicable to a credit note query. <table> <tr> <th>Filter</th> <th>Description</th> </tr> <tr> <td>creditNoteNumber={number}</td> <td>Only retrieve all credit notes with number as a credit note number</td> </tr> <tr> <td>onlyEnshrined=true</td> <td>Only retrieve all credit notes which are enshrined</td> </tr> <tr> <td>tags[x][id]={id}&tags[x][objectName]=Tag</td> <td>Only retrieve all credit notes with id as a tag.<br> You can specify multiple tags by adding more array entries. </td> </tr> <tr> <td>status={status}</td> <td>Only retrieve credit notes of a given status</td> </tr> <tr> <td>delinquent=true</td> <td>Only retrieve delinquent (due) credit notes</td> </tr> <tr> <td>notdelinquent=true</td> <td>Only retrieve credit notes which are not delinquent (due)</td> </tr> <tr> <td>customerIntenalNote={note}</td> <td>Only retrieve all credit notes with note as a customer internal note</td> </tr> <tr> <td>origin[id]={id}&origin[objectName]=ModelName</td> <td>Only retrieve all credit notes with id as an origin</td> </tr> <tr> <td>costCentre[id]={id}&costCentre[objectName]=CostCentre</td> <td>Only retrieve all credit notes with id as a cost centre.<br> </td> </tr> <tr> <td>contact[id]={id}&contact[objectName]=Contact</td> <td>Only retrieve all credit notes with id as a contact<br> </td> </tr> <tr> <td>startDate={timestamp}</td> <td>Only retrieve all credit notes where credit note date is bigger than timestamp</td> </tr> <tr> <td>endDate={timestamp}</td> <td> Only retrieve all credit notes where credit note date is smaller than timestamp<br> If startDate and endDate are both supplied, you will get all credit notes in the defined range </td> </tr> <tr> <td>day={timestamp}</td> <td>Only retrieve all credit notes where credit note date falls on the day of timestamp</td> </tr> <tr> <td>header={header}</td> <td>Only retrieve all credit notes with header as a header</td> </tr> <tr> <td>headerSearch={header}</td> <td>Only retrieve all credit notes of which the header is like header</td> </tr> <tr> <td>paymentMethod[id]={id}&paymentMethod[objectName]=PaymentMethod</td> <td>Only retrieve all credit notes with id as a payment method</td> </tr> <tr> <td>headerOrNumber={headerOrNumber}</td> <td>Only retrieve all credit notes of which the header or credit note number is like headerOrNumber</td> </tr> <tr> <td>headerStartsWith={headerStart}</td> <td>Only retrieve all credit notes of which the header starts with headerStart</td> </tr> <tr> <td>globalSearch={searchTerm}</td> <td>Search for credit notes related to searchTerm</td> </tr> <tr> <td>orderByCreditNoteNumber={ASC/DESC}</td> <td>Order all credit notes after credit note number in ASC/DESC order</td> </tr> <tr> <td>partiallyPaid=true</td> <td> Retrieve all credit notes which are partially paid </td> </tr> <tr> <td>orderByDueDate=true</td> <td>Retrieve all credit notes ordered by their due date</td> </tr> <tr> <td>orderByDueTime=true</td> <td>Retrieve all credit notes ordered by their due time</td> </tr> <tr> <td>orderByDebit=true</td> <td>Retrieve all credit notes ordered by their debit</td> </tr> <tr> <td>creditNoteNumberGreater={number}</td> <td>Only retrieve all credit notes of which the credit note number is bigger than number</td> </tr> <tr> <td>creditNoteNumberNumberSmaller={number}</td> <td>Only retrieve all credit notes of which the credit note number is smaller than number</td> </tr> <tr> <td>startAmount={amount}</td> <td>Only retrieve all credit notes of which the (net/gross) sum is larger or equal amount</td> </tr> <tr> <td>endAmount={amount}</td> <td>Only retrieve all credit notes of which the (net/gross) sum is smaller or equal amount</td> </tr> </table>
x-displayName: CreditNote
- name: CreditNotePos
description: >-
Just like normal invoices, credit notes naturally contain one or more
credit note positions sometimes also called items, lines or line
items.<br> These positions can but mustn't contain parts from the sevdesk
inventory.<br> In sevdesk the credit note object itself just provides the
skeleton to which positions can be added.<br> Without the positions, the
credit note would have a sum of zero and therefore no real meaning.<br>
For this reason it is necessary that we have a closer look at credit note
positions in this section.
# What makes up a credit note position?
A credit note position basically consist of: <ul> <li>A part (optional but strongly recommended)</li> <li>The name of the part or item</li> <li>A price for one unit of this part or item</li> <li>A unit in which the part or item is measured</li> <li>A quantity showing how many units of the part or item are in the position</li> <li>A tax rate</li> <li>An credit note to which the position belongs</li> </ul> The total gross sum of the credit note position is then calculated by the price being multiplied with the quantity and the tax rate, which is previously converted to a point number.<br> So for a price of 100, a quantity of two and a tax rate of 19 this would be:<br> 100 * 2 * 1,19 = 238 <br><br> There is also the option of regarding the price as the gross price.<br> This is regulated by an attribute of credit note which is called showNet. More about it in the attribute list.<br> In this case, the total sum will be the price you provided and the net price will be calculated by our system.<br> Some of our customers prefer this method, however make sure that you don't get prices mixed up.
# Credit note position attributes
Here is the table of all attributes of credit note positions<br> Necessary attributes, which must not be left out, are marked red.<br> Attributes which are strongly recommended for valid bookkeeping are marked orange.<br> <table> <tr> <th>Attribute</th> <th>Description</th> <th>Attribute Type</th> </tr> <tr> <td><span style='color:red'>taxRate</span></td> <td> The tax rate of the position. </td> <td>Double</td> </tr> <tr> <td><span style='color:red'>unity</span></td> <td> The unity in which one item is measured. </td> <td>Nested object (Unity)</td> </tr> <tr> <td><span style='color:red'>quantity</span></td> <td> The quantity of items. </td> <td>Double</td> </tr> <tr> <td><span style='color:red'>creditNote</span></td> <td> The creditNote to which the position belongs. </td> <td>Nested object (CreditNote)</td> </tr> <tr> <td>text</td> <td> A text describing the position. </td> <td>String</td> </tr> <tr> <td>positionNumber</td> <td> The number of the position if there are multiple positions in a credit note.<br> Needs to start with zero and is incremented for every new position.<br> If you want to order them differently, you can change their position numbers to your needs. </td> <td>Integer</td> </tr> <tr> <td><span style='color:darkorange'>name</span></td> <td> The name of the item in the position. </td> <td>String</td> </tr> <tr> <td><span style='color:darkorange'>price</span></td> <td> The price for one unit of the item in the position. </td> <td>Double</td> </tr> <tr> <td><span style='color:darkorange'>part</span></td> <td> You can define a part from your sevdesk inventory here.<br> Please be aware, you will still need to provide the name, price and everything else as this will not automatically be generated. </td> <td>Nested object (Part)</td> </tr> </table>
# How to create/update an credit note position
You can create a credit note position when creating a credit note, for more information visit the credit note endpoint.<br> If you want to update an credit note position for an existing credit note, then you must use the same endpoint as when creating an credit note, then passing in the <span style='color:red'><b>ID</b></span> along with the <span style='color:red'><b>objectName</b></span> of the credit note and <span style='color:red'><b>mapAll</b></span>.<br> <ul> <li><code>{"creditNote": { "<b>id</b>": 0, "<b>objectName</b>": "CreditNote", "<b>mapAll</b>": true}, <br>"creditNotePos":[{...}]</code></li> </ul> In order to update an credit note position in an existing credit note, the <span style='color:red'><b>ID</b></span> and the <span style='color:red'><b>objectName</b></span> of the credit note must be transferred and in the credit note position the <span style='color:red'><b>ID</b></span> of the credit note position to be updated<br> <ul> <li><code>"creditNote": { "<b>id</b>": 0, "<b>objectName</b>": "CreditNote", "<b>mapAll</b>": true},<br> "creditNotePos":[{"<b>id</b>": 0, ...}]</code></li> </ul>
x-displayName: CreditNotePos
- name: Export
description: A set of operations to export data.
x-displayName: Export
- name: Part
description: Manage parts in an inventory and use them in e.g. invoices.
x-displayName: Part
- name: Invoice
description: |-
# Purpose of invoices in sevdesk
Every time one of our sevdesk customers sells an item or provides a service an invoice needs to be created.<br> These invoice can then be paid by the end-customers so that the selling process is completed.<br> The invoices are directly connected to the transactions of the customer, so every time an invoice is created and marked as paid, there must be a transaction on some bank account.<br> The invoice must then be linked to this transaction, otherwise false reports for tax offices and other institutions can be the case.
# Attributes of an invoice
Here is the table of all attributes of invoices.<br> Necessary attributes, which must not be left out, are marked red.<br> Attributes which are strongly recommended for valid bookkeeping are marked orange.<br> There is also a distinction between invoice types, as not all attributes are useful for all types.<br> <table> <tr> <th>Attribute</th> <th>Invoice Type</th> <th>Description</th> <th>Attribute Type</th> </tr> <tr> <td><span style='color:red'>taxType</span></td> <td>Any</td> <td> <b>Use this in sevdesk-Update 1.0 (instead of taxRule).</b><br> Defines the vat-regulation.<br> Can be: <ul> <li><code>default</code></li> <li><code>eu</code></li> <li><code>noteu</code></li> <li><code>custom</code></li> <li><code>ss</code></li> </ul> </td> <td>String</td> </tr> <tr> <td>taxSet</td> <td>Any</td> <td> <b>Use this in sevdesk-Update 1.0 (instead of taxRule).</b><br> Use for custom defined vat-regulations.<br> Requires <code>"taxType": "custom"</code> </td> <td>Integer</td> </tr> <tr> <td><span style='color:red'>taxRule</span></td> <td>Any</td> <td> <b>Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).</b><br> Defines the vat-regulation.<br> <br> For "Regelbesteuerung" it can be one of: <ul> <li><code>1</code> - Umsatzsteuerpflichtige Umsätze - tax rates: 0.0, 7.0, 19.0 - replaces <code>"taxType": "default"</code></li> <li><code>2</code> - Ausfuhren - allowedTaxRates: 0.0</li> <li><code>3</code> - Innergemeinschaftliche Lieferungen - tax rates: 0.0, 7.0, 19.0 - replaces <code>"taxType": "eu"</code></li> <li><code>4</code> - Steuerfreie Umsätze §4 UStG - tax rates: 0.0</li> <li><code>5</code> - Reverse Charge gem. §13b UStG - tax rates: 0.0</li> <li> <code>17</code> - Nicht im Inland steuerbare Leistung - tax rates: 0.0 - replaces <code>"taxType": "noteu"</code><br> "Nicht im Inland steuerbare Leistung" is not available for: <ul> <li>advance invoice (<code>"invoiceType": "AR"</code>)</li> <li>partial invoice (<code>"invoiceType": "TR"</code>)</li> <li>final invoice (<code>"invoiceType": "ER"</code>)</li> </ul> </li> </ul> For small business owner ("Kleinunternehmer") it can be: <ul> <li><code>11</code> - Steuer nicht erhoben nach §19UStG - tax rates: 0.0 - replaces <code>"taxType": "ss"</code></li> </ul> Example for Umsatzsteuerpflichtige Umsätze: <code>"taxRule": {"id": "1", "objectName": "TaxRule"}</code> </td> <td>Nested object (TaxRule)</td> </tr> <tr> <td><span style='color:red'>currency</span></td> <td>Any</td> <td> Currency of the invoice.<br> Needs to be currency code according to ISO-4217. </td> <td>String</td> </tr> <tr> <td><span style='color:red'>taxText</span></td> <td>Any</td> <td> Text describing the vat regulation you chose.<br> A common text of our German customers would be:<br> Umsatzsteuer ausweisen or zzgl. Umsatzsteuer 19% </td> <td>String</td> </tr> <tr> <td>taxRate</td> <td>Any</td> <td> This is not used anymore. Use the taxRate of the individual positions instead. </td> <td>Integer</td> </tr> <tr> <td><span style='color:red'>contactPerson</span></td> <td>Any</td> <td> The sevdesk user which acts as a contact person for this invoice.<br> </td> <td>Nested object (SevUser)</td> </tr> <tr> <td>smallSettlement</td> <td>Any</td> <td> If the sevdesk account is falling under the small entrepreneur scheme the invoices must't contain any vat.<br> If this is the case, this attribute should be true, otherwise false. </td> <td>Boolean</td> </tr> <tr> <td><span style='color:red'>invoiceDate</span></td> <td>Any</td> <td> The invoice date.
**Requirements:**
* For final invoices (<code>"invoiceType" = "ER"</code>), the invoiceDate must be later than or equal to the invoiceDate of related advance (<code>"invoiceType" = "AR"</code>) / partial (<code>"invoiceType" = "TR"</code>) invoices. </td> <td>Date / Timestamp</td> </tr> <tr> <td><span style='color:red'>status</span></td> <td>Any</td> <td> The invoice status. </td> <td>Integer</td> </tr> <tr> <td><span style='color:darkorange'>showNet</span></td> <td>Any</td> <td> This attribute determines, if the price you give the invoice positions will be regarded as gross or net.<br> If true, the price attribute will hold the net value, otherwise the gross value, as described in the section above. </td> <td>Boolean</td> </tr> <tr> <td><span style='color:red'>discount</span></td> <td>Any</td> <td> If the end-customer gets a discount if he pays the invoice in a given time, you can specify the percentage of the discount here.<br> Should this be the case, you will need to provide a value for the attribute <b>discountTime</b> too, otherwise there is no time given and the end-customer won't get a discount.<br> If you don't want this, just leave this attribute at zero. </td> <td>Integer</td> </tr> <tr> <td>discountTime</td> <td>Any</td> <td> If a value other than zero is used for the discount attribute you need to specify the amount of days for which the discount is granted. </td> <td>Integer</td> </tr> <tr> <td>enshrined</td> <td>Any</td> <td> Enshrined invoices cannot be changed.<br> Can only be set via <a href="#tag/Invoice/operation/invoiceEnshrine">/Invoice/{invoiceId}/enshrine</a>. This operation cannot be undone. </td> <td>Date / Timestamp</td> </tr> <tr> <td>customerInternalNote</td> <td>Any</td> <td> You can use this attribute to provide a note for the invoice.<br> It can be used for reference numbers, order numbers or other important information. </td> <td>String</td> </tr> <tr> <td><span style='color:darkorange'>address</span></td> <td>Any</td> <td> Holds the <b>complete</b> address to which the invoice is directed.<br> You can use line brakes to separate the different address parts. </td> <td>String</td> </tr> <tr> <td>deliveryDate</td> <td>Any</td> <td> The delivery date of the invoice.<br> This can also be a date range if you provide another timestamp for <b>deliveryDateUntil</b>. </td> <td>Timestamp</td> </tr> <tr> <td>deliveryDateUntil</td> <td>Any</td> <td> You can provide a value here if you want the delivery date to be a date range and you have already given a timestamp to <b>deliveryDate</b>. </td> <td>Timestamp</td> </tr> <tr> <td><span style='color:darkorange'>sendType</span></td> <td>Any</td> <td> Is set when using [Invoice/{invoiceId}/sendBy](#tag/Invoice/operation/invoiceSendBy) / [Invoice/{invoiceId}/sendViaEmail](#tag/Invoice/operation/sendInvoiceViaEMail).<br> Valid types are: VPR (printed), VPDF (downloaded), VM (mailed), VP (postal). </td> <td>String</td> </tr> <tr> <td>origin</td> <td>Any</td> <td> You can specify the object from which an invoice originated, like an order.<br> Just provide the ID of this object. </td> <td>Integer</td> </tr> <tr> <td><span style='color:darkorange'>invoiceNumber</span></td> <td>Any</td> <td> The invoice number. </td> <td>String</td> </tr> <tr> <td><span style='color:darkorange'>contact</span></td> <td>Any</td> <td> The end-customer to which the invoice is directed.<br> Please note, you <b>need</b> to provide a contact if the invoice has any other status than 100. </td> <td>Nested object (Contact)</td> </tr> <tr> <td><span style='color:darkorange'>header</span></td> <td>Any</td> <td> The invoice header.<br> Usually consists of the invoice number and a prefix. </td> <td>String</td> </tr> <tr> <td>headText</td> <td>Any</td> <td> A head text for the invoice.<br> Can contain certain html tags. </td> <td>String</td> </tr> <tr> <td>footText</td> <td>Any</td> <td> A foot text for the invoice.<br> Can contain certain html tags. </td> <td>String</td> </tr> <tr> <td>timeToPay</td> <td>Any</td> <td> The time the end-customer has to pay the invoice in days. </td> <td>Integer</td> </tr> <tr> <td>payDate</td> <td>Any</td> <td> The date the end-customer has paid the invoice. </td> <td>Timestamp</td> </tr> <tr> <td>paymentMethod</td> <td>Any</td> <td> The payment method for the invoice.<br> Needs the ID of a specified payment method. </td> <td>Integer</td> </tr> <tr> <td>costCentre</td> <td>Any</td> <td> A cost centre for the invoice. </td> <td>Nested object (CostCentre)</td> </tr> <tr> <td>sendDate</td> <td>Any</td> <td> The date the invoice was sent to the end-customer. </td> <td>Timestamp</td> </tr> <tr> <td><span style='color:red'>invoiceType</span></td> <td><ul> <li>RE - invoice</li> <li>WKR - recurring invoice</li> <li>SR - cancellation invoice</li> <li>MA - invoice remider</li> <li>TR - partial invoice</li> <li>ER - final invoice</li> </td> <td> The invoice type. </td> <td>String</td> </tr> <tr> <td><span style='color:darkorange'>dunningLevel</span></td> <td>Reminders</td> <td> The dunning level.<br> Starts with 1 (Payment reminder) and should be incremented by one every time another reminder is sent. </td> <td>Integer</td> </tr> <tr> <td><span style='color:darkorange'>reminderDeadline</span></td> <td>Reminders</td> <td> The deadline for the next reminder. </td> <td>Timestamp</td> </tr> <tr> <td><span style='color:darkorange'>reminderDebit</span></td> <td>Reminders</td> <td> The reminder debit. </td> <td>Double</td> </tr> <tr> <td><span style='color:darkorange'>reminderTotal</span></td> <td>Reminders</td> <td> The total reminder amount. </td> <td>Double</td> </tr> <tr> <td><span style='color:darkorange'>reminderCharge</span></td> <td>Reminders</td> <td> The additional reminder charge. </td> <td>Double</td> </tr> <tr> <td><span style='color:darkorange'>accountIntervall</span></td> <td>Recurring Invoices</td> <td> The interval in which recurring invoices are due. </td> <td>ISO-8601 Duration</td> </tr> <tr> <td><span style='color:darkorange'>accountNextInvoice</span></td> <td>Recurring Invoices</td> <td> The date when the next invoice is due. </td> <td>Timestamp</td> </tr> <tr> <td>propertyIsEInvoice</td> <td> e-invoice </td> <td> <p>If true, the invoice will be created as e-invoice.</p> <p>To create a valid e-invoice some extra data are required</p> <p> <div>sevClient</div> <ul> <li>addressStreet</li> <li>addressZip</li> <li>addressCity</li> <li>bankIban</li> <li>bankBic</li> <li>contactEmail</li> <li>contactPhone</li> <li>taxNumber</li> <li>vatNumber</li> </ul> </p> <p> <div>contact</div> <ul> <li>buyerReference</li> <li>email</li> </ul> </p> <p> <div>invoice</div> <ul> <li>paymentMethod</li> <li>addressStreet</li> <li>addressZip</li> <li>addressCity</li> <li>addressCountry</li> <li>contact</li> </ul> </p>
</td> <td>boolean</td> </tr> </table>
# The invoice number
At this point we wan't to pay special attention to the invoice number again.<br> The invoice number is not an attribute that must be supplied when creating an invoice, however for most, if not all of our customers, a correct enumeration is the key to structured bookkeeping, which is why duplicate entries must be avoided.<br> For this reason, most of the time a manual assignment of numbers is not the best idea and we are happy to provide you a endpoints which will help out finding the next invoice number.<br><br> This GET request will check what the next invoice number should be, so that a correct enumeration is kept.<br> The concrete endpoint can be used for a multitude of enumerations, but we will just concentrate on checking the next invoice number.<br> You can change the <b>type</b> query string parameter to your needs, depending on the invoice type for which you want the next number. <ul> <li><code>ht<span>tps://my.sevdesk.de/api/v1/SevSequence/Factory/getByType?objectType=Invoice&type=RE</span></code></li> </ul>
# Types and status of invoices
Invoice types <br> Invoices are most certainly the most complex objects that can be handled over the API. There are multiple types of invoices and these invoices can have multiple status again. Let's have a look at the different types of invoices first.<br> <table> <tr> <th>Invoice Type</th> <th>Description</th> <th>Abbreviation</th> </tr> <tr> <td>Normal invoice</td> <td> A normal invoice which documents a simple selling process. </td> <td> RE </td> </tr> <tr> <td>Recurring invoice</td> <td> An invoice which generates normal invoices with the same values regularly in fixed time frames (every month, year, ...). </td> <td> WKR </td> </tr> <tr> <td>Cancellation invoice</td> <td> An invoice which cancels another already created normal invoice. </td> <td> SR </td> </tr> <tr> <td>Reminder invoice</td> <td> An invoice which gets created if the end-customer failed to pay a normal invoice in a given time frame.<br> Often includes some kind of reminder fee. </td> <td> MA </td> </tr> <tr> <td>Part invoice</td> <td> Part of a complete invoice. All part invoices together result in the complete invoice.<br> Often used if the end-customer can partly pay for items or services. </td> <td> TR </td> </tr> <tr> <td>Final invoice</td> <td> The final invoice of all part invoices which completes the invoice.<br> After the final invoice is paid by the end-customer, the selling process is complete. </td> <td> ER </td> </tr> </table><br> For now we will only cover the normal invoices, as this is complex enough.<br> However, it is important to keep in mind the abbreviations for all types of invoices or at least the one you will need.<br> This is, because you will need to provide the invoice type when creating an invoice.<br> <br> <b>Invoice status</b><br> Now that we have covered all invoice types, let's move to the different status they can have.<br> <table> <tr> <th>Invoice status</th> <th>Meaning</th> <th>Status code</th> </tr> <tr> <td>Deactivated recurring invoice</td> <td> The invoice is a deactivated recurring invoice.<br> This status code is only relevant for recurring invoices. </td> <td> 50 </td> </tr> <tr> <td>Draft</td> <td> The invoice is still a draft.<br> It has not been sent to the end-customer and can still be changed. </td> <td> 100 </td> </tr> <tr> <td>Open / Due</td> <td> The invoice has been sent to the end-customer.<br> It is either shown as <b>open</b> if the pay date is not exceeded or <b>due</b> if it is. </td> <td> 200 </td> </tr> <tr> <td>Partially paid</td> <td> The invoice has been partially paid.<br> This means, that it is linked to a transaction on some payment account in sevdesk. This status was introduced with Release 4.181 (June 13, 2024). Invoices that were partially paid before that release will have the status "Open" (<code>"status": "200"</code>). In that case use [Invoice/{invoiceId}/getIsPartiallyPaid](#tag/Invoice/operation/getIsInvoicePartiallyPaid) instead of checking the status directly. </td> <td> 750 </td> </tr> <tr> <td>Paid</td> <td> The invoice has been paid.<br> This means, that it is linked to a transaction on some payment account in sevdesk. </td> <td> 1000 </td> </tr> </table><br> It is again important to keep in mind the status codes for all status of invoices or at least the one you will need.<br> This is, because you will need to provide the status code when creating an invoice.<br>
# How e-invoice works
The e-invoice is a new feature in sevdesk, which allows you to send invoices to your customers in a digital way. To turn an invoice into an e-invoice, you have to set <code>propertyIsEInvoice</code> to <code>true</code> When <code>propertyIsEInvoice</code> is set an XML is embedded inside the PDF. Embedding the XML into the PDF is called ZUGFeRD. If you just need the XML (XRechnung) you can get it by calling [Invoice/{invoiceId}/getXml](#tag/Invoice/operation/invoiceGetXml). Both XML files are identical.
# How to book an invoice
Booking the invoice with a transaction is probably the most important part in the bookkeeping process.<br> There are several ways on correctly booking an invoice, all by using the same endpoint.<br> This endpoint is called <b>/Invoice/{id}/bookAmount</b>.<br><br> The first way of correctly booking an invoice is to book it on the standard check account which is provided by sevdesk.<br> This is perhaps the easiest way, as no transaction needs to be manually created or searched.<br> The fitting transaction will automatically be created on the standard account and the invoice will be booked with it.<br> This works the same way with the register check account.<br><br> <img src='openAPI/img/bookAmountStandard.PNG' width= '800px'><br><br> In the second variant, it is necessary that a transaction already exists, because it is not automatically generated in a manual account or online/finapi account.<br> For this, you must either create the transactions or, in the case of an online/finapi account, import the transactions. When booking the invoices it is important that an id and an objectName are passed along, otherwise a logic error will occur.<br> <img src='openAPI/img/bookAmountWithTransaction.PNG' width= '800px'><br><br>
# How to filter for certain invoices
Often you don't want to retrieve all invoices in a sevdesk account or one specific invoice of which you know the ID, but rather a list of invoices or a single invoice with certain properties.<br> For this purpose we provide a bunch of filters that you can attach to your GET query string for nearly all endpoints.<br> Here are all filters applicable to an invoice query.<br> <table> <tr> <th>Filter</th> <th>Description</th> </tr> <tr> <td>partiallyPaid=true</td> <td> Retrieve all invoices which are partially paid </td> </tr> <tr> <td>orderByDebit=true</td> <td>Retrieve all invoices ordered by their debit</td> </tr> <tr> <td>orderByDueTime=true</td> <td>Retrieve all invoices ordered by their due time</td> </tr> <tr> <td>showAll=true</td> <td>Retrieve all invoices of all types</td> </tr> <tr> <td>invoiceNumber={number}</td> <td>Only retrieve all invoices with number as a invoice number</td> </tr> <tr> <td>delinquent=true</td> <td>Only retrieve delinquent (due) invoices</td> </tr> <tr> <td>notdelinquent=true</td> <td>Only retrieve invoices which are not delinquent (due)</td> </tr> <tr> <td>tags[x][id]={id}&tags[x][objectName]=Tag</td> <td>Only retrieve all invoices with id as a tag.<br> You can specify multiple tags by adding more array entries. </td> </tr> <tr> <td>costCentre[id]={id}&costCentre[objectName]=CostCentre</td> <td>Only retrieve all invoices with id as a cost centre.<br> </td> </tr> <tr> <td>status={status}</td> <td>Only retrieve invoices of a given status</td> </tr> <tr> <td>createBefore={timestamp}</td> <td>Only retrieve all invoices created before timestamp</td> </tr> <tr> <td>createAfter={timestamp}</td> <td>Only retrieve all invoices created after timestamp</td> </tr> <tr> <td>updateBefore={timestamp}</td> <td>Only retrieve all invoices updated last before timestamp</td> </tr> <tr> <td>updateAfter={timestamp}</td> <td>Only retrieve all invoices updated last after timestamp</td> </tr> <tr> <td>contact[id]={id}&contact[objectName]=Contact</td> <td>Only retrieve all invoices with id as a contact<br> </td> </tr> <tr> <td>orderByDueDate=true</td> <td>Retrieve all invoices ordered by their due date</td> </tr> <tr> <td>customerIntenalNote={note}</td> <td>Only retrieve all invoices with note as a customer internal note</td> </tr> <tr> <td>day={timestamp}</td> <td>Only retrieve all invoices where invoice date falls on the day of timestamp</td> </tr> <tr> <td>startDate={timestamp}</td> <td>Only retrieve all invoices where invoice date is bigger than timestamp</td> </tr> <tr> <td>endDate={timestamp}</td> <td> Only retrieve all invoices where invoice date is smaller than timestamp<br> If startDate and endDate are both supplied, you will get all invoices in the defined range </td> </tr> <tr> <td>header={header}</td> <td>Only retrieve all invoices with header as a header</td> </tr> <tr> <td>onlyDunned=true</td> <td>Retrieve all invoices which are dunned</td> </tr> <tr> <td>showWkr=all</td> <td>Retrieve all recurring invoices</td> </tr> <tr> <td>showMa=all</td> <td>Retrieve all invoices which are payment reminders</td> </tr> <tr> <td>origin[id]={id}&origin[objectName]=ModelName</td> <td>Only retrieve all invoices with id as an origin</td> </tr> <tr> <td>invoiceType={type}</td> <td>Only retrieve all invoices with type as an invoice type</td> </tr> <tr> <td>paymentMethod[id]={id}&paymentMethod[objectName]=PaymentMethod</td> <td>Only retrieve all invoices with id as a payment method</td> </tr> <tr> <td>headerSearch={header}</td> <td>Only retrieve all invoices of which the header is like header</td> </tr> <tr> <td>headerStartsWith={headerStart}</td> <td>Only retrieve all invoices of which the header starts with headerStart</td> </tr> <tr> <td>headerOrNumber={headerOrNumber}</td> <td>Only retrieve all invoices of which the header or invoice number is like headerOrNumber</td> </tr> <tr> <td>globalSearch={searchTerm}</td> <td>Search for invoices related to searchTerm</td> </tr> <tr> <td>orderByInvoiceNumber={ASC/DESC}</td> <td>Order all invoices after invoice number in ASC/DESC order</td> </tr> <tr> <td>invoiceNumberGreater={number}</td> <td>Only retrieve all invoices of which the invoice number is bigger than number</td> </tr> <tr> <td>invoiceNumberSmaller={number}</td> <td>Only retrieve all invoices of which the invoice number is smaller than number</td> </tr> <tr> <td>sendType={type}</td> <td>Only retrieve all invoices with type as a send type</td> </tr> <tr> <td>fulltextSearch={text}</td> <td>Search for invoices, positions or contact with text as a text</td> </tr> </table>
x-displayName: Invoice
- name: InvoicePos
description: |-
# Invoice positions
Every invoice naturally contains one or more invoice positions sometimes also called invoice items, invoice lines or line items.<br> These positions can but mustn't contain parts from the sevdesk inventory.<br> In sevdesk the invoice object itself just provides the skeleton to which positions can be added.<br> Without the positions, the invoice would have a sum of zero and therefore no real meaning.<br> For this reason it is necessary that we have a closer look at invoice positions in this section.<br><br> What makes up a invoice position?<br><br> A invoice position basically consist of: <ul> <li>A part (optional but strongly recommended)</li> <li>The name of the part or item</li> <li>A price for one unit of this part or item</li> <li>A unit in which the part or item is measured</li> <li>A quantity showing how many units of the part or item are in the position</li> <li>A tax rate</li> <li>An invoice to which the position belongs</li> </ul> The total gross sum of the invoice position is then calculated by the price being multiplied with the quantity and the tax rate, which is previously converted to a point number.<br> So for a price of 100, a quantity of two and a tax rate of 19 this would be:<br> 100 * 2 * 1,19 = 238<br><br> There is also the option of regarding the price as the gross price.<br> This is regulated by an attribute of invoice which is called showNet. More about it in the attribute list.<br> In this case, the total sum will be the price you provided and the net price will be calculated by our system.<br> Some of our customers prefer this method, however make sure that you don't get prices mixed up.
# Invoice position attributes
Here is the table of all attributes of invoice positions.<br> Necessary attributes, which must not be left out, are marked red.<br> Attributes which are strongly recommended for valid bookkeeping are marked orange.<br> There is also a distinction between invoice types, as not all attributes are useful for all types.<br> <table> <tr> <th>Attribute</th> <th>Description</th> <th>Attribute Type</th> </tr> <tr> <td><span style='color:red'>taxRate</span></td> <td> The tax rate of the position. </td> <td>Double</td> </tr> <tr> <td><span style='color:red'>unity</span></td> <td> The unity in which one item is measured. </td> <td>Nested object (Unity)</td> </tr> <tr> <td><span style='color:red'>quantity</span></td> <td> The quantity of items. </td> <td>Double</td> </tr> <tr> <td><span style='color:red'>invoice</span></td> <td> The invoice to which the position belongs. </td> <td>Nested object (Invoice)</td> </tr> <tr> <td>discount</td> <td> A discount amount for the specific position. </td> <td>Double</td> </tr> <tr> <td>text</td> <td> A text describing the position. </td> <td>String</td> </tr> <tr> <td>positionNumber</td> <td> The number of the position if there are multiple positions in an invoice.<br> Needs to start with zero and is incremented for every new position.<br> If you want to order them differently, you can change their position numbers to your needs. </td> <td>Integer</td> </tr> <tr> <td><span style='color:darkorange'>name</span></td> <td> The name of the item in the position. </td> <td>String</td> </tr> <tr> <td><span style='color:darkorange'>price</span></td> <td> The price for one unit of the item in the position. </td> <td>Double</td> </tr> <tr> <td> <span style='color:darkorange'> part</span></td> <td> You can define a part from your sevdesk inventory here.<br> Please be aware, you will still need to provide the name, price and everything else as this will not automatically be generated. </td> <td>Nested object (Part)</td> </tr> </table>
# How to create/update an invoice position
You can create an invoice position when creating an invoice, for more information visit the Invoice endpoint.<br> If you want to update an invoice position for an existing invoice, then you must use the same endpoint as when creating an invoice, then passing in the <span style='color:red'><b>ID</b></span> along with the <span style='color:red'><b>objectName</b></span> of the invoice and <span style='color:red'><b>mapAll</b></span>.<br> <ul> <li><code>{"invoice": { "<b>id</b>": 0, "<b>objectName</b>": "Invoice", "<b>mapAll</b>": true}, <br>"invoicePos":[{...}]</code></li> </ul> In order to update an invoice position in an existing invoice, the <span style='color:red'><b>ID</b></span> and the <span style='color:red'><b>objectName</b></span> of the invoice must be transferred and in the invoice position the <span style='color:red'><b>ID</b></span> of the invoice position to be updated<br> <ul> <li><code>"invoice": { "<b>id</b>": 0, "<b>objectName</b>": "Invoice", "<b>mapAll</b>": true},<br> "invoicePos":[{"<b>id</b>": 0, ...}]</code></li> </ul>
x-displayName: InvoicePos
- name: Layout
description: |-
# Purpose of Layout in sevdesk
Each invoice, order and credit note has a generated document.<br> In this chapter we will show you how the layout queries and use them to change the look of your document<br> Please keep in mind that every invoice, order and credit note must be rendered beforehand so that a document is also available.
# Attributes of a Layout
In the layouts there are only two different attributes, <b>key</b> and <b>value</b>. For key you can pass one of the following values: <ul> <li>template</li> <li>letterpaper</li> <li>language</li> <li>payPal</li> </ul> The value depends on which key you have chosen. In the following the standard values of the respective keys.<br><br> <b>language</b> <table> <tr> <td>German</td> <td>de_DE</td> </tr> <tr> <td>German(Autria)</td> <td>de_AT</td> </tr> <tr> <td>German(Swiss)</td> <td>de_CH</td> </tr> <tr> <td>English</td> <td>en_US</td> </tr> <tr> <td>Spanish</td> <td>es_ES</td> </tr> <tr> <td>French</td> <td>fr_FR</td> </tr> <tr> <td>Italian</td> <td>id_IT</td> </tr> <tr> <td>Greek</td> <td>el_GR</td> </tr> </table><br> <b>payPal</b> <table> <tr> <td>Show PayPal icon</td> <td>A</td> </tr> <tr> <td>Show link</td> <td>B</td> </tr> <tr> <td>Disable Paypal</td> <td>C</td> </tr> <tr> <td>PayPal as Strig</td> <td>D</td> </tr> </table>
x-displayName: Layout
- name: Order
description: |-
# Purpose of orders in sevdesk
Orders serve a multitude of purposes in sevdesk.<br> Although strictly speaking an order has just one single purpose, we regard three types of objects as orders.<br> The <b>estimate / proposal</b> which gets sent to an end-customer by the customer.<br> The <b>order confirmation</b> from an accepted estimate.<br> The <b>delivery note</b> which is sent if goods have been sent by the customer.<br> If you need to handle any of these objects, this detail documentation is the right place!<br> Orders are really similar to invoices in regards to their attributes and representation.<br> This is due to their close relation to invoices, as invoices can be created from orders.
# Types and status of orders
Orders are one of the more complex objects that can be handled over the API.<br> As already mentioned, there are different types of orders and these orders can have multiple status again.<br> Let's have a look at the different types of orders first.<br> <table> <tr> <th>Order Type</th> <th>Description</th> <th>Abbreviation</th> </tr> <tr> <td>Estimate / Proposal</td> <td> A normal order which documents a simple estimation / proposal for an end-customer. </td> <td> AN </td> </tr> <tr> <td>Order confirmation</td> <td> A confirmation for an estimate / proposal. </td> <td> AB </td> </tr> <tr> <td>Delivery note</td> <td> A confirmation that goods from an estimate / proposal have been sent. </td> <td> LI </td> </tr> </table> Fortunately all types of order share the same set of attributes so it is only important to keep in mind the abbreviations for all types of orders or at least the one you will need.<br> This is, because you will need to provide the order type when creating an order.<br><br> <b>Order status</b><br> Now that we have covered all order types, let's move to the different status they can have.<br><br> <table> <tr> <th>Order status</th> <th>Meaning</th> <th>Status code</th> </tr> <tr> <td>Draft</td> <td> The order is still a draft.<br> It has not been sent to the end-customer and can still be changed. </td> <td> 100 </td> </tr> <tr> <td>Delivered</td> <td> The order has been sent to the end-customer.<br> </td> <td> 200 </td> </tr> <tr> <td>Rejected / Cancelled</td> <td> The order has been rejected by the end-customer.<br> </td> <td> 300 </td> </tr> <tr> <td>Accepted</td> <td> The order has been accepted by the end-customer.<br> </td> <td> 500 </td> </tr> <tr> <td>Partially Calculated</td> <td> An invoice for parts of the order (but not the full order) has been created.<br> </td> <td> 750 </td> </tr> <tr> <td>Calculated</td> <td> The order has been calculated.<br> One or more invoices have been created covering the whole order. </td> <td> 1000 </td> </tr> </table> It is important to keep in mind the status codes for all status of orders or at least the one you will need.<br> This is, because you will need to provide the status code when creating an order.
# Attributes of an order
Here is the table of all attributes of orders.<br> Necessary attributes, which must not be left out, are marked red.<br> Attributes which are strongly recommended for valid bookkeeping are marked orange.<br> <table> <tr> <th>Attribute</th> <th>Description</th> <th>Attribute Type</th> </tr> <tr> <td><span style='color:red'>taxType</span></td> <td> <b>Use this in sevdesk-Update 1.0 (instead of taxRule).</b><br> Defines the vat-regulation.<br> Can be: <ul> <li><code>default</code></li> <li><code>eu</code></li> <li><code>noteu</code></li> <li><code>custom</code></li> <li><code>ss</code></li> </ul> </td> <td>String</td> </tr> <tr> <td>taxSet</td> <td> <b>Use this in sevdesk-Update 1.0 (instead of taxRule).</b><br> Use for custom defined vat-regulations.<br> Requires <code>"taxType": "custom"</code> </td> <td>Integer</td> </tr> <tr> <td><span style='color:red'>taxRule</span></td> <td> <b>Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).</b><br> Defines the vat-regulation.<br> <br> For "Regelbesteuerung" it can be one of: <ul> <li><code>1</code> - Umsatzsteuerpflichtige Umsätze - tax rates: 0.0, 7.0, 19.0 - replaces <code>"taxType": "default"</code></li> <li><code>2</code> - Ausfuhren - allowedTaxRates: 0.0</li> <li><code>3</code> - Innergemeinschaftliche Lieferungen - tax rates: 0.0, 7.0, 19.0 - replaces <code>"taxType": "eu"</code></li> <li><code>4</code> - Steuerfreie Umsätze §4 UStG - tax rates: 0.0</li> <li><code>5</code> - Reverse Charge gem. §13b UStG - tax rates: 0.0</li> <li> <code>17</code> - Nicht im Inland steuerbare Leistung - tax rates: 0.0 - replaces <code>"taxType": "noteu"</code><br> If "Nicht im Inland steuerbare Leistung" is used, no advance or partial invoice can be created from this order.<br> See the example request ([Invoice/Factory/createInvoiceFromOrder](#tag/Invoice/operation/createInvoiceFromOrder)) to create a normal invoice <code>"invoiceType": "RE"</code> from such an order. </li> </ul> For small business owner ("Kleinunternehmer") it can be: <ul> <li><code>11</code> - Steuer nicht erhoben nach §19UStG - tax rates: 0.0 - replaces <code>"taxType": "ss"</code></li> </ul> Example for Umsatzsteuerpflichtige Umsätze: <code>"taxRule": {"id": "1", "objectName": "TaxRule"}</code> </td> <td>Nested object (TaxRule)</td> </tr> <tr> <td><span style='color:red'>currency</span></td> <td> Currency of the order.<br> Needs to be currency code according to ISO-4217. </td> <td>String</td> </tr> <tr> <td><span style='color:red'>version</span></td> <td> Version of the order.<br> Can be used if you have multiple drafts for the same order.<br> Should start with 0. </td> <td>Integer</td> </tr> <tr> <td><span style='color:red'>taxText</span></td> <td> Text describing the vat regulation you chose.<br> A common text of our German customers would be:<br> Umsatzsteuer ausweisen or zzgl. Umsatzsteuer 19% </td> <td>String</td> </tr> <tr> <td>taxRate</td> <td> This is not used anymore. Use the taxRate of the individual positions instead. </td> <td>Integer</td> </tr> <tr> <td><span style='color:red'>contactPerson</span></td> <td> The sevdesk user which acts as a contact person for this order.<br> </td> <td>Nested object (SevUser)</td> </tr> <tr> <td>smallSettlement</td> <td> If the sevdesk account is falling under the small entrepreneur scheme the order must't contain any vat.<br> If this is the case, this attribute should be true, otherwise false. </td> <td>Boolean</td> </tr> <tr> <td><span style='color:red'>orderDate</span></td> <td> The order date. </td> <td>Date / Timestamp</td> </tr> <tr> <td><span style='color:red'>status</span></td> <td> The order status. </td> <td>Integer</td> </tr> <tr> <td>showNet</td> <td> This attribute determines, if the price you give the order positions will be regarded as gross or net.<br> If true, the price attribute will hold the net value, otherwise the gross value. </td> <td>Boolean</td> </tr> <tr> <td>customerInternalNote</td> <td> You can use this attribute to provide a note for the order.<br> It can be used for reference numbers, order numbers or other important information. </td> <td>String</td> </tr> <tr> <td><span style='color:darkorange'>address</span></td> <td> Holds the <b>complete</b> address to which the order is directed.<br> You can use line brakes to separate the different address parts. </td> <td>String</td> </tr> <tr> <td><span style='color:darkorange'>sendType</span></td> <td> If you don't plan to send the order over another endpoint like <b>/Order/sendViaEmail</b> or <b>Order/sendBy</b> but instead give it the status "200" directly, you need to specify a send type here.<br> Valid types are: VPR (printed), VPDF (downloaded), VM (mailed), VP (postal). </td> <td>String</td> </tr> <tr> <td>origin</td> <td> You can specify the object from which an order originated.<br> Just provide the ID of this object. </td> <td>Integer</td> </tr> <tr> <td>typeOrigin</td> <td> Specifies the object name of the object from which an order originated.<br> Most likely <b>Order</b> or <b>Invoice</b>. </td> <td>String</td> </tr> <tr> <td><span style='color:red'>orderNumber</span></td> <td> The order number. </td> <td>String</td> </tr> <tr> <td><span style='color:red'>contact</span></td> <td> The end-customer to which the order is directed.<br> </td> <td>Nested object (Contact)</td> </tr> <tr> <td><span style='color:red'>header</span></td> <td> The order header.<br> Usually consists of the order number and a prefix. </td> <td>String</td> </tr> <tr> <td>headText</td> <td> A head text for the order.<br> Can contain certain html tags. </td> <td>String</td> </tr> <tr> <td>footText</td> <td> A foot text for the order.<br> Can contain certain html tags. </td> <td>String</td> </tr> <tr> <td>paymentTerms</td> <td> The payment terms for the order.<br> </td> <td>Integer</td> </tr> <tr> <td>deliveryTerms</td> <td> The delivery terms for the order.<br> </td> <td>Integer</td> </tr> <tr> <td>sendDate</td> <td> The date the order was sent to the end-customer. </td> <td>Timestamp</td> </tr> <tr> <td><span style='color:red'>orderType</span></td> <td> The order type. </td> <td>String</td> </tr> </table>
# How to filter for certain orders
Often you don't want to retrieve all orders in a sevdesk account or one specific order of which you know the ID, but rather a list of orders or a single order with certain properties.<br> For this purpose we provide a bunch of filters that you can attach to your GET query string for nearly all endpoints.<br> Here are all filters applicable to an order query. <table> <tr> <th>Filter</th> <th>Description</th> </tr> <tr> <td>orderNumber={number}</td> <td>Only retrieve all orders with number as a order number</td> </tr> <tr> <td>tags[x][id]={id}&tags[x][objectName]=Tag</td> <td>Only retrieve all orders with id as a tag.<br> You can specify multiple tags by adding more array entries. </td> </tr> <tr> <td>status={status}</td> <td>Only retrieve orders of a given status</td> </tr> <tr> <td>createBefore={timestamp}</td> <td>Only retrieve all orders created before timestamp</td> </tr> <tr> <td>createAfter={timestamp}</td> <td>Only retrieve all orders created after timestamp</td> </tr> <tr> <td>updateBefore={timestamp}</td> <td>Only retrieve all orders updated last before timestamp</td> </tr> <tr> <td>updateAfter={timestamp}</td> <td>Only retrieve all orders updated last after timestamp</td> </tr> <tr> <td>contact[id]={id}&contact[objectName]=Contact</td> <td>Only retrieve all orders with id as a contact<br> </td> </tr> <tr> <td>startDate={timestamp}</td> <td>Only retrieve all orders where order date is bigger than timestamp</td> </tr> <tr> <td>endDate={timestamp}</td> <td> Only retrieve all orders where order date is smaller than timestamp<br> If startDate and endDate are both supplied, you will get all orders in the defined range </td> </tr> <tr> <td>orderType={type}</td> <td>Only retrieve all orders with type as an order type</td> </tr> <tr> <td>headerSearch={header}</td> <td>Only retrieve all orders of which the header is like header</td> </tr> <tr> <td>globalSearch={searchTerm}</td> <td>Search for orders related to searchTerm</td> </tr> <tr> <td>orderByOrderNumber={ASC/DESC}</td> <td>Order all orders after order number in ASC/DESC order</td> </tr> <tr> <td>orderNumberGreater={number}</td> <td>Only retrieve all orders of which the order number is bigger than number</td> </tr> <tr> <td>orderNumberNumberSmaller={number}</td> <td>Only retrieve all orders of which the order number is smaller than number</td> </tr> <tr> <td>startAmount={amount}</td> <td>Only retrieve all orders of which the (net/gross) sum is larger or equal amount</td> </tr> <tr> <td>endAmount={amount}</td> <td>Only retrieve all orders of which the (net/gross) sum is smaller or equal amount</td> </tr> </table>
x-displayName: Order
- name: OrderPos
description: |-
# Order position attributes
Here is the tables of all attributes of order positions.<br> Necessary attributes, which must not be left out, are marked red.<br> Attributes which are strongly recommended for valid bookkeeping are marked orange.<br> <table> <tr> <th>Attribute</th> <th>Description</th> <th>Attribute Type</th> </tr> <tr> <td><span style='color:red'>taxRate</span></td> <td> The tax rate of the position. </td> <td>Double</td> </tr> <tr> <td><span style='color:red'>unity</span></td> <td> The unity in which one item is measured. </td> <td>Nested object (Unity)</td> </tr> <tr> <td><span style='color:red'>quantity</span></td> <td> The quantity of items. </td> <td>Double</td> </tr> <tr> <td><span style='color:red'>order</span></td> <td> The order to which the position belongs. </td> <td>Nested object (Order)</td> </tr> <tr> <td>discount</td> <td> A discount amount for the specific position. </td> <td>Double</td> </tr> <tr> <td>text</td> <td> A text describing the position. </td> <td>String</td> </tr> <tr> <td>positionNumber</td> <td> The number of the position if there are multiple positions in an order.<br> Needs to start with zero and is incremented for every new position.<br> If you want to order them differently, you can change their position numbers to your needs. </td> <td>Integer</td> </tr> <tr> <td><span style='color:darkorange'>name</span></td> <td> The name of the item in the position. </td> <td>String</td> </tr> <tr> <td><span style='color:red'>price</span></td> <td> The price for one unit of the item in the position. </td> <td>Double</td> </tr> <tr> <td><span style='color:darkorange'>part</span></td> <td> You can define a part from your sevdesk inventory here.<br> Please be aware, you will still need to provide the name, price and everything else as this will not automatically be generated. </td> <td>Nested object (Part)</td> </tr> </table>
x-displayName: OrderPos
- name: Voucher
description: >-
Vouchers (receipts) is a generic term for various documents that serve as
proof of business transactions for the bookkeeping.<br> Incoming and
outgoing invoices, coupons and receipts are among the most common types of
documents.<br> Every time one of our sevdesk customers makes a monetary
input or output, the transaction needs to be documented with a
receipt.<br> In sevdesk our customers can create a digital version of this
receipt, the voucher, to which the actual offline receipt can be
attached.<br> These vouchers can then be paid by the end-customers or by
the customer, depending if it is an input or output, so that the
transaction process is completely documented.<br> The vouchers are
directly connected to the transactions of the customer, so every time a
voucher is created and marked as paid, there must be a transaction on some
bank account.<br> The voucher must then be linked to this transaction,
otherwise false reports for tax offices and other institutions can be the
case.<br>
# Attributes of a voucher
Here is the table of useful attributes of voucher.<br> Necessary attributes, which must not be left out, are marked red.<br> Attributes which are strongly recommended for valid bookkeeping are marked orange. These can be skipped when creating a draft voucher.<br> There is also a distinction between voucher types, as not all attributes are useful for all types. <table> <tr> <th>Attribute</th> <th>Voucher Type</th> <th>Description</th> <th>Attribute Type</th> </tr> <tr> <td><span style='color:red'>taxType</span></td> <td>Any</td> <td> <b>Use this in sevdesk-Update 1.0 (instead of taxRule).</b><br> Defines the vat-regulation for the voucher<br> Can be: <ul> <li><code>default</code></li> <li><code>eu</code></li> <li><code>noteu</code></li> <li><code>custom</code></li> <li><code>ss</code></li> </ul> </td> <td>String</td> </tr> <tr> <td>taxSet</td> <td>Any</td> <td> <b>Use this in sevdesk-Update 1.0 (instead of taxRule).</b><br> If you supplied <code>"taxType": "custom"</code> you can specify which tax set should be used. </td> <td>Nested object (TaxSet)</td> </tr> <tr> <td><span style='color:red'>taxRule</span></td> <td>Any</td> <td> <b>Use this in sevdesk-Update 2.0 (instead of taxType / taxSet).</b><br> Defines the vat-regulation for the voucher<br> <br> For "Regelbesteuerung" it can be one of: <ul> <li><code>1</code> - Umsatzsteuerpflichtige Umsätze (tax rates: 0.0, 7.0, 19.0) - replaces <code>"taxType": "default"</code></li> <li><code>2</code> - Ausfuhren (tax rates: 0.0)</li> <li><code>3</code> - Innergemeinschaftliche Lieferungen (tax rates: 0.0, 7.0, 19.0) - replaces <code>"taxType": "eu"</code></li> <li><code>4</code> - Steuerfreie Umsätze §4 UStG (tax rates: 0.0)</li> <li><code>5</code> - Reverse Charge gem. §13b UStG (tax rates: 0.0)</li> <li><code>17</code> - Nicht im Inland steuerbare Leistung - tax rates: 0.0 - replaces <code>"taxType": "noteu"</code></li> </ul> For small business owner ("Kleinunternehmer") it can be: <ul> <li><code>1</code> - Steuer nicht erhoben nach §19UStG (tax rates: 0.0) - replaces <code>"taxType": "ss"</code></li> </ul> Example for Umsatzsteuerpflichtige Umsätze: <code>"taxRule": {"id": "1", "objectName": "TaxRule"}</code> <br><br> Depending on the use case (revenue or expense), you can find the right TaxRule via one of the Account Guidance endpoints:<br> <ul> <li><a href='#tag/Voucher/operation/forRevenue'>for revenue</a></li> <li><a href='#tag/Voucher/operation/forExpense'>for expense</a></li> </ul> </td> <td>Nested object (TaxRule)</td> </tr> <tr> <td><span style='color:red'>voucherType</span></td> <td>Any</td> <td> The type of the voucher. Most likely <b>VOU</b> but RV is also valid. </td> <td>String</td> </tr> <tr> <td><span style='color:darkorange'>voucherDate</span></td> <td>Any</td> <td> The voucher date. </td> <td>Date / Timestamp</td> </tr> <tr> <td style='color:darkorange'>deliveryDate</td> <td>Any</td> <td> The delivery date of the voucher.<br> This can also be a date range if you provide another value for <b>deliveryDateUntil</b>. </td> <td>Date / Timestamp</td> </tr> <tr> <td>deliveryDateUntil</td> <td>Any</td> <td> You can provide a value here if you want the delivery date to be a date range and you have already given a value to <b>deliveryDate</b>. </td> <td>Date / Timestamp</td> </tr> <tr> <td><span style='color:red'>status</span></td> <td>Any</td> <td> The voucher status. Notable values are 50 (draft) and 100 (finished), see below for the full list. </td> <td>Integer</td> </tr> <tr> <td><span style='color:red'>creditDebit</span></td> <td>Any</td> <td> Defines if the voucher is a credit (expense) or debit (revenue) document.<br> If you supply <b>C</b> as the value, the voucher is a credit. You bought something.<br> If you supply <b>D</b> as the value, the voucher is a debit. You sold something. </td> <td>String</td> </tr> <tr> <td>enshrined</td> <td>Any</td> <td> Enshrined vouchers cannot be changed.<br> Can only be set via <a href="#tag/Voucher/operation/voucherEnshrine">/Voucher/{voucherId}/enshrine</a>. This operation cannot be undone. </td> <td>Date / Timestamp</td> </tr> <tr> <td>paymentDeadline</td> <td>Any</td> <td> The payment deadline of the voucher.<br> If this date is exceeded, the voucher will be shown as due. </td> <td>Date / Timestamp</td> </tr> <tr> <td>supplier</td> <td>Any</td> <td> The supplier or customer to which the voucher is directed.<br> <span style='color:darkorange'>Note that you must provide either the supplier object or a supplierName.</span> </td> <td>Nested object (Contact)</td> </tr> <tr> <td>supplierName</td> <td>Any</td> <td> The name of the supplier or customer used for the voucher.<br> </td> <td>String</td> </tr> <tr> <td><span style='color:darkorange'>description</span></td> <td>Any</td> <td> The voucher number or voucher description. </td> <td>String</td> </tr> <tr> <td><span style='color:darkorange'>document</span></td> <td>Any</td> <td> The document of the voucher.<br> </td> <td>Nested object (Document)</td> </tr> <tr> <td>payDate</td> <td>Any</td> <td> The date the voucher was paid. </td> <td>Date / Timestamp</td> </tr> <tr> <td>costCentre</td> <td>Any</td> <td> A cost centre for the voucher. </td> <td>Nested object (CostCentre)</td> </tr> <tr> <td>currency</td> <td>Any</td> <td> The currency, defaults to the system currency when not set.<br> Example value: EUR </td> <td>String</td> </tr> <tr> <td><span style='color:darkorange'>recurringInterval</span></td> <td>Recurring Vouchers</td> <td> The interval in which vouchers are to be created.<br> Possible values are:<br> <ul> <li>P0Y0M1W (weekly)</li> <li>P0Y0M2W (every second week)</li> <li>P0Y1M (monthly)</li> <li>P0Y2M (every second month)</li> <li>P0Y3M (quarterly)</li> <li>P0Y6M (semiannual)</li> <li>P1Y (yearly)</li> <li>P2Y (every 2 years)</li> <li>P3Y (every 3 years)</li> <li>P4Y (every 4 years)</li> <li>P5Y (every 5 years)</li> </ul> </td> <td>String</td> </tr> <tr> <td>recurringIntervall<br><span style='color:red'>deprecated</span></td> <td>Recurring Vouchers</td> <td>Values will be mapped to recurringInterval, deprecated because it would not allow values < 1 month.</td> <td>Integer</td> </tr> <tr> <td><span style='color:darkorange'>recurringStartDate</span></td> <td>Recurring Vouchers</td> <td> The date when the recurring vouchers start. </td> <td>Date / Timestamp</td> </tr> <tr> <td><span style='color:darkorange'>recurringNextVoucher</span></td> <td>Recurring Vouchers</td> <td> The date when the next voucher is due. When creating RV documents you will usually set this to the same date as recurringStartDate. </td> <td>Date / Timestamp</td> </tr> <tr> <td>recurringLastVoucher</td> <td>Recurring Vouchers</td> <td> The date the last previous voucher was generated. </td> <td>Date / Timestamp</td> </tr> <tr> <td>recurringEndDate</td> <td>Recurring Vouchers</td> <td> The date the generation of recurring vouchers ends. </td> <td>Date / Timestamp</td> </tr> </table>
# Types and status of vouchers
Vouchers are one of the more complex objects that can be handled over the API.<br> There are two types of vouchers and these vouchers can have multiple status again.<br> Let's have a look at the different types of vouchers first.<br> <table> <tr> <th>Voucher Type</th> <th>Description</th> <th>Abbreviation</th> </tr> <tr> <td>Normal voucher</td> <td> A normal voucher which documents a simple selling process. </td> <td> VOU </td> </tr> <tr> <td>Recurring voucher</td> <td> A voucher which generates normal vouchers with the same values regularly in fixed time frames (every month, year, ...). </td> <td> RV </td> </tr> </table> For now we will only cover the normal vouchers, as this is complex enough.<br><br> <b>Voucher status</b><br> Now that we have covered all voucher types, let's move to the different status they can have.<br> <table> <tr> <th>Voucher status</th> <th>Meaning</th> <th>Status code</th> </tr> <tr> <td>Draft</td> <td> The voucher is still a draft.<br> It has not been marked as completed and can still be changed. </td> <td> 50 </td> </tr> <tr> <td>Unpaid / Due</td> <td> The voucher has been completed but not paid.<br> It is either shown as <b>unpaid</b> if the pay date is not exceeded or <b>due</b> if it is. </td> <td> 100 </td> </tr> <tr> <td>Transferred</td> <td> The voucher has been used to create a payment in sevdesk and is waiting for the import of the bank transaction to set it to paid. </td> <td> 150 </td> </tr> <tr> <td>Partially paid</td> <td> The voucher has been partially paid. There are linked transactions or payments. </td> <td> 750 </td> </tr> <tr> <td>Paid</td> <td> The voucher has been paid by the end-customer or the sevdesk customer.<br> This means, that it is linked to a transaction on some payment account in sevdesk. </td> <td> 1000 </td> </tr> </table>
# How e-invoice works
The general creation process does not change for e-invoice documents. Our existing endpoints will accept files in XML format as well as a PDF with embedded XML (i.e. in the ZUGFeRD format). As before, the internal filename is returned and the filename parameter can be used to create a voucher via the saveVoucher request.<br> Note that you are still responsible for providing the voucher data as before. The file provided will be treated in the same way as any other file uploaded via the API. In particular, this means that it will not be validated on our end for compliance with the EN16931 standard.<br>
# Account Datev
*Use this in sevdesk-Update 2.0 (instead of <a
href='#tag/Voucher/Accounting-type'>Accounting type</a>)*
An account Datev is the booking account used in voucher positions.<br> To choose the right account datev please use our <a href='#tag/Voucher/operation/forAllAccounts'>account guidance</a><br> <br> Here are two examples how accounting types can be chosen by our customers in the web interface:<br> <br> <img src='openAPI/img/accountDatevExpense.png'><br><br> <img src='openAPI/img/accountDatevYield.png'><br><br>
# Accounting type
*Use this in sevdesk-Update 1.0*
An accounting type is the booking account used in voucher positions.<br> It is essential that you always provide one, as it is relevant for multiple business reports.<br> In general, accounting types are differentiated into income and output accounting types.<br> Income types should only be used for debit vouchers and output types only for credit vouchers!<br> Here are two examples how accounting types can be chosen by our customers in the web interface:<br><br> <img src='openAPI/img/creditAccountingTypes.PNG' width= '700px'><br><br> <img src='openAPI/img/debitAccountingType.PNG' width= '700px'><br><br> Regarding the accounting types, you will most certainly only need to request existing accounting types for using their ID in further requests.<br> Therefore, you only need to send normal GET requests to the AccountingType endpoint.<br>
# How to filter for certain vouchers
<table> <tr> <th>Filter</th> <th>Description</th> </tr> <tr> <td>accountingType[id]={id}&accountingType[objectName]=AccountingType</td> <td>Only retrieve all vouchers which contain at least one position using id as an accounting type.<br> </td> </tr> <tr> <td>withoutCatering=true</td> <td>Retrieve all vouchers except catering vouchers.</td> </tr> <tr> <td>year={year}</td> <td>Only retrieve all vouchers with a voucher date in year.</td> </tr> <tr> <td>month={month}</td> <td>Only retrieve all vouchers with a voucher date in month.<br> Can be combined with a year. </td> </tr> <tr> <td>descriptionLike={description}</td> <td>Only retrieve all vouchers with a description containing description.</td> </tr> <tr> <td>creditDebit={C/D}</td> <td>Supply <b>C</b> to only retrieve credit vouchers and <b>D</b> to only retrieve debit vouchers.</td> </tr> <tr> <td>supplierName={name}</td> <td>Only retrieve all vouchers with a supplier having a name like name.</td> </tr> <tr> <td>commentLike={comment}</td> <td>Only retrieve all vouchers having a position with a comment like comment.</td> </tr> <tr> <td>searchCommentOrDescription={text}</td> <td>Only retrieve all vouchers having a position with comment like text or a description like text.</td> </tr> <tr> <td>contact[id]={id}&contact[objectName]=Contact</td> <td>Only retrieve all vouchers with id as a contact<br> </td> </tr> <tr> <td>createBefore={timestamp}</td> <td>Only retrieve all vouchers created before timestamp</td> </tr> <tr> <td>createAfter={timestamp}</td> <td>Only retrieve all vouchers created after timestamp</td> </tr> <tr> <td>updateBefore={timestamp}</td> <td>Only retrieve all vouchers updated last before timestamp</td> </tr> <tr> <td>updateAfter={timestamp}</td> <td>Only retrieve all vouchers updated last after timestamp</td> </tr> <tr> <td>startDate={timestamp}</td> <td>Only retrieve all vouchers where voucher date is bigger than timestamp</td> </tr> <tr> <td>endDate={timestamp}</td> <td> Only retrieve all vouchers where voucher date is smaller than timestamp<br> If startDate and endDate are both supplied, you will get all vouchers in the defined range. </td> </tr> <tr> <td>object[id]={id}&object[objectName]={objectName}</td> <td>Only retrieve all vouchers with a linked object with ID id and objectName as object name.<br> </td> </tr> <tr> <td>startPayDate={timestamp}</td> <td>Only retrieve all vouchers where pay date is bigger than timestamp</td> </tr> <tr> <td>endPayDate={timestamp}</td> <td> Only retrieve all vouchers where pay date is smaller than timestamp<br> If startPayDate and endPayDate are both supplied, you will get all vouchers in the defined range. </td> </tr> <tr> <td>status={status}</td> <td>Only retrieve vouchers of a given status</td> </tr> <tr> <td>orderByDebit=true</td> <td>Retrieve all vouchers ordered by their debit</td> </tr> <tr> <td>costCentre[id]={id}&costCentre[objectName]=CostCentre</td> <td>Only retrieve all vouchers with id as a cost centre.<br> </td> </tr> <tr> <td>voucherType={type}</td> <td>Only retrieve all vouchers with type as a voucher type</td> </tr> <tr> <td>origin[id]={id}&origin[objectName]=ModelName</td> <td>Only retrieve all vouchers with id as an origin</td> </tr> <tr> <td>globalSearch={searchTerm}</td> <td>Search for vouchers related to searchTerm</td> </tr> <tr> <td>contactOrObject[id]={id}&contactOrObject[objectName]={objectName}</td> <td>Only retrieve all vouchers with a linked object or a contact with ID id and objectName as object name.<br> </td> </tr> <tr> <td>orderByVoucherNumber={ASC/DESC}</td> <td>Order all vouchers after voucher number in ASC/DESC order</td> </tr> <tr> <td>delinquent=true</td> <td>Only retrieve delinquent (due) vouchers</td> </tr> <tr> <td>hasDocument=true</td> <td>Only retrieve vouchers which have an attached document</td> </tr> <tr> <td>noRv=true</td> <td>Only retrieve vouchers which are not of type RV</td> </tr> <tr> <td>tags[x][id]={id}&tags[x][objectName]=Tag</td> <td>Only retrieve all vouchers with id as a tag.<br> You can specify multiple tags by adding more array entries. </td> </tr> <tr> <td>startAmount={amount}</td> <td>Only retrieve all vouchers with a sum bigger than amount.<br> If your provided amount is negative, it will retrieve all vouchers with a sum smaller than amount.</td> </tr> <tr> <td>endAmount={amount}</td> <td> Only retrieve all vouchers with a sum smaller than amount.<br> If your provided amount is negative, it will retrieve all vouchers with a sum bigger than amount.<br> If startAmount and endAmount are both supplied, you will get all vouchers in the defined range. </td> </tr> <tr> <td>fulltextSearch={text}</td> <td>Search for vouchers, positions or contact with text as a text</td> </tr> <tr> <td>fulltextSearchObjects={object1, object2, ...}</td> <td>Enables different objects to search in with the fulltextSearch.</td> </tr> </table><br>
x-displayName: Voucher
- name: VoucherPos
description: "Every voucher can contain one or more voucher positions.<br> These positions must contain an accounting type (booking account) so that the voucher can be booked accordingly.<br> In sevdesk the voucher object itself just provides the skeleton to which positions can be added.<br> Without the positions, the voucher would have a sum of zero and therefore no real meaning.<br> For this reason it is necessary that we have a closer look at voucher positions in this section. \n# What makes up a voucher position?\n\n<b>A voucher position item basically consists of in sevdesk-Update 2.0:</b><br> \r\n <ul> <li>An account datev (booking account)</li> <li>A sum (gross or net)</li> <li>A tax rate</li> <li>A voucher to which the position belongs</li> </ul>\n<b>A voucher position item basically consists of in sevdesk-Update 1.0:</b><br><br> \r\n <ul> <li>An accounting type (booking account)</li> <li>A sum (gross or net)</li> <li>A tax rate</li> <li>A voucher to which the position belongs</li> </ul>\nThe total gross sum of the voucher position is then calculated.<br> The 'net' attribute determines how we calculate the total, if net is true we use the sumNet and calculate from there. If net is false we use the sumGross and calculate the other values from there. <br><br>\n\n# Voucher position attributes\n Here is the table of all attributes of voucher positions.<br> Necessary attributes, which must not be left out, are marked red.<br> <table> <tr> <th>Attribute</th> <th>Description</th> <th>Attribute Type</th> </tr> <tr> <td><span style='color:red'>sumGross</span> or <span style='color:red'>sumNet</span></td> <td> The sum of the voucher position. You may provider both values. </td> <td>Double</td> </tr> <tr> <td><span style='color:red'>taxRate</span></td> <td> The tax rate of the voucher position. </td> <td>Double</td> </tr> <tr> <td><span style='color:red'>voucher</span></td> <td> The voucher to which the position belongs. </td> <td>Nested object (Voucher)</td> </tr> <tr> <td>comment</td> <td> A comment describing the position. </td> <td>String</td> </tr> <tr> <td><span style='color:red'>net</span></td> <td> Define if the sum you provided is inclusive (false) or exclusive vat (true).<br> All positions must be either net or gross, a mixture of the two is not possible. </td> <td>Boolean</td> </tr> <tr> <td><span style='color:red'>accountDatev</span></td> <td> <b>Use this in sevdesk-Update 2.0 (replaces accountingType).</b><br> The account datev (booking account) for the voucher position. </td> <td>Nested object (AccountDatev)</td> </tr> <tr> <td><span style='color:red'>accountingType</span></td> <td> The accounting type (booking account) for the voucher position. </td> <td>Nested object (AccountingType)</td> </tr> </table>"
x-displayName: VoucherPos
- name: Report
description: A set of operations to export data.
x-displayName: Report
- name: Tag
description: |-
# Purpose of Tag in sevdesk
Tags are a tool to create groupings that can be attached to any invoice, order, voucher and credit note.<br> The filter function can also be used with the help of the tags. It must be mentioned here that each invoice, order, receipt and credit note can have more than one tag and the tag must therefore be passed as an array.<br> An example of how to use a tag in invoices: <ul> <li><code>ht<span>tps://my.sevdesk.de/api/v1/Invoice?tags[0][id]={tagId}&tags[0][objectName]=Tag</span></code></li> </ul>
# Tag relation
With the tag relations you can display all invoices, receipts, orders and credit notes that have a tag<br> The tag relation does not have to be created separately, as this is automatically created when a tag is created.<br> <br>
x-displayName: Tag
paths:
/Tools/bookkeepingSystemVersion:
get:
tags:
- Basics
summary: Retrieve bookkeeping system version
description: >-
To check if you already received the update to version 2.0 you can use
this endpoint.
operationId: bookkeepingSystemVersion
responses:
'200':
description: Successful Request
content:
application/json:
schema:
type: object
properties:
objects:
type: object
properties:
version:
type: string
enum:
- '1.0'
- '2.0'
example:
objects:
version: '2.0'
'401':
description: Authentication required
deprecated: false
security:
- api_key: []
/CheckAccount:
get:
tags:
- CheckAccount
summary: Retrieve check accounts
description: Retrieve all check accounts
operationId: getCheckAccounts
responses:
'200':
description: Successful operation
content:
application/json:
schema:
properties:
objects:
type: array
items:
$ref: '#/components/schemas/Model_CheckAccountResponse'
type: object
'400':
description: Bad request
'401':
description: Authentication required
'500':
description: Server error
deprecated: false
security:
- api_key: []
post:
tags:
- CheckAccount
summary: Create a new check account
description: Creates a new banking account on which transactions can be created.
operationId: createCheckAccount
requestBody:
description: "Creation data. Please be aware, that you need to provide at least all required parameter\r\n of the CheckAccount model!"
content:
application/json:
schema:
$ref: '#/components/schemas/Model_CheckAccount'
responses:
'201':
description: Created - Returns created check account
content:
application/json:
schema:
properties:
objects:
type: array
items:
$ref: '#/components/schemas/Model_CheckAccountResponse'
type: object
'400':
description: Bad request
'401':
description: Authentication required
'500':
description: Server error
deprecated: true
security:
- api_key: []
/CheckAccount/Factory/fileImportAccount:
post:
tags:
- CheckAccount
summary: Create a new file import account
description: Creates a new banking account for file imports (CSV, MT940).
operationId: createFileImportAccount
requestBody:
description: Data to create a file import account
content:
application/json:
schema:
$ref: '#/components/schemas/createFileImportAccount'
responses:
'201':
description: Created
content:
application/json:
schema:
properties:
objects:
$ref: '#/components/schemas/createFileImportAccountResponse'
'400':
description: Bad request
'401':
description: Authentication required
'422':
description: Invalid value given
'500':
description: Server error
security:
- api_key: []
/CheckAccount/Factory/clearingAccount:
post:
tags:
- CheckAccount
summary: Create a new clearing account
description: Creates a new clearing account.
operationId: createClearingAccount
requestBody:
description: Data to create a clearning account
content:
application/json:
schema:
$ref: '#/components/schemas/createClearingAccount'
responses:
'201':
description: Created
content:
application/json:
schema:
properties:
objects:
$ref: '#/components/schemas/createClearingAccountResponse'
'400':
description: Bad request
'401':
description: Authentication required
'422':
description: Invalid value given
'500':
description: Server error
security:
- api_key: []
/CheckAccount/{checkAccountId}:
get:
tags:
- CheckAccount
summary: Find check account by ID
description: Retrieve an existing check account
operationId: getCheckAccountById
parameters:
- name: checkAccountId
in: path
description: ID of check account
required: true
schema:
type: integer
responses:
'200':
description: Successful operation
content:
application/json:
schema:
properties:
objects:
type: array
items:
$ref: '#/components/schemas/Model_CheckAccountResponse'
type: object
'400':
description: Bad request
'401':
description: Authentication required
'500':
description: Server error
deprecated: false
security:
- api_key: []
put:
tags:
- CheckAccount
summary: Update an existing check account
description: Update a check account
operationId: updateCheckAccount
parameters:
- name: checkAccountId
in: path
description: ID of check account to update
required: true
schema:
type: integer
requestBody:
description: Update data
content:
application/json:
schema:
$ref: '#/components/schemas/Model_CheckAccountUpdate'
responses:
'200':
description: Successful operation - Returns changed check account resource
content:
application/json:
schema:
$ref: '#/components/schemas/Model_CheckAccountResponse'
'400':
description: Bad request
'401':
description: Authentication required
'500':
description: Server error
security:
- api_key: []
delete:
tags:
- CheckAccount
summary: Deletes a check account
operationId: deleteCheckAccount
parameters:
- name: checkAccountId
in: path
description: Id of check account to delete
required: true
schema:
type: integer
responses:
'200':
description: Successful operation - check account deleted
content:
application/json:
schema:
properties:
objects:
type: array
items:
default: null
type: object
'400':
description: Bad request
'401':
description: Authentication required
'409':
description: Conflict
'500':
description: Server error
security:
- api_key: []
/CheckAccount/{checkAccountId}/getBalanceAtDate:
get:
tags:
- CheckAccount
summary: Get the balance at a given date
description: >-
Get the balance, calculated as the sum of all transactions sevdesk
knows, up to and including the given date. Note that this balance does
not have to be the actual bank account balance, e.g. if sevdesk did not
import old transactions.
operationId: getBalanceAtDate
parameters:
- name: checkAccountId
in: path
description: ID of check account
required: true
schema:
type: integer
- name: date
in: query
required: true
description: Only consider transactions up to this date at 23:59:59
schema:
type: string
format: date
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: object
properties:
objects:
type: string
format: float
example: '105.56'
'400':
description: Bad request
'401':
description: Authentication required
'500':
description: Server error
security:
- api_key: []
/CheckAccountTransaction:
get:
tags:
- CheckAccountTransaction
summary: Retrieve transactions
description: Retrieve all transactions depending on the filters defined in the query.
operationId: getTransactions
parameters:
- name: checkAccount[id]
in: query
description: >-
Retrieve all transactions on this check account. Must be provided
with checkAccount[objectName]
required: false
explode: false
schema:
type: integer
- name: checkAccount[objectName]
in: query
description: >-
Only required if checkAccount[id] was provided. 'CheckAccount'
should be used as value.
required: false
explode: false
schema:
type: string
- name: isBooked
in: query
description: Only retrieve booked transactions
required: false
explode: false
schema:
type: boolean
- name: paymtPurpose
in: query
description: Only retrieve transactions with this payment purpose
required: false
explode: false
schema:
type: string
- name: startDate
in: query
description: Only retrieve transactions from this date on
required: false
explode: false
schema:
type: string
format: date-time
- name: endDate
in: query
description: Only retrieve transactions up to this date
required: false
explode: false
schema:
type: string
format: date-time
- name: payeePayerName
in: query
description: Only retrieve transactions with this payee / payer
required: false
explode: false
schema:
type: string
- name: onlyCredit
in: query
description: Only retrieve credit transactions
required: false
explode: false
schema:
type: boolean
- name: onlyDebit
in: query
description: Only retrieve debit transactions
required: false
explode: false
schema:
type: boolean
responses:
'200':
description: Successful operation
content:
application/json:
schema:
properties:
objects:
type: array
items:
$ref: >-
#/components/schemas/Model_CheckAccountTransactionResponse
type: object
'400':
description: Bad request
'401':
description: Authentication required
'500':
description: Server error
deprecated: false
security:
- api_key: []
post:
tags:
- CheckAccountTransaction
summary: Create a new transaction
description: Creates a new transaction on a check account.
operationId: createTransaction
requestBody:
description: "Creation data. Please be aware, that you need to provide at least all required parameter\r\n of the CheckAccountTransaction model!"
content:
application/json:
schema:
$ref: '#/components/schemas/Model_CheckAccountTransaction'
responses:
'201':
description: Created - Returns created transaction
content:
application/json:
schema:
$ref: '#/components/schemas/Model_CheckAccountTransactionResponse'
'400':
description: Bad request
'401':
description: Authentication required
'500':
description: Server error
security:
- api_key: []
/CheckAccountTransaction/{checkAccountTransactionId}:
get:
tags:
- CheckAccountTransaction
summary: Find check account transaction by ID
description: Retrieve an existing check account transaction
operationId: getCheckAccountTransactionById
parameters:
- name: checkAccountTransactionId
in: path
description: ID of check account transaction
required: true
schema:
type: integer
responses:
'200':
description: Successful operation
content:
application/json:
schema:
properties:
objects:
type: array
items:
$ref: >-
#/components/schemas/Model_CheckAccountTransactionResponse
type: object
'400':
description: Bad request
'401':
description: Authentication required
'500':
description: Server error
deprecated: false
security:
- api_key: []
put:
tags:
- CheckAccountTransaction
summary: Update an existing check account transaction
description: Update a check account transaction
operationId: updateCheckAccountTransaction
parameters:
- name: checkAccountTransactionId
in: path
description: ID of check account to update transaction
required: true
schema:
type: integer
requestBody:
description: Update data
content:
application/json:
schema:
$ref: '#/components/schemas/Model_CheckAccountTransactionUpdate'
responses:
'200':
description: Successful operation - Returns changed check account resource
content:
application/json:
schema:
$ref: '#/components/schemas/Model_CheckAccountTransactionResponse'
'400':
description: Bad request
'401':
description: Authentication required
'500':
description: Server error
security:
- api_key: []
delete:
tags:
- CheckAccountTransaction
summary: Deletes a check account transaction
operationId: deleteCheckAccountTransaction
parameters:
- name: checkAccountTransactionId
in: path
description: Id of check account transaction to delete
required: true
schema:
type: integer
responses:
'200':
description: Successful operation - check account transaction deleted
content:
application/json:
schema:
properties:
objects:
type: array
items:
default: null
type: object
'400':
description: Bad request
'401':
description: Authentication required
'409':
description: Conflict
'500':
description: Server error
security:
- api_key: []
/CheckAccountTransaction/{checkAccountTransactionId}/enshrine:
put:
tags:
- CheckAccountTransaction
summary: Enshrine
description: >
Sets the current date and time as a value for the property
`enshrined`.<br>
This operation is only possible if the status is "Linked" (`"status":
"200"`) or higher.
Linked invoices, credit notes or vouchers cannot be changed when the
transaction is enshrined.
operationId: checkAccountTransactionEnshrine
parameters:
- name: checkAccountTransactionId
in: path
description: ID of the transaction to enshrine
required: true
schema:
type: integer
responses:
'200':
description: Successful operation
content:
application/json:
schema:
properties:
objects:
default: null
type: object
'400':
description: Bad request
'401':
description: Authentication required
'422':
description: Validation error
content:
application/json:
schema:
$ref: '#/components/schemas/validationError'
'500':
description: Server Error
security:
- api_key: []
/Contact/Factory/getNextCustomerNumber:
get:
tags:
- Contact
summary: Get next free customer number
description: Retrieves the next available customer number. Avoids duplicates.
operationId: getNextCustomerNumber
responses:
'200':
description: Returns next available customer number
content:
application/json:
schema:
properties:
objects:
description: Next available customer number
type: string
type: object
'400':
description: Bad request
'401':
description: Authentication required
'500':
description: Server Error
deprecated: false
security:
- api_key: []
/Contact/Factory/findContactsByCustomFieldValue:
get:
tags:
- Contact
summary: Find contacts by custom field value
description: Returns an array of contacts having a certain custom field value set.
operationId: findContactsByCustomFieldValue
parameters:
- name: value
in: query
description: The value to be checked.
required: true
explode: true
schema:
type: string
- name: customFieldSetting[id]
in: query
description: >-
ID of ContactCustomFieldSetting for which the value has to be
checked.
required: false
explode: true
schema:
type: string
- name: customFieldSetting[objectName]
in: query
description: >-
Object name. Only needed if you also defined the ID of a
ContactCustomFieldSetting.
required: false
explode: true
schema:
type: string
example: ContactCustomFieldSetting
- name: customFieldName
in: query
description: >-
The ContactCustomFieldSetting name, if no ContactCustomFieldSetting
is provided.
required: true
explode: true
schema:
type: string
responses:
'200':
description: Array of contacts having a certain custom field value set.
content:
application/json:
schema:
properties:
objects:
type: array
items:
$ref: '#/components/schemas/Model_ContactResponse'
type: object
'400':
description: Bad request
'401':
description: Authentication required
'500':
description: Server Error
deprecated: false
security:
- api_key: []
/Contact/Mapper/checkCustomerNumberAvailability:
get:
tags:
- Contact
summary: Check if a customer number is available
description: Checks if a given customer number is available or already used.
operationId: contactCustomerNumberAvailabilityCheck
parameters:
- name: customerNumber
in: query
description: The customer number to be checked.
required: false
explode: true
schema:
type: string
responses:
'200':
description: Returns whether given customer number is available.
content:
application/json:
schema:
properties:
objects:
type: boolean
type: object
'400':
description: Bad request
'401':
description: Authentication required
'500':
description: Server Error
deprecated: false
security:
- api_key: []
/Contact:
get:
tags:
- Contact
summary: Retrieve contacts
description: "There are a multitude of parameter which can be used to filter.<br>\r\n A few of them are attached but\r\n for a complete list please check out <a href='#tag/Contact/How-to-filter-for-certain-contacts'>this</a> list"
operationId: getContacts
parameters:
- name: depth
in: query
description: "Defines if both organizations <b>and</b> persons should be returned.<br>\r\n '0' -> only organizations, '1' -> organizations and persons"
required: false
explode: true
schema:
type: string
enum:
- '0'
- '1'
- name: customerNumber
in: query
description: Retrieve all contacts with this customer number
required: false
explode: true
schema:
type: string
responses:
'200':
description: Successful operation
content:
application/json:
schema:
properties:
objects:
type: array
items:
$ref: '#/components/schemas/Model_ContactResponse'
type: object
'400':
description: Bad request