@accounter/green-invoice-graphql 0.8.2-alpha-20251102160658-6d41b0a7bb225382246645badf39a28bcd8102e1 → 0.8.2-alpha-20251102162844-adaba3b25910083f6ebd80bd580629e1c0871260

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,130 +1,25 @@
1
1
  {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://api.greeninvoice.co.il/schema/v1",
4
- "$defs": {
5
- "getDocumentResponse": {
6
- "$ref": "#/$defs/Document"
7
- },
8
- "searchDocumentsRequest": {
9
- "type": "object",
10
- "additionalProperties": false,
11
- "properties": {
12
- "page": {
13
- "type": "number",
14
- "description": "Page requested"
15
- },
16
- "pageSize": {
17
- "type": "number",
18
- "description": "Results per page"
19
- },
20
- "number": {
21
- "$ref": "#/$defs/DocumentTaxNumber"
22
- },
23
- "type": {
24
- "type": "array",
25
- "description": "Document type",
26
- "items": {
27
- "$ref": "#/$defs/DocumentType"
28
- }
29
- },
30
- "status": {
31
- "type": "array",
32
- "description": "Document status",
33
- "items": {
34
- "type": "number",
35
- "enum": [0, 1, 2, 3, 4]
36
- }
37
- },
38
- "paymentTypes": {
39
- "type": "array",
40
- "description": "Payment types used in this document",
41
- "items": {
42
- "type": "number",
43
- "enum": [-1, 0, 1, 2, 3, 4, 5, 10, 11]
44
- }
45
- },
46
- "fromDate": {
47
- "type": "string",
48
- "description": "Documents that were created after the specified date in the format YYYY-MM-DD",
49
- "format": "date"
50
- },
51
- "toDate": {
52
- "type": "string",
53
- "description": "Documents that were created until the specified date in the format YYYY-MM-DD",
54
- "format": "date"
55
- },
56
- "clientId": {
57
- "type": "string",
58
- "description": "Client ID"
59
- },
60
- "clientName": {
61
- "type": "string",
62
- "description": "Client name"
63
- },
64
- "description": {
65
- "type": "string",
66
- "description": "Document description"
67
- },
68
- "download": {
69
- "type": "boolean",
70
- "description": "Whether document was downloaded by client"
71
- },
72
- "sort": {
73
- "enum": ["documentDate", "creationDate"]
74
- }
75
- },
76
- "required": []
77
- },
78
- "searchDocumentsResponse": {
79
- "allOf": [
80
- { "$ref": "#/$defs/PaginationMeta" },
81
- {
82
- "type": "object",
83
- "properties": {
84
- "items": {
85
- "type": "array",
86
- "items": {
87
- "$ref": "#/$defs/Document"
88
- }
89
- }
90
- },
91
- "required": ["items"]
92
- }
93
- ],
94
- "unevaluatedProperties": false
95
- },
96
- "previewDocumentRequest": {
97
- "description": "Previews a document before the actual generation",
98
- "additionalProperties": false,
99
- "$ref": "#/$defs/DocumentInputNew"
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "definitions": {
4
+ "addExpenseRequest": {
5
+ "$ref": "#/definitions/Expense"
100
6
  },
101
- "previewDocumentResponse": {
7
+ "addExpenseResponse": {
102
8
  "oneOf": [
103
9
  {
104
- "type": "object",
105
- "additionalProperties": false,
106
- "properties": {
107
- "file": {
108
- "description": "Preview document file in Base64",
109
- "type": "string"
110
- }
111
- },
112
- "required": ["file"]
10
+ "$ref": "#/definitions/Expense"
113
11
  },
114
12
  {
115
- "$ref": "#/$defs/ErrorResponse"
13
+ "$ref": "#/definitions/ErrorResponse"
116
14
  }
117
15
  ]
118
16
  },
119
- "getLinkedDocumentsResponse": {
120
- "$ref": "#/$defs/GetLinkedDocuments"
121
- },
122
17
  "addDocumentRequest": {
123
18
  "description": "Add a document to the current business",
19
+ "additionalProperties": false,
124
20
  "allOf": [
125
- { "$ref": "#/$defs/DocumentInputNew" },
21
+ { "$ref": "#/definitions/DocumentInputNew" },
126
22
  {
127
- "type": "object",
128
23
  "properties": {
129
24
  "emailContent": {
130
25
  "type": "string",
@@ -136,16 +31,15 @@
136
31
  }
137
32
  }
138
33
  }
139
- ],
140
- "unevaluatedProperties": false
34
+ ]
141
35
  },
142
36
  "addDocumentResponse": {
143
37
  "oneOf": [
144
38
  {
145
- "$ref": "#/$defs/AddedDocument"
39
+ "$ref": "#/definitions/AddedDocument"
146
40
  },
147
41
  {
148
- "$ref": "#/$defs/ErrorResponse"
42
+ "$ref": "#/definitions/ErrorResponse"
149
43
  }
150
44
  ]
151
45
  },
@@ -154,109 +48,196 @@
154
48
  "additionalProperties": false,
155
49
  "properties": {}
156
50
  },
157
- "getExpenseRequest": {
51
+ "previewDocumentRequest": {
52
+ "description": "Previews a document before the actual generation",
53
+ "additionalProperties": false,
54
+ "$ref": "#/definitions/DocumentInputNew"
55
+ },
56
+ "previewDocumentResponse": {
57
+ "oneOf": [
58
+ {
59
+ "type": "object",
60
+ "additionalProperties": false,
61
+ "properties": {
62
+ "file": {
63
+ "description": "Preview document file in Base64",
64
+ "type": "string"
65
+ }
66
+ },
67
+ "required": ["file"]
68
+ },
69
+ {
70
+ "$ref": "#/definitions/ErrorResponse"
71
+ }
72
+ ]
73
+ },
74
+ "addExpenseDraftByFileRequest": {
158
75
  "type": "object",
159
76
  "additionalProperties": false,
160
- "required": ["id"],
77
+ "required": [],
161
78
  "properties": {
162
- "id": {
79
+ "file": {
163
80
  "type": "string",
164
- "description": "The expense ID"
81
+ "description": "The file, in Base64, allowed types: GIF, PNG, JPG, SVG, PDF"
165
82
  }
166
83
  }
167
84
  },
168
- "getExpenseResponse": {
169
- "$ref": "#/$defs/GetExpense"
85
+ "addExpenseDraftByFileResponse": {
86
+ "$ref": "#/definitions/GetExpenseDraft"
170
87
  },
171
- "searchExpensesRequest": {
88
+ "generalErrorResponse": {
172
89
  "type": "object",
173
90
  "additionalProperties": false,
174
91
  "properties": {
175
- "fromDate": {
176
- "type": "string",
177
- "description": "Expense that were created after the specified date in the format YYYY-MM-DD"
92
+ "errorCode:": {
93
+ "type": "integer"
178
94
  },
179
- "toDate": {
95
+ "errorMessage": {
96
+ "type": ["string", "null"]
97
+ }
98
+ }
99
+ },
100
+ "getClientResponse": {
101
+ "type": "object",
102
+ "additionalProperties": false,
103
+ "properties": {
104
+ "id": {
105
+ "$ref": "#/definitions/ClientId"
106
+ },
107
+ "name": {
108
+ "$ref": "#/definitions/ClientName"
109
+ },
110
+ "active": {
111
+ "type": "boolean",
112
+ "description": "Is the client currently active or not"
113
+ },
114
+ "taxId": {
180
115
  "type": "string",
181
- "description": "Expense that were created until the specified date in the format YYYY-MM-DD"
116
+ "description": "The client tax ID",
117
+ "examples": ["0123456789"]
182
118
  },
183
- "dueDate": {
119
+ "paymentTerms": {
120
+ "type": "integer",
121
+ "description": "The client payment term, default is 0",
122
+ "enum": [-1, 0, 10, 15, 30, 45, 60, 75, 90, 120]
123
+ },
124
+ "bankName": {
184
125
  "type": "string",
185
- "description": "Due date of the expense, in the format YYYY-MM-DD"
126
+ "description": "The client bank name"
186
127
  },
187
- "description": {
128
+ "bankBranch": {
188
129
  "type": "string",
189
- "description": "Expense description"
130
+ "description": "The client bank branch"
190
131
  },
191
- "supplierId": {
132
+ "bankAccount": {
192
133
  "type": "string",
193
- "description": "Supplier's ID"
134
+ "description": "The supplier bank account number"
194
135
  },
195
- "supplierName": {
136
+ "country": {
137
+ "$ref": "#/definitions/Country"
138
+ },
139
+ "phone": {
140
+ "$ref": "#/definitions/ClientPhone"
141
+ },
142
+
143
+ "mobile": {
196
144
  "type": "string",
197
- "description": "Supplier's name"
145
+ "description": "The supplier mobile number"
198
146
  },
199
- "number": {
147
+ "contactPerson": {
200
148
  "type": "string",
201
- "description": "Expense serial number"
149
+ "description": "The supplier contact person name"
202
150
  },
203
- "paid": {
204
- "type": "boolean",
205
- "description": "Filter expenses that are only paid or unpaid, if not added to the request, will return both"
151
+ "emails": {
152
+ "$ref": "#/definitions/ClientEmails"
206
153
  },
207
- "reported": {
154
+ "labels": {
155
+ "type": "array",
156
+ "additionalItems": false,
157
+ "items": {
158
+ "type": "string"
159
+ }
160
+ },
161
+ "creationDate": {
162
+ "$ref": "#/definitions/CreationDate"
163
+ },
164
+ "lastUpdateDate": {
165
+ "type": "integer",
166
+ "description": "The last update date of the supplier, in UNIX timestamp format"
167
+ },
168
+ "send": {
208
169
  "type": "boolean",
209
- "description": "Filter expenses that are only reported or unreported, if not added to the request, will return both"
170
+ "description": "Whether to send emails to the user automatically when assigning him to an invoice or not"
210
171
  },
211
- "sort": {
172
+ "department": {
212
173
  "type": "string",
213
- "description": "The field to sort the results by"
174
+ "description": "The supplier department"
214
175
  },
215
- "minAmount": {
216
- "type": "number",
217
- "description": "Min amount of the expense"
176
+ "accountingKey": {
177
+ "type": "string",
178
+ "description": "The supplier accounting key"
218
179
  },
219
- "maxAmount": {
220
- "type": "number",
221
- "description": "Max amount of the expense"
180
+ "address": {
181
+ "type": "string",
182
+ "description": "The supplier address"
222
183
  },
223
- "page": {
184
+ "city": {
185
+ "type": "string",
186
+ "description": "The supplier city"
187
+ },
188
+ "zip": {
189
+ "type": "string",
190
+ "description": "The supplier zip code"
191
+ },
192
+ "category": {
193
+ "type": "integer",
194
+ "description": "The category this client is related to"
195
+ },
196
+ "subCategory": {
197
+ "type": "integer",
198
+ "description": "The sub category this client is related to"
199
+ },
200
+ "fax": {
201
+ "type": "string",
202
+ "description": "Client fax"
203
+ },
204
+ "remarks": {
205
+ "type": "string",
206
+ "description": "Client remarks for self use",
207
+ "example": "Customer approved 2016 sales"
208
+ },
209
+ "incomeAmount": {
224
210
  "type": "number",
225
- "description": "Page requested"
211
+ "description": "The amount of incomes from the customer"
226
212
  },
227
- "pageSize": {
213
+ "paymentAmount": {
214
+ "type": "number"
215
+ },
216
+ "balanceAmount": {
228
217
  "type": "number",
229
- "description": "Results per page"
218
+ "description": "The balance amount of the client"
230
219
  }
231
- },
232
- "required": ["minAmount", "maxAmount", "page", "pageSize"]
220
+ }
233
221
  },
234
- "searchExpensesResponse": {
235
- "allOf": [
236
- { "$ref": "#/$defs/PaginationMeta" },
237
- {
238
- "type": "object",
239
- "properties": {
240
- "items": {
241
- "$ref": "#/$defs/GetExpense"
242
- }
243
- }
222
+ "getExpenseRequest": {
223
+ "type": "object",
224
+ "additionalProperties": false,
225
+ "required": ["id"],
226
+ "properties": {
227
+ "id": {
228
+ "type": "string",
229
+ "description": "The expense ID"
244
230
  }
245
- ],
246
- "unevaluatedProperties": false
231
+ }
247
232
  },
248
- "addExpenseRequest": {
249
- "$ref": "#/$defs/Expense"
233
+ "getExpenseResponse": {
234
+ "$ref": "#/definitions/GetExpense"
250
235
  },
251
- "addExpenseResponse": {
252
- "oneOf": [
253
- {
254
- "$ref": "#/$defs/Expense"
255
- },
256
- {
257
- "$ref": "#/$defs/ErrorResponse"
258
- }
259
- ]
236
+ "getDocumentResponse": {
237
+ "$ref": "#/definitions/Document"
238
+ },
239
+ "getLinkedDocumentsResponse": {
240
+ "$ref": "#/definitions/GetLinkedDocuments"
260
241
  },
261
242
  "updateExpenseRequest": {
262
243
  "type": "object",
@@ -280,13 +261,13 @@
280
261
  ]
281
262
  },
282
263
  "currency": {
283
- "$ref": "#/$defs/Currency"
264
+ "$ref": "#/definitions/Currency"
284
265
  },
285
266
  "currencyRate": {
286
- "$ref": "#/$defs/CurrencyRate"
267
+ "$ref": "#/definitions/CurrencyRate"
287
268
  },
288
269
  "vat": {
289
- "$ref": "#/$defs/Vat"
270
+ "$ref": "#/definitions/Vat"
290
271
  },
291
272
  "amount": {
292
273
  "type": "number",
@@ -305,7 +286,7 @@
305
286
  "description": "Reporting date of the expense"
306
287
  },
307
288
  "documentType": {
308
- "$ref": "#/$defs/ExpenseDocumentType"
289
+ "$ref": "#/definitions/ExpenseDocumentType"
309
290
  },
310
291
  "number": {
311
292
  "type": "string",
@@ -317,13 +298,13 @@
317
298
  },
318
299
  "remarks": {
319
300
  "type": "string",
320
- "description": "Remarks for the expense"
301
+ "string": "Remarks for the expense"
321
302
  },
322
303
  "supplier": {
323
- "$ref": "#/$defs/Supplier"
304
+ "$ref": "#/definitions/Supplier"
324
305
  },
325
306
  "accountingClassification": {
326
- "$ref": "#/$defs/AccountingClassification"
307
+ "$ref": "#/definitions/AccountingClassification"
327
308
  },
328
309
  "active": {
329
310
  "type": "boolean",
@@ -334,10 +315,10 @@
334
315
  "updateExpenseResponse": {
335
316
  "oneOf": [
336
317
  {
337
- "$ref": "#/$defs/GetExpense"
318
+ "$ref": "#/definitions/GetExpense"
338
319
  },
339
320
  {
340
- "$ref": "#/$defs/ErrorResponse"
321
+ "$ref": "#/definitions/ErrorResponse"
341
322
  }
342
323
  ]
343
324
  },
@@ -349,12 +330,12 @@
349
330
  "fromDate": {
350
331
  "type": "string",
351
332
  "description": "Expense drafts that were created after the specified date in the format YYYY-MM-DD",
352
- "format": "date"
333
+ "format": "YYYY-MM-DD"
353
334
  },
354
335
  "toDate": {
355
336
  "type": "string",
356
337
  "description": "Expense drafts that were created until the specified date in the format YYYY-MM-DD",
357
- "format": "date"
338
+ "format": "YYYY-MM-DD"
358
339
  },
359
340
  "description": {
360
341
  "type": "string",
@@ -379,488 +360,397 @@
379
360
  }
380
361
  },
381
362
  "searchExpenseDraftsResponse": {
382
- "allOf": [
383
- { "$ref": "#/$defs/PaginationMeta" },
384
- {
363
+ "type": "object",
364
+ "additionalProperties": false,
365
+ "required": ["page", "pageSize", "total", "pages", "items", "aggregations"],
366
+ "properties": {
367
+ "total": {
368
+ "type": "number",
369
+ "description": "The total length of the items that were retrieved"
370
+ },
371
+ "from": {
372
+ "type": "number"
373
+ },
374
+ "to": {
375
+ "type": "number"
376
+ },
377
+ "page": {
378
+ "type": "number",
379
+ "description": "The page that was requested to retrieve"
380
+ },
381
+ "pageSize": {
382
+ "type": "number",
383
+ "description": "The page size that was requested"
384
+ },
385
+ "pages": {
386
+ "type": "number",
387
+ "description": "The amount of pages that exist"
388
+ },
389
+ "aggregations": {
385
390
  "type": "object",
391
+ "additionalProperties": false,
392
+ "required": ["totalAmount"],
386
393
  "properties": {
387
- "aggregations": {
394
+ "totalAmount": {
388
395
  "type": "object",
389
396
  "additionalProperties": false,
390
- "required": ["totalAmount"],
397
+ "required": ["value"],
391
398
  "properties": {
392
- "totalAmount": {
393
- "type": "object",
394
- "additionalProperties": false,
395
- "required": ["value"],
396
- "properties": {
397
- "value": {
398
- "type": "number"
399
- }
400
- }
399
+ "value": {
400
+ "type": "number"
401
401
  }
402
402
  }
403
- },
404
- "items": {
405
- "type": "array",
406
- "description": "The expense drafts that were found",
407
- "items": {
403
+ }
404
+ }
405
+ },
406
+ "items": {
407
+ "type": "array",
408
+ "additionalItems": false,
409
+ "description": "The expense drafts that were found",
410
+ "items": {
411
+ "type": "object",
412
+ "additionalProperties": false,
413
+ "description": "Partial Expense",
414
+ "required": [
415
+ "id",
416
+ "status",
417
+ "creationDate",
418
+ "lastUpdateDate",
419
+ "reportingPeriod",
420
+ "hasDefaultValues",
421
+ "url",
422
+ "thumbnail",
423
+ "expense"
424
+ ],
425
+ "properties": {
426
+ "id": {
427
+ "type": "string"
428
+ },
429
+ "status": {
430
+ "type": "number"
431
+ },
432
+ "creationDate": {
433
+ "$ref": "#/definitions/CreationDate"
434
+ },
435
+ "lastUpdateDate": {
436
+ "type": "number"
437
+ },
438
+ "reportingPeriod": {
439
+ "type": "string"
440
+ },
441
+ "hasDefaultValues": {
442
+ "type": "boolean"
443
+ },
444
+ "url": {
445
+ "type": "string"
446
+ },
447
+ "thumbnail": {
448
+ "type": "string"
449
+ },
450
+ "expense": {
408
451
  "type": "object",
409
452
  "additionalProperties": false,
410
- "description": "Partial Expense",
411
453
  "required": [
412
- "id",
413
- "status",
414
- "creationDate",
415
- "lastUpdateDate",
416
- "reportingPeriod",
417
- "hasDefaultValues",
418
- "url",
419
- "thumbnail",
420
- "expense"
454
+ "accountingClassification",
455
+ "active",
456
+ "addRecipient",
457
+ "confirmFromEdit",
458
+ "currency",
459
+ "currencyRate",
460
+ "description",
461
+ "documentType",
462
+ "fileHash",
463
+ "fileKey",
464
+ "labels",
465
+ "reportingDate",
466
+ "supplier",
467
+ "tags",
468
+ "texts",
469
+ "vat"
421
470
  ],
422
471
  "properties": {
423
- "id": {
424
- "type": "string"
472
+ "accountingClassification": {
473
+ "$ref": "#/definitions/AccountingClassification"
425
474
  },
426
- "status": {
427
- "type": "number"
475
+ "active": {
476
+ "type": "boolean",
477
+ "description": "Is the expense active or not"
428
478
  },
429
- "creationDate": {
430
- "$ref": "#/$defs/CreationDate"
479
+ "addRecipient": {
480
+ "type": "boolean",
481
+ "description": "Should we save the supplier or not (by setting this to true you are required to add a supplier)"
431
482
  },
432
- "lastUpdateDate": {
433
- "type": "number"
483
+ "amount": {
484
+ "type": "number",
485
+ "description": "The total amount of the expense"
434
486
  },
435
- "reportingPeriod": {
436
- "type": "string"
437
- },
438
- "hasDefaultValues": {
487
+ "confirmFromEdit": {
439
488
  "type": "boolean"
440
489
  },
441
- "url": {
442
- "type": "string"
490
+ "currency": {
491
+ "$ref": "#/definitions/Currency"
443
492
  },
444
- "thumbnail": {
445
- "type": "string"
493
+ "currencyRate": {
494
+ "$ref": "#/definitions/CurrencyRate"
446
495
  },
447
- "expense": {
448
- "type": "object",
449
- "additionalProperties": false,
450
- "required": [
451
- "accountingClassification",
452
- "active",
453
- "addRecipient",
454
- "confirmFromEdit",
455
- "currency",
456
- "currencyRate",
457
- "description",
458
- "documentType",
459
- "fileHash",
460
- "fileKey",
461
- "labels",
462
- "reportingDate",
463
- "supplier",
464
- "tags",
465
- "texts",
466
- "vat"
467
- ],
468
- "properties": {
469
- "accountingClassification": {
470
- "$ref": "#/$defs/AccountingClassification"
471
- },
472
- "active": {
473
- "type": "boolean",
474
- "description": "Is the expense active or not"
475
- },
476
- "addRecipient": {
477
- "type": "boolean",
478
- "description": "Should we save the supplier or not (by setting this to true you are required to add a supplier)"
479
- },
480
- "amount": {
481
- "type": "number",
482
- "description": "The total amount of the expense"
483
- },
484
- "confirmFromEdit": {
496
+ "date": {
497
+ "type": "string",
498
+ "description": "Date of the expense"
499
+ },
500
+ "description": {
501
+ "type": "string",
502
+ "description": "Description for the expense"
503
+ },
504
+ "documentType": {
505
+ "$ref": "#/definitions/ExpenseDocumentType"
506
+ },
507
+ "fileHash": {
508
+ "type": "string",
509
+ "description": "File hash"
510
+ },
511
+ "fileKey": {
512
+ "type": "string",
513
+ "description": "Key of the file location"
514
+ },
515
+ "labels": {
516
+ "type": "array",
517
+ "additionalItems": false,
518
+ "items": {
519
+ "type": "string"
520
+ }
521
+ },
522
+ "number": {
523
+ "type": ["string", "null"],
524
+ "description": "Number of the expense"
525
+ },
526
+ "paymentType": {
527
+ "description": "Payment method",
528
+ "oneOf": [
529
+ {
485
530
  "type": "boolean"
486
531
  },
487
- "currency": {
488
- "$ref": "#/$defs/Currency"
489
- },
490
- "currencyRate": {
491
- "$ref": "#/$defs/CurrencyRate"
492
- },
493
- "date": {
494
- "type": "string",
495
- "description": "Date of the expense"
496
- },
497
- "description": {
498
- "type": "string",
499
- "description": "Description for the expense"
500
- },
501
- "documentType": {
502
- "$ref": "#/$defs/ExpenseDocumentType"
503
- },
504
- "fileHash": {
505
- "type": "string",
506
- "description": "File hash"
507
- },
508
- "fileKey": {
509
- "type": "string",
510
- "description": "Key of the file location"
511
- },
512
- "labels": {
513
- "type": "array",
514
- "items": {
515
- "type": "string"
516
- }
517
- },
518
- "number": {
519
- "type": ["string", "null"],
520
- "description": "Number of the expense"
521
- },
522
- "paymentType": {
523
- "description": "Payment method",
524
- "oneOf": [
525
- {
526
- "type": "boolean"
527
- },
528
- {
529
- "type": ["string", "number"],
530
- "enum": ["1", "2", "3", "4", "5", "10", "11", 1, 2, 3, 4, 5, 10, 11]
531
- }
532
- ]
533
- },
534
- "reportingDate": {
535
- "type": "string",
536
- "description": "Reporting date of the expense"
537
- },
538
- "supplier": {
539
- "$ref": "#/$defs/Supplier"
540
- },
541
- "tags": {
542
- "type": "array",
543
- "items": {
544
- "type": "string"
545
- }
546
- },
547
- "texts": {
548
- "type": "array",
549
- "items": {
550
- "type": "string"
551
- }
552
- },
553
- "vat": {
554
- "$ref": "#/$defs/Vat"
532
+ {
533
+ "type": ["string", "number"],
534
+ "enum": ["1", "2", "3", "4", "5", "10", "11", 1, 2, 3, 4, 5, 10, 11]
555
535
  }
556
- }
557
- }
558
- }
559
- }
560
- }
561
- },
562
- "required": ["aggregations", "items"]
563
- }
564
- ],
565
- "unevaluatedProperties": false
566
- },
567
- "addExpenseDraftByFileRequest": {
568
- "type": "object",
569
- "additionalProperties": false,
570
- "required": [],
571
- "properties": {
572
- "file": {
573
- "type": "string",
574
- "description": "The file, in Base64, allowed types: GIF, PNG, JPG, SVG, PDF"
575
- }
576
- }
577
- },
578
- "addExpenseDraftByFileResponse": {
579
- "$ref": "#/$defs/GetExpenseDraft"
580
- },
581
- "addClientRequest": {
582
- "description": "Add a new client to the current business",
583
- "allOf": [
584
- { "$ref": "#/$defs/ContactInfo" },
585
- { "$ref": "#/$defs/Address" },
586
- { "$ref": "#/$defs/BankingInfo" },
587
- {
588
- "type": "object",
589
- "properties": {
590
- "name": {
591
- "$ref": "#/$defs/ClientName"
592
- },
593
- "active": {
594
- "type": "boolean",
595
- "description": "Is the client currently active or not"
596
- },
597
- "taxId": {
598
- "type": "string",
599
- "description": "The client tax ID",
600
- "examples": ["0123456789"]
601
- },
602
- "paymentTerms": {
603
- "type": "integer",
604
- "description": "The client payment term, default is 0",
605
- "enum": [-1, 0, 10, 15, 30, 45, 60, 75, 90, 120]
606
- },
607
- "labels": {
608
- "type": "array",
609
- "items": {
610
- "type": "string"
611
- }
612
- },
613
- "send": {
614
- "type": "boolean",
615
- "description": "Whether to send emails to the user automatically when assigning him to an invoice or not"
616
- },
617
- "department": {
618
- "type": "string",
619
- "description": "The client department"
620
- },
621
- "accountingKey": {
622
- "type": "string",
623
- "description": "The client accounting key"
624
- },
625
- "category": {
626
- "type": "integer",
627
- "description": "The category this client is related to"
628
- },
629
- "subCategory": {
630
- "type": "integer",
631
- "description": "The sub category this client is related to"
632
- },
633
- "remarks": {
634
- "type": "string",
635
- "description": "Client remarks for self use",
636
- "example": "Customer approved 2016 sales"
536
+ ]
537
+ },
538
+ "reportingDate": {
539
+ "type": "string",
540
+ "description": "Reporting date of the expense"
541
+ },
542
+ "supplier": {
543
+ "$ref": "#/definitions/Supplier"
544
+ },
545
+ "tags": {
546
+ "type": "array",
547
+ "additionalItems": false,
548
+ "items": {
549
+ "type": "string"
550
+ }
551
+ },
552
+ "texts": {
553
+ "type": "array",
554
+ "additionalItems": false,
555
+ "items": {
556
+ "type": "string"
557
+ }
558
+ },
559
+ "vat": {
560
+ "$ref": "#/definitions/Vat"
561
+ }
562
+ }
563
+ }
637
564
  }
638
- },
639
- "required": ["name"]
640
- }
641
- ],
642
- "unevaluatedProperties": false
643
- },
644
- "addClientResponse": {
645
- "oneOf": [
646
- {
647
- "$ref": "#/$defs/getClientResponse"
648
- },
649
- {
650
- "$ref": "#/$defs/ErrorResponse"
565
+ }
651
566
  }
652
- ]
567
+ }
653
568
  },
654
- "updateClientRequest": {
655
- "description": "Update an existing client",
569
+ "searchExpensesRequest": {
656
570
  "type": "object",
657
571
  "additionalProperties": false,
658
- "required": ["name"],
659
572
  "properties": {
660
- "name": {
661
- "$ref": "#/$defs/ClientName"
662
- },
663
- "active": {
664
- "type": "boolean",
665
- "description": "Is the client currently active or not"
573
+ "fromDate": {
574
+ "type": "string",
575
+ "description": "Expense that were created after the specified date in the format YYYY-MM-DD"
666
576
  },
667
- "taxId": {
577
+ "toDate": {
668
578
  "type": "string",
669
- "description": "The client tax ID",
670
- "examples": ["0123456789"]
579
+ "description": "Expense that were created until the specified date in the format YYYY-MM-DD"
671
580
  },
672
- "paymentTerms": {
673
- "type": "integer",
674
- "description": "The client payment term, default is 0",
675
- "enum": [-1, 0, 10, 15, 30, 45, 60, 75, 90, 120]
581
+ "dueDate": {
582
+ "type": "string",
583
+ "description": "Due date of the expense, in the format YYYY-MM-DD"
676
584
  },
677
- "labels": {
678
- "type": "array",
679
- "items": {
680
- "type": "string"
681
- }
585
+ "description": {
586
+ "type": "string",
587
+ "description": "Expense description"
682
588
  },
683
- "send": {
684
- "type": "boolean",
685
- "description": "Whether to send emails to the user automatically when assigning him to an invoice or not"
589
+ "supplierId": {
590
+ "type": "string",
591
+ "description": "Supplier's ID"
686
592
  },
687
- "department": {
593
+ "supplierName": {
688
594
  "type": "string",
689
- "description": "The client department"
595
+ "description": "Supplier's name"
690
596
  },
691
- "accountingKey": {
597
+ "number": {
692
598
  "type": "string",
693
- "description": "The client accounting key"
599
+ "description": "Expense serial number"
694
600
  },
695
- "category": {
696
- "type": "integer",
697
- "description": "The category this client is related to"
601
+ "paid": {
602
+ "type": "boolean",
603
+ "description": "Filter expenses that are only paid or unpaid, if not added to the request, will return both"
698
604
  },
699
- "subCategory": {
700
- "type": "integer",
701
- "description": "The sub category this client is related to"
605
+ "reported": {
606
+ "type": "boolean",
607
+ "description": "Filter expenses that are only reported or unreported, if not added to the request, will return both"
702
608
  },
703
- "remarks": {
609
+ "sort": {
704
610
  "type": "string",
705
- "description": "Client remarks for self use",
706
- "example": "Customer approved 2016 sales"
611
+ "description": "The field to sort the results by"
707
612
  },
708
- "phone": {
709
- "type": "string",
710
- "description": "Phone number"
613
+ "minAmount": {
614
+ "type": "number",
615
+ "description": "Min amount of the expense"
711
616
  },
712
- "mobile": {
713
- "type": "string",
714
- "description": "Mobile number"
617
+ "maxAmount": {
618
+ "type": "number",
619
+ "description": "Max amount of the expense"
715
620
  },
716
- "emails": {
621
+ "page": {
622
+ "type": "number",
623
+ "description": "Page requested"
624
+ },
625
+ "pageSize": {
626
+ "type": "number",
627
+ "description": "Results per page"
628
+ }
629
+ },
630
+ "required": ["minAmount", "maxAmount", "page", "pageSize"]
631
+ },
632
+ "searchExpensesResponse": {
633
+ "type": "object",
634
+ "properties": {
635
+ "total": {
636
+ "type": "number",
637
+ "description": "The total length of the items that were retrieved"
638
+ },
639
+ "page": {
640
+ "type": "number",
641
+ "description": "The page that was requested to retrieve"
642
+ },
643
+ "pageSize": {
644
+ "type": "number",
645
+ "description": "The page size that was requested"
646
+ },
647
+ "pages": {
648
+ "type": "number",
649
+ "description": "The amount of pages that exist"
650
+ },
651
+ "items": {
652
+ "$ref": "#/definitions/GetExpense"
653
+ }
654
+ }
655
+ },
656
+ "searchDocumentsRequest": {
657
+ "type": "object",
658
+ "additionalProperties": false,
659
+ "properties": {
660
+ "page": {
661
+ "type": "number",
662
+ "description": "Page requested"
663
+ },
664
+ "pageSize": {
665
+ "type": "number",
666
+ "description": "Results per page"
667
+ },
668
+ "number": {
669
+ "$ref": "#/definitions/DocumentTaxNumber"
670
+ },
671
+ "type": {
717
672
  "type": "array",
673
+ "description": "Document type",
718
674
  "items": {
719
- "type": "string",
720
- "format": "email"
721
- },
722
- "description": "Email addresses"
675
+ "$ref": "#/definitions/DocumentType"
676
+ }
723
677
  },
724
- "fax": {
725
- "type": "string",
726
- "description": "Fax number"
678
+ "status": {
679
+ "type": "array",
680
+ "description": "Document status",
681
+ "items": {
682
+ "type": "number",
683
+ "enum": [0, 1, 2, 3, 4]
684
+ }
727
685
  },
728
- "contactPerson": {
729
- "type": "string",
730
- "description": "Contact person name"
686
+ "paymentTypes": {
687
+ "type": "array",
688
+ "description": "Payment types used in this document",
689
+ "items": {
690
+ "type": "number",
691
+ "enum": [-1, 0, 1, 2, 3, 4, 5, 10, 11]
692
+ }
731
693
  },
732
- "address": {
694
+ "fromDate": {
733
695
  "type": "string",
734
- "description": "Street address"
696
+ "description": "Documents that were created after the specified date in the format YYYY-MM-DD",
697
+ "format": "YYYY-MM-DD"
735
698
  },
736
- "city": {
699
+ "toDate": {
737
700
  "type": "string",
738
- "description": "City name"
701
+ "description": "Documents that were created until the specified date in the format YYYY-MM-DD",
702
+ "format": "YYYY-MM-DD"
739
703
  },
740
- "zip": {
704
+ "clientId": {
741
705
  "type": "string",
742
- "description": "Zip/postal code"
743
- },
744
- "country": {
745
- "$ref": "#/$defs/Country"
706
+ "description": "Client ID"
746
707
  },
747
- "bankName": {
708
+ "clientName": {
748
709
  "type": "string",
749
- "description": "Bank name"
710
+ "description": "Client name"
750
711
  },
751
- "bankBranch": {
712
+ "description": {
752
713
  "type": "string",
753
- "description": "Bank branch number"
714
+ "description": "Document description"
754
715
  },
755
- "bankAccount": {
756
- "type": "string",
757
- "description": "Bank account number"
758
- }
759
- }
760
- },
761
- "updateClientResponse": {
762
- "oneOf": [
763
- {
764
- "$ref": "#/$defs/getClientResponse"
716
+ "download": {
717
+ "type": "boolean",
718
+ "description": "Whether document was downloaded by client"
765
719
  },
766
- {
767
- "$ref": "#/$defs/ErrorResponse"
720
+ "sort": {
721
+ "enum": ["documentDate", "creationDate"]
768
722
  }
769
- ]
723
+ },
724
+ "required": []
770
725
  },
771
- "deleteClientResponse": {
772
- "oneOf": [
773
- {
774
- "$ref": "#/$defs/getClientResponse"
726
+ "searchDocumentsResponse": {
727
+ "type": "object",
728
+ "properties": {
729
+ "total": {
730
+ "type": "number",
731
+ "description": "The total length of the items that were retrieved"
775
732
  },
776
- {
777
- "$ref": "#/$defs/ErrorResponse"
778
- }
779
- ]
780
- },
781
- "getClientResponse": {
782
- "allOf": [
783
- { "$ref": "#/$defs/ContactInfo" },
784
- { "$ref": "#/$defs/Address" },
785
- { "$ref": "#/$defs/BankingInfo" },
786
- {
787
- "type": "object",
788
- "properties": {
789
- "id": {
790
- "$ref": "#/$defs/ClientId"
791
- },
792
- "name": {
793
- "$ref": "#/$defs/ClientName"
794
- },
795
- "active": {
796
- "type": "boolean",
797
- "description": "Is the client currently active or not"
798
- },
799
- "taxId": {
800
- "type": "string",
801
- "description": "The client tax ID",
802
- "examples": ["0123456789"]
803
- },
804
- "paymentTerms": {
805
- "type": "integer",
806
- "description": "The client payment term, default is 0",
807
- "enum": [-1, 0, 10, 15, 30, 45, 60, 75, 90, 120]
808
- },
809
- "labels": {
810
- "type": "array",
811
- "items": {
812
- "type": "string"
813
- }
814
- },
815
- "creationDate": {
816
- "$ref": "#/$defs/CreationDate"
817
- },
818
- "lastUpdateDate": {
819
- "type": "integer",
820
- "description": "The last update date of the supplier, in UNIX timestamp format"
821
- },
822
- "send": {
823
- "type": "boolean",
824
- "description": "Whether to send emails to the user automatically when assigning him to an invoice or not"
825
- },
826
- "department": {
827
- "type": "string",
828
- "description": "The supplier department"
829
- },
830
- "accountingKey": {
831
- "type": "string",
832
- "description": "The supplier accounting key"
833
- },
834
- "category": {
835
- "type": "integer",
836
- "description": "The category this client is related to"
837
- },
838
- "subCategory": {
839
- "type": "integer",
840
- "description": "The sub category this client is related to"
841
- },
842
- "remarks": {
843
- "type": "string",
844
- "description": "Client remarks for self use",
845
- "example": "Customer approved 2016 sales"
846
- },
847
- "incomeAmount": {
848
- "type": "number",
849
- "description": "The amount of incomes from the customer"
850
- },
851
- "paymentAmount": {
852
- "type": "number"
853
- },
854
- "balanceAmount": {
855
- "type": "number",
856
- "description": "The balance amount of the client"
857
- }
733
+ "page": {
734
+ "type": "number",
735
+ "description": "The page that was requested to retrieve"
736
+ },
737
+ "pageSize": {
738
+ "type": "number",
739
+ "description": "The page size that was requested"
740
+ },
741
+ "pages": {
742
+ "type": "number",
743
+ "description": "The amount of pages that exist"
744
+ },
745
+ "items": {
746
+ "type": "array",
747
+ "items": {
748
+ "$ref": "#/definitions/Document"
858
749
  }
859
750
  }
860
- ],
861
- "unevaluatedProperties": false
751
+ },
752
+ "required": ["total", "page", "pageSize", "pages", "items"]
862
753
  },
863
-
864
754
  "getFileUploadUrlResponse": {
865
755
  "type": "object",
866
756
  "properties": {
@@ -947,23 +837,11 @@
947
837
  "results": {
948
838
  "type": "array",
949
839
  "items": {
950
- "$ref": "#/$defs/BankTransaction"
840
+ "$ref": "#/definitions/BankTransaction"
951
841
  }
952
842
  }
953
- },
954
- "required": []
955
- },
956
- "generalErrorResponse": {
957
- "type": "object",
958
- "additionalProperties": false,
959
- "properties": {
960
- "errorCode": {
961
- "type": "integer"
962
- },
963
- "errorMessage": {
964
- "type": ["string", "null"]
965
- }
966
- }
843
+ },
844
+ "required": []
967
845
  },
968
846
  "AccountingClassification": {
969
847
  "type": "object",
@@ -1010,47 +888,6 @@
1010
888
  }
1011
889
  }
1012
890
  },
1013
- "Address": {
1014
- "type": "object",
1015
- "description": "Physical address information",
1016
- "additionalProperties": false,
1017
- "properties": {
1018
- "address": {
1019
- "type": "string",
1020
- "description": "Street address"
1021
- },
1022
- "city": {
1023
- "type": "string",
1024
- "description": "City name"
1025
- },
1026
- "zip": {
1027
- "type": "string",
1028
- "description": "Zip/postal code"
1029
- },
1030
- "country": {
1031
- "$ref": "#/$defs/Country"
1032
- }
1033
- }
1034
- },
1035
- "BankingInfo": {
1036
- "type": "object",
1037
- "description": "Banking information",
1038
- "additionalProperties": false,
1039
- "properties": {
1040
- "bankName": {
1041
- "type": "string",
1042
- "description": "Bank name"
1043
- },
1044
- "bankBranch": {
1045
- "type": "string",
1046
- "description": "Bank branch number"
1047
- },
1048
- "bankAccount": {
1049
- "type": "string",
1050
- "description": "Bank account number"
1051
- }
1052
- }
1053
- },
1054
891
  "BankTransaction": {
1055
892
  "type": "object",
1056
893
  "additionalProperties": false,
@@ -1108,7 +945,7 @@
1108
945
  "type": ["string", "null"],
1109
946
  "description": "The creditor account"
1110
947
  },
1111
- "currency": { "$ref": "#/$defs/Currency" },
948
+ "currency": { "$ref": "#/definitions/Currency" },
1112
949
  "valueDate": {
1113
950
  "type": "string",
1114
951
  "description": "Value date of the transaction"
@@ -1232,23 +1069,51 @@
1232
1069
  ]
1233
1070
  },
1234
1071
  "Client": {
1072
+ "allOf": [
1073
+ { "$ref": "#/definitions/ClientCore" },
1074
+ {
1075
+ "additionalProperties": false,
1076
+ "properties": {
1077
+ "country": {
1078
+ "$ref": "#/definitions/Country"
1079
+ },
1080
+ "emails": {
1081
+ "$ref": "#/definitions/ClientEmails"
1082
+ },
1083
+ "id": {
1084
+ "$ref": "#/definitions/ClientId"
1085
+ },
1086
+ "name": {
1087
+ "$ref": "#/definitions/ClientName"
1088
+ },
1089
+ "phone": {
1090
+ "$ref": "#/definitions/ClientPhone"
1091
+ },
1092
+ "self": {
1093
+ "$ref": "#/definitions/ClientSelf"
1094
+ }
1095
+ },
1096
+ "required": ["country", "emails", "id", "name", "phone", "self"]
1097
+ }
1098
+ ]
1099
+ },
1100
+ "ClientCore": {
1235
1101
  "type": "object",
1236
- "additionalProperties": false,
1237
1102
  "properties": {
1238
1103
  "country": {
1239
- "$ref": "#/$defs/Country"
1104
+ "$ref": "#/definitions/Country"
1240
1105
  },
1241
1106
  "emails": {
1242
- "$ref": "#/$defs/ClientEmails"
1107
+ "$ref": "#/definitions/ClientEmails"
1243
1108
  },
1244
1109
  "id": {
1245
- "$ref": "#/$defs/ClientId"
1110
+ "$ref": "#/definitions/ClientId"
1246
1111
  },
1247
1112
  "name": {
1248
- "$ref": "#/$defs/ClientName"
1113
+ "$ref": "#/definitions/ClientName"
1249
1114
  },
1250
1115
  "phone": {
1251
- "$ref": "#/$defs/ClientPhone"
1116
+ "$ref": "#/definitions/ClientPhone"
1252
1117
  },
1253
1118
  "taxId": {
1254
1119
  "type": "string",
@@ -1256,53 +1121,25 @@
1256
1121
  "examples": ["0123456789"]
1257
1122
  },
1258
1123
  "self": {
1259
- "$ref": "#/$defs/ClientSelf"
1260
- },
1261
- "address": {
1262
- "type": "string",
1263
- "description": "Client address"
1264
- },
1265
- "city": {
1266
- "type": "string",
1267
- "description": "Client city"
1268
- },
1269
- "zip": {
1270
- "type": "string",
1271
- "description": "Client zip code"
1272
- },
1273
- "fax": {
1274
- "type": "string",
1275
- "description": "Client fax"
1276
- },
1277
- "mobile": {
1278
- "type": "string",
1279
- "description": "The client mobile number"
1280
- },
1281
- "add": {
1282
- "type": "boolean",
1283
- "description": "Add a temporary client to the clients' list"
1124
+ "$ref": "#/definitions/ClientSelf"
1284
1125
  }
1285
1126
  }
1286
1127
  },
1287
1128
  "ClientEmails": {
1288
1129
  "type": "array",
1289
- "description": "List of email addresses",
1290
1130
  "items": {
1291
- "type": "string",
1292
- "format": "email"
1131
+ "type": "string"
1293
1132
  }
1294
1133
  },
1295
1134
  "ClientId": {
1296
1135
  "type": "string",
1297
1136
  "description": "The client ID",
1298
- "examples": ["8b338c95-095e-46d4-b2c6-331747508759"],
1299
- "format": "uuid"
1137
+ "examples": ["8b338c95-095e-46d4-b2c6-331747508759"]
1300
1138
  },
1301
1139
  "ClientName": {
1302
1140
  "type": "string",
1303
1141
  "description": "The client name",
1304
- "examples": ["לקוח אפ3"],
1305
- "minLength": 1
1142
+ "examples": ["לקוח אפ3"]
1306
1143
  },
1307
1144
  "ClientPhone": {
1308
1145
  "type": "string"
@@ -1312,37 +1149,6 @@
1312
1149
  "description": "Whether the client is self",
1313
1150
  "examples": [false]
1314
1151
  },
1315
- "ContactInfo": {
1316
- "type": "object",
1317
- "description": "Contact information for clients and suppliers",
1318
- "additionalProperties": false,
1319
- "properties": {
1320
- "phone": {
1321
- "type": "string",
1322
- "description": "Phone number"
1323
- },
1324
- "mobile": {
1325
- "type": "string",
1326
- "description": "Mobile number"
1327
- },
1328
- "emails": {
1329
- "type": "array",
1330
- "items": {
1331
- "type": "string",
1332
- "format": "email"
1333
- },
1334
- "description": "Email addresses"
1335
- },
1336
- "fax": {
1337
- "type": "string",
1338
- "description": "Fax number"
1339
- },
1340
- "contactPerson": {
1341
- "type": "string",
1342
- "description": "Contact person name"
1343
- }
1344
- }
1345
- },
1346
1152
  "Country": {
1347
1153
  "type": "string",
1348
1154
  "description": "2-letter ISO supplier country code, default is IL",
@@ -1637,51 +1443,50 @@
1637
1443
  "additionalProperties": false,
1638
1444
  "properties": {
1639
1445
  "id": {
1640
- "$ref": "#/$defs/DocumentId"
1446
+ "$ref": "#/definitions/DocumentId"
1641
1447
  },
1642
1448
  "lang": {
1643
- "$ref": "#/$defs/DocumentLang"
1449
+ "$ref": "#/definitions/DocumentLang"
1644
1450
  },
1645
1451
  "number": {
1646
- "$ref": "#/$defs/DocumentSerialNumber"
1452
+ "$ref": "#/definitions/DocumentSerialNumber"
1647
1453
  },
1648
1454
  "signed": {
1649
- "$ref": "#/$defs/DocumentSigned"
1455
+ "$ref": "#/definitions/DocumentSigned"
1650
1456
  },
1651
1457
  "url": {
1652
- "$ref": "#/$defs/Url"
1458
+ "$ref": "#/definitions/Url"
1653
1459
  }
1654
1460
  },
1655
1461
  "required": ["id", "lang", "number", "signed", "url"]
1656
1462
  },
1657
1463
  "Document": {
1658
- "type": "object",
1659
1464
  "description": "A Single Document",
1660
1465
  "additionalProperties": false,
1661
1466
  "properties": {
1662
1467
  "amount": {
1663
- "$ref": "#/$defs/DocumentAmount"
1468
+ "$ref": "#/definitions/DocumentAmount"
1664
1469
  },
1665
1470
  "amountDueVat": {
1666
- "$ref": "#/$defs/DocumentAmountDueVat"
1471
+ "$ref": "#/definitions/DocumentAmountDueVat"
1667
1472
  },
1668
1473
  "amountDueVatLocal": {
1669
- "$ref": "#/$defs/DocumentAmountDueVatLocal"
1474
+ "$ref": "#/definitions/DocumentAmountDueVatLocal"
1670
1475
  },
1671
1476
  "amountExcludeVat": {
1672
- "$ref": "#/$defs/DocumentAmountExcludeVat"
1477
+ "$ref": "#/definitions/DocumentAmountExcludeVat"
1673
1478
  },
1674
1479
  "amountExemptVat": {
1675
- "$ref": "#/$defs/DocumentAmountExemptVat"
1480
+ "$ref": "#/definitions/DocumentAmountExemptVat"
1676
1481
  },
1677
1482
  "amountLocal": {
1678
- "$ref": "#/$defs/DocumentAmountLocal"
1483
+ "$ref": "#/definitions/DocumentAmountLocal"
1679
1484
  },
1680
1485
  "amountOpened": {
1681
- "$ref": "#/$defs/DocumentAmountOpened"
1486
+ "$ref": "#/definitions/DocumentAmountOpened"
1682
1487
  },
1683
1488
  "business": {
1684
- "$ref": "#/$defs/Business"
1489
+ "$ref": "#/definitions/Business"
1685
1490
  },
1686
1491
  "calculatedAmountLocal": {
1687
1492
  "type": "number"
@@ -1705,75 +1510,68 @@
1705
1510
  "type": "number"
1706
1511
  },
1707
1512
  "client": {
1708
- "allOf": [
1709
- { "$ref": "#/$defs/Client" },
1710
- {
1711
- "type": "object",
1712
- "required": ["country", "emails", "id", "name", "phone", "self"]
1713
- }
1714
- ],
1715
- "unevaluatedProperties": false
1513
+ "$ref": "#/definitions/Client"
1716
1514
  },
1717
1515
  "creationDate": {
1718
- "$ref": "#/$defs/CreationDate"
1516
+ "$ref": "#/definitions/CreationDate"
1719
1517
  },
1720
- "currency": { "$ref": "#/$defs/Currency" },
1518
+ "currency": { "$ref": "#/definitions/Currency" },
1721
1519
  "currencyRate": {
1722
- "$ref": "#/$defs/CurrencyRate"
1520
+ "$ref": "#/definitions/CurrencyRate"
1723
1521
  },
1724
1522
  "data": {
1725
- "$ref": "#/$defs/DocumentData"
1523
+ "$ref": "#/definitions/DocumentData"
1726
1524
  },
1727
1525
  "description": {
1728
- "$ref": "#/$defs/DocumentDescription"
1526
+ "$ref": "#/definitions/DocumentDescription"
1729
1527
  },
1730
1528
  "documentDate": {
1731
- "$ref": "#/$defs/DocumentDate"
1529
+ "$ref": "#/definitions/DocumentDate"
1732
1530
  },
1733
1531
  "downloaded": {
1734
1532
  "type": "boolean"
1735
1533
  },
1736
1534
  "footer": {
1737
- "$ref": "#/$defs/DocumentFooter"
1535
+ "$ref": "#/definitions/DocumentFooter"
1738
1536
  },
1739
1537
  "id": {
1740
- "$ref": "#/$defs/DocumentId"
1538
+ "$ref": "#/definitions/DocumentId"
1741
1539
  },
1742
1540
  "income": {
1743
- "$ref": "#/$defs/DocumentIncome"
1541
+ "$ref": "#/definitions/DocumentIncome"
1744
1542
  },
1745
1543
  "lang": {
1746
- "$ref": "#/$defs/DocumentLang"
1544
+ "$ref": "#/definitions/DocumentLang"
1747
1545
  },
1748
1546
  "linkedDocuments": {
1749
- "$ref": "#/$defs/DocumentLinkedDocuments"
1547
+ "$ref": "#/definitions/DocumentLinkedDocuments"
1750
1548
  },
1751
1549
  "number": {
1752
- "$ref": "#/$defs/DocumentTaxNumber"
1550
+ "$ref": "#/definitions/DocumentTaxNumber"
1753
1551
  },
1754
1552
  "payment": {
1755
- "$ref": "#/$defs/DocumentPayment"
1553
+ "$ref": "#/definitions/DocumentPayment"
1756
1554
  },
1757
1555
  "ref": {
1758
- "$ref": "#/$defs/DocumentRef"
1556
+ "$ref": "#/definitions/DocumentRef"
1759
1557
  },
1760
1558
  "remarks": {
1761
- "$ref": "#/$defs/DocumentRemarks"
1559
+ "$ref": "#/definitions/DocumentRemarks"
1762
1560
  },
1763
1561
  "reverseCharge": {
1764
1562
  "type": "boolean"
1765
1563
  },
1766
1564
  "rounding": {
1767
- "$ref": "#/$defs/DocumentRounding"
1565
+ "$ref": "#/definitions/DocumentRounding"
1768
1566
  },
1769
1567
  "signed": {
1770
- "$ref": "#/$defs/DocumentSigned"
1568
+ "$ref": "#/definitions/DocumentSigned"
1771
1569
  },
1772
1570
  "skinId": {
1773
1571
  "type": "number"
1774
1572
  },
1775
1573
  "status": {
1776
- "$ref": "#/$defs/DocumentStatus"
1574
+ "$ref": "#/definitions/DocumentStatus"
1777
1575
  },
1778
1576
  "taxConfirmationEligible": {
1779
1577
  "type": "boolean"
@@ -1782,25 +1580,25 @@
1782
1580
  "type": "number"
1783
1581
  },
1784
1582
  "type": {
1785
- "$ref": "#/$defs/DocumentType"
1583
+ "$ref": "#/definitions/DocumentType"
1786
1584
  },
1787
1585
  "url": {
1788
- "$ref": "#/$defs/Url"
1586
+ "$ref": "#/definitions/Url"
1789
1587
  },
1790
1588
  "userName": {
1791
1589
  "type": "string"
1792
1590
  },
1793
1591
  "vat": {
1794
- "$ref": "#/$defs/Vat"
1592
+ "$ref": "#/definitions/Vat"
1795
1593
  },
1796
1594
  "vatLocal": {
1797
1595
  "type": "number"
1798
1596
  },
1799
1597
  "vatRate": {
1800
- "$ref": "#/$defs/VatRate"
1598
+ "$ref": "#/definitions/VatRate"
1801
1599
  },
1802
1600
  "vatType": {
1803
- "$ref": "#/$defs/VatType"
1601
+ "$ref": "#/definitions/VatType"
1804
1602
  }
1805
1603
  },
1806
1604
  "required": [
@@ -1847,20 +1645,18 @@
1847
1645
  ]
1848
1646
  },
1849
1647
  "DocumentInputNew": {
1850
- "type": "object",
1851
- "additionalProperties": false,
1852
1648
  "properties": {
1853
1649
  "description": {
1854
- "$ref": "#/$defs/DocumentDescription"
1650
+ "$ref": "#/definitions/DocumentDescription"
1855
1651
  },
1856
1652
  "remarks": {
1857
- "$ref": "#/$defs/DocumentRemarks"
1653
+ "$ref": "#/definitions/DocumentRemarks"
1858
1654
  },
1859
1655
  "footer": {
1860
- "$ref": "#/$defs/DocumentFooter"
1656
+ "$ref": "#/definitions/DocumentFooter"
1861
1657
  },
1862
1658
  "type": {
1863
- "$ref": "#/$defs/DocumentType"
1659
+ "$ref": "#/definitions/DocumentType"
1864
1660
  },
1865
1661
  "date": {
1866
1662
  "description": "Document date in the format YYYY-MM-DD",
@@ -1871,20 +1667,20 @@
1871
1667
  "type": "string"
1872
1668
  },
1873
1669
  "lang": {
1874
- "$ref": "#/$defs/DocumentLang"
1670
+ "$ref": "#/definitions/DocumentLang"
1875
1671
  },
1876
- "currency": { "$ref": "#/$defs/Currency" },
1672
+ "currency": { "$ref": "#/definitions/Currency" },
1877
1673
  "vatType": {
1878
- "$ref": "#/$defs/VatType"
1674
+ "$ref": "#/definitions/VatType"
1879
1675
  },
1880
1676
  "discount": {
1881
- "$ref": "#/$defs/DocumentDiscount"
1677
+ "$ref": "#/definitions/DocumentDiscount"
1882
1678
  },
1883
1679
  "rounding": {
1884
- "$ref": "#/$defs/DocumentRounding"
1680
+ "$ref": "#/definitions/DocumentRounding"
1885
1681
  },
1886
1682
  "signed": {
1887
- "$ref": "#/$defs/DocumentSigned"
1683
+ "$ref": "#/definitions/DocumentSigned"
1888
1684
  },
1889
1685
  "maxPayments": {
1890
1686
  "description": "Max payments allowed (valid only on supported accounts)",
@@ -1892,19 +1688,44 @@
1892
1688
  },
1893
1689
  "client": {
1894
1690
  "allOf": [
1895
- { "$ref": "#/$defs/Client" },
1691
+ { "$ref": "#/definitions/ClientCore" },
1896
1692
  {
1897
1693
  "type": "object",
1898
- "required": ["id"]
1899
- }
1900
- ],
1901
- "unevaluatedProperties": false
1694
+ "properties": {
1695
+ "address": {
1696
+ "type": "string",
1697
+ "description": "Client address"
1698
+ },
1699
+ "city": {
1700
+ "type": "string",
1701
+ "description": "Client city"
1702
+ },
1703
+ "zip": {
1704
+ "type": "string",
1705
+ "description": "Client zip code"
1706
+ },
1707
+ "fax": {
1708
+ "type": "string",
1709
+ "description": "Client fax"
1710
+ },
1711
+ "mobile": {
1712
+ "type": "string",
1713
+ "description": "The client mobile number"
1714
+ },
1715
+ "add": {
1716
+ "type": "boolean",
1717
+ "description": "Add a temporary client to the clients' list"
1718
+ }
1719
+ }
1720
+ },
1721
+ { "required": ["id"] }
1722
+ ]
1902
1723
  },
1903
1724
  "income": {
1904
- "$ref": "#/$defs/DocumentIncome"
1725
+ "$ref": "#/definitions/DocumentIncome"
1905
1726
  },
1906
1727
  "payment": {
1907
- "$ref": "#/$defs/DocumentPayment"
1728
+ "$ref": "#/definitions/DocumentPayment"
1908
1729
  },
1909
1730
  "linkedDocumentIds": {
1910
1731
  "description": "Linked document IDs. allows you to state the related / relevant documents, e.g.: when creating a receipt, attach your original invoice document ID as one of the ids in the linkedDocumentIds - this in turn will automatically close the original invoice if needed.",
@@ -1927,28 +1748,27 @@
1927
1748
  },
1928
1749
  "DocumentCore": {
1929
1750
  "type": "object",
1930
- "additionalProperties": false,
1931
1751
  "properties": {
1932
1752
  "amount": {
1933
- "$ref": "#/$defs/DocumentAmount"
1753
+ "$ref": "#/definitions/DocumentAmount"
1934
1754
  },
1935
1755
  "amountDueVat": {
1936
- "$ref": "#/$defs/DocumentAmountDueVat"
1756
+ "$ref": "#/definitions/DocumentAmountDueVat"
1937
1757
  },
1938
1758
  "amountExcludeVat": {
1939
- "$ref": "#/$defs/DocumentAmountExcludeVat"
1759
+ "$ref": "#/definitions/DocumentAmountExcludeVat"
1940
1760
  },
1941
1761
  "amountExemptVat": {
1942
- "$ref": "#/$defs/DocumentAmountExemptVat"
1762
+ "$ref": "#/definitions/DocumentAmountExemptVat"
1943
1763
  },
1944
1764
  "amountLocal": {
1945
- "$ref": "#/$defs/DocumentAmountLocal"
1765
+ "$ref": "#/definitions/DocumentAmountLocal"
1946
1766
  },
1947
1767
  "amountOpened": {
1948
- "$ref": "#/$defs/DocumentAmountOpened"
1768
+ "$ref": "#/definitions/DocumentAmountOpened"
1949
1769
  },
1950
1770
  "business": {
1951
- "$ref": "#/$defs/Business"
1771
+ "$ref": "#/definitions/Business"
1952
1772
  },
1953
1773
  "calculatedAmountLocal": {
1954
1774
  "type": "number"
@@ -1972,88 +1792,87 @@
1972
1792
  "type": "number"
1973
1793
  },
1974
1794
  "client": {
1975
- "$ref": "#/$defs/Client"
1795
+ "$ref": "#/definitions/ClientCore"
1976
1796
  },
1977
1797
  "creationDate": {
1978
- "$ref": "#/$defs/CreationDate"
1798
+ "$ref": "#/definitions/CreationDate"
1979
1799
  },
1980
- "currency": { "$ref": "#/$defs/Currency" },
1800
+ "currency": { "$ref": "#/definitions/Currency" },
1981
1801
  "currencyRate": {
1982
- "$ref": "#/$defs/CurrencyRate"
1802
+ "$ref": "#/definitions/CurrencyRate"
1983
1803
  },
1984
1804
  "data": {
1985
- "$ref": "#/$defs/DocumentData"
1805
+ "$ref": "#/definitions/DocumentData"
1986
1806
  },
1987
1807
  "description": {
1988
- "$ref": "#/$defs/DocumentDescription"
1808
+ "$ref": "#/definitions/DocumentDescription"
1989
1809
  },
1990
1810
  "documentDate": {
1991
- "$ref": "#/$defs/DocumentDate"
1811
+ "$ref": "#/definitions/DocumentDate"
1992
1812
  },
1993
1813
  "downloaded": {
1994
1814
  "type": "boolean"
1995
1815
  },
1996
1816
  "id": {
1997
- "$ref": "#/$defs/DocumentId"
1817
+ "$ref": "#/definitions/DocumentId"
1998
1818
  },
1999
1819
  "income": {
2000
- "$ref": "#/$defs/DocumentIncome"
1820
+ "$ref": "#/definitions/DocumentIncome"
2001
1821
  },
2002
1822
  "lang": {
2003
- "$ref": "#/$defs/DocumentLang"
1823
+ "$ref": "#/definitions/DocumentLang"
2004
1824
  },
2005
1825
  "number": {
2006
- "$ref": "#/$defs/DocumentTaxNumber"
1826
+ "$ref": "#/definitions/DocumentTaxNumber"
2007
1827
  },
2008
1828
  "payment": {
2009
- "$ref": "#/$defs/DocumentPayment"
1829
+ "$ref": "#/definitions/DocumentPayment"
2010
1830
  },
2011
1831
  "ref": {
2012
- "$ref": "#/$defs/DocumentRef"
1832
+ "$ref": "#/definitions/DocumentRef"
2013
1833
  },
2014
1834
  "remarks": {
2015
- "$ref": "#/$defs/DocumentRemarks"
1835
+ "$ref": "#/definitions/DocumentRemarks"
2016
1836
  },
2017
1837
  "reverseCharge": {
2018
1838
  "type": "boolean"
2019
1839
  },
2020
1840
  "rounding": {
2021
- "$ref": "#/$defs/DocumentRounding"
1841
+ "$ref": "#/definitions/DocumentRounding"
2022
1842
  },
2023
1843
  "signed": {
2024
- "$ref": "#/$defs/DocumentSigned"
1844
+ "$ref": "#/definitions/DocumentSigned"
2025
1845
  },
2026
1846
  "skinId": {
2027
1847
  "type": "number"
2028
1848
  },
2029
1849
  "status": {
2030
- "$ref": "#/$defs/DocumentStatus"
1850
+ "$ref": "#/definitions/DocumentStatus"
2031
1851
  },
2032
1852
  "templateId": {
2033
1853
  "type": "number"
2034
1854
  },
2035
1855
  "type": {
2036
- "$ref": "#/$defs/DocumentType"
1856
+ "$ref": "#/definitions/DocumentType"
2037
1857
  },
2038
1858
  "url": {
2039
- "$ref": "#/$defs/Url"
1859
+ "$ref": "#/definitions/Url"
2040
1860
  },
2041
1861
  "vat": {
2042
- "$ref": "#/$defs/Vat"
1862
+ "$ref": "#/definitions/Vat"
2043
1863
  },
2044
1864
  "vatRate": {
2045
- "$ref": "#/$defs/VatRate"
1865
+ "$ref": "#/definitions/VatRate"
2046
1866
  },
2047
1867
  "vatType": {
2048
- "$ref": "#/$defs/VatType"
1868
+ "$ref": "#/definitions/VatType"
2049
1869
  }
2050
1870
  }
2051
1871
  },
2052
1872
  "Expense": {
2053
1873
  "allOf": [
2054
- { "$ref": "#/$defs/ExpensePartial" },
1874
+ { "$ref": "#/definitions/ExpensePartial" },
2055
1875
  {
2056
- "type": "object",
2057
1876
  "required": [
2058
1877
  "currency",
2059
1878
  "vat",
@@ -2066,8 +1885,7 @@
2066
1885
  "accountingClassification"
2067
1886
  ]
2068
1887
  }
2069
- ],
2070
- "unevaluatedProperties": false
1888
+ ]
2071
1889
  },
2072
1890
  "ExpensePartial": {
2073
1891
  "type": "object",
@@ -2087,13 +1905,13 @@
2087
1905
  ]
2088
1906
  },
2089
1907
  "currency": {
2090
- "$ref": "#/$defs/Currency"
1908
+ "$ref": "#/definitions/Currency"
2091
1909
  },
2092
1910
  "currencyRate": {
2093
- "$ref": "#/$defs/CurrencyRate"
1911
+ "$ref": "#/definitions/CurrencyRate"
2094
1912
  },
2095
1913
  "vat": {
2096
- "$ref": "#/$defs/Vat"
1914
+ "$ref": "#/definitions/Vat"
2097
1915
  },
2098
1916
  "amount": {
2099
1917
  "type": "number",
@@ -2112,7 +1930,7 @@
2112
1930
  "description": "Reporting date of the expense"
2113
1931
  },
2114
1932
  "documentType": {
2115
- "$ref": "#/$defs/ExpenseDocumentType"
1933
+ "$ref": "#/definitions/ExpenseDocumentType"
2116
1934
  },
2117
1935
  "number": {
2118
1936
  "type": ["string", "null"],
@@ -2124,13 +1942,13 @@
2124
1942
  },
2125
1943
  "remarks": {
2126
1944
  "type": "string",
2127
- "description": "Remarks for the expense"
1945
+ "string": "Remarks for the expense"
2128
1946
  },
2129
1947
  "supplier": {
2130
- "$ref": "#/$defs/Supplier"
1948
+ "$ref": "#/definitions/Supplier"
2131
1949
  },
2132
1950
  "accountingClassification": {
2133
- "$ref": "#/$defs/AccountingClassification"
1951
+ "$ref": "#/definitions/AccountingClassification"
2134
1952
  },
2135
1953
  "active": {
2136
1954
  "type": "boolean",
@@ -2165,7 +1983,7 @@
2165
1983
  "enum": [1, 2, 3, 4, 5, 6]
2166
1984
  },
2167
1985
  "documentType": {
2168
- "$ref": "#/$defs/ExpenseDocumentType"
1986
+ "$ref": "#/definitions/ExpenseDocumentType"
2169
1987
  },
2170
1988
  "status": {
2171
1989
  "type": "number",
@@ -2178,13 +1996,13 @@
2178
1996
  "enum": [-1, 0, 1, 2, 3, 4, 5, 10, 11]
2179
1997
  },
2180
1998
  "currency": {
2181
- "$ref": "#/$defs/Currency"
1999
+ "$ref": "#/definitions/Currency"
2182
2000
  },
2183
2001
  "currencyRate": {
2184
- "$ref": "#/$defs/CurrencyRate"
2002
+ "$ref": "#/definitions/CurrencyRate"
2185
2003
  },
2186
2004
  "vat": {
2187
- "$ref": "#/$defs/Vat"
2005
+ "$ref": "#/definitions/Vat"
2188
2006
  },
2189
2007
  "amount": {
2190
2008
  "type": "number",
@@ -2215,7 +2033,7 @@
2215
2033
  "description": "Remarks for the expense"
2216
2034
  },
2217
2035
  "supplier": {
2218
- "$ref": "#/$defs/Supplier"
2036
+ "$ref": "#/definitions/Supplier"
2219
2037
  },
2220
2038
  "thumbnail": {
2221
2039
  "type": "string",
@@ -2234,7 +2052,7 @@
2234
2052
  "description": "Reporting date of the expense"
2235
2053
  },
2236
2054
  "accountingClassification": {
2237
- "$ref": "#/$defs/AccountingClassification"
2055
+ "$ref": "#/definitions/AccountingClassification"
2238
2056
  },
2239
2057
  "amountLocal": {
2240
2058
  "type": "number",
@@ -2249,7 +2067,7 @@
2249
2067
  "description": "The vat amount of accounting"
2250
2068
  },
2251
2069
  "creationDate": {
2252
- "$ref": "#/$defs/CreationDate"
2070
+ "$ref": "#/definitions/CreationDate"
2253
2071
  },
2254
2072
  "lastUpdateDate": {
2255
2073
  "type": "integer",
@@ -2271,14 +2089,14 @@
2271
2089
  "enum": [10, 50]
2272
2090
  },
2273
2091
  "creationDate": {
2274
- "$ref": "#/$defs/CreationDate"
2092
+ "$ref": "#/definitions/CreationDate"
2275
2093
  },
2276
2094
  "lastUpdateDate": {
2277
2095
  "type": "integer",
2278
2096
  "description": "The last update date of the expense draft, in UNIX timestamp format"
2279
2097
  },
2280
2098
  "expense": {
2281
- "$ref": "#/$defs/ExpensePartial"
2099
+ "$ref": "#/definitions/ExpensePartial"
2282
2100
  },
2283
2101
  "thumbnail": {
2284
2102
  "type": "string",
@@ -2295,26 +2113,26 @@
2295
2113
  "additionalProperties": false,
2296
2114
  "properties": {
2297
2115
  "amount": {
2298
- "$ref": "#/$defs/DocumentAmount"
2116
+ "$ref": "#/definitions/DocumentAmount"
2299
2117
  },
2300
- "currency": { "$ref": "#/$defs/Currency" },
2118
+ "currency": { "$ref": "#/definitions/Currency" },
2301
2119
  "currencyRate": {
2302
- "$ref": "#/$defs/CurrencyRate"
2120
+ "$ref": "#/definitions/CurrencyRate"
2303
2121
  },
2304
2122
  "documentDate": {
2305
- "$ref": "#/$defs/DocumentDate"
2123
+ "$ref": "#/definitions/DocumentDate"
2306
2124
  },
2307
2125
  "id": {
2308
- "$ref": "#/$defs/DocumentId"
2126
+ "$ref": "#/definitions/DocumentId"
2309
2127
  },
2310
2128
  "number": {
2311
- "$ref": "#/$defs/DocumentTaxNumber"
2129
+ "$ref": "#/definitions/DocumentTaxNumber"
2312
2130
  },
2313
2131
  "status": {
2314
- "$ref": "#/$defs/DocumentStatus"
2132
+ "$ref": "#/definitions/DocumentStatus"
2315
2133
  },
2316
2134
  "type": {
2317
- "$ref": "#/$defs/DocumentType"
2135
+ "$ref": "#/definitions/DocumentType"
2318
2136
  }
2319
2137
  }
2320
2138
  },
@@ -2325,14 +2143,12 @@
2325
2143
  "amount": {
2326
2144
  "type": "number",
2327
2145
  "description": "Amount",
2328
- "examples": [354],
2329
- "minimum": 0
2146
+ "examples": [354]
2330
2147
  },
2331
2148
  "amountTotal": {
2332
2149
  "type": "number",
2333
2150
  "description": "Total amount",
2334
- "examples": [354],
2335
- "minimum": 0
2151
+ "examples": [354]
2336
2152
  },
2337
2153
  "catalogNum": {
2338
2154
  "type": "string",
@@ -2340,16 +2156,15 @@
2340
2156
  "examples": ["MXDFSDD"]
2341
2157
  },
2342
2158
  "currency": {
2343
- "$ref": "#/$defs/Currency"
2159
+ "$ref": "#/definitions/Currency"
2344
2160
  },
2345
2161
  "currencyRate": {
2346
- "$ref": "#/$defs/CurrencyRate"
2162
+ "$ref": "#/definitions/CurrencyRate"
2347
2163
  },
2348
2164
  "description": {
2349
2165
  "type": "string",
2350
2166
  "description": "Item description",
2351
- "examples": ["Item description"],
2352
- "minLength": 1
2167
+ "examples": ["Item description"]
2353
2168
  },
2354
2169
  "itemId": {
2355
2170
  "type": "string",
@@ -2359,74 +2174,33 @@
2359
2174
  "price": {
2360
2175
  "type": "number",
2361
2176
  "description": "Item price",
2362
- "examples": [300],
2363
- "minimum": 0
2177
+ "examples": [300]
2364
2178
  },
2365
2179
  "quantity": {
2366
2180
  "type": "number",
2367
2181
  "description": "Quantity",
2368
- "examples": [1],
2369
- "minimum": 0
2182
+ "examples": [1]
2370
2183
  },
2371
2184
  "vat": {
2372
- "$ref": "#/$defs/Vat"
2185
+ "$ref": "#/definitions/Vat"
2373
2186
  },
2374
2187
  "vatRate": {
2375
- "$ref": "#/$defs/VatRate"
2188
+ "$ref": "#/definitions/VatRate"
2376
2189
  },
2377
2190
  "vatType": {
2378
- "$ref": "#/$defs/VatType"
2191
+ "$ref": "#/definitions/VatType"
2379
2192
  }
2380
2193
  },
2381
2194
  "required": ["description", "quantity", "price", "currency", "vatType"]
2382
2195
  },
2383
- "PaginationMeta": {
2384
- "type": "object",
2385
- "description": "Pagination metadata for list responses",
2386
- "additionalProperties": false,
2387
- "required": ["total", "page", "pageSize", "pages"],
2388
- "properties": {
2389
- "total": {
2390
- "type": "number",
2391
- "description": "Total number of items",
2392
- "minimum": 0
2393
- },
2394
- "page": {
2395
- "type": "number",
2396
- "description": "Current page number",
2397
- "minimum": 1
2398
- },
2399
- "pageSize": {
2400
- "type": "number",
2401
- "description": "Number of items per page",
2402
- "minimum": 1
2403
- },
2404
- "pages": {
2405
- "type": "number",
2406
- "description": "Total number of pages",
2407
- "minimum": 0
2408
- },
2409
- "from": {
2410
- "type": "number",
2411
- "description": "Starting index",
2412
- "minimum": 0
2413
- },
2414
- "to": {
2415
- "type": "number",
2416
- "description": "Ending index",
2417
- "minimum": 0
2418
- }
2419
- }
2420
- },
2421
2196
  "Payment": {
2422
2197
  "allOf": [
2423
- { "$ref": "#/$defs/PaymentCore" },
2198
+ { "$ref": "#/definitions/PaymentCore" },
2424
2199
  {
2425
- "type": "object",
2200
+ "additionalProperties": false,
2426
2201
  "properties": {
2427
2202
  "amount": {
2428
- "type": "number",
2429
- "description": "Payment amount"
2203
+ "type": "number"
2430
2204
  },
2431
2205
  "cancellable": {
2432
2206
  "type": "boolean",
@@ -2434,36 +2208,33 @@
2434
2208
  "examples": [false]
2435
2209
  },
2436
2210
  "description": {
2437
- "type": "string",
2438
- "description": "Payment description"
2211
+ "type": "string"
2439
2212
  },
2440
2213
  "name": {
2441
2214
  "type": "string",
2442
- "description": "Payment name",
2443
2215
  "examples": ["העברה בנקאית"]
2444
2216
  },
2445
2217
  "ref": {
2446
2218
  "type": "array",
2447
2219
  "description": "The referred documents types",
2448
2220
  "items": {
2449
- "$ref": "#/$defs/DocumentType"
2221
+ "$ref": "#/definitions/DocumentType"
2450
2222
  }
2451
2223
  }
2452
2224
  },
2453
2225
  "required": ["type", "price"]
2454
2226
  }
2455
- ],
2456
- "unevaluatedProperties": false
2227
+ ]
2457
2228
  },
2458
2229
  "PaymentDocument": {
2459
2230
  "type": "object",
2460
2231
  "additionalProperties": false,
2461
2232
  "properties": {
2462
2233
  "currency": {
2463
- "$ref": "#/$defs/Currency"
2234
+ "$ref": "#/definitions/Currency"
2464
2235
  },
2465
2236
  "currencyRate": {
2466
- "$ref": "#/$defs/CurrencyRate"
2237
+ "$ref": "#/definitions/CurrencyRate"
2467
2238
  },
2468
2239
  "date": {
2469
2240
  "type": "string"
@@ -2548,23 +2319,20 @@
2548
2319
  },
2549
2320
  "PaymentCore": {
2550
2321
  "type": "object",
2551
- "additionalProperties": false,
2552
2322
  "properties": {
2553
2323
  "currency": {
2554
- "$ref": "#/$defs/Currency"
2324
+ "$ref": "#/definitions/Currency"
2555
2325
  },
2556
2326
  "currencyRate": {
2557
- "$ref": "#/$defs/CurrencyRate"
2327
+ "$ref": "#/definitions/CurrencyRate"
2558
2328
  },
2559
2329
  "date": {
2560
- "type": "string",
2561
- "description": "Payment date"
2330
+ "type": "string"
2562
2331
  },
2563
2332
  "price": {
2564
2333
  "type": "number",
2565
2334
  "description": "Sum paid",
2566
- "examples": [300],
2567
- "minimum": 0
2335
+ "examples": [300]
2568
2336
  },
2569
2337
  "type": {
2570
2338
  "type": "number",
@@ -2579,75 +2347,115 @@
2579
2347
  }
2580
2348
  },
2581
2349
  "Supplier": {
2582
- "allOf": [
2583
- { "$ref": "#/$defs/ContactInfo" },
2584
- { "$ref": "#/$defs/Address" },
2585
- { "$ref": "#/$defs/BankingInfo" },
2586
- {
2587
- "type": "object",
2588
- "description": "Supplier of the expense",
2589
- "properties": {
2590
- "id": {
2591
- "type": "string",
2592
- "description": "The supplier ID"
2593
- },
2594
- "name": {
2595
- "type": "string",
2596
- "description": "The supplier name"
2597
- },
2598
- "active": {
2599
- "type": "boolean",
2600
- "description": "Is the supplier active or not"
2601
- },
2602
- "taxId": {
2603
- "type": "string",
2604
- "description": "The supplier tax ID"
2605
- },
2606
- "paymentTerms": {
2607
- "type": "number",
2608
- "description": "The supplier payment term, default is 0",
2609
- "enum": [-1, 0, 10, 15, 30, 45, 60, 75, 90, 120]
2610
- },
2611
- "labels": {
2612
- "type": "array",
2613
- "items": {
2614
- "type": "string"
2615
- }
2616
- },
2617
- "creationDate": {
2618
- "$ref": "#/$defs/CreationDate"
2619
- },
2620
- "lastUpdateDate": {
2621
- "type": "integer",
2622
- "description": "The last update date of the supplier, in UNIX timestamp format"
2623
- },
2624
- "department": {
2625
- "type": "string",
2626
- "description": "The supplier department"
2627
- },
2628
- "accountingKey": {
2629
- "type": "string",
2630
- "description": "The supplier accounting key"
2631
- },
2632
- "remarks": {
2633
- "type": "string",
2634
- "description": "The Supplier remarks for self use"
2635
- },
2636
- "incomeAmount": {
2637
- "type": "number",
2638
- "description": "The amount of incomes from the customer"
2639
- },
2640
- "paymentAmount": {
2641
- "type": "number"
2642
- },
2643
- "balanceAmount": {
2644
- "type": "number",
2645
- "description": "The balance amount of the supplier"
2646
- }
2350
+ "type": "object",
2351
+ "additionalProperties": false,
2352
+ "description": "Supplier of the expense",
2353
+ "properties": {
2354
+ "id": {
2355
+ "type": "string",
2356
+ "description": "The supplier ID"
2357
+ },
2358
+ "name": {
2359
+ "type": "string",
2360
+ "description": "The supplier name"
2361
+ },
2362
+ "active": {
2363
+ "type": "boolean",
2364
+ "description": "Is the supplier active or not"
2365
+ },
2366
+ "taxId": {
2367
+ "type": "string",
2368
+ "description": "The supplier tax ID"
2369
+ },
2370
+ "paymentTerms": {
2371
+ "type": "number",
2372
+ "description": "The supplier payment term, default is 0",
2373
+ "enum": [-1, 0, 10, 15, 30, 45, 60, 75, 90, 120]
2374
+ },
2375
+ "bankName": {
2376
+ "type": "string",
2377
+ "description": "The supplier bank name"
2378
+ },
2379
+ "bankBranch": {
2380
+ "type": "string",
2381
+ "description": "The supplier bank branch number"
2382
+ },
2383
+ "bankAccount": {
2384
+ "type": "string",
2385
+ "description": "The supplier bank account number"
2386
+ },
2387
+ "country": {
2388
+ "$ref": "#/definitions/Country"
2389
+ },
2390
+ "phone": {
2391
+ "type": "string",
2392
+ "description": "The supplier phone number"
2393
+ },
2394
+ "mobile": {
2395
+ "type": "string",
2396
+ "description": "The supplier mobile number"
2397
+ },
2398
+ "contactPerson": {
2399
+ "type": "string",
2400
+ "description": "The supplier contact person name"
2401
+ },
2402
+ "emails": {
2403
+ "$ref": "#/definitions/ClientEmails"
2404
+ },
2405
+ "labels": {
2406
+ "type": "array",
2407
+ "additionalItems": false,
2408
+ "items": {
2409
+ "type": "string"
2647
2410
  }
2411
+ },
2412
+ "creationDate": {
2413
+ "$ref": "#/definitions/CreationDate"
2414
+ },
2415
+ "lastUpdateDate": {
2416
+ "type": "integer",
2417
+ "description": "The last update date of the supplier, in UNIX timestamp format"
2418
+ },
2419
+ "department": {
2420
+ "type": "string",
2421
+ "description": "The supplier department"
2422
+ },
2423
+ "accountingKey": {
2424
+ "type": "string",
2425
+ "description": "The supplier accounting key"
2426
+ },
2427
+ "address": {
2428
+ "type": "string",
2429
+ "description": "The supplier address"
2430
+ },
2431
+ "city": {
2432
+ "type": "string",
2433
+ "description": "The supplier city"
2434
+ },
2435
+ "zip": {
2436
+ "type": "string",
2437
+ "description": "The supplier zip code"
2438
+ },
2439
+ "fax": {
2440
+ "type": "string",
2441
+ "description": "The supplier fax number"
2442
+ },
2443
+ "remarks": {
2444
+ "type": "string",
2445
+ "description": "The Supplier remarks for self use"
2446
+ },
2447
+ "incomeAmount": {
2448
+ "type": "number",
2449
+ "description": "The amount of incomes from the customer"
2450
+ },
2451
+ "paymentAmount": {
2452
+ "type": "number"
2453
+ },
2454
+ "balanceAmount": {
2455
+ "type": "number",
2456
+ "description": "The balance amount of the supplier"
2648
2457
  }
2649
- ],
2650
- "unevaluatedProperties": false
2458
+ }
2651
2459
  },
2652
2460
  "ErrorResponse": {
2653
2461
  "type": "object",
@@ -2683,15 +2491,12 @@
2683
2491
  },
2684
2492
  "CreationDate": {
2685
2493
  "type": "integer",
2686
- "description": "The creation date, in UNIX timestamp format",
2687
- "minimum": 0
2494
+ "description": "The creation date, in UNIX timestamp format"
2688
2495
  },
2689
2496
  "CurrencyRate": {
2690
2497
  "type": "number",
2691
2498
  "description": "Currency rate relative to ILS",
2692
- "examples": [1],
2693
- "minimum": 0,
2694
- "exclusiveMinimum": 0
2499
+ "examples": [1]
2695
2500
  },
2696
2501
  "DocumentLang": {
2697
2502
  "description": "Document language",
@@ -2700,13 +2505,12 @@
2700
2505
  },
2701
2506
  "DocumentDescription": {
2702
2507
  "description": "Document's description",
2703
- "type": "string",
2704
- "minLength": 1
2508
+ "type": "string"
2705
2509
  },
2706
2510
  "DocumentIncome": {
2707
2511
  "type": "array",
2708
2512
  "items": {
2709
- "$ref": "#/$defs/Income"
2513
+ "$ref": "#/definitions/Income"
2710
2514
  }
2711
2515
  },
2712
2516
  "DocumentId": {
@@ -2716,7 +2520,7 @@
2716
2520
  "DocumentLinkedDocuments": {
2717
2521
  "type": "array",
2718
2522
  "items": {
2719
- "$ref": "#/$defs/DocumentLinkedDocument"
2523
+ "$ref": "#/definitions/DocumentLinkedDocument"
2720
2524
  }
2721
2525
  },
2722
2526
  "DocumentLinkedDocument": {
@@ -2724,26 +2528,26 @@
2724
2528
  "additionalProperties": false,
2725
2529
  "properties": {
2726
2530
  "amount": {
2727
- "$ref": "#/$defs/DocumentAmount"
2531
+ "$ref": "#/definitions/DocumentAmount"
2728
2532
  },
2729
- "currency": { "$ref": "#/$defs/Currency" },
2533
+ "currency": { "$ref": "#/definitions/Currency" },
2730
2534
  "currencyRate": {
2731
- "$ref": "#/$defs/CurrencyRate"
2535
+ "$ref": "#/definitions/CurrencyRate"
2732
2536
  },
2733
2537
  "documentDate": {
2734
- "$ref": "#/$defs/DocumentDate"
2538
+ "$ref": "#/definitions/DocumentDate"
2735
2539
  },
2736
2540
  "id": {
2737
- "$ref": "#/$defs/DocumentId"
2541
+ "$ref": "#/definitions/DocumentId"
2738
2542
  },
2739
2543
  "number": {
2740
- "$ref": "#/$defs/DocumentTaxNumber"
2544
+ "$ref": "#/definitions/DocumentTaxNumber"
2741
2545
  },
2742
2546
  "reverseCharge": {
2743
2547
  "type": "boolean"
2744
2548
  },
2745
2549
  "type": {
2746
- "$ref": "#/$defs/DocumentType"
2550
+ "$ref": "#/definitions/DocumentType"
2747
2551
  }
2748
2552
  },
2749
2553
  "required": [
@@ -2760,7 +2564,7 @@
2760
2564
  "DocumentPayment": {
2761
2565
  "type": "array",
2762
2566
  "items": {
2763
- "$ref": "#/$defs/PaymentDocument"
2567
+ "$ref": "#/definitions/PaymentDocument"
2764
2568
  }
2765
2569
  },
2766
2570
  "DocumentRef": {
@@ -2779,8 +2583,7 @@
2779
2583
  },
2780
2584
  "DocumentDate": {
2781
2585
  "description": "Document reference date",
2782
- "type": "string",
2783
- "format": "date"
2586
+ "type": "string"
2784
2587
  },
2785
2588
  "DocumentDiscount": {
2786
2589
  "description": "Discount information",
@@ -2832,50 +2635,42 @@
2832
2635
  "DocumentSerialNumber": {
2833
2636
  "description": "Document serial number",
2834
2637
  "type": "integer",
2835
- "examples": [10002],
2836
- "minimum": 1
2638
+ "examples": [10002]
2837
2639
  },
2838
2640
  "DocumentAmount": {
2839
2641
  "description": "Total amount, in requested currency (including the VAT, Discount & Rounding)",
2840
2642
  "type": "number",
2841
- "examples": [354],
2842
- "minimum": 0
2643
+ "examples": [354]
2843
2644
  },
2844
2645
  "DocumentAmountDueVat": {
2845
2646
  "description": "Amount due VAT - Amount before VAT, and before rounding & discount (if requested)",
2846
2647
  "type": "number",
2847
- "examples": [100],
2848
- "minimum": 0
2648
+ "examples": [100]
2849
2649
  },
2850
2650
  "DocumentAmountExcludeVat": {
2851
2651
  "description": "Amount excluded VAT - Amount that is excluded of VAT",
2852
2652
  "type": "number",
2853
- "examples": [18],
2854
- "minimum": 0
2653
+ "examples": [18]
2855
2654
  },
2856
2655
  "DocumentAmountDueVatLocal": {
2857
2656
  "description": "Amount due VAT - local currency",
2858
2657
  "type": "number",
2859
- "examples": [100],
2860
- "minimum": 0
2658
+ "examples": [100]
2861
2659
  },
2862
2660
  "DocumentAmountExemptVat": {
2863
2661
  "description": "Amount exempt VAT - 0 unless there's one or more items that are excluded of VAT such as mixed documents (that have both VAT excluded & included items)",
2864
2662
  "type": "number",
2865
- "examples": [18],
2866
- "minimum": 0
2663
+ "examples": [18]
2867
2664
  },
2868
2665
  "DocumentAmountLocal": {
2869
2666
  "description": "Amount in local currency",
2870
2667
  "type": "number",
2871
- "examples": [300],
2872
- "minimum": 0
2668
+ "examples": [300]
2873
2669
  },
2874
2670
  "DocumentAmountOpened": {
2875
2671
  "description": "Amount that is still left to be paid, exists only in payment request documents",
2876
2672
  "type": "number",
2877
- "examples": [300],
2878
- "minimum": 0
2673
+ "examples": [300]
2879
2674
  },
2880
2675
  "ExpenseDocumentType": {
2881
2676
  "type": "number",
@@ -2885,8 +2680,7 @@
2885
2680
  "Vat": {
2886
2681
  "description": "VAT amount",
2887
2682
  "type": "number",
2888
- "examples": [54],
2889
- "minimum": 0
2683
+ "examples": [54]
2890
2684
  },
2891
2685
  "VatType": {
2892
2686
  "description": "VAT type",
@@ -2896,9 +2690,7 @@
2896
2690
  },
2897
2691
  "VatRate": {
2898
2692
  "type": "number",
2899
- "description": "VAT rate",
2900
- "minimum": 0,
2901
- "maximum": 100
2693
+ "description": "VAT rate"
2902
2694
  }
2903
2695
  }
2904
2696
  }