easybill-rest-client 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +6 -0
  3. data/Gemfile.lock +152 -0
  4. data/README.md +8 -0
  5. data/Rakefile +4 -0
  6. data/config.json +5 -0
  7. data/easybill-rest-client.gemspec +29 -0
  8. data/lib/easybill-rest-client.rb +15 -0
  9. data/lib/easybill_rest_client/.document_address.rb.swp +0 -0
  10. data/lib/easybill_rest_client/.document_item.rb.swp +0 -0
  11. data/lib/easybill_rest_client/.document_payment.rb.swp +0 -0
  12. data/lib/easybill_rest_client/.document_recurring_options.rb.swp +0 -0
  13. data/lib/easybill_rest_client/.easybill_error.rb.swp +0 -0
  14. data/lib/easybill_rest_client/.log_formatter.rb.swp +0 -0
  15. data/lib/easybill_rest_client/.request_builder.rb.swp +0 -0
  16. data/lib/easybill_rest_client/.too_many_requests_error.rb.swp +0 -0
  17. data/lib/easybill_rest_client/api_client.rb +61 -0
  18. data/lib/easybill_rest_client/client.rb +39 -0
  19. data/lib/easybill_rest_client/customer.rb +70 -0
  20. data/lib/easybill_rest_client/customer_api.rb +15 -0
  21. data/lib/easybill_rest_client/document.rb +53 -0
  22. data/lib/easybill_rest_client/document_address.rb +19 -0
  23. data/lib/easybill_rest_client/document_api.rb +31 -0
  24. data/lib/easybill_rest_client/document_item.rb +34 -0
  25. data/lib/easybill_rest_client/document_payment.rb +15 -0
  26. data/lib/easybill_rest_client/document_payment_api.rb +15 -0
  27. data/lib/easybill_rest_client/document_recurring_options.rb +23 -0
  28. data/lib/easybill_rest_client/document_service_date.rb +12 -0
  29. data/lib/easybill_rest_client/generic_api.rb +39 -0
  30. data/lib/easybill_rest_client/pdf.rb +21 -0
  31. data/lib/easybill_rest_client/post_box.rb +24 -0
  32. data/lib/easybill_rest_client/post_box_api.rb +15 -0
  33. data/lib/easybill_rest_client/request.rb +107 -0
  34. data/lib/easybill_rest_client/request_logger.rb +24 -0
  35. data/lib/easybill_rest_client/response.rb +36 -0
  36. data/lib/easybill_rest_client/retry_on.rb +46 -0
  37. data/lib/easybill_rest_client/version.rb +5 -0
  38. data/log/.gitkeep +0 -0
  39. data/log/test.log +5723 -0
  40. data/script/.generate.swo +0 -0
  41. data/spec/.spec_helper.rb.swp +0 -0
  42. data/spec/fixtures/vcr/EasybillRestClient_CustomerApi/_customers_get/.returns_customers.yml.swo +0 -0
  43. data/spec/fixtures/vcr/EasybillRestClient_CustomerApi/_customers_get/.returns_customers.yml.swp +0 -0
  44. data/spec/fixtures/vcr/EasybillRestClient_CustomerApi/a_list_of_customers/gets_all_customers.yml +84 -0
  45. data/spec/fixtures/vcr/EasybillRestClient_CustomerApi/a_list_of_customers/gets_customers_matching_a_filter.yml +72 -0
  46. data/spec/fixtures/vcr/EasybillRestClient_CustomerApi/creates_updates_and_deletes_customer.yml +377 -0
  47. data/spec/fixtures/vcr/EasybillRestClient_Document/_all/returns_documents.yml +44 -0
  48. data/spec/fixtures/vcr/EasybillRestClient_DocumentApi/_cancel/cancels_a_document.yml +212 -0
  49. data/spec/fixtures/vcr/EasybillRestClient_DocumentApi/_create/creates_a_document.yml +53 -0
  50. data/spec/fixtures/vcr/EasybillRestClient_DocumentApi/_delete/deletes_a_document.yml +174 -0
  51. data/spec/fixtures/vcr/EasybillRestClient_DocumentApi/_find/returns_a_document.yml +57 -0
  52. data/spec/fixtures/vcr/EasybillRestClient_DocumentApi/_find_all/paid_and_unpaid_documents_exist/returns_only_unpaid_documents.yml +795 -0
  53. data/spec/fixtures/vcr/EasybillRestClient_DocumentApi/_find_all/returns_documents.yml +58 -0
  54. data/spec/fixtures/vcr/EasybillRestClient_DocumentApi/_find_all/returns_documents_by_number.yml +58 -0
  55. data/spec/fixtures/vcr/EasybillRestClient_DocumentApi/_finish/marks_a_drafted_document_as_finished.yml +212 -0
  56. data/spec/fixtures/vcr/EasybillRestClient_DocumentApi/_get_pdf/returns_a_PDF.yml +3889 -0
  57. data/spec/fixtures/vcr/EasybillRestClient_DocumentApi/_send_email/passes_on_additional_params.yml +63 -0
  58. data/spec/fixtures/vcr/EasybillRestClient_DocumentApi/_send_email/sends_an_email.yml +63 -0
  59. data/spec/fixtures/vcr/EasybillRestClient_DocumentApi/_update/updates_a_document.yml +107 -0
  60. data/spec/fixtures/vcr/EasybillRestClient_DocumentPaymentApi/_create/creates_a_document_payment.yml +195 -0
  61. data/spec/fixtures/vcr/EasybillRestClient_DocumentPaymentApi/_delete/deletes_a_document_payment.yml +168 -0
  62. data/spec/fixtures/vcr/EasybillRestClient_DocumentPaymentApi/_document_payments_get/returns_a_document_s_payments.yml +460 -0
  63. data/spec/fixtures/vcr/EasybillRestClient_DocumentPaymentApi/_document_payments_post/creates_a_document_payment.yml +47 -0
  64. data/spec/fixtures/vcr/EasybillRestClient_DocumentPaymentApi/_find/returns_a_document_payment.yml +66 -0
  65. data/spec/fixtures/vcr/EasybillRestClient_DocumentPaymentApi/_find_all/returns_document_payments.yml +66 -0
  66. data/spec/fixtures/vcr/EasybillRestClient_PostBoxApi/_delete/deletes_a_post_box.yml +174 -0
  67. data/spec/fixtures/vcr/EasybillRestClient_PostBoxApi/_find/returns_a_post_box.yml +72 -0
  68. data/spec/fixtures/vcr/EasybillRestClient_PostBoxApi/_find_all/returns_post_boxes.yml +73 -0
  69. data/spec/fixtures/vcr/EasybillRestClient_PostBoxApi/_post_boxes_get/returns_post_boxes.yml +52 -0
  70. data/spec/integration/.customer_api_spec.rb.swn +0 -0
  71. data/spec/integration/.customer_api_spec.rb.swo +0 -0
  72. data/spec/integration/customer_api_spec.rb +47 -0
  73. data/spec/integration/easybill_rest_client/document_api_spec.rb +129 -0
  74. data/spec/integration/easybill_rest_client/document_payment_api_spec.rb +55 -0
  75. data/spec/integration/easybill_rest_client/post_box_api_spec.rb +31 -0
  76. data/spec/lib/easybill_rest_client/.api_client_spec.rb.swp +0 -0
  77. data/spec/lib/easybill_rest_client/easybill_rest_api/.generic_api_spec.rb.swp +0 -0
  78. data/spec/lib/easybill_rest_client/generic_api_spec.rb +55 -0
  79. data/spec/lib/easybill_rest_client/pdf_spec.rb +29 -0
  80. data/spec/lib/easybill_rest_client/request_logger_spec.rb +14 -0
  81. data/spec/lib/easybill_rest_client/request_spec.rb +32 -0
  82. data/spec/lib/easybill_rest_client/retry_on_spec.rb +37 -0
  83. data/spec/spec_helper.rb +33 -0
  84. data/spec/support/.setup_api_client.rb.swo +0 -0
  85. data/spec/support/setup_client.rb +12 -0
  86. data/swagger.json +3964 -0
  87. metadata +257 -0
data/swagger.json ADDED
@@ -0,0 +1,3964 @@
1
+ {
2
+ "swagger": "2.0",
3
+ "info": {
4
+ "version": "1.0.0",
5
+ "title": "easybill REST API",
6
+ "description": "Authenticate with HTTP Basic Auth.\n* Username: `easybill email`\n \n* Password: `SOAP API key`\n"
7
+ },
8
+ "tags": [
9
+ {
10
+ "name": "customer",
11
+ "description": "Everything about your customers"
12
+ },
13
+ {
14
+ "name": "customer group",
15
+ "description": "Groups for customer"
16
+ },
17
+ {
18
+ "name": "document",
19
+ "description": "Invoices, offers, etc."
20
+ },
21
+ {
22
+ "name": "document payment"
23
+ },
24
+ {
25
+ "name": "position"
26
+ },
27
+ {
28
+ "name": "position group"
29
+ },
30
+ {
31
+ "name": "project"
32
+ },
33
+ {
34
+ "name": "task"
35
+ },
36
+ {
37
+ "name": "text template"
38
+ },
39
+ {
40
+ "name": "time tracking"
41
+ }
42
+ ],
43
+ "host": "api.easybill.de",
44
+ "basePath": "/rest/v1",
45
+ "schemes": [
46
+ "https"
47
+ ],
48
+ "produces": [
49
+ "application/json"
50
+ ],
51
+ "consumes": [
52
+ "application/json"
53
+ ],
54
+ "securityDefinitions": {
55
+ "basicAuth": {
56
+ "type": "basic"
57
+ }
58
+ },
59
+ "paths": {
60
+ "/customers": {
61
+ "get": {
62
+ "tags": [
63
+ "customer"
64
+ ],
65
+ "summary": "Fetch customers list",
66
+ "parameters": [
67
+ {
68
+ "in": "query",
69
+ "name": "page",
70
+ "required": false,
71
+ "type": "integer",
72
+ "format": "int64"
73
+ },
74
+ {
75
+ "in": "query",
76
+ "name": "limit",
77
+ "required": false,
78
+ "type": "integer",
79
+ "format": "int64"
80
+ },
81
+ {
82
+ "in": "query",
83
+ "name": "group_id",
84
+ "description": "Filter customers by group_id. You can add multiple group ids separate by comma like id,id,id.",
85
+ "required": false,
86
+ "type": "string"
87
+ },
88
+ {
89
+ "in": "query",
90
+ "name": "number",
91
+ "description": "Filter customers by number. You can add multiple numbers separate by comma like no,no,no.",
92
+ "required": false,
93
+ "type": "string"
94
+ },
95
+ {
96
+ "in": "query",
97
+ "name": "country",
98
+ "description": "Filter customers by country. You can add multiple countries separate by comma like DE,PL,FR.",
99
+ "required": false,
100
+ "type": "string"
101
+ },
102
+ {
103
+ "in": "query",
104
+ "name": "zip_code",
105
+ "description": "Filter customers by zip_code. You can add multiple zip codes separate by comma like zip,zip,zip.",
106
+ "required": false,
107
+ "type": "string"
108
+ },
109
+ {
110
+ "in": "query",
111
+ "name": "emails",
112
+ "description": "Filter customers by emails. You can add multiple emails separate by comma like mail,mail,mail.",
113
+ "required": false,
114
+ "type": "string"
115
+ },
116
+ {
117
+ "in": "query",
118
+ "name": "first_name",
119
+ "description": "Filter customers by first_name. You can add multiple names separate by comma like name,name,name.",
120
+ "required": false,
121
+ "type": "string"
122
+ },
123
+ {
124
+ "in": "query",
125
+ "name": "last_name",
126
+ "description": "Filter customers by first_name. You can add multiple names separate by comma like name,name,name.",
127
+ "required": false,
128
+ "type": "string"
129
+ },
130
+ {
131
+ "in": "query",
132
+ "name": "company_name",
133
+ "description": "Filter customers by first_name. You can add multiple names separate by comma like name,name,name.",
134
+ "required": false,
135
+ "type": "string"
136
+ }
137
+ ],
138
+ "responses": {
139
+ "200": {
140
+ "description": "Successful operation",
141
+ "schema": {
142
+ "$ref": "#/definitions/Customers"
143
+ }
144
+ }
145
+ },
146
+ "security": [
147
+ {
148
+ "basicAuth": []
149
+ }
150
+ ]
151
+ },
152
+ "post": {
153
+ "tags": [
154
+ "customer"
155
+ ],
156
+ "summary": "Create customer",
157
+ "description": "",
158
+ "parameters": [
159
+ {
160
+ "in": "body",
161
+ "name": "body",
162
+ "required": true,
163
+ "schema": {
164
+ "$ref": "#/definitions/Customer"
165
+ }
166
+ }
167
+ ],
168
+ "responses": {
169
+ "201": {
170
+ "description": "Successful operation",
171
+ "schema": {
172
+ "$ref": "#/definitions/Customer"
173
+ }
174
+ },
175
+ "400": {
176
+ "description": "Invalid Customer"
177
+ }
178
+ },
179
+ "security": [
180
+ {
181
+ "basicAuth": []
182
+ }
183
+ ]
184
+ }
185
+ },
186
+ "/customers/{id}": {
187
+ "get": {
188
+ "tags": [
189
+ "customer"
190
+ ],
191
+ "summary": "Fetch customer",
192
+ "parameters": [
193
+ {
194
+ "in": "path",
195
+ "name": "id",
196
+ "description": "ID of customer that needs to be fetched",
197
+ "required": true,
198
+ "type": "integer",
199
+ "format": "int64"
200
+ }
201
+ ],
202
+ "responses": {
203
+ "200": {
204
+ "description": "Successful operation",
205
+ "schema": {
206
+ "$ref": "#/definitions/Customer"
207
+ }
208
+ },
209
+ "404": {
210
+ "description": "Not found"
211
+ }
212
+ },
213
+ "security": [
214
+ {
215
+ "basicAuth": []
216
+ }
217
+ ]
218
+ },
219
+ "put": {
220
+ "tags": [
221
+ "customer"
222
+ ],
223
+ "summary": "Update Customer",
224
+ "parameters": [
225
+ {
226
+ "in": "path",
227
+ "name": "id",
228
+ "description": "ID of customer that needs to be updated",
229
+ "required": true,
230
+ "type": "integer",
231
+ "format": "int64"
232
+ },
233
+ {
234
+ "in": "body",
235
+ "name": "body",
236
+ "required": true,
237
+ "schema": {
238
+ "$ref": "#/definitions/Customer"
239
+ }
240
+ }
241
+ ],
242
+ "responses": {
243
+ "200": {
244
+ "description": "Successful operation",
245
+ "schema": {
246
+ "$ref": "#/definitions/Customer"
247
+ }
248
+ },
249
+ "400": {
250
+ "description": "Invalid Customer"
251
+ }
252
+ },
253
+ "security": [
254
+ {
255
+ "basicAuth": []
256
+ }
257
+ ]
258
+ },
259
+ "delete": {
260
+ "tags": [
261
+ "customer"
262
+ ],
263
+ "summary": "Delete customer",
264
+ "description": "",
265
+ "parameters": [
266
+ {
267
+ "in": "path",
268
+ "name": "id",
269
+ "description": "ID of customer that needs to be deleted",
270
+ "required": true,
271
+ "type": "integer",
272
+ "format": "int64"
273
+ }
274
+ ],
275
+ "responses": {
276
+ "204": {
277
+ "description": "Successful operation"
278
+ },
279
+ "404": {
280
+ "description": "Not found"
281
+ }
282
+ },
283
+ "security": [
284
+ {
285
+ "basicAuth": []
286
+ }
287
+ ]
288
+ }
289
+ },
290
+ "/customers/{customerId}/contacts": {
291
+ "get": {
292
+ "tags": [
293
+ "contact"
294
+ ],
295
+ "summary": "Fetch customer contact list",
296
+ "parameters": [
297
+ {
298
+ "in": "path",
299
+ "name": "customerId",
300
+ "description": "ID of customer that needs to be fetched",
301
+ "required": true,
302
+ "type": "integer",
303
+ "format": "int64"
304
+ },
305
+ {
306
+ "in": "query",
307
+ "name": "page",
308
+ "required": false,
309
+ "type": "integer",
310
+ "format": "int64"
311
+ },
312
+ {
313
+ "in": "query",
314
+ "name": "limit",
315
+ "required": false,
316
+ "type": "integer",
317
+ "format": "int64"
318
+ }
319
+ ],
320
+ "responses": {
321
+ "200": {
322
+ "description": "Successful operation",
323
+ "schema": {
324
+ "$ref": "#/definitions/Contacts"
325
+ }
326
+ }
327
+ },
328
+ "security": [
329
+ {
330
+ "basicAuth": []
331
+ }
332
+ ]
333
+ },
334
+ "post": {
335
+ "tags": [
336
+ "contact"
337
+ ],
338
+ "summary": "Create new contact",
339
+ "parameters": [
340
+ {
341
+ "in": "path",
342
+ "name": "customerId",
343
+ "description": "ID of customer",
344
+ "required": true,
345
+ "type": "integer",
346
+ "format": "int64"
347
+ },
348
+ {
349
+ "in": "body",
350
+ "name": "body",
351
+ "required": false,
352
+ "schema": {
353
+ "$ref": "#/definitions/Contact"
354
+ }
355
+ }
356
+ ],
357
+ "responses": {
358
+ "200": {
359
+ "description": "Successful operation",
360
+ "schema": {
361
+ "$ref": "#/definitions/Contact"
362
+ }
363
+ },
364
+ "400": {
365
+ "description": "Invalid contact"
366
+ }
367
+ },
368
+ "security": [
369
+ {
370
+ "basicAuth": []
371
+ }
372
+ ]
373
+ }
374
+ },
375
+ "/customers/{customerId}/contacts/{id}": {
376
+ "get": {
377
+ "tags": [
378
+ "contact"
379
+ ],
380
+ "summary": "Fetch contact",
381
+ "parameters": [
382
+ {
383
+ "in": "path",
384
+ "name": "customerId",
385
+ "description": "ID of customer",
386
+ "required": true,
387
+ "type": "integer",
388
+ "format": "int64"
389
+ },
390
+ {
391
+ "in": "path",
392
+ "name": "id",
393
+ "description": "ID of contact",
394
+ "required": true,
395
+ "type": "integer",
396
+ "format": "int64"
397
+ }
398
+ ],
399
+ "responses": {
400
+ "200": {
401
+ "description": "Successful operation",
402
+ "schema": {
403
+ "$ref": "#/definitions/Contact"
404
+ }
405
+ },
406
+ "404": {
407
+ "description": "Not found"
408
+ }
409
+ },
410
+ "security": [
411
+ {
412
+ "basicAuth": []
413
+ }
414
+ ]
415
+ },
416
+ "put": {
417
+ "tags": [
418
+ "contact"
419
+ ],
420
+ "summary": "Update Contact",
421
+ "parameters": [
422
+ {
423
+ "in": "path",
424
+ "name": "customerId",
425
+ "description": "ID of customer",
426
+ "required": true,
427
+ "type": "integer",
428
+ "format": "int64"
429
+ },
430
+ {
431
+ "in": "path",
432
+ "name": "id",
433
+ "description": "ID of contact",
434
+ "required": true,
435
+ "type": "integer",
436
+ "format": "int64"
437
+ },
438
+ {
439
+ "in": "body",
440
+ "name": "body",
441
+ "required": false,
442
+ "schema": {
443
+ "$ref": "#/definitions/Contact"
444
+ }
445
+ }
446
+ ],
447
+ "responses": {
448
+ "200": {
449
+ "description": "Successful operation",
450
+ "schema": {
451
+ "$ref": "#/definitions/Contact"
452
+ }
453
+ },
454
+ "400": {
455
+ "description": "Invalid contact"
456
+ }
457
+ },
458
+ "security": [
459
+ {
460
+ "basicAuth": []
461
+ }
462
+ ]
463
+ },
464
+ "delete": {
465
+ "tags": [
466
+ "contact"
467
+ ],
468
+ "summary": "Delete contact",
469
+ "description": "",
470
+ "parameters": [
471
+ {
472
+ "in": "path",
473
+ "name": "customerId",
474
+ "description": "ID of customer",
475
+ "required": true,
476
+ "type": "integer",
477
+ "format": "int64"
478
+ },
479
+ {
480
+ "in": "path",
481
+ "name": "id",
482
+ "description": "ID of contact",
483
+ "required": true,
484
+ "type": "integer",
485
+ "format": "int64"
486
+ }
487
+ ],
488
+ "responses": {
489
+ "204": {
490
+ "description": "Successful operation"
491
+ },
492
+ "404": {
493
+ "description": "Not found"
494
+ }
495
+ },
496
+ "security": [
497
+ {
498
+ "basicAuth": []
499
+ }
500
+ ]
501
+ }
502
+ },
503
+ "/documents": {
504
+ "get": {
505
+ "tags": [
506
+ "document"
507
+ ],
508
+ "summary": "Fetch documents list",
509
+ "parameters": [
510
+ {
511
+ "in": "query",
512
+ "name": "page",
513
+ "required": false,
514
+ "type": "integer",
515
+ "format": "int64"
516
+ },
517
+ {
518
+ "in": "query",
519
+ "name": "limit",
520
+ "required": false,
521
+ "type": "integer",
522
+ "format": "int64"
523
+ },
524
+ {
525
+ "in": "query",
526
+ "name": "type",
527
+ "description": "Filter documents by type. Multiple typs seperate with , like type=INVOICE,CREDIT.",
528
+ "required": false,
529
+ "type": "string",
530
+ "enum": [
531
+ "INVOICE",
532
+ "RECURRING",
533
+ "CREDIT",
534
+ "OFFER",
535
+ "REMINDER",
536
+ "DUNNING",
537
+ "STORNO",
538
+ "DELIVERY",
539
+ "PDF",
540
+ "CHARGE",
541
+ "CHARGE_CONFIRM",
542
+ "LETTER",
543
+ "ORDER"
544
+ ]
545
+ },
546
+ {
547
+ "in": "query",
548
+ "name": "type",
549
+ "description": "Filter documents by type. Multiple typs seperate with , like type=INVOICE,CREDIT.",
550
+ "required": false,
551
+ "type": "string",
552
+ "enum": [
553
+ "INVOICE",
554
+ "RECURRING",
555
+ "CREDIT",
556
+ "OFFER",
557
+ "REMINDER",
558
+ "DUNNING",
559
+ "STORNO",
560
+ "DELIVERY",
561
+ "PDF",
562
+ "CHARGE",
563
+ "CHARGE_CONFIRM",
564
+ "LETTER",
565
+ "ORDER"
566
+ ]
567
+ },
568
+ {
569
+ "in": "query",
570
+ "name": "is_draft",
571
+ "description": "Filter documents by draft flag.",
572
+ "required": false,
573
+ "type": "string",
574
+ "enum": [
575
+ "0",
576
+ "1"
577
+ ]
578
+ },
579
+ {
580
+ "in": "query",
581
+ "name": "is_archive",
582
+ "description": "Filter documents by archive flag.",
583
+ "required": false,
584
+ "type": "string",
585
+ "enum": [
586
+ "0",
587
+ "1"
588
+ ]
589
+ },
590
+ {
591
+ "in": "query",
592
+ "name": "customer_id",
593
+ "description": "Filter documents by customer_id. You can add multiple customer_is separate by comma like id,id,id.",
594
+ "required": false,
595
+ "type": "string"
596
+ },
597
+ {
598
+ "in": "query",
599
+ "name": "project_id",
600
+ "description": "Filter documents by project_id. You can add multiple project_id separate by comma like id,id,id.",
601
+ "required": false,
602
+ "type": "string"
603
+ },
604
+ {
605
+ "in": "query",
606
+ "name": "document_date",
607
+ "description": "Filter documents by document_date. You can filter one date with document_date=2014-12-10 or between like 2015-01-01,2015-12-31.",
608
+ "required": false,
609
+ "type": "string"
610
+ },
611
+ {
612
+ "in": "query",
613
+ "name": "paid_at",
614
+ "description": "Filter documents by paid_at. You can filter one date with paid_at=2014-12-10 or between like 2015-01-01,2015-12-31. With paid_at=null you get all unpaid documents.",
615
+ "type": "string",
616
+ "required": false
617
+ },
618
+ {
619
+ "in": "query",
620
+ "name": "title",
621
+ "description": "Filter documents by title.",
622
+ "type": "string",
623
+ "required": false
624
+ },
625
+ {
626
+ "in": "query",
627
+ "name": "number",
628
+ "description": "Filter documents by number.",
629
+ "type": "string",
630
+ "required": false
631
+ }
632
+ ],
633
+ "responses": {
634
+ "200": {
635
+ "description": "Successful operation",
636
+ "schema": {
637
+ "$ref": "#/definitions/Documents"
638
+ }
639
+ }
640
+ },
641
+ "security": [
642
+ {
643
+ "basicAuth": []
644
+ }
645
+ ]
646
+ },
647
+ "post": {
648
+ "tags": [
649
+ "document"
650
+ ],
651
+ "summary": "Create document",
652
+ "parameters": [
653
+ {
654
+ "in": "body",
655
+ "name": "body",
656
+ "required": true,
657
+ "schema": {
658
+ "$ref": "#/definitions/Document"
659
+ }
660
+ }
661
+ ],
662
+ "responses": {
663
+ "201": {
664
+ "description": "Successful operation",
665
+ "schema": {
666
+ "$ref": "#/definitions/Document"
667
+ }
668
+ }
669
+ },
670
+ "security": [
671
+ {
672
+ "basicAuth": []
673
+ }
674
+ ]
675
+ }
676
+ },
677
+ "/documents/{id}": {
678
+ "get": {
679
+ "tags": [
680
+ "document"
681
+ ],
682
+ "summary": "Fetch document",
683
+ "parameters": [
684
+ {
685
+ "in": "path",
686
+ "name": "id",
687
+ "description": "ID of document",
688
+ "required": true,
689
+ "type": "integer",
690
+ "format": "int64"
691
+ }
692
+ ],
693
+ "responses": {
694
+ "200": {
695
+ "description": "Successful operation",
696
+ "schema": {
697
+ "$ref": "#/definitions/Document"
698
+ }
699
+ },
700
+ "404": {
701
+ "description": "Not found"
702
+ }
703
+ },
704
+ "security": [
705
+ {
706
+ "basicAuth": []
707
+ }
708
+ ]
709
+ },
710
+ "put": {
711
+ "tags": [
712
+ "document"
713
+ ],
714
+ "summary": "Update document",
715
+ "parameters": [
716
+ {
717
+ "in": "path",
718
+ "name": "id",
719
+ "description": "ID of document",
720
+ "required": true,
721
+ "type": "integer",
722
+ "format": "int64"
723
+ },
724
+ {
725
+ "in": "body",
726
+ "name": "body",
727
+ "required": true,
728
+ "schema": {
729
+ "$ref": "#/definitions/Document"
730
+ }
731
+ }
732
+ ],
733
+ "responses": {
734
+ "200": {
735
+ "description": "Successful operation",
736
+ "schema": {
737
+ "$ref": "#/definitions/Document"
738
+ }
739
+ },
740
+ "400": {
741
+ "description": "Invalid Document"
742
+ }
743
+ },
744
+ "security": [
745
+ {
746
+ "basicAuth": []
747
+ }
748
+ ]
749
+ },
750
+ "delete": {
751
+ "tags": [
752
+ "document"
753
+ ],
754
+ "summary": "Delete document",
755
+ "parameters": [
756
+ {
757
+ "in": "path",
758
+ "name": "id",
759
+ "description": "ID of document",
760
+ "required": true,
761
+ "type": "integer",
762
+ "format": "int64"
763
+ }
764
+ ],
765
+ "responses": {
766
+ "204": {
767
+ "description": "Successful operation"
768
+ },
769
+ "404": {
770
+ "description": "Not found"
771
+ }
772
+ },
773
+ "security": [
774
+ {
775
+ "basicAuth": []
776
+ }
777
+ ]
778
+ }
779
+ },
780
+ "/documents/{id}/done": {
781
+ "put": {
782
+ "tags": [
783
+ "document"
784
+ ],
785
+ "summary": "Mark document as done",
786
+ "parameters": [
787
+ {
788
+ "in": "path",
789
+ "name": "id",
790
+ "description": "ID of document",
791
+ "required": true,
792
+ "type": "integer",
793
+ "format": "int64"
794
+ }
795
+ ],
796
+ "responses": {
797
+ "200": {
798
+ "description": "Successful operation",
799
+ "schema": {
800
+ "$ref": "#/definitions/Document"
801
+ }
802
+ },
803
+ "404": {
804
+ "description": "Not found"
805
+ }
806
+ },
807
+ "security": [
808
+ {
809
+ "basicAuth": []
810
+ }
811
+ ]
812
+ }
813
+ },
814
+ "/documents/{id}/cancel": {
815
+ "post": {
816
+ "tags": [
817
+ "document"
818
+ ],
819
+ "summary": "Cancel document",
820
+ "parameters": [
821
+ {
822
+ "in": "path",
823
+ "name": "id",
824
+ "description": "ID of document",
825
+ "required": true,
826
+ "type": "integer",
827
+ "format": "int64"
828
+ }
829
+ ],
830
+ "responses": {
831
+ "200": {
832
+ "description": "Successful operation",
833
+ "schema": {
834
+ "$ref": "#/definitions/Document"
835
+ }
836
+ },
837
+ "404": {
838
+ "description": "Not found"
839
+ }
840
+ },
841
+ "security": [
842
+ {
843
+ "basicAuth": []
844
+ }
845
+ ]
846
+ }
847
+ },
848
+ "/documents/{id}/send/{type}": {
849
+ "post": {
850
+ "tags": [
851
+ "document"
852
+ ],
853
+ "summary": "Send document",
854
+ "parameters": [
855
+ {
856
+ "in": "path",
857
+ "name": "id",
858
+ "description": "ID of document",
859
+ "required": true,
860
+ "type": "integer",
861
+ "format": "int64"
862
+ },
863
+ {
864
+ "in": "path",
865
+ "name": "type",
866
+ "required": true,
867
+ "type": "string",
868
+ "enum": [
869
+ "email",
870
+ "fax",
871
+ "post"
872
+ ]
873
+ },
874
+ {
875
+ "in": "body",
876
+ "name": "body",
877
+ "required": true,
878
+ "schema": {
879
+ "$ref": "#/definitions/PostBoxRequest"
880
+ }
881
+ }
882
+ ],
883
+ "responses": {
884
+ "204": {
885
+ "description": "Successful operation"
886
+ },
887
+ "404": {
888
+ "description": "Not found"
889
+ }
890
+ },
891
+ "security": [
892
+ {
893
+ "basicAuth": []
894
+ }
895
+ ]
896
+ }
897
+ },
898
+ "/documents/{id}/pdf": {
899
+ "get": {
900
+ "tags": [
901
+ "document"
902
+ ],
903
+ "summary": "Fetch pdf document",
904
+ "produces": [
905
+ "application/pdf"
906
+ ],
907
+ "parameters": [
908
+ {
909
+ "in": "path",
910
+ "name": "id",
911
+ "description": "ID of document",
912
+ "required": true,
913
+ "type": "integer",
914
+ "format": "int64"
915
+ }
916
+ ],
917
+ "responses": {
918
+ "200": {
919
+ "description": "Successful operation",
920
+ "schema": {
921
+ "type": "file",
922
+ "format": "binary"
923
+ }
924
+ },
925
+ "404": {
926
+ "description": "Not found"
927
+ }
928
+ },
929
+ "security": [
930
+ {
931
+ "basicAuth": []
932
+ }
933
+ ]
934
+ }
935
+ },
936
+ "/customer-groups": {
937
+ "get": {
938
+ "tags": [
939
+ "customer group"
940
+ ],
941
+ "summary": "Fetch customer group list",
942
+ "parameters": [
943
+ {
944
+ "in": "query",
945
+ "name": "page",
946
+ "required": false,
947
+ "type": "integer",
948
+ "format": "int64"
949
+ },
950
+ {
951
+ "in": "query",
952
+ "name": "limit",
953
+ "required": false,
954
+ "type": "integer",
955
+ "format": "int64"
956
+ }
957
+ ],
958
+ "responses": {
959
+ "200": {
960
+ "description": "Successful operation",
961
+ "schema": {
962
+ "$ref": "#/definitions/CustomerGroups"
963
+ }
964
+ }
965
+ },
966
+ "security": [
967
+ {
968
+ "basicAuth": []
969
+ }
970
+ ]
971
+ },
972
+ "post": {
973
+ "tags": [
974
+ "customer group"
975
+ ],
976
+ "summary": "Create customer froup",
977
+ "parameters": [
978
+ {
979
+ "in": "body",
980
+ "name": "body",
981
+ "required": true,
982
+ "schema": {
983
+ "$ref": "#/definitions/CustomerGroup"
984
+ }
985
+ }
986
+ ],
987
+ "responses": {
988
+ "201": {
989
+ "description": "Successful operation",
990
+ "schema": {
991
+ "$ref": "#/definitions/CustomerGroup"
992
+ }
993
+ }
994
+ },
995
+ "security": [
996
+ {
997
+ "basicAuth": []
998
+ }
999
+ ]
1000
+ }
1001
+ },
1002
+ "/customer-groups/{id}": {
1003
+ "get": {
1004
+ "tags": [
1005
+ "customer group"
1006
+ ],
1007
+ "summary": "Fetch customer group",
1008
+ "parameters": [
1009
+ {
1010
+ "in": "path",
1011
+ "name": "id",
1012
+ "description": "ID of customer group",
1013
+ "required": true,
1014
+ "type": "integer",
1015
+ "format": "int64"
1016
+ }
1017
+ ],
1018
+ "responses": {
1019
+ "200": {
1020
+ "description": "Successful operation",
1021
+ "schema": {
1022
+ "$ref": "#/definitions/CustomerGroup"
1023
+ }
1024
+ },
1025
+ "404": {
1026
+ "description": "Not found"
1027
+ }
1028
+ },
1029
+ "security": [
1030
+ {
1031
+ "basicAuth": []
1032
+ }
1033
+ ]
1034
+ },
1035
+ "put": {
1036
+ "tags": [
1037
+ "customer group"
1038
+ ],
1039
+ "summary": "Update customer group",
1040
+ "parameters": [
1041
+ {
1042
+ "in": "path",
1043
+ "name": "id",
1044
+ "description": "ID of customer goup",
1045
+ "required": true,
1046
+ "type": "integer",
1047
+ "format": "int64"
1048
+ },
1049
+ {
1050
+ "in": "body",
1051
+ "name": "body",
1052
+ "required": true,
1053
+ "schema": {
1054
+ "$ref": "#/definitions/CustomerGroup"
1055
+ }
1056
+ }
1057
+ ],
1058
+ "responses": {
1059
+ "200": {
1060
+ "description": "Successful operation",
1061
+ "schema": {
1062
+ "$ref": "#/definitions/CustomerGroup"
1063
+ }
1064
+ },
1065
+ "400": {
1066
+ "description": "Invalid customer group"
1067
+ }
1068
+ },
1069
+ "security": [
1070
+ {
1071
+ "basicAuth": []
1072
+ }
1073
+ ]
1074
+ },
1075
+ "delete": {
1076
+ "tags": [
1077
+ "customer group"
1078
+ ],
1079
+ "summary": "Delete customer group",
1080
+ "parameters": [
1081
+ {
1082
+ "in": "path",
1083
+ "name": "id",
1084
+ "description": "ID of customer group",
1085
+ "required": true,
1086
+ "type": "integer",
1087
+ "format": "int64"
1088
+ }
1089
+ ],
1090
+ "responses": {
1091
+ "204": {
1092
+ "description": "Successful operation"
1093
+ },
1094
+ "404": {
1095
+ "description": "Not found"
1096
+ }
1097
+ },
1098
+ "security": [
1099
+ {
1100
+ "basicAuth": []
1101
+ }
1102
+ ]
1103
+ }
1104
+ },
1105
+ "/tasks": {
1106
+ "get": {
1107
+ "tags": [
1108
+ "task"
1109
+ ],
1110
+ "summary": "Fetch tasks list",
1111
+ "responses": {
1112
+ "200": {
1113
+ "description": "Successful operation",
1114
+ "schema": {
1115
+ "$ref": "#/definitions/Tasks"
1116
+ }
1117
+ }
1118
+ },
1119
+ "security": [
1120
+ {
1121
+ "basicAuth": []
1122
+ }
1123
+ ]
1124
+ },
1125
+ "post": {
1126
+ "tags": [
1127
+ "task"
1128
+ ],
1129
+ "summary": "Create task",
1130
+ "parameters": [
1131
+ {
1132
+ "in": "body",
1133
+ "name": "body",
1134
+ "required": true,
1135
+ "schema": {
1136
+ "$ref": "#/definitions/Task"
1137
+ }
1138
+ }
1139
+ ],
1140
+ "responses": {
1141
+ "201": {
1142
+ "description": "Successful operation",
1143
+ "schema": {
1144
+ "$ref": "#/definitions/Task"
1145
+ }
1146
+ }
1147
+ },
1148
+ "security": [
1149
+ {
1150
+ "basicAuth": []
1151
+ }
1152
+ ]
1153
+ }
1154
+ },
1155
+ "/tasks/{id}": {
1156
+ "get": {
1157
+ "tags": [
1158
+ "task"
1159
+ ],
1160
+ "summary": "Fetch task",
1161
+ "parameters": [
1162
+ {
1163
+ "in": "path",
1164
+ "name": "id",
1165
+ "description": "ID of task",
1166
+ "required": true,
1167
+ "type": "integer",
1168
+ "format": "int64"
1169
+ }
1170
+ ],
1171
+ "responses": {
1172
+ "200": {
1173
+ "description": "Successful operation",
1174
+ "schema": {
1175
+ "$ref": "#/definitions/Task"
1176
+ }
1177
+ },
1178
+ "404": {
1179
+ "description": "Not found"
1180
+ }
1181
+ },
1182
+ "security": [
1183
+ {
1184
+ "basicAuth": []
1185
+ }
1186
+ ]
1187
+ },
1188
+ "put": {
1189
+ "tags": [
1190
+ "task"
1191
+ ],
1192
+ "summary": "Update task",
1193
+ "parameters": [
1194
+ {
1195
+ "in": "path",
1196
+ "name": "id",
1197
+ "description": "ID of task",
1198
+ "required": true,
1199
+ "type": "integer",
1200
+ "format": "int64"
1201
+ },
1202
+ {
1203
+ "in": "body",
1204
+ "name": "body",
1205
+ "required": true,
1206
+ "schema": {
1207
+ "$ref": "#/definitions/Task"
1208
+ }
1209
+ }
1210
+ ],
1211
+ "responses": {
1212
+ "200": {
1213
+ "description": "Successful operation",
1214
+ "schema": {
1215
+ "$ref": "#/definitions/Task"
1216
+ }
1217
+ },
1218
+ "400": {
1219
+ "description": "Invalid task"
1220
+ }
1221
+ },
1222
+ "security": [
1223
+ {
1224
+ "basicAuth": []
1225
+ }
1226
+ ]
1227
+ },
1228
+ "delete": {
1229
+ "tags": [
1230
+ "task"
1231
+ ],
1232
+ "summary": "Delete task",
1233
+ "parameters": [
1234
+ {
1235
+ "in": "path",
1236
+ "name": "id",
1237
+ "description": "ID of task",
1238
+ "required": true,
1239
+ "type": "integer",
1240
+ "format": "int64"
1241
+ }
1242
+ ],
1243
+ "responses": {
1244
+ "204": {
1245
+ "description": "Successful operation"
1246
+ },
1247
+ "404": {
1248
+ "description": "Not found"
1249
+ }
1250
+ },
1251
+ "security": [
1252
+ {
1253
+ "basicAuth": []
1254
+ }
1255
+ ]
1256
+ }
1257
+ },
1258
+ "/projects": {
1259
+ "get": {
1260
+ "tags": [
1261
+ "project"
1262
+ ],
1263
+ "summary": "Fetch projects list",
1264
+ "parameters": [
1265
+ {
1266
+ "in": "query",
1267
+ "name": "page",
1268
+ "required": false,
1269
+ "type": "integer",
1270
+ "format": "int64"
1271
+ },
1272
+ {
1273
+ "in": "query",
1274
+ "name": "limit",
1275
+ "required": false,
1276
+ "type": "integer",
1277
+ "format": "int64"
1278
+ }
1279
+ ],
1280
+ "responses": {
1281
+ "200": {
1282
+ "description": "Successful operation",
1283
+ "schema": {
1284
+ "$ref": "#/definitions/Projects"
1285
+ }
1286
+ }
1287
+ },
1288
+ "security": [
1289
+ {
1290
+ "basicAuth": []
1291
+ }
1292
+ ]
1293
+ },
1294
+ "post": {
1295
+ "tags": [
1296
+ "project"
1297
+ ],
1298
+ "summary": "Create project",
1299
+ "parameters": [
1300
+ {
1301
+ "in": "body",
1302
+ "name": "body",
1303
+ "required": true,
1304
+ "schema": {
1305
+ "$ref": "#/definitions/Project"
1306
+ }
1307
+ }
1308
+ ],
1309
+ "responses": {
1310
+ "201": {
1311
+ "description": "Successful operation",
1312
+ "schema": {
1313
+ "$ref": "#/definitions/Project"
1314
+ }
1315
+ }
1316
+ },
1317
+ "security": [
1318
+ {
1319
+ "basicAuth": []
1320
+ }
1321
+ ]
1322
+ }
1323
+ },
1324
+ "/projects/{id}": {
1325
+ "get": {
1326
+ "tags": [
1327
+ "project"
1328
+ ],
1329
+ "summary": "Fetch project",
1330
+ "parameters": [
1331
+ {
1332
+ "in": "path",
1333
+ "name": "id",
1334
+ "description": "ID of project",
1335
+ "required": true,
1336
+ "type": "integer",
1337
+ "format": "int64"
1338
+ }
1339
+ ],
1340
+ "responses": {
1341
+ "200": {
1342
+ "description": "Successful operation",
1343
+ "schema": {
1344
+ "$ref": "#/definitions/Project"
1345
+ }
1346
+ },
1347
+ "404": {
1348
+ "description": "Not found"
1349
+ }
1350
+ },
1351
+ "security": [
1352
+ {
1353
+ "basicAuth": []
1354
+ }
1355
+ ]
1356
+ },
1357
+ "put": {
1358
+ "tags": [
1359
+ "project"
1360
+ ],
1361
+ "summary": "Update project",
1362
+ "parameters": [
1363
+ {
1364
+ "in": "path",
1365
+ "name": "id",
1366
+ "description": "ID of project",
1367
+ "required": true,
1368
+ "type": "integer",
1369
+ "format": "int64"
1370
+ },
1371
+ {
1372
+ "in": "body",
1373
+ "name": "body",
1374
+ "required": true,
1375
+ "schema": {
1376
+ "$ref": "#/definitions/Project"
1377
+ }
1378
+ }
1379
+ ],
1380
+ "responses": {
1381
+ "200": {
1382
+ "description": "Successful operation",
1383
+ "schema": {
1384
+ "$ref": "#/definitions/Project"
1385
+ }
1386
+ },
1387
+ "400": {
1388
+ "description": "Invalid project"
1389
+ }
1390
+ },
1391
+ "security": [
1392
+ {
1393
+ "basicAuth": []
1394
+ }
1395
+ ]
1396
+ },
1397
+ "delete": {
1398
+ "tags": [
1399
+ "project"
1400
+ ],
1401
+ "summary": "Delete project",
1402
+ "parameters": [
1403
+ {
1404
+ "in": "path",
1405
+ "name": "id",
1406
+ "description": "ID of project",
1407
+ "required": true,
1408
+ "type": "integer",
1409
+ "format": "int64"
1410
+ }
1411
+ ],
1412
+ "responses": {
1413
+ "204": {
1414
+ "description": "Successful operation"
1415
+ },
1416
+ "404": {
1417
+ "description": "Not found"
1418
+ }
1419
+ },
1420
+ "security": [
1421
+ {
1422
+ "basicAuth": []
1423
+ }
1424
+ ]
1425
+ }
1426
+ },
1427
+ "/positions": {
1428
+ "get": {
1429
+ "tags": [
1430
+ "position"
1431
+ ],
1432
+ "summary": "Fetch positions list",
1433
+ "parameters": [
1434
+ {
1435
+ "in": "query",
1436
+ "name": "page",
1437
+ "required": false,
1438
+ "type": "integer",
1439
+ "format": "int64"
1440
+ },
1441
+ {
1442
+ "in": "query",
1443
+ "name": "limit",
1444
+ "required": false,
1445
+ "type": "integer",
1446
+ "format": "int64"
1447
+ }
1448
+ ],
1449
+ "responses": {
1450
+ "200": {
1451
+ "description": "Successful operation",
1452
+ "schema": {
1453
+ "$ref": "#/definitions/Positions"
1454
+ }
1455
+ }
1456
+ },
1457
+ "security": [
1458
+ {
1459
+ "basicAuth": []
1460
+ }
1461
+ ]
1462
+ },
1463
+ "post": {
1464
+ "tags": [
1465
+ "position"
1466
+ ],
1467
+ "summary": "Create position",
1468
+ "parameters": [
1469
+ {
1470
+ "in": "body",
1471
+ "name": "body",
1472
+ "required": true,
1473
+ "schema": {
1474
+ "$ref": "#/definitions/Position"
1475
+ }
1476
+ }
1477
+ ],
1478
+ "responses": {
1479
+ "201": {
1480
+ "description": "Successful operation",
1481
+ "schema": {
1482
+ "$ref": "#/definitions/Position"
1483
+ }
1484
+ }
1485
+ },
1486
+ "security": [
1487
+ {
1488
+ "basicAuth": []
1489
+ }
1490
+ ]
1491
+ }
1492
+ },
1493
+ "/positions/{id}": {
1494
+ "get": {
1495
+ "tags": [
1496
+ "position"
1497
+ ],
1498
+ "summary": "Fetch position",
1499
+ "parameters": [
1500
+ {
1501
+ "in": "path",
1502
+ "name": "id",
1503
+ "description": "ID of position",
1504
+ "required": true,
1505
+ "type": "integer",
1506
+ "format": "int64"
1507
+ }
1508
+ ],
1509
+ "responses": {
1510
+ "200": {
1511
+ "description": "Successful operation",
1512
+ "schema": {
1513
+ "$ref": "#/definitions/Position"
1514
+ }
1515
+ },
1516
+ "404": {
1517
+ "description": "Not found"
1518
+ }
1519
+ },
1520
+ "security": [
1521
+ {
1522
+ "basicAuth": []
1523
+ }
1524
+ ]
1525
+ },
1526
+ "put": {
1527
+ "tags": [
1528
+ "position"
1529
+ ],
1530
+ "summary": "Update position",
1531
+ "parameters": [
1532
+ {
1533
+ "in": "path",
1534
+ "name": "id",
1535
+ "description": "ID of position",
1536
+ "required": true,
1537
+ "type": "integer",
1538
+ "format": "int64"
1539
+ },
1540
+ {
1541
+ "in": "body",
1542
+ "name": "body",
1543
+ "required": true,
1544
+ "schema": {
1545
+ "$ref": "#/definitions/Position"
1546
+ }
1547
+ }
1548
+ ],
1549
+ "responses": {
1550
+ "200": {
1551
+ "description": "Successful operation",
1552
+ "schema": {
1553
+ "$ref": "#/definitions/Position"
1554
+ }
1555
+ },
1556
+ "400": {
1557
+ "description": "Invalid position"
1558
+ }
1559
+ },
1560
+ "security": [
1561
+ {
1562
+ "basicAuth": []
1563
+ }
1564
+ ]
1565
+ },
1566
+ "delete": {
1567
+ "tags": [
1568
+ "position"
1569
+ ],
1570
+ "summary": "Delete position",
1571
+ "parameters": [
1572
+ {
1573
+ "in": "path",
1574
+ "name": "id",
1575
+ "description": "ID of position",
1576
+ "required": true,
1577
+ "type": "integer",
1578
+ "format": "int64"
1579
+ }
1580
+ ],
1581
+ "responses": {
1582
+ "204": {
1583
+ "description": "Successful operation"
1584
+ },
1585
+ "404": {
1586
+ "description": "Not found"
1587
+ }
1588
+ },
1589
+ "security": [
1590
+ {
1591
+ "basicAuth": []
1592
+ }
1593
+ ]
1594
+ }
1595
+ },
1596
+ "/position-groups": {
1597
+ "get": {
1598
+ "tags": [
1599
+ "position group"
1600
+ ],
1601
+ "summary": "Fetch position group list",
1602
+ "parameters": [
1603
+ {
1604
+ "in": "query",
1605
+ "name": "page",
1606
+ "required": false,
1607
+ "type": "integer",
1608
+ "format": "int64"
1609
+ },
1610
+ {
1611
+ "in": "query",
1612
+ "name": "limit",
1613
+ "required": false,
1614
+ "type": "integer",
1615
+ "format": "int64"
1616
+ }
1617
+ ],
1618
+
1619
+ "responses": {
1620
+ "200": {
1621
+ "description": "Successful operation",
1622
+ "schema": {
1623
+ "$ref": "#/definitions/PositionGroups"
1624
+ }
1625
+ }
1626
+ },
1627
+ "security": [
1628
+ {
1629
+ "basicAuth": []
1630
+ }
1631
+ ]
1632
+ },
1633
+ "post": {
1634
+ "tags": [
1635
+ "position group"
1636
+ ],
1637
+ "summary": "Create position group",
1638
+ "parameters": [
1639
+ {
1640
+ "in": "body",
1641
+ "name": "body",
1642
+ "required": true,
1643
+ "schema": {
1644
+ "$ref": "#/definitions/PositionGroup"
1645
+ }
1646
+ }
1647
+ ],
1648
+ "responses": {
1649
+ "201": {
1650
+ "description": "Successful operation",
1651
+ "schema": {
1652
+ "$ref": "#/definitions/PositionGroup"
1653
+ }
1654
+ }
1655
+ },
1656
+ "security": [
1657
+ {
1658
+ "basicAuth": []
1659
+ }
1660
+ ]
1661
+ }
1662
+ },
1663
+ "/position-groups/{id}": {
1664
+ "get": {
1665
+ "tags": [
1666
+ "position group"
1667
+ ],
1668
+ "summary": "Fetch position group",
1669
+ "parameters": [
1670
+ {
1671
+ "in": "path",
1672
+ "name": "id",
1673
+ "description": "ID of position group",
1674
+ "required": true,
1675
+ "type": "integer",
1676
+ "format": "int64"
1677
+ }
1678
+ ],
1679
+ "responses": {
1680
+ "200": {
1681
+ "description": "Successful operation",
1682
+ "schema": {
1683
+ "$ref": "#/definitions/PositionGroup"
1684
+ }
1685
+ },
1686
+ "404": {
1687
+ "description": "Not found"
1688
+ }
1689
+ },
1690
+ "security": [
1691
+ {
1692
+ "basicAuth": []
1693
+ }
1694
+ ]
1695
+ },
1696
+ "put": {
1697
+ "tags": [
1698
+ "position group"
1699
+ ],
1700
+ "summary": "Update position group",
1701
+ "parameters": [
1702
+ {
1703
+ "in": "path",
1704
+ "name": "id",
1705
+ "description": "ID of position goup",
1706
+ "required": true,
1707
+ "type": "integer",
1708
+ "format": "int64"
1709
+ },
1710
+ {
1711
+ "in": "body",
1712
+ "name": "body",
1713
+ "required": true,
1714
+ "schema": {
1715
+ "$ref": "#/definitions/PositionGroup"
1716
+ }
1717
+ }
1718
+ ],
1719
+ "responses": {
1720
+ "200": {
1721
+ "description": "Successful operation",
1722
+ "schema": {
1723
+ "$ref": "#/definitions/PositionGroup"
1724
+ }
1725
+ },
1726
+ "400": {
1727
+ "description": "Invalid position group"
1728
+ }
1729
+ },
1730
+ "security": [
1731
+ {
1732
+ "basicAuth": []
1733
+ }
1734
+ ]
1735
+ },
1736
+ "delete": {
1737
+ "tags": [
1738
+ "position group"
1739
+ ],
1740
+ "summary": "Delete position group",
1741
+ "parameters": [
1742
+ {
1743
+ "in": "path",
1744
+ "name": "id",
1745
+ "description": "ID of position group",
1746
+ "required": true,
1747
+ "type": "integer",
1748
+ "format": "int64"
1749
+ }
1750
+ ],
1751
+ "responses": {
1752
+ "204": {
1753
+ "description": "Successful operation"
1754
+ },
1755
+ "404": {
1756
+ "description": "Not found"
1757
+ }
1758
+ },
1759
+ "security": [
1760
+ {
1761
+ "basicAuth": []
1762
+ }
1763
+ ]
1764
+ }
1765
+ },
1766
+ "/time-trackings": {
1767
+ "get": {
1768
+ "tags": [
1769
+ "time tracking"
1770
+ ],
1771
+ "summary": "Fetch time trackings list",
1772
+ "parameters": [
1773
+ {
1774
+ "in": "query",
1775
+ "name": "page",
1776
+ "required": false,
1777
+ "type": "integer",
1778
+ "format": "int64"
1779
+ },
1780
+ {
1781
+ "in": "query",
1782
+ "name": "limit",
1783
+ "required": false,
1784
+ "type": "integer",
1785
+ "format": "int64"
1786
+ }
1787
+ ],
1788
+ "responses": {
1789
+ "200": {
1790
+ "description": "Successful operation",
1791
+ "schema": {
1792
+ "$ref": "#/definitions/TimeTrackings"
1793
+ }
1794
+ }
1795
+ },
1796
+ "security": [
1797
+ {
1798
+ "basicAuth": []
1799
+ }
1800
+ ]
1801
+ },
1802
+ "post": {
1803
+ "tags": [
1804
+ "time tracking"
1805
+ ],
1806
+ "summary": "Create time tracking",
1807
+ "parameters": [
1808
+ {
1809
+ "in": "body",
1810
+ "name": "body",
1811
+ "required": true,
1812
+ "schema": {
1813
+ "$ref": "#/definitions/TimeTracking"
1814
+ }
1815
+ }
1816
+ ],
1817
+ "responses": {
1818
+ "201": {
1819
+ "description": "Successful operation",
1820
+ "schema": {
1821
+ "$ref": "#/definitions/TimeTracking"
1822
+ }
1823
+ }
1824
+ },
1825
+ "security": [
1826
+ {
1827
+ "basicAuth": []
1828
+ }
1829
+ ]
1830
+ }
1831
+ },
1832
+ "/time-trackings/{id}": {
1833
+ "get": {
1834
+ "tags": [
1835
+ "time tracking"
1836
+ ],
1837
+ "summary": "Fetch time tracking",
1838
+ "parameters": [
1839
+ {
1840
+ "in": "path",
1841
+ "name": "id",
1842
+ "description": "ID of time tracking",
1843
+ "required": true,
1844
+ "type": "integer",
1845
+ "format": "int64"
1846
+ }
1847
+ ],
1848
+ "responses": {
1849
+ "200": {
1850
+ "description": "Successful operation",
1851
+ "schema": {
1852
+ "$ref": "#/definitions/TimeTracking"
1853
+ }
1854
+ },
1855
+ "404": {
1856
+ "description": "Not found"
1857
+ }
1858
+ },
1859
+ "security": [
1860
+ {
1861
+ "basicAuth": []
1862
+ }
1863
+ ]
1864
+ },
1865
+ "put": {
1866
+ "tags": [
1867
+ "time tracking"
1868
+ ],
1869
+ "summary": "Update time tracking",
1870
+ "parameters": [
1871
+ {
1872
+ "in": "path",
1873
+ "name": "id",
1874
+ "description": "ID of time tracking",
1875
+ "required": true,
1876
+ "type": "integer",
1877
+ "format": "int64"
1878
+ },
1879
+ {
1880
+ "in": "body",
1881
+ "name": "body",
1882
+ "required": true,
1883
+ "schema": {
1884
+ "$ref": "#/definitions/TimeTracking"
1885
+ }
1886
+ }
1887
+ ],
1888
+ "responses": {
1889
+ "200": {
1890
+ "description": "Successful operation",
1891
+ "schema": {
1892
+ "$ref": "#/definitions/TimeTracking"
1893
+ }
1894
+ },
1895
+ "400": {
1896
+ "description": "Invalid time tracking"
1897
+ }
1898
+ },
1899
+ "security": [
1900
+ {
1901
+ "basicAuth": []
1902
+ }
1903
+ ]
1904
+ },
1905
+ "delete": {
1906
+ "tags": [
1907
+ "time tracking"
1908
+ ],
1909
+ "summary": "Delete time tracking",
1910
+ "parameters": [
1911
+ {
1912
+ "in": "path",
1913
+ "name": "id",
1914
+ "description": "ID of time tracking",
1915
+ "required": true,
1916
+ "type": "integer",
1917
+ "format": "int64"
1918
+ }
1919
+ ],
1920
+ "responses": {
1921
+ "204": {
1922
+ "description": "Successful operation"
1923
+ },
1924
+ "404": {
1925
+ "description": "Not found"
1926
+ }
1927
+ },
1928
+ "security": [
1929
+ {
1930
+ "basicAuth": []
1931
+ }
1932
+ ]
1933
+ }
1934
+ },
1935
+ "/text-templates": {
1936
+ "get": {
1937
+ "tags": [
1938
+ "text template"
1939
+ ],
1940
+ "summary": "Fetch text templates list",
1941
+ "parameters": [
1942
+ {
1943
+ "in": "query",
1944
+ "name": "page",
1945
+ "required": false,
1946
+ "type": "integer",
1947
+ "format": "int64"
1948
+ },
1949
+ {
1950
+ "in": "query",
1951
+ "name": "limit",
1952
+ "required": false,
1953
+ "type": "integer",
1954
+ "format": "int64"
1955
+ }
1956
+ ],
1957
+ "responses": {
1958
+ "200": {
1959
+ "description": "Successful operation",
1960
+ "schema": {
1961
+ "$ref": "#/definitions/TextTemplates"
1962
+ }
1963
+ }
1964
+ },
1965
+ "security": [
1966
+ {
1967
+ "basicAuth": []
1968
+ }
1969
+ ]
1970
+ },
1971
+ "post": {
1972
+ "tags": [
1973
+ "text template"
1974
+ ],
1975
+ "summary": "Create text template",
1976
+ "parameters": [
1977
+ {
1978
+ "in": "body",
1979
+ "name": "body",
1980
+ "required": true,
1981
+ "schema": {
1982
+ "$ref": "#/definitions/TextTemplate"
1983
+ }
1984
+ }
1985
+ ],
1986
+ "responses": {
1987
+ "201": {
1988
+ "description": "Successful operation",
1989
+ "schema": {
1990
+ "$ref": "#/definitions/TextTemplate"
1991
+ }
1992
+ }
1993
+ },
1994
+ "security": [
1995
+ {
1996
+ "basicAuth": []
1997
+ }
1998
+ ]
1999
+ }
2000
+ },
2001
+ "/text-templates/{id}": {
2002
+ "get": {
2003
+ "tags": [
2004
+ "text template"
2005
+ ],
2006
+ "summary": "Fetch text template",
2007
+ "parameters": [
2008
+ {
2009
+ "in": "path",
2010
+ "name": "id",
2011
+ "description": "ID of text template",
2012
+ "required": true,
2013
+ "type": "integer",
2014
+ "format": "int64"
2015
+ }
2016
+ ],
2017
+ "responses": {
2018
+ "200": {
2019
+ "description": "Successful operation",
2020
+ "schema": {
2021
+ "$ref": "#/definitions/TextTemplate"
2022
+ }
2023
+ },
2024
+ "404": {
2025
+ "description": "Not found"
2026
+ }
2027
+ },
2028
+ "security": [
2029
+ {
2030
+ "basicAuth": []
2031
+ }
2032
+ ]
2033
+ },
2034
+ "put": {
2035
+ "tags": [
2036
+ "text template"
2037
+ ],
2038
+ "summary": "Update text template",
2039
+ "parameters": [
2040
+ {
2041
+ "in": "path",
2042
+ "name": "id",
2043
+ "description": "ID of text template",
2044
+ "required": true,
2045
+ "type": "integer",
2046
+ "format": "int64"
2047
+ },
2048
+ {
2049
+ "in": "body",
2050
+ "name": "body",
2051
+ "required": true,
2052
+ "schema": {
2053
+ "$ref": "#/definitions/TextTemplate"
2054
+ }
2055
+ }
2056
+ ],
2057
+ "responses": {
2058
+ "200": {
2059
+ "description": "Successful operation",
2060
+ "schema": {
2061
+ "$ref": "#/definitions/TextTemplate"
2062
+ }
2063
+ },
2064
+ "400": {
2065
+ "description": "Invalid text template"
2066
+ }
2067
+ },
2068
+ "security": [
2069
+ {
2070
+ "basicAuth": []
2071
+ }
2072
+ ]
2073
+ },
2074
+ "delete": {
2075
+ "tags": [
2076
+ "text template"
2077
+ ],
2078
+ "summary": "Delete text template",
2079
+ "parameters": [
2080
+ {
2081
+ "in": "path",
2082
+ "name": "id",
2083
+ "description": "ID of text template",
2084
+ "required": true,
2085
+ "type": "integer",
2086
+ "format": "int64"
2087
+ }
2088
+ ],
2089
+ "responses": {
2090
+ "204": {
2091
+ "description": "Successful operation"
2092
+ },
2093
+ "404": {
2094
+ "description": "Not found"
2095
+ }
2096
+ },
2097
+ "security": [
2098
+ {
2099
+ "basicAuth": []
2100
+ }
2101
+ ]
2102
+ }
2103
+ },
2104
+ "/attachments": {
2105
+ "get": {
2106
+ "tags": [
2107
+ "attachment"
2108
+ ],
2109
+ "summary": "Fetch attachments list",
2110
+ "parameters": [
2111
+ {
2112
+ "in": "query",
2113
+ "name": "page",
2114
+ "required": false,
2115
+ "type": "integer",
2116
+ "format": "int64"
2117
+ },
2118
+ {
2119
+ "in": "query",
2120
+ "name": "limit",
2121
+ "required": false,
2122
+ "type": "integer",
2123
+ "format": "int64"
2124
+ }
2125
+ ],
2126
+ "responses": {
2127
+ "200": {
2128
+ "description": "Successful operation",
2129
+ "schema": {
2130
+ "$ref": "#/definitions/Attachments"
2131
+ }
2132
+ }
2133
+ },
2134
+ "security": [
2135
+ {
2136
+ "basicAuth": []
2137
+ }
2138
+ ]
2139
+ },
2140
+ "post": {
2141
+ "tags": [
2142
+ "attachment"
2143
+ ],
2144
+ "summary": "Create attachment",
2145
+ "consumes": [
2146
+ "multipart/form-data"
2147
+ ],
2148
+ "parameters": [
2149
+ {
2150
+ "in": "formData",
2151
+ "name": "file",
2152
+ "required": true,
2153
+ "type": "file"
2154
+ }
2155
+ ],
2156
+ "responses": {
2157
+ "200": {
2158
+ "description": "Successful operation",
2159
+ "schema": {
2160
+ "$ref": "#/definitions/Attachment"
2161
+ }
2162
+ }
2163
+ },
2164
+ "security": [
2165
+ {
2166
+ "basicAuth": []
2167
+ }
2168
+ ]
2169
+ }
2170
+ },
2171
+ "/attachments/{id}": {
2172
+ "get": {
2173
+ "tags": [
2174
+ "attachment"
2175
+ ],
2176
+ "summary": "Fetch attachment",
2177
+ "parameters": [
2178
+ {
2179
+ "in": "path",
2180
+ "name": "id",
2181
+ "description": "ID of attachment",
2182
+ "required": true,
2183
+ "type": "integer",
2184
+ "format": "int64"
2185
+ }
2186
+ ],
2187
+ "responses": {
2188
+ "200": {
2189
+ "description": "Successful operation",
2190
+ "schema": {
2191
+ "$ref": "#/definitions/Attachment"
2192
+ }
2193
+ },
2194
+ "404": {
2195
+ "description": "Not found"
2196
+ }
2197
+ },
2198
+ "security": [
2199
+ {
2200
+ "basicAuth": []
2201
+ }
2202
+ ]
2203
+ },
2204
+ "put": {
2205
+ "tags": [
2206
+ "attachment"
2207
+ ],
2208
+ "summary": "Update attachment",
2209
+ "parameters": [
2210
+ {
2211
+ "in": "path",
2212
+ "name": "id",
2213
+ "description": "ID of attachment",
2214
+ "required": true,
2215
+ "type": "integer",
2216
+ "format": "int64"
2217
+ },
2218
+ {
2219
+ "in": "body",
2220
+ "name": "body",
2221
+ "required": true,
2222
+ "schema": {
2223
+ "$ref": "#/definitions/Attachment"
2224
+ }
2225
+ }
2226
+ ],
2227
+ "responses": {
2228
+ "200": {
2229
+ "description": "Successful operation",
2230
+ "schema": {
2231
+ "$ref": "#/definitions/Attachment"
2232
+ }
2233
+ },
2234
+ "400": {
2235
+ "description": "Invalid attachment"
2236
+ }
2237
+ },
2238
+ "security": [
2239
+ {
2240
+ "basicAuth": []
2241
+ }
2242
+ ]
2243
+ },
2244
+ "delete": {
2245
+ "tags": [
2246
+ "attachment"
2247
+ ],
2248
+ "summary": "Delete attachment",
2249
+ "parameters": [
2250
+ {
2251
+ "in": "path",
2252
+ "name": "id",
2253
+ "description": "ID of attachment",
2254
+ "required": true,
2255
+ "type": "integer",
2256
+ "format": "int64"
2257
+ }
2258
+ ],
2259
+ "responses": {
2260
+ "204": {
2261
+ "description": "Successful operation"
2262
+ },
2263
+ "404": {
2264
+ "description": "Not found"
2265
+ }
2266
+ },
2267
+ "security": [
2268
+ {
2269
+ "basicAuth": []
2270
+ }
2271
+ ]
2272
+ }
2273
+ },
2274
+ "/attachments/{id}/content": {
2275
+ "get": {
2276
+ "tags": [
2277
+ "attachment"
2278
+ ],
2279
+ "summary": "Fetch attachment content",
2280
+ "parameters": [
2281
+ {
2282
+ "in": "path",
2283
+ "name": "id",
2284
+ "description": "ID of attachment",
2285
+ "required": true,
2286
+ "type": "integer",
2287
+ "format": "int64"
2288
+ }
2289
+ ],
2290
+ "responses": {
2291
+ "200": {
2292
+ "description": "Successful operation",
2293
+ "schema": {
2294
+ "type": "string",
2295
+ "format": "binary"
2296
+ }
2297
+ },
2298
+ "404": {
2299
+ "description": "Not found"
2300
+ }
2301
+ },
2302
+ "security": [
2303
+ {
2304
+ "basicAuth": []
2305
+ }
2306
+ ]
2307
+ }
2308
+ },
2309
+ "/document-payments": {
2310
+ "get": {
2311
+ "tags": [
2312
+ "document payment"
2313
+ ],
2314
+ "summary": "Fetch document payments list",
2315
+ "parameters": [
2316
+ {
2317
+ "in": "query",
2318
+ "name": "page",
2319
+ "required": false,
2320
+ "type": "integer",
2321
+ "format": "int64"
2322
+ },
2323
+ {
2324
+ "in": "query",
2325
+ "name": "limit",
2326
+ "required": false,
2327
+ "type": "integer",
2328
+ "format": "int64"
2329
+ },
2330
+ {
2331
+ "in": "query",
2332
+ "name": "document_id",
2333
+ "required": false,
2334
+ "type": "integer",
2335
+ "format": "int64"
2336
+ }
2337
+ ],
2338
+ "responses": {
2339
+ "200": {
2340
+ "description": "Successful operation",
2341
+ "schema": {
2342
+ "$ref": "#/definitions/DocumentPayments"
2343
+ }
2344
+ }
2345
+ },
2346
+ "security": [
2347
+ {
2348
+ "basicAuth": []
2349
+ }
2350
+ ]
2351
+ },
2352
+ "post": {
2353
+ "tags": [
2354
+ "document payment"
2355
+ ],
2356
+ "summary": "Create document payment",
2357
+ "parameters": [
2358
+ {
2359
+ "in": "body",
2360
+ "name": "body",
2361
+ "required": true,
2362
+ "schema": {
2363
+ "$ref": "#/definitions/DocumentPayment"
2364
+ }
2365
+ }
2366
+ ],
2367
+ "responses": {
2368
+ "201": {
2369
+ "description": "Successful operation",
2370
+ "schema": {
2371
+ "$ref": "#/definitions/DocumentPayment"
2372
+ }
2373
+ }
2374
+ },
2375
+ "security": [
2376
+ {
2377
+ "basicAuth": []
2378
+ }
2379
+ ]
2380
+ }
2381
+ },
2382
+ "/document-payments/{id}": {
2383
+ "get": {
2384
+ "tags": [
2385
+ "document payment"
2386
+ ],
2387
+ "summary": "Fetch document payment",
2388
+ "parameters": [
2389
+ {
2390
+ "in": "path",
2391
+ "name": "id",
2392
+ "description": "ID of document payment",
2393
+ "required": true,
2394
+ "type": "integer",
2395
+ "format": "int64"
2396
+ }
2397
+ ],
2398
+ "responses": {
2399
+ "200": {
2400
+ "description": "Successful operation",
2401
+ "schema": {
2402
+ "$ref": "#/definitions/DocumentPayment"
2403
+ }
2404
+ },
2405
+ "404": {
2406
+ "description": "Not found"
2407
+ }
2408
+ },
2409
+ "security": [
2410
+ {
2411
+ "basicAuth": []
2412
+ }
2413
+ ]
2414
+ },
2415
+ "delete": {
2416
+ "tags": [
2417
+ "document payment"
2418
+ ],
2419
+ "summary": "Delete document payment",
2420
+ "parameters": [
2421
+ {
2422
+ "in": "path",
2423
+ "name": "id",
2424
+ "description": "ID of document payment",
2425
+ "required": true,
2426
+ "type": "integer",
2427
+ "format": "int64"
2428
+ }
2429
+ ],
2430
+ "responses": {
2431
+ "204": {
2432
+ "description": "Successful operation"
2433
+ },
2434
+ "404": {
2435
+ "description": "Not found"
2436
+ }
2437
+
2438
+ },
2439
+ "security": [
2440
+ {
2441
+ "basicAuth": []
2442
+ }
2443
+ ]
2444
+ }
2445
+ },
2446
+ "/post-boxes": {
2447
+ "get": {
2448
+ "tags": [
2449
+ "post box"
2450
+ ],
2451
+ "summary": "Fetch post box list",
2452
+ "parameters": [
2453
+ {
2454
+ "in": "query",
2455
+ "name": "type",
2456
+ "description": "Filter post boxes by type. Multiple typs seperate with , like type=EMAIL,FAX.",
2457
+ "required": false,
2458
+ "type": "string",
2459
+ "enum": [
2460
+ "EMAIL",
2461
+ "FAX",
2462
+ "POST"
2463
+ ]
2464
+ },
2465
+ {
2466
+ "in": "query",
2467
+ "name": "status",
2468
+ "description": "Filter post boxes by status.",
2469
+ "required": false,
2470
+ "type": "string",
2471
+ "enum": [
2472
+ "WAITING",
2473
+ "PREPARE",
2474
+ "ERROR",
2475
+ "OK",
2476
+ "PROCESSING"
2477
+ ]
2478
+ },
2479
+ {
2480
+ "in": "query",
2481
+ "name": "document_id",
2482
+ "description": "Filter post boxes by document_id. You can add multiple document ids separate by comma like id,id,id.",
2483
+ "required": false,
2484
+ "type": "string"
2485
+ }
2486
+ ],
2487
+ "responses": {
2488
+ "200": {
2489
+ "description": "Successful operation",
2490
+ "schema": {
2491
+ "$ref": "#/definitions/PostBoxes"
2492
+ }
2493
+ }
2494
+ },
2495
+ "security": [
2496
+ {
2497
+ "basicAuth": []
2498
+ }
2499
+ ]
2500
+ }
2501
+ },
2502
+ "/post-boxes/{id}": {
2503
+ "get": {
2504
+ "tags": [
2505
+ "post box"
2506
+ ],
2507
+ "summary": "Fetch post box",
2508
+ "parameters": [
2509
+ {
2510
+ "in": "path",
2511
+ "name": "id",
2512
+ "description": "ID of post box",
2513
+ "required": true,
2514
+ "type": "integer",
2515
+ "format": "int64"
2516
+ }
2517
+ ],
2518
+ "responses": {
2519
+ "200": {
2520
+ "description": "Successful operation",
2521
+ "schema": {
2522
+ "$ref": "#/definitions/PostBox"
2523
+ }
2524
+ },
2525
+ "404": {
2526
+ "description": "Not found"
2527
+ }
2528
+ }
2529
+ },
2530
+ "delete": {
2531
+ "tags": [
2532
+ "post box"
2533
+ ],
2534
+ "summary": "Delete post box",
2535
+ "parameters": [
2536
+ {
2537
+ "in": "path",
2538
+ "name": "id",
2539
+ "description": "ID of post box",
2540
+ "required": true,
2541
+ "type": "integer",
2542
+ "format": "int64"
2543
+ }
2544
+ ],
2545
+ "responses": {
2546
+ "204": {
2547
+ "description": "Successful operation"
2548
+ },
2549
+ "404": {
2550
+ "description": "Not found"
2551
+ }
2552
+ }
2553
+ }
2554
+ }
2555
+ },
2556
+ "definitions": {
2557
+ "List": {
2558
+ "type": "object",
2559
+ "required": [
2560
+ "page",
2561
+ "pages",
2562
+ "limit",
2563
+ "total"
2564
+ ],
2565
+ "properties": {
2566
+ "page": {
2567
+ "type": "integer",
2568
+ "description": "The current page",
2569
+ "example": 1
2570
+ },
2571
+ "pages": {
2572
+ "type": "integer",
2573
+ "description": "Max possible pages",
2574
+ "example": 1
2575
+ },
2576
+ "limit": {
2577
+ "type": "integer",
2578
+ "description": "Items limitation. Max 1000",
2579
+ "example": 100
2580
+ },
2581
+ "total": {
2582
+ "type": "integer",
2583
+ "description": "Total Items",
2584
+ "example": 20
2585
+ }
2586
+ }
2587
+ },
2588
+ "Customer": {
2589
+ "type": "object",
2590
+ "required": [
2591
+ "last_name",
2592
+ "company_name"
2593
+ ],
2594
+ "properties": {
2595
+ "acquire_options": {
2596
+ "type": "string",
2597
+ "description": "1: Empfehlung eines anderen Kunden, 2: Zeitungsanzeige, 3: ...",
2598
+ "enum": [
2599
+ "1",
2600
+ "2",
2601
+ "3",
2602
+ "4",
2603
+ "5",
2604
+ "6",
2605
+ "7",
2606
+ "8"
2607
+ ],
2608
+ "x-nullable": true
2609
+ },
2610
+ "bank_account": {
2611
+ "type": "string"
2612
+ },
2613
+ "bank_account_owner": {
2614
+ "type": "string"
2615
+ },
2616
+ "bank_bic": {
2617
+ "type": "string"
2618
+ },
2619
+ "bank_code": {
2620
+ "type": "string"
2621
+ },
2622
+ "bank_iban": {
2623
+ "type": "string"
2624
+ },
2625
+ "bank_name": {
2626
+ "type": "string"
2627
+ },
2628
+ "birth_date": {
2629
+ "type": "string",
2630
+ "format": "date"
2631
+ },
2632
+ "cash_allowance": {
2633
+ "type": "string"
2634
+ },
2635
+ "cash_allowance_days": {
2636
+ "type": "string"
2637
+ },
2638
+ "cash_discount": {
2639
+ "type": "string"
2640
+ },
2641
+ "cash_discount_type": {
2642
+ "type": "string"
2643
+ },
2644
+ "city": {
2645
+ "type": "string"
2646
+ },
2647
+ "company_name": {
2648
+ "type": "string",
2649
+ "example": "easybill GmbH"
2650
+ },
2651
+ "country": {
2652
+ "type": "string"
2653
+ },
2654
+ "delivery_city": {
2655
+ "type": "string"
2656
+ },
2657
+ "delivery_company_name": {
2658
+ "type": "string"
2659
+ },
2660
+ "delivery_country": {
2661
+ "type": "string"
2662
+ },
2663
+ "delivery_first_name": {
2664
+ "type": "string"
2665
+ },
2666
+ "delivery_last_name": {
2667
+ "type": "string"
2668
+ },
2669
+ "delivery_personal": {
2670
+ "type": "string"
2671
+ },
2672
+ "delivery_salutation": {
2673
+ "type": "string"
2674
+ },
2675
+ "delivery_street": {
2676
+ "type": "string"
2677
+ },
2678
+ "delivery_suffix_1": {
2679
+ "type": "string"
2680
+ },
2681
+ "delivery_suffix_2": {
2682
+ "type": "string"
2683
+ },
2684
+ "delivery_zip_code": {
2685
+ "type": "string"
2686
+ },
2687
+ "emails": {
2688
+ "type": "array",
2689
+ "items": {
2690
+ "type": "string",
2691
+ "maxItems": 3,
2692
+ "uniqueItems": true
2693
+ }
2694
+ },
2695
+ "fax": {
2696
+ "type": "string"
2697
+ },
2698
+ "first_name": {
2699
+ "type": "string"
2700
+ },
2701
+ "grace_period": {
2702
+ "type": "string"
2703
+ },
2704
+ "group_id": {
2705
+ "type": "string"
2706
+ },
2707
+ "id": {
2708
+ "type": "integer",
2709
+ "format": "int64"
2710
+ },
2711
+ "info_1": {
2712
+ "type": "string"
2713
+ },
2714
+ "info_2": {
2715
+ "type": "string"
2716
+ },
2717
+ "internet": {
2718
+ "type": "string"
2719
+ },
2720
+ "last_name": {
2721
+ "type": "string",
2722
+ "example": "Mustermann"
2723
+ },
2724
+ "mobile": {
2725
+ "type": "string"
2726
+ },
2727
+ "note": {
2728
+ "type": "string"
2729
+ },
2730
+ "number": {
2731
+ "type": "string"
2732
+ },
2733
+ "payment_options": {
2734
+ "type": "string"
2735
+ },
2736
+ "personal": {
2737
+ "type": "boolean"
2738
+ },
2739
+ "phone_1": {
2740
+ "type": "string"
2741
+ },
2742
+ "phone_2": {
2743
+ "type": "string"
2744
+ },
2745
+ "postbox": {
2746
+ "type": "string"
2747
+ },
2748
+ "postbox_city": {
2749
+ "type": "string"
2750
+ },
2751
+ "postbox_country": {
2752
+ "type": "string"
2753
+ },
2754
+ "postbox_zip_code": {
2755
+ "type": "string"
2756
+ },
2757
+ "sale_price_level": {
2758
+ "type": "string"
2759
+ },
2760
+ "salutation": {
2761
+ "type": "string"
2762
+ },
2763
+ "sepa_agreement": {
2764
+ "type": "string",
2765
+ "enum": [
2766
+ "BASIC",
2767
+ "COR1",
2768
+ "COMPANY"
2769
+ ],
2770
+ "description": "BASIC = SEPA-Basislastschrift, COR1 = SEPA-Basislastschrift COR1, COMPANY = SEPA-Firmenlastschrift, NULL = Noch kein Mandat erteilt",
2771
+ "example": "COR1"
2772
+ },
2773
+ "sepa_agreement_date": {
2774
+ "type": "string",
2775
+ "format": "date"
2776
+ },
2777
+ "sepa_mandate_reference": {
2778
+ "type": "string"
2779
+ },
2780
+ "since_date": {
2781
+ "type": "string",
2782
+ "format": "date"
2783
+ },
2784
+ "street": {
2785
+ "type": "string"
2786
+ },
2787
+ "suffix_1": {
2788
+ "type": "string"
2789
+ },
2790
+ "suffix_2": {
2791
+ "type": "string"
2792
+ },
2793
+ "tax_number": {
2794
+ "type": "string"
2795
+ },
2796
+ "tax_options": {
2797
+ "type": "string"
2798
+ },
2799
+ "title": {
2800
+ "type": "string"
2801
+ },
2802
+ "vat_identifier": {
2803
+ "type": "string"
2804
+ },
2805
+ "zip_code": {
2806
+ "type": "string"
2807
+ }
2808
+ }
2809
+ },
2810
+ "Customers": {
2811
+ "type": "object",
2812
+ "allOf": [
2813
+ {
2814
+ "$ref": "#/definitions/List"
2815
+ },
2816
+ {
2817
+ "properties": {
2818
+ "items": {
2819
+ "type": "array",
2820
+ "items": {
2821
+ "$ref": "#/definitions/Customer"
2822
+ }
2823
+ }
2824
+ }
2825
+ }
2826
+ ]
2827
+ },
2828
+ "Contact": {
2829
+ "type": "object",
2830
+ "properties": {
2831
+ "city": {
2832
+ "type": "string"
2833
+ },
2834
+ "country": {
2835
+ "type": "string"
2836
+ },
2837
+ "emails": {
2838
+ "type": "array",
2839
+ "items": {
2840
+ "type": "string",
2841
+ "maxItems": 3,
2842
+ "uniqueItems": true
2843
+ }
2844
+ },
2845
+ "fax": {
2846
+ "type": "string"
2847
+ },
2848
+ "first_name": {
2849
+ "type": "string"
2850
+ },
2851
+ "id": {
2852
+ "type": "integer",
2853
+ "format": "int64"
2854
+ },
2855
+ "last_name": {
2856
+ "type": "string"
2857
+ },
2858
+ "mobile": {
2859
+ "type": "string"
2860
+ },
2861
+ "note": {
2862
+ "type": "string"
2863
+ },
2864
+ "personal": {
2865
+ "type": "string"
2866
+ },
2867
+ "phone_1": {
2868
+ "type": "string"
2869
+ },
2870
+ "phone_2": {
2871
+ "type": "string"
2872
+ },
2873
+ "salutation": {
2874
+ "type": "string"
2875
+ },
2876
+ "street": {
2877
+ "type": "string"
2878
+ },
2879
+ "suffix_1": {
2880
+ "type": "string"
2881
+ },
2882
+ "suffix_2": {
2883
+ "type": "string"
2884
+ },
2885
+ "title": {
2886
+ "type": "string"
2887
+ },
2888
+ "zip_code": {
2889
+ "type": "string"
2890
+ }
2891
+ }
2892
+ },
2893
+ "Contacts": {
2894
+ "type": "object",
2895
+ "allOf": [
2896
+ {
2897
+ "$ref": "#/definitions/List"
2898
+ },
2899
+ {
2900
+ "properties": {
2901
+ "items": {
2902
+ "type": "array",
2903
+ "items": {
2904
+ "$ref": "#/definitions/Contact"
2905
+ }
2906
+ }
2907
+ }
2908
+ }
2909
+ ]
2910
+ },
2911
+ "DocumentPosition": {
2912
+ "type": "object",
2913
+ "properties": {
2914
+ "number": {
2915
+ "type": "string"
2916
+ },
2917
+ "description": {
2918
+ "type": "string"
2919
+ },
2920
+ "quantity": {
2921
+ "type": "number",
2922
+ "format": "float"
2923
+ },
2924
+ "unit": {
2925
+ "type": "string"
2926
+ },
2927
+ "type": {
2928
+ "type": "string"
2929
+ },
2930
+ "position": {
2931
+ "type": "integer"
2932
+ },
2933
+ "single_price_net": {
2934
+ "type": "number",
2935
+ "format": "float"
2936
+ },
2937
+ "single_price_gross": {
2938
+ "type": "number",
2939
+ "format": "float"
2940
+ },
2941
+ "vat_percent": {
2942
+ "type": "number",
2943
+ "format": "float"
2944
+ },
2945
+ "discount": {
2946
+ "type": "number",
2947
+ "format": "float"
2948
+ },
2949
+ "discount_type": {
2950
+ "type": "string"
2951
+ },
2952
+ "position_id": {
2953
+ "type": "integer",
2954
+ "format": "int64"
2955
+ },
2956
+ "total_price_net": {
2957
+ "type": "number",
2958
+ "format": "float"
2959
+ },
2960
+ "total_price_gross": {
2961
+ "type": "number",
2962
+ "format": "float"
2963
+ },
2964
+ "total_vat": {
2965
+ "type": "number",
2966
+ "format": "float"
2967
+ },
2968
+ "serial_number_id": {
2969
+ "type": "string"
2970
+ },
2971
+ "serial_number": {
2972
+ "type": "string"
2973
+ },
2974
+ "booking_account": {
2975
+ "type": "string"
2976
+ },
2977
+ "export_cost_1": {
2978
+ "type": "string"
2979
+ },
2980
+ "export_cost_2": {
2981
+ "type": "string"
2982
+ },
2983
+ "cost_price_net": {
2984
+ "type": "number",
2985
+ "format": "float"
2986
+ },
2987
+ "cost_price_total": {
2988
+ "type": "number",
2989
+ "format": "float"
2990
+ },
2991
+ "cost_price_charge": {
2992
+ "type": "number",
2993
+ "format": "float"
2994
+ },
2995
+ "cost_price_charge_type": {
2996
+ "type": "string"
2997
+ },
2998
+ "id": {
2999
+ "type": "integer",
3000
+ "format": "int64"
3001
+ }
3002
+ }
3003
+ },
3004
+ "DocumentAddress": {
3005
+ "type": "object",
3006
+ "properties": {
3007
+ "salutation": {
3008
+ "type": "string"
3009
+ },
3010
+ "personal": {
3011
+ "type": "string"
3012
+ },
3013
+ "title": {
3014
+ "type": "string"
3015
+ },
3016
+ "first_name": {
3017
+ "type": "string"
3018
+ },
3019
+ "last_name": {
3020
+ "type": "string"
3021
+ },
3022
+ "suffix1": {
3023
+ "type": "string"
3024
+ },
3025
+ "suffix2": {
3026
+ "type": "string"
3027
+ },
3028
+ "company_name": {
3029
+ "type": "string"
3030
+ },
3031
+ "street": {
3032
+ "type": "string"
3033
+ },
3034
+ "zip_code": {
3035
+ "type": "string"
3036
+ },
3037
+ "city": {
3038
+ "type": "string"
3039
+ },
3040
+ "country": {
3041
+ "type": "string"
3042
+ }
3043
+ }
3044
+ },
3045
+ "DocumentRecurring": {
3046
+ "type": "object",
3047
+ "properties": {
3048
+ "next_date": {
3049
+ "type": "string",
3050
+ "format": "date"
3051
+ },
3052
+ "frequency": {
3053
+ "type": "string"
3054
+ },
3055
+ "frequency_special": {
3056
+ "type": "string",
3057
+ "enum": [
3058
+ "LASTDAYOFMONTH"
3059
+ ]
3060
+ },
3061
+ "interval": {
3062
+ "type": "integer"
3063
+ },
3064
+ "end_date_or_count": {
3065
+ "type": "string",
3066
+ "description": "Date of last exectution day or number of times to exectute"
3067
+ },
3068
+ "status": {
3069
+ "type": "string",
3070
+ "enum": [
3071
+ "RUNNING",
3072
+ "PAUSE",
3073
+ "STOP",
3074
+ "WAITING"
3075
+ ]
3076
+ },
3077
+ "as_draft": {
3078
+ "type": "boolean"
3079
+ },
3080
+ "is_notify": {
3081
+ "type": "boolean"
3082
+ },
3083
+ "send_as": {
3084
+ "type": "string",
3085
+ "enum": [
3086
+ "EMAIL",
3087
+ "FAX",
3088
+ "POST"
3089
+ ]
3090
+ },
3091
+ "is_sign": {
3092
+ "type": "boolean"
3093
+ },
3094
+ "is_paid": {
3095
+ "type": "boolean"
3096
+ },
3097
+ "is_sepa": {
3098
+ "type": "boolean"
3099
+ },
3100
+ "sepa_local_instrument": {
3101
+ "type": "string",
3102
+ "enum": [
3103
+ "FRST",
3104
+ "OOFF",
3105
+ "FNAL",
3106
+ "RCUR"
3107
+ ]
3108
+ },
3109
+ "sepa_sequence_type": {
3110
+ "type": "string",
3111
+ "enum": [
3112
+ "CORE",
3113
+ "COR1",
3114
+ "B2B"
3115
+ ]
3116
+ },
3117
+ "sepa_reference": {
3118
+ "type": "string"
3119
+ },
3120
+ "sepa_remittance_information": {
3121
+ "type": "string"
3122
+ }
3123
+ }
3124
+ },
3125
+ "ServiceDate": {
3126
+ "type": "object",
3127
+ "description": "Type DEFAULT print the message: 'Invoice date coincides with the time of supply'. The other like: 'type: date or period or text'",
3128
+ "properties": {
3129
+ "type": {
3130
+ "type": "string",
3131
+ "enum": [
3132
+ "DEFAULT",
3133
+ "SERVICE",
3134
+ "DELIVERY"
3135
+ ]
3136
+ },
3137
+ "date": {
3138
+ "type": "string",
3139
+ "format": "date"
3140
+ },
3141
+ "date_from": {
3142
+ "type": "string",
3143
+ "format": "date"
3144
+ },
3145
+ "date_to": {
3146
+ "type": "string",
3147
+ "format": "date"
3148
+ },
3149
+ "text": {
3150
+ "type": "string"
3151
+ }
3152
+ }
3153
+ },
3154
+ "Document": {
3155
+ "type": "object",
3156
+ "properties": {
3157
+ "address": {
3158
+ "readOnly": true,
3159
+ "$ref": "#/definitions/DocumentAddress"
3160
+ },
3161
+ "label_address": {
3162
+ "readOnly": true,
3163
+ "$ref": "#/definitions/DocumentAddress"
3164
+ },
3165
+ "amount": {
3166
+ "type": "string"
3167
+ },
3168
+ "amount_net": {
3169
+ "type": "string"
3170
+ },
3171
+ "bank_debit_form": {
3172
+ "type": "string"
3173
+ },
3174
+ "cash_allowance": {
3175
+ "type": "string"
3176
+ },
3177
+ "cash_allowance_days": {
3178
+ "type": "string"
3179
+ },
3180
+ "cash_allowance_text": {
3181
+ "type": "string"
3182
+ },
3183
+ "contact_id": {
3184
+ "type": "integer",
3185
+ "format": "int64"
3186
+ },
3187
+ "contact_label": {
3188
+ "type": "string"
3189
+ },
3190
+ "contact_text": {
3191
+ "type": "string"
3192
+ },
3193
+ "created_at": {
3194
+ "type": "string",
3195
+ "format": "date-time"
3196
+ },
3197
+ "currency": {
3198
+ "type": "string"
3199
+ },
3200
+ "customer_id": {
3201
+ "type": "integer",
3202
+ "format": "int64"
3203
+ },
3204
+ "discount": {
3205
+ "type": "string"
3206
+ },
3207
+ "discount_type": {
3208
+ "type": "string"
3209
+ },
3210
+ "document_date": {
3211
+ "type": "string",
3212
+ "format": "date"
3213
+ },
3214
+ "due_date": {
3215
+ "type": "string",
3216
+ "format": "date"
3217
+ },
3218
+ "edited_at": {
3219
+ "type": "string"
3220
+ },
3221
+ "grace_period": {
3222
+ "type": "string"
3223
+ },
3224
+ "id": {
3225
+ "type": "integer",
3226
+ "format": "int64"
3227
+ },
3228
+ "is_archive": {
3229
+ "type": "boolean"
3230
+ },
3231
+ "is_draft": {
3232
+ "type": "boolean"
3233
+ },
3234
+ "items": {
3235
+ "type": "array",
3236
+ "items": {
3237
+ "$ref": "#/definitions/DocumentPosition"
3238
+ }
3239
+ },
3240
+ "number": {
3241
+ "type": "string"
3242
+ },
3243
+ "paid_amount": {
3244
+ "type": "string"
3245
+ },
3246
+ "paid_at": {
3247
+ "type": "string",
3248
+ "format": "date"
3249
+ },
3250
+ "pdf_pages": {
3251
+ "type": "integer"
3252
+ },
3253
+ "pdf_template": {
3254
+ "type": "string"
3255
+ },
3256
+ "project_id": {
3257
+ "type": "string"
3258
+ },
3259
+ "recurring_options": {
3260
+ "type": "object",
3261
+ "$ref": "#/definitions/DocumentRecurring",
3262
+ "description": "This object is only available in document type RECURRING"
3263
+ },
3264
+ "ref_id": {
3265
+ "type": "integer",
3266
+ "format": "int64",
3267
+ "description": "Reference document id"
3268
+ },
3269
+ "service_date": {
3270
+ "type": "object",
3271
+ "$ref": "#/definitions/ServiceDate",
3272
+ "description": "This object is only available in document type INVOICE or CREDIT"
3273
+ },
3274
+ "status": {
3275
+ "type": "string"
3276
+ },
3277
+ "text": {
3278
+ "type": "string"
3279
+ },
3280
+ "text_prefix": {
3281
+ "type": "string"
3282
+ },
3283
+ "title": {
3284
+ "type": "string"
3285
+ },
3286
+ "type": {
3287
+ "type": "string",
3288
+ "enum": [
3289
+ "INVOICE",
3290
+ "RECURRING",
3291
+ "CREDIT",
3292
+ "OFFER",
3293
+ "REMINDER",
3294
+ "DUNNING",
3295
+ "STORNO",
3296
+ "DELIVERY",
3297
+ "CHARGE",
3298
+ "CHARGE_CONFIRM",
3299
+ "LETTER",
3300
+ "ORDER"
3301
+ ]
3302
+ },
3303
+ "vat_option": {
3304
+ "type": "string"
3305
+ }
3306
+ }
3307
+ },
3308
+ "Documents": {
3309
+ "type": "object",
3310
+ "allOf": [
3311
+ {
3312
+ "$ref": "#/definitions/List"
3313
+ },
3314
+ {
3315
+ "properties": {
3316
+ "items": {
3317
+ "type": "array",
3318
+ "items": {
3319
+ "$ref": "#/definitions/Document"
3320
+ }
3321
+ }
3322
+ }
3323
+ }
3324
+ ]
3325
+ },
3326
+ "CustomerGroup": {
3327
+ "type": "object",
3328
+ "properties": {
3329
+ "description": {
3330
+ "type": "string"
3331
+ },
3332
+ "name": {
3333
+ "type": "string"
3334
+ },
3335
+ "number": {
3336
+ "type": "string"
3337
+ },
3338
+ "id": {
3339
+ "type": "integer",
3340
+ "format": "int64"
3341
+ }
3342
+ }
3343
+ },
3344
+ "CustomerGroups": {
3345
+ "type": "object",
3346
+ "allOf": [
3347
+ {
3348
+ "$ref": "#/definitions/List"
3349
+ },
3350
+ {
3351
+ "properties": {
3352
+ "items": {
3353
+ "type": "array",
3354
+ "items": {
3355
+ "$ref": "#/definitions/CustomerGroup"
3356
+ }
3357
+ }
3358
+ }
3359
+ }
3360
+ ]
3361
+ },
3362
+ "Task": {
3363
+ "type": "object",
3364
+ "properties": {
3365
+ "category": {
3366
+ "type": "string"
3367
+ },
3368
+ "category_custom": {
3369
+ "type": "string"
3370
+ },
3371
+ "created_at": {
3372
+ "type": "string"
3373
+ },
3374
+ "customer_id": {
3375
+ "type": "integer",
3376
+ "format": "int64"
3377
+ },
3378
+ "description": {
3379
+ "type": "string"
3380
+ },
3381
+ "document_id": {
3382
+ "type": "integer",
3383
+ "format": "int64"
3384
+ },
3385
+ "end_at": {
3386
+ "type": "string"
3387
+ },
3388
+ "finish_at": {
3389
+ "type": "string"
3390
+ },
3391
+ "id": {
3392
+ "type": "integer",
3393
+ "format": "int64"
3394
+ },
3395
+ "name": {
3396
+ "type": "string"
3397
+ },
3398
+ "position_id": {
3399
+ "type": "integer",
3400
+ "format": "int64"
3401
+ },
3402
+ "priority": {
3403
+ "type": "string"
3404
+ },
3405
+ "project_id": {
3406
+ "type": "integer",
3407
+ "format": "int64"
3408
+ },
3409
+ "start_at": {
3410
+ "type": "string"
3411
+ },
3412
+ "status": {
3413
+ "type": "string"
3414
+ },
3415
+ "status_percent": {
3416
+ "type": "string"
3417
+ }
3418
+ }
3419
+ },
3420
+ "Tasks": {
3421
+ "type": "object",
3422
+ "allOf": [
3423
+ {
3424
+ "$ref": "#/definitions/List"
3425
+ },
3426
+ {
3427
+ "properties": {
3428
+ "items": {
3429
+ "type": "array",
3430
+ "items": {
3431
+ "$ref": "#/definitions/Task"
3432
+ }
3433
+ }
3434
+ }
3435
+ }
3436
+ ]
3437
+ },
3438
+ "Project": {
3439
+ "type": "object",
3440
+ "properties": {
3441
+ "budget_amount": {
3442
+ "type": "string"
3443
+ },
3444
+ "budget_time": {
3445
+ "type": "string"
3446
+ },
3447
+ "customer_id": {
3448
+ "type": "integer",
3449
+ "format": "int64"
3450
+ },
3451
+ "hourly_rate": {
3452
+ "type": "string"
3453
+ },
3454
+ "id": {
3455
+ "type": "integer",
3456
+ "format": "int64"
3457
+ },
3458
+ "name": {
3459
+ "type": "string"
3460
+ },
3461
+ "note": {
3462
+ "type": "string"
3463
+ },
3464
+ "status": {
3465
+ "type": "string"
3466
+ }
3467
+ }
3468
+ },
3469
+ "Projects": {
3470
+ "type": "object",
3471
+ "allOf": [
3472
+ {
3473
+ "$ref": "#/definitions/List"
3474
+ },
3475
+ {
3476
+ "properties": {
3477
+ "items": {
3478
+ "type": "array",
3479
+ "items": {
3480
+ "$ref": "#/definitions/Project"
3481
+ }
3482
+ }
3483
+ }
3484
+ }
3485
+ ]
3486
+ },
3487
+ "Position": {
3488
+ "type": "object",
3489
+ "properties": {
3490
+ "id": {
3491
+ "type": "integer",
3492
+ "format": "int64"
3493
+ },
3494
+ "type": {
3495
+ "type": "string",
3496
+ "enum": [
3497
+ "TEXT",
3498
+ "PRODUCT",
3499
+ "SERVICE"
3500
+ ]
3501
+ },
3502
+ "title": {
3503
+ "description": "Only by TEXT",
3504
+ "type": "string"
3505
+ },
3506
+ "number": {
3507
+ "description": "Only by SERVICE and PRODUCT",
3508
+ "type": "string"
3509
+ },
3510
+ "description": {
3511
+ "type": "string"
3512
+ },
3513
+ "note": {
3514
+ "type": "string"
3515
+ },
3516
+ "unit": {
3517
+ "type": "string"
3518
+ },
3519
+ "export_identifier": {
3520
+ "type": "string"
3521
+ },
3522
+ "price_type": {
3523
+ "type": "string"
3524
+ },
3525
+ "vat_percent": {
3526
+ "type": "number",
3527
+ "format": "float"
3528
+ },
3529
+ "sale_price": {
3530
+ "type": "number",
3531
+ "format": "float"
3532
+ },
3533
+ "sale_price2": {
3534
+ "type": "number",
3535
+ "format": "float"
3536
+ },
3537
+ "sale_price3": {
3538
+ "type": "number",
3539
+ "format": "float"
3540
+ },
3541
+ "sale_price4": {
3542
+ "type": "number",
3543
+ "format": "float"
3544
+ },
3545
+ "sale_price5": {
3546
+ "type": "number",
3547
+ "format": "float"
3548
+ },
3549
+ "sale_price6": {
3550
+ "type": "number",
3551
+ "format": "float"
3552
+ },
3553
+ "sale_price7": {
3554
+ "type": "number",
3555
+ "format": "float"
3556
+ },
3557
+ "sale_price8": {
3558
+ "type": "number",
3559
+ "format": "float"
3560
+ },
3561
+ "sale_price9": {
3562
+ "type": "number",
3563
+ "format": "float"
3564
+ },
3565
+ "sale_price10": {
3566
+ "type": "number",
3567
+ "format": "float"
3568
+ },
3569
+ "export_cost1": {
3570
+ "type": "string"
3571
+ },
3572
+ "export_cost2": {
3573
+ "type": "string"
3574
+ },
3575
+ "group_id": {
3576
+ "type": "integer",
3577
+ "format": "int64"
3578
+ },
3579
+ "stock": {
3580
+ "type": "string"
3581
+ },
3582
+ "stock_count": {
3583
+ "type": "string"
3584
+ },
3585
+ "stock_limit_notify": {
3586
+ "type": "string"
3587
+ },
3588
+ "stock_limit": {
3589
+ "type": "string"
3590
+ }
3591
+ }
3592
+ },
3593
+ "Positions": {
3594
+ "type": "object",
3595
+ "allOf": [
3596
+ {
3597
+ "$ref": "#/definitions/List"
3598
+ },
3599
+ {
3600
+ "properties": {
3601
+ "items": {
3602
+ "type": "array",
3603
+ "items": {
3604
+ "$ref": "#/definitions/Position"
3605
+ }
3606
+ }
3607
+ }
3608
+ }
3609
+ ]
3610
+ },
3611
+ "PositionGroup": {
3612
+ "type": "object",
3613
+ "properties": {
3614
+ "description": {
3615
+ "type": "string"
3616
+ },
3617
+ "name": {
3618
+ "type": "string"
3619
+ },
3620
+ "number": {
3621
+ "type": "string"
3622
+ },
3623
+ "id": {
3624
+ "type": "integer",
3625
+ "format": "int64"
3626
+ }
3627
+ }
3628
+ },
3629
+ "PositionGroups": {
3630
+ "type": "object",
3631
+ "allOf": [
3632
+ {
3633
+ "$ref": "#/definitions/List"
3634
+ },
3635
+ {
3636
+ "properties": {
3637
+ "items": {
3638
+ "type": "array",
3639
+ "items": {
3640
+ "$ref": "#/definitions/PositionGroup"
3641
+ }
3642
+ }
3643
+ }
3644
+ }
3645
+ ]
3646
+ },
3647
+ "TimeTracking": {
3648
+ "type": "object",
3649
+ "properties": {
3650
+ "cleared_at": {
3651
+ "type": "string"
3652
+ },
3653
+ "count": {
3654
+ "type": "string"
3655
+ },
3656
+ "date": {
3657
+ "type": "string"
3658
+ },
3659
+ "date_from_at": {
3660
+ "type": "string"
3661
+ },
3662
+ "date_thru_at": {
3663
+ "type": "string"
3664
+ },
3665
+ "description": {
3666
+ "type": "string"
3667
+ },
3668
+ "hourly_rate": {
3669
+ "type": "string"
3670
+ },
3671
+ "id": {
3672
+ "type": "integer",
3673
+ "format": "int64"
3674
+ },
3675
+ "note": {
3676
+ "type": "string"
3677
+ },
3678
+ "number": {
3679
+ "type": "string"
3680
+ },
3681
+ "position_id": {
3682
+ "type": "integer",
3683
+ "format": "int64"
3684
+ },
3685
+ "project_id": {
3686
+ "type": "integer",
3687
+ "format": "int64"
3688
+ },
3689
+ "timer_value": {
3690
+ "type": "string"
3691
+ },
3692
+ "type": {
3693
+ "type": "string"
3694
+ }
3695
+ }
3696
+ },
3697
+ "TimeTrackings": {
3698
+ "type": "object",
3699
+ "allOf": [
3700
+ {
3701
+ "$ref": "#/definitions/List"
3702
+ },
3703
+ {
3704
+ "properties": {
3705
+ "items": {
3706
+ "type": "array",
3707
+ "items": {
3708
+ "$ref": "#/definitions/TimeTracking"
3709
+ }
3710
+ }
3711
+ }
3712
+ }
3713
+ ]
3714
+ },
3715
+ "TextTemplate": {
3716
+ "type": "object",
3717
+ "properties": {
3718
+ "can_modify": {
3719
+ "type": "boolean"
3720
+ },
3721
+ "id": {
3722
+ "type": "integer",
3723
+ "format": "int64"
3724
+ },
3725
+ "text": {
3726
+ "type": "string"
3727
+ },
3728
+ "title": {
3729
+ "type": "string"
3730
+ }
3731
+ }
3732
+ },
3733
+ "TextTemplates": {
3734
+ "type": "object",
3735
+ "allOf": [
3736
+ {
3737
+ "$ref": "#/definitions/List"
3738
+ },
3739
+ {
3740
+ "properties": {
3741
+ "items": {
3742
+ "type": "array",
3743
+ "items": {
3744
+ "$ref": "#/definitions/TextTemplate"
3745
+ }
3746
+ }
3747
+ }
3748
+ }
3749
+ ]
3750
+ },
3751
+ "Attachment": {
3752
+ "type": "object",
3753
+ "properties": {
3754
+ "created_at": {
3755
+ "type": "string",
3756
+ "format": "date",
3757
+ "readOnly": true
3758
+ },
3759
+ "customer_id": {
3760
+ "type": "integer",
3761
+ "format": "int64"
3762
+ },
3763
+ "document_id": {
3764
+ "type": "integer",
3765
+ "format": "int64"
3766
+ },
3767
+ "file_name": {
3768
+ "type": "string",
3769
+ "example": "my_doc.pdf",
3770
+ "readOnly": true
3771
+ },
3772
+ "id": {
3773
+ "type": "integer",
3774
+ "format": "int64",
3775
+ "readOnly": true
3776
+ },
3777
+ "project_id": {
3778
+ "type": "integer",
3779
+ "format": "int64"
3780
+ },
3781
+ "size": {
3782
+ "type": "integer",
3783
+ "example": 10022,
3784
+ "description": "In byte",
3785
+ "readOnly": true
3786
+ },
3787
+ "title": {
3788
+ "type": "string",
3789
+ "example": "My doc"
3790
+ }
3791
+ }
3792
+ },
3793
+ "Attachments": {
3794
+ "type": "object",
3795
+ "allOf": [
3796
+ {
3797
+ "$ref": "#/definitions/List"
3798
+ },
3799
+ {
3800
+ "properties": {
3801
+ "items": {
3802
+ "type": "array",
3803
+ "items": {
3804
+ "$ref": "#/definitions/Attachment"
3805
+ }
3806
+ }
3807
+ }
3808
+ }
3809
+ ]
3810
+ },
3811
+ "DocumentPayment": {
3812
+ "type": "object",
3813
+ "properties": {
3814
+ "amount": {
3815
+ "type": "string"
3816
+ },
3817
+ "document_id": {
3818
+ "type": "integer",
3819
+ "format": "int64"
3820
+ },
3821
+ "id": {
3822
+ "type": "integer",
3823
+ "format": "int64"
3824
+ },
3825
+ "notice": {
3826
+ "type": "string"
3827
+ },
3828
+ "payment_at": {
3829
+ "type": "string"
3830
+ },
3831
+ "type": {
3832
+ "type": "string"
3833
+ }
3834
+ }
3835
+ },
3836
+ "DocumentPayments": {
3837
+ "type": "object",
3838
+ "allOf": [
3839
+ {
3840
+ "$ref": "#/definitions/List"
3841
+ },
3842
+ {
3843
+ "properties": {
3844
+ "items": {
3845
+ "type": "array",
3846
+ "items": {
3847
+ "$ref": "#/definitions/DocumentPayment"
3848
+ }
3849
+ }
3850
+ }
3851
+ }
3852
+ ]
3853
+ },
3854
+ "PostBoxRequest": {
3855
+ "type": "object",
3856
+ "properties": {
3857
+ "to": {
3858
+ "type": "string"
3859
+ },
3860
+ "cc": {
3861
+ "type": "string"
3862
+ },
3863
+ "from": {
3864
+ "type": "string"
3865
+ },
3866
+ "subject": {
3867
+ "type": "string"
3868
+ },
3869
+ "message": {
3870
+ "type": "string"
3871
+ },
3872
+ "date": {
3873
+ "type": "string",
3874
+ "format": "date"
3875
+ }
3876
+ }
3877
+ },
3878
+ "PostBox": {
3879
+ "type": "object",
3880
+ "properties": {
3881
+ "id": {
3882
+ "type": "integer",
3883
+ "format": "int64"
3884
+ },
3885
+ "document_id": {
3886
+ "type": "integer",
3887
+ "format": "int64"
3888
+ },
3889
+ "to": {
3890
+ "type": "string"
3891
+ },
3892
+ "cc": {
3893
+ "type": "string"
3894
+ },
3895
+ "from": {
3896
+ "type": "string"
3897
+ },
3898
+ "subject": {
3899
+ "type": "string"
3900
+ },
3901
+ "message": {
3902
+ "type": "string"
3903
+ },
3904
+ "date": {
3905
+ "type": "string",
3906
+ "format": "date"
3907
+ },
3908
+ "created_at": {
3909
+ "type": "string",
3910
+ "format": "date-time"
3911
+ },
3912
+ "processed_at": {
3913
+ "type": "string",
3914
+ "format": "date-time"
3915
+ },
3916
+ "send_by_self": {
3917
+ "type": "boolean"
3918
+ },
3919
+ "send_with_attachment": {
3920
+ "type": "boolean"
3921
+ },
3922
+ "type": {
3923
+ "type": "string",
3924
+ "enum": [
3925
+ "FAX",
3926
+ "EMAIL",
3927
+ "POST"
3928
+ ]
3929
+ },
3930
+ "status": {
3931
+ "type": "string",
3932
+ "enum": [
3933
+ "WAITING",
3934
+ "PREPARE",
3935
+ "ERROR",
3936
+ "OK",
3937
+ "PROCESSING"
3938
+ ]
3939
+ },
3940
+ "status_info": {
3941
+ "type": "string"
3942
+ }
3943
+ }
3944
+ },
3945
+ "PostBoxes": {
3946
+ "type": "object",
3947
+ "allOf": [
3948
+ {
3949
+ "$ref": "#/definitions/List"
3950
+ },
3951
+ {
3952
+ "properties": {
3953
+ "items": {
3954
+ "type": "array",
3955
+ "items": {
3956
+ "$ref": "#/definitions/PostBox"
3957
+ }
3958
+ }
3959
+ }
3960
+ }
3961
+ ]
3962
+ }
3963
+ }
3964
+ }